:root {
  color-scheme: dark;
  background: #000;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  overscroll-behavior: none;
}

body {
  padding-top: env(safe-area-inset-top, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
}

#days-shell {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #000;
}

#days-frame {
  position: relative;
  width: min(100vw, calc(100vh * 0.5625));
  height: min(100vh, calc(100vw * 1.7777778));
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  background: #000;
  touch-action: none;
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  outline: none;
}

#unity-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #e7d9b8;
  background: #000;
}

#unity-loading[hidden], #unity-fullscreen[hidden] { display: none; }

#days-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 7vw, 72px);
  letter-spacing: .18em;
}

#unity-progress-track {
  width: min(64%, 420px);
  height: 7px;
  overflow: hidden;
  border: 1px solid #8e7446;
  background: #17120b;
}

#unity-progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #806231, #d7b468);
  transition: width .12s linear;
}

#unity-loading-text { font-size: 14px; color: #b7aa8d; }

#unity-warning {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  left: 12px;
  text-align: center;
  pointer-events: none;
}

#unity-warning:empty { display: none; }
#unity-warning > div { margin-bottom: 6px; padding: 8px 12px; color: #111; }
#unity-warning .warning { background: #f6d365; }
#unity-warning .error { color: #fff; background: #922; }

#unity-fullscreen {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(215, 180, 104, .65);
  border-radius: 4px;
  color: #e7d9b8;
  background: rgba(0, 0, 0, .62);
  cursor: pointer;
  opacity: .45;
}

#unity-fullscreen:hover, #unity-fullscreen:focus-visible { opacity: 1; }

@media (pointer: coarse), (max-width: 700px) {
  #unity-fullscreen { display: none; }
  #unity-loading-text { font-size: 12px; }
}
