:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #f8f7ff;
  background: #171426;
  font-synthesis: none;
  --lime: #b2ff5d;
  --muted: #a9a5bb;
  --panel: rgba(24, 21, 40, 0.91);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
#game {
  position: fixed;
  inset: 0;
}
#game canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #171426 0%,
    #171426f5 24%,
    #17142655 45%,
    transparent 68%
  );
}
body.playing .grain {
  background: radial-gradient(ellipse at center, transparent 55%, #17142635);
}
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 106px;
  padding: 30px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.6px;
  line-height: 1.2;
  pointer-events: auto;
}
.brand b {
  font-size: 20px;
  letter-spacing: 3.8px;
}
.brand-hole {
  width: 45px;
  height: 32px;
  border: 6px solid var(--lime);
  border-radius: 50%;
  transform: rotate(-24deg);
  box-shadow: 0 0 0 3px #b2ff5d20;
}
.server-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 1.6px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffffff20;
  padding: 10px 14px;
  border-radius: 30px;
  background: #171426b0;
}
.server-pill i,
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 10px #b2ff5d66;
}
.actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.actions button {
  border: 1px solid #ffffff25;
  background: #242038dc;
  height: 39px;
  min-width: 39px;
  border-radius: 12px;
  font-size: 20px;
}
.actions #invite {
  padding: 0 14px;
}
.actions button span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}
#menu {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.intro {
  position: absolute;
  left: 7%;
  top: 17%;
  width: 460px;
  pointer-events: auto;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.1px;
  font-weight: 800;
  color: var(--lime);
}
.tiny-orbit {
  font-size: 18px;
  margin-right: 8px;
  vertical-align: middle;
}
h1 {
  font-size: clamp(52px, 5.2vw, 75px);
  line-height: 0.97;
  letter-spacing: -4px;
  margin: 23px 0 24px;
  font-weight: 900;
  position: relative;
}
h1 span {
  color: #f8f7ff;
}
h1 em {
  font-style: normal;
  color: var(--lime);
}
h1 svg {
  position: absolute;
  left: 0;
  bottom: -17px;
  width: 270px;
  height: 20px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 3;
  stroke-linecap: round;
}
.tagline {
  font-size: 15px;
  color: #c3bfce;
  line-height: 1.65;
  margin-top: 33px;
}
.match-chips {
  display: flex;
  gap: 20px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  margin: 25px 0;
}
.match-chips i {
  margin-right: 6px;
}
#join-form {
  max-width: 330px;
}
#join-form label {
  display: block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 1.7px;
  margin: 0 0 10px;
}
.name-field {
  display: flex;
  align-items: center;
  border: 1px solid #ffffff26;
  background: #292438;
  border-radius: 12px;
  padding: 0 16px;
  gap: 12px;
}
.name-field span {
  color: var(--lime);
  font-size: 22px;
}
.name-field input {
  background: none;
  border: 0;
  color: white;
  min-width: 0;
  width: 100%;
  height: 48px;
  font-size: 14px;
  outline: none;
}
.primary {
  border: 0;
  background: var(--lime);
  color: #1b2620;
  width: 100%;
  height: 57px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 21px;
  font-weight: 900;
  letter-spacing: 1px;
  font-size: 15px;
  box-shadow: 0 5px 0 #72a93a;
  margin-top: 12px;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}
