.nightlife-controls {
  position: fixed;
  right: 32px;
  bottom: calc(146px + var(--safe-bottom));
  width: 340px;
  max-width: calc(100vw - 64px);
  pointer-events: auto;
}
.nightlife-pocket {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 9px;
  color: #fff4dd;
  font-size: .8rem;
  line-height: 1.4;
  text-shadow: 0 1px 5px #162b23;
}
.nightlife-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.nightlife-buttons button {
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #aaa58c;
  border-radius: 7px;
  background: #223a32ed;
  color: #fff4dd;
  font: 600 .875rem/1.25 var(--font-body, sans-serif);
  cursor: pointer;
  touch-action: manipulation;
}
.nightlife-buttons #dance-button { border-color: #e4b45e; background: #f3c66f; color: #26392c; }
.nightlife-buttons #dance-button[aria-pressed="true"] { background: #ffdc8b; box-shadow: inset 0 0 0 2px #26392c; }
.nightlife-buttons button:focus-visible { outline: 3px solid #ffd27b; outline-offset: 3px; }
.nightlife-controls.is-stowed { bottom: calc(240px + var(--safe-bottom)); }
.nightlife-controls.is-stowed .nightlife-pocket { display: none; }
#hud.is-indoors .minimap-wrap,
#hud.is-indoors #bike-button,
#hud.is-indoors #touch-bike,
#hud.is-indoors #touch-run,
#hud.is-indoors #dennis-button,
#hud.is-indoors #bike-badge,
#hud.is-indoors #show-map,
#hud.beers-stowed #bike-badge { display: none !important; }
#hud.is-indoors .quest-card { border-left-color: #f1bc75; }
#hud .nightlife-track { margin: 10px 0 0; color: #edc68d; font-size: .8rem; line-height: 1.45; }

@media (max-width: 700px), (pointer: coarse), (max-width: 900px) and (max-height: 560px) {
  #hud.has-nightlife { grid-template-rows: auto minmax(0,1fr) auto auto auto 164px; }
  #hud.has-nightlife .touch-controls { height: 164px; }
  #hud .nightlife-controls {
    position: static;
    grid-area: 6 / 1 / 7 / -1;
    align-self: start;
    justify-self: end;
    width: calc(100% - 112px);
    max-width: 360px;
    z-index: 1;
  }
  .nightlife-pocket { gap: 3px 12px; margin-bottom: 7px; font-size: .75rem; }
  .nightlife-buttons { gap: 6px; }
  .nightlife-buttons button { padding: 8px 10px; min-height: 44px; font-size: .875rem; }
  #hud.has-nightlife #touch-look-hint { display: none; }
  #hud.beers-stowed .nightlife-controls { grid-area: 3 / 1 / 4 / -1; width: auto; }
  #hud.is-indoors .quest-card { grid-column: 1 / -1; max-width: 360px; }
  #hud.is-indoors .touch-actions { right: 0; }
  #hud.is-indoors .greeting-controls { max-width: 100%; }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 900px), (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
  #hud.has-nightlife { grid-template-rows: auto minmax(0,1fr) auto 148px; }
  #hud.has-nightlife .touch-controls { height: 148px; }
  #hud .nightlife-controls { grid-area: 4 / 2 / 5 / -1; width: 300px; }
  #hud.is-indoors { grid-template-rows: auto minmax(0,1fr) auto 116px; }
  #hud.is-indoors .touch-controls { height: 116px; }
  #hud.is-indoors .quest-card { grid-area: 2 / 1 / 4 / 2; }
  #hud.beers-stowed .nightlife-controls { grid-area: 3 / 1 / 4 / 2; justify-self: start; }
  #hud.has-nightlife .greeting-controls { justify-self: start; align-self: end; max-width: calc(100% - 60px); }
}
