/* ==========================================================================
   封筒宛名作成・印刷ツール 専用CSS
   すべてのセレクタは .envelope-address-tool / .eap-lead / .eap-doc-section 以下に限定
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* 導入文                                                                    */
/* ---------------------------------------------------------------------- */

.eap-lead-intro {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #374151;
  margin: 0 0 10px;
}

.eap-lead-features {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #374151;
  margin: 0 0 10px;
  padding-left: 1.3em;
}

.eap-lead-features li { margin-bottom: 4px; }

/* ---------------------------------------------------------------------- */
/* メッセージ・注意書き                                                       */
/* ---------------------------------------------------------------------- */

.envelope-address-tool [hidden] { display: none !important; }

.eap-message {
  min-height: 1.2em;
  font-size: 0.9rem;
  padding: 0 2px;
  margin-bottom: 8px;
}

.eap-message.is-success { color: #1a7f37; font-weight: 600; }
.eap-message.is-error { color: #b91c1c; font-weight: 600; }

.eap-privacy-note {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 4px 2px 16px;
}

.eap-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 4px 0 0;
  line-height: 1.6;
}

.eap-note-inline {
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 10px;
}

.eap-error-text {
  font-size: 0.85rem;
  color: #b91c1c;
  min-height: 1.2em;
  margin: 6px 0 0;
}

/* ---------------------------------------------------------------------- */
/* 操作ボタン                                                                */
/* ---------------------------------------------------------------------- */

.eap-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: flex-start;
  margin: 4px 0 8px;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.eap-btn-cluster {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 24px;
  border-right: 1px solid #e5e7eb;
}

.eap-btn-cluster:last-child {
  padding-right: 0;
  border-right: none;
}

.eap-btn-cluster-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6b7280;
}

.eap-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .eap-btn-row {
    flex-direction: column;
    gap: 14px;
  }
  .eap-btn-cluster {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
  .eap-btn-cluster:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

.envelope-address-tool button.eap-btn {
  font: inherit;
  cursor: pointer;
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 0.85rem;
  line-height: 1.3;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.envelope-address-tool button.eap-btn:hover { background: #e5e7eb; }

.envelope-address-tool button.eap-btn:focus-visible {
  outline: 2px solid #295596;
  outline-offset: 2px;
}

.envelope-address-tool button.eap-btn-primary {
  background: #295596;
  border-color: #21467b;
  color: #fff;
  font-weight: 700;
}

.envelope-address-tool button.eap-btn-primary:hover { background: #21467b; }

.envelope-address-tool button.eap-btn-danger {
  background: #fff;
  border-color: #e5b4b4;
  color: #b91c1c;
}

.envelope-address-tool button.eap-btn-danger:hover { background: #fef2f2; }

.envelope-address-tool button.eap-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.eap-reset-adjust { margin-top: 6px; }

/* ---------------------------------------------------------------------- */
/* レイアウト（PC 2カラム／モバイル 縦並び）                                    */
/* ---------------------------------------------------------------------- */

.eap-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 10px;
  align-items: start;
}

.eap-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 18px 20px;
}

.eap-panel h2 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: #111827;
}

@media (min-width: 1024px) {
  .eap-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "envelope preview"
      "recipient preview"
      "sender preview"
      "position preview";
    gap: 24px;
  }

  .eap-envelope-settings { grid-area: envelope; }
  .eap-recipient-form { grid-area: recipient; }
  .eap-sender-form { grid-area: sender; }
  .eap-position-settings { grid-area: position; }
  .eap-preview-area {
    grid-area: preview;
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }
}

/* ---------------------------------------------------------------------- */
/* フォーム部品共通                                                          */
/* ---------------------------------------------------------------------- */

.eap-field {
  margin-bottom: 14px;
}

.eap-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.eap-field-row .eap-field { margin-bottom: 0; }

.envelope-address-tool label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.envelope-address-tool fieldset.eap-field {
  border: none;
  padding: 0;
  margin: 0 0 14px;
}

.envelope-address-tool fieldset.eap-field legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  padding: 0;
}

.envelope-address-tool input[type="text"],
.envelope-address-tool input[type="number"],
.envelope-address-tool input[type="tel"],
.envelope-address-tool select {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
}

