:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: #0b0d0b;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0b0d0b;
}

body {
  display: grid;
  place-items: center;
}

#unity-container {
  position: relative;
  width: min(100vw, 177.7778vh);
  height: min(56.25vw, 100vh);
  overflow: hidden;
  background: #211e19;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .62);
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #211e19;
  image-rendering: auto;
}

#loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #e7dcc5;
  background:
    radial-gradient(circle at 24% 18%, rgba(105,46,38,.22), transparent 34%),
    radial-gradient(circle at 78% 78%, rgba(95,88,56,.18), transparent 38%),
    #0b0d0b;
  opacity: 1;
  transition: opacity .28s ease-out;
}

#loading.is-leaving {
  opacity: 0;
  pointer-events: none;
}

#loading[hidden] { display: none; }

.eyebrow {
  margin-bottom: 1rem;
  color: #c0b39c;
  font-size: clamp(.82rem, 1vw, 1rem);
  font-weight: 500;
  letter-spacing: .12em;
}

h1 {
  margin: 0;
  color: #e7dcc5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.035em;
}

#loading p {
  margin: 1.1rem 0 2.4rem;
  color: #c0b39c;
  font-size: clamp(.95rem, 1.4vw, 1.2rem);
  font-weight: 500;
  letter-spacing: .06em;
}

.progress-track {
  width: min(440px, 68vw);
  height: 8px;
  border: 1px solid #746b59;
  background: #211e19;
}

#progress {
  width: 0;
  height: 100%;
  background: #b9aa6b;
  transition: width .12s linear;
}

#progress.failed {
  width: 100% !important;
  background: repeating-linear-gradient(
    -45deg,
    #b64a37 0 12px,
    #692e26 12px 24px
  );
}

#progress-label {
  margin-top: .8rem;
  color: #e7dcc5;
  font-size: .95rem;
  font-weight: 500;
}

#loading-detail {
  min-height: 1.2rem;
  margin-top: .45rem;
  color: #c0b39c;
  font-size: .85rem;
  font-weight: 400;
}

#loading-retry {
  margin-top: 1rem;
  padding: .7rem 1.2rem;
  min-width: 150px;
  min-height: 44px;
  border: 1px solid #b9aa6b;
  color: #211e19;
  background: #e7dcc5;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}

#loading-retry:hover { background: #f0e7d3; }
#loading-retry:active { transform: translateY(1px); }
#loading-retry:disabled { cursor: wait; opacity: .65; }
#loading-retry[hidden] { display: none; }

#warning {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 10;
  width: min(720px, 90%);
  transform: translateX(-50%);
}

#warning div {
  margin-bottom: 6px;
  padding: 10px 14px;
  color: #211e19;
  background: #e7dcc5;
  font-size: 14px;
  font-weight: 500;
}

#warning .error {
  color: white;
  background: #b64a37;
}
