/* ============================================================
   見積太郎 ウィザード版 — Crystal Air Theme
   クリスタル / グラスモーフィズム / 透明感
   既存の HTML 構造・JS・クラス名は一切変更不要
   このファイルの内容で <style>...</style> を丸ごと置き換えてください
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   CSS変数
   ============================================================ */
:root {
  --main: var(--estimate-main, #5b6ef5);
  --bg: var(--estimate-bg, #eef2ff);
  --text: var(--estimate-text, #1a1348);
  --muted: var(--estimate-text, #5a4f82);
  --line: rgba(120, 100, 200, 0.13);

  --accent: var(--estimate-accent, #a89fde);
  --accentSoft: var(--estimate-accent-soft, rgba(140, 120, 220, 0.10));
  --accentLine: var(--estimate-accent-line, rgba(180, 160, 240, 0.45));

  --surface: var(--estimate-surface, #d8d0f8);
  --surfaceSoft: var(--estimate-surface-soft, #e4deff);
  --surfaceStrong: var(--estimate-surface-strong, #ede8ff);

  --danger: var(--estimate-danger, rgba(220, 60, 100, 0.08));
  --dangerBorder: var(--estimate-danger-border, rgba(220, 60, 100, 0.28));
  --dangerHover: var(--estimate-danger-hover, rgba(220, 60, 100, 0.14));
  --dangerText: var(--estimate-danger-text, #8b1a3a);

  /* Crystal専用 */
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-border-soft: rgba(255, 255, 255, 0.50);
  --glass-shadow: 0 8px 40px rgba(80, 60, 180, 0.12), 0 2px 8px rgba(80, 60, 180, 0.08);
  --glass-shadow-sm: 0 4px 20px rgba(80, 60, 180, 0.10);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --blur: blur(28px) saturate(180%);
  --blur-sm: blur(16px) saturate(160%);

  --shadow: var(--glass-shadow);
  --shadow2: var(--glass-shadow-sm);
  --radius: 18px;
  --radius2: 24px;
}

/* ============================================================
   リセット
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', 'Meiryo', system-ui, sans-serif;
  letter-spacing: 0.005em;
  color: var(--text);
  /* メッシュグラジェント背景 */
  background:
    radial-gradient(ellipse 90% 70% at 15% 5%, #bfd8ff 0%, transparent 55%),
    radial-gradient(ellipse 80% 65% at 85% 12%, #e0d0ff 0%, transparent 55%),
    radial-gradient(ellipse 75% 70% at 10% 90%, #c0f0e0 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 88% 88%, #ffe0c8 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 50% 50%, #f0e8ff 0%, transparent 65%),
    linear-gradient(160deg, #eef4ff 0%, #f5f0ff 40%, #edfff8 75%, #fff8f0 100%);
  background-attachment: fixed;
}

/* ブラッシュドライト粒エフェクト */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 3px at 20% 30%, rgba(255, 255, 255, 0.65) 0%, transparent 100%),
    radial-gradient(circle 2px at 75% 18%, rgba(255, 255, 255, 0.50) 0%, transparent 100%),
    radial-gradient(circle 4px at 55% 72%, rgba(255, 255, 255, 0.40) 0%, transparent 100%),
    radial-gradient(circle 2px at 88% 60%, rgba(255, 255, 255, 0.55) 0%, transparent 100%),
    radial-gradient(circle 3px at 35% 85%, rgba(255, 255, 255, 0.45) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   WIZARD SHELL — グリッドレイアウト（変更なし）
   ============================================================ */
.wiz-shell {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  grid-template-columns: 1fr 300px;
  grid-template-areas:
    "header  header"
    "body    sidebar"
    "footer  sidebar"
    "sfooter sfooter";
  height: 100dvh;
  min-height: 0;
  position: relative;
  z-index: 1;
}

/* ============================================================
   HEADER — すりガラス白
   ============================================================ */
.wiz-header {
  grid-area: header;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 4px 24px rgba(80, 60, 180, 0.10);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
  flex-shrink: 0;
}

/* ブランド */
.wiz-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.logo.has-image {
  background: rgba(255, 255, 255, 0.92);
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wiz-brand h1 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text);
}

/* ============================================================
   進捗バー
   ============================================================ */
.wiz-progress {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.wiz-pip {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 0;
  min-width: 0;
}

.wiz-pip:last-child {
  flex: 0 0 auto;
}

.pip-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  opacity: .5;
  flex: 0 0 auto;
  transition: border-color .25s, background .25s, color .25s, opacity .25s;
  position: relative;
  z-index: 1;
}

.wiz-pip.done .pip-dot {
  border-color: var(--main);
  background: var(--main);
  color: #fff;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(91, 110, 245, 0.35);
}

.wiz-pip.done .pip-dot::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.wiz-pip.active .pip-dot {
  border-color: var(--main);
  background: rgba(255, 255, 255, 0.88);
  color: var(--main);
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(91, 110, 245, 0.15), var(--glass-shadow-sm);
}

.pip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: .45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  margin-left: 6px;
  transition: opacity .25s;
}

.wiz-pip.active .pip-label,
.wiz-pip.done .pip-label {
  opacity: .85;
}

.pip-line {
  flex: 1 1 auto;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  opacity: .5;
  margin: 0 4px;
  border-radius: 999px;
  transition: background .25s, opacity .25s;
}

.wiz-pip.done .pip-line,
.wiz-pip.done+.wiz-pip .pip-line {
  background: var(--main);
  opacity: .5;
}

/* ヘッダー右：金額ピル */
.wiz-header-amount {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
}

.wiz-header-amount-label {
  font-size: 12px;
  color: var(--muted);
  opacity: .75;
  font-weight: 500;
}

.wiz-header-amount-val {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--text);
}

.taxpill {
  border: 1px solid rgba(100, 80, 200, 0.22);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 700;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease;
}

.taxpill:hover {
  background: rgba(255, 255, 255, 0.90);
}

.taxpill:active {
  transform: translateY(1px);
}

.taxpill-prefix {
  color: var(--muted);
  font-weight: 500;
  opacity: 0.75;
}

/* ============================================================
   BODY — ステップエリア
   ============================================================ */
.wiz-body {
  grid-area: body;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 28px 20px;
  min-height: 0;
}

.wiz-body::-webkit-scrollbar {
  width: 5px;
}

.wiz-body::-webkit-scrollbar-track {
  background: transparent;
}

.wiz-body::-webkit-scrollbar-thumb {
  background: rgba(180, 160, 240, 0.35);
  border-radius: 99px;
}

/* ステップ表示/非表示 */
.wiz-step {
  display: none;
  animation: slideIn .22s ease;
}

.wiz-step.wiz-active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wiz-step.wiz-back {
  animation: slideInBack .22s ease;
}

@keyframes slideInBack {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ステップ見出し */
.wiz-step-head {
  margin-bottom: 22px;
}

.wiz-step-head h2 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.wiz-step-head p {
  font-size: 15px;
  color: var(--muted);
  opacity: .80;
  line-height: 1.65;
  font-weight: 400;
}

/* Step 1: メニュー選択 */
.wiz-menu-wrap {
  max-width: 560px;
}

.select {
  appearance: none;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 18px;
  width: 100%;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.select:focus {
  border-color: rgba(100, 80, 220, 0.50);
  box-shadow: 0 0 0 3px rgba(100, 80, 220, 0.12), var(--glass-shadow-sm), var(--glass-inset);
}

.hint {
  font-size: 14px;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.65;
  opacity: .85;
  font-weight: 400;
}

/* ============================================================
   オプション選択
   ============================================================ */
.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 680px) {
  .opt-grid {
    grid-template-columns: 1fr;
  }
}

.opt {
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  box-shadow: 0 2px 12px rgba(80, 60, 180, 0.07), var(--glass-inset);
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.opt:hover {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(255, 255, 255, 0.90);
  box-shadow: 0 4px 20px rgba(80, 60, 180, 0.12), var(--glass-inset);
}

.opt.opt-qopt {
  flex-wrap: wrap;
  align-items: center;
}

.opt.opt-qopt .meta {
  flex: 1 1 240px;
  min-width: 200px;
}

.opt.opt-qopt .controls {
  margin-left: auto;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.opt.opt-qty {
  flex-wrap: wrap;
  align-items: center;
}

.opt.opt-qty .meta {
  flex: 1 1 240px;
  min-width: 200px;
}

.opt.opt-qty .controls {
  margin-left: auto;
  flex: 0 0 auto;
}

@media (max-width: 420px) {

  .opt.opt-qopt .meta,
  .opt.opt-qty .meta {
    flex: 1 1 100%;
    min-width: 0;
  }

  .opt.opt-qopt .controls,
  .opt.opt-qty .controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.opt .meta {
  flex: 1 1 auto;
  min-width: 0;
}

.opt .name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.opt .desc {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 0;
  line-height: 1.6;
  opacity: .85;
  font-weight: 400;
}

.price {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.80);
  color: rgba(26, 19, 72, 0.88);
  white-space: nowrap;
  margin-top: 7px;
  box-shadow: var(--glass-inset);
}

.price.zero {
  background: rgba(255, 255, 255, 0.40);
  border-color: rgba(255, 255, 255, 0.55);
  color: rgba(26, 19, 72, 0.50);
}

/* ============================================================
   コントロール / 数量入力
   ============================================================ */
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.qty {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: inset 0 2px 6px rgba(80, 60, 180, 0.07);
}

.qty button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  box-shadow: var(--glass-inset);
  transition: background 0.14s ease, transform 0.08s ease;
}

.qty button:hover {
  background: rgba(255, 255, 255, 0.96);
}

.qty button:active {
  transform: translateY(1px);
}

.qty input {
  width: 25px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: center;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  outline: none;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty input[type="number"] {
  -moz-appearance: textfield;
}

.inputline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.field {
  appearance: none;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  transition: border-color .15s, box-shadow .15s;
}

.field:focus {
  border-color: rgba(100, 80, 220, 0.45);
  box-shadow: 0 0 0 3px rgba(100, 80, 220, 0.10), var(--glass-shadow-sm), var(--glass-inset);
}

.radio,
.check {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--main);
}

.note {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
  box-shadow: var(--glass-inset);
}

/* ============================================================
   FOOTER（前へ / 次へ）
   ============================================================ */
.wiz-footer {
  grid-area: footer;
  border-top: 1px solid rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin-top: 20px;
  box-shadow: 0 -4px 20px rgba(80, 60, 180, 0.07);
}

.wiz-footer-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wiz-footer-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wiz-step-counter {
  font-size: 13px;
  color: var(--muted);
  opacity: .65;
  white-space: nowrap;
  font-weight: 400;
}

.wiz-step-counter strong {
  font-weight: 800;
  color: var(--text);
  opacity: 1;
  font-size: 15px;
}

/* ============================================================
   ボタン
   ============================================================ */
a.btn {
  text-decoration: none;
}

.btn {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  transition: background .18s, border-color .18s, filter .16s, box-shadow .18s, transform .10s;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn.is-disabled {
  opacity: .40;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  filter: grayscale(.2);
}

.btn.primary {
  background: var(--main);
  border-color: var(--main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 110, 245, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn.danger {
  background: rgba(255, 245, 248, 0.65);
  border-color: var(--dangerBorder);
  color: #7a1020;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--muted);
}

@media (hover: hover) and (pointer: fine) {
  .btn:not(.primary):not(.danger):hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 28px rgba(80, 60, 180, 0.14), var(--glass-inset);
  }

  .btn.primary:hover {
    filter: brightness(1.10);
    box-shadow: 0 6px 28px rgba(91, 110, 245, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  .btn.danger:hover {
    background: rgba(255, 235, 242, 0.85);
    box-shadow: 0 4px 16px rgba(220, 60, 100, 0.14);
    color: #7a1020;
  }
}

/* 大きい次へ/完了ボタン */
.btn-next {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 20px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn.ghost svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   SIDEBAR（サマリー常時表示）
   ============================================================ */
.wiz-sidebar {
  grid-area: sidebar;
  border-left: 1px solid rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.wiz-sidebar::-webkit-scrollbar {
  width: 4px;
}

.wiz-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.wiz-sidebar::-webkit-scrollbar-thumb {
  background: rgba(180, 160, 240, 0.35);
  border-radius: 99px;
}

/* サマリー合計 */
.sb-total {
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.sb-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .60;
  margin-bottom: 6px;
}

.sb-amount {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--text);
}

.sb-subtext {
  font-size: 13px;
  color: var(--muted);
  opacity: .75;
  margin-top: 6px;
  white-space: pre-line;
  font-weight: 400;
  line-height: 1.6;
}

.sb-pills {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.sb-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(26, 19, 72, 0.78);
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-weight: 500;
  box-shadow: var(--glass-inset);
}

.sb-pill strong {
  color: var(--main);
  font-size: 13px;
  font-weight: 700;
}

/* Tax */
.sb-tax {
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-tax label {
  font-size: 13px;
  color: var(--muted);
  opacity: .85;
  white-space: nowrap;
  font-weight: 500;
}

/* 内訳 */
.sb-breakdown {
  padding: 14px 18px;
  flex: 1 1 auto;
}

.sb-breakdown-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: .55;
  margin-bottom: 8px;
}

/* テーブル */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 7px;
  font-size: 13px;
}

.table td {
  padding: 9px 11px;
  vertical-align: top;
}

.tr {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(80, 60, 180, 0.06), var(--glass-inset);
}

.tr td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.tr td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.footer-note {
  font-size: 12px;
  color: rgba(26, 19, 72, 0.55);
  line-height: 1.75;
  margin-top: 10px;
  font-weight: 400;
}

/* ============================================================
   最終ステップ専用スタイル
   ============================================================ */

.final-meisai-label {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--main);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.80);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border-radius: 999px;
  padding: 7px 16px;
  margin-top: 20px;
  margin-bottom: 10px;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
}

#aiAskBtn.ai-ask-bubble {
  font-size: 15px;
  padding: 14px 16px;
}

#finalBreakdownTable {
  font-size: 14px;
}

#finalBreakdownTable td {
  padding: 11px 13px;
}

/* セクションラベルバッジ化 */
.step-content div.muted {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
  color: var(--main) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.80) !important;
  border-radius: 999px !important;
  padding: 5px 14px !important;
  margin: 20px 0 10px !important;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--glass-inset);
}

/* ============================================================
   AI ask
   ============================================================ */
.sb-ai {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
}

.ai-ask-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-direction: row-reverse;
}

.ai-ask-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  overflow: hidden;
}

.ai-ask-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ai-ask-bubble {
  position: relative;
  display: block;
  width: 100%;
  flex: 1 1 auto;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: var(--text);
  border-radius: 18px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.65;
  cursor: pointer;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  transition: background .16s, box-shadow .16s, transform .12s;
}

.ai-ask-bubble:hover {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 28px rgba(80, 60, 180, 0.14), var(--glass-inset);
  transform: translateY(-1px);
}

.ai-ask-bubble::before {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 16px;
  border-width: 10px 0 10px 12px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.72);
}

.ai-ask-bubble::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 17px;
  border-width: 9px 0 9px 11px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.72);
}

.ai-ask-inline {
  color: var(--main);
  font-weight: 900;
  margin-left: 4px;
}

/* ============================================================
   サイドバーアクションボタン
   ============================================================ */
.sb-actions {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.42);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sb-btn {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: var(--text);
  padding: 10px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  transition: background .16s, border-color .16s, filter .14s, transform .10s;
  text-decoration: none;
  width: 100%;
}

.sb-btn.primary {
  background: var(--main);
  border-color: var(--main);
  color: #fff;
  box-shadow: 0 4px 18px rgba(91, 110, 245, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.sb-btn.danger {
  background: rgba(255, 245, 248, 0.65);
  border-color: var(--dangerBorder);
  color: #7a1020;
}

.sb-btn:active {
  transform: translateY(1px);
}

@media (hover: hover) and (pointer: fine) {
  .sb-btn:not(.primary):not(.danger):hover {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 24px rgba(80, 60, 180, 0.12), var(--glass-inset);
  }

  .sb-btn.primary:hover {
    filter: brightness(1.10);
    box-shadow: 0 6px 24px rgba(91, 110, 245, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .sb-btn.danger:hover {
    background: rgba(255, 235, 242, 0.85);
    color: #7a1020;
  }
}

.sb-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(26, 19, 72, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(20, 10, 60, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s;
  max-width: min(520px, calc(100% - 24px));
  z-index: 9999;
}

.toast.show {
  opacity: 1;
}

/* ============================================================
   モーダル
   ============================================================ */
#textModal .modal-card {
  max-width: 820px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius2);
  box-shadow: 0 16px 60px rgba(60, 40, 160, 0.18);
  overflow: hidden;
}

#textModal .modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.50);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.40);
}

#textModal textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.65;
  box-shadow: inset 0 2px 8px rgba(60, 40, 160, 0.05);
}

/* ============================================================
   SNSアプリ内ブラウザ対策
   ============================================================ */
body.no-blur .wiz-header,
body.no-blur .wiz-footer,
body.no-blur .wiz-sidebar,
body.no-blur .toast,
body.no-blur #textModal .modal-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.no-blur .wiz-header,
body.no-blur .wiz-footer,
body.no-blur .wiz-sidebar {
  background: rgba(255, 255, 255, 0.95) !important;
}

body.no-blur .opt,
body.no-blur .btn,
body.no-blur .sb-btn,
body.no-blur .select,
body.no-blur .field,
body.no-blur .ai-ask-bubble {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ============================================================
   モバイル（≤800px）— 縦積みレイアウト
   ============================================================ */
@media (max-width: 800px) {

  html,
  body {
    overflow: auto;
    height: auto;
  }

  body {
    overflow-x: hidden;
  }

  .wiz-shell {
    grid-template-rows: auto auto auto auto auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "body"
      "sidebar"
      "footer"
      "sfooter";
    height: auto;
    min-height: 100dvh;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .wiz-body {
    overflow: visible;
    padding: 20px 16px 8px;
  }

  .wiz-sidebar {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    overflow: visible;
  }

  .sb-breakdown {
    display: none;
  }

  .sb-ai {
    display: none;
  }

  .sb-actions {
    display: none;
  }

  .wiz-footer {
    padding: 12px 16px;
    margin-top: 0;
  }

  .btn-next {
    padding: 12px 22px;
    font-size: 15px;
  }

  .pip-label {
    display: none;
  }

  .wiz-brand h1 {
    font-size: 13px;
  }

  .wiz-header {
    padding: 0 14px;
    gap: 10px;
    height: 54px;
  }
}

/* ============================================================
   小スマホ（≤480px）
   ============================================================ */
@media (max-width: 480px) {
  .wiz-header {
    padding: 0 10px;
    gap: 7px;
    height: 52px;
  }

  .pip-dot {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .wiz-header-amount {
    padding: 5px 10px 5px 8px;
    gap: 5px;
  }

  .taxpill {
    padding: 4px 7px;
    font-size: 11px;
  }

  .wiz-body {
    padding: 16px 12px 8px;
  }

  .wiz-footer {
    padding: 10px 12px;
    gap: 8px;
  }

  .btn-next {
    padding: 11px 18px;
    font-size: 14px;
  }

  .wiz-footer .btn.ghost {
    padding: 10px 14px;
    font-size: 14px;
  }

  .wiz-step-counter {
    font-size: 11px;
  }

  .wiz-step-counter strong {
    font-size: 13px;
  }

  .sb-total {
    padding: 16px 14px 12px;
  }

  .sb-amount {
    font-size: 30px;
  }

  .sb-pills {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sb-pill {
    font-size: 12px;
    padding: 5px 9px;
  }

  .sb-tax {
    padding: 8px 14px;
  }

  .opt.opt-qty .meta,
  .opt.opt-qopt .meta {
    flex: 1 1 100%;
    min-width: 0;
  }

  .opt.opt-qty .controls,
  .opt.opt-qopt .controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* ============================================================
   極小（≤380px）
   ============================================================ */
@media (max-width: 380px) {
  .logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .wiz-header {
    gap: 6px;
    padding: 0 8px;
  }

  .btn-next {
    padding: 10px 14px;
    font-size: 13px;
  }

  .wiz-step-counter {
    display: none;
  }
}

/* ============================================================
   プレビューバー
   ============================================================ */
.preview-statusbar {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(200, 168, 80, 0.40);
  background: rgba(255, 248, 210, 0.65);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: #6b5500;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
}

.preview-statusbar.active {
  display: block;
}

.preview-statusbar .row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.preview-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(200, 168, 80, 0.50);
  background: rgba(255, 240, 150, 0.70);
  font-weight: 700;
  font-size: 12px;
  color: #6b5500;
}

.preview-clear-btn {
  border: 1px solid rgba(192, 160, 48, 0.50);
  background: rgba(255, 255, 255, 0.65);
  color: #5a4800;
  border-radius: 10px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
}

.preview-clear-btn:hover {
  background: rgba(255, 248, 210, 0.90);
}

.preview-error {
  display: none;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 60, 100, 0.28);
  background: rgba(255, 240, 245, 0.70);
  color: #8b1a3a;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
}

.preview-error.active {
  display: block;
}

/* ============================================================
   JS互換：旧来のID非表示
   ============================================================ */
#fixedBar,
#fixedBarSpacer {
  display: none !important;
}

/* ============================================================
   SAMPLEモード用：画面上の透かし
   ============================================================ */

.sample-watermark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: none;
  overflow: hidden;
}

body.sample-mode .sample-watermark-layer {
  display: block;
}

.sample-watermark-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sample-watermark-track {
  position: absolute;
  top: 4vh;
  left: -14vw;
  width: 145vw;
  display: flex;
  flex-direction: column;
  gap: 72px;
  transform: rotate(-28deg);
  transform-origin: center center;
}

.sample-watermark-row {
  display: flex;
  gap: 72px;
  white-space: nowrap;
}

.sample-watermark-word {
  display: inline-block;
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(26, 19, 72, 0.08);
  user-select: none;
}

/* 本体は透かしより前面へ */
.wiz-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

/* 印刷用透かしは通常表示では隠す */
.print-sample-watermark {
  display: none;
}

/* ============================================================
   印刷
   ============================================================ */
@media print {
  @page {
    size: A4;
    margin: 18mm 20mm;
  }

  html,
  body {
    background: #fff !important;
    overflow: auto !important;
  }

  body::before {
    display: none !important;
  }

  body>*:not(#printArea) {
    display: none !important;
  }

  #printArea {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
  }

  * {
    box-shadow: none !important;
  }

  .sample-watermark-layer {
    display: none !important;
  }

  body.sample-mode #printArea .print-sample-watermark {
    display: block !important;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }

  body.sample-mode #printArea .print-sample-watermark-track {
    position: absolute;
    top: 6%;
    left: -12%;
    width: 132%;
    display: flex;
    flex-direction: column;
    gap: 82px;
    transform: rotate(-28deg);
    transform-origin: center center;
  }

  body.sample-mode #printArea .print-sample-watermark-row {
    display: flex;
    gap: 72px;
    white-space: nowrap;
  }

  body.sample-mode #printArea .print-sample-watermark-word {
    display: inline-block;
    font-size: 58px;
    font-weight: 900;
    letter-spacing: 0.24em;
    color: rgba(20, 30, 60, 0.08);
    user-select: none;
  }

  body.sample-mode #printArea>*:not(.print-sample-watermark) {
    position: relative;
    z-index: 1;
  }
}

