/* The player owns the whole viewport: the game already lays itself out for any aspect ratio. */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: #0b0b10; overflow: hidden; }
#unity-container { position: absolute; inset: 0; width: 100%; height: 100%; }
#unity-canvas { width: 100%; height: 100%; display: block; background: #0b0b10; }
#unity-footer { display: none; }
#df-unsupported {
  display: none; position: absolute; inset: 0; align-items: center; justify-content: center;
  color: #eee; font: 16px/1.5 system-ui, sans-serif; text-align: center; padding: 32px; background: #0b0b10;
}
#df-unsupported div { max-width: 520px; }
#df-unsupported a { color: #9cf; }

/* Show download progress from the first paint through the game's asset and rendering warmup. */
#df-boot {
  position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  background: #000;
  color: #e8e6f2; font: 15px/1.5 system-ui, -apple-system, Segoe UI, sans-serif;
  transition: opacity .6s ease; pointer-events: none;
}
#df-boot.df-done { opacity: 0; }
#df-boot-title {
  font-size: 30px; font-weight: 300; letter-spacing: .38em; text-transform: uppercase;
  text-indent: .38em; /* letter-spacing pads the right of the last glyph; this re-centres the word */
  color: #fff; text-shadow: 0 0 26px rgba(150, 120, 255, .55);
}
#df-boot-track { width: min(340px, 62vw); height: 3px; background: rgba(255, 255, 255, .13); border-radius: 2px; overflow: hidden; }
#df-boot-fill { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #6f5cff, #b98cff); transition: width .3s ease; }
#df-boot-status { font-size: 13px; letter-spacing: .07em; color: #9d99b8; min-height: 1.4em; }
/* The indeterminate phase: the player is up and the game is loading, so the bar sweeps instead of filling. */
#df-boot.df-indeterminate #df-boot-fill {
  width: 34%; transition: none; animation: df-sweep 1.5s ease-in-out infinite;
}
@keyframes df-sweep { 0% { margin-left: -34%; } 100% { margin-left: 100%; } }
/* Direct game link (df-preload.js): the game's cover image, then its cover video, fit the screen behind the bar,
   which drops to the bottom of the screen. The game's own cover replaces this one in the same frame. The art is
   never cropped: a window of another shape fills its bars with a blurred copy of the cover (--df-cover-url). */
#df-cover-image, #df-cover-video, #df-cover-shade { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
#df-cover-image, #df-cover-video { object-fit: contain; }
#df-boot { overflow: hidden; }
#df-boot::before {
  content: ""; position: absolute; inset: -60px; opacity: 0; transition: opacity .8s ease;
  background: var(--df-cover-url) center / cover no-repeat; filter: blur(36px) brightness(.55);
}
#df-boot.df-cover::before { opacity: 1; }
#df-cover-image.df-shown, #df-cover-video.df-shown { opacity: 1; }
#df-cover-shade { background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 26%, rgba(0, 0, 0, 0) 48%); }
#df-boot.df-cover { justify-content: flex-end; padding-bottom: 9vh; gap: 16px; }
#df-boot.df-cover #df-cover-shade { opacity: 1; }
/* The cover art carries the game's name, as on the game's own cover screen. */
#df-boot.df-cover #df-boot-title { display: none; }
#df-boot.df-cover #df-boot-track, #df-boot.df-cover #df-boot-status { position: relative; }
#df-boot.df-cover #df-boot-track { width: min(460px, 70vw); height: 4px; background: rgba(255, 255, 255, .22); }
#df-boot.df-cover #df-boot-status { color: #d8d4ec; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
@media (prefers-reduced-motion: reduce) {
  #df-boot { transition: none; }
  #df-boot.df-indeterminate #df-boot-fill { animation: none; width: 100%; margin-left: 0; opacity: .5; }
}

/* Stale release guard (index.html): a newer build went live while this tab was open. */
#df-update {
  display: none;
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  align-items: center; gap: 14px; padding: 10px 14px 10px 18px;
  background: rgba(20, 15, 36, 0.94); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px;
  font: 16px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#df-update-reload {
  padding: 7px 16px; border: 0; border-radius: 7px; cursor: pointer;
  background: rgb(130, 100, 200); color: #fff; font: inherit; font-weight: 600;
}

/* Sound unlock (index.html): the browser is holding audio back until the player clicks the page. */
#df-sound {
  display: none;
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 19;
  align-items: center; gap: 10px; padding: 9px 18px 9px 14px; cursor: pointer;
  background: rgba(20, 15, 36, 0.9); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 22px;
  font: 600 16px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity .4s ease, background .2s ease;
}
#df-sound:hover { background: rgb(130, 100, 200); }
#df-sound.df-done { opacity: 0; pointer-events: none; }
/* A speaker with a slash through it, drawn in CSS so the page needs no extra image. */
#df-sound-icon { width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--df-speaker) center / contain no-repeat; mask: var(--df-speaker) center / contain no-repeat;
  --df-speaker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4z' fill='black'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E"); }
