/* PRESSPOINT unified glass LED HUD — presentation only */
.pp-glass-hud{position:absolute;left:50%;top:calc(68px + env(safe-area-inset-top,0px));transform:translateX(-50%);width:min(89%,940px);height:clamp(80px,14vw,166px);display:grid;grid-template-columns:30% 40% 30%;align-items:center;z-index:12;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease;background:linear-gradient(165deg,rgba(233,250,255,.24),rgba(44,73,123,.47) 32%,rgba(103,131,175,.38) 73%,rgba(221,239,255,.21));backdrop-filter:blur(13px) saturate(1.12);-webkit-backdrop-filter:blur(13px) saturate(1.12);border:1px solid rgba(241,251,255,.74);border-radius:999px;box-shadow:inset 0 2px 3px rgba(255,255,255,.55),inset 0 -2px 7px rgba(201,228,255,.19),0 8px 30px rgba(9,25,55,.16),0 0 6px rgba(240,253,255,.45);overflow:hidden}
.pp-glass-hud::before{content:"";position:absolute;left:8%;right:8%;top:0;height:2px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.92),transparent);opacity:.8}
.pp-glass-hud.is-active{opacity:1;visibility:visible}
.pp-glass-hud .pp-cell{height:78%;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;gap:clamp(3px,.6vw,10px)}
.pp-glass-hud .pp-cell+.pp-cell{border-left:1px solid rgba(235,250,255,.44)}
.pp-glass-hud .pp-heading{font:italic 600 clamp(10px,1.5vw,21px)/1 Arial,sans-serif;letter-spacing:.28em;color:#f4faff;text-shadow:0 0 5px rgba(236,250,255,.3)}
.pp-glass-hud .pp-led{width:88%;height:clamp(38px,7vw,93px);display:block;filter:drop-shadow(0 0 4px rgba(129,238,255,.53))}
.pp-glass-hud .pp-gate .pp-led{width:81%;height:clamp(33px,5vw,66px)}
.pp-glass-hud .pp-speed-dial{position:relative;width:min(86%,220px);height:clamp(58px,8vw,110px)}
.pp-glass-hud .pp-speed-dial svg{width:100%;height:100%;display:block;overflow:hidden}
.pp-glass-hud .pp-speed-dial .pp-speed-led{position:absolute;left:24%;top:32%;width:52%;height:46%;z-index:2}
.pp-glass-hud .pp-speed-heading{position:absolute;top:1%;z-index:3}
.pp-glass-hud .pp-unit{position:absolute;bottom:0;font-size:clamp(7px,.9vw,12px);color:#ebfbff;letter-spacing:.22em;z-index:3}
.game-shell.pp-glass-running .race-timing,.game-shell.pp-glass-running .race-speed{display:none!important}
@media(max-width:700px){.pp-glass-hud{width:96%;height:clamp(70px,17vw,106px);top:calc(68px + env(safe-area-inset-top,0px));backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}.pp-glass-hud .pp-heading{font-size:clamp(8px,1.8vw,12px);letter-spacing:.17em}.pp-glass-hud .pp-led{height:clamp(29px,8vw,49px)}.pp-glass-hud .pp-gate .pp-led{height:clamp(26px,6vw,38px)}.pp-glass-hud .pp-speed-dial{height:clamp(45px,10vw,70px);width:90%}.pp-glass-hud .pp-unit{font-size:7px}}

/* Mobile HUD sizing is intentionally based on the game shell width, not the browser viewport.
   This keeps iPhone and Android visually consistent while preserving the Oct 10 HUD proportions. */
@media(max-width:700px){
  .pp-glass-hud{
    width:96%;
    height:auto;
    aspect-ratio:5.5 / 1;
    min-height:70px;
    max-height:106px;
  }
}

/* Touch controls: WCSM glass treatment, skis pulled toward the center seam,
   LEFT / RIGHT moved into the open outer space, and skis kept nearly parallel. */
.touch-zone{
  overflow:hidden;
  border:1px solid rgba(241,251,255,.58);
  background:
    linear-gradient(165deg,
      rgba(233,250,255,.20),
      rgba(69,101,123,.48) 34%,
      rgba(119,151,174,.40) 72%,
      rgba(221,239,255,.18));
  background-clip:border-box;
  backdrop-filter:blur(11px) saturate(1.12);
  -webkit-backdrop-filter:blur(11px) saturate(1.12);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.42),
    inset 0 -2px 7px rgba(201,228,255,.14),
    0 8px 24px rgba(9,25,55,.14);
}
.touch-zone > span{display:none!important}
.touch-zone::after{
  border-color:rgba(241,251,255,.22);
  color:rgba(241,251,255,.72);
}
.touch-zone.is-active{
  background:
    linear-gradient(165deg,
      rgba(245,253,255,.34),
      rgba(69,101,123,.58) 34%,
      rgba(119,151,174,.50) 72%,
      rgba(221,239,255,.25));
  background-clip:border-box;
}
.touch-ski-art{
  top:6px;
  bottom:auto;
  width:82px;
  height:min(136px, calc(100% - 44px));
  clip-path:inset(0 0 50% 0);
  -webkit-clip-path:inset(0 0 50% 0);
  transform-origin:50% 0;
}
.touch-left .touch-ski-art{
  left:76%;
  transform:translateX(-50%) rotate(2deg) scale(2.5);
}
.touch-right .touch-ski-art{
  left:24%;
  transform:translateX(-50%) rotate(-2deg) scale(2.5);
}
.touch-direction{
  position:absolute;
  top:52%;
  bottom:auto;
  margin:0;
  transform:translateY(-50%);
  font-size:clamp(22px,6vw,34px);
  line-height:1;
  letter-spacing:.08em;
  text-shadow:0 2px 7px rgba(9,25,55,.58);
}
.touch-left .touch-direction{left:8%;right:auto}
.touch-right .touch-direction{right:7%;left:auto}

/* Race records: keep the current spacing, but lift the whole records stack slightly. */
.result-menu-screen.leaderboard-panel .leaderboard-panel-head{
  top:max(0px,env(safe-area-inset-top));
}
.result-menu-screen.leaderboard-panel .result-tabs{
  top:max(76px,calc(env(safe-area-inset-top) + 60px));
}
.result-menu-screen.leaderboard-panel .result-view{
  top:max(138px,calc(env(safe-area-inset-top) + 122px));
}

/* Compact touch-control presentation: keep the original 27% hit targets,
   but make the visible glass panel/content ~15% shorter and more transparent. */
.touch-zone{
  border-color:transparent;
  background:transparent;
  background-clip:border-box;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  box-shadow:none;
}
.touch-zone::before{
  content:"";
  display:block;
  position:absolute;
  z-index:0;
  left:0;
  right:0;
  top:15%;
  bottom:0;
  pointer-events:none;
  border:1px solid rgba(241,251,255,.38);
  background:linear-gradient(165deg,
    rgba(233,250,255,.10),
    rgba(69,101,123,.30) 34%,
    rgba(119,151,174,.24) 72%,
    rgba(221,239,255,.08));
  backdrop-filter:blur(7px) saturate(1.05);
  -webkit-backdrop-filter:blur(7px) saturate(1.05);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.26),
    inset 0 -1px 5px rgba(201,228,255,.08),
    0 6px 18px rgba(9,25,55,.08);
}
.touch-zone.is-active{background:transparent}
.touch-zone.is-active::before{
  background:linear-gradient(165deg,
    rgba(245,253,255,.17),
    rgba(69,101,123,.39) 34%,
    rgba(119,151,174,.31) 72%,
    rgba(221,239,255,.12));
}
.touch-zone::after{
  top:calc(15% + 8px);
  bottom:8px;
  left:8px;
  right:8px;
  border-color:rgba(241,251,255,.16);
  color:rgba(241,251,255,.58);
}
.touch-ski-art{
  top:calc(15% + 4px);
}
.touch-left .touch-ski-art{
  transform:translateX(-50%) rotate(2deg) scale(2.125);
}
.touch-right .touch-ski-art{
  transform:translateX(-50%) rotate(-2deg) scale(2.125);
}
.touch-direction{
  top:58%;
  font-size:clamp(19px,5.1vw,29px);
}
