/* ============================================================
   price-stepwise.css — ステップ式価格選択UIのスタイル
   price-v2.css の**後**に読み込む。.pv2-* の既存クラスを拡張し、
   .tsw-* (ticket-stepwise) 独自クラスを追加する。
   ============================================================ */

/* ------------------------------------------------------------
   ページ全体コンテナ
   price-simulator.css が .price-simulator に max-width:800px を
   かけるので、このページだけ解除。
   サイト共通 chrome (container-2026 = 1200px / padding 24px) と
   揃えるため、wrap も同じ max:1200 / padding:0 24px にする。
   これをずらすとヘッダ/パンくずと本文の左右端が揃わず「崩れて」見える。
   ------------------------------------------------------------ */
/* ステップ式ページで利用する simulator は商品ごとに ID が違う
   (#ticketPriceSimulator / #tagPriceSimulator / #kinkenPriceSimulator 等)。
   :has(.tsw-wrap) で「結果エリアを内包する simulator」に限定して max-width 解除。 */
.price-simulator:has(.tsw-wrap) {
  max-width: none;
  padding: 0;
}
.tsw-wrap {
  /* 既定（リニューアルサイト）: container-2026 に合わせて 1200px センター */
  max-width: var(--container-max, 1200px);
  margin: 24px auto 40px;
  padding: 0 var(--space-5, 24px);
}

/* 現行サイト: Bootstrap `.container` > `.row` > `.col-12` の内側に置かれる。
   .col-12 が既に幅とパディングを持っているので、wrap 側の max-width / padding は解除し、
   カラム全幅を使う（カラム max 1320px, viewport < 1400 では vp-scrollbar 相当）。 */
.container .tsw-wrap {
  max-width: none;
  margin: 24px 0 40px;
  padding: 0;
}

@media (max-width: 640px) {
  .tsw-wrap { padding: 0 16px; }
  .container .tsw-wrap { padding: 0; }
}

