body {
  font-family: sans-serif;
  background: #FFF8E1;
  margin: 0;
  padding: 16px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

h1 {
  margin-top: 0;
  color: #BF360C;
  font-size: 24px;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: bold;
}

input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 12px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 10px;
}

button {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 20px;
  font-weight: bold;
  color: white;
  background: #C62828;
  border: none;
  border-radius: 12px;
}

.preview {
  margin-top: 12px;
  text-align: center;
}

.preview img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
}

.message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  display: none;
  white-space: pre-wrap;
  background: #E3F2FD;
  color: #0D47A1;
}

/* ✅ スキャナーモーダル */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modalContent {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modalTitle {
  font-weight: 800;
  color: #BF360C;
}

.smallBtn {
  width: auto;
  margin-top: 0;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 10px;
}

#video {
  width: 100%;
  border-radius: 14px;
  background: #000;
}

.hint {
  margin-top: 10px;
  font-size: 14px;
  color: #444;
}