/* ==========================================================================
   スタンプカード作成ツール
   PC: 左に設定 / 右に大きめのプレビュー
   SP: 設定 → プレビューの1カラム
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: #f3f5f8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif;
  color: #1f2937;
  line-height: 1.6;
}

button, input, select, textarea { font-family: inherit; }

:focus-visible {
  outline: 2px solid #2f6fb0;
  outline-offset: 2px;
}

/* ── パンくず・導入 ───────────────────────────────────────────── */
.scm-breadcrumb,
.scm-seo-header,
.scm-main-container,
.scm-doc-section {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.scm-breadcrumb {
  margin-top: 14px;
  padding: 0 16px;
}

.scm-seo-header {
  margin-top: 10px;
  margin-bottom: 18px;
  padding: 0 16px;
}

.scm-seo-header h1 {
  margin: 0 0 8px;
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.4;
}

.scm-seo-lead {
  margin: 0 0 12px;
  max-width: 760px;
  color: #444;
  line-height: 1.75;
}

.scm-features {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.scm-features li {
  padding: 4px 10px;
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  background: #f7faff;
  color: #315d8c;
  font-size: 0.8rem;
}

.scm-quick-flow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px 9px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #dbe7f3;
  border-radius: 9px;
  background: #f7faff;
  color: #315d8c;
  font-size: 0.82rem;
  font-weight: 600;
  list-style: none;
}

.scm-quick-flow li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 50%;
  background: #2f6fb0;
  color: #fff;
  font-size: 0.72rem;
}

/* ── メイン：縦積み構成 ───────────────────────────────────────── */
.scm-main-container {
  margin-bottom: 48px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(350px, .78fr) minmax(0, 1.22fr);
  gap: 20px;
  align-items: start;
}

.scm-sample-note {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #f7faff;
  color: #315d8c;
  font-size: .82rem;
}

.scm-settings-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scm-section-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.scm-section-card > summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 30px 0 0;
  color: #1f4f8a;
  font-size: 1.04rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.scm-section-card > summary::-webkit-details-marker { display: none; }
.scm-section-card > summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 1.3rem;
  font-weight: 400;
}
.scm-section-card[open] > summary::after { content: "−"; }

.scm-section-card > summary > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  background: #eaf2fb;
  color: #1f4f8a;
  font-size: .82rem;
}

.scm-section-body {
  margin-top: 16px;
}

/* ── フォーム ─────────────────────────────────────────────────── */
.scm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.scm-form-field { margin-bottom: 14px; }
.scm-form-field:last-child { margin-bottom: 0; }

.scm-form-field label,
.scm-form-field-label {
  display: block;
  margin-bottom: 6px;
  color: #444;
  font-size: .85rem;
  font-weight: 600;
}

.scm-form-field input[type="text"],
.scm-form-field input[type="number"],
.scm-form-field select,
.scm-form-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: .92rem;
  resize: vertical;
}

.scm-form-field input:focus,
.scm-form-field select:focus,
.scm-form-field textarea:focus {
  border-color: #6b9ccc;
}

.scm-form-field input[aria-invalid="true"] { border-color: #dc2626; background: #fffafa; }

.scm-inline-preset {
  display: flex;
  gap: 8px;
  align-items: center;
}
.scm-inline-preset input { flex: 1 1 auto; }
.scm-inline-preset select { flex: 0 0 auto; width: auto; min-width: 130px; }

.scm-field-note {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: .76rem;
}

.scm-error-text {
  min-height: 1em;
  margin: 5px 0 0;
  color: #b91c1c;
  font-size: .78rem;
  font-weight: 600;
}
.scm-error-text:empty { display: none; }

.scm-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #333;
  font-size: .88rem;
  cursor: pointer;
}
.scm-checkbox-row input { width: 18px; height: 18px; flex: 0 0 18px; }

/* ── セグメント選択（サイズ・印刷方法） ───────────────────────── */
.scm-segmented {
  display: flex;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
}

.scm-segmented-option {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.scm-segmented-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.scm-segmented-option span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 9px 5px;
  border-right: 1px solid #cbd5e1;
  color: #475569;
  text-align: center;
  line-height: 1.3;
}
.scm-segmented-option:last-child span { border-right: none; }
.scm-segmented-option span b { font-size: .86rem; }
.scm-segmented-option span small { margin-top: 2px; font-size: .7rem; font-weight: 500; }

