#ui .hud-top {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: start;
  gap: 10px;
}
#ui .hud-top > .hud-left, #ui .hud-top > .hud-right { pointer-events: none; min-width: 0; }
#ui .hud-top button { pointer-events: auto; }
#ui .hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
#ui .hud-right { display: flex; align-items: stretch; gap: 8px; max-width: 100%; }
#ui .condition-hud {
  width: min(100%, 378px); padding: 5px 7px; min-height: 49px; gap: 5px;
  border-radius: 15px; background: #182c32f2; border-color: #c3dad447;
}
#ui .condition-meter { background-color: #ffffff0b; padding: 5px; }
#ui .condition-meter.urgent { background-color: #9a4d3b50; }
#ui .condition-meter > span { height: 4px; }
#ui .hud-left .socialbtn {
  position: relative; inset: auto; transform: none; margin: 0; border-radius: 12px;
}
#ui .hud-left .social-home-label { display: block; }
#ui .hud-local {
  display: flex; gap: 12px; align-items: center; min-width: 0; text-align: left;
  padding: 8px 12px; border-radius: 15px; color: #f1f8f4; background: #182c32f2;
  border: 1px solid #c3dad447; box-shadow: 0 4px 12px #14202245;
}
.hud-local-place { display: grid; gap: 4px; min-width: 0; }
.hud-local-place b { font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-local small { font-size: 11px; color: #c3d9d5; }
.hud-local-place small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 174px; }
.hud-local-weather { display: flex; align-items: center; gap: 5px; flex: none; border-left: 1px solid #ffffff30; padding-left: 10px; }
.hud-local-weather i { font-style: normal; font-size: 17px; }
#ui .life-open {
  display: grid; align-content: center; justify-items: start; gap: 2px; min-height: 54px;
  min-width: 106px; padding: 7px 13px; border-radius: 15px;
  color: #382815; background: linear-gradient(145deg, #fff0bd, #efc675);
  border: 1px solid #f8dfa1; box-shadow: 0 4px 12px #271c2545;
}
#ui .life-open small { color: #634620; }
#ui .life-open #cashnum { color: #382815; font-size: clamp(17px, 2vw, 26px); font-weight: 850; line-height: 1.05; white-space: nowrap; }
#ui .life-open.low { background: linear-gradient(145deg, #ffe1bc, #eda779); }
#ui .sheet.wxpanel { top: calc(var(--hud-h, 86px) + 22px + var(--safe-t, 0px)); width: min(350px, calc(100vw - 20px)); max-height: 65dvh; border-radius: 17px; background: #182c32f7; }
.hud-weather-readings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.hud-weather-readings div { border-radius: 10px; background: #ffffff0f; padding: 9px; }
.hud-weather-readings dt, .hud-weather-source { color: #b6cecf; font-size: 12px; }
.hud-weather-readings dd { margin: 4px 0 0; font-weight: 750; }
.hud-weather-source { margin: 10px 0 0; }
.game-audio-menu { top: auto; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 5px; }
.game-audio-menu > div { margin-top: 0; }
@media (max-width: 740px) {
  #ui .hud-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  #ui .hud-right { flex-direction: column; align-items: flex-end; gap: 5px; width: 100%; }
  #ui .hud-local { width: 100%; padding: 6px 7px; gap: 5px; justify-content: space-between; }
  .hud-local-place b { font-size: 11px; }
  .hud-local-place small, .hud-local-weather small { font-size: 9px; }
  .hud-local-weather { padding-left: 5px; gap: 2px; flex-wrap: wrap; max-width: 55px; }
  .hud-local-weather i { font-size: 12px; }
  .hud-local-weather b { font-size: 11px; }
  #ui .condition-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 4px; }
  #ui .condition-meter { padding: 3px; }
  #ui .life-open { min-height: 39px; min-width: 78px; padding: 4px 8px; gap: 1px; }
  #ui .life-open small { font-size: 9px; }
  #ui .hud-left .social-home-label small { display: none; }
  .game-audio-menu { bottom: calc(var(--above-dock, 84px) + 6px); }
}
.badminton-playing .game-audio-menu { bottom: auto; top: max(8px, env(safe-area-inset-top)); flex-direction: column; }
