.page { padding: 22px 24px 100px; gap: 16px; }
.customer-heading { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.customer-heading h1 { margin: 0; font-size: 22px; }
.customer-heading p, .customer-help { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.customer-controls { display: flex; gap: 10px 20px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.customer-controls [role="group"] { display: flex; gap: 6px; flex-wrap: wrap; }
.customer-type { border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; border-radius: 20px; font: inherit; cursor: pointer; }
.customer-type[aria-pressed="true"] { background: var(--accent-ink); border-color: var(--accent-ink); color: white; font-weight: 700; }
.customer-radius select { font: inherit; padding: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; }
.customer-pick { display: flex; gap: 8px; align-items: baseline; }
.customer-pick small { color: var(--muted); font-size: 11px; }
.customer-grid { columns: 3; column-gap: 18px; }
.customer-grid > .customer-card { break-inside: avoid; margin-bottom: 18px; }
.customer-selection { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.customer-selection label { font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.customer-selection input { width: 18px; height: 18px; }
#selection-count { color: var(--muted); margin: 0; font-size: 13px; }
.customer-footer { position: fixed; bottom: 0; right: 0; left: 220px; padding: 12px 24px; background: white; border-top: 1px solid var(--line); text-align: right; z-index: 20; }
.customer-cta { display: inline-block; text-decoration: none; padding: 12px 20px; border-radius: 7px; color: white; background: var(--accent-ink); font-weight: 700; }
.customer-cta:hover { color: white; }
.customer-cta[aria-disabled="true"] { opacity: .5; cursor: default; }
.customer-map { max-width: 760px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.customer-map summary { cursor: pointer; margin-bottom: 12px; }
.nav-item[data-nav="customer"] .label { white-space: normal; line-height: 1.4; }
@media (min-width: 768px) and (max-width: 1099px) { .customer-footer { left: 64px; } }
@media (max-width: 1199px) { .customer-grid { column-count: 2; } }
@media (max-width: 767px) {
  .page { padding: 16px 14px 100px; }
  .customer-grid { column-count: 1; }
  .customer-footer { bottom: calc(62px + env(safe-area-inset-bottom)); left: 0; padding: 10px 14px; }
  .customer-cta { width: 100%; text-align: center; box-sizing: border-box; }
  .topbar { position: static; }
  .nav-item[data-nav="customer"] .label { font-size: 10px; text-align: center; }
}
@media print { .customer-footer, .customer-controls, .customer-selection { display: none; } .customer-grid { columns: 1; } .customer-card { margin-bottom: 20px; } }

.card-toggle { float: right; display: flex; align-items: center; gap: 5px; font-size: 12px; margin: 0 0 8px 10px; }
.card-toggle input { width: 18px; height: 18px; }
@media print { .card-toggle { display: none; } }
.customer-appendix { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.customer-appendix summary { cursor: pointer; }
.customer-appendix .appendix-figures { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* 線分図（ものさし・ゲージ・経路）は伸ばしすぎない（2026-10-06 オーナー指摘） */
.ch-svg.ch-compact { display: block; width: 100%; max-width: 440px; height: auto; }

.customer-heading, .customer-appendix, .customer-pick, .topbar-title { min-width: 0; overflow-wrap: anywhere; }
.customer-pick { flex-wrap: wrap; white-space: normal; max-width: 100%; }
.topbar-actions { min-width: 0; flex-wrap: wrap; }

/* セット作成画面。内容の選択は1回、出口は2つ。 */
.page { font-family: var(--sans); max-width: 1400px; }
.customer-heading h1 { font-family: var(--serif); }
.template-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.template-choice { min-width: 0; padding: 18px; text-align: left; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; overflow-wrap: anywhere; }
.template-choice strong, .template-choice small { display: block; }
.template-choice small { margin-top: 8px; color: var(--muted); font-size: 12px; }
.template-choice[aria-pressed="true"] { border: 2px solid var(--accent); padding: 17px; background: var(--accent-soft, #edf5f1); }
#set-status { margin: 0; color: var(--accent-ink); font-size: 14px; }
.set-panel { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); min-width: 0; }
.set-panel > summary { cursor: pointer; font-weight: 700; }
.set-panel[open] > summary { margin-bottom: 20px; }
.set-panel .customer-controls { margin: 16px 0; }
.set-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.set-fields label, .template-name { display: grid; gap: 6px; font-size: 14px; }
.set-fields select, .template-name input { min-width: 0; max-width: 100%; padding: 10px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.template-name { margin: 16px 0; max-width: 480px; }
.set-items { list-style: none; padding: 0; margin-bottom: 0; }
.set-items li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-items label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.set-items input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.set-item-options { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.set-items button:disabled { opacity: .35; cursor: default; }
.set-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.set-preview section { min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.set-preview h3 { font-size: 16px; margin-top: 0; }
.set-preview ol { font-size: 14px; line-height: 1.9; padding-left: 24px; }
.customer-footer { display: flex; gap: 12px; justify-content: flex-end; }
.customer-cta { font-family: var(--sans); }
.customer-cta:first-child { color: var(--accent-ink); background: var(--accent-soft, #edf5f1); }
@media (max-width: 1199px) { .template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .template-choice { padding: 12px; }
  .template-choice[aria-pressed="true"] { padding: 11px; }
  .set-fields, .set-preview { grid-template-columns: 1fr; }
  .set-items li { flex-wrap: wrap; }
  .set-item-name { flex-basis: 100%; }
  .set-item-options { margin-left: auto; }
  .customer-footer .customer-cta { width: auto; flex: 1; padding: 12px 8px; }
  .nav-item .label { white-space: normal; font-size: 10px; }
}
/* 裏の背景はホームと同じ白い面に（2026-10-07 オーナー指摘） */
.shell { background: var(--surface); }
/* 裏の背景はホームと同じ白い面に（2026-10-07 オーナー指摘） */
.shell { background: var(--surface); }
