/* ノベルティ申込フォーム */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  background: #f5f0eb;
  color: #333;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ヘッダー */
.header {
  text-align: center;
  padding: 32px 0 24px;
}
.header h1 {
  font-size: 28px;
  color: #8b6f5e;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.header .subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}
.header .notice {
  font-size: 13px;
  color: #c0392b;
}

/* ローディング */
.loading {
  text-align: center;
  padding: 60px 0;
  color: #888;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #8b6f5e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* メッセージボックス */
.message-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.message-box.error {
  border-left: 4px solid #c0392b;
}
.message-box h2 {
  font-size: 18px;
  color: #c0392b;
  margin-bottom: 12px;
}
.message-box p {
  font-size: 14px;
  color: #666;
}

/* フォームセクション */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.required {
  color: #c0392b;
  font-weight: 700;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  line-height: 1.6;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
  background: #fff;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: #8b6f5e;
  box-shadow: 0 0 0 3px rgba(139,111,94,0.1);
}
.form-input.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.form-input.valid {
  border-color: #27ae60;
}

/* 注文番号ステータス */
.input-with-status {
  position: relative;
}
.input-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

.field-error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 6px;
}

/* ラジオ・チェックボックス */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radio-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}
.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 0;
}
.radio-label input, .checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: #8b6f5e;
}

/* ノベルティ選択グリッド */
.novelty-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.novelty-card {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}
.novelty-card:hover {
  border-color: #8b6f5e;
  background: #faf8f6;
}
.novelty-card.selected {
  border-color: #8b6f5e;
  background: #f5ede8;
  box-shadow: 0 0 0 3px rgba(139,111,94,0.15);
}
.novelty-card.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
}
.novelty-card.out-of-stock:hover {
  border-color: #e0e0e0;
  background: transparent;
}
.novelty-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.novelty-card-info {
  flex: 1;
}
.novelty-card-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.novelty-card-stock {
  font-size: 12px;
  color: #c0392b;
}

/* 生年月日 */
.date-selects {
  display: flex;
  gap: 8px;
}
.date-selects .form-select {
  flex: 1;
}

/* 郵便番号行 */
.zip-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.zip-input {
  flex: 1;
  max-width: 200px;
}

/* レビュー投稿方法リンク */
.review-links {
  font-size: 14px;
  line-height: 1.8;
}
.review-links a {
  color: #2980b9;
  text-decoration: none;
}
.review-links a:hover {
  text-decoration: underline;
}

/* 確認事項 */
.confirmation-notes {
  background: #fffdf5;
  border: 1px solid #f0e6c0;
}
.notes-content {
  font-size: 13px;
  color: #555;
}
.notes-content p {
  margin-bottom: 14px;
}
.notes-content a {
  color: #2980b9;
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: #8b6f5e;
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: #7a5f4f;
}
.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.btn-secondary {
  background: #e0e0e0;
  color: #333;
}
.btn-secondary:hover {
  background: #d0d0d0;
}
.btn-small {
  padding: 10px 16px;
  font-size: 14px;
}
.btn-full {
  width: 100%;
  margin-top: 8px;
}

/* 確認画面 */
.confirm-table {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.confirm-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 0;
}
.confirm-row:last-child {
  border-bottom: none;
}
.confirm-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: #888;
  padding-top: 2px;
}
.confirm-value {
  flex: 1;
  font-size: 15px;
}
.confirm-buttons {
  display: flex;
  gap: 12px;
}
.confirm-buttons .btn {
  flex: 1;
}

/* 完了画面 */
.complete-box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.complete-box h2 {
  font-size: 20px;
  color: #27ae60;
  margin-bottom: 16px;
}
.complete-box p {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}
.complete-note {
  font-size: 13px;
  color: #888;
  margin-top: 16px;
}

/* エラーメッセージ */
.form-error {
  color: #c0392b;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  background: #fdf0ef;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* フッター */
.footer {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: #aaa;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .container { padding: 12px 12px 32px; }
  .header h1 { font-size: 24px; }
  .novelty-card img { width: 80px; height: 80px; }
  .confirm-label { width: 100px; font-size: 12px; }
  .notes-content { font-size: 12px; }
}
