* {
  box-sizing: border-box;
}

html,
body {
  overscroll-behavior-y: contain;
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  user-select: none;
  position: fixed;
  overflow: hidden;
  background: #0e704f;
  font-family: "Luckiest Guy", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  text-align: center;
  color: white;
  letter-spacing: 4px;
  font-size: 42px;
  margin: 48px 0 0 0;
}

#root {
  position: fixed;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.hint {
  animation: fade-out 0.5s 7s ease-in-out forwards;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  color: white;
  left: 50%;
  line-height: 1.5;
  margin-left: -150px;
  padding: 16px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 40vh;
  width: 300px;
  z-index: 1;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.kit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 80vh;
  padding-top: 100px;
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: none;
}

.kit.dragging {
  transition: none;
}

.kit.gone {
  pointer-events: none;
  transition: transform 0.25s linear;
}

.kit.drop-in {
  animation: drop-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes drop-in {
  from {
    transform: translate3d(0, -120vh, 0) rotate(-8deg);
  }
}

.kit > div {
  background-color: white;
  background-size: 90%;
  background-repeat: no-repeat;
  background-position: center 20px;
  width: 45vh;
  max-width: 300px;
  height: 75vh;
  max-height: 470px;
  will-change: transform;
  border-radius: 4px;
  cursor: grab;
  border: 8px double black;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.kit.dragging > div {
  transition: none;
}

.kit > div > span {
  width: 100%;
  position: absolute;
  bottom: 20px;
  text-align: center;
  color: goldenrod;
  font-size: 22px;
  letter-spacing: 1px;
  padding: 0 8px;
}

.swipe {
  width: 52px;
  height: 74px;
  position: absolute;
  top: 40vh;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 1;
}

.swipe.swipe-left {
  background-image: url("/swipe-left.svg");
  left: 8px;
}
.swipe.swipe-right {
  background-image: url("/swipe-right.svg");
  right: 8px;
}

nav {
  width: 100vw;
  text-align: center;
  position: absolute;
  bottom: 8px;
  color: white;
}

.link {
  margin: 0 8px;
  font-size: 14px;
  color: white;
}

#stats {
  height: 90vh;
  overflow-y: auto;
  scrollbar-width: none;
}

#stats::-webkit-scrollbar {
  display: none;
}

ul {
  list-style: none;
  margin: 32px;
  padding: 0;
}

ul > li {
  margin: 16px 0;
}

ul > li:nth-child(even) > span {
  opacity: 0.5;
}

ul > li > span {
  color: white;
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
}

ul > li > span:nth-child(2) {
  font-size: 16px;
}

h4 {
  margin: 0 32px;
  color: white;
  letter-spacing: 1px;
}

p {
  margin: 0 32px 16px;
  color: white;
  font-size: 12px;
  letter-spacing: 1px;
}

.kits-gallery {
  height: 80px;
  margin: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}

.kits-gallery::-webkit-scrollbar {
  display: none;
}

.kits-gallery > img {
  width: 60px;
  margin: 0 8px;
  display: inline-block;
}

.kits-group {
  margin-top: 16px;
}

.kits-group > .kits-gallery {
  height: 80px;
  margin: 8px 32px 16px;
}

.kits-group-label {
  margin: 0 32px;
  color: white;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.7;
}

.about {
  margin: 32px;
  font-size: 18px;
  text-align: center;
  line-height: 24px;
}

.empty-state {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 100px 32px 0;
}

.empty-state > h2 {
  font-size: 32px;
  letter-spacing: 2px;
  margin: 0 0 8px;
}

.empty-state > p {
  font-size: 16px;
  margin: 0 0 24px;
  opacity: 0.8;
  letter-spacing: 1px;
}

.empty-cta {
  display: inline-block;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 2px;
  color: #0e704f;
  background: white;
  border: 4px double black;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

.clear-session {
  display: block;
  margin: 32px auto;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 2px;
  color: #0e704f;
  background: white;
  border: 4px double black;
  border-radius: 4px;
  cursor: pointer;
}

#timeline {
  height: 82vh;
  overflow-y: auto;
  padding-bottom: 32px;
  scrollbar-width: none;
}

#timeline::-webkit-scrollbar {
  display: none;
}

.timeline-controls {
  margin: 24px 32px 16px;
  display: flex;
  flex-direction: column;
  color: white;
}

.timeline-controls > label {
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.timeline-controls > select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 1px;
  color: #0e704f;
  background: white;
  border: 4px double black;
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
}

.timeline-years {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline-years::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56px;
  width: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.timeline-year {
  position: relative;
  padding: 8px 32px 8px 112px;
  margin: 0;
}

.timeline-year-label {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 80px;
  color: white;
  font-size: 18px;
  letter-spacing: 1px;
  background: #0e704f;
  padding: 2px 0;
  z-index: 1;
}

.timeline-year-kits {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding: 8px 0;
  scrollbar-width: none;
}

.timeline-year-kits::-webkit-scrollbar {
  display: none;
}

.timeline-kit {
  flex: 0 0 auto;
  margin: 0;
  background: white;
  border: 4px double black;
  border-radius: 4px;
  padding: 8px 8px 4px;
  width: 96px;
  text-align: center;
}

.timeline-kit > img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.timeline-kit > figcaption {
  color: goldenrod;
  font-size: 12px;
  letter-spacing: 1px;
  margin-top: 4px;
}

@media only screen and (max-width: 420px) {
  h1 {
    font-size: 32px;
    margin-top: 32px;
  }

  .kit {
    padding-top: 76px;
  }

  .kit > div {
    width: 35vh;
    height: 65vh;
  }

  .kit > div > span {
    font-size: 16px;
  }

  .empty-state {
    padding-top: 76px;
  }

  .swipe {
    width: 42px;
    height: 60px;
  }
}
