/* =========================================================
   Studio RockyMouse — お申し込み・ご契約について（見積りページ／発行後ページ共通）
   style.css に依存しない自己完結の部品
   ========================================================= */
.q-terms { padding: clamp(40px, 6vw, 72px) 16px clamp(48px, 7vw, 88px); background: #f5f7fb; }
.q-terms__box {
  max-width: 1040px; margin: 0 auto; background: #fff; border: 1.5px solid #d9dee8; border-top: 4px solid #c9a54a;
  border-radius: 20px; padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 56px); box-shadow: 0 14px 40px rgba(15,27,45,0.08);
  color: #1b2430; font-size: 0.95rem; line-height: 1.75;
}
.q-terms__eyebrow { display: inline-block; font-size: 0.72rem; letter-spacing: 0.22em; font-weight: 700; color: #a9862e; text-transform: uppercase; margin-bottom: 6px; }
.q-terms h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 0 0 14px; color: #0f1b2d; letter-spacing: 0.01em; }
.q-terms h3 { font-size: 1.08rem; margin: 34px 0 10px; padding-left: 12px; border-left: 4px solid #c9a54a; color: #0f1b2d; }
.q-terms p { margin: 0 0 10px; color: #3a4453; }
.q-terms a { color: #1e5aa8; }

/* 項目表 */
.q-terms__table { margin: 18px 0 6px; border: 1px solid #e3e7ef; border-radius: 12px; overflow: hidden; }
.q-terms__row { display: grid; grid-template-columns: 170px 1fr; }
.q-terms__row + .q-terms__row { border-top: 1px solid #e3e7ef; }
.q-terms__row b { background: #f3f5f9; padding: 12px 14px; font-weight: 700; color: #0f1b2d; font-size: 0.9rem; }
.q-terms__row span { padding: 12px 16px; color: #3a4453; font-size: 0.92rem; }

/* 流れ */
.q-terms__steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: st; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 22px; }
.q-terms__steps li { counter-increment: st; position: relative; padding: 8px 10px 8px 44px; background: #f8f9fc; border-radius: 10px; font-size: 0.92rem; }
.q-terms__steps li::before { content: counter(st); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #b8923a, #e7cf8a, #c9a54a); color: #1b2430; font-weight: 800; font-size: 0.8rem; display: grid; place-items: center; }

/* 自動見積もり結果 */
.q-result { margin: 34px 0 8px; border: 2px solid #c9a54a; border-radius: 16px; padding: clamp(18px, 3vw, 28px); background: linear-gradient(180deg, #fffdf7, #fff); }
.q-result h3 { margin-top: 0; border-left-color: #0f1b2d; }
.q-result__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 6px 0 12px; }
.q-result__cell { background: #0f1b2d; color: #fff; border-radius: 12px; padding: 14px 16px; }
.q-result__cell small { display: block; font-size: 0.74rem; color: rgba(255,255,255,0.72); margin-bottom: 4px; }
.q-result__cell b { display: block; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.q-result__cell em { display: block; font-style: normal; font-size: 0.74rem; color: #e7cf8a; margin-top: 2px; }
.q-result__cell--main { background: linear-gradient(135deg, #16243a, #0f1b2d); border: 1px solid rgba(231,207,138,0.5); }
.q-result__wait { color: #6b7380; font-size: 0.9rem; margin: 4px 0 10px; }
.q-result__notes { margin: 8px 0 14px; padding: 0; list-style: none; font-size: 0.82rem; color: #4b5563; }
.q-result__notes li { margin-bottom: 3px; }
.q-result__agree { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px dashed #c9a54a; border-radius: 10px; background: #fff; font-size: 0.92rem; cursor: pointer; }
.q-result__agree input { width: 20px; height: 20px; margin-top: 2px; accent-color: #c9a54a; flex: none; }
.q-result__actions { margin-top: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.q-result__hint { font-size: 0.8rem; color: #b45309; }

/* ボタン（自己完結） */
.q-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s; }
.q-btn--gold { background: linear-gradient(135deg, #b8923a 0%, #e7cf8a 50%, #c9a54a 100%); color: #1b2430; box-shadow: 0 10px 26px rgba(201,165,74,0.35); }
.q-btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(201,165,74,0.45); }
.q-btn--gold[aria-disabled="true"] { opacity: 0.45; box-shadow: none; cursor: not-allowed; transform: none; }
.q-btn--navy { background: #0f1b2d; color: #fff; }
.q-btn--navy:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,27,45,0.3); }
.q-terms__cta { margin-top: 18px; }

@media (max-width: 720px) {
  .q-terms__box { border-radius: 14px; }
  .q-terms__row { grid-template-columns: 1fr; }
  .q-terms__row b { padding: 9px 12px 6px; font-size: 0.86rem; }
  .q-terms__row span { padding: 0 12px 12px; }
  .q-terms__steps { grid-template-columns: 1fr; }
  .q-result__grid { grid-template-columns: 1fr; }
  .q-btn { width: 100%; }
}
@media print { .q-terms { display: none !important; } }
/* 日本語の折り返し: 文節の切れ目で改行し、語の途中で切らない */
.q-terms p, .q-terms__row span, .q-terms__steps li, .q-result__notes li, .q-result__agree { word-break: auto-phrase; overflow-wrap: break-word; }
.q-terms .nw { white-space: nowrap; }
/* 日本語の文節の途中で折り返さない（「料金」が「料｜金」で割れるのを防ぐ） */
.q-terms p, .q-terms__row span, .q-terms__steps li, .q-result__notes li, .q-result__agree { word-break: auto-phrase; overflow-wrap: anywhere; line-break: strict; }

/* ---------- 着手金のお支払い方法（結果ブロック内） ---------- */
.q-pay { margin: 14px 0 6px; padding: 14px 16px 12px; border-radius: 12px; background: #fff; border: 1px solid #e3e7ef; }
.q-pay h4 { margin: 0 0 8px; font-size: 0.95rem; color: #0f1b2d; }
.q-pay__line { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #f3f5f9; font-size: 0.9rem; color: #1b2430; }
.q-pay__line b { color: #0f1b2d; }
.q-pay__line.is-card { background: rgba(30,136,229,0.08); border: 1px solid rgba(30,136,229,0.25); }
.q-pay__line.is-bank { background: rgba(201,165,74,0.10); border: 1px solid rgba(201,165,74,0.4); }
.q-pay__table { border: 1px solid #e3e7ef; border-radius: 10px; overflow: hidden; font-size: 0.86rem; }
.q-pay__row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 8px 12px; align-items: center; }
.q-pay__row + .q-pay__row { border-top: 1px solid #eef1f6; }
.q-pay__row--head { background: #0f1b2d; color: #fff; font-weight: 700; font-size: 0.8rem; }
.q-pay__tag { display: inline-block; font-style: normal; font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin: 2px 4px 2px 0; }
.q-pay__tag--card { background: rgba(30,136,229,0.12); color: #1e5aa8; }
.q-pay__tag--bank { background: rgba(201,165,74,0.16); color: #7d6320; }
.q-pay__tag.is-soon { background: #eef1f6; color: #6b7380; }
.q-pay__note { margin: 10px 0 0; font-size: 0.78rem; color: #6b7380; }
@media (max-width: 720px) {
  .q-pay__row { grid-template-columns: 1fr; gap: 2px; }
  .q-pay__row--head { display: none; }
  .q-pay__row span:nth-child(2) { color: #6b7380; font-size: 0.82rem; }
}

/* ---------- お支払いプランの選択 ---------- */
.q-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 6px 0 12px; }
.q-plan label { font-weight: 700; font-size: 0.9rem; color: #0f1b2d; }
.q-plan select { font: inherit; font-size: 0.92rem; padding: 9px 12px; border: 1.5px solid #c9a54a; border-radius: 10px; background: #fff; color: #1b2430; max-width: 100%; }
.q-plan__hint { font-size: 0.78rem; color: #6b7380; }
.q-result__grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (max-width: 720px) { .q-plan select { width: 100%; } }
