/* park-specific HUD on top of style.css */
.hud-time { top: 14px; left: 50%; transform: translateX(-50%); text-align: center; min-width: 110px; background: var(--yellow); }
.hud-time.low { background: #ff7d7d; animation: bank .5s ease-out infinite alternate; }
.hud-pscore { top: 14px; left: 70px; min-width: 110px; }
.hud-skate { top: 14px; right: 14px; text-align: center; }
.letters { display: flex; gap: 3px; margin-bottom: 3px; }
.letters span {
  width: 24px; height: 24px; line-height: 21px; border-radius: 50%;
  font-family: 'Bangers', system-ui; font-size: 17px; text-align: center;
  border: 2px solid var(--ink); color: rgba(29,26,51,.25); background: #fff;
}
.letters span.got { background: var(--pink); color: var(--yellow); -webkit-text-stroke: 1px var(--ink); animation: bank .5s ease-out; }
.hud-coins { font-size: 12px; }

.balance {
  position: absolute; left: 50%; bottom: calc(9vh + 100px); transform: translateX(-50%);
  width: 220px; height: 16px; background: var(--paper);
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.bal-zone { position: absolute; left: 30%; right: 30%; top: 0; bottom: 0; background: #b8f5cf; }
.bal-needle { position: absolute; top: -6px; bottom: -6px; width: 6px; margin-left: -3px; left: 50%; background: var(--ink); }

.go-btn.alt { background: var(--paper); font-size: 26px; }
.panel a.link-btn { text-align: center; }

/* touch controls */
.touch-ui { display: none; }
@media (hover: none) and (pointer: coarse) {
  .touch-ui { display: block; }
  .credit { display: none; }
}
.stick {
  position: absolute; left: 22px; bottom: 26px; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,250,240,.55); border: 3px solid var(--ink); pointer-events: auto; touch-action: none;
}
.knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.btns { position: absolute; right: 18px; bottom: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; pointer-events: auto; }
.tbtn {
  width: 76px; height: 76px; border-radius: 50%; font-family: 'Bangers', system-ui; font-size: 19px; letter-spacing: .05em;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); touch-action: none;
}
.tbtn.down { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.tbtn.ollie { grid-column: 1 / span 2; justify-self: center; width: 92px; height: 92px; background: var(--yellow); font-size: 24px; }
.tbtn.flip { background: #8fd3ff; }
.tbtn.grab { background: var(--pink); }

@media (max-width: 600px) {
  .hud-pscore { left: 58px; top: 10px; min-width: 80px; }
  .hud-time { top: 58px; }
  .hud-skate { top: 10px; right: 10px; }
  .letters span { width: 19px; height: 19px; line-height: 16px; font-size: 13px; }
}

.minimap {
  position: absolute; left: 14px; top: 84px; width: 150px; height: 150px;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: var(--paper);
  image-rendering: pixelated;
}
.park-btn { font-size: 19px; }
@media (max-width: 600px) {
  .minimap { width: 96px; height: 96px; left: 10px; top: 66px; }
}

/* ---------- park builder ---------- */
.build-btn { background: #8fd3ff; font-size: 26px; }
#editor { position: fixed; inset: 0; pointer-events: none; }
#editor > * { pointer-events: auto; }
.ed-top {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}
.ed-title {
  font-family: 'Bangers', system-ui; font-size: 28px; letter-spacing: .05em;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 2px 12px;
}
.ed-count { font: 700 12px 'Space Mono', monospace; letter-spacing: 0; margin-left: 6px; }
.ed-actions, .ed-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ed-btn {
  font-family: 'Bangers', system-ui; font-size: 19px; letter-spacing: .05em; padding: 5px 12px; cursor: pointer;
  color: var(--ink); background: var(--paper); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.ed-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.ed-btn.on { background: #ff7d7d; }
.ed-play { background: var(--yellow); font-size: 22px; }
.ed-tools { position: absolute; right: 10px; top: 50%; transform: translateY(-70%); flex-direction: column; }
.ed-hint {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 186px;
  font-size: 11px; background: rgba(255,250,240,.88); border: 2px solid var(--ink); padding: 3px 8px;
  max-width: calc(100vw - 32px); text-align: center; line-height: 1.8;
}
.ed-hint kbd { font-size: 10px; line-height: 14px; }
.ed-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 10px 10px; }
.ed-tabs { display: flex; gap: 4px; overflow-x: auto; }
.ed-tab {
  font-family: 'Bangers', system-ui; font-size: 17px; letter-spacing: .05em; padding: 3px 12px; cursor: pointer;
  background: #ddd8ec; color: var(--ink); border: 3px solid var(--ink); border-bottom: none;
}
.ed-tab.active { background: var(--paper); }
.ed-palette {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px; background: var(--paper);
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.ed-piece {
  flex: 0 0 auto; width: 88px; cursor: pointer; padding: 4px; color: var(--ink);
  background: #fff; border: 3px solid var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ed-piece[hidden] { display: none; }
.ed-piece.active { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: translateY(-3px); }
.ed-thumb { width: 64px; height: 64px; background: center / contain no-repeat; }
.ed-label { font: 700 10px 'Space Mono', monospace; text-align: center; line-height: 1.1; }
.share-link { width: 100%; font: 12px 'Space Mono', monospace; padding: 6px; border: 3px solid var(--ink); }
.share-size { font-size: 11px; text-align: center; opacity: .7; }
@media (max-width: 700px) {
  .ed-title { font-size: 20px; }
  .ed-btn { font-size: 15px; padding: 4px 8px; }
  .ed-hint { display: none; }
  .ed-piece { width: 70px; }
  .ed-thumb { width: 48px; height: 48px; }
  .ed-tools { top: auto; bottom: 168px; transform: none; flex-direction: row; }
}
