* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #fff7fa;
  color: #333;
  line-height: 1.6;
}
.site-header {
  background: #f48fb1;
  color: #fff;
  text-align: center;
  padding: 20px 12px;
}
.site-header h1 { margin: 0; font-size: 22px; }
.site-header .subtitle { margin: 4px 0 0; font-size: 13px; opacity: 0.9; }
.site-header .hero-lead { margin: 14px auto 0; max-width: 520px; font-size: 17px; font-weight: bold; line-height: 1.5; }
.site-header .hero-sub { margin: 8px auto 0; max-width: 520px; font-size: 12px; line-height: 1.6; opacity: 0.95; }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
.step {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}
.hidden { display: none !important; }
h2 { font-size: 18px; margin: 0 0 12px; }
.hint { font-size: 13px; color: #666; }
.error { color: #d32f2f; font-size: 14px; min-height: 1em; }
.mt { margin-top: 28px; }

/* カレンダー */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-nav span { font-weight: bold; font-size: 16px; }
.nav-btn {
  background: #fce4ec; border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 20px; cursor: pointer; color: #c2185b;
}
.nav-btn:disabled { opacity: 0.3; cursor: default; }
table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.calendar th { font-size: 12px; color: #888; padding: 4px 0; }
table.calendar th.sun { color: #d32f2f; }
table.calendar th.sat { color: #1565c0; }
table.calendar td { padding: 2px; }
.day-cell {
  width: 100%; border: 1px solid #f8bbd0; background: #fff; border-radius: 8px;
  padding: 4px 0 3px; cursor: pointer; text-align: center; font-size: 14px; line-height: 1.25;
}
.day-cell .mark { display: block; font-size: 12px; color: #2e7d32; }
.day-cell .mark.ok { font-size: 9px; }
.day-cell .mark.few { color: #ef6c00; font-size: 10px; }
.day-cell .mark.none { color: #c62828; }
.day-cell:disabled { background: #f5f5f5; color: #bbb; cursor: default; border-color: #eee; }
.day-cell.in-range { background: #fce4ec; }
.day-cell.selected { background: #f48fb1; color: #fff; border-color: #ec407a; }
.day-cell.selected .mark { color: #fff; visibility: hidden; }
.legend { display: flex; gap: 14px; font-size: 12px; color: #666; margin: 10px 0; flex-wrap: wrap; }

/* 機種選択カード（横スワイプのカルーセル） */
.unit-cards {
  display: flex; flex-direction: row; gap: 12px; margin-top: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px 2px 10px;
}
.unit-cards::-webkit-scrollbar { display: none; }
.unit-card {
  flex: 0 0 88%; scroll-snap-align: center;
  background: #fff; border: 2px solid #f8bbd0; border-radius: 12px;
  padding: 18px 14px; cursor: pointer; text-align: center; font-family: inherit;
}
.unit-card:active { background: #fce4ec; }
.unit-card .unit-name { display: block; font-size: 20px; font-weight: bold; color: #c2185b; }
.unit-card .unit-note { display: block; font-size: 12px; color: #888; margin-top: 4px; }
.unit-card .unit-img { display: block; width: 100%; max-height: 190px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.unit-card.selected { border-color: #ec407a; background: #fff0f5; box-shadow: 0 0 0 2px #ec407a inset; }

/* 機種カルーセルの現在位置ドット */
.unit-dots { display: flex; justify-content: center; gap: 8px; margin-top: 2px; }
.unit-dot {
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%;
  background: #f8bbd0; cursor: pointer;
}
.unit-dot.active { background: #ec407a; }

/* カードリーダー説明画像への控えめな導線 */
.reader-guide { margin: 6px 0 0; }
.reader-guide a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #c2185b; text-decoration: none; }
.reader-guide .reader-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid #f8bbd0; }
.selection-box { background: #fff7fa; border: 1px dashed #f48fb1; border-radius: 8px; padding: 8px 12px; margin: 12px 0; }
.selection-box p { margin: 2px 0; font-size: 14px; }

/* 入力欄：
   枠・背景・角丸・高さはラッパー(.field-wrap)が持ち、flexで縦中央揃えにする。
   input 自体は透明・枠線なし・素の行高さ（line-height: normal）にして、
   iPhone で文字とカーソルの縦位置がずれる問題を避ける。 */
.field-label { display: block; font-size: 14px; font-weight: bold; margin: 14px 0 6px; }
.field-wrap {
  display: flex; align-items: center;
  height: 50px; padding: 0 12px;
  background: #fff; border: 1.5px solid #ddd; border-radius: 10px;
}
.field-wrap:focus-within { border-color: #f48fb1; }
.field-wrap input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-size: 16px; line-height: normal; padding: 0; margin: 0;
  -webkit-appearance: none; appearance: none;
}
.field-wrap input[type="date"] { height: auto; }

/* ボタン */
.primary-btn {
  display: block; width: 100%; margin-top: 16px;
  background: #ec407a; color: #fff; border: none; border-radius: 10px;
  padding: 14px; font-size: 16px; font-weight: bold; cursor: pointer; text-align: center;
}
.primary-btn:disabled { background: #ccc; cursor: default; }
.primary-btn.small { width: auto; padding: 10px 18px; font-size: 14px; margin-top: 0; }
.secondary-btn {
  background: #fff; color: #ec407a; border: 1.5px solid #ec407a; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: bold; cursor: pointer;
}
.link-btn { text-decoration: none; }
.text-btn {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: #c2185b; font-size: 14px; cursor: pointer; text-decoration: underline;
}
a.text-btn { text-align: center; }
.row-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* オプション選択（予約フォーム） */
.option-group { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px; }
.option-group label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.option-group input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: #ec407a; }

/* 安心プランの詳細（タップで開く・初期は閉じている） */
.anshin-details { margin: 4px 0 10px; }
.anshin-details summary {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: bold; color: #c2185b;
  cursor: pointer; list-style: none; padding: 6px 0;
  -webkit-tap-highlight-color: transparent;
}
.anshin-details summary::-webkit-details-marker { display: none; }
.anshin-details summary::after { content: "▾"; font-size: 12px; }
.anshin-details[open ] summary::after { content: "▴"; }
.anshin-body {
  background: #fff7fa; border: 1px solid #f8bbd0; border-radius: 8px;
  padding: 12px 16px; margin-top: 4px; font-size: 14px;
}
.anshin-body p { margin: 6px 0; }
.anshin-body .anshin-kicker { font-size: 12px; color: #888; margin: 0; }
.anshin-title { font-size: 16px; color: #c2185b; margin: 2px 0 8px; }
.anshin-body h4 { font-size: 14px; color: #c2185b; margin: 12px 0 4px; }
.anshin-body ul { margin: 4px 0; padding-left: 22px; }
.anshin-body li { margin: 3px 0; }
.anshin-body .anshin-note { font-size: 13px; color: #666; }

/* よくある質問（FAQページ） */
.faq-item summary { font-size: 15px; }

/* 確認画面 */
.confirm-list { display: grid; grid-template-columns: 110px 1fr; row-gap: 8px; margin: 0; }
.confirm-list dt { font-weight: bold; color: #666; font-size: 14px; }
.confirm-list dd { margin: 0; font-size: 14px; word-break: break-all; }

/* 管理画面 */
.reservation-card {
  border: 1px solid #f8bbd0; border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.reservation-card.cancelled { opacity: 0.55; background: #fafafa; }
.reservation-card p { margin: 2px 0; font-size: 14px; }
.reservation-card .dates { font-weight: bold; font-size: 15px; }
.badge { display: inline-block; font-size: 11px; border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.badge.ok { background: #e8f5e9; color: #2e7d32; }
.badge.ng { background: #ffebee; color: #c62828; }
.badge.cancel { background: #eee; color: #666; }
.badge.info { background: #e3f2fd; color: #1565c0; }
.badge.urgent { background: #e65100; color: #fff; font-weight: bold; }
.badge.overdue { background: #c62828; color: #fff; font-weight: bold; }
.stats-box { background: #fff7fa; border: 1px solid #f8bbd0; border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.stats-box p { margin: 4px 0; font-size: 14px; }
.unit-label { font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.unit-label select { font-size: 14px; padding: 4px 6px; border-radius: 6px; }

footer { text-align: center; padding: 20px; font-size: 13px; }
footer a { color: #999; }
.license-info { color: #888; font-size: 12px; line-height: 1.6; margin: 0 0 10px; }
.legal-links { margin: 0 0 10px; font-size: 13px; }
.legal-links a { color: #666; }

/* 特定商取引法に基づく表記 */
.tokushoho-list { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 10px; row-gap: 12px; margin: 0; text-align: left; }
.tokushoho-list dt { font-weight: bold; color: #666; font-size: 14px; }
.tokushoho-list dd { margin: 0; font-size: 14px; line-height: 1.6; min-width: 0; overflow-wrap: anywhere; }

/* 予約番号・キャンセル */
.code-label { text-align: center; font-size: 13px; color: #666; }
.booking-code {
  font-size: 30px; font-weight: bold; letter-spacing: 4px;
  text-align: center; color: #c2185b; margin: 2px 0 6px !important;
}
.cancel-link { text-align: center; margin-top: 14px; font-size: 14px; }
#input-code { text-transform: uppercase; letter-spacing: 2px; }

/* 利用規約ページ・同意チェック */
.terms-body h2 { margin-top: 26px; }
.terms-body p { margin: 8px 0; }
.terms-body ul { margin: 8px 0; padding-left: 22px; }
.terms-agree { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 14px; cursor: pointer; }
.terms-agree input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: #ec407a; }
.terms-consent { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f8bbd0; }

/* トップページの利用規約ボックス（スクロールで最後まで読むと同意できる） */
.terms-scroll-box {
  height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border: 1.5px solid #ddd; border-radius: 10px;
  padding: 6px 14px; margin-top: 10px; background: #fff;
}
.terms-scroll-box .terms-body h2 { font-size: 16px; }
/* 規約の末尾センチネル（最後まで読んだかの判定用） */
#terms-end-sentinel { height: 1px; }

/* 料金ページ */
.price-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.price-table th, .price-table td { border: 1px solid #f8bbd0; padding: 10px 12px; font-size: 15px; }
.price-table th { background: #fff7fa; text-align: left; font-weight: bold; }
.price-table td { text-align: right; font-weight: bold; color: #c2185b; white-space: nowrap; }
.shipping-free-box {
  background: #e8f5e9; border: 2px solid #43a047; border-radius: 10px;
  padding: 12px 14px; margin: 12px 0;
}
.shipping-free-box p { margin: 0; font-size: 14px; }
.shipping-free-box .shipping-free-title { font-size: 17px; font-weight: bold; color: #2e7d32; margin-bottom: 6px; }
.set-list { margin: 8px 0; padding-left: 22px; }
.set-list li { margin: 4px 0; font-size: 14px; }
.notify-form { background: #fff7fa; border: 1px solid #f8bbd0; border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.notify-form h3 { margin: 0 0 6px; font-size: 16px; color: #c2185b; }
.set-contents-box { background: #fff7fa; border: 1px solid #f8bbd0; border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.set-contents-box h3 { margin: 0 0 6px; font-size: 16px; color: #c2185b; }
.set-contents-box .set-list { margin: 4px 0; }

/* 決済未完了の注意書き（予約完了画面） */
.payment-warning {
  background: #fff8e1; border: 2px solid #f9a825; border-radius: 10px;
  padding: 12px 14px; margin: 14px 0; text-align: left;
}
.payment-warning p { margin: 0; font-size: 14px; }
.payment-warning .payment-warning-title { font-size: 17px; font-weight: bold; color: #c62828; margin-bottom: 6px; }
