/* pages.css — ページ固有の細かいスタイル */

.page-header {
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-header__step {
  font-size: var(--fs-textsp);
  color: var(--color-gray-text);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  line-height: 1;
  letter-spacing: 0.05em;
}

.page-header__step .material-symbols-outlined {
  display: none;
}

.page-header__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-black);
  margin: 0;
  line-height: 1.4;
}

/* 案内テキスト */
.guide-text {
  font-size: 16px;
  color: var(--color-text);
  border-radius: 8px;
  margin-bottom: 12px;
  line-height: 2;
  letter-spacing: .02em;
  padding-bottom: 20px;
}

@media (min-width: 460px) {
  .page-header__step {
  font-size: var(--fs-textpc);
  }
}

@media (min-width: 460px) {
  .guide-text {
    padding: 20px 40px;
  }
}

/* 大きくプレビューボタン */
.btn-large-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  margin: 0 auto 12px;
  transition: border-color .2s;
  background: var(--color-primary);
}

.btn-large-preview:hover {
  border-color: var(--color-orange);
}

.btn-large-preview .material-symbols-outlined {
  font-size: 16px;
}

/* 空データ表示（共通） */
.empty-note {
  color: #999;
  text-align: center;
  padding: 20px;
}

/* ========== STEP1: 挨拶状作成（テンプレート差分） ========== */
.template-card__preview>div:last-child {
  font-size: 10px;
  margin-top: 4px;
  color: #778;
}

.template-card[data-template="シンプルB"] .template-card__preview {
  background: linear-gradient(160deg, #f5ece0, #faf5ee);
}

.template-card[data-template="シンプルB"] .template-card__preview-title {
  color: #664;
}

.template-card[data-template="シンプルB"] .template-card__preview-sub {
  color: #887;
}

.template-card[data-template="シンプルB"] .template-card__preview-circle {
  background: linear-gradient(135deg, #d4b89a, #b8957a);
}

.template-card[data-template="シンプルB"] .template-card__preview>div:last-child {
  color: #887;
}

.template-card[data-template="フォーマルA"] .template-card__preview {
  background: linear-gradient(160deg, #e8e8e8, #f8f8f8);
}

.template-card[data-template="フォーマルA"] .template-card__preview-title {
  color: #222;
}

.template-card[data-template="フォーマルA"] .template-card__preview-sub {
  color: #555;
}

.template-card[data-template="フォーマルA"] .template-card__preview-circle {
  background: linear-gradient(135deg, #888, #555);
}

.template-card[data-template="フォーマルA"] .template-card__preview>div:last-child {
  color: #666;
}

.template-card[data-template="シンプルC"] .template-card__preview {
  background: #fff;
  border: 1px solid #eee;
}

.template-card[data-template="シンプルC"] .template-card__preview-title {
  color: #334;
}

.template-card[data-template="シンプルC"] .template-card__preview-sub {
  color: #889;
}

.template-card[data-template="シンプルC"] .template-card__preview-circle {
  background: linear-gradient(135deg, #aaa, #888);
}

.template-card[data-template="シンプルC"] .template-card__preview>div:last-child {
  color: #889;
}

/* 生まれた年〜没年 */
.years-body .form-row {
  align-items: center;
}

.years-body .form-row>span {
  text-align: center;
  white-space: nowrap;
  font-weight: 700;
  flex: 0 0 auto;
}

/* ストーリー：コメント欄の高さ */
.story-item__right textarea.form-textarea {
  min-height: 80px;
}

/* 日付/ご逝去日：行レイアウト */
.date-body .form-row,
.death-body .form-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.date-body .form-row>span,
.death-body .form-row>span {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ===== Inline validation (error state) ===== */
.form-input.is-error,
.form-textarea.is-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.15);
  background: rgba(217, 48, 37, 0.04);
}


.uploader-box.is-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.15);
  background: rgba(217, 48, 37, 0.04);
}

.field-error {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #d93025;
}

.field-error:empty {
  display: none;
}




#date-era,
#death-era {
  max-width: 80px;
}

#date-year,
#date-month,
#date-day,
#death-year,
#death-month,
#death-day {
  max-width: 60px;
}

/* 写真共有リクエスト説明文 */
.photoshare-body p {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  padding: 0 10px;
}

/* CTA（STEP1） */
#js-to-preview {
  display: block;
  width: min(420px, 92%);
  margin: 16px auto 0;
}

/* ========== STEP1: プレビュー ========== */


