:root {
  --ink: #e9dcc0;
  --gold: #d9b566;
  --dim: rgba(233, 220, 192, 0.6);
  --bg: #07080d;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
#c {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(255, 240, 210, 0.55);
  box-shadow: 0 0 6px rgba(255, 210, 140, 0.5);
  transition: all 0.15s ease;
}
#crosshair.active {
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  background: transparent;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 10px rgba(255, 200, 110, 0.7);
}
#crosshair.held {
  opacity: 0.25;
}
#hint {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--dim);
  text-shadow: 0 0 8px #000, 0 0 2px #000;
  white-space: nowrap;
}
#hint b {
  color: var(--gold);
  font-family: 'IM Fell English SC', serif;
  font-weight: normal;
  padding: 0 2px;
}
#toast {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.6s ease;
}
#toast.show {
  opacity: 1;
}
#where {
  position: absolute;
  left: 22px;
  bottom: 18px;
  font-family: 'IM Fell English SC', serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: rgba(233, 220, 192, 0.42);
}
#fps {
  position: absolute;
  right: 16px;
  top: 12px;
  font: 12px monospace;
  color: rgba(233, 220, 192, 0.4);
}
#menu,
#nogpu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(8, 9, 14, 0.35) 0%, rgba(4, 4, 8, 0.88) 75%);
  backdrop-filter: blur(2px);
  transition: opacity 0.8s ease;
  padding: 16px;
}
#menu.hidden {
  opacity: 0;
  pointer-events: none;
}
.panel {
  max-width: 640px;
  text-align: center;
}
.orn {
  font-size: 34px;
  color: var(--gold);
  opacity: 0.8;
}
h1 {
  font-family: 'UnifrakturMaguntia', 'IM Fell English', serif;
  font-weight: normal;
  font-size: clamp(34px, 6vw, 62px);
  margin: 8px 0 18px;
  color: #f1e3c2;
  text-shadow: 0 0 30px rgba(255, 190, 100, 0.35);
}
.quote {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.45;
  color: var(--dim);
  margin: 0 auto;
  max-width: 540px;
}
.author {
  font-family: 'IM Fell English SC', serif;
  color: rgba(217, 181, 102, 0.75);
  margin: 8px 0 26px;
}
#progress {
  width: 260px;
  height: 2px;
  margin: 0 auto 10px;
  background: rgba(233, 220, 192, 0.12);
  overflow: hidden;
}
#bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7a5a24, var(--gold));
  transition: width 0.2s ease;
}
#status {
  font-size: 15px;
  color: rgba(233, 220, 192, 0.45);
  font-style: italic;
  min-height: 20px;
  margin-bottom: 18px;
}
button#enter {
  font-family: 'IM Fell English SC', serif;
  font-size: 22px;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(217, 181, 102, 0.5);
  padding: 10px 44px;
  cursor: pointer;
  transition: all 0.3s ease;
}
button#enter:disabled {
  opacity: 0.25;
  cursor: wait;
}
button#enter:not(:disabled):hover {
  background: rgba(217, 181, 102, 0.1);
  box-shadow: 0 0 24px rgba(217, 181, 102, 0.25);
}
.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  margin: 28px auto 0;
  max-width: 520px;
  font-size: 15px;
  color: rgba(233, 220, 192, 0.55);
  text-align: left;
}
.controls b {
  color: rgba(217, 181, 102, 0.85);
  font-weight: 500;
}
.note {
  margin-top: 22px;
  font-size: 14px;
  font-style: italic;
  color: rgba(233, 220, 192, 0.35);
}
@media (max-width: 560px) {
  .controls {
    grid-template-columns: 1fr;
  }
}
[hidden] {
  display: none !important;
}
#dialog {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  padding: 18px 26px 14px;
  background: linear-gradient(180deg, rgba(8, 14, 26, 0.78), rgba(6, 8, 14, 0.88));
  border: 1px solid rgba(143, 214, 255, 0.28);
  box-shadow: 0 0 40px rgba(90, 180, 255, 0.12), inset 0 0 30px rgba(90, 180, 255, 0.06);
  backdrop-filter: blur(3px);
}
#dname {
  font-family: 'IM Fell English SC', serif;
  letter-spacing: 0.12em;
  color: #9fdcff;
  font-size: 16px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px rgba(120, 200, 255, 0.5);
}
#dtext {
  font-family: 'IM Fell English', serif;
  font-size: 21px;
  line-height: 1.45;
  color: #efe4cc;
  min-height: 62px;
}
#dprompt {
  margin-top: 8px;
  text-align: right;
  font-size: 15px;
  color: rgba(233, 220, 192, 0.5);
}
#dprompt b {
  color: var(--gold);
  font-family: 'IM Fell English SC', serif;
  font-weight: normal;
}
#quest {
  position: absolute;
  left: 22px;
  top: 18px;
  max-width: 420px;
  font-size: 17px;
  color: rgba(239, 228, 204, 0.85);
  text-shadow: 0 0 8px #000;
  line-height: 1.35;
}
#quest .qh {
  font-family: 'IM Fell English SC', serif;
  color: #9fdcff;
  letter-spacing: 0.08em;
}
#quest i {
  color: rgba(233, 220, 192, 0.5);
  font-size: 15px;
}
#biome {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}
#biome.show {
  opacity: 1;
}
#biome .bn {
  font-family: 'UnifrakturMaguntia', serif;
  font-size: clamp(34px, 5vw, 58px);
  color: #f1e3c2;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 200, 120, 0.3);
}
#biome .bs {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 20px;
  color: rgba(233, 220, 192, 0.7);
  text-shadow: 0 0 12px #000;
  margin-top: 6px;
}
