#rotateGate {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: #10232d;
  text-align: center;
}
#rotateGate[open] { display: grid; place-items: center; }
#rotateGate::backdrop { background: #10232d; }
.rotate-content { max-width: 320px; }
.rotate-device {
  width: 92px;
  height: 51px;
  border: 2px solid #d8e7eb;
  border-left-width: 6px;
  border-radius: 10px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
}
.rotate-device img { width: 31px; }
.rotate-content h2 { margin: 0; font: italic 800 36px/1 var(--display); }
.rotate-content p { color: #c6d5dc; font-size: 16px; line-height: 1.45; }
#rotateNow { width: auto; margin: 12px auto 0; }

@media (orientation: landscape) and (pointer: coarse), (orientation: landscape) and (max-width: 690px) {
  .play-screen {
    --thumb-inset: max(16px,env(safe-area-inset-left));
    --action-inset: max(16px,env(safe-area-inset-right));
    --control-floor: max(12px,env(safe-area-inset-bottom));
  }
  .touch-pad {
    display: flex;
    align-items: end;
    bottom: var(--control-floor);
    left: var(--thumb-inset);
    right: var(--action-inset);
    height: 116px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .play-screen.on-lift .touch-pad { display: none; }
  .touch-pad > * { pointer-events: auto; }
  .touch-pad .steering-stick {
    position: relative;
    --diameter: clamp(84px, 27vmin, 120px);
    display: block;
    flex: 0 0 var(--diameter);
    width: var(--diameter);
    height: var(--diameter);
    border-radius: 50%;
    border: 1px solid #d6e5eb91;
    color: #eef3f5;
    background: radial-gradient(circle at center, #23374180 42%, #172b35ac 72%, #10232dcc 100%);
    box-shadow: inset 0 0 0 4px #e1eaee16;
    touch-action: none;
  }
  .steering-stick [data-axis] {
    position: absolute;
    font: 700 14px/1 DM, sans-serif;
    pointer-events: none;
    transform: translate(-50%, -50%);
    text-shadow: 0 1px 2px #0e1b21;
  }
  .steering-stick [data-axis="up"] { top: 12%; left: 50%; }
  .steering-stick [data-axis="down"] { top: 88%; left: 50%; }
  .steering-stick [data-axis="left"] { top: 50%; left: 12%; }
  .steering-stick [data-axis="right"] { top: 50%; left: 88%; }
  .stick-thumb {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 41%;
    aspect-ratio: 1;
    transform: translate(calc(-50% + var(--stick-x,0px)), calc(-50% + var(--stick-y,0px)));
    display: grid;
    place-items: center;
    border: 1px solid #e5eef0ad;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #47616efa, #293d49f5 72%);
    box-shadow: 0 2px 4px #06101860;
    pointer-events: none;
  }
  .stick-thumb::after {
    content: "";
    width: 28%;
    height: 4px;
    border-block: 1px solid #d2dfe48c;
  }
  .steering-stick.held .stick-thumb { border-color: #fff9e8; }
  .touch-pad .action-cluster {
    display: grid;
    align-items: center;
    gap: 4px 5px;
    grid-template-columns: 49px 57px 63px;
    grid-template-areas: "tuck jump trick" "brake push push";
  }
  .action-cluster button {
    min-width: 0;
    min-height: 44px;
    padding: 0 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    border-radius: 24px;
    background: #142c38c9;
    border-color: #f0f6f899;
    font: 700 10px/1 DM, sans-serif;
    letter-spacing: .02em;
  }
  .action-cluster [data-action="jump"] { grid-area: jump; }
  .action-cluster [data-action="tuck"] { grid-area: tuck; }
  .action-cluster [data-action="trick"] { grid-area: trick; }
  .action-cluster [data-action="brake"] { grid-area: brake; }
  .action-cluster [data-action="push"] {
    grid-area: push;
    flex-direction: row;
    gap: 6px;
    background: #ad451eee;
    border-color: #ffe5c9;
    font-size: 14px;
  }
  .action-cluster i svg { width: 18px; height: 18px; }
  .action-cluster [data-action="push"] i svg { width: 24px; height: 24px; }
  .action-cluster button:active { background: #ecf2f2; color: #142631; }
  .play-screen .race-stats {
    left: 46%;
    bottom: var(--control-floor);
    transform: translateX(-50%);
    gap: 9px;
    padding: 5px 9px;
    pointer-events: none;
  }
  .race-stats strong { font-size: 21px; }
  .race-stats small { font-size: 9px; }
  .race-stats .speed-stat strong { font-size: 32px; line-height: 1; }
  .play-screen .mini-map { width: 82px; }
  .play-screen .race-event { top: 28%; max-width: 50%; font-size: clamp(22px,4vw,38px); }
}
@media (orientation: landscape) and (max-width: 735px) {
  .play-screen .race-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 9px; }
  .play-screen.on-lift .race-stats { display: none; }
}
@media (orientation: landscape) and (max-height: 460px) {
  .mast { position: static; }
  .mast-inner { min-height: 48px; }
  .page-title { margin: 12px 0; padding: 0; }
  .page-title h1 { font-size: 36px; }
  .station-cover { grid-template-columns: 1.35fr 1fr; }
  .station-cover .poster { min-height: 215px; }
  .station-cover .pass { padding: 10px 16px; }
  .pass h2 { font-size: 26px; }
  .pass-facts { margin: 4px 0 7px; }
  .pass-facts > div { padding: 3px 0; }
  .station-cover .pass p { margin: 4px 0; }
  .poster-info { bottom: 14px; }
  .poster-name { font-size: clamp(45px,8vw,68px); }
}