.preview-mock__story-grid .preview-mock__story-img:nth-child(2) {
  background: linear-gradient(135deg, #c5d0db, #a8b8c5);
}

.preview-mock__story-grid .preview-mock__story-img:nth-child(3) {
  background: linear-gradient(135deg, #c8c0b0, #b0a890);
}

.preview-mock__story-grid .preview-mock__story-img:nth-child(4) {
  background: linear-gradient(135deg, #b8c8d0, #98a8b0);
}

.preview-mock__story-grid+div {
  font-size: 12px;
  color: #667;
  text-align: left;
  margin: 10px 0;
  line-height: 1.8;
}

.btn-upload-photo .material-symbols-outlined {
  vertical-align: middle;
  font-size: 16px;
}

.gift-category>p {
  font-size: 12px;
  color: #667;
  margin-bottom: 10px;
  text-align: center;
}

.gift-category .btn-outline {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
}



/* ========== STEP2: コース選択 ========== */
.course-count {
  color: var(--color-orange);
  font-size: 12px;
}

.course-examples-label {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}

.course-added-note {
  display: flex;
  color: var(--color-green);
  font-size: 13px;
  margin-top: 8px;
  justify-content: right;
}

/* ========== STEP4: 注文確認（サムネ） ========== */
#js-greeting-thumb>div:nth-child(1) {
  font-size: 18px;
  font-weight: 700;
  color: #334;
  margin-bottom: 6px;
}

#js-greeting-thumb>div:nth-child(2) {
  font-size: 11px;
  font-style: italic;
  color: #667;
  margin-bottom: 10px;
}

#js-greeting-thumb>div:nth-child(3) {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ccc, #999);
  margin: 0 auto 8px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

#thumb-name {
  font-size: 13px;
  font-weight: 700;
  color: #334;
}

#thumb-years {
  font-size: 11px;
  color: #778;
}

/* ========== STEP5: 注文者情報/決済 ========== */
#orderer-postal {
  margin-bottom: 8px;
}

#js-to-complete {
  background: var(--color-red);
}

#js-to-complete+.note-text {
  text-align: center;
  margin-top: 8px;
}

/* ========== STEP6: 完了/URL発行 ========== */
.complete-top>div:first-child {
  font-size: 32px;
  margin-bottom: 8px;
}

.btn-copy .material-symbols-outlined {
  vertical-align: middle;
  font-size: 16px;
}

.btn-line span {
  font-weight: 700;
}

/* 写真アップロードボタン（プレビューページ） */
.btn-upload-photo {

  display: block;
  width: min(520px, 92%);
  margin: 0 auto;
  border: 1.5px solid #cfd6dd;
  border-radius: 999px;
  padding: 22px 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #889;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s;
}

.btn-upload-photo:hover {
  border-color: #b8c1ca;
}

.photo-share {
  background: #f2f3f5;
  padding: 18px 16px 20px;
  text-align: center;
}

.photo-share__lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #889;
}

@media (min-width: 980px) {
.photo-share__lead {
  font-size: 16px;
}
}

/* 完了ページ URLリストセクション */
.url-list-section {
  max-width: 360px;
  margin: 0 auto;
}

.url-list-section__title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  text-align: center;
}

.url-list-section__note {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 16px;
  text-align: center;
  line-height: 1.6;
}

#js-url-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.url-list-section .gift-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}

.url-list-section .gift-card__header {
  background: #5a5a5a;
  color: #fff;
  text-align: center;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
}

.url-list-section .gift-card__body {
  padding: 14px 16px 16px;
  text-align: center;
}

.url-list-section .gift-card__name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.url-list-section .gift-card__price {
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}

.gift-card__actions {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.url-list-section .btn-copy,
.url-list-section .btn-line {
  width: min(100%, 230px);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.url-list-section .btn-copy {
  background: #dcdcdc;
  color: #444;
  margin-bottom: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.url-list-section .btn-copy:hover {
  background: #d3d3d3;
}

.url-list-section .btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #06c755;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.url-list-section .btn-line:hover {
  background: #05b94f;
}

.url-list-section .btn-line__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  color: #06c755;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

.url-list-section .btn-line__text {
  line-height: 1;
}



/* コピー成功トースト */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 300;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* 確認ページのWEB挨拶状エリア */
.section-sub-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-sub-note {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 10px;
}



/* ========== STEP5: 注文者情報（郵便番号→住所自動入力） ========== */
.form-row--zip {
  display: grid;
  grid-template-columns: minmax(180px, 220px) auto;
  gap: 8px;
  align-items: start;
  width: fit-content;
  max-width: 100%;
}

.form-row--zip .field-col {
  flex: none;
  width: 220px;
  max-width: 100%;
}

.form-row--zip #orderer-postal {
  width: 100%;
}

.form-row--zip #js-zip-search {
  width: auto;
  min-width: 92px;
  padding: 12px 14px;
  margin: 0;
  white-space: nowrap;
  align-self: start;
  line-height: 1.2;
}

@media (max-width: 767px) {
  .form-row--zip {
    grid-template-columns: 1fr auto;
    width: 100%;
  }

  .form-row--zip .field-col {
    width: auto;
  }

  .form-row--zip #js-zip-search {
    min-width: 88px;
    padding: 12px 12px;
  }
}