.envelope-address-tool input[type="number"] { max-width: 140px; }

.envelope-address-tool input:focus-visible,
.envelope-address-tool select:focus-visible,
.envelope-address-tool button:focus-visible,
.envelope-address-tool input[type="radio"]:focus-visible,
.envelope-address-tool input[type="checkbox"]:focus-visible {
  outline: 2px solid #295596;
  outline-offset: 2px;
}

.eap-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.eap-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.88rem;
  color: #1f2937;
  margin: 0;
}

.eap-radio-label:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.envelope-address-tool .eap-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.88rem;
  color: #1f2937;
  margin: 0 0 12px;
}

.envelope-address-tool input[type="radio"],
.envelope-address-tool input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #295596;
}

.envelope-address-tool input[type="range"] {
  width: 100%;
  accent-color: #295596;
}

/* ---------------------------------------------------------------------- */
/* 封筒サイズカード                                                          */
/* ---------------------------------------------------------------------- */

.eap-envelope-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.eap-envelope-card {
  display: block;
  position: relative;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.eap-envelope-card input[type="radio"] {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
}

.eap-envelope-card:has(input:checked) {
  border-color: #295596;
  background: #f0f5ff;
}

.eap-envelope-card:has(input:focus-visible) {
  outline: 2px solid #295596;
  outline-offset: 2px;
}

.eap-envelope-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 22px;
}

.eap-envelope-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
}

.eap-envelope-card-size {
  font-size: 0.78rem;
  color: #4b5563;
}

.eap-envelope-card-usage {
  font-size: 0.75rem;
  color: #6b7280;
}

/* ---------------------------------------------------------------------- */
/* アコーディオン（詳細フォントサイズ設定）                                    */
/* ---------------------------------------------------------------------- */

.envelope-address-tool details.eap-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 14px;
  overflow: hidden;
}

.envelope-address-tool details.eap-accordion summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  background: #f9fafb;
  transition: background 0.15s ease;
}

.envelope-address-tool details.eap-accordion summary:hover { background: #eef2f7; }

.envelope-address-tool details.eap-accordion summary::-webkit-details-marker { display: none; }

.envelope-address-tool details.eap-accordion summary::after {
  content: "▸";
  flex: none;
  font-size: 0.9em;
  font-weight: 700;
  color: #295596;
  transition: transform 0.15s ease;
}

.envelope-address-tool details.eap-accordion[open] summary::after { transform: rotate(90deg); }

.eap-accordion-body {
  padding: 12px 14px 4px;
}

/* パネル見出しごと折りたためるアコーディオン（印刷位置の調整など） */
.envelope-address-tool details.eap-panel-accordion summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -6px -8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #111827;
  background: #f9fafb;
  transition: background 0.15s ease;
}

.envelope-address-tool details.eap-panel-accordion summary:hover { background: #eef2f7; }

.envelope-address-tool details.eap-panel-accordion[open] summary {
  margin-bottom: 14px;
}

.envelope-address-tool details.eap-panel-accordion summary::-webkit-details-marker { display: none; }

.envelope-address-tool details.eap-panel-accordion summary::after {
  content: "▸";
  flex: none;
  font-size: 0.85em;
  font-weight: 700;
  color: #295596;
  transition: transform 0.15s ease;
}

.envelope-address-tool details.eap-panel-accordion[open] summary::after { transform: rotate(90deg); }

.eap-panel-accordion > .eap-accordion-body {
  padding: 0;
}

.eap-adjust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px 16px;
}

.eap-adjust-block {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e5e7eb;
}

.eap-adjust-block:last-of-type { border-bottom: none; }

.eap-adjust-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #295596;
  margin: 0 0 8px;
}

/* ---------------------------------------------------------------------- */
/* 給紙方向ガイド                                                            */
/* ---------------------------------------------------------------------- */

.eap-feed-guide {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f9fbff;
  border: 1px solid #d6e6f9;
  border-radius: 6px;
}

.eap-feed-guide-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: #295596;
  margin: 0 0 6px;
}

.eap-feed-guide ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #4b5563;
}

