/* エコノハモバイル 見積・申込フォーム（LPの配色を踏襲） */
:root {
  --primary: #004A98;
  --primary-dark: #003366;
  --accent: #fff100;
  --text: #333;
  --muted: #666;
  --line: #d9e1ea;
  --bg: #f4f7fb;
  --white: #fff;
  --danger: #c62828;
  --au: #eb5505;
  --sb: #1a1a1a;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans JP', sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--primary); }
[hidden] { display: none !important; }

.es-container { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.es-header { background: var(--white); border-bottom: 1px solid var(--line); }
.es-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.es-logo img { height: 34px; width: auto; }
.es-back { font-size: 14px; text-decoration: none; white-space: nowrap; }

.es-main { padding-block: 32px 64px; }
.es-title { font-size: clamp(24px, 4vw, 32px); color: var(--primary-dark); }
.es-lead { color: var(--muted); margin-top: 8px; }

/* 進み具合 */
.es-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; list-style: none; margin: 24px 0; }
.es-steps li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }
.es-steps li span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.es-steps li.is-current { border-color: var(--primary); color: var(--primary-dark); font-weight: 700; }
.es-steps li.is-current span, .es-steps li.is-done span { background: var(--primary); }

.es-panel { background: var(--white); border-radius: 14px; padding: clamp(20px, 4vw, 36px); box-shadow: 0 6px 24px rgba(0, 40, 90, .06); }
.es-h2 { font-size: 22px; color: var(--primary-dark); margin-bottom: 20px; padding-left: 12px; border-left: 5px solid var(--primary); line-height: 1.4; }
.es-h3 { font-size: 18px; margin: 28px 0 12px; }
.es-h3 small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }

