:root {
  --void: #070708;
  --bone: #d8d2c5;
  --ash: #7b756c;
  --iron: #8a2424;
  --hairline: rgba(216, 210, 197, 0.16);
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--bone);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

#canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 15, 14, 0.88), rgba(4, 4, 5, 0.98));
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.veil.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.veil-inner {
  max-width: 600px;
  padding: 40px 28px;
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.epigraph-top {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--ash);
  margin-bottom: 18px;
}

.veil-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  margin-bottom: 20px;
  color: var(--bone);
}

.veil-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ash);
  margin-bottom: 32px;
}

.ritual-btn {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--bone);
  padding: 13px 30px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.ritual-btn:hover {
  background: var(--iron);
  border-color: var(--iron);
  color: #fff;
}

.veil-hint {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(123, 117, 108, 0.72);
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px;
  transition: opacity 0.45s ease;
}

.hud.hidden {
  opacity: 0;
}

.hud-top, .hud-bottom {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mv-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mv-numeral {
  font-size: 28px;
  font-weight: 400;
  padding-right: 14px;
  border-right: 1px solid var(--hairline);
  color: var(--bone);
}

.mv-title {
  font-size: 15px;
  letter-spacing: 0.28em;
}

.mv-epigraph {
  font-style: italic;
  font-size: 12px;
  color: var(--ash);
  margin-top: 3px;
}

.mv-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  background: rgba(7, 7, 8, 0.7);
  border: 1px solid var(--hairline);
  color: var(--ash);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 7px 11px;
  cursor: pointer;
  transition: 0.2s;
}

.tab:hover {
  border-color: var(--bone);
  color: var(--bone);
}

.tab.active {
  border-color: var(--iron);
  color: var(--bone);
  background: rgba(138, 36, 36, 0.25);
}

.hud-bottom {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
  background: linear-gradient(to top, rgba(7, 7, 8, 0.85), transparent);
}

.controls {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.knob {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ash);
}

.knob em {
  font-style: normal;
  color: var(--bone);
  margin-left: 4px;
}

.knob input[type="range"] {
  width: 108px;
  accent-color: var(--iron);
  cursor: pointer;
}

.telemetry {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ash);
}

.telemetry strong {
  color: var(--bone);
  font-weight: 500;
}
