/* A game page: the site's ink strip on top (site.css .game-strip, 44px), and the game filling everything below it. */
html,
body {
  height: 100%;
  margin: 0;
  background: #3a3833;
}

[data-creecade-game] {
  position: fixed;
  inset: 44px 0 0;
}

.creecade-host-error {
  /* Positioned, and after the empty game container, so it lies over it and a link in it can be pressed. */
  position: relative;
  max-width: 32ch;
  margin: 30vh auto 0;
  padding: 0 16px;
  color: #f2efe6;
  font: 700 1.1rem/1.5 'Atkinson Hyperlegible', system-ui, sans-serif;
  text-align: center;
}

/* A link inside the message (the online game's way back to My games when there is no JavaScript). */
.creecade-host-error a {
  display: block;
  margin-top: 12px;
  color: inherit;
  text-underline-offset: 4px;
}

/* What a browser without JavaScript shows in place of a finished online game: the site's own wall and paper (it wears
   the .site class), under the strip. Positioned, and after the empty game container, so its buttons can be pressed. */
.game-fallback {
  position: relative;
  padding-top: 44px;
}

/* The push prompt (P6 spec 2 §7.3): a white board across the bottom, like the site's install sign. The host raises the
   game container's bottom edge by its height while it shows, so the board is never covered. Tokens from site.css. */
.creecade-push {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 3px solid var(--ink);
  color: var(--ink);
  font: 600 1rem/1.35 var(--sans);
}

.creecade-push__line {
  margin: 0;
  font: italic 700 1.1rem/1.25 var(--serif);
  color: var(--wall);
}

.creecade-push__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.creecade-push__button {
  min-height: 44px;
  padding: 10px 18px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: 700 1rem/1.2 var(--sans);
  cursor: pointer;
}

.creecade-push__button--yes {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 0 var(--ink);
}

.creecade-push__button--yes:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.creecade-push__button:disabled {
  opacity: .6;
  cursor: progress;
}

.creecade-push__button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* The install sign's two numbered steps (site.css .site .steps), for an iPhone outside the home screen */
.creecade-push__steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.creecade-push__steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .95rem;
}

.creecade-push__steps li::before {
  content: counter(step);
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font: 700 .8rem/1 var(--sans);
}

.creecade-push__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .creecade-push {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .creecade-push__steps {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
