:root {
  color-scheme:dark;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:#090e1d;
  color:#f1f5fb
}
* {
  box-sizing:border-box
}
html,body {
  width:100%;
  height:100%;
  margin:0;
  overflow:hidden
}
body {
  touch-action:none;
  user-select:none;
  -webkit-user-select:none
}
.game-shell {
  position:relative;
  width:100vw;
  height:100vh;
  height:100dvh;
  min-height:320px;
  overflow:hidden;
  background:#090e1d
}
canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
  cursor:crosshair
}
.hud {
  position:absolute;
  top:0;
  left:0;
  right:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:24px clamp(18px,4vw,58px);
  pointer-events:none;
  text-shadow:0 2px 16px #050a16
}
.brand {
  display:flex;
  align-items:baseline;
  gap:9px;
  font-size:14px;
  font-weight:900;
  letter-spacing:.19em;
  white-space:nowrap
}
.brand-mark {
  color:#ff5b64;
  font-size:16px
}
.brand-sub {
  color:#8292af;
  font-size:10px;
  font-weight:700;
  letter-spacing:.2em
}
.scores {
  display:flex;
  gap:clamp(18px,3vw,46px);
  text-align:right
}
.scores>div {
  display:flex;
  flex-direction:column;
  gap:2px
}
.label {
  color:#8b9ab5;
  font-size:10px;
  letter-spacing:.18em;
  font-weight:800
}
.scores strong {
  font-size:26px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.06em;
  line-height:1.1
}
.hint {
  position:absolute;
  bottom:clamp(18px,3vh,30px);
  left:50%;
  transform:translateX(-50%);
  padding:11px 17px;
  border:1px solid #ffffff66;
  border-radius:100px;
  background:#101a2cf2;
  backdrop-filter:blur(10px);
  color:#f1f5fb;
  font-size:11px;
  font-weight:800;
  letter-spacing:.13em;
  white-space:nowrap;
  pointer-events:none;
  transition:opacity .4s;
  z-index:3
}
.hint.faded {
  opacity:.85
}
.glide-hud {
  position:absolute;
  top:clamp(20px,4vh,34px);
  left:50%;
  transform:translateX(-50%);
  padding:6px 14px;
  border:1px solid #8beaf688;
  border-radius:100px;
  background:#164d5bdd;
  color:#b8f8ff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.18em;
  pointer-events:none;
  transition:opacity .3s, background .3s, border-color .3s;
  z-index:1
}
.glide-hud[hidden] {
  display:none
}
.glide-hud.gliding {
  background:#ff5b64dd;
  border-color:#ffb3b7;
  color:#fff
}
.mobile-hint,.mobile-note {
  display:none
}
.key {
  display:inline-block;
  padding:3px 6px;
  border:1px solid #8190a969;
  border-radius:4px;
  color:#edf4ff;
  font-size:10px
}
.game-controls {
  position:absolute;
  bottom:clamp(14px,3vh,30px);
  left:50%;
  transform:translateX(-50%);
  display:none;
  gap:8px;
  z-index:3
}
.game-controls.hidden-controls {
  display:none
}
#web-button {
  display:none
}
.game-controls button,.primary-button {
  border:1px solid #a6c0de55;
  border-radius:9px;
  background:#14243cdd;
  color:#e8f5ff;
  padding:10px 13px;
  font-family:inherit;
  font-size:11px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.08em;
  white-space:nowrap;
  touch-action:none;
  cursor:pointer
}
.game-controls button span {
  display:block;
  margin-top:3px;
  color:#90a7c5;
  font-size:9px
}
.game-controls button:active,.game-controls button.active,.primary-button:hover {
  background:#315372;
  border-color:#9beaf3
}
.state-screen {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:16px 16px 65px;
  background:#05091598;
  backdrop-filter:blur(4px);
  z-index:2
}
.state-screen[hidden] {
  display:none
}
.state-screen .hint {
  position:static;
  transform:none;
  max-width:calc(100% - 16px);
  text-align:center;
  white-space:normal
}
.state-card {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:13px;
  text-align:center;
  padding:28px;
  border:1px solid #879bc344;
  border-radius:18px;
  background:#101b30e8;
  box-shadow:0 24px 80px #0008
}
.countdown-number {
  font-size:clamp(88px,20vw,150px);
  line-height:1;
  font-variant-numeric:tabular-nums;
  color:#f3f8ff;
  text-shadow:0 0 35px #70dfff88
}
.state-note {
  color:#aebdd4;
  font-size:12px;
  font-weight:700
}
.primary-button {
  background:#ff5b64;
  color:#1b0e19;
  border:0;
  padding:13px 32px
}
.dot {
  margin:0 7px;
  color:#ff666e
}
.death-screen {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  background:#05091568;
  backdrop-filter:none;
  z-index:4
}
.death-screen[hidden] {
  display:none
}
.death-card {
  position:relative;
  z-index:1;
  text-align:center;
  padding:34px 28px;
  max-width:360px;
  width:calc(100% - 36px);
  border:1px solid #879bc333;
  border-radius:18px;
  background:linear-gradient(150deg,#172239f5,#0d1527f5);
  box-shadow:0 24px 80px #0008
}
.death-dancer {
  display:block;
  width:220px;
  height:150px;
  margin:-18px auto 0;
  filter:drop-shadow(0 0 14px #64e5ff88);
  pointer-events:none
}
.eyebrow {
  font-size:10px;
  letter-spacing:.25em;
  font-weight:900;
  color:#ff7279
}
h1 {
  margin:10px 0 16px;
  font-size:clamp(24px,5vw,34px);
  letter-spacing:-.04em
}
.final-distance {
  display:flex;
  flex-direction:column;
  gap:2px;
  margin:15px 0 5px
}
.final-distance span {
  color:#9cabc3;
  font-size:11px;
  font-weight:900;
  letter-spacing:.22em
}
.final-distance strong {
  color:#f3f7ff;
  font-size:clamp(54px,11vw,76px);
  line-height:1;
  letter-spacing:-.04em;
  font-variant-numeric:tabular-nums
}
.restart-note {
  display:block;
  width:100%;
  padding:12px 15px;
  border:0;
  border-radius:9px;
  background:#ff5b64;
  color:#1b0e19;
  font-family:inherit;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer
}
.restart-note:hover,.restart-note:focus-visible {
  background:#ff8188;
  outline:2px solid #ffe5e5;
  outline-offset:2px
}
@media(max-width:760px) {
  .hint {
    white-space:normal;
    text-align:center;
    line-height:1.6
  }
}
@media(max-width:560px), (hover:none) and (pointer:coarse) {
  .hud {
    padding:17px 17px
  }
  .brand {
    font-size:12px;
    letter-spacing:.13em
  }
  .brand-sub {
    display:none
  }
  .scores {
    gap:16px
  }
  .scores strong {
    font-size:19px
  }
  .label {
    font-size:8px
  }
  .hint {
    bottom:calc(max(12px,env(safe-area-inset-bottom)) + 122px);
    max-width:calc(100% - 24px);
    padding:7px 12px;
    font-size:10px;
    letter-spacing:.04em;
    text-align:center
  }
  .glide-hud {
    top:clamp(14px,3vh,22px);
    padding:5px 10px;
    font-size:9px;
    letter-spacing:.12em
  }
  .desktop-hint,.desktop-note {
    display:none
  }
  .mobile-hint,.mobile-note {
    display:inline
  }
  .game-controls {
    bottom:max(12px,env(safe-area-inset-bottom));
    width:calc(100% - 20px);
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    grid-template-areas:"shorter shorter longer longer pause" "web web web jump jump";
    gap:6px
  }
  .game-controls button {
    min-width:0;
    min-height:48px;
    padding:8px 3px;
    font-size:11px;
    letter-spacing:.02em
  }
  .game-controls button span {
    display:none
  }
  .death-dancer {
    width:190px;
    height:128px;
    margin:-12px auto 0
  }
  #web-button {
    display:block;
    grid-area:web;
    min-height:58px;
    background:#206077e8;
    border-color:#8be9f4a8;
    font-size:15px
  }
  #web-button.active {
    background:#37a2b6;
    color:#071725
  }
  #jump-button {
    grid-area:jump;
    min-height:58px;
    background:#7f3545e8;
    border-color:#ff9aa4a8;
    font-size:15px
  }
  #shorten-button { grid-area:shorter }
  #lengthen-button { grid-area:longer }
  #pause-button { grid-area:pause }
}
@media(max-width:560px) and (max-height:480px), (hover:none) and (pointer:coarse) and (max-height:480px) {
  .hint {
    display:none
  }
  .state-screen .hint {
    display:block
  }
  .game-controls {
    width:calc(100% - 12px);
    bottom:max(6px,env(safe-area-inset-bottom));
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:4px
  }
  .game-controls button {
    min-height:38px
  }
  #web-button,#jump-button {
    min-height:45px
  }
}
@media(max-height:520px) {
  .death-card {
    padding:20px 22px
  }
  .death-dancer {
    width:150px;
    height:102px;
    margin:-8px auto -2px
  }
  .final-distance {
    margin:8px 0 3px
  }
  .final-distance strong {
    font-size:clamp(44px,11vw,64px)
  }
  h1 {
    margin:6px 0 10px;
    font-size:26px
  }
}