.tsw-page-title {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.4;
  margin: 0 0 8px;
  color: var(--pv2-text);
}
.tsw-page-title em {
  font-style: normal;
  color: var(--c-primary, #c78b8b);
  letter-spacing: .02em;
}
.tsw-page-lead {
  font-size: .9rem;
  color: var(--pv2-text-muted);
  margin: 0 0 20px;
}

/* ------------------------------------------------------------
   上段：選択中サマリー（左）+ ステップパネル（右）
   ------------------------------------------------------------ */
.tsw-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  /* 子要素の min-content が grid を押し広げるのを防ぐ（スマホで起きる横スクロール対策） */
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 860px) {
  .tsw-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ------------------------------------------------------------
   左側：選択中の仕様（ステップナビゲーション）
   ------------------------------------------------------------ */
.tsw-spec {
  background: #fff;
  border: 1px solid var(--pv2-border);
  border-radius: 8px;
  padding: 14px 0 8px;
  position: sticky;
  top: 12px;
  min-width: 0; /* grid item が min-content で親を超えないように */
  overflow: hidden;
}
.tsw-spec__title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--pv2-text-muted);
  text-transform: uppercase;
  padding: 0 16px 10px;
  margin: 0;
  border-bottom: 1px solid var(--pv2-border);
}
.tsw-spec__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tsw-spec__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.tsw-spec__item:hover { background: #fafbfc; }
.tsw-spec__item.is-current {
  background: var(--c-primary-veil, #fbeeee);
  border-left-color: var(--c-primary, #c78b8b);
}
.tsw-spec__item.is-done { color: var(--pv2-text); }
.tsw-spec__item.is-pending .tsw-spec__val {
  color: #bbb;
  font-style: italic;
}

.tsw-spec__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9ecef;
  color: #999;
  font-size: .82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Serif JP", serif;
  transition: background .2s, color .2s;
}
.tsw-spec__item.is-current .tsw-spec__num {
  background: var(--c-primary, #c78b8b);
  color: #fff;
}
.tsw-spec__item.is-done .tsw-spec__num {
  background: #e8f5e9;
  color: #2e7d32;
}
.tsw-spec__item.is-done .tsw-spec__num::before {
  content: "\f00c"; /* fa-check */
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
}
.tsw-spec__item.is-done .tsw-spec__num-text { display: none; }

.tsw-spec__body {
  min-width: 0;
}
.tsw-spec__label {
  display: block;
  font-size: .72rem;
  color: var(--pv2-text-muted);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.tsw-spec__val {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--pv2-text);
  line-height: 1.3;
  word-break: break-all;
}
.tsw-spec__edit {
  font-size: .72rem;
  color: var(--c-primary, #c78b8b);
  text-decoration: underline;
  opacity: 0;
  transition: opacity .15s;
}
.tsw-spec__item.is-done:hover .tsw-spec__edit { opacity: 1; }

/* ------------------------------------------------------------
   右側：ステップ本体パネル
   ------------------------------------------------------------ */
.tsw-panel {
  background: #fff;
  border: 1px solid var(--pv2-border);
  border-radius: 8px;
  padding: 24px 24px 20px;
  min-height: 320px;
}
@media (max-width: 600px) {
  .tsw-panel { padding: 16px 14px; }
}

.tsw-step {
  display: none;
  animation: tsw-fade .25s ease-out;
}
.tsw-step.is-active { display: block; }

@keyframes tsw-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tsw-step__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
}
.tsw-step__counter {
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-primary, #c78b8b);
  letter-spacing: .08em;
}
.tsw-step__title {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-weight: 600;
  font-size: 1.3rem;
  margin: 0;
  color: var(--pv2-text);
}
.tsw-step__lead {
  font-size: .86rem;
  color: var(--pv2-text-muted);
  margin: 6px 0 18px;
}
.tsw-step__help {
  display: inline-block;
  font-size: .78rem;
  color: var(--pv2-text-muted);
  margin-left: 6px;
  cursor: help;
}

/* 選択カードグリッド */
.tsw-choice {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
/* minmax(0, 1fr) を使う：カード内の長い日本語（折返し不可の単語）が
   セルの min-content 幅を押し広げて、意図しない列幅になるのを防ぐ */
.tsw-choice--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tsw-choice--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 500px) {
  .tsw-choice { grid-template-columns: minmax(0, 1fr); }
  /* スマホでは 2 カード横並びを維持するが、min 0 で確実に 1:1 に分割 */
  .tsw-choice--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tsw-card {
  position: relative;
  border: 2px solid var(--pv2-border);
  border-radius: 8px;
  background: #fff;
  min-width: 0; /* grid item が min-content で広がらないように */
  overflow-wrap: break-word;
  word-break: break-word;
  /* 既存 .order-method-tab {white-space: nowrap} が継承して子spanで折返し禁止になるのを解除 */
  white-space: normal;
  padding: 16px 16px 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s, transform .1s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 80px;
}
.tsw-card:hover {
  border-color: var(--c-primary, #c78b8b);
  background: var(--c-primary-veil, #fbeeee);
}
.tsw-card:active { transform: translateY(1px); }
.tsw-card.is-active {
  border-color: var(--c-primary, #c78b8b);
  background: var(--c-primary-veil, #fbeeee);
  box-shadow: 0 1px 0 rgba(199, 124, 141, .08), inset 0 0 0 1px var(--c-primary, #c78b8b);
}
.tsw-card.is-active::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", "FontAwesome";
  font-weight: 900;
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--c-primary, #c78b8b);
  font-size: .9rem;
}

.tsw-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--pv2-text);
  line-height: 1.3;
}
.tsw-card__desc {
  font-size: .8rem;
  color: var(--pv2-text-muted);
  line-height: 1.4;
}
.tsw-card__badge {
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--c-primary, #c78b8b);
  color: #fff;
  border-radius: 3px;
  letter-spacing: .04em;
}
.tsw-card__badge--mute {
  background: #6c757d;
}

/* 「人気」「おすすめ」マーク用 */
.tsw-card__hint {
  font-size: .7rem;
  color: var(--c-primary, #c78b8b);
  font-weight: 600;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   ステップフッター（ナビゲーションボタン）
   ------------------------------------------------------------ */
.tsw-step__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
  margin-top: 8px;
}
.tsw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}
.tsw-btn--prev {
  color: var(--pv2-text-muted);
  border-color: var(--pv2-border);
}
.tsw-btn--prev:hover { background: #f8f9fa; color: var(--pv2-text); }
.tsw-btn--next {
  background: var(--c-primary, #c78b8b);
  color: #fff;
  border-color: var(--c-primary, #c78b8b);
  padding: 10px 24px;
}
.tsw-btn--next:hover {
  background: var(--c-primary-hover, #b47474);
  border-color: var(--c-primary-hover, #b47474);
}
.tsw-btn--next:disabled,
.tsw-btn--next.is-disabled {
  background: #ddd;
  border-color: #ddd;
  color: #888;
  cursor: not-allowed;
}

/* ------------------------------------------------------------
   下段：価格一覧マトリクス（単価付き）
   ------------------------------------------------------------ */
.tsw-matrix-wrap {
  margin-top: 32px;
  padding: 20px 20px 24px;
  background: #fff;
  border: 1px solid var(--pv2-border);
  border-radius: 8px;
  position: relative;
}
.tsw-matrix-wrap.is-locked { opacity: .45; pointer-events: none; }
.tsw-matrix-wrap.is-locked::before {
  content: "条件を全て選択すると価格一覧が表示されます";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: var(--pv2-text);
  padding: 10px 18px;
  border: 1px solid var(--pv2-border);
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 600;
  pointer-events: auto;
  opacity: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.tsw-matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.tsw-matrix-title {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0;
  color: var(--pv2-text);
}
.tsw-matrix-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--c-primary, #c78b8b);
  font-weight: 600;
  background: var(--c-primary-veil, #fbeeee);
  padding: 5px 10px;
  border-radius: 3px;
}
.tsw-matrix-note {
  font-size: .8rem;
  color: var(--pv2-text-muted);
  margin: 0 0 14px;
}

/* 単価付きセル */
.price-matrix-table.is-with-unit .matrix-cell {
  padding: 9px 6px;
  line-height: 1.2;
}
.price-matrix-table.is-with-unit .matrix-price {
  font-size: .86rem;
  font-weight: 700;
  color: var(--pv2-text);
  display: block;
}
.price-matrix-table.is-with-unit .matrix-unit {
  display: block;
  font-size: .68rem;
  color: var(--pv2-text-muted);
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: .01em;
}
/* デザインプラン選択時の内訳表示 */
.price-matrix-table.is-with-unit .matrix-unit--plus {
  font-size: .6rem;
  color: var(--pv2-text-muted);
  line-height: 1.2;
  white-space: normal;
}
.price-matrix-table.is-with-unit .matrix-unit__print,
.price-matrix-table.is-with-unit .matrix-unit__plus {
  display: block;
  white-space: nowrap;
}
/* デザインプラン時は内訳が 2 行になるので列幅を引き締める（.has-design-plan 内部のみ） */
.price-matrix-table.is-with-unit.has-design-plan td,
.price-matrix-table.is-with-unit.has-design-plan th {
  white-space: normal;
}
.price-matrix-table.is-with-unit.has-design-plan .matrix-price {
  white-space: nowrap;
}
/* プラン選択時の合計セルは赤系で強調（table 自体に has-design-plan を付与） */
.price-matrix-table.is-with-unit.has-design-plan .matrix-price {
  color: var(--c-danger, #d0342c);
}
.price-matrix-table.is-with-unit .matrix-cell:hover .matrix-price,
.price-matrix-table.is-with-unit .matrix-cell:hover .matrix-unit {
  color: #fff;
}
.price-matrix-table.is-with-unit .matrix-cell.is-selected {
  background: var(--c-primary-veil, #fbeeee) !important;
  box-shadow: inset 0 0 0 2px var(--c-primary, #c78b8b) !important;
}
.price-matrix-table.is-with-unit .matrix-cell.is-selected .matrix-price {
  color: var(--c-primary, #c78b8b);
}
.price-matrix-table.is-with-unit .matrix-cell:hover {
  background: var(--c-primary, #c78b8b) !important;
}

/* クリック案内バッジ */
.matrix-cell .tsw-cta-hint {
  display: none;
  position: absolute;
  bottom: 3px;
  right: 4px;
  font-size: .6rem;
  color: var(--c-primary, #c78b8b);
  font-weight: 700;
  opacity: 0;
  transition: opacity .1s;
}
.matrix-cell:hover .tsw-cta-hint {
  display: block;
  opacity: 1;
  color: #fff;
}

/* ------------------------------------------------------------
   下部のサマリー + CTA
   ------------------------------------------------------------ */
.tsw-summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--c-primary-veil, #fbeeee);
  border: 1px solid var(--c-primary-soft, #f4e2e2);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
@media (max-width: 700px) { .tsw-summary { grid-template-columns: 1fr; } }

.tsw-summary__label {
  font-size: .78rem;
  color: var(--pv2-text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}
.tsw-summary__value {
  font-size: .9rem;
  color: var(--pv2-text);
  font-weight: 500;
  line-height: 1.5;
}
.tsw-summary__total-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tsw-summary__total-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--pv2-text);
  letter-spacing: .04em;
}
.tsw-summary__total {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-danger, #d0342c); /* 赤系で合計額を強調 */
  line-height: 1;
}
.tsw-summary__plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-primary-ink, #8b5656);
  background: #fff;
  border: 1px solid var(--c-primary-soft, #f4e2e2);
  padding: 4px 10px;
  border-radius: 3px;
}
.tsw-summary__plan[hidden] { display: none; }
.tsw-summary__breakdown {
  display: block;
  font-size: .72rem;
  color: var(--pv2-text-muted);
  margin-top: 4px;
  font-weight: 500;
}
.tsw-summary__breakdown[hidden] { display: none; }

/* ------------------------------------------------------------
   マトリクス上のデザインプラン選択中バナー
   ------------------------------------------------------------ */
.tsw-plan-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(90deg, #fbeeee, #fff);
  border: 1px solid var(--c-primary-soft, #f4e2e2);
  border-left: 4px solid var(--c-primary, #c78b8b);
  border-radius: 4px;
  margin: 0 0 12px;
  font-size: .86rem;
}
.tsw-plan-banner[hidden] { display: none; }
.tsw-plan-banner__icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-primary, #c78b8b);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .92rem;
}
.tsw-plan-banner__title {
  font-weight: 700;
  color: var(--pv2-text);
  margin-bottom: 2px;
}
.tsw-plan-banner__title #tswPlanBannerName,
.tsw-plan-banner__title span {
  color: var(--c-primary-ink, #8b5656);
}
.tsw-plan-banner__desc {
  font-size: .78rem;
  color: var(--pv2-text-muted);
  line-height: 1.4;
}
.tsw-plan-banner__change {
  background: transparent;
  border: 1px solid var(--c-primary, #c78b8b);
  color: var(--c-primary, #c78b8b);
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
.tsw-plan-banner__change:hover {
  background: var(--c-primary, #c78b8b);
  color: #fff;
}

.tsw-summary__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #f08c28;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(240,140,40,.25);
}
.tsw-summary__cta:hover {
  background: #d77a1a;
  color: #fff;
  box-shadow: 0 3px 12px rgba(240,140,40,.35);
}
.tsw-summary__cta:disabled,
.tsw-summary__cta.is-disabled {
  background: #ddd; color: #888; cursor: not-allowed;
}

/* ------------------------------------------------------------
   デザイン依頼プラン（step5 内で表示）
   ------------------------------------------------------------ */
/* プラン未選択エラー（バリデーション） */
.tsw-plan-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: .88rem;
  font-weight: 600;
  animation: tsw-fade .2s ease-out;
}
.tsw-plan-error i { font-size: 1rem; }
.design-plan-select.is-error .tsw-plan__card {
  animation: tsw-shake .35s ease-in-out;
}
@keyframes tsw-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.tsw-plan {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.tsw-plan__card {
  border: 2px solid var(--pv2-border);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.tsw-plan__card:hover { border-color: var(--c-primary, #c78b8b); background: var(--c-primary-veil, #fbeeee); }
.tsw-plan__card.is-active {
  border-color: var(--c-primary, #c78b8b);
  background: var(--c-primary-veil, #fbeeee);
}
.tsw-plan__name { font-weight: 700; font-size: .95rem; }
.tsw-plan__price { font-size: .82rem; color: var(--pv2-text-muted); margin-top: 2px; }
.tsw-plan__price--free { color: #2e7d32; font-weight: 700; }

/* 段階的開示（加工の「その他を表示」） */
.tsw-more {
  display: none;
  grid-column: 1 / -1;
}
.tsw-more.is-open { display: contents; }
.tsw-more-toggle {
  grid-column: 1 / -1;
  padding: 10px;
  font-size: .85rem;
  color: var(--c-primary, #c78b8b);
  background: transparent;
  border: 1px dashed var(--c-primary, #c78b8b);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}
.tsw-more-toggle:hover { background: var(--c-primary-veil, #fbeeee); }

/* ------------------------------------------------------------
   プロトタイプ表示（ページ冒頭の注意バー）
   ------------------------------------------------------------ */
.tsw-proto-bar {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #78350f;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: .85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tsw-proto-bar i { font-size: 1rem; }

/* ============================================================
   ウィザードオーバーレイ（グラフィック風・フルスクリーン別画面）
   ============================================================ */
.tsw-wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 32, 0.55);
  z-index: 1000;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease-out;
}
.tsw-wizard-overlay.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tsw-wizard-frame {
  background: #fff;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  max-height: 100vh;
}
@media (min-width: 700px) {
  .tsw-wizard-overlay { padding: 24px; }
  .tsw-wizard-frame {
    max-height: calc(100vh - 48px);
    border-radius: 4px;
  }
}
.tsw-wizard-frame__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--pv2-border);
  background: var(--c-bg-alt, #faf8f5);
}
.tsw-wizard-frame__head-counter {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-primary, #c78b8b);
}
.tsw-wizard-frame__head-title {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--pv2-text);
  margin: 0;
  line-height: 1.3;
}
.tsw-wizard-frame__close {
  background: transparent;
  border: 1px solid var(--pv2-border);
  color: var(--pv2-text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: background .15s, border-color .15s;
}
.tsw-wizard-frame__close:hover {
  background: var(--c-primary-veil, #fbeeee);
  border-color: var(--c-primary, #c78b8b);
  color: var(--c-primary, #c78b8b);
}

/* プログレスドット（上部） */
.tsw-wizard-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 20px 8px;
}
.tsw-wizard-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: background .2s, transform .2s;
}
.tsw-wizard-progress__dot.is-current {
  background: var(--c-primary, #c78b8b);
  transform: scale(1.3);
}
.tsw-wizard-progress__dot.is-done { background: #8fbf8f; }
.tsw-wizard-progress__bar {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin: 0 2px;
}
.tsw-wizard-progress__bar.is-done { background: #8fbf8f; }

/* ウィザード本体 (内部のステップ) */
.tsw-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 24px;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
  .tsw-wizard-body { padding: 18px 16px; }
  .tsw-wizard-frame__head { padding: 12px 14px; }
  .tsw-wizard-progress { padding: 10px 14px 4px; }
}
.tsw-wizard-body .tsw-step__head { margin-bottom: 8px; }
.tsw-wizard-body .tsw-step__title { font-size: 1.5rem; }
.tsw-wizard-body .tsw-step__lead { margin-bottom: 20px; }

.tsw-wizard-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--pv2-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  gap: 12px;
}
.tsw-wizard-foot .tsw-btn { padding: 12px 20px; font-size: .95rem; }

/* ============================================================
   ビジュアライズされた選択カード
   ============================================================ */
.tsw-choice--visual {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  max-width: 100%;
}
.tsw-choice--visual.tsw-choice--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* SP 中サイズ: 2カラム維持しつつパディング縮小で見切れ防止 */
@media (max-width: 500px) {
  .tsw-choice--visual { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tsw-card--visual { padding: 12px 8px 10px; }
  .tsw-card--visual .tsw-card__name { font-size: .92rem; }
  .tsw-card--visual .tsw-card__desc,
  .tsw-card--visual .tsw-card__hint { font-size: .72rem; }
}
/* 極小スマホ: 2カラムだと見切れる幅なので1カラムへ折返し */
@media (max-width: 400px) {
  .tsw-choice--visual { grid-template-columns: minmax(0, 1fr); }
  .tsw-choice--visual.tsw-choice--2 { grid-template-columns: minmax(0, 1fr); }
}
/* ウィザード本体もオーバーフロー遮断 */
.tsw-wizard-body { max-width: 100%; overflow-x: hidden; }

.tsw-card--visual {
  padding: 16px 14px 14px;
  align-items: center;
  text-align: center;
}
.tsw-card--visual .tsw-card__name { font-size: 1.02rem; }
.tsw-card--visual .tsw-card__desc,
.tsw-card--visual .tsw-card__hint { text-align: center; }

/* カード内のビジュアルブロック (SVG/illust) */
.tsw-card__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--c-bg-alt, #faf8f5);
  border-radius: 4px;
  color: var(--pv2-text);
  flex-shrink: 0;
}
.tsw-card--visual.is-active .tsw-card__visual {
  background: var(--c-primary-veil, #fbeeee);
  color: var(--c-primary, #c78b8b);
}

/* サイズビジュアル：実寸比の矩形 */
.tsw-vis-size {
  background: #fff;
  border: 1.5px dashed currentColor;
  border-radius: 2px;
  position: relative;
  opacity: .7;
  box-sizing: border-box;
}
.tsw-vis-size[data-size="s"] {
  width: min(148px, 80%);
  aspect-ratio: 148 / 50;
}
.tsw-vis-size[data-size="l"] {
  width: min(185px, 100%);
  aspect-ratio: 185 / 65;
}
/* サイズビジュアル専用：ラベル表示のため overflow を visible に */
.tsw-card__visual:has(.tsw-vis-size) { overflow: visible; }
.tsw-card--visual.is-active .tsw-vis-size {
  border-color: var(--c-primary, #c78b8b);
  opacity: 1;
}
.tsw-vis-size::after {
  content: attr(data-dim);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  color: var(--pv2-text-muted);
  white-space: nowrap;
  letter-spacing: .02em;
}

/* 用紙ビジュアル：光沢/マット/クラフトのスウォッチ */
.tsw-vis-paper {
  width: 82px;
  height: 62px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.6);
}
.tsw-vis-paper[data-paper="coat135"] {
  background: linear-gradient(135deg, #ffffff 0%, #f4f4f2 40%, #ffffff 70%);
  box-shadow: 0 2px 6px rgba(0,0,0,.12), inset 0 1px 2px rgba(255,255,255,.9);
}
.tsw-vis-paper[data-paper="mat110"] {
  background: linear-gradient(135deg, #f8f6f0 0%, #ede9de 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.02);
}
.tsw-vis-paper[data-paper="krft"] {
  background:
    repeating-linear-gradient(
      90deg,
      #c7a57a 0,
      #c7a57a 2px,
      #b79167 2px,
      #b79167 4px
    );
  box-shadow: 0 1px 3px rgba(0,0,0,.15) inset;
}
.tsw-vis-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 50%, rgba(255,255,255,.25) 55%, transparent 60%);
  pointer-events: none;
}

/* 色数ビジュアル：CMYK + モノクロ表現 */
.tsw-vis-colors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tsw-vis-colors__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.tsw-vis-colors__side-label {
  font-size: .62rem;
  color: var(--pv2-text-muted);
  letter-spacing: .05em;
}
.tsw-vis-colors__dots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 34px;
}
.tsw-vis-colors__dot {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: #eee;
}
.tsw-vis-colors__dot--c { background: #00a3c4; }
.tsw-vis-colors__dot--m { background: #e94e8a; }
.tsw-vis-colors__dot--y { background: #f2c94c; }
.tsw-vis-colors__dot--k { background: #1a1a20; }
.tsw-vis-colors__dot--blank {
  background: repeating-linear-gradient(
    45deg,
    #fff 0 3px,
    #e5e5e5 3px 4px
  );
  border: 1px solid #ddd;
}
.tsw-vis-colors__divider {
  width: 1px;
  height: 24px;
  background: var(--pv2-border);
}

/* 加工ビジュアル：チケットSVG風 */
.tsw-vis-proc {
  width: 100px;
  height: 56px;
  position: relative;
}
.tsw-vis-proc__ticket {
  width: 100%;
  height: 100%;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.tsw-vis-proc__ticket::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0,0,0,.06);
  transform: translateY(-50%);
}
.tsw-vis-proc__mishin {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 62%;
  width: 0;
  border-left: 1.5px dashed var(--c-primary, #c78b8b);
}
.tsw-vis-proc__number {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: .62rem;
  font-weight: 700;
  color: var(--c-primary, #c78b8b);
  font-family: "Courier New", monospace;
  background: var(--c-primary-veil, #fbeeee);
  padding: 0 3px;
  border-radius: 2px;
}
.tsw-vis-proc__title {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: .6rem;
  letter-spacing: .03em;
  color: rgba(0,0,0,.35);
}

/* 印刷データ方法ビジュアル */
.tsw-vis-order {
  font-size: 2.8rem;
  color: var(--pv2-text-muted);
  opacity: .75;
}
.tsw-card--visual.is-active .tsw-vis-order { color: var(--c-primary, #c78b8b); opacity: 1; }

/* ----------------------------------------------------------------
   STEP 5 用イラスト — データ入稿 / デザインを頼む の CSS アート
   （単色の FA アイコンより情報量のあるビジュアル）
   ---------------------------------------------------------------- */
.tsw-vis-order2 {
  position: relative;
  width: 88px;
  height: 64px;
  margin: 0 auto;
}
/* データ入稿: 書類 + 上向き矢印 */
.tsw-vis-order2--upload::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 6px;
  width: 44px;
  height: 52px;
  background: #fff;
  border: 1.5px solid var(--pv2-text-muted);
  border-radius: 3px;
  box-shadow: 2px 2px 0 0 rgba(0, 0, 0, .05);
}
.tsw-vis-order2--upload::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 16px;
  width: 28px;
  height: 2px;
  box-shadow:
    0 0 0 0 var(--pv2-text-muted),
    0 8px 0 0 var(--pv2-text-muted),
    0 16px 0 0 var(--pv2-text-muted);
  background: var(--pv2-text-muted);
}
/* 矢印アイコン（上向き）を 擬似的に SVG 風で表現 */
.tsw-vis-order2--upload .tsw-vis-order2__arrow {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background: var(--c-primary, #c78b8b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.tsw-card--visual.is-active .tsw-vis-order2--upload::before {
  border-color: var(--c-primary, #c78b8b);
}

/* デザインを頼む: パレット + 筆 + きらめき */
.tsw-vis-order2--design {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tsw-vis-order2--design .tsw-vis-order2__palette {
  position: relative;
  width: 64px;
  height: 48px;
  background: linear-gradient(135deg, #f7d9d9 0%, #efb8b8 100%);
  border-radius: 50% 50% 46% 54% / 60% 60% 40% 40%;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .08);
}
.tsw-vis-order2--design .tsw-vis-order2__palette::before,
.tsw-vis-order2--design .tsw-vis-order2__palette::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 10px;
  height: 10px;
}
.tsw-vis-order2--design .tsw-vis-order2__palette::before {
  left: 12px; top: 10px;
  background: #6ba4d6;
  box-shadow:
    14px 0 0 0 #e8c252,
    28px 4px 0 0 #8bbf6f;
}
.tsw-vis-order2--design .tsw-vis-order2__palette::after {
  left: 8px; bottom: 8px;
  background: #d67a7a;
  box-shadow:
    16px 2px 0 0 #b86fb0;
}
/* きらめき（*） */
.tsw-vis-order2--design .tsw-vis-order2__sparkle {
  position: absolute;
  font-size: 12px;
  color: var(--c-primary, #c78b8b);
  line-height: 1;
}
.tsw-vis-order2--design .tsw-vis-order2__sparkle--a { top: 2px; right: 10px; }
.tsw-vis-order2--design .tsw-vis-order2__sparkle--b { bottom: 4px; right: 4px; font-size: 10px; }
.tsw-card--visual.is-active .tsw-vis-order2--design .tsw-vis-order2__palette {
  background: linear-gradient(135deg, var(--c-primary-soft, #f4e2e2) 0%, var(--c-primary, #c78b8b) 100%);
}

/* ----------------------------------------------------------------
   kaisuken 回数券サイズ専用ビジュアル — 綴り枚数の違いを見せる
   6枚綴りは各セルを大きく、11枚綴りは密集させて「枚数が多い」感を出す
   ---------------------------------------------------------------- */
.tsw-vis-kaisuken {
  position: relative;
  width: min(210px, 94%);
  aspect-ratio: 210 / 70;
  background: #fffef9;
  border: 1.5px solid var(--pv2-text-muted);
  border-radius: 3px;
  opacity: .9;
  display: grid;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.06);
}
/* 上下の装飾帯（回数券らしい見出し/台紙風） */
.tsw-vis-kaisuken::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: linear-gradient(135deg, var(--c-primary-soft, #f4e2e2) 0%, var(--c-primary-veil, #fbeeee) 100%);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.tsw-vis-kaisuken__cell {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: .62rem;
  color: var(--pv2-text);
  font-weight: 700;
  letter-spacing: .02em;
  z-index: 1;
}
.tsw-vis-kaisuken__cell + .tsw-vis-kaisuken__cell {
  /* ミシン目（縦方向の破線） */
  border-left: 1.2px dashed #94a3b8;
}
.tsw-vis-kaisuken[data-kaisuken="6"] {
  grid-template-columns: repeat(6, 1fr);
}
.tsw-vis-kaisuken[data-kaisuken="6"] .tsw-vis-kaisuken__cell {
  font-size: .72rem;
}
.tsw-vis-kaisuken[data-kaisuken="11"] {
  grid-template-columns: repeat(11, 1fr);
}
.tsw-vis-kaisuken[data-kaisuken="11"] .tsw-vis-kaisuken__cell {
  font-size: .5rem;
  padding-bottom: 2px;
}
/* 最右セル（半券風に薄い色の帯） */
.tsw-vis-kaisuken__cell:last-child {
  background: repeating-linear-gradient(
    45deg,
    rgba(199, 139, 139, .1),
    rgba(199, 139, 139, .1) 3px,
    transparent 3px,
    transparent 6px
  );
}
.tsw-card--visual.is-active .tsw-vis-kaisuken {
  border-color: var(--c-primary, #c78b8b);
  opacity: 1;
}
.tsw-card--visual.is-active .tsw-vis-kaisuken__cell {
  color: var(--c-primary-ink, #8b5656);
}
.tsw-card--visual.is-active .tsw-vis-kaisuken__cell + .tsw-vis-kaisuken__cell {
  border-left-color: var(--c-primary, #c78b8b);
}
/* 寸法ラベル */
.tsw-vis-kaisuken::after {
  content: attr(data-dim);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  color: var(--pv2-text-muted);
  white-space: nowrap;
  letter-spacing: .02em;
}
.tsw-card__visual:has(.tsw-vis-kaisuken) { overflow: visible; padding-bottom: 18px; }

/* ----------------------------------------------------------------
   プラン未選択エラー（step 5）
   ---------------------------------------------------------------- */
.tsw-plan-error {
  background: #fef2f2;
  color: var(--c-danger, #d0342c);
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   モーダル（デザインセレクト確認等）
   ============================================================ */
.tsw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 32, 0.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: tsw-fade-in .2s ease-out;
}
.tsw-modal-backdrop.is-open { display: flex; }

@keyframes tsw-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tsw-modal {
  background: #fff;
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative;
  animation: tsw-modal-in .22s ease-out;
}
@keyframes tsw-modal-in {
  from { transform: translateY(12px) scale(.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.tsw-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-primary-veil, #fbeeee);
  color: var(--c-primary, #c78b8b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin: 0 auto 14px;
}
.tsw-modal__title {
  font-family: var(--font-serif, "Noto Serif JP", serif);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px;
  color: var(--pv2-text);
  line-height: 1.4;
}
.tsw-modal__lead {
  font-size: .9rem;
  color: var(--pv2-text-muted);
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.6;
}
.tsw-modal__flow {
  background: var(--c-bg-alt, #faf8f5);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.tsw-modal__flow-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: start;
  gap: 10px;
  padding: 6px 0;
  font-size: .88rem;
  color: var(--pv2-text);
}
.tsw-modal__flow-item + .tsw-modal__flow-item {
  border-top: 1px dashed #e5e5e5;
}
.tsw-modal__flow-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-primary, #c78b8b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
}
.tsw-modal__flow-label { font-weight: 600; margin-bottom: 2px; }
.tsw-modal__flow-desc { font-size: .78rem; color: var(--pv2-text-muted); }

.tsw-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.tsw-modal__btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}
.tsw-modal__btn--cancel {
  color: var(--pv2-text-muted);
  border-color: var(--pv2-border);
}
.tsw-modal__btn--cancel:hover {
  background: #f8f9fa;
  color: var(--pv2-text);
}
.tsw-modal__btn--ok {
  background: var(--c-primary, #c78b8b);
  color: #fff;
  border-color: var(--c-primary, #c78b8b);
}
.tsw-modal__btn--ok:hover {
  background: var(--c-primary-hover, #b47474);
  border-color: var(--c-primary-hover, #b47474);
}

/* ============================================================
   選択結果モード：左サマリー「すべて変更」ボタン + DLボタン
   ============================================================ */
.tsw-spec__change-all {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px 4px;
  padding: 9px 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-primary, #c78b8b);
  background: transparent;
  border: 1px solid var(--c-primary, #c78b8b);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.tsw-spec__change-all:hover {
  background: var(--c-primary-veil, #fbeeee);
}
.tsw-spec__change-all i { margin-right: 4px; }

/* 見積もりPDF DLボタン */
.tsw-summary__secondary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tsw-summary__pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 20px;
  background: #fff;
  color: var(--c-primary, #c78b8b);
  border: 2px solid var(--c-primary, #c78b8b);
  border-radius: 4px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  font-family: inherit;
}
.tsw-summary__pdf:hover {
  background: var(--c-primary-veil, #fbeeee);
}

/* ウィザード起動前：結果エリアは隠す */
.tsw-result-area { display: none; }
.tsw-result-area.is-visible {
  display: block;
  /* スマホで内部のグリッドや長文が layout viewport を広げないように囲って遮断 */
  max-width: 100%;
  overflow-x: hidden;
}


/* ============================================================
   共通：下段コンパクトサマリ / 加工バナー・バッジ / 横スクロールヒント
   （全 stepwise 商品で共通利用）
   ============================================================ */
.tsw-kako-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #fff8f0 0%, #fef0e0 100%);
  border: 1px solid #e9c79a;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(180,120,50,.08);
}
.tsw-kako-banner__icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #d4943a; color: #fff;
  border-radius: 50%; flex-shrink: 0;
}
.tsw-kako-banner__body { flex: 1; min-width: 0; }
.tsw-kako-banner__title { font-weight: 700; font-size: .95rem; color: #7a5a1f; }
.tsw-kako-banner__fee {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  background: #d4943a; color: #fff; border-radius: 10px;
  font-size: .82rem; font-weight: 700;
}
.tsw-kako-banner__desc { font-size: .82rem; color: #94774a; margin-top: 2px; }
.tsw-kako-banner__change {
  padding: 6px 10px; background: transparent; border: 1px solid #c98d42;
  color: #7a5a1f; font-size: .78rem; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.tsw-kako-banner__change:hover { background: #f3e0c0; }
.tsw-summary__kako {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: #fef0e0; color: #7a5a1f;
  border: 1px solid #e9c79a; border-radius: 12px;
  font-size: .82rem; font-weight: 600; margin-left: 8px;
}
.tsw-summary__breakdown { display: block; font-size: .78rem; color: #888; margin-top: 4px; }

.tsw-summary--compact {
  padding: 12px 16px !important;
  /* 元の .tsw-summary は display: grid + grid-template-columns: 1fr auto
     なので block にリセットして縦積みレイアウトを強制 */
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}
.tsw-summary__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.tsw-summary__row + .tsw-summary__row { margin-top: 10px; }
.tsw-summary__row--conditions {
  justify-content: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e3e3e3;
}
.tsw-summary__row--meta {
  gap: 10px;
  font-size: .82rem;
  color: #5a5a5a;
  flex-wrap: wrap;
  min-height: 0;
}
.tsw-summary__row--meta:empty { display: none; }
.tsw-summary__row--actions {
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e3e3e3;
}
.tsw-summary--compact .tsw-summary__value--mini { font-size: .82rem; color: #555; font-weight: 500; }
.tsw-summary__qf { display: inline-flex; align-items: center; gap: 6px; }
.tsw-summary__qf-label { font-size: .72rem; font-weight: 700; color: #3d4654; white-space: nowrap; }
.tsw-summary__qf-select {
  padding: 6px 24px 6px 8px; border: 1px solid #c9c9c9; border-radius: 6px;
  font-size: .88rem; font-weight: 600; background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1L5 5L9 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 6px center;
  appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 88px;
}
.tsw-summary__qf-select:focus { outline: 2px solid #f08c28; outline-offset: -1px; }
.tsw-summary__qf-input {
  width: 72px; padding: 6px 8px; border: 1px solid #d8d8d8; border-radius: 5px;
  font-size: .88rem; font-weight: 700; text-align: right;
}
.tsw-summary__qf-input:focus { outline: 2px solid #f08c28; outline-offset: -1px; }
.tsw-summary__qf-unit { font-size: .76rem; color: #666; }
.tsw-summary__total-block { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.tsw-summary--compact .tsw-summary__total-label { font-size: .72rem; color: #777; }
.tsw-summary--compact .tsw-summary__total { font-size: 1.6rem; font-weight: 800; color: #c43b3b; letter-spacing: .02em; }
.tsw-summary--compact .tsw-summary__breakdown { font-size: .7rem; color: #888; margin-top: 2px; }

@media (max-width: 768px) {
  .tsw-summary__row--conditions { flex-direction: column; align-items: stretch; gap: 8px; }
  .tsw-summary__qf { justify-content: space-between; }
  .tsw-summary__total-block { margin-left: 0; align-items: flex-start; border-top: 1px dashed #e3e3e3; padding-top: 6px; }
  .tsw-summary__row--actions { justify-content: stretch; }
  .tsw-summary__row--actions .tsw-summary__cta { flex: 1 1 auto; justify-content: center; }
}

/* マトリクス横スクロールヒント（SP のみ） */
.tsw-matrix-scroll-hint {
  display: none; font-size: .78rem; color: #a97a3a;
  background: #fff6e8; border: 1px dashed #e9c79a; border-radius: 6px;
  padding: 6px 10px; margin: 6px 0 8px;
  text-align: center; font-weight: 600;
  animation: tswScrollHintPulse 1.6s ease-in-out infinite;
}
@keyframes tswScrollHintPulse { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
@media (max-width: 768px) { .tsw-matrix-scroll-hint { display: block; } }

.tsw-summary__change-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 18px; background: #fff; color: #555;
  border: 1.5px solid #c9c9c9; border-radius: 4px;
  font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.tsw-summary__change-all:hover { background: #f6f6f6; border-color: #aaa; }

/* ============================================================
   SP: 選択中仕様サイドバーのコンパクト化 + 価格表スクロール誘導
   ウィザード完了後、スマホでは spec が縦に長く、ユーザーが
   価格表まで辿り着かない問題への対処。spec を横並びチップに畳み、
   直下に「↓ 価格表」ボタンを追加して誘導する。
   ============================================================ */
@media (max-width: 860px) {
  .tsw-spec {
    padding: 10px 12px 10px;
    position: static;
    border-radius: 6px;
  }
  .tsw-spec__title {
    font-size: .68rem;
    padding: 0 0 6px;
    margin: 0 0 6px;
    letter-spacing: .04em;
  }
  .tsw-spec__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .tsw-spec__item {
    display: inline-flex;
    grid-template-columns: none;
    padding: 5px 10px;
    gap: 4px;
    border: 1px solid var(--pv2-border);
    border-left: 1px solid var(--pv2-border);
    border-radius: 999px;
    background: #fff;
    font-size: .8rem;
    min-height: 0;
    align-items: baseline;
  }
  .tsw-spec__item:hover { background: var(--c-primary-veil, #fbeeee); }
  .tsw-spec__item.is-current {
    background: var(--c-primary-veil, #fbeeee);
    border-left: 1px solid var(--c-primary, #c78b8b);
    border-color: var(--c-primary, #c78b8b);
  }
  .tsw-spec__num { display: none; }
  .tsw-spec__body {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
  }
  .tsw-spec__label {
    font-size: .7rem;
    margin-bottom: 0;
    letter-spacing: 0;
    color: var(--pv2-text-muted);
    font-weight: 600;
  }
  .tsw-spec__label::after { content: ":"; margin-left: 1px; }
  .tsw-spec__val {
    font-size: .82rem;
    font-weight: 700;
  }
  .tsw-spec__edit { display: none; }
  .tsw-spec__change-all {
    width: 100%;
    margin: 10px 0 0;
    padding: 8px 10px;
    font-size: .78rem;
  }
}

/* 価格表へスクロールする誘導ボタン（SP のみ表示・ウィザード完了後に可視化） */
.tsw-scroll-to-matrix {
  display: none;
  width: 100%;
  margin: 10px 0 4px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #f08c28 0%, #e07a18 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 8px rgba(240, 140, 40, .35);
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: tsw-bob 1.4s ease-in-out infinite;
}
.tsw-scroll-to-matrix i { font-size: 1rem; }
.tsw-scroll-to-matrix:active { transform: translateY(1px); }
@keyframes tsw-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (max-width: 860px) {
  .tsw-scroll-to-matrix { display: inline-flex; }
}
/* PC では冗長なので完全非表示（スマホ限定機能） */
@media (min-width: 861px) {
  .tsw-scroll-to-matrix { display: none !important; }
}
