/* VEIL — chrome only. Everything inside the play field is drawn on canvas. */

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

html,
body {
  height: 100%;
  background: #06070a;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #f2f5fa;
  touch-action: none;
  user-select: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: stretch;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---- overlay screens ---- */
#ui {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 40%, rgba(6, 7, 10, .78), rgba(4, 5, 8, .96));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade .32s ease both;
}

#ui.on {
  display: grid;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.card {
  width: min(430px, 100%);
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .34em;
  color: rgba(242, 245, 250, .34);
  margin-bottom: 14px;
}

.eyebrow.win {
  color: #7cffb2;
}

h1 {
  font-size: clamp(52px, 17vw, 84px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .95;
  background: linear-gradient(180deg, #ffffff, #8fb6cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1.win {
  background: linear-gradient(180deg, #d6ffe8, #46d68a);
  -webkit-background-clip: text;
  background-clip: text;
}

h1 span {
  font-size: .42em;
  font-weight: 600;
  letter-spacing: -.01em;
  color: rgba(242, 245, 250, .26);
  -webkit-text-fill-color: rgba(242, 245, 250, .26);
}

.lede {
  margin: 18px auto 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(242, 245, 250, .62);
}

.rules {
  list-style: none;
  margin: 26px auto 0;
  max-width: 33ch;
  text-align: left;
  display: grid;
  gap: 10px;
}

.rules li {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(242, 245, 250, .5);
  padding-left: 16px;
  position: relative;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4de1ff;
  opacity: .55;
}

.rules b {
  color: rgba(242, 245, 250, .88);
  font-weight: 650;
}

/* the three acts, shown on the title card so the shape of the run is honest */
.acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0 2px;
}

.acts div {
  padding: 11px 4px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}

.acts b {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .14em;
  color: rgba(242, 245, 250, .72);
}

.acts span {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(77, 225, 255, .5);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px 0 4px;
}

.stats div {
  padding: 14px 6px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  background: rgba(255, 255, 255, .022);
}

.stats b {
  display: block;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.stats span {
  display: block;
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(242, 245, 250, .32);
}

.best {
  margin-top: 22px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  color: rgba(242, 245, 250, .34);
}

.best b {
  color: rgba(242, 245, 250, .8);
}

.best.new {
  color: #7cffb2;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.go {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 17px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .16em;
  color: #04070c;
  background: linear-gradient(180deg, #eafaff, #7fd8f2);
  box-shadow: 0 10px 34px rgba(77, 225, 255, .2);
  transition: transform .12s ease, box-shadow .2s ease;
}

.go:active {
  transform: translateY(1px) scale(.99);
}

.ghost {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 15px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: rgba(242, 245, 250, .55);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .1);
}

.ghost:active {
  background: rgba(255, 255, 255, .04);
}

.whisper {
  margin-top: 26px;
  font-size: 11px;
  line-height: 1.6;
  font-style: italic;
  color: rgba(242, 245, 250, .17);
  max-width: 30ch;
  margin-inline: auto;
}
