@font-face {
  font-family: "Garden Snakes Loader";
  src: url("loading-font.ttf") format("truetype");
  font-display: block;
  font-style: normal;
  font-weight: 700;
}

:root {
  color-scheme: dark;
  --forest-950: #14251d;
  --forest-900: #1b3025;
  --forest-800: #264534;
  --leaf-400: #8fcf75;
  --leaf-300: #b1df91;
  --cream: #f7f1dc;
  --warning: #f1c565;
  --error: #ef8b78;
  /* Keep synchronized with GardenPresentationPalette.Background. */
  --garden-background: #bce58c;
  /* Keep synchronized with the itch.io project page's game-frame background. */
  --itch-frame-background: #0eb77d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--forest-950);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  color: var(--cream);
  font-family: ui-rounded, "Nunito", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 12%, rgba(143, 207, 117, 0.13), transparent 29rem),
    radial-gradient(circle at 82% 88%, rgba(104, 165, 102, 0.12), transparent 32rem),
    linear-gradient(155deg, var(--forest-800), var(--forest-950) 68%);
}

html.is-embedded,
html.is-embedded body {
  background: var(--itch-frame-background);
}

html.is-embedded body::before {
  display: none;
}

#page {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  place-items: center;
}

#unity-container {
  position: relative;
  flex: none;
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.78vw);
  overflow: hidden;
  background: var(--garden-background);
  box-shadow: 0 1.4rem 5rem rgba(4, 15, 9, 0.36);
  isolation: isolate;
}

html.is-embedded #unity-container {
  box-shadow: none;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: var(--garden-background);
  background-position: center;
  background-size: cover;
}

#loading-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background: var(--garden-background);
  transition: opacity 360ms ease, visibility 360ms ease;
}

.loading-safe-area {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  container-type: inline-size;
  transform: translateX(-50%);
}

#loading-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
}

#loading-screen.is-transitioning {
  pointer-events: none;
  background: transparent;
}

#loading-screen.is-transitioning .loading-logo,
#loading-screen.is-transitioning .loading-decoration,
#loading-screen.is-transitioning .loading-filters {
  visibility: hidden;
}

.loading-logo {
  position: absolute;
  top: 2.97%;
  left: 18.43%;
  z-index: 2;
  width: 65%;
  height: 26.1%;
  object-fit: contain;
}

.loading-center {
  position: absolute;
  top: 41.45%;
  left: 10%;
  z-index: 2;
  width: 80%;
  color: #030202;
  font-family: "Garden Snakes Loader", ui-rounded, system-ui, sans-serif;
  text-align: center;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.loading-title {
  margin: 0 0 4.1cqw;
  font-size: 6.48cqw;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#snake-loader {
  position: relative;
  width: 100%;
  height: 11.85cqw;
}

.snake-cells {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(31.48% + 1.3cqw);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.3cqw;
}

.snake-cells span {
  border-radius: 999px;
  background: #f7f3e3;
}

#snake-fill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 31.48%;
  height: 100%;
  border-radius: 999px;
  background: #0cae65;
  transition: width 180ms ease-out;
}

#progress-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 5.18cqw;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.snake-face {
  position: absolute;
  top: 0;
  right: 2.8cqw;
  bottom: 0;
  width: 2cqw;
}

.snake-eye {
  position: absolute;
  left: 50%;
  display: block;
  width: 1.48cqw;
  height: 1.48cqw;
  border-radius: 999px;
  background: #151411;
  animation: loader-blink 3.2s 0.8s infinite;
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.snake-eye:first-child { top: 29%; }
.snake-eye:last-child { top: 71%; }

.snake-tongue {
  position: absolute;
  top: 46%;
  left: calc(100% - 0.35cqw);
  width: 5cqw;
  height: 0.93cqw;
  border-radius: 999px;
  background: #f16c6d;
  animation: loader-tongue 3.1s 0.45s infinite;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
}

.snake-tongue::before,
.snake-tongue::after {
  position: absolute;
  right: -0.55cqw;
  width: 1.65cqw;
  height: 0.56cqw;
  border-radius: 999px;
  background: inherit;
  content: "";
  transform-origin: left center;
}

.snake-tongue::before {
  top: -0.05cqw;
  transform: rotate(-24deg);
}

.snake-tongue::after {
  bottom: -0.05cqw;
  transform: rotate(24deg);
}

#snake-loader.is-complete .snake-tongue {
  animation: none;
  opacity: 0;
  transform: scaleX(0);
}

