:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  background: #d085b5;
  color: #35180a;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("./assets/paper.png");
  background-repeat: repeat;
  background-position: top left;
  opacity: 0.25;
}

.app::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle at center, transparent 48%, rgba(58, 28, 10, 0.12) 72%, rgba(36, 16, 6, 0.34) 100%);
}

.game-frame {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(100vw, 720px);
  aspect-ratio: 9 / 16;
  max-height: 100vh;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}

.game-frame:fullscreen,
.game-frame:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  display: grid;
  place-items: center;
  aspect-ratio: auto;
  background: #d085b5;
}

.game-frame:fullscreen::before,
.game-frame:-webkit-full-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("./assets/paper.png");
  background-repeat: repeat;
  background-position: top left;
  opacity: 0.25;
}

.game-frame:fullscreen::after,
.game-frame:-webkit-full-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle at center, transparent 48%, rgba(58, 28, 10, 0.12) 72%, rgba(36, 16, 6, 0.34) 100%);
}

.game-frame:fullscreen .game-root,
.game-frame:fullscreen .game-root svg,
.game-frame:-webkit-full-screen .game-root,
.game-frame:-webkit-full-screen .game-root svg {
  width: min(100vw, calc(100vh * 9 / 16));
  height: min(100vh, calc(100vw * 16 / 9));
}

.game-root,
.game-root svg {
  width: 100%;
  height: 100%;
  display: block;
}

.game-root,
.game-root svg,
.game-root svg image {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  transition: opacity 280ms ease;
}

.loading-overlay--hidden {
  opacity: 0;
}

.loading-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid rgba(74, 33, 14, 0.18);
  border-top-color: black;
  animation: loading-spin 0.9s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

svg text {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.start-fullscreen-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: start-fullscreen-pulse 2.1s ease-out infinite;
}

@keyframes start-fullscreen-pulse {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  8% {
    opacity: 1;
    transform: scale(1.04);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

#signature
{
  position: absolute;
  bottom: 0;
  right: 0;
  opacity: 0.25;
}
