/* ==========================================================================
   買取額診断（3段階フォーム／FVの入力ボックス／PC右の固定カード／スマホ下の固定ボタン）
   色は既存LPに合わせる：青 #0342ab ／ オレンジ #ef6723
========================================================================== */

/* ----- 診断フォーム本体 ----- */
.dg {
  background: linear-gradient(142deg, #035dab 0%, #0342ab 100%);
  padding: 56px 0 64px;
  font-feature-settings: "palt";
  scroll-margin-top: 80px;
}
.dg *, .dgk *, .dgf *, .dgv * { box-sizing: border-box; }
.dg__inner { max-width: 640px; margin: 0 auto; padding: 0 16px; text-align: center; color: #fff; }
.dg__en { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .2em; color: rgba(255,255,255,.55); }
.dg__ttl { margin: 6px 0 10px; font-size: 28px; line-height: 1.35; font-weight: 800; color: #fff; }
.dg__ttl span { display: inline-block; margin-top: 6px; font-size: 20px; color: #ffd36a; }
.dg__badge { display: inline-block; margin: 0 0 22px; padding: 5px 16px; border-radius: 999px; background: #fff; color: #0342ab; font-size: 14px; font-weight: 700; }
.dg__badge b { color: #ef6723; font-size: 16px; }
.dg__alt { margin: 18px 0 0; font-size: 14px; }
.dg__alt a { color: #fff; font-size: 22px; font-weight: 800; text-decoration: none; letter-spacing: .02em; }

.dg-form { background: #fff; color: #333; border-radius: 14px; padding: 22px 22px 26px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.dg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dg-steps { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; }
.dg-steps li { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: #8b94a7; padding-top: 8px; border-top: 4px solid #dfe5f2; }
.dg-steps li.is-on { color: #0342ab; border-top-color: #ef6723; }
.dg-alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #fff0ee; color: #b03030; font-size: 13px; font-weight: 700; }

.dg-f { display: block; margin: 0 0 16px; font-size: 14px; font-weight: 700; color: #222; }
.dg-f__label { display: block; margin-bottom: 6px; }
.dg-f em { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 3px; background: #b03030; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.dg-f em.is-opt { background: #6c7883; }
.dg-f small { display: block; margin-top: 5px; font-size: 12px; font-weight: 400; color: #636d7d; }
.dg-f input[type=text], .dg-f input[type=tel], .dg-f input[type=email], .dg-f input[type=number], .dg-f select {
  display: block; width: 100%; margin-top: 6px; padding: 13px 12px; border: 1.5px solid #ccc; border-radius: 8px; background: #fff; font-size: 16px; font-weight: 400; color: #333; -webkit-appearance: none; appearance: none;
}
.dg-f select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230342ab' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.dg-f input:focus, .dg-f select:focus { outline: none; border-color: #0342ab; box-shadow: 0 0 0 3px rgba(3,66,171,.15); }
.dg-f.is-bad input, .dg-f.is-bad select { border-color: #b03030; background: #fff8f7; }
.dg-num { position: relative; display: block; }
.dg-num input { padding-right: 48px; font-size: 22px; font-weight: 800; }
.dg-num i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: #0342ab; }
.dg-f .dg-num input { margin-top: 0; }

.dg-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dg-chips--2 { grid-template-columns: repeat(2, 1fr); }
.dg-chips label { position: relative; display: block; margin: 0; }
.dg-chips input { position: absolute; opacity: 0; pointer-events: none; }
.dg-chips span { display: block; padding: 12px 4px; text-align: center; border: 1.5px solid #ccc; border-radius: 8px; font-size: 14px; font-weight: 700; color: #333; cursor: pointer; background: #fff; }
.dg-chips input:checked + span { border-color: #0342ab; background: #eaf1ff; color: #0342ab; box-shadow: inset 0 0 0 1px #0342ab; }
.dg-chips input:focus-visible + span { outline: 3px solid rgba(3,66,171,.3); }

.dg-btn { display: block; width: 100%; margin-top: 6px; padding: 16px 12px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ff8a45, #ef6723); box-shadow: 0 4px 0 #c04a0f; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .03em; cursor: pointer; }
.dg-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #c04a0f; }
.dg-btn[disabled] { opacity: .6; pointer-events: none; }
.dg-back { display: block; margin: 14px auto 0; background: none; border: 0; color: #636d7d; font-size: 13px; text-decoration: underline; cursor: pointer; }
.dg-note { margin: 10px 0 0; text-align: center; font-size: 12px; color: #636d7d; }
.dg-note a { color: #0342ab; }
.dg-err { margin: 0 0 8px; color: #b03030; font-size: 13px; font-weight: 700; text-align: center; }
.dg-p3lead { margin: 0 0 16px; font-size: 14px; line-height: 1.7; }
.dg-p3lead b { color: #0342ab; }
.dg-pane[hidden], .dg [hidden] { display: none !important; }

.dg-result { text-align: center; padding: 18px 8px 16px; border-radius: 12px; background: #f1f5fd; border: 2px solid #cfdcf6; }
.dg-r-label { margin: 0; font-size: 14px; font-weight: 700; color: #0342ab; }
.dg-r-amt { margin: 4px 0 2px; font-weight: 900; color: #0342ab; line-height: 1.2; font-size: 38px; letter-spacing: .01em; }
.dg-r-amt i { font-style: normal; margin: 0 4px; font-size: 26px; }
.dg-r-amt small { font-size: 18px; margin-left: 3px; }
.dg-r-sub { margin: 0; font-size: 13px; color: #636d7d; }
.dg-r-fast { margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.dg-r-fast b { color: #ef6723; font-size: 18px; }
.dg-r-cap { margin: 10px 2px 14px; font-size: 12px; color: #636d7d; line-height: 1.6; }

/* ----- FV：売掛金を入れて診断 ----- */
.dgv { max-width: 640px; margin: 4px auto 20px; padding: 16px 16px 12px; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(3,66,171,.18); text-align: center; color: #0342ab; }
.dgv__lead { margin: 0 0 10px; font-size: 14px; font-weight: 700; line-height: 1.5; }
.dgv__lead span { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: #ef6723; color: #fff; font-size: 12px; }
.dgv__lead b { font-size: 20px; font-weight: 900; }
.dgv__box { display: flex; gap: 10px; align-items: stretch; }
.dgv__in { position: relative; flex: 0 0 44%; display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 2px solid #0342ab; border-radius: 10px; background: #fff; }
.dgv__in span { font-size: 12px; font-weight: 800; color: #0342ab; white-space: nowrap; }
.dgv__in input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 0; font-size: 22px; font-weight: 900; text-align: right; color: #333; }
.dgv__in i { flex: none; white-space: nowrap; font-style: normal; font-size: 13px; font-weight: 800; }
.dgv__in span { flex: none; }
.dgv__btn { flex: 1; border: 0; border-radius: 10px; background: linear-gradient(180deg, #ff8a45, #ef6723); box-shadow: 0 3px 0 #c04a0f; color: #fff; font-size: 16px; font-weight: 800; padding: 12px 8px; cursor: pointer; line-height: 1.3; }
.dgv__note { margin: 8px 0 0; font-size: 11px; color: #636d7d; }

/* ----- PC：右に固定する診断カード（1280px以上） ----- */
.dgk { position: fixed; right: 20px; top: 96px; width: 300px; z-index: 900; color: #0342ab; font-feature-settings: "palt"; transition: transform .35s ease, opacity .35s ease; }
.dgk[hidden] { display: none; }
.dgk.is-hide { transform: translateX(120%); opacity: 0; pointer-events: none; }
.dgk__box { background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(3,66,171,.25); overflow: hidden; }
.dgk__hd { position: relative; margin: 0; padding: 11px 34px 11px 12px; background: #0342ab; color: #fff; text-align: center; font-size: 13px; font-weight: 800; }
.dgk__x { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 14px; line-height: 24px; padding: 0; cursor: pointer; }
.dgk__bd { padding: 14px 16px 12px; }
.dgk__sub { margin: 0; text-align: center; font-size: 13px; font-weight: 800; }
.dgk__tt { margin: 2px 0 10px; text-align: center; font-size: 24px; font-weight: 900; }
.dgk__pg { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.dgk__pg i { width: 30px; height: 4px; border-radius: 2px; background: #dfe5f2; }
.dgk__pg i.is-on { background: #ef6723; }
.dgk__q { margin: 0 0 10px; text-align: center; font-size: 15px; font-weight: 900; }
.dgk__ch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dgk__ch.c3 { grid-template-columns: 1fr; }
.dgk__ch button { padding: 11px 4px; border: 1.5px solid #cfdcf6; border-radius: 10px; background: #fff; color: #0342ab; font-size: 14px; font-weight: 800; cursor: pointer; }
.dgk__ch button:hover { border-color: #ef6723; background: #fff7f1; }
.dgk__num { position: relative; display: block; margin-top: 8px; }
.dgk__num input { width: 100%; padding: 12px 40px 12px 12px; border: 1.5px solid #cfdcf6; border-radius: 10px; font-size: 16px; color: #333; }
.dgk__num input:focus { outline: none; border-color: #0342ab; }
.dgk__num i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; font-weight: 800; }
.dgk__err { margin: 6px 0 0; color: #b03030; font-size: 12px; font-weight: 700; text-align: center; }
.dgk__go { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ff8a45, #ef6723); box-shadow: 0 3px 0 #c04a0f; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.dgk__back { display: block; margin: 8px auto 0; background: none; border: 0; color: #7a86a3; font-size: 12px; text-decoration: underline; cursor: pointer; }
.dgk__tel { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e6eaf3; text-align: center; }
.dgk__tel a { color: #0342ab; font-size: 22px; font-weight: 900; text-decoration: none; }
.dgk__tel small { display: block; font-size: 11px; color: #6b7590; }
.dgk-tab { position: fixed; right: 0; top: 45%; z-index: 900; writing-mode: vertical-rl; padding: 16px 10px; border: 0; border-radius: 10px 0 0 10px; background: linear-gradient(180deg, #ff8a45, #ef6723); color: #fff; font-size: 15px; font-weight: 900; letter-spacing: .12em; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.dgk-tab[hidden] { display: none; }
.dgk-tab small { font-size: 11px; color: #fff3c4; }
@media (max-width: 1279px) { .dgk, .dgk-tab { display: none !important; } }

/* ----- スマホ：下に固定するボタン ----- */
.dgf { display: none; }
@media (max-width: 767px) {
  .dgf { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); box-shadow: 0 -4px 14px rgba(0,0,0,.12); transition: transform .3s ease; }
  .dgf.is-hide { transform: translateY(110%); }
  .dgf__main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 6px; border-radius: 999px; background: linear-gradient(180deg, #ff8a45, #ef6723); box-shadow: 0 3px 0 #c04a0f; color: #fff; font-size: 17px; font-weight: 800; line-height: 1.2; text-decoration: none; }
  .dgf__main small { font-size: 11px; font-weight: 700; color: #fff3c4; }
  .dgf__tel { flex: 0 0 76px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #0342ab; color: #fff; font-size: 15px; font-weight: 800; text-decoration: none; }
  body { padding-bottom: 76px; }
  .dg { padding: 40px 0 48px; }
  .dg__ttl { font-size: 24px; }
  .dg__ttl span { font-size: 18px; }
  .dg-form { padding: 18px 16px 22px; }
  .dg-r-amt { font-size: 32px; }
  .dgv { margin: 2px 12px 16px; padding: 14px 12px 10px; }
  .dgv__lead b { display: block; font-size: 19px; }
  .dgv__box { flex-direction: column; }
  .dgv__in { flex: none; }
}