.primary span {
  font-size: 27px;
}
.connection-note {
  font-size: 10px;
  color: var(--muted);
  margin: 17px 0 23px;
}
.control-hint {
  display: flex;
  gap: 15px;
  font-size: 8px;
  letter-spacing: 0.9px;
  color: #a8a3b9;
  align-items: center;
}
kbd {
  display: inline-block;
  border: 1px solid #ffffff30;
  border-bottom-width: 2px;
  background: #29243890;
  border-radius: 4px;
  padding: 4px 5px;
  font-size: 8px;
  color: #e8e4f4;
  margin-right: 4px;
}
.touch-hint {
  display: none;
}
.scene-note {
  position: absolute;
  right: 9%;
  top: 22%;
  display: flex;
  gap: 17px;
  transform: rotate(6deg);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  text-shadow: 0 2px 8px #171426;
}
.scene-note > span {
  font-size: 64px;
  font-weight: 400;
  color: var(--lime);
  transform: rotate(10deg);
}
.scene-note small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  color: #eee8ff;
  margin-top: 12px;
}
.map-tag {
  position: absolute;
  right: 9%;
  bottom: 22%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 22px;
  background: #201a33db;
  border: 1px solid #ffffff20;
  border-radius: 14px;
  box-shadow: 0 12px 40px #120c3530;
}
.map-tag > i {
  width: 9px;
  height: 9px;
  background: var(--lime);
  border-radius: 50%;
}
.map-tag span {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.map-tag b {
  display: block;
  color: white;
  font-size: 14px;
  letter-spacing: 2px;
  margin-top: 6px;
}
.map-tag .map-badge {
  margin-left: 34px;
  border: 1px solid #ffffff25;
  border-radius: 5px;
  padding: 7px;
  color: var(--lime);
  font-size: 7px;
}
.how-to {
  position: absolute;
  bottom: 35px;
  left: 7%;
  right: 7%;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ffffff20;
  padding-top: 23px;
  gap: 25px;
}
.how-to > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.how-to b {
  color: var(--lime);
  font-size: 23px;
  font-weight: 900;
}
.how-to span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.how-to small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 7px;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body.playing .server-pill {
  display: none;
}
.clock-panel {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  text-align: center;
  padding: 15px 25px;
  background: var(--panel);
  border: 1px solid #ffffff25;
  border-radius: 18px;
  box-shadow: 0 8px 30px #17142620;
}
.clock-panel > span {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 800;
}
.clock-panel > b {
  display: block;
  font-size: 41px;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
.time-track,
.mass-track,
.dash-track {
  height: 4px;
  background: #ffffff16;
  border-radius: 4px;
  overflow: hidden;
}
.time-track i,
.mass-track i,
.dash-track i {
  display: block;
  background: var(--lime);
  height: 100%;
  transition: width 0.15s linear;
}
.clock-panel small {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  margin-top: 10px;
  color: var(--muted);
}
.clock-panel.frenzy {
  border-color: #ffbd59;
}
.clock-panel.frenzy > b {
  color: #ffbd59;
}
.leaderboard {
  position: absolute;
  top: 125px;
  left: 30px;
  width: 223px;
  background: var(--panel);
  border: 1px solid #ffffff20;
  border-radius: 16px;
  padding: 17px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}
.panel-title b {
  color: var(--lime);
  font-size: 20px;
}
#board {
  list-style: none;
  margin: 10px -7px;
  padding: 0;
}
#board li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 7px;
  border-radius: 7px;
  font-size: 11px;
}
#board li.self {
  background: #b2ff5d15;
  color: var(--lime);
}
#board li > span {
  color: var(--muted);
  width: 12px;
  font-size: 9px;
}
#board li i {
  height: 7px;
  width: 7px;
  flex-shrink: 0;
  border-radius: 50%;
}
#board li strong {
  flex: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#board li b {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.board-foot {
  border-top: 1px solid #ffffff15;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--muted);
}
.minimap-panel {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background: var(--panel);
  border: 1px solid #ffffff25;
  padding: 9px;
  border-radius: 18px;
  width: 174px;
}
.minimap-panel canvas {
  width: 154px;
  height: 154px;
}
.minimap-panel > span {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 5px 8px;
  color: var(--muted);
}
.minimap-panel b {
  color: var(--lime);
}
.player-dock {
  position: absolute;
  bottom: 49px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.mass-panel {
  width: 215px;
  background: var(--panel);
  border: 1px solid #ffffff25;
  border-radius: 16px;
  padding: 16px 19px;
}
.mass-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--muted);
}
#rank {
  color: var(--lime);
  letter-spacing: 0;
}
#mass {
  display: block;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -1px;
}
#next-unlock {
  font-size: 7px;
  letter-spacing: 0.8px;
  color: #ccc7db;
  display: block;
  margin: 4px 0 9px;
}
.dash-button {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 151px;
  padding: 16px;
  border: 1px solid #b2ff5d70;
  border-radius: 16px;
  background: #253326ed;
  color: var(--lime);
  touch-action: none;
}
.dash-icon {
  font-size: 49px;
  line-height: 1;
}
.dash-button b {
  font-size: 15px;
  font-weight: 900;
}
.dash-button small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.7px;
  margin-top: 7px;
}
.dash-track {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: #b2ff5d20;
}
.bottom-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 8px;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px #000;
}
.bottom-controls span {
  margin: 0 9px;
}
#notice {
  position: absolute;
  top: 165px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: 9px;
  padding: 10px 16px;
  background: #211b32e8;
  color: var(--lime);
  transition: opacity 0.2s;
  opacity: 0;
  white-space: nowrap;
}
#notice.visible {
  opacity: 1;
}
#notice.warning {
  color: #ffba59;
}
#feed {
  position: absolute;
  right: 30px;
  top: 125px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-size: 10px;
}
#feed div {
  background: #211b32d9;
  padding: 9px 12px;
  border-radius: 7px;
  border-right: 2px solid var(--lime);
}
#labels,
#floaters {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hole-label {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 10px;
  white-space: nowrap;
  text-align: center;
  font-weight: 800;
  will-change: transform;
  text-shadow:
    0 2px 4px #171426,
    0 0 4px #171426;
}
.hole-label small {
  display: block;
  font-size: 8px;
  color: #fff;
  font-weight: 600;
  margin-top: 3px;
}
.hole-label.self {
  color: var(--lime);
}
.hole-label .status {
  font-size: 7px;
  letter-spacing: 1px;
}
.floater {
  position: absolute;
  font-size: 19px;
  font-weight: 900;
  color: var(--lime);
  text-shadow: 0 2px 5px #171426;
  white-space: nowrap;
}
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  background: #120e22ac;
  backdrop-filter: blur(8px);
  padding: 20px;
}
.respawn-card {
  text-align: center;
}
.orbit-symbol {
  font-size: 90px;
  line-height: 1;
  color: var(--lime);
}
h2 {
  font-size: 44px;
  letter-spacing: -2px;
  line-height: 1.05;
  margin: 20px 0;
}
.respawn-card p {
  color: #c3bfce;
  font-size: 14px;
}
.respawn-card > b {
  display: block;
  font-size: 58px;
  color: var(--lime);
  margin: 20px;
}
.respawn-card > small {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.result-card {
  width: 430px;
  max-height: none;
  overflow: visible;
  background: #211c32;
  border: 1px solid #ffffff25;
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 80px #0005;
}
.result-card > p {
  font-size: 13px;
  color: #c3bfce;
  line-height: 1.6;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #ffffff10;
  font-size: 12px;
}
.result-row strong {
  flex: 1;
}
.result-row b {
  color: var(--lime);
}
.result-row.self {
  background: #b2ff5d12;
  border-radius: 7px;
}
.result-row small {
  font-size: 9px;
  color: var(--muted);
}
#result-list {
  margin: 22px 0;
}
#toast {
  position: fixed;
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border: 1px solid #ffffff25;
  border-radius: 10px;
  background: #211b32;
  color: white;
  font-size: 12px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