#snake-loader.is-complete .snake-eye {
  width: 2.2cqw;
  height: 0.7cqw;
  animation: none;
}

#snake-loader.is-complete .snake-eye:first-child {
  top: 29%;
  transform: translate(-50%, -50%) rotate(-8deg);
}

#snake-loader.is-complete .snake-eye:last-child {
  top: 71%;
  transform: translate(-50%, -50%) rotate(8deg);
}

.loading-decoration {
  position: absolute;
  bottom: 0;
  z-index: 1;
  height: 27.24%;
  filter: url("#loading-decoration-tint");
}

.loading-decoration-left {
  left: 0;
  width: 47.13%;
}

.loading-decoration-right {
  right: 0;
  width: 45.19%;
}

.loading-filters {
  position: absolute;
  width: 0;
  height: 0;
}

#fatal-error {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  padding: clamp(1rem, 6%, 2.5rem);
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(177, 223, 145, 0.14), transparent 38%),
    linear-gradient(160deg, #294b38, #172a20);
}

.error-card {
  width: min(78%, 22rem);
  text-align: center;
}

.error-title {
  margin: 1.25rem 0 0.35rem;
  color: var(--cream);
  font-size: clamp(1.25rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

#fatal-error-message {
  min-height: 1.4em;
  margin: 0 0 1.25rem;
  color: rgba(247, 241, 220, 0.72);
  font-size: clamp(0.78rem, 2.6vw, 1rem);
}

#fatal-error[hidden] {
  display: none;
}

.error-card {
  padding: 1.5rem;
  border: 1px solid rgba(239, 139, 120, 0.25);
  border-radius: 1.5rem;
  background: rgba(20, 37, 29, 0.76);
  box-shadow: 0 1.2rem 3rem rgba(4, 15, 9, 0.28);
}

.error-title {
  margin-top: 0;
  color: #ffd2c8;
}

#retry-button,
#fullscreen-button,
#diagnostics-button {
  display: inline-grid;
  min-height: 2.7rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--forest-950);
  background: var(--leaf-300);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

#retry-button {
  min-width: 8rem;
  padding: 0.7rem 1.2rem;
}

#fullscreen-button,
#diagnostics-button {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 8;
  width: 2.8rem;
  padding: 0;
  color: var(--cream);
  background: rgba(20, 37, 29, 0.7);
  box-shadow: 0 0.45rem 1.2rem rgba(4, 15, 9, 0.22);
  backdrop-filter: blur(0.45rem);
}

#fullscreen-button[hidden] {
  display: none;
}

#fullscreen-button svg {
  width: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#diagnostics-button {
  right: 4.1rem;
}

#diagnostics-button img {
  width: 1.35rem;
  height: 1.35rem;
}

#retry-button:hover,
#fullscreen-button:hover,
#diagnostics-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

#retry-button:active,
#fullscreen-button:active,
#diagnostics-button:active {
  transform: translateY(1px) scale(0.98);
}

#retry-button:focus-visible,
#fullscreen-button:focus-visible,
#diagnostics-button:focus-visible {
  outline: 0.18rem solid var(--cream);
  outline-offset: 0.15rem;
}

#unity-warning {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  z-index: 20;
  display: grid;
  width: min(90%, 28rem);
  gap: 0.4rem;
  pointer-events: none;
  transform: translateX(-50%);
}

.warning-message {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  color: #352811;
  background: var(--warning);
  box-shadow: 0 0.5rem 1.4rem rgba(4, 15, 9, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.warning-message.error {
  color: #38140d;
  background: var(--error);
}

@keyframes loader-blink {
  0%, 7.5%, 100% { transform: translate(-50%, -50%) scaleY(1); }
  3.75% { transform: translate(-50%, -50%) scaleY(0.12); }
}

@keyframes loader-tongue {
  0%, 18%, 100% {
    opacity: 0;
    transform: scaleX(0);
  }
  4.5%, 11% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 620px), (max-height: 720px) {
  #unity-container {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
