html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #121731;
  color: #fff;
  font-family: "Kanit", "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

#unity-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #a3d9ff;
  outline: none;
}

#loading, #rotate {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #121731;
  text-align: center;
  padding: 16px;
}

.title {
  font-size: clamp(48px, 11vw, 120px);
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffdb4d;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
  line-height: 1;
}

.title.small {
  font-size: clamp(28px, 8vw, 56px);
}

.subtitle {
  font-size: clamp(18px, 3.4vw, 30px);
}

.hint {
  font-size: clamp(14px, 2.4vw, 20px);
  color: #7fe6ff;
}

.bar {
  width: min(460px, 80vw);
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

#bar-fill {
  width: 0;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, #4fe3c2, #ffdb4d);
  transition: width 0.2s;
}

/* Portrait phones: the game is made for landscape. */
#rotate { display: none; z-index: 5; }
@media (orientation: portrait) and (max-width: 900px) {
  #rotate { display: flex; }
}

#error {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #d9364a;
  font-size: 16px;
  z-index: 10;
}
