* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1030; touch-action: none; user-select: none; -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: fixed; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.rbtn { width: 48px; height: 48px; border: 0; border-radius: 24px; background: #FF8A3D; color: #fff; font-size: 28px;
  box-shadow: 0 3px 0 #c75f1c; display: flex; align-items: center; justify-content: center; padding: 0; }
.rbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #c75f1c; }
.ammo { display: flex; gap: 5px; align-items: center; background: rgba(255,255,255,.18); padding: 7px 14px; border-radius: 22px;
  color: #fff; font-weight: 700; font-size: 16px; min-height: 40px; }
.ammo .rk { width: 10px; height: 24px; border-radius: 5px 5px 2px 2px; background: #FF8A3D; box-shadow: 0 0 6px #ffb37a; }
.ammo .rk.off { background: rgba(255,255,255,.25); box-shadow: none; }
.lvtag { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 66px); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75);
  font-size: 13px; pointer-events: none; }
.mask { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(5,8,30,.62); }
.mask.show { display: flex; }
.panel { width: 80%; max-width: 340px; background: #FFF6E8; border-radius: 24px; padding: 22px 18px 18px; text-align: center; color: #3a2410;
  box-shadow: 0 6px 0 #c75f1c; max-height: 86%; overflow-y: auto; }
.panel h2 { margin: 0 0 10px; font-size: 28px; }
.tip { margin: 0 0 6px; font-size: 14px; line-height: 1.6; color: #7a5a3c; }
.btn { display: block; width: 100%; margin-top: 12px; padding: 14px 0; border: 0; border-radius: 16px; font-size: 18px; font-weight: 700;
  color: #fff; background: #FF8A3D; box-shadow: 0 3px 0 #c75f1c; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #c75f1c; }
.btn.alt { background: #9a8a7a; box-shadow: 0 3px 0 #6b5d50; }
.btn[disabled] { opacity: .45; }
.stars { font-size: 40px; letter-spacing: 6px; color: #FFC93C; margin: 4px 0 6px; }
.stars .off { color: #d9cbb8; }
.lvgrid { display: none; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.lvgrid.show { display: grid; }
.lvgrid button { border: 0; border-radius: 12px; padding: 10px 0; font-size: 16px; font-weight: 700; background: #FFE2C4; color: #7a3d10; }
.lvgrid button.lock { opacity: .4; }
.lvgrid small { display: block; font-size: 11px; color: #e0a020; }

/* Keep the existing overlays readable against the supplied space artwork. */
.ammo { background: rgba(7,17,43,.88); border: 1px solid rgba(114,231,255,.45); font-variant-numeric: tabular-nums; }
.lvtag { color: #e0f5ff; text-shadow: 0 1px 4px #07112b; }
.stars { font-size: 18px; letter-spacing: 0; line-height: 1.6; color: #a4551e; }
.lvgrid.show { grid-template-columns: repeat(3,minmax(0,1fr)); }
.lvgrid button { min-height: 44px; cursor: pointer; }
.btn, .rbtn { cursor: pointer; }
button:focus-visible { outline: 3px solid #68dfff; outline-offset: 3px; }
