:root {
  --hud-bg: rgba(0, 0, 0, 0.75);
  --panel-bg: rgba(15, 19, 36, 0.95);
  --text: #f5f6fa;
  --accent: #f9ca24;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: #111;
  color: var(--text);
}
#game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}
#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: manipulation;
}
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(180deg, var(--hud-bg), transparent);
  z-index: 2;
}
.hud-item {
  font-size: clamp(14px, 2.8vw, 20px);
  font-weight: 700;
}
.panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 520px);
  padding: 20px;
  background: var(--panel-bg);
  border: 2px solid var(--accent);
}
.panel .big {
  font-size: clamp(26px, 5vw, 42px);
  margin: 10px 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
button,
input {
  border-radius: 0;
}
button {
  border: 2px solid #fff;
  background: #0e1024;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  min-height: 48px;
  padding: 0 16px;
}
#share-fallback {
  margin-top: 12px;
}
#share-url {
  width: 100%;
  border: 2px solid #8f95aa;
  min-height: 42px;
  padding: 8px;
  margin: 6px 0;
}
#share-preview {
  width: 100%;
  border: 1px solid #fff;
  margin-bottom: 10px;
}
.hidden {
  display: none;
}
