html,
body {
  background-color: #262524;
  height: 100%;
  width: 100%;
  margin: 0;
  background-image: url('img/background.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preLoading {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loadingLogo {
  margin-top: 28%;
  width: 30%;
  padding: calc(20 * 100vw / 750);
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.3);
}

#loadingErrText {
  margin-top: auto;
  margin-left: 15%;
  margin-right: 15%;
  font-size: calc(24 * 100vw / 750);
  color: #dec79c;
  text-align: center;
}

.loadingText {
  margin-top: auto;
  margin-bottom: 12%;
  font-size: calc(30 * 100vw / 750);
  color: #dec79c;
}

/* SW 更新過渡動畫 */
#swUpdateOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #262524;
  background-image: url('img/background.png');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

#swUpdateOverlay.active {
  display: flex;
  opacity: 1;
}

#swUpdateOverlay .sw-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(222, 199, 156, 0.25);
  border-top-color: #dec79c;
  border-radius: 50%;
  animation: sw-spin 0.8s linear infinite;
}

#swUpdateOverlay .sw-update-text {
  margin-top: 16px;
  font-size: calc(26 * 100vw / 750);
  color: #dec79c;
  letter-spacing: 1px;
}

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