:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #081429;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#playable {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  background: #081429;
}

#playable {
  position: relative;
  isolation: isolate;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: none;
}

.prompt {
  position: absolute;
  z-index: 2;
  top: max(5.4vh, env(safe-area-inset-top));
  left: 50%;
  width: min(88vw, 430px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 2px 8px rgb(0 0 0 / 26%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.prompt.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

.prompt__eyebrow,
.prompt__title,
.prompt__instruction {
  display: block;
}

.prompt__eyebrow {
  color: #ffc84a;
  font-size: clamp(11px, 2.8vw, 15px);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.prompt__title {
  margin-top: 4px;
  font-size: clamp(24px, 7.4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.025em;
}

.prompt__instruction {
  margin-top: 9px;
  color: #d7e9ff;
  font-size: clamp(13px, 3.5vw, 17px);
  font-weight: 700;
}

.end-card {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: rgb(4 12 28 / 76%);
  backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.end-card.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.end-card__card {
  width: min(88vw, 380px);
  padding: 30px 24px 24px;
  border: 2px solid rgb(255 255 255 / 23%);
  border-radius: 30px;
  background: linear-gradient(160deg, #274f91 0%, #182f5f 48%, #101f45 100%);
  box-shadow: 0 22px 58px rgb(0 0 0 / 44%), inset 0 1px 0 rgb(255 255 255 / 25%);
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 330ms cubic-bezier(.2,.9,.25,1.2);
}

.end-card.is-visible .end-card__card {
  transform: scale(1) translateY(0);
}

.app-icon {
  display: grid;
  width: 84px;
  height: 84px;
  margin: -64px auto 12px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 23px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 30%) 0 18%, transparent 18% 36%, rgb(255 255 255 / 20%) 36% 51%, transparent 51%),
    linear-gradient(145deg, #ffbd35, #ee6841 56%, #a43c72);
  box-shadow: 0 10px 24px rgb(0 0 0 / 30%);
  color: #fff;
  font-size: 50px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  text-shadow: 0 3px 0 rgb(103 39 41 / 58%);
}

.end-card__kicker {
  margin: 0;
  color: #ffc94e;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
}

.end-card h1 {
  margin: 5px 0 4px;
  color: #fff;
  font-size: clamp(31px, 9vw, 45px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.end-card__copy {
  margin: 0 0 21px;
  color: #d9e9ff;
  font-size: 16px;
  font-weight: 700;
}

.install-button,
.replay-button {
  width: 100%;
  border: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.install-button {
  min-height: 58px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffde60, #f29c23);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 55%), 0 6px 0 #bd611b, 0 10px 18px rgb(0 0 0 / 25%);
  color: #55300d;
  font-size: 21px;
  letter-spacing: .06em;
}

.install-button:active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 55%), 0 2px 0 #bd611b, 0 5px 12px rgb(0 0 0 / 25%);
}

.replay-button {
  margin-top: 17px;
  padding: 5px;
  background: transparent;
  color: #c5d9f8;
  font-size: 13px;
  text-decoration: underline;
}

@media (max-height: 570px) and (orientation: landscape) {
  .prompt {
    top: 3vh;
  }

  .prompt__title {
    font-size: 25px;
  }

  .prompt__instruction {
    margin-top: 2px;
  }

  .end-card__card {
    width: min(56vw, 400px);
    padding: 20px 20px 16px;
  }

  .app-icon {
    width: 66px;
    height: 66px;
    margin: -46px auto 7px;
    border-radius: 19px;
    font-size: 40px;
  }

  .end-card h1 {
    font-size: 31px;
  }

  .end-card__copy {
    margin-bottom: 12px;
  }

  .install-button {
    min-height: 46px;
  }

  .replay-button {
    margin-top: 8px;
  }
}