/* ---------------------------------------------------------------------- */
/* プレビュー領域                                                            */
/* ---------------------------------------------------------------------- */

.eap-side-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.envelope-address-tool button.eap-side-tab {
  font: inherit;
  cursor: pointer;
  flex: 1 1 0;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
}

.envelope-address-tool button.eap-side-tab[aria-selected="true"] {
  background: #295596;
  border-color: #21467b;
  color: #fff;
}

.eap-test-print-note {
  font-size: 0.8rem;
  color: #4b5563;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 10px;
}

.eap-printer-note {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 8px 0 4px;
}

.eap-overflow-warning {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
  color: #b91c1c;
  font-size: 0.85rem;
}

.eap-overflow-warning p { margin: 0; }

.eap-preview-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 4px;
}

.eap-zoom-select {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
}

.eap-zoom-select select { width: auto; }

/* ---------------------------------------------------------------------- */
/* 封筒キャンバス（画面表示）                                                  */
/* ---------------------------------------------------------------------- */

.eap-scale-wrap {
  overflow: auto;
  padding: 4px 0 10px;
}

.eap-canvas-stage {
  position: relative;
}

.eap-envelope {
  position: absolute;
  top: 0;
  left: 0;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  transform-origin: top left;
}

.eap-envelope[data-font="gothic"] {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "游ゴシック",
    Meiryo, "BIZ UDゴシック", "Noto Sans JP", sans-serif;
}

.eap-envelope[data-font="mincho"] {
  font-family: "Hiragino Mincho ProN", "BIZ UDPMincho", "BIZ UDMincho", "Yu Mincho", "游明朝", "Noto Serif JP", "MS PMincho", serif;
}

.eap-envelope-inner {
  position: absolute;
  inset: 0;
}

/* 画面上だけのガイド類 */
.eap-guide {
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
}

.eap-guide-outline {
  inset: 0;
  border: 1px solid #9ca3af;
}

.eap-guide-safe-area {
  inset: 6mm;
  border: 1px dashed #c7d2fe;
}

.eap-guide-center-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-left: 1px dotted #d1d5db;
}

.eap-guide-center-h {
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 1px dotted #d1d5db;
}

.eap-guide-side-label {
  top: 2mm;
  left: 2mm;
  font-size: 8pt;
  color: #9ca3af;
  background: #fff;
  padding: 1px 4px;
  border-radius: 3px;
}

.eap-guide-envelope-name {
  bottom: 2mm;
  left: 2mm;
  font-size: 7.5pt;
  color: #9ca3af;
}

.eap-guide-flap {
  top: 0;
  left: 20%;
  right: 20%;
  height: 30%;
  border: 1px dashed #d1d5db;
  border-top: none;
}