.scm-segmented-option input:checked + span { background: #2f6fb0; color: #fff; }
.scm-segmented-option input:focus-visible + span { outline: 2px solid #2f6fb0; outline-offset: -2px; }

/* ── ロゴ ─────────────────────────────────────────────────────── */
.scm-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scm-logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.scm-logo-preview img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
}

/* ── 保存の案内 ───────────────────────────────────────────────── */
.scm-storage-note {
  margin: 4px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #6b7280;
  font-size: .78rem;
  line-height: 1.6;
}

/* ── プレビュー ───────────────────────────────────────────────── */
.scm-preview-area {
  position: sticky;
  top: 16px;
  align-self: start;
  min-width: 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.scm-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.scm-preview-toolbar h2 {
  margin: 0;
  color: #1f4f8a;
  font-size: 1.04rem;
  font-weight: 700;
}

.scm-preview-status { margin: 0 0 6px; color: #64748b; font-size: .8rem; font-weight: 600; }

.scm-preview-zoom-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.scm-zoom-buttons {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.scm-zoom-btn {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.scm-zoom-btn:last-child { border-right: 0; }
.scm-zoom-btn:hover { background: #f1f5f9; }
.scm-zoom-btn.is-active { background: #2f6fb0; color: #fff; }
.scm-zoom-btn:focus-visible { position: relative; z-index: 1; outline: 2px solid #2f6fb0; outline-offset: -2px; }

.scm-scale-wrap {
  overflow: auto;
  padding: 26px 14px 14px;
  border-radius: 10px;
  background: #e5e7eb;
}

.scm-preview-item {
  position: relative;
  margin: 0 auto;
}

.scm-sheet {
  position: relative;
  width: 210mm;
  height: 297mm;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transform-origin: top left;
}

/* 「カード1枚」印刷時は画面上ではカード原寸のみを大きく表示し、
   印刷時だけA4全体のサイズに戻して中央配置する（下の@media printで上書き）。 */
.scm-sheet-solo { box-shadow: 0 2px 14px rgba(0,0,0,.16); }

.scm-sheet-grid {
  position: absolute;
  inset: 0;
  display: grid;
}

.scm-sheet-grid-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.scm-card-slot { position: relative; }

.scm-cut-guide { outline: 1px dashed #9aa5b1; outline-offset: 2px; }

/* ── カード本体 ───────────────────────────────────────────────── */
.scm-card {
  --scm-accent: #2f6fb0;
  /* はがきサイズ(148mm)で約4.4mmになる比率。カードの高さに応じて
     余白も一緒に縮小・拡大させ、名刺サイズでスタンプが圧迫されないようにする。 */
  --scm-block-margin: calc(var(--scm-card-h) * 0.03);
  position: relative;
  overflow: hidden;
  width: var(--scm-card-w);
  height: var(--scm-card-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6mm;
  padding: 3.6mm 4.2mm;
  border: 1px solid #d8dee6;
  border-radius: 3mm;
  background: #fff;
  color: #23282f;
  text-align: left;
}

/* 名刺サイズだけ、ヘッダー・フッター周りの余白を独立して調整したい場合は
   ここを上書きする（はがきサイズは.scm-cardのベース値のまま）。 */
.scm-card.scm-size-meishi {
  --scm-block-margin: calc(var(--scm-card-h) * 0.03);
  /* 名刺サイズはスタンプの丸を大きく見せる余地を作るため、上下のパディングを
     詰める（はがきサイズは.scm-cardのベース値3.6mmのまま）。 */
  padding: 1.5mm 4.2mm;
}

.scm-card.scm-preset-simple { background: #ffffff; }
.scm-card.scm-preset-natural { background: #faf8f1; border-color: #e2dcc9; }
.scm-card.scm-preset-pop { background: #fffaf3; }
.scm-card.scm-preset-mono { background: #ffffff; border-color: #333333; }

.scm-font-gothic { font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic Pro', 'Yu Gothic', 'Meiryo', sans-serif; }
.scm-font-mincho { font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif; }
.scm-font-klee { font-family: "Klee One", 'Yu Mincho', serif; }

.scm-card-header {
  position: relative;
  top: 0.8mm;
  display: flex;
  align-items: center;
  gap: 2.4mm;
  margin-bottom: 0.2mm;
}

.scm-card-logo {
  width: 8mm;
  height: 8mm;
  object-fit: contain;
  flex: 0 0 auto;
}

.scm-card-headtext { min-width: 0; }

.scm-card-shopname {
  color: #4b5563;
  font-size: 2.6mm;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.scm-card-title {
  color: var(--scm-accent);
  font-size: 4.4mm;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.scm-card-description {
  color: #374151;
  font-size: 2.5mm;
  line-height: 1.35;
  margin-bottom: var(--scm-block-margin);
  overflow-wrap: anywhere;
}

.scm-stamp-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 1.4mm;
  padding: 0.6mm 0;
  justify-content: center;
  align-content: center;
}

/* 名刺サイズは丸同士の間隔をもう少しゆったりさせる */
.scm-card.scm-size-meishi .scm-stamp-grid {
  gap: 2.4mm;
}

/* 名刺サイズの8〜10個は、他の個数よりさらに間隔を広げる */
.scm-card.scm-size-meishi .scm-stamp-grid[data-count="8"],
.scm-card.scm-size-meishi .scm-stamp-grid[data-count="9"],
.scm-card.scm-size-meishi .scm-stamp-grid[data-count="10"] {
  gap: 3.2mm;
}

.scm-stamp {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  align-self: center;
  width: var(--scm-stamp-size, 100%);
  height: var(--scm-stamp-size, 100%);
  min-width: 0;
  min-height: 0;
  border: 0.35mm solid var(--scm-accent);
  background: #fff;
  color: var(--scm-accent);
  font-weight: 700;
  font-size: calc(var(--scm-stamp-size, 8mm) * 0.32);
  font-variant-numeric: tabular-nums;
}

.scm-shape-circle .scm-stamp { border-radius: 50%; }
.scm-shape-square .scm-stamp { border-radius: 0.4mm; }
.scm-shape-rounded .scm-stamp { border-radius: 18%; }

.scm-stamp-goal {
  border-width: 0.5mm;
  background: var(--scm-accent);
  color: #fff;
  font-size: calc(var(--scm-stamp-size, 8mm) * 0.2);
  white-space: nowrap;
  letter-spacing: .01em;
}

.scm-card-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 3mm;
  margin-top: var(--scm-block-margin);
  color: #374151;
  font-size: 2.3mm;
  line-height: 1.4;
}

.scm-card-benefit { font-weight: 600; overflow-wrap: anywhere; }
.scm-card-expiry { flex: 0 0 auto; color: #6b7280; white-space: nowrap; }

.scm-card-notes {
  color: #6b7280;
  font-size: 1.9mm;
  line-height: 1.4;
  white-space: pre-line;
  overflow-wrap: anywhere;
}


/* ── 出力操作 ─────────────────────────────────────────────────── */
.scm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.scm-btn:hover { background: #eef2f7; }

.scm-btn-primary { border-color: #2f6fb0; background: #2f6fb0; color: #fff; }
.scm-btn-primary:hover { background: #245a91; }

.scm-btn-outline { background: #fff; border-color: #2f6fb0; color: #2f6fb0; }
.scm-btn-outline:hover { background: #eaf2fb; }

.scm-btn-text-danger {
  min-height: 40px;
  padding: 10px 4px;
  border: none;
  background: none;
  color: #a83232;
  font-size: .82rem;
  text-decoration: underline;
  cursor: pointer;
}
.scm-btn-text-danger:hover { color: #7a1f1f; }

.scm-reset-row { margin-top: 8px; text-align: right; }

/* ── モバイル固定操作 ─────────────────────────────────────────── */
.scm-mobile-action-bar { display: none; }

/* ── 解説 ─────────────────────────────────────────────────────── */
.scm-doc-section {
  margin-top: 40px;
  margin-bottom: 60px;
  padding: 0 16px;
  color: #374151;
  line-height: 1.85;
}

.scm-doc-section h2 {
  margin: 38px 0 14px;
  padding-left: 10px;
  border-left: 4px solid #1d4ed8;
  color: #111827;
  font-size: 1.22rem;
  font-weight: 700;
}
.scm-doc-section h2:first-of-type { margin-top: 0; }
.scm-doc-section h3 { margin: 0 0 6px; color: #1d4ed8; font-size: 1rem; font-weight: 700; }
.scm-doc-section p,
.scm-doc-section li { color: #374151; font-size: .92rem; line-height: 1.85; }
.scm-doc-section p { margin: 0 0 12px; }
.scm-doc-section a { color: #1d4ed8; font-weight: 600; }

.scm-steps { counter-reset: scm-step; margin: 0; padding: 0; list-style: none; }
.scm-steps li { counter-increment: scm-step; position: relative; margin-bottom: 14px; padding-left: 2.4em; }
.scm-steps li::before {
  content: counter(scm-step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  border-radius: 50%;
  background: #1d4ed8;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}

.scm-usecase-list,
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scm-usecase-list li,
.related-links li a {
  display: block;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  background: #fff;
  font-size: .88rem;
}
.related-links li a { text-decoration: none; }
.related-links li a:hover { background: #eff6ff; }

.scm-faq-item {
  margin-bottom: 10px;
  padding: 13px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
.scm-faq-item p { margin: 0; }


/* ── サンプル・詳細設定 ─────────────────────────────────────── */
.scm-sample-switcher {
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  background: #fff;
}
.scm-sample-switcher-label {
  display: block;
  margin-bottom: 8px;
  color: #475569;
  font-size: .82rem;
  font-weight: 700;
}
.scm-sample-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.scm-sample-btn {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.scm-sample-btn:hover,
.scm-sample-btn.is-active {
  border-color: #2f6fb0;
  background: #eaf2fb;
  color: #1f4f8a;
}

.scm-detail-options {
  margin-top: 4px;
  border-top: 1px solid #edf0f4;
  padding-top: 6px;
}
.scm-detail-options > summary {
  padding: 8px 0;
  color: #315d8c;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.scm-detail-options > summary::-webkit-details-marker { display: none; }
.scm-detail-options-body { padding-top: 8px; }

/* ── デザイン見本・カラー ──────────────────────────────────── */
.scm-design-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.scm-design-choice {
  position: relative;
  cursor: pointer;
}
.scm-design-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.scm-design-choice span {
  display: flex;
  min-height: 74px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: .76rem;
}
.scm-design-choice i {
  display: block;
  width: 44px;
  height: 24px;
  border: 1px solid #d7dde5;
  border-radius: 4px;
  box-shadow: inset 0 -7px 0 rgba(47,111,176,.12);
}
.scm-design-choice-natural i { background:#faf8f1; box-shadow: inset 0 -7px 0 rgba(122,139,92,.15); }
.scm-design-choice-pop i { background:#fffaf3; box-shadow: inset 0 -7px 0 rgba(224,101,79,.15); }
.scm-design-choice-mono i { background:#fff; border-color:#555; box-shadow: inset 0 -7px 0 rgba(58,58,58,.12); }
.scm-design-choice input:checked + span {
  border-color: #2f6fb0;
  box-shadow: 0 0 0 2px rgba(47,111,176,.12);
  color: #1f4f8a;
}
.scm-design-choice input:focus-visible + span {
  outline: 2px solid #2f6fb0;
  outline-offset: 2px;
}

.scm-color-options {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.scm-color-swatch {
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
}
.scm-color-swatch.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6fb0;
}
.scm-custom-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  font-weight: 600;
}
.scm-custom-color input {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
}

/* ── 印刷設定・警告 ────────────────────────────────────────── */
.scm-print-settings {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #fff;
}
.scm-print-settings-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #475569;
  font-size: .8rem;
}
.scm-print-settings-head span { color: #64748b; font-weight: 600; }
.scm-print-mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.scm-print-mode-row label {
  position: relative;
  flex: 1 1 180px;
  cursor: pointer;
}
.scm-print-mode-row input {
  position: absolute;
  opacity: 0;
}
.scm-print-mode-row span {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: .82rem;
  font-weight: 600;
}
.scm-print-mode-row input:checked + span {
  border-color: #2f6fb0;
  background: #eaf2fb;
  color: #1f4f8a;
}
.scm-cut-guide-row { margin: 10px 0 0; }
.scm-overflow-warning {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid #f1d48a;
  border-radius: 8px;
  background: #fffaf0;
  color: #7c5a16;
  font-size: .78rem;
  line-height: 1.55;
}

/* ── レスポンシブ ─────────────────────────────────────────────── */
@media (max-width: 991px) {
  body { padding-bottom: 66px; }

  .scm-seo-header { max-width: 900px; }
  .scm-main-container {
    max-width: 900px;
    grid-template-columns: 1fr;
  }

  .scm-preview-area {
    position: static;
  }

  .scm-mobile-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e4e9f0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  }
  .scm-mobile-action-bar .scm-btn { flex: 1 1 0; min-height: 43px; }

  .scm-preview-toolbar { align-items: stretch; flex-direction: column; }
  .scm-preview-toolbar .scm-btn { width: 100%; }
  .scm-preview-zoom-row { justify-content: flex-start; }
  .scm-zoom-buttons { flex: 1 1 auto; }
  .scm-zoom-btn { flex: 1 1 0; }
}

@media (max-width: 560px) {
  .scm-seo-header h1 { font-size: 1.42rem; }
  .scm-quick-flow { font-size: .77rem; }

  .scm-main-container { gap: 14px; }
  .scm-section-card { padding: 16px; }
  .scm-form-grid { grid-template-columns: 1fr; gap: 0; }
  .scm-design-choices { grid-template-columns: repeat(2, minmax(0,1fr)); }

  .scm-scale-wrap { padding: 25px 8px 10px; }
}

/* ── 印刷 ─────────────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }

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

  .scm-main-container {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .scm-settings-column { display: none !important; }

  .scm-preview-area {
    padding: 0 !important;
    background: none !important;
    border-radius: 0 !important;
  }

  .scm-scale-wrap {
    all: unset !important;
    display: block !important;
  }

  .scm-preview-item {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }

  .scm-sheet {
    width: 210mm;
    height: 296mm;
    margin: 0;
    box-shadow: none;
    transform: none !important;
  }

  .scm-sheet.scm-sheet-solo {
    width: 210mm !important;
    height: 296mm !important;
  }

  .scm-card { box-shadow: none !important; }

  @page { size: A4 portrait; margin: 0; }
}