.es-field { border: 0; margin-bottom: 22px; min-width: 0; }
.es-label { display: block; font-weight: 700; margin-bottom: 8px; }
.es-label em { font-style: normal; font-size: 11px; background: var(--danger); color: var(--white); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.es-hint, .es-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.es-inline { display: flex; align-items: center; gap: 8px; }
.es-input { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.es-input:focus { outline: 3px solid rgba(0, 74, 152, .2); border-color: var(--primary); }
.es-input-num { width: 110px; }
.es-input.is-invalid { border-color: var(--danger); background: #fff6f6; }
.es-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.es-span2 { grid-column: 1 / -1; }

/* 選択カード */
.es-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.es-cards-3 { grid-template-columns: repeat(3, 1fr); }
.es-cards-4 { grid-template-columns: repeat(4, 1fr); }
.es-cards label { position: relative; cursor: pointer; }
.es-cards input { position: absolute; opacity: 0; pointer-events: none; }
.es-cards span { display: flex; flex-direction: column; justify-content: center; min-height: 64px; height: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .15s, background .15s; }
.es-cards b { font-size: 15px; line-height: 1.4; }
.es-cards small { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.es-cards input:checked + span { border-color: var(--primary); background: #eef4fb; box-shadow: inset 0 0 0 1px var(--primary); }
.es-cards input:focus-visible + span { outline: 3px solid rgba(0, 74, 152, .3); }
.es-cards.is-invalid span { border-color: var(--danger); }
.es-carrier-card { align-items: flex-start; }
.es-logo-docomo { height: 22px; width: auto; }
.es-logo-au { display: inline-block; font-style: normal; font-weight: 700; color: var(--white); background: var(--au); border-radius: 4px; padding: 0 8px; font-size: 16px; line-height: 24px; }

/* 推奨 */
.es-rec { border: 2px solid var(--primary); border-radius: var(--radius); padding: 16px 18px; background: #f5f9ff; }
.es-rec-loading { display: flex; align-items: center; gap: 10px; color: var(--primary-dark); }
.es-spinner { width: 20px; height: 20px; border: 3px solid #c9dbef; border-top-color: var(--primary); border-radius: 50%; animation: es-spin .8s linear infinite; }
@keyframes es-spin { to { transform: rotate(360deg); } }
.es-rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--primary-dark); }
.es-rec-badge { font-size: 12px; background: var(--accent); color: var(--primary-dark); border-radius: 999px; padding: 2px 10px; }
.es-rec-reason { margin-top: 6px; }

/* 明細 */
.es-line { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.es-line-top { display: grid; grid-template-columns: 190px 1fr 110px auto; gap: 10px; align-items: end; }
.es-line-top label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.es-line-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; }
.es-line-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.es-line-opts label.is-disabled { color: #aaa; cursor: not-allowed; }
.es-line-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; color: var(--muted); }
.es-line-foot b { color: var(--text); font-size: 16px; }
.es-line-remove { background: none; border: 0; color: var(--danger); font: inherit; font-size: 14px; cursor: pointer; padding: 10px 4px; }
.es-logo-sb { display: inline-block; font-style: normal; font-weight: 700; color: var(--white); background: var(--sb); border-radius: 4px; padding: 0 8px; font-size: 14px; line-height: 24px; letter-spacing: .02em; }
.es-line-unpriced { font-size: 14px; color: var(--au); margin-top: 8px; }

.es-summary { margin-top: 20px; background: var(--primary-dark); color: var(--white); border-radius: var(--radius); padding: 18px 20px; }
.es-summary-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.es-summary-row b { font-size: 26px; color: var(--accent); }
.es-summary-sub { text-align: right; font-size: 13px; opacity: .85; margin-bottom: 8px; }
.es-summary-note { font-size: 12px; opacity: .85; margin-top: 6px; }
.es-summary .es-error { color: #ffd0d0; }

/* 確認 */
.es-confirm { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15px; }
.es-confirm th, .es-confirm td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.es-confirm th { width: 32%; background: var(--bg); font-weight: 500; }
.es-confirm td { white-space: pre-wrap; word-break: break-word; }

.es-error { color: var(--danger); font-size: 14px; margin-top: 10px; white-space: pre-line; }
.es-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.es-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.es-btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 700; border-radius: 999px; padding: 14px 28px; cursor: pointer; border: 2px solid transparent; text-decoration: none; min-height: 52px; }
.es-btn-primary { background: var(--primary); color: var(--white); margin-left: auto; }
.es-btn-primary:hover { background: var(--primary-dark); }
.es-btn-primary:disabled { background: #9bb3cf; cursor: wait; }
.es-btn-back { background: var(--white); color: var(--muted); border-color: var(--line); }
.es-btn-ghost { background: var(--white); color: var(--primary); border: 2px dashed var(--primary); border-radius: var(--radius); width: 100%; font-size: 15px; }
.es-done { text-align: center; }
.es-done .es-h2 { border: 0; padding: 0; }
.es-done p { margin-bottom: 24px; }
.es-footer { text-align: center; font-size: 12px; color: var(--muted); padding-block: 24px; }

@media (max-width: 720px) {
  .es-steps { grid-template-columns: repeat(4, 1fr); }
  .es-steps li { flex-direction: column; justify-content: center; text-align: center; font-size: 11px; padding: 8px 4px; gap: 4px; line-height: 1.3; }
  .es-cards-3, .es-cards-4 { grid-template-columns: 1fr 1fr; }
  .es-grid { grid-template-columns: 1fr; }
  .es-line-top { grid-template-columns: 1fr 100px; }
  .es-line-top > :nth-child(2) { grid-column: 1 / -1; order: 3; }
  .es-line-top > :nth-child(4) { order: 4; justify-self: end; }
  .es-confirm th, .es-confirm td { display: block; width: 100%; }
  .es-confirm th { border-bottom: 0; padding-bottom: 4px; }
  .es-actions { flex-direction: column-reverse; }
  .es-btn { width: 100%; }
  .es-back { font-size: 12px; }
}
