* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d1117; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
canvas { display: block; }

#overlay {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(10, 14, 20, 0.55); backdrop-filter: blur(4px); z-index: 10; padding: 16px;
}
#overlay.hidden { display: none; }
.card {
  background: #f7f3ec; color: #2b2620; border-radius: 14px; padding: 28px 32px;
  max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.card h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.5px; }
.sub { margin: 0 0 20px; color: #6b6156; line-height: 1.45; }
#start {
  width: 100%; padding: 12px; font-size: 16px; font-weight: 600; border: 0; border-radius: 10px;
  background: #b5523b; color: #fff; cursor: pointer;
}
#start:hover { background: #9c4430; }
.keys { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; font-size: 14px; color: #4a423a; }
kbd {
  display: inline-block; min-width: 24px; padding: 2px 6px; margin-right: 4px; text-align: center;
  background: #fff; border: 1px solid #d6cdbf; border-bottom-width: 2px; border-radius: 5px; font-family: inherit; font-size: 12px;
}

#crosshair {
  position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none;
}
#room {
  position: fixed; top: 16px; left: 16px; padding: 6px 12px; border-radius: 8px;
  background: rgba(0,0,0,.45); color: #fff; font-size: 15px; font-weight: 600; pointer-events: none;
}
#hint {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; pointer-events: none; display: none;
}
