/* 「入れる文字」(お名前・日付・メッセージ+書体)の記入欄と、書体一覧ページ(/fonts/)のスタイル。
   購入前(/)・購入後(/order/)・/fonts/ で読み込む。style.css / post.css の既存クラスは変更しない。 */

/* ---- 記入欄 ---- */
.inscription .ins-note { color: var(--warn); }

/* 記号(♥★♪🐾〜✦)は入力欄の中でも当店の絵で出す(ボタン・プレビューと同じ形。2026年9月16日 社長指示)。
   tools/build_symbol_font.py が SYMBOL_ICONS と同じ形から作ったフォント。unicode-range で記号6文字にだけ効く */
@font-face {
  font-family: "Naireya Symbols";
  src: url("/fonts/symbols/naireya-symbols.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+2665, U+2605, U+266A, U+1F43E, U+301C, U+2726;
}
#ins-name, #ins-date, #ins-message, #sim-text {
  font-family: "Naireya Symbols", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-variant-emoji: text; /* 足跡(絵文字)を端末の絵文字ではなく当店のフォントで描かせる */
}
.ins-fonts-link {
  margin: 10px 0 4px;
  min-height: 44px;
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ins-field { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ins-label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.ins-label .ins-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.ins-field .hint { margin-top: 4px; }
.ins-font-label { display: block; font-size: 13px; font-weight: 700; margin: 10px 0 4px; }
#ins-message { min-height: 64px; }

/* 記号ボタン(♥★♪🐾)。入力欄の直後に JS が作る。押しやすいように44px角 */
.ins-symbols { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.ins-symbols-label { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.ins-sym {
  width: 44px; height: 44px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--accent-dark); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ins-sym:active { background: #f3f7f5; border-color: var(--accent); }
.ins-sym .ins-sym-icon svg { width: 24px; height: 24px; }
/* 記号の絵(プレビュー・確認画面・書体一覧)。文字の大きさに合わせる */
.ins-sym-icon { display: inline-block; vertical-align: -0.12em; line-height: 0; }
.ins-sym-icon svg { width: 0.95em; height: 0.95em; fill: currentColor; }
.ins-live .ins-sym-icon, .ins-confirm-text .ins-sym-icon { color: inherit; } /* 記号の色は文字と同じ(黒) */
.ins-live.placeholder .ins-sym-icon { color: #b5aea1; }

/* 書体のプルダウン(input と同じ枠。iOSのズーム防止で16px) */
.ins-select {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-family: inherit;
  padding: 10px 40px 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%2347705f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--ink);
}
.ins-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(71, 112, 95, 0.15);
}

/* プレビュー(入力した文字を画面の書体で + 実物の見本画像) */
.ins-preview {
  margin-top: 8px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #faf9f6;
  padding: 8px 12px 10px;
}
.ins-preview-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.ins-cap { flex: none; width: 6.5em; font-size: 11px; color: var(--muted); line-height: 1.3; }
.ins-live {
  font-size: 24px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: var(--ink);
  min-width: 0;
}
.ins-live.placeholder { color: #b5aea1; }
/* 日本語不可の書体に日本語を入れたとき: プレビューの位置に赤字で大きく */
.ins-live.no-jp { font-family: inherit; font-size: 20px; font-weight: 700; color: var(--danger); }
.ins-select.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(179, 56, 44, 0.18); }
.msg.error.big { font-size: 15px; font-weight: 700; border: 2px solid var(--danger); line-height: 1.6; }
.ins-sample-row { margin-top: 6px; padding-top: 6px; border-top: 1px solid #eee9df; }
.ins-sample-cap { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.ins-sample { display: block; width: 100%; max-width: 520px; height: auto; background: #fff; border-radius: 4px; }

/* 「文字を入れない」(ラジオのカードと同じ見た目のチェック) */
.ins-none { margin-top: 14px; }
.choice input[type="checkbox"] { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.ins-fields.dimmed { opacity: 0.45; }

/* 次へボタンの下: 押せない理由 */
#next-reason { margin-top: 8px; text-align: center; }

/* 確認画面 */
.confirm-list dd.inscription { font-size: 14px; }
.ins-confirm-row { margin: 4px 0 10px; }
.ins-confirm-label { font-size: 12px; color: var(--muted); }
.ins-confirm-text { font-size: 22px; line-height: 1.35; white-space: pre-wrap; word-break: break-all; overflow-wrap: anywhere; }
.ins-confirm-text.none { font-size: 14px; color: var(--muted); }
.ins-confirm-font { font-size: 12px; color: var(--muted); }
.ins-confirm-none { font-weight: 700; }
.ins-confirm-note { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---- 書体一覧ページ(/fonts/) ---- */
.fonts-section { margin-top: 22px; }
.fonts-section h2 { margin: 0 0 4px; font-size: 17px; }
.fonts-section > .hint { margin: 0 0 10px; }
.font-list { list-style: none; padding: 0; margin: 10px 0 0; }
.font-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.font-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.font-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--warn);
  background: #faf3e3;
}
.font-badge.exact { color: var(--ok); background: #ecf5ef; }
.font-badge.no-jp { color: #fff; background: var(--danger); font-size: 12px; padding: 2px 8px; }
.fonts-section .no-jp-lead { color: var(--danger); font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.font-badge.approx { color: var(--muted); background: #f1efe9; }
.font-used { font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.font-row .ins-preview { margin-top: 4px; }
.font-row .ins-live { font-size: 26px; }
.font-row .ins-live.na { font-family: inherit; font-size: 18px; font-weight: 700; color: var(--danger); }
.font-row .ins-sample { max-width: 100%; }
.design-list { list-style: none; padding: 0; margin: 10px 0 0; }
.design-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.design-head { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.design-img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; }
.design-parts { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.design-parts li { margin-bottom: 3px; }
.design-parts .part { color: var(--muted); }
.ins-guide { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; background: #fff; }
.ins-guide th, .ins-guide td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ins-guide th { background: #f6f4ef; font-weight: 700; font-size: 12.5px; }
.ins-guide td.result { white-space: pre-wrap; }

/* ---- デザイン(A〜H)の選択。カードは app.js / order.js が InscriptionLib.DESIGNS から作る ---- */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.design-card {
  position: relative;
  display: block;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 6px 6px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* ラジオは見えなくするが、キーボードと読み上げでは使える */
.design-card input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.design-card img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: #fff; }
.design-name { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; text-align: center; }
/* 選択中: 緑の枠+右上にチェック印(.is-selected は JS が付ける。:has が使えない古い端末の保険) */
.design-card.is-selected,
.design-card:has(input:checked) { border-color: var(--accent); background: #f3f7f5; box-shadow: 0 0 0 3px rgba(71, 112, 95, 0.18); }
.design-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.design-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.12s;
}
.design-card.is-selected::after,
.design-card:has(input:checked)::after { opacity: 1; }
/* 選んだデザインを大きく見せる */
.design-selected { margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px; background: #faf9f6; padding: 8px 12px 10px; }
.design-selected-cap { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.design-selected-cap strong { color: var(--ink); font-size: 15px; }
.design-selected img { display: block; width: 100%; max-width: 360px; height: auto; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
/* 確認画面 */
.confirm-list dd.confirm-design { display: flex; align-items: center; gap: 10px; }
.confirm-design-img { width: 64px; height: 64px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; flex: none; }
/* 書体一覧ページ: 商品写真と名入れ部分の拡大を並べる */
.design-photos { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.design-photo { width: 120px; height: 120px; border-radius: 8px; border: 1px solid var(--line); object-fit: cover; flex: none; }
.design-photos .design-img { flex: 1 1 200px; min-width: 0; margin-bottom: 0; }