#stick {
  display: none;
  position: absolute;
  bottom: 32px;
  left: 28px;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #211b3244;
  border: 2px solid #ffffff40;
  pointer-events: auto;
  touch-action: none;
}
#stick > i {
  position: absolute;
  top: 33px;
  left: 33px;
  width: 46px;
  height: 46px;
  background: #ffffff44;
  border: 1px solid #ffffff70;
  border-radius: 50%;
}
#stick > span {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 7px;
  letter-spacing: 2px;
  color: #fff9;
}
@media (pointer: coarse) {
  #stick {
    display: block;
  }
  .bottom-controls {
    display: none;
  }
  .player-dock {
    bottom: 28px;
    left: auto;
    right: 25px;
    transform: none;
  }
  .dash-button {
    width: 110px;
    height: 116px;
    flex-direction: column;
    gap: 0;
    padding: 5px 10px;
  }
  .dash-icon {
    font-size: 36px;
  }
  .dash-button small {
    margin-top: 2px;
  }
  .mass-panel {
    width: 145px;
  }
  .minimap-panel {
    bottom: 168px;
    right: 25px;
    width: 119px;
  }
  .minimap-panel canvas {
    width: 99px;
    height: 99px;
  }
  .minimap-panel > span {
    font-size: 6px;
    padding: 1px;
  }
  .control-hint > span:not(.touch-hint) {
    display: none;
  }
  .control-hint .touch-hint {
    display: block;
  }
}
@media (max-height: 780px) and (min-width: 761px) {
  .intro {
    top: 16%;
  }
  h1 {
    font-size: 61px;
    margin: 16px 0;
  }
  .tagline {
    font-size: 13px;
    margin-top: 28px;
  }
  .match-chips {
    margin: 18px 0;
  }
  .connection-note {
    margin: 15px 0;
  }
  .how-to {
    bottom: 22px;
    padding-top: 16px;
  }
  .control-hint {
    display: none;
  }
  .scene-note {
    top: 22%;
  }
}
@media (max-width: 760px) {
  header {
    height: 78px;
    padding: 20px;
  }
  .brand {
    font-size: 9px;
    gap: 9px;
  }
  .brand b {
    font-size: 15px;
    letter-spacing: 2.8px;
  }
  .brand-hole {
    width: 33px;
    height: 25px;
    border-width: 4px;
  }
  .server-pill {
    display: none;
  }
  .actions {
    gap: 5px;
  }
  .actions button {
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
  }
  .actions button span {
    display: none;
  }
  .actions #invite {
    padding: 0 9px;
  }
  .intro {
    left: 7%;
    top: 17%;
    width: 86%;
  }
  h1 {
    font-size: 54px;
    letter-spacing: -3px;
    margin: 19px 0;
  }
  h1 svg {
    width: 225px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .tagline {
    font-size: 13px;
  }
  .match-chips {
    font-size: 8px;
    margin: 22px 0;
  }
  #join-form {
    max-width: 340px;
  }
  .grain {
    background:
      linear-gradient(90deg, #171426ef, #171426b0 50%, #17142633),
      linear-gradient(0deg, #171426, transparent 70%);
  }
  .scene-note,
  .map-tag,
  .how-to {
    display: none;
  }
  .connection-note {
    max-width: 320px;
  }
  .clock-panel {
    top: 82px;
    width: 160px;
    padding: 10px 16px;
    border-radius: 13px;
  }
  .clock-panel > b {
    font-size: 31px;
    margin: 3px 0;
  }
  .clock-panel > span {
    font-size: 6px;
  }
  .clock-panel small {
    font-size: 6px;
    margin-top: 6px;
  }
  .leaderboard {
    top: 86px;
    left: 12px;
    width: 122px;
    padding: 10px;
  }
  .panel-title {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .panel-title b {
    display: none;
  }
  #board {
    margin: 8px -4px;
  }
  #board li {
    font-size: 8px;
    padding: 7px 4px;
    gap: 4px;
  }
  #board li span {
    width: 8px;
    font-size: 7px;
  }
  #board li i {
    width: 5px;
    height: 5px;
  }
  #board li b {
    font-size: 8px;
  }
  .board-foot {
    font-size: 6px;
    padding-top: 8px;
    letter-spacing: 0;
  }
  #notice {
    top: 192px;
    font-size: 9px;
    max-width: 90%;
    white-space: normal;
    text-align: center;
  }
  #feed {
    top: 230px;
    right: 12px;
    max-width: 165px;
    font-size: 8px;
  }
  .player-dock {
    right: 16px;
    gap: 7px;
    bottom: 27px;
  }
  .mass-panel {
    padding: 12px;
    width: 125px;
  }
  .mass-panel > div:first-child {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  #mass {
    font-size: 31px;
  }
  #next-unlock {
    font-size: 6px;
    letter-spacing: 0.3px;
  }
  .dash-button {
    width: 83px;
  }
  .dash-button b {
    font-size: 13px;
  }
  .dash-button small {
    font-size: 6px;
  }
  #stick {
    left: 18px;
    width: 103px;
    height: 103px;
  }
  #stick > i {
    left: 27px;
    top: 27px;
  }
  .minimap-panel {
    right: 16px;
    bottom: 163px;
  }
  .hole-label {
    font-size: 9px;
  }
  .hole-label small {
    font-size: 7px;
  }
  .result-card {
    padding: 25px;
  }
  h2 {
    font-size: 37px;
  }
  body.playing .brand {
    opacity: 0.8;
  }
}
@media (max-width: 390px) {
  h1 {
    font-size: 51px;
  }
  .intro {
    top: 16%;
  }
  .tagline {
    margin-top: 28px;
  }
  .match-chips {
    margin: 17px 0;
  }
  .clock-panel {
    left: auto;
    right: 12px;
    transform: none;
    width: 142px;
  }
  .mass-panel {
    width: 107px;
  }
  .player-dock {
    gap: 5px;
  }
}
@media (max-height: 540px) {
  .intro {
    top: 22%;
    left: 6%;
    width: 48%;
  }
  h1 {
    font-size: 43px;
    margin: 12px 0;
  }
  h1 br:nth-child(2) {
    display: none;
  }
  h1 svg {
    display: none;
  }
  .tagline,
  .match-chips,
  .control-hint,
  .connection-note,
  .scene-note,
  .how-to {
    display: none;
  }
  .intro .eyebrow {
    font-size: 7px;
  }
  #join-form {
    width: 260px;
  }
  #join-form label {
    margin-top: 18px;
    font-size: 7px;
  }
  .name-field input {
    height: 38px;
  }
  .primary {
    height: 45px;
  }
  .map-tag {
    bottom: 12%;
    right: 7%;
  }
  .clock-panel {
    top: 12px;
    width: 160px;
    padding: 8px;
  }
  .clock-panel > b {
    font-size: 27px;
  }
  .clock-panel small {
    display: none;
  }
  .leaderboard {
    top: 87px;
    width: 148px;
  }
  .leaderboard li:nth-child(n + 4) {
    display: none;
  }
  .player-dock {
    bottom: 15px;
  }
  .minimap-panel {
    bottom: 147px;
    width: 94px;
  }
  .minimap-panel canvas {
    width: 74px;
    height: 74px;
  }
  #notice {
    top: 105px;
  }
  #feed {
    top: 90px;
  }
  #stick {
    bottom: 20px;
  }
  header {
    height: 73px;
  }
}

