:root {
  --bg: #F0ECE2;
  --bg-edge: #E2D9C7;
  --ink: #5E584E;
  --ink-soft: #9A9285;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 45%, var(--bg) 0%, var(--bg) 35%, var(--bg-edge) 100%);
  background-color: var(--bg);
  color: var(--ink);
  font: 12px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.08em;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
body.aiming canvas { cursor: none; }
.mark { position: fixed; left: 0; right: 0; bottom: 24px; text-align: center; pointer-events: none; z-index: 1; }
.mark span {
  display: inline-block; padding: 8px 14px; color: var(--ink-soft); pointer-events: auto; cursor: default;
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.mark span:hover {
  color: #3a352d;
  text-shadow: 0 0 3px #fff, 0 0 9px rgba(255, 250, 235, 1), 0 0 18px rgba(226, 166, 72, 0.9), 0 0 34px rgba(226, 166, 72, 0.65);
}
.hud {
  position: fixed; left: 0; right: 0; top: 24px; text-align: center; color: var(--ink-soft);
  font-size: 11px; pointer-events: none; z-index: 1; transition: opacity 0.4s ease;
}
.hud b { color: var(--ink); font-weight: 500; }
/* points: big, faint, scanlined numerals sitting back in the haze */
/* plain translucent text with a scanline mask (not background-clip text, which some browsers drop) */
.score { position: fixed; left: 32px; top: 16px; pointer-events: none; z-index: 1; visibility: hidden; white-space: nowrap; }
.score b {
  display: inline-block; font: 200 clamp(72px, 11vw, 136px)/1 "Inter", -apple-system, sans-serif;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  color: rgba(58, 53, 45, 0.5);
  text-shadow: 0 0 18px rgba(58, 53, 45, 0.18);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 2px, rgba(0, 0, 0, 0.5) 2px 4px);
  mask-image: repeating-linear-gradient(180deg, #000 0 2px, rgba(0, 0, 0, 0.5) 2px 4px);
  filter: blur(0.5px); transition: filter 0.4s ease, color 0.4s ease;
}
.score.ticking b { filter: blur(0); color: rgba(58, 53, 45, 0.66); }
.score span {
  margin-left: 10px; vertical-align: top; position: relative; top: 16px;
  font: 300 11px/1 "Inter", sans-serif; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-soft);
}
.score i {
  position: absolute; left: 100%; top: 44px; margin-left: 14px; opacity: 0;
  font: 300 22px/1 "Inter", sans-serif; font-style: normal; letter-spacing: 0.06em; color: var(--ink);
}
.reticle {
  position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.2s ease;
}
body.aiming .reticle { opacity: 1; }
.yards { position: fixed; left: 0; right: 0; top: 0; height: 0; pointer-events: none; z-index: 1; visibility: hidden; }
.yd {
  position: absolute; transform: translateX(-50%); white-space: nowrap;
  font: 300 11px/1 "Inter", -apple-system, "Helvetica Neue", sans-serif; letter-spacing: 0.14em;
  color: var(--ink);
}
.yd span { margin-left: 3px; font-size: 9px; color: var(--ink-soft); letter-spacing: 0.1em; }

/* holster: the touch-friendly way out of aiming (esc still works on desktop) */
.holster {
  position: fixed; right: 18px; top: 18px; z-index: 3; display: none;
  font: 300 11px/1 "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); background: rgba(240, 236, 226, 0.6); border: 1px solid rgba(94, 88, 78, 0.3);
  border-radius: 999px; padding: 9px 14px; cursor: pointer;
}
body.aiming .holster { display: block; }

html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }

@media (pointer: coarse) {
  .reticle { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}
@media (max-width: 640px) {
  .score { left: 16px; top: 10px; }
  .score i { top: 34px; font-size: 18px; }
  .hud { top: auto; bottom: calc(56px + env(safe-area-inset-bottom)); padding: 0 16px; font-size: 10px; line-height: 1.5; }
  .mark { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .yd { font-size: 10px; letter-spacing: 0.08em; }
  .yd span { font-size: 8px; margin-left: 2px; }
}
