:root {
  color-scheme: dark;
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #17130f;
  color: #f8f2e7;
}

* {
  box-sizing: border-box;
}

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

body {
  background:
    radial-gradient(circle at 50% 30%, rgb(90 64 43 / 55%), transparent 42%),
    #17130f;
}

#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.welcome {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgb(17 12 8 / 74%), rgb(40 25 15 / 38%));
  backdrop-filter: blur(7px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.welcome.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.welcome__card {
  width: min(480px, 100%);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid rgb(255 235 205 / 24%);
  border-radius: 4px;
  background: rgb(31 23 17 / 88%);
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
  text-align: center;
}

.welcome__eyebrow {
  margin: 0 0 12px;
  color: #d6aa71;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

h1 {
  margin: 0;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.welcome__message {
  margin: 18px 0 26px;
  color: #d8cfc1;
  line-height: 1.8;
}

#start-button {
  min-width: 180px;
  padding: 13px 24px;
  border: 1px solid #d6aa71;
  border-radius: 2px;
  background: #b87938;
  color: #fffaf1;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

#start-button:hover {
  background: #c88a47;
  transform: translateY(-1px);
}

#start-button:focus-visible {
  outline: 3px solid rgb(255 224 170 / 55%);
  outline-offset: 3px;
}

.controls-guide {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 28px 0 0;
  color: #a99d8d;
  font-size: 0.72rem;
}

.controls-guide div {
  display: grid;
  gap: 5px;
}

.controls-guide dt,
.controls-guide dd {
  margin: 0;
}

.controls-guide dd {
  color: #eee2d2;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 6px;
  height: 6px;
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 150ms ease;
  pointer-events: none;
}

.crosshair.is-visible {
  opacity: 1;
}

.lock-status {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  padding: 7px 10px;
  border-radius: 2px;
  background: rgb(18 14 11 / 64%);
  color: rgb(255 245 231 / 76%);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

noscript {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #17130f;
}

@media (max-width: 520px) {
  .controls-guide {
    gap: 15px;
  }

  .lock-status {
    display: none;
  }
}
