* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1a1410; font-family: system-ui, sans-serif; }
#game { display: block; width: 100%; height: 100%; }
.hidden { display: none !important; }
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a1d12, #4a2f1a); z-index: 10; }
.panel { background: rgba(0,0,0,.45); border: 1px solid rgba(255,210,150,.25); border-radius: 18px;
  padding: 40px 48px; text-align: center; backdrop-filter: blur(8px); color: #fff; max-width: 520px; }
.title { font-size: 52px; letter-spacing: 4px; color: #ffd98a; text-shadow: 0 0 24px rgba(255,180,90,.6); }
.subtitle { margin: 10px 0 28px; color: #ffcf9e; }
.btn-primary { font-size: 20px; font-weight: 700; color: #3a230f; background: linear-gradient(135deg,#ffd98a,#ff9d57);
  border: none; border-radius: 14px; padding: 14px 40px; cursor: pointer; transition: transform .15s; display: block; width: 100%; }
.btn-primary:hover { transform: scale(1.05); }
.controls { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin-top: 26px; font-size: 13px; color: #e8d3b8; text-align: left; }
.controls span:nth-child(odd) { font-weight: 700; color: #ffd98a; }
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
#hud-speed { position: absolute; left: 18px; bottom: 16px; font-size: 30px; font-weight: 800; }
#hud-speed small { font-size: 12px; font-weight: 600; margin-left: 4px; }
#hud-discovery { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.4); padding: 6px 14px; border-radius: 20px; font-weight: 700; }
#hud-time { position: absolute; top: 14px; right: 16px; background: rgba(0,0,0,.4); padding: 6px 14px; border-radius: 20px; color: #ffe2a8; font-weight: 700; }
#hud-collect { position: absolute; top: 50px; right: 16px; background: rgba(0,0,0,.4); padding: 6px 14px; border-radius: 20px; color: #7fe9ff; font-weight: 700; }
#hud-pointer { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 13px; }
#hud-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; opacity: .75; }
.toast { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 8;
  background: rgba(0,0,0,.6); color: #ffe2a8; padding: 12px 22px; border-radius: 12px; font-weight: 700;
  transition: opacity .4s; pointer-events: none; }
