body {
  background: #000;
  color: #fff;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 10px;
  overflow-x: hidden;
}

.nav ul{
  list-style: none;
  padding: 0;
  margin: 8px 0 14px;
  display: flex;
  gap: 14px;
  justify-content: center;
}

.nav a{
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #111;
}

.nav a:hover{ background:#1a1a1a; }

input {
  background: #222;
  color: #fff;
  border: 1px solid #555;
  padding: 10px;
  margin: 6px 0;
  border-radius: 6px;
  text-align: center;
  width: min(420px, 92vw);
  box-sizing: border-box;
}

canvas {
  margin: 10px auto;
  display: block;
  max-width: min(600px, 94vw);
  height: auto;
}

#scoreDisplay {
  font-size: 18px;
  margin: 15px auto;
  line-height: 1.4;
}

button {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #555;
  background: #282828;
  color: #fff;
}

button:hover { background: #303030; }

.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.overlay__card{
  width: min(520px, 92vw);
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 20px;
  box-sizing: border-box;
}

.hint{
  margin-top: 10px;
  color: #bbb;
  font-size: 13px;
}

#fireworksCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
  z-index: 9999;
}

.toolbar{
  margin: 10px 0 16px;
}

.table{
  margin: 0 auto;
  border-collapse: collapse;
  min-width: min(900px, 96vw);
  max-width: 96vw;
}

.table th, .table td{
  border: 1px solid #444;
  padding: 8px;
}

.table th{
  background: #111;
}

.table td{
  background: #0b0b0b;
}

.muted{ color:#bbb; }
.error{
  color:#ff8080;
  white-space: pre-wrap;
  text-align:left;
  max-width: 1000px;
  margin: 0 auto;
}