/* ============================================================
   サイトフッター
   ============================================================ */
.site-footer {
  grid-area: sfooter;
  border-top: 1px solid rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.40);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}

.site-footer-inner {
  padding: 20px 20px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.site-footer-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.14s ease;
}

.site-footer-link:hover {
  text-decoration: underline;
  color: var(--main);
}

@media (min-width: 801px) {
  .site-footer-inner {
    padding: 13px 20px 10px;
    gap: 8px;
    line-height: 1.3;
    flex-wrap: nowrap;
  }
}

/* ============================================================
   フォーム切替バッジ
   ============================================================ */
.public-form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  color: var(--main);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .02em;
  box-shadow: var(--glass-shadow-sm), var(--glass-inset);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s, box-shadow .16s, transform .10s;
}

.public-form-badge:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(80, 60, 180, 0.14), var(--glass-inset);
}

.public-form-badge:active {
  transform: translateY(1px);
}

/* PC：ステップ見出し横のバッジ */
.wiz-step-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.wiz-step-head-row h2 {
  margin-bottom: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.public-form-badge-inline {
  flex: 0 0 auto;
}

@media (min-width: 801px) {
  .public-form-badge-header {
    display: none;
  }
}

@media (max-width: 800px) {
  .wiz-step-head-row {
    display: block;
    margin-bottom: 0;
  }

  .public-form-badge-inline {
    display: none !important;
  }
}

/* ============================================================
   スマホ：ヘッダー右側レイアウト修正
   ============================================================ */
.wiz-header,
.wiz-brand,
.wiz-progress,
.wiz-header-right,
.wiz-header-amount {
  min-width: 0;
}

.wiz-header-right {
  max-width: 100%;
}

.wiz-header-amount {
  min-width: 0;
}

.wiz-header-amount-val {
  white-space: nowrap;
}

.public-form-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 800px) {
  .wiz-header {
    height: auto;
    min-height: 54px;
    padding: 10px 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 10px;
  }

  .wiz-progress {
    order: 2;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .wiz-header-right {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .public-form-badge {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 120px);
    font-size: 11px;
    min-height: 28px;
    padding: 5px 8px;
    white-space: nowrap;
  }

  .wiz-header-amount {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 5px 9px 5px 8px;
    gap: 5px;
  }

  .pip-label {
    display: none;
  }
}

@media (max-width: 560px) {
  .wiz-header {
    padding: 8px 10px;
    row-gap: 7px;
    column-gap: 8px;
  }

  .wiz-brand {
    flex: 1 1 100%;
  }

  .wiz-brand h1 {
    font-size: 12px;
    max-width: 100%;
  }

  .wiz-header-right {
    gap: 6px;
  }

  .public-form-badge {
    max-width: calc(100% - 112px);
    font-size: 10px;
    padding: 4px 7px;
    min-height: 26px;
  }

  .wiz-header-amount {
    padding: 4px 7px;
    gap: 4px;
  }

  .pip-dot {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .pip-line {
    margin: 0 2px;
  }

  .step-content div.muted {
    display: block !important;
    width: 100%;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.5 !important;
    border-radius: 16px !important;
    padding: 7px 12px !important;
  }
}

@media (max-width: 420px) {
  .wiz-header {
    padding: 8px 8px;
  }

  .wiz-header-right {
    align-items: stretch;
  }

  .public-form-badge {
    max-width: calc(100% - 98px);
    font-size: 10px;
    padding: 4px 6px;
  }

  .taxpill {
    padding: 4px 6px;
    font-size: 10px;
  }

  .pip-dot {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }
}

@media (max-width: 360px) {
  .logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .public-form-badge {
    max-width: calc(100% - 92px);
  }
}

/* ============================================================
   マイナス金額
   ============================================================ */
.price.is-negative,
#breakdownTable td.is-negative,
#finalBreakdownTable td.is-negative,
#monthlyText.is-negative,
#optText.is-negative,
#baseText.is-negative,
#totalText.is-negative,
#topTotalText.is-negative,
#finalTotalText.is-negative,
#finalBaseText.is-negative,
#finalOptText.is-negative,
#finalMonthlyText.is-negative {
  color: #d93025;
  font-weight: 700;
}

/* ============================================================
   qoptions：自動追加項目
   ============================================================ */
.opt.opt-qopt.is-auto {
  border-style: dashed;
  border-color: rgba(180, 160, 240, 0.45);
  background: rgba(240, 235, 255, 0.45);
}

.opt.opt-qopt.is-auto .left-badge {
  width: auto !important;
  min-width: 52px;
  margin-top: 0 !important;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.68);
  color: var(--main);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  opacity: 1 !important;
  box-shadow: var(--glass-inset);
}

