* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0b2a4a;
  color: #0b2a4a;
  min-height: 100vh;
}

#wrap { max-width: 1000px; margin: 0 auto; padding: 16px; }

header { text-align: center; color: #fff; padding: 8px 0 14px; position: relative; }
header h1 { font-size: 44px; letter-spacing: 4px; }
header .tag { opacity: 0.85; margin-top: 4px; }
#muteBtn {
  position: absolute; right: 0; top: 12px;
  background: rgba(255,255,255,0.15); color: #fff;
  border: 1px solid rgba(255,255,255,0.4); border-radius: 20px;
  padding: 6px 12px; cursor: pointer; font-size: 14px;
}

#stage { position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45); }
#game { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; }

#overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 42, 74, 0.35); padding: 16px;
}

.panel {
  background: rgba(255,255,255,0.96);
  border-radius: 16px; padding: 24px 28px; text-align: center;
  max-width: 560px; width: 100%;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  max-height: 100%; overflow-y: auto;
}
.panel h2 { font-size: 28px; letter-spacing: 1px; margin-bottom: 8px; }
.panel h3 { margin: 16px 0 6px; font-size: 16px; letter-spacing: 2px; }
.how { line-height: 1.55; margin-bottom: 14px; }
.fine { font-size: 12px; color: #5a6b7c; margin-top: 10px; }

button { font-family: inherit; cursor: pointer; }
.big {
  background: #2f80ed; color: #fff; border: none;
  font-size: 22px; font-weight: 800; letter-spacing: 1px;
  padding: 14px 34px; border-radius: 999px;
  box-shadow: 0 6px 0 #1b5cb8; margin: 6px 0 4px;
}
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #1b5cb8; }
#menuBtn, #saveBtn {
  background: #fff; color: #0b2a4a; border: 2px solid #2f80ed;
  font-size: 16px; font-weight: 700; padding: 10px 20px; border-radius: 999px;
}
#saveBtn:disabled { opacity: 0.55; cursor: default; }

.board { list-style: none; text-align: left; margin: 0 auto; max-width: 340px; }
.board li {
  display: flex; justify-content: space-between;
  padding: 5px 10px; border-bottom: 1px solid #e3edf5; font-size: 16px;
}
.board li:first-child { font-weight: 800; color: #b8860b; }

.score { font-size: 64px; font-weight: 900; line-height: 1.1; color: #2f80ed; }
.rank { font-weight: 700; color: #b8860b; min-height: 20px; }
.stats { display: flex; gap: 10px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.stats div {
  background: #eef6ff; border-radius: 10px; padding: 10px 14px; min-width: 105px;
}
.stats span { display: block; font-size: 12px; color: #5a6b7c; text-transform: uppercase; letter-spacing: 1px; }
.stats b { font-size: 20px; }
.saveRow { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
#initials {
  width: 90px; text-align: center; font-size: 20px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 4px;
  border: 2px solid #2f80ed; border-radius: 10px; padding: 8px;
}
.row { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 10px; }

footer { color: rgba(255,255,255,0.75); text-align: center; font-size: 13px; padding: 14px 8px; line-height: 1.5; }

@media (max-width: 640px) {
  header h1 { font-size: 32px; }
  .panel { padding: 16px; }
  .score { font-size: 48px; }
  .big { font-size: 18px; padding: 12px 24px; }
}
