* { box-sizing: border-box; }
:root {
  --ink: #17324d;
  --muted: #6d7b87;
  --line: #dce4ea;
  --bg: #f5f8fa;
  --accent: #1f7a8c;
  --accent-dark: #155d6b;
  --white: #fff;
  --danger: #b42318;
}
body {
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
.hero {
  background: linear-gradient(135deg, #12344d, #1f7a8c);
  color: white;
  padding: 44px 20px;
}
.hero-inner, .container { max-width: 980px; margin: 0 auto; }
.brand { letter-spacing: .12em; font-weight: 700; opacity: .9; }
.hero h1 { margin: 8px 0 4px; font-size: clamp(1.8rem, 4vw, 3rem); }
.hero p { margin: 0; opacity: .92; }
.container { padding: 28px 16px 60px; }
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 18px;
}
.step {
  padding: 10px 8px; text-align: center; font-size: .88rem;
  color: var(--muted); border-bottom: 3px solid var(--line);
}
.step.active { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.panel {
  background: var(--white); border-radius: 16px; padding: 30px;
  box-shadow: 0 12px 32px rgba(24, 50, 77, .08);
}
.form-step { display: none; }
.form-step.active { display: block; }
h2 { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
label, legend { font-weight: 700; }
input, select, textarea {
  width: 100%; margin-top: 7px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: white; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(31,122,140,.15); border-color: var(--accent);
}
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: auto; margin: 0; }
.product-list { display: grid; gap: 12px; margin-bottom: 24px; }
.product-card {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.product-card h3, .product-card p { margin: 0; }
.product-card label { width: 110px; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.actions.right { justify-content: flex-end; }
button {
  border: 0; border-radius: 10px; padding: 13px 22px;
  font: inherit; font-weight: 700; cursor: pointer;
}
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: #e9eff3; color: var(--ink); }
.link-button { background: transparent; color: var(--accent); padding: 4px 0; }
.hidden { display: none !important; }
.summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.summary-row { display: grid; grid-template-columns: 180px 1fr; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row dt, .summary-row dd { margin: 0; padding: 12px 14px; }
.summary-row dt { background: #f3f6f8; font-weight: 700; }
.notice { background: #eef7f8; border-left: 4px solid var(--accent); padding: 14px 16px; margin: 20px 0; }
.consent { margin: 14px 0; }
.signature-wrap { margin-top: 24px; }
#signaturePad {
  width: 100%; height: 220px; display: block; margin-top: 8px;
  border: 2px dashed #aab8c2; border-radius: 10px; background: white; touch-action: none;
}
.signature-actions { text-align: right; }
.complete { text-align: center; padding: 20px 0; }
.complete-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--accent); color: white; display: grid; place-items: center;
  font-size: 38px; font-weight: 700;
}
.order-number { font-size: 1.5rem; font-weight: 800; letter-spacing: .05em; margin: 10px 0 20px; }
.error { color: var(--danger); margin-top: 10px; }
footer { text-align: center; padding: 28px; color: var(--muted); }
.pdf-template {
  position: fixed; left: -99999px; top: 0; width: 794px;
  background: white; color: #111; padding: 48px; font-family: "Yu Gothic", sans-serif;
}
.pdf-header { display: flex; justify-content: space-between; border-bottom: 2px solid #222; margin-bottom: 24px; }
.pdf-table { width: 100%; border-collapse: collapse; }
.pdf-table th, .pdf-table td { border: 1px solid #999; padding: 10px; text-align: left; }
.pdf-table th { width: 180px; background: #f3f3f3; }
.pdf-footer { margin-top: 24px; font-size: 12px; }

@media (max-width: 700px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 20px 16px; }
  .grid.two { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .product-card { align-items: flex-end; }
  .summary-row { grid-template-columns: 1fr; }
  .summary-row dt { padding-bottom: 5px; }
  .summary-row dd { padding-top: 5px; }
  .actions { flex-direction: column-reverse; }
  .actions button { width: 100%; }
}

.policy-group{display:grid;gap:12px;margin:20px 0}.policy-box{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}.policy-box summary{padding:15px 17px;font-weight:700;cursor:pointer;background:#f5f8fa;list-style-position:inside}.policy-box[open] summary{border-bottom:1px solid var(--line)}.policy-content{padding:18px;font-size:.95rem}.policy-content h3{margin:0 0 2px}.policy-content h4{margin:18px 0 4px}.policy-content p{margin:4px 0}.policy-version{color:var(--muted);font-size:.86rem}

/* Ver.6 商品カード・価格表示 */
.product-intro { margin-bottom: 18px; }
.product-intro p { margin: 4px 0; }
.price-note { color: var(--muted); font-size: .92rem; }
.product-card-v6 { display: block; padding: 22px; }
.product-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.product-heading h3 { margin: 2px 0; }
.model-code { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #eef7f8; color: var(--accent-dark); font-size: .78rem; font-weight: 800; letter-spacing: .05em; }
.list-price { flex: 0 0 auto; text-align: right; font-size: 1.28rem; font-weight: 800; }
.list-price span { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.color-quantity-list { display: grid; }
.color-quantity-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 15px 0; border-bottom: 1px dashed var(--line); }
.color-quantity-row:last-child { border-bottom: 0; }
.color-quantity-row label { width: 110px; }
.color-quantity-row input { text-align: center; }
.sku { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.model-total { text-align: right; margin: 8px 0 0; color: var(--accent-dark); }
.order-total-box { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; margin: 18px 0 26px; padding: 18px 20px; border: 2px solid var(--accent); border-radius: 12px; background: #f4fbfc; }
.order-total-box > span { font-weight: 700; }
.order-total-box > strong { font-size: 1.5rem; }
.order-total-box small { grid-column: 1 / -1; color: var(--muted); }
.preserve-lines { white-space: pre-line; }
.pdf-price-notice { margin-top: 18px; padding: 12px 14px; border: 1px solid #aaa; background: #fafafa; font-size: 12px; }
.pdf-price-notice p { margin: 4px 0 0; }
.optional-field { opacity: .92; }

@media (max-width: 700px) {
  .product-heading, .color-quantity-row { align-items: stretch; flex-direction: column; }
  .list-price { text-align: left; }
  .color-quantity-row label { width: 100%; }
}


/* Ver.6.1 見積書受領確認 */
.quote-confirmation-box { margin: 22px 0; padding: 20px; border: 2px solid var(--accent); border-radius: 14px; background: #f4fbfc; }
.quote-confirmation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quote-confirmation-heading h3 { margin: 0; }
.quote-confirmation-heading span { padding: 3px 9px; border-radius: 999px; background: white; color: var(--accent-dark); font-size: .78rem; font-weight: 700; }
.quote-received-check { padding: 12px 14px; border-radius: 10px; background: white; font-weight: 700; }
.quote-number-field { display: block; margin-top: 14px; }
.quote-confirmation-box > p { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
@media (max-width: 700px) { .quote-confirmation-heading { align-items: flex-start; flex-direction: column; } }
