.form-card {
  background: white;
  padding: 32px;
  border-radius: 8px;
  max-width: 420px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: #555;
}

input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 15px;
  box-sizing: border-box;
  margin-bottom: 18px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #1e6fff;
}

button[type="submit"] {
  width: 100%;
  padding: 11px;
  background: #1e6fff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: #1558d6;
}

#grid {
  display: grid;
  grid-template-columns: repeat(3, 140px);
  grid-template-rows: repeat(3, 140px);
  gap: 2px;
  width: max-content;
  background: #cccccc;
  padding: 2px;
  margin: 0 auto;
}

.cell {
  width: 140px;
  height: 140px;
  overflow: hidden;
  background: white;
  box-sizing: border-box;
}

.cell.drag-over {
  outline: 3px solid #1e6fff;
  outline-offset: -3px;
}

.cell canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  user-select: none;
}

#message {
  margin-top: 14px;
  min-height: 28px;
  font-size: 22px;
  font-weight: bold;
  color: green;
}

.success-box {
  background: #e6f9ee;
  border: 1px solid #4caf50;
  border-radius: 6px;
  padding: 18px 22px;
  color: #2e7d32;
  margin-top: 24px;
}

#captcha-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#captcha-overlay.active {
  display: flex;
}

#captcha-box {
  background: white;
  padding: 28px 32px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  text-align: center;
}

#captcha-box p.hint {
  margin: 0 0 14px;
  color: #666;
  font-size: 14px;
}

#captcha-cancel {
  margin-top: 14px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

#grid img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}