.opt.opt-qopt.is-auto .name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.opt.opt-qopt.is-auto .name::after {
  content: "自動追加";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.68);
  color: var(--main);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  box-shadow: var(--glass-inset);
}

.opt.opt-qopt.is-auto .controls {
  display: none !important;
}

.opt.opt-qopt .auto-reason {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--main);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(180, 160, 240, 0.50);
  border-radius: 12px;
  padding: 8px 11px;
}

.opt.opt-qopt .help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.68);
  color: var(--main);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

@media (max-width: 560px) {
  .opt.opt-qopt.is-auto .left-badge {
    min-width: 44px;
    font-size: 9px;
    padding: 2px 7px;
  }

  .opt.opt-qopt .auto-reason {
    font-size: 11px;
    padding: 7px 9px;
  }
}

@media (hover: none),
(pointer: coarse),
(max-width: 1024px) {
  .help-tip {
    display: none !important;
  }
}

/* ============================================================
   サンプル切替ボタン
   - PC：各ステップ見出し右に表示、ヘッダー右上は非表示
   - スマホ/タブレット：ヘッダー右上に表示、見出し横は非表示
   ============================================================ */

/* ヘッダー右側まとめ */
.wiz-header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* サンプル切替ボタン本体 */
.public-sample-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(200, 138, 0, .34);
  background: linear-gradient(180deg, rgba(255, 246, 196, .98), rgba(255, 236, 162, .96));
  color: #6a4b00;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-sample-badge:hover {
  filter: brightness(0.98);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
}

.public-sample-badge:active {
  transform: translateY(1px);
}

/* ステップ見出し行 */
.wiz-step-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.wiz-step-head-row h2 {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.public-sample-badge-inline {
  flex: 0 0 auto;
  align-items: center;
}

/* PCではヘッダー右上を消して、ステップ見出し横だけ使う */
@media (min-width: 801px) {
  .public-sample-badge-header {
    display: none !important;
  }

  .public-sample-badge-inline {
    display: inline-flex !important;
  }
}

/* スマホ・タブレットではヘッダー右上を使い、見出し横は消す */
@media (max-width: 800px) {
  .wiz-step-head-row {
    display: block;
    margin-bottom: 0;
  }

  .public-sample-badge-inline {
    display: none !important;
  }

  .public-sample-badge-header {
    display: inline-flex !important;
  }

  .public-sample-badge {
    font-size: 12px;
    padding: 6px 10px;
    min-height: 30px;
  }
}

@media (max-width: 480px) {
  .public-sample-badge {
    font-size: 11px;
    padding: 5px 8px;
    min-height: 28px;
  }
}