.eap-pos-tag {
  display: none;
  font-size: 7.5pt;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* 位置指定のない絶対配置要素はブラウザが独自に静的位置を計算し、
   ページからはみ出すことがあるため、必ず明示的な位置を指定する */
.eap-pos-tag-postal {
  top: 4mm;
  right: 4mm;
}

.eap-pos-tag-recipient {
  top: 50%;
  right: 4mm;
  transform: translateY(-50%);
}

.eap-pos-tag-sender {
  bottom: 4mm;
  left: 4mm;
}

/* ---------------------------------------------------------------------- */
/* 宛名・郵便番号・差出人・補足のブロック                                       */
/* ---------------------------------------------------------------------- */

.eap-recipient-block,
.eap-sender-block,
.eap-postal-block,
.eap-supplement-block {
  position: absolute;
  color: #111827;
}

.eap-recipient-block[data-mode="vertical"] {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.eap-recipient-block[data-mode="vertical"] > * {
  margin: 0;
  margin-block-end: 2.4mm;
  white-space: pre-wrap;
  word-break: keep-all;
  max-height: var(--eap-col-limit, none);
}

.eap-recipient-block[data-mode="vertical"] > *:last-child {
  margin-block-end: 0;
}

/* 住所は他の項目より文字が詰まって見えやすいため、縦書き・横書きどちらでも
   少しだけ字間を広げる */
.eap-line-address {
  letter-spacing: 0.06em;
}

/* 半角数字だけは正立表示にする（ハイフンなど他の文字は縦書きのまま回転させる） */
.eap-upright-digits {
  text-orientation: upright;
  text-combine-upright: digits 4;
}

.eap-upright-letters {
  text-orientation: upright;
}

/* 全角の縦線記号（｜）を、数字（.eap-upright-digits）と同じ
   text-combine-upright の仕組みでそのまま表示する。CSSで自前の線を
   描く方式（visibility:hidden + ::after）も試したが、隠す文字の
   字送り幅がフォントや封筒サイズごとに違い、かえって印刷時の
   ズレが大きくなったため、素直に実際のグリフを表示する方式に戻した */
.eap-vertical-hyphen {
  text-orientation: upright;
  text-combine-upright: all;
}

/* 役職・氏名・敬称のあいだに少し間隔をあける（縦書き時） */
.eap-recipient-block[data-mode="vertical"] .eap-line-name > * {
  margin-inline-end: 4.5mm;
}

.eap-recipient-block[data-mode="vertical"] .eap-line-name > *:last-child {
  margin-inline-end: 0;
}

.eap-recipient-block[data-mode="horizontal"] {
  writing-mode: horizontal-tb;
  display: flex;
  flex-direction: column;
  gap: 1.6mm;
  align-items: flex-start;
  text-align: left;
}

.eap-recipient-block[data-mode="horizontal"] > * {
  margin: 0;
}

/* 氏名と敬称（様・御中など）が行の途中で改行されないようにする（横書き時） */
.eap-recipient-block[data-mode="horizontal"] .eap-line-name {
  white-space: nowrap;
}

/* 会社名・所属（部署）・役職・氏名の行を、住所より5mm右にずらす（横書き時）。
   transformだと、はみ出し判定（scrollWidth）に実際のレイアウト幅以上の
   数値が乗ってしまい、短い文字列でも誤って自動縮小されるため、
   実レイアウトに反映されるmarginでずらす */
.eap-recipient-block[data-mode="horizontal"] .eap-line-company,
.eap-recipient-block[data-mode="horizontal"] .eap-line-department,
.eap-recipient-block[data-mode="horizontal"] .eap-line-name {
  margin-left: 5mm;
}

/* 部署名の直後に氏名が続く場合は、通常の行間よりも少し近づける（横書き時） */
.eap-recipient-block[data-mode="horizontal"] .eap-line-department + .eap-line-name {
  margin-top: -0.8mm;
}

.eap-line-name {
  font-weight: 400;
}

.eap-line-name .eap-name-text {
  font-weight: 400;
}

.eap-line-name .eap-role-text {
  font-weight: 400;
}

.eap-line-name .eap-honorific {
  font-weight: 400;
}

.eap-line-company .eap-honorific {
  font-weight: 400;
  margin-inline-start: 3.8mm;
}

.eap-line-company {
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* 明朝体は字面（うろこ・はねなど）がゴシックより字間いっぱいまで広がるため、
   同じletter-spacingでも縦書きでは詰まって・かぶって見える。縦書き明朝時のみ
   会社名の字間を広めにして視覚的な密度をゴシックに合わせる */
.eap-envelope[data-font="mincho"] .eap-recipient-block[data-mode="vertical"] .eap-line-company {
  letter-spacing: 0.02em;
}

.eap-postal-block {
  writing-mode: horizontal-tb;
  /* 枠あり・枠なしで文字の縦位置（上下）がそろって見えるよう、
     どちらも同じ高さの箱の中で縦中央揃えにする */
  height: 6.5mm;
  display: flex;
  align-items: center;
}

.eap-postal-frame {
  display: flex;
  align-items: center;
  gap: 3.4mm;
}

.eap-postal-frame-group {
  display: flex;
}

.eap-postal-digit-box {
  width: 5mm;
  height: 6.5mm;
  border: 0.3mm solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  /* 枠なし（letter-spacing: 0.3em、18pt基準で約1.9mm）と見た目の間隔を揃える */
  margin-left: 2.2mm;
}

.eap-postal-digit-box:first-child { margin-left: 0; }

.eap-postal-frame.eap-postal-frame-lineless .eap-postal-digit-box {
  border-color: transparent;
}

.eap-postal-plain {
  font-size: 16pt;
  white-space: nowrap;
  letter-spacing: 0.3em;
}

.eap-supplement-block {
  border: 1.2px solid #c81e1e;
  color: #c81e1e;
  border-radius: 4px;
  padding: 2mm 3mm;
  font-weight: 700;
  font-size: 18pt;
  background: #fff;
}

.eap-supplement-block[data-mode="horizontal"] {
  writing-mode: horizontal-tb;
}

.eap-supplement-block[data-mode="vertical"] {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 3mm 2mm;
  letter-spacing: 0.15em;
}

.eap-sender-block {
  writing-mode: horizontal-tb;
  line-height: 1.5;
}

.eap-sender-block > * { margin: 0; }

/* 差出人の縦書き。宛名の縦書きと同じく、項目（郵便番号・住所・会社名など）
   ごとに別の<p>にしているため、通常のブロック要素の並びのまま
   縦書きにすると自然に右から左へ列が増えていく */
.eap-sender-block[data-mode="vertical"] {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.eap-sender-block[data-mode="vertical"] > * {
  margin: 0;
  margin-block-end: 3mm;
  white-space: pre-wrap;
  word-break: keep-all;
}

.eap-sender-block[data-mode="vertical"] > *:last-child {
  margin-block-end: 0;
}

/* ---------------------------------------------------------------------- */
/* ドキュメントセクション（使い方・FAQなど）                                    */
/* ---------------------------------------------------------------------- */

.eap-doc-section { margin-top: 40px; margin-bottom: 40px; }

.eap-doc-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 40px 0 14px;
  color: #111827;
  border-left: 4px solid #295596;
  padding-left: 10px;
}

.eap-doc-section h2:first-of-type { margin-top: 0; }

.eap-doc-section p,
.eap-doc-section li {
  font-size: 0.92rem;
  line-height: 1.85;
  color: #374151;
}

.eap-doc-section ul { padding-left: 1.3em; }

.eap-steps {
  list-style: none;
  counter-reset: eap-step;
  padding: 0;
  margin: 0;
}

.eap-steps li {
  position: relative;
  padding: 10px 0 14px 34px;
  border-bottom: 1px solid #f3f4f6;
}

.eap-steps li:last-child { border-bottom: none; }

.eap-steps li::before {
  counter-increment: eap-step;
  content: counter(eap-step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #295596;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eap-doc-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 18px;
}

.eap-faq-item {
  border-bottom: 1px solid #f3f4f6;
  padding: 12px 0;
}

.eap-faq-item h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #295596;
  margin: 0 0 6px;
}

.eap-faq-item h3::before { content: "Q. "; }

.eap-faq-item p { margin: 0; }
.eap-faq-item p::before { content: "A. "; font-weight: 700; color: #6b7280; }

/* ---------------------------------------------------------------------- */
/* モバイル調整                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 640px) {
  .envelope-address-tool button.eap-btn { flex: 1 1 auto; }
  .eap-field-row { grid-template-columns: 1fr; }
  .eap-panel { padding: 14px 14px 16px; }
}

/* ---------------------------------------------------------------------- */
/* 印刷用スタイル                                                            */
/* ---------------------------------------------------------------------- */

/* 印刷専用の入れ物。画面上は常に非表示。印刷直前にJSが封筒要素をこの中へ
   実際に移動し、印刷時は body 直下の「この入れ物以外すべて」を問答無用で
   非表示にする。個別の要素を1つずつ非表示にする方式は見落とし・
   タイミングの問題で信頼できなかったため、この方式に統一している */
.eap-print-root {
  display: none;
}

@media print {

  body > *:not(.eap-print-root) {
    display: none !important;
  }

  html, body {
    background: #fff;
    margin: 0;
    padding: 0;
  }

  .eap-print-root {
    display: block !important;
    margin: 0;
    padding: 0;
  }

  .eap-print-root .eap-envelope {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    box-shadow: none;
    overflow: hidden;
  }

  .eap-guide { display: none !important; }

  body.eap-print-mode-test .eap-guide { display: block !important; }
  body.eap-print-mode-test .eap-pos-tag { display: block !important; }
}
