/* A compact, persistent HUD shared by every gameplay step. */
html { min-width: 0; scroll-padding-top: 112px; }
.game-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 0;
  padding: 12px 30px 10px;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'brand steps menu' 'status status status';
  gap: 8px 24px;
  align-items: center;
}
.game-header .brand { grid-area: brand; color: var(--accent); font-size: 22px; font-weight: 800; letter-spacing: -.045em; line-height: 1.3; white-space: nowrap; }
.game-header .stepper { grid-area: steps; }
.header-actions { grid-area: menu; display: flex; align-items: center; gap: 10px; }
.brand-calendar { flex-shrink: 0; filter: drop-shadow(0 2px 3px #0002); }
.sound-toggle { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); transition: color 180ms, background-color 180ms; }
.sound-toggle.is-audible { color: var(--accent); }
.sound-toggle:hover { background: var(--surface-raised); }
.sound-toggle .icon { width: 23px; height: 23px; stroke-width: 1.8; }
.sound-controls { position: relative; }
.sound-controls .sound-toggle { position: relative; z-index: 2; }
.sound-dismiss { position: fixed; inset: 0; z-index: 1; border: 0; padding: 0; background: transparent; cursor: default; }
.sound-popover { position: absolute; z-index: 2; top: calc(100% + 10px); right: 0; width: min(252px,calc(100vw - 40px)); display: grid; gap: 17px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); box-shadow: 0 12px 35px #0003; animation: sound-panel-in 160ms ease-out both; }
.sound-level { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 15px; margin: 0; color: var(--ink); font-size: 12px; font-weight: 700; }
.sound-controls .sound-range { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 24px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; touch-action: pan-y; }
.sound-range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(to right,var(--accent) var(--volume),var(--line) var(--volume)); }
.sound-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.sound-range::-moz-range-track { height: 4px; border-radius: 99px; background: var(--line); }
.sound-range::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--accent); }
.sound-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
@keyframes sound-panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.header-contacts { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--ink); font-size: 12px; font-weight: 800; white-space: nowrap; }
.header-contacts .icon { width: 16px; height: 16px; }
.header-contacts:hover { border-color: var(--accent); color: var(--accent); }
.game-header .menu-trigger { width: 40px; height: 40px; border-radius: 10px; }
.progress-status {
  grid-area: status;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 26px;
  margin: 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.progress-status > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.progress-status dt { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.progress-status dt .icon { width: 13px; height: 13px; align-self: center; }
.progress-status dd { margin: 0; color: var(--ink); font-size: 15px; font-weight: 900; line-height: 1.3; white-space: nowrap; }
.progress-status dd small { color: var(--muted); font-size: 10px; font-weight: 500; }
.progress-status .progress-money dd { color: var(--accent); }
.stage-note { margin: -10px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.stage-note strong { color: var(--accent); font-weight: 800; }
@media (max-width: 1100px) {
  .game-header { padding-right: 25px; padding-left: 25px; column-gap: 18px; }
}
@media (max-width: 820px) {
  html { scroll-padding-top: 144px; }
  .game-header {
    padding: 10px 24px;
    grid-template-columns: 1fr auto;
    grid-template-areas: 'brand menu' 'steps steps' 'status status';
    row-gap: 9px;
  }
  .game-header .menu-trigger { width: 36px; height: 36px; }
  .header-actions { gap: 8px; }
  .sound-toggle { width: 36px; height: 36px; }
  .brand-calendar { width: 30px; height: 30px; }
  .header-contacts { min-height: 36px; padding: 8px 10px; font-size: 11px; }
  .progress-status { justify-content: space-between; gap: 16px; }
}
@media (max-width: 540px) {
  .game-header { padding: 10px 20px 9px; row-gap: 8px; column-gap: 10px; }
  .game-header .brand { font-size: 19px; }
  .header-contacts { gap: 5px; padding: 8px; }
  .header-contacts .icon { width: 14px; height: 14px; }
  .progress-status { gap: 10px; padding-top: 8px; }
  .progress-status > div { gap: 5px; }
  .progress-status dt { font-size: 10px; }
  .progress-status dt .icon { display: none; }
  .progress-status dd { font-size: 12px; }
  .progress-status dd small { font-size: 9px; }
  .stage-note { font-size: 11px; margin: -8px 0 18px; }
}
@media (max-width: 360px) {
  .game-header .brand { font-size: 17px; }
  .progress-status { gap: 7px; }
  .progress-status > div { gap: 4px; }
  .progress-status dt { font-size: 9px; }
  .progress-status dd { font-size: 11px; }
  .progress-status dd small { font-size: 8px; }
}
