:root {
  --bg: #0a0610;
  --gold: #ffc95c;
  --dim: #b39aa4;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--dim);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#embed-html {
  position: fixed;
  inset: 0;
}

canvas {
  display: block;
  outline: none;
  cursor: default;
}

/* ---- loading screen ------------------------------------------------------------ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: radial-gradient(ellipse at 50% 35%, #3a1424 0%, var(--bg) 70%);
  transition: opacity .45s ease, visibility .45s;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loader h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 68px);
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--gold);
  text-shadow: 0 0 28px rgba(255, 201, 92, .35);
}

#loader p {
  margin: 0;
  font-size: 15px;
  letter-spacing: .05em;
}

.track {
  width: min(320px, 70vw);
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

#loader-bar {
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width .15s linear;
}

/* ---- portrait phones: the game is a fixed 16:9 layout --------------------------- */

#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  background: var(--bg);
  font-size: 18px;
}

@media (orientation: portrait) and (max-width: 700px) {
  #rotate { display: flex; }
}

.nojs {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: var(--bg);
}
