@font-face {
  font-family: 'Nunito';
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/nunito-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/nunito-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/nunito-cyrillic-800-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito';
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/nunito-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sky-top: #ffe3d3;
  --sky-bottom: #cfe8ff;
  --ink: #3b2f4a;
  --ink-soft: #6b5d7b;
  --coral: #ff8a7a;
  --coral-deep: #e8665a;
  --mint: #7fd8be;
  --mint-deep: #4fb89a;
  --sun: #ffd166;
  --sun-deep: #e8b33e;
  --lilac: #b39ddb;
  --lilac-deep: #8f75c2;
  --sky: #7cc4ff;
  --sky-deep: #4f9fe0;
  --cream: #fff8ef;
  --shadow: rgba(59, 47, 74, 0.22);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --tap: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

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

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#ui > * {
  pointer-events: auto;
}

#boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  transition: opacity 0.5s ease;
  z-index: 10;
}

#boot.done {
  opacity: 0;
  pointer-events: none;
}

.boot-blocks {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.boot-blocks span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--coral);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12);
  animation: boot-hop 0.9s ease-in-out infinite;
}

.boot-blocks span:nth-child(2) {
  height: 50px;
  background: var(--sun);
  animation-delay: 0.15s;
}

.boot-blocks span:nth-child(3) {
  background: var(--mint);
  animation-delay: 0.3s;
}

@keyframes boot-hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  40% { transform: translateY(-16px) scale(0.92, 1.08); }
  60% { transform: translateY(0) scale(1.1, 0.9); }
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .boot-blocks span {
    animation: none;
  }
}