#hud {
  z-index: 2;
}
#menu {
  z-index: 3;
}
#labels {
  z-index: 1;
}
#floaters {
  z-index: 3;
}
.how-to {
  background: linear-gradient(90deg, #17142680, transparent);
  border-radius: 0 0 12px 12px;
}
@media (min-width: 761px) {
  .grain {
    background: linear-gradient(
      90deg,
      #171426 0%,
      #171426f5 26%,
      #17142660 48%,
      transparent 70%
    );
  }
}

@media (max-width: 760px) {
  .clock-panel {
    left: auto;
    right: 12px;
    transform: none;
    width: 150px;
  }
}

@media (max-width: 760px) {
  .clock-panel > span {
    letter-spacing: 0.8px;
    white-space: nowrap;
  }
}
@media (max-width: 760px) and (min-height: 541px) {
  #notice {
    top: 300px;
  }
}

.hole-label {
  font-size: 11px;
  text-shadow:
    1px 1px 0 #172d38,
    -1px -1px 0 #172d38,
    1px -1px 0 #172d38,
    -1px 1px 0 #172d38;
}
.hole-level {
  display: block;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 3px;
  letter-spacing: 0.4px;
}
.hole-label small {
  font-size: 8px;
}
.hole-label .status {
  font-size: 7px;
}
body.playing .grain {
  background: none;
}
@media (max-width: 760px) {
  .hole-level {
    font-size: 12px;
  }
  .hole-label {
    font-size: 9px;
  }
}
/* Private rooms retain the game's ink, lime and rounded panel style. */
.room-entry-actions { display:grid;gap:8px;margin-top:10px; }
.room-entry-actions button,#leave-room,#copy-room,#leave-match { border:1px solid #b2ff5d66;border-radius:10px;background:#252139;color:#f5f5fa;font:700 12px inherit;padding:12px;min-height:44px;cursor:pointer; }
.room-code-entry { display:flex;gap:8px; }.room-code-entry input { min-width:0;flex:1;width:0;background:#171426;color:white;border:1px solid #ffffff40;border-radius:10px;padding:12px;font:16px monospace;letter-spacing:2px; }
#room-lobby { z-index:12;overflow-y:auto;padding:16px;align-items:flex-start;scrollbar-width:none;height:100dvh; }
#room-lobby::-webkit-scrollbar { display:none; }
.room-card { width:min(580px,100%);margin:auto;background:#201c31;border:1px solid #b2ff5d55;border-top:3px solid #b2ff5d;border-radius:22px;padding:clamp(20px,4vw,32px);box-shadow:0 24px 80px #0007; }
.room-card h2 { font-size:clamp(28px,5vw,42px);letter-spacing:-1px;margin:14px 0 20px; }
.room-ticket { display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px;background:#171426;border-radius:12px; }
.room-ticket>span { font-size:9px;color:#c7bed9; }.room-ticket strong { font:700 26px monospace;color:#b2ff5d;letter-spacing:3px; }#copy-room { margin-left:auto; }
#room-status,.room-help,#room-error { font-size:12px;line-height:1.6;color:#c7bed9; }#room-error { color:#ff8b99; }
#room-players { list-style:none;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:7px; }
#room-players li { display:flex;justify-content:space-between;gap:8px;align-items:center;background:#ffffff06;border:1px solid #ffffff12;padding:12px;border-radius:9px;min-width:0;font-size:12px; }#room-players strong { overflow-wrap:anywhere; }#room-players span { font-size:8px;color:#b2ff5d; }
#leave-room { width:100%;margin-top:10px; }#leave-match { position:fixed;left:18px;bottom:18px;z-index:5;font-size:10px; }
@media (pointer:coarse) {
 #menu { overflow-y:auto;height:100dvh;padding:max(90px,env(safe-area-inset-top)) 20px 24px;scrollbar-width:none; }
 #menu .intro { position:relative;top:auto;left:auto;width:min(520px,100%);margin:0 auto; }
 #menu h1 { font-size:clamp(40px,8vw,62px);margin:12px 0; }
 #menu .how-to,#menu .scene-note,#menu .map-tag { display:none; }
 .room-code-entry button { flex:0 0 auto; }
 .actions button { min-width:44px;min-height:44px; }
 .overlay { max-height:100dvh;overflow:auto;scrollbar-width:none;padding:16px; }
 .result-card { max-width:100%;margin:auto; }
 #stick { touch-action:none;left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));width:110px;height:110px; }
 #stick>span { display:none; }
 .dash-button>span:nth-child(2) { display:none; }
 #dash { min-width:64px;min-height:64px;touch-action:none; }
 #leave-match { left:12px;bottom:145px;min-width:44px;min-height:44px;font-size:0; }
 #leave-match::after { content:'\21aa';font-size:26px; }
 .bottom-controls { display:none; }
}
@media (pointer:coarse) and (orientation:portrait) {
 .player-dock { right:14px;left:auto;bottom:max(18px,env(safe-area-inset-bottom));width:170px;gap:8px; }
 .mass-panel { min-width:0; }.mass-panel>b { font-size:30px; }
 .leaderboard { top:152px;left:12px;width:158px; }.leaderboard .panel-title { font-size:7px; }
 .clock-panel { top:84px;right:12px;width:150px; }
 .minimap-panel { right:12px;bottom:180px; }
 #feed { top:245px;right:12px;max-width:170px; }#notice { top:370px; }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:550px) {
 header { height:64px;padding:10px 16px; }.brand { font-size:13px; }.server-pill { display:none; }
 .clock-panel { top:70px;left:50%;right:auto;transform:translateX(-50%);width:170px; }
 .leaderboard { top:72px;left:12px;width:145px; }.leaderboard li:nth-child(n+4) { display:none; }
 .minimap-panel { top:72px;right:12px;bottom:auto; }.minimap-panel canvas { width:72px;height:72px; }
 .player-dock { bottom:14px;right:16px;left:auto;width:220px; }.mass-panel>b { font-size:28px; }
 #feed { display:none; }#notice { top:150px; }#leave-match { left:145px;bottom:18px; }
 #menu { padding-top:74px; }#menu h1 { font-size:40px; }
}
@media (max-width:380px) { #room-players { grid-template-columns:1fr; }.room-ticket strong { font-size:22px; }.room-ticket { padding:10px;gap:8px; }.player-dock { width:150px; } }

#leave-match { pointer-events:auto; }
#leave-results { width:100%;min-height:44px;border:1px solid #ffffff40;background:#252139;color:white;border-radius:10px;padding:12px;margin-top:10px; }
@media (pointer:coarse) {
 .player-dock { transform:none;align-items:flex-end; }
 #dash { width:64px;height:64px;min-height:64px;flex:0 0 64px;padding:8px;justify-content:center; }
 #dash .dash-icon { font-size:36px; }
 #dash .dash-track { bottom:7px;left:10px;right:10px; }
 .mass-panel { flex:1; }
}
@media (max-height:760px) and (pointer:fine) {
 #menu { overflow-y:auto;padding:88px 7% 24px;scrollbar-width:none; }
 #menu .intro { position:relative;top:auto;left:auto; }
 #menu .how-to { display:none; }
}

/* One accessible scrolling surface; no nested panel scrollbars. */
.overlay { overflow-y:auto; scrollbar-width:none; align-items:flex-start; }
.overlay::-webkit-scrollbar, #menu::-webkit-scrollbar { display:none; }
.result-card, .respawn-card { margin:auto; flex-shrink:0; }
.room-summary { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;color:#b2ff5d; }
.room-summary span { font-size:11px;font-weight:700;letter-spacing:1.5px; }
.room-summary strong { font-size:24px; }
#room-error:empty { display:none; }
#room-players { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-height:800px) {
 .room-card,.result-card { padding:18px 22px; }
 .room-card h2,.result-card h2 { margin:10px 0;font-size:30px; }
 #room-players { margin:10px 0;gap:5px; }
 #room-players li { padding:8px; }
 .room-summary { margin-top:10px; }
 #result-list { margin:12px 0; }
 .result-row { padding:7px; }
}
@media (max-width:380px) {
 .room-card,.result-card { padding:16px; }
 #room-players li { gap:4px;font-size:11px; }
}

#map-choice { width:100%;min-height:44px;padding:10px;background:#252139;color:white;border:1px solid #b2ff5d66;border-radius:10px;font:inherit; }
.room-entry-actions label {font-size:10px;letter-spacing:1px;color:#c7bed9;}

/* Event cues stay outside the input path and respect reduced motion. */
#feedback-edge {position:fixed;inset:0;z-index:10;pointer-events:none;}
#feedback-edge.zone-danger {border:3px solid #ff7164;box-shadow:inset 0 0 55px #ff716433;}
body:not(.playing) #feedback-edge {display:none;}
#mass-fill,#dash-fill {transition:width 100ms linear;}
@media (prefers-reduced-motion:reduce) {
 #mass-fill,#dash-fill {transition:none;}
}

#menu .map-tag {display:block;pointer-events:auto;width:350px;padding:14px;right:6%;bottom:20%;}
.map-picker-title {font-size:11px;font-weight:800;letter-spacing:1px;color:white;margin-bottom:10px;}
.map-picker-title small {display:block;font-size:8px;color:var(--muted);margin-top:4px;}
.map-choices {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
#menu .map-option {min-width:0;padding:5px;border:1px solid #ffffff30;border-radius:8px;background:#171426;color:white;cursor:pointer;text-align:left;}
.map-option canvas {display:block;width:100%;height:auto;border-radius:4px;}
.map-option strong {display:block;font-size:9px;line-height:1.4;margin-top:6px;min-height:26px;}
.map-option small {display:block;font-size:8px;color:var(--muted);margin-top:5px;}
#menu .map-option[aria-pressed="true"] {border-color:var(--lime);background:#b2ff5d18;}
.map-option[aria-pressed="true"] small {color:var(--lime);}
.map-option:focus-visible {outline:2px solid white;outline-offset:3px;}
@media (max-width:1100px), (pointer:coarse) {
 #menu .map-tag {position:static;display:block;width:100%;margin:0;padding:10px;box-sizing:border-box;}
 .map-option canvas {max-height:60px;object-fit:cover;}
}

/* Fit the menu inside the viewport, with a dedicated header clearance. */
#menu {height:100dvh;overflow:hidden;padding:100px 6% 24px;box-sizing:border-box;}
#menu .intro {position:relative;inset:auto;width:min(460px,44%);max-width:none;margin:0;}
#menu #join-form {max-width:none;width:100%;}
#menu h1 {font-size:clamp(40px,min(5.2vw,8vh),70px);margin:12px 0 24px;}
#menu .tagline {margin:12px 0;font-size:13px;}
#menu .match-chips {margin:14px 0;}
#menu .connection-note {margin:10px 0;font-size:10px;}
#menu .how-to {display:none;}
#menu .name-field input {height:44px;}
#menu .primary {height:48px;min-height:44px;margin-top:10px;}
#menu .room-entry-actions {gap:8px;margin-top:12px;}
#menu .control-hint {margin-top:8px;}
@media (max-height:760px) and (min-width:1101px) {
 #menu {padding-top:88px;}
 #menu h1 {font-size:44px;}
 #menu .tagline {display:none;}
 #menu .control-hint {display:none;}
}
@media (max-width:1100px), (pointer:coarse) {
 #menu {padding:84px 5% 16px;}
 #menu .intro {width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:26px;align-items:center;}
 #menu h1 {font-size:clamp(34px,6vw,60px);letter-spacing:-2px;}
 #menu .scene-note {display:none;}
 #menu .control-hint {display:none;}
 #menu .map-tag {padding:8px;}
 #menu .map-option {padding:4px;min-height:0;}
 #menu .map-option canvas {height:42px;object-fit:contain;}
 #menu .map-option strong {font-size:8px;min-height:22px;margin-top:4px;}
 #menu .map-option small {margin-top:2px;font-size:7px;}
 #menu .map-picker-title {font-size:9px;margin-bottom:6px;}
 #menu .map-picker-title small {display:none;}
}
@media (max-width:600px) and (min-height:551px) {
 #menu {padding:76px 5% 12px;}
 #menu .intro {display:block;max-width:440px;margin:0 auto;}
 #menu .eyebrow {font-size:8px;}
 #menu h1 {font-size:clamp(30px,5.6vh,46px);line-height:.98;margin:8px 0 12px;}
 #menu h1 svg {display:none;}
 #menu .tagline {display:none;}
 #menu .match-chips {margin:8px 0;font-size:8px;}
 #menu #join-form label {margin-bottom:6px;}
 #menu .connection-note {margin:6px 0;font-size:9px;}
 #menu .room-entry-actions {margin-top:10px;gap:6px;}
}
@media (max-height:650px) and (max-width:600px) and (min-height:551px) {
 #menu .eyebrow,#menu .match-chips {display:none;}
 #menu h1 {font-size:30px;margin:0 0 10px;}
 #menu .map-option canvas {height:30px;}
 #menu .map-option strong {min-height:20px;}
 #menu .connection-note {display:none;}
}
@media (max-height:550px) {
 #menu {padding:68px 4% 8px;}
 #menu .intro {width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:20px;align-items:start;}
 #menu h1 {font-size:36px;margin:10px 0;}
 #menu h1 svg,#menu .tagline,#menu .connection-note,#menu .control-hint {display:none;}
 #menu .match-chips {margin:12px 0;font-size:7px;gap:10px;}
 #menu .menu-controls {display:grid;grid-template-columns:1fr;}
 #menu .room-entry-actions {gap:5px;margin-top:8px;}
 #menu .map-tag {padding:5px;}
 #menu .map-option canvas {height:25px;}
 #menu .map-option strong {min-height:0;font-size:7px;margin:3px 0;}
 #menu .map-option small,#menu .map-picker-title {display:none;}
 #menu #join-form label {display:none;}
 #menu .primary {margin-top:6px;height:44px;}
 #menu .room-entry-actions button,#menu .room-code-entry input {padding:8px;}
}

#rotate-phone {position:fixed;z-index:30;top:max(92px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:min(330px,88vw);box-sizing:border-box;padding:16px;background:#201c31f5;border:1px solid #b2ff5d88;border-radius:16px;text-align:center;box-shadow:0 12px 50px #0008;}
#rotate-phone .rotate-icon {display:block;font-size:36px;color:var(--lime);}
#rotate-phone strong {font-size:16px;}
#rotate-phone p {font-size:12px;color:#c7bed9;margin:8px 0 12px;}
#rotate-phone button {min-height:44px;padding:10px;border:1px solid #ffffff40;border-radius:8px;background:#252139;color:white;font-size:10px;font-weight:700;cursor:pointer;}
#rotate-phone #rotate-now {background:var(--lime);color:#17221a;}
@media (pointer:coarse) {
 html,body {overscroll-behavior:none;}
 #game,#stick,#dash {touch-action:none;}
 header {padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right));padding-top:max(10px,env(safe-area-inset-top));}
 .overlay {padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));}
 #menu {padding-left:max(5%,env(safe-area-inset-left));padding-right:max(5%,env(safe-area-inset-right));}
}
@media (pointer:coarse) and (orientation:landscape) {
 .leaderboard {top:80px;left:max(12px,env(safe-area-inset-left));width:150px;}
 .leaderboard li:nth-child(n+4) {display:none;}
 .clock-panel {top:12px;left:50%;right:auto;transform:translateX(-50%);width:180px;padding:8px 12px;}
 .clock-panel>b {font-size:30px;}
 .clock-panel>small {font-size:7px;}
 .clock-panel>span {font-size:7px;}
 .minimap-panel {top:80px;right:max(12px,env(safe-area-inset-right));bottom:auto;padding:8px;}
 .minimap-panel canvas {width:76px;height:76px;}
 .player-dock {left:auto;right:max(16px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:230px;transform:none;gap:8px;}
 .mass-panel {min-width:0;padding:10px;}
 .mass-panel>b {font-size:28px;}
 #stick {width:100px;height:100px;left:max(18px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));}
 #leave-match {left:calc(max(18px,env(safe-area-inset-left)) + 112px);bottom:max(14px,env(safe-area-inset-bottom));}
 #feed,.server-pill {display:none;}
 #notice {top:110px;max-width:44vw;font-size:10px;}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:420px) {
 .leaderboard {top:70px;width:135px;padding:8px;}
 .leaderboard li {padding:4px;font-size:9px;}
 .leaderboard .panel-title,.leaderboard>small {display:none;}
 .minimap-panel {top:68px;}
 .minimap-panel canvas {width:60px;height:60px;}
 .minimap-panel>span {display:none;}
 .clock-panel {width:154px;}
 .clock-panel>small {display:none;}
 #notice {top:92px;}
}

@media (pointer:coarse) and (orientation:landscape) {
 #board li:nth-child(n+4):not(.self) {display:none;}
 #board li.self {display:flex;}
 .leaderboard .board-foot {display:none;}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:420px) {
 #board li {padding:4px;font-size:9px;}
}
