/* Insurance application form (test page) - page-specific styles */

.page-insurance-form {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.7;
  color: #222;
  background: #f5f7fa;
  -webkit-text-size-adjust: 100%;
}

.page-insurance-form *,
.page-insurance-form *::before,
.page-insurance-form *::after {
  box-sizing: border-box;
}

.page-insurance-form a { color: #2e6e9e; text-decoration: none; }
.page-insurance-form a:hover { text-decoration: underline; }

/* Skip link */
.if-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}
.if-skip-link:focus {
  position: fixed;
  left: 10px;
  top: 10px;
  background: #fff;
  padding: 8px 12px;
  border: 2px solid #2e6e9e;
  z-index: 1000;
}

/* Header / footer (lightweight test chrome) */
.if-site-header {
  background: #fff;
  border-bottom: 1px solid #d8e1eb;
  padding: 14px 0;
}
.if-header-inner { display: flex; align-items: center; }
.if-site-title {
  margin: 0;
  font-size: 1.68rem;
  font-weight: 700;
}
.if-site-title a { color: #2b5a85; }

.if-site-footer {
  margin-top: 60px;
  padding: 18px 0;
  background: #2b3e52;
  color: #dfe7ef;
  text-align: center;
}

/* Layout container */
.if-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.if-main { padding: 24px 0 60px; }

/* Breadcrumb */
.if-breadcrumb {
  font-size: 1.44rem;
  color: #5a6878;
  margin: 10px 0 20px;
}

/* Page title bar */
.if-page-title-bar {
  background: linear-gradient(135deg, #2b5a85, #3f7bb2);
  color: #fff;
  padding: 22px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(43, 90, 133, 0.18);
}
.if-page-title-bar h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 2.4vw, 2.8rem);
  line-height: 1.4;
}
.if-page-title-bar .if-subtitle {
  margin: 0;
  font-size: 1.52rem;
  opacity: 0.9;
}

/* Intro */
.if-intro {
  background: #fff8ec;
  border-left: 4px solid #e0932f;
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 30px;
}
.if-intro p { margin: 4px 0; font-size: 1.568rem; }
.if-intro-strong { font-weight: 700; color: #b85b00; }

/* Honeypot */
.if-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Section */
.if-section {
  background: #fff;
  border: 1px solid #d8e1eb;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font-size: clamp(1.55rem, 1.2rem + 0.5vw, 1.8rem);
  line-height: 1.75;
}

.if-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e6edf4;
  font-size: clamp(1.9rem, 1.5rem + 0.6vw, 2.2rem);
  color: #2b5a85;
}

.if-step {
  display: inline-block;
  background: #2b5a85;
  color: #fff;
  font-size: clamp(1.3rem, 1.1rem + 0.2vw, 1.45rem);
  padding: 4px 12px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.if-step__letter {
  display: inline-block;
  margin-left: 4px;
  color: #ffd54f;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.if-lead {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #556270;
}
.if-important-note {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-left: 4px solid #b42318;
  background: #fff0f0;
  color: #b42318;
  font-weight: 700;
  line-height: 1.7;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
}

.if-prompt {
  padding: 16px;
  background: #f1f5f9;
  border: 1px dashed #b0c0d1;
  border-radius: 8px;
  color: #556270;
  text-align: center;
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
}

.if-other-notice {
  padding: 14px 16px;
  background: #fff3cd;
  border-left: 4px solid #e0932f;
  border-radius: 4px;
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #6b4510;
}

.if-notice {
  padding: 10px 14px;
  background: #e9f2fb;
  border-left: 3px solid #4a8cc4;
  border-radius: 4px;
  margin: 8px 0 0;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  color: #2b5a85;
}

.if-notice-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff8ec;
  border: 1px solid #e0cfa0;
  border-radius: 6px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #6b4510;
  line-height: 1.75;
}
.if-notice-box p { margin: 4px 0; }

/* Table-like row layout */
.if-table { display: block; }
.if-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f5;
  align-items: start;
}
.if-row:last-child { border-bottom: 0; }
.if-row[hidden] { display: none; }
.if-row--disabled {
  opacity: 0.45;
}
.if-row--disabled .if-label,
.if-row--disabled .if-input {
  cursor: not-allowed;
}
.if-row--stack,
#productDetailsSection .if-row--stack,
#childCountsSection .if-row--stack {
  grid-template-columns: 1fr;
  gap: 8px;
}

.if-label {
  font-weight: 700;
  color: #2b3e52;
  font-size: clamp(1.55rem, 1.2rem + 0.4vw, 1.75rem);
}

.if-input { min-width: 0; }

@media (min-width: 721px) {
  #childCountsSection .if-row {
    grid-template-columns: 300px 1fr;
  }

  #productDetailsSection .if-row {
    grid-template-columns: 260px 1fr;
  }
}

.if-req {
  display: inline-block;
  background: #d9534f;
  color: #fff;
  font-size: clamp(1.2rem, 1.05rem + 0.2vw, 1.35rem);
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 700;
}

.if-note {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  color: #556270;
  line-height: 1.7;
}

.if-zip-status {
  min-height: 0;
}

.if-zip-status:empty {
  display: none;
}

.if-zip-status.is-error {
  color: #a13029;
}

.if-warn {
  margin: 6px 0 12px;
  padding: 10px 14px;
  background: #fdecea;
  border-left: 3px solid #d9534f;
  border-radius: 4px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #a13029;
}

/* Inputs */
.page-insurance-form input[type="text"],
.page-insurance-form input[type="tel"],
.page-insurance-form input[type="email"],
.page-insurance-form input[type="number"],
.page-insurance-form input[type="date"],
.page-insurance-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: clamp(1.6rem, 1.2rem + 0.6vw, 1.9rem);
  line-height: 1.5;
  border: 1px solid #b9c8d6;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.page-insurance-form textarea {
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
}

.page-insurance-form input:focus,
.page-insurance-form textarea:focus,
.page-insurance-form select:focus {
  outline: none;
  border-color: #4a8cc4;
  box-shadow: 0 0 0 3px rgba(74, 140, 196, 0.2);
}

.page-insurance-form input[readonly] {
  background: #f1f5f9;
  color: #344050;
}

.page-insurance-form input.if-num,
input.if-num {
  width: 120px;
  text-align: right;
}

.if-mt-8 { margin-top: 8px; }

/* Zip */
.if-zip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.page-insurance-form .if-zip input[type="text"] {
  width: 90px;
  flex: 0 0 90px;
  text-align: center;
}
.if-zip-sep {
  color: #7a8a9a;
}

/* Radio & checkbox */
.if-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.if-radio-stack {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}
.if-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 10px;
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  background: #fbfcfd;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.if-radio[hidden] { display: none; }
.if-radio:hover { background: #eef5fb; border-color: #b0c0d1; }
.if-radio input[type="radio"] { accent-color: #2b5a85; width: 16px; height: 16px; }
.if-radio input[type="radio"]:checked + span { font-weight: 700; }
.if-radio:has(input[type="radio"]:checked) {
  background: #e6f0f9;
  border-color: #4a8cc4;
}

/* カード内オプション選択（実施有無・職員含むか・加入対象確認 など）— 操作対象として目立たせる */
.if-card-option .if-radio {
  padding: 12px 14px;
  border-width: 2px;
  border-color: #c6d2df;
  background: #ffffff;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  font-weight: 600;
  color: #2b3e52;
  box-shadow: 0 1px 2px rgba(20, 40, 60, 0.04);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.if-card-option .if-radio-group .if-radio {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}
.if-card-option .if-radio-stack .if-radio {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
}
.if-card-option .if-radio-stack .if-radio input[type="radio"] {
  margin-top: 0;
}
.if-card-option .if-radio:active {
  transform: translateY(1px);
}
.if-card-option .if-radio input[type="radio"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.if-card-option .if-radio:hover {
  background: #eef5fb;
  border-color: #4a8cc4;
  box-shadow: 0 2px 6px rgba(43, 90, 133, 0.10);
}
.if-card-option .if-radio:has(input[type="radio"]:checked) {
  background: linear-gradient(180deg, #eaf3fb 0%, #dde9f4 100%);
  border-color: #2b5a85;
  box-shadow: 0 0 0 3px rgba(43, 90, 133, 0.18), 0 1px 3px rgba(20, 40, 60, 0.08);
}
.if-card-option .if-radio:has(input[type="radio"]:checked) span {
  color: #1d3a55;
  font-weight: 700;
}
.if-card-option .if-radio:has(input[type="radio"]:checked)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid #2b5a85;
  border-bottom: 2.5px solid #2b5a85;
  transform: translateY(-70%) rotate(-45deg);
}
.if-card-option .if-radio {
  position: relative;
  padding-right: 36px;
}
/* コンパクトな選択肢（含める／含めない、実施する／実施しない 等）— 他のカードオプションより少し小さめに */
.if-card-option .if-radio-group--compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.if-card-option .if-radio-group--compact .if-radio {
  padding: 10px 14px;
  padding-right: 36px;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}
.if-card-option .if-radio-group--compact .if-radio input[type="radio"] {
  width: 18px;
  height: 18px;
}

.if-plan-radio {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  cursor: pointer;
  background: #fbfcfd;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.if-plan-radio input[type="radio"] {
  grid-row: 1 / span 2;
  align-self: center;
  accent-color: #2b5a85;
  width: 18px;
  height: 18px;
}
.if-plan-radio .if-plan-name {
  font-weight: 700;
  color: #2b3e52;
  font-size: clamp(1.55rem, 1.2rem + 0.4vw, 1.75rem);
}
.if-plan-radio .if-plan-rate {
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  color: #556270;
  grid-column: 2;
}
.if-plan-radio .if-plan-note {
  grid-column: 2;
  font-size: clamp(1.25rem, 1.05rem + 0.25vw, 1.4rem);
  color: #8a3b3b;
  margin-top: 4px;
}
.if-plan-radio:hover { background: #eef5fb; border-color: #b0c0d1; }
.if-plan-radio:has(input[type="radio"]:checked) {
  background: #e6f0f9;
  border-color: #4a8cc4;
}

.if-check {
  display: block;
  padding: 12px 14px;
  background: #fbfcfd;
  border: 1px solid #e0e7ee;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  line-height: 1.7;
}
.if-check input[type="checkbox"] {
  accent-color: #2b5a85;
  margin-right: 8px;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.if-check:has(input[type="checkbox"]:checked) {
  background: #e6f0f9;
  border-color: #4a8cc4;
}

.if-checklist { margin-top: 10px; }

/* ---- 申込書郵送先（confirmed-mailing-dest） ---- */
.mailing-each-list {
  display: grid;
  gap: 0.8rem;
}
.mailing-each-item {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr;
  gap: 0.6rem 1rem;
  align-items: center;
}
.mailing-each-item__name {
  font-weight: 600;
  color: var(--ink, #222);
  word-break: break-word;
}
.mailing-recipient-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.mailing-recipient-row input[type="text"] {
  flex: 1;
  min-width: 0;
}
.mailing-recipient-suffix {
  flex-shrink: 0;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .mailing-each-item {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* Output */
.if-output {
  display: inline-block;
  min-width: 80px;
  padding: 6px 10px;
  background: #f0f5fa;
  border: 1px solid #d8e1eb;
  border-radius: 4px;
  font-weight: 700;
  text-align: right;
}

/* Insurance cards grid */
.if-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 600px) {
  .if-card-grid {
    grid-template-columns: 1fr;
  }
}

/* セットプランとの違い確認モーダル（園賠償責任保険＋園児団体傷害保険 同時選択時に画面中央へ表示） */
.if-modal--prompt { max-width: min(520px, calc(100vw - 24px)); }
.if-modal--prompt .if-modal-header {
  background: linear-gradient(180deg, #f0f9f3 0%, #ffffff 100%);
}
.if-modal--prompt .if-modal-eyebrow { color: #2f8a52; }
.if-modal--prompt .if-modal-title { color: #1d6b3a; }
.if-modal-footer--prompt { justify-content: flex-end; flex-wrap: wrap; }
.if-modal-footer-btn--primary {
  border-color: #2f8a52;
  background: #2f8a52;
  color: #fff;
}
.if-modal-footer-btn--primary:hover,
.if-modal-footer-btn--primary:focus-visible {
  background: #246b3f;
  border-color: #246b3f;
  color: #fff;
  box-shadow: 0 2px 6px rgba(29, 107, 58, 0.18);
}
.if-modal-footer-btn--primary:focus-visible {
  outline: 2px solid #2f8a52;
  outline-offset: 2px;
}
.if-modal-footer-btn--secondary {
  border-color: #c5e1ce;
  background: #ffffff;
  color: #1d6b3a;
}
.if-modal-footer-btn--secondary:hover,
.if-modal-footer-btn--secondary:focus-visible {
  background: #e3f3e9;
  border-color: #98c9a8;
}

/* Facility-specific guide banner (e.g. 小規模A・B 向け案内) */
.if-facility-guide {
  margin: 12px 0 6px;
  border: 2px solid #2f8a52;
  border-radius: 8px;
  background: #f4faf6;
  color: #1a3e54;
  box-shadow: 0 1px 3px rgba(30, 90, 50, 0.12);
}
/* 折りたたみの見出し（既定は閉じた状態。2026-09-16 ユーザー指示） */
.if-facility-guide-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: clamp(1.45rem, 1.25rem + 0.25vw, 1.6rem);
  font-weight: 700;
  color: #1b6b3a;
  background: #e9f5ee;
}
.if-facility-guide-summary::-webkit-details-marker { display: none; }
.if-facility-guide-summary::before {
  content: '\25B6';
  font-size: 0.9em;
  color: #2f8a52;
  transition: transform 0.15s ease;
}
.if-facility-guide-toggle[open] .if-facility-guide-summary::before { transform: rotate(90deg); }
.if-facility-guide-summary:hover,
.if-facility-guide-summary:focus-visible { background: #dcefe3; }
.if-facility-guide-toggle[open] .if-facility-guide-summary { border-bottom: 1px solid #c5e1d0; }
.if-facility-guide-body { padding: 14px 18px 16px; }
.if-facility-guide-title {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 1.3rem + 0.3vw, 1.7rem);
  font-weight: 700;
  color: #1a6b8a;
}
.if-facility-guide-lead {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 1.2rem + 0.2vw, 1.55rem);
  line-height: 1.7;
}
.if-facility-guide-list {
  margin: 0 0 8px;
  padding-left: 1.6em;
  font-size: clamp(1.35rem, 1.15rem + 0.2vw, 1.5rem);
  line-height: 1.7;
}
.if-facility-guide-list li { margin-bottom: 4px; }
/* セットプランの価値説明（認可保育園・認定こども園向け、2026-09-16） */
.if-facility-guide-subtitle {
  margin: 10px 0 6px;
  font-size: clamp(1.4rem, 1.2rem + 0.2vw, 1.55rem);
  font-weight: 700;
  color: #1a6b8a;
}
.if-facility-guide-list--value {
  margin: 0 0 10px;
  padding: 12px 14px 8px 2.2em;
  background: #ffffff;
  border: 1px solid #d6e6f2;
  border-radius: 6px;
}
.if-facility-guide-list--value li { margin-bottom: 6px; }
.if-facility-guide-price {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 1.2rem + 0.2vw, 1.55rem);
  line-height: 1.7;
}
.if-facility-guide-price strong { color: #c2660d; }
.if-facility-guide-note {
  margin: 6px 0 0;
  font-size: clamp(1.3rem, 1.1rem + 0.2vw, 1.4rem);
  color: #3a5d72;
}

/* Unavailable cards collapsible section */
.if-unavailable-section {
  margin-top: 18px;
}
.if-unavailable-toggle {
  /* 見落とされやすいので、枠と色を強めて目立たせる（2026-09-15 ユーザー指示） */
  border: 2px solid #d9a441;
  border-left: 6px solid #c2660d;
  border-radius: 8px;
  background: #fdf6e8;
  box-shadow: 0 1px 3px rgba(120, 80, 20, 0.12);
}
.if-unavailable-toggle[open] { background: #fffdf8; }
.if-unavailable-summary:hover,
.if-unavailable-summary:focus-visible { background: #f9ecd2; }
.if-unavailable-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  /* 商品グループ見出し（.if-product-group-title）と同じ大きさに揃える（2026-09-15 ユーザー指示） */
  font-size: clamp(1.45rem, 1.25rem + 0.25vw, 1.6rem);
  font-weight: 700;
  color: #8a4b08;
  display: flex;
  align-items: center;
  gap: 8px;
}
.if-unavailable-summary::-webkit-details-marker { display: none; }
.if-unavailable-summary::before {
  content: '\25B6';
  font-size: 0.9em;
  color: #c2660d;
  transition: transform 0.15s ease;
}
.if-unavailable-toggle[open] .if-unavailable-summary::before {
  transform: rotate(90deg);
}
.if-unavailable-summary-count {
  color: #8a4b08;
  font-weight: 600;
}
.if-card-grid--unavailable {
  margin: 8px 16px 16px;
}

/* Product card groups (3-band layout) */
.if-product-group {
  margin: 18px 0 0;
}
.if-product-group-title {
  margin: 0 0 8px;
  padding: 6px 12px;
  font-size: clamp(1.45rem, 1.25rem + 0.25vw, 1.6rem);
  font-weight: 700;
  color: #1f3a52;
  border-left: 4px solid #1a6b8a;
  background: #f4f8fb;
  border-radius: 4px;
}
.if-product-group + .if-product-group {
  margin-top: 22px;
}
.if-product-group-caveat {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.05rem + 0.2vw, 1.4rem);
  color: #6a5b48;
  line-height: 1.6;
}

/* Soft / informational card note (light yellow, replaces red note for non-blocking info) */
.if-card-soft-note {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid #c89a1d;
  background: #fffbe8;
  color: #5b4205;
  border-radius: 0 6px 6px 0;
  font-weight: 400;
}

/* Children-injury staff-add note */
.if-staff-add-note {
  margin: 6px 0 4px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f1dca0;
  border-radius: 6px;
  font-size: clamp(1.25rem, 1.05rem + 0.2vw, 1.4rem);
  line-height: 1.7;
  color: #5b4205;
}

.if-card {
  position: relative;
  padding: 16px;
  border-radius: 10px;
  border: 2px solid #d8e1eb;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
}

.if-card--available,
.if-card--conditional,
.if-card--unavailable,
.if-card--blocked {
  background: #ffffff;
  border-color: #d8e1eb;
}
.if-card--available:has(input[type="checkbox"]:checked),
.if-card--conditional:has(input[type="checkbox"]:checked) {
  background: #e6f0f9;
  border-color: #d8e1eb;
  box-shadow: 0 0 0 3px rgba(74, 140, 196, 0.18);
}

.if-card--unavailable,
.if-card--blocked {
  cursor: not-allowed;
  border-color: #f0c8c8;
  background: #fffafa;
}
.if-card--blocked--soft {
  cursor: not-allowed;
  border-color: #d8e1eb;
  background: #ffffff;
}

/* 選択不可カードの理由テキストを目立たせる（赤枠の reason ブロック） */
.if-card-reason {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #b42318;
  background: #fff0f0;
  color: #5f1a1a;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
}

.if-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.if-card-check {
  flex: none;
  width: 22px;
  height: 22px;
  accent-color: #2b5a85;
  margin: 2px 0 0;
  cursor: pointer;
}
.if-card-check:disabled { cursor: not-allowed; }

.if-card-name {
  flex: 1;
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.65rem, 1.3rem + 0.5vw, 1.9rem);
  color: #2b3e52;
  line-height: 1.45;
}

.if-card-badge {
  display: inline-block;
  font-size: clamp(1.25rem, 1.05rem + 0.2vw, 1.4rem);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.if-card-badge {
  color: #fff;
}
.if-card-badge--ok {
  background: #1f7a3a; /* green：選択可 */
}
.if-card-badge--cond,
.if-card-badge--check {
  background: #c2660d; /* orange：条件付き／要確認 */
}
.if-card-badge--ng,
.if-card-badge--blocked {
  background: #b42318; /* red：選択不可・別加入不要 */
}

.if-card-desc {
  margin: 0;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  color: #4a5663;
  line-height: 1.7;
}
.if-desc-details {
  margin: 12px 0 0;
}
.if-desc-details > summary {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f4f8fc;
  border: 1px solid #cfdef0;
  border-radius: 12px;
  color: #1f5a87;
  font-family: inherit;
  font-size: clamp(1.3rem, 1.1rem + 0.25vw, 1.45rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.if-desc-details > summary::-webkit-details-marker { display: none; }
.if-desc-details > summary::before {
  content: "i";
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #2e6e9e;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 0.95em;
  font-weight: 700;
  color: #2e6e9e;
  line-height: 1;
}
.if-desc-details > summary::after {
  content: "";
  flex: none;
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #4a7aa3;
  border-bottom: 2px solid #4a7aa3;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.if-desc-details[open] > summary::after {
  transform: rotate(45deg);
}
.if-desc-details > summary:hover,
.if-desc-details > summary:focus-visible {
  background: #e6f0f9;
  border-color: #9ec3e3;
  color: #14416a;
  box-shadow: 0 2px 6px rgba(31, 90, 135, 0.12);
}
.if-desc-details > summary:focus-visible {
  outline: 2px solid #2e6e9e;
  outline-offset: 2px;
}
.if-desc-details > summary:active { transform: translateY(1px); }
.if-desc-details[open] > summary {
  margin-bottom: 8px;
}
.if-card--unavailable .if-card-example {
  color: #4a5663;
  font-weight: 400;
}
.if-card-note {
  margin-top: 6px;
  padding: 8px 10px;
  border-left: 3px solid #b42318;
  background: #fff5f5;
  color: #5f1a1a;
  border-radius: 0 6px 6px 0;
}
.if-card-lock-note {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #c26d16;
  background: #fff7e8;
  color: #5f3a08;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  line-height: 1.7;
  opacity: 1;
}
.if-card-lock-note--danger {
  border-left-color: #b42318;
  background: #fff0f0;
  color: #b42318;
}
.if-card-info-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #d97706;
  background: #fff8e1;
  color: #78350f;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  line-height: 1.7;
  border-radius: 4px;
}
/* ===== セットプランとの補償の違い: 比較リンク + モーダル ===== */
.if-compare-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 8px 12px;
  background: #f0f9f3;
  border: 1px solid #c5e1ce;
  border-radius: 12px;
  color: #1d6b3a;
  font-family: inherit;
  font-size: clamp(1.3rem, 1.1rem + 0.25vw, 1.45rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
}
.if-compare-link > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.if-compare-link:hover,
.if-compare-link:focus-visible {
  background: #e3f3e9;
  border-color: #98c9a8;
  color: #134f29;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(29, 107, 58, 0.12);
}
.if-compare-link:focus-visible {
  outline: 2px solid #2f8a52;
  outline-offset: 2px;
}
.if-compare-link:active { transform: translateY(1px); }
.if-compare-link-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: #2f8a52;
}
.if-compare-link-arrow {
  flex: none;
  width: 12px;
  height: 12px;
  color: #4a9c63;
  transition: transform .15s ease;
}
.if-compare-link:hover .if-compare-link-arrow,
.if-compare-link:focus-visible .if-compare-link-arrow {
  transform: translateX(2px);
}

/* ----- modal ----- */
.if-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(680px, calc(100vw - 24px));
  width: 100%;
  color: #2b3e52;
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}
.if-modal::backdrop {
  background: rgba(17, 32, 48, 0.55);
  backdrop-filter: blur(2px);
}
.if-modal[open] .if-modal-card {
  animation: if-modal-pop .18s ease-out;
}
@keyframes if-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.if-modal-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(11, 28, 46, 0.28), 0 4px 12px rgba(11, 28, 46, 0.12);
  overflow: hidden;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
}
.if-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #eaeef3;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}
.if-modal-header-text { flex: 1; min-width: 0; }
.if-modal-eyebrow {
  margin: 0 0 4px;
  color: #2e6e9e;
  font-size: clamp(1.15rem, 1rem + 0.15vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.if-modal-title {
  margin: 0;
  font-size: clamp(1.85rem, 1.45rem + 0.55vw, 2.2rem);
  font-weight: 700;
  color: #1f3a55;
  line-height: 1.4;
}
.if-modal-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -4px -6px 0 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #5a6b7c;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.if-modal-close:hover,
.if-modal-close:focus-visible {
  background: #eef2f6;
  color: #1f3a55;
}
.if-modal-close:focus-visible {
  outline: 2px solid #2e6e9e;
  outline-offset: 2px;
}
.if-modal-close svg { width: 20px; height: 20px; }

.if-modal-body {
  padding: 18px 22px 4px;
  overflow-y: auto;
}
.if-modal-lead {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 1.25rem + 0.3vw, 1.65rem);
  line-height: 1.75;
  color: #364a5e;
}
.if-compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.if-compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #f6faff;
  border: 1px solid #e1ecf6;
  border-radius: 10px;
}
.if-compare-list-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 50%;
  background: #1f7a3a;
  color: #ffffff;
}
.if-compare-list-icon svg { width: 18px; height: 18px; }
.if-compare-list-title {
  margin: 0 0 4px;
  font-size: clamp(1.5rem, 1.25rem + 0.3vw, 1.65rem);
  font-weight: 700;
  color: #1f3a55;
  line-height: 1.5;
}
.if-compare-list-tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 10px;
  background: #eaf3fb;
  border: 1px solid #cfe0ee;
  border-radius: 4px;
  color: #1f5a87;
  font-size: clamp(1.25rem, 1.05rem + 0.2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.5;
}
.if-compare-list-desc {
  margin: 0;
  font-size: clamp(1.4rem, 1.2rem + 0.25vw, 1.55rem);
  line-height: 1.75;
  color: #41566b;
}
.if-compare-amount-table {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f6faf7;
  border: 1px solid #cfe3d5;
  border-radius: 6px;
}
.if-compare-amount-table li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px dashed #d6e6dd;
  background: none;
  margin: 0;
}
.if-compare-amount-table li:last-child { border-bottom: 0; }
.if-compare-amount-table li::before { content: none; }
.if-compare-amount-label {
  flex: 0 0 auto;
  min-width: 6em;
  padding: 1px 8px;
  background: #1a6b2e;
  color: #ffffff;
  border-radius: 4px;
  font-size: clamp(1.2rem, 1.05rem + 0.15vw, 1.35rem);
  font-weight: 700;
  text-align: center;
  align-self: flex-start;
}
.if-compare-amount-value {
  flex: 1 1 240px;
  font-size: clamp(1.35rem, 1.15rem + 0.25vw, 1.5rem);
  line-height: 1.7;
  color: #2c4a37;
}
.if-compare-amount-value strong {
  color: #b30000;
  font-weight: 700;
}
.if-compare-list-note {
  margin: 8px 0 0;
  font-size: clamp(1.25rem, 1.1rem + 0.15vw, 1.4rem);
  line-height: 1.6;
  color: #5a6b7a;
}
.if-compare-list-note a {
  color: #1f5a87;
  text-decoration: underline;
}
.if-compare-list-note a:hover { text-decoration: none; }
.if-modal-note {
  margin: 16px 0 4px;
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px solid #f1dca0;
  border-radius: 8px;
  color: #6b5414;
  font-size: clamp(1.35rem, 1.15rem + 0.25vw, 1.5rem);
  line-height: 1.7;
}
.if-modal-scenario {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: #fff4f4;
  border: 1px solid #f1c0c0;
  border-left: 4px solid #c44a4a;
  border-radius: 8px;
}
.if-modal-scenario-title {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 1.1rem + 0.2vw, 1.45rem);
  font-weight: 700;
  color: #8a2a2a;
  letter-spacing: 0.04em;
}
.if-modal-scenario-body {
  margin: 0;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  line-height: 1.75;
  color: #3a2424;
}
.if-example-link {
  background: #fff7f0;
  border-color: #f1c9a8;
  color: #8a4419;
}
.if-example-link:hover,
.if-example-link:focus-visible {
  background: #ffe9d6;
  border-color: #e0a878;
  color: #6f3413;
  box-shadow: 0 2px 6px rgba(138, 68, 25, 0.12);
}
.if-example-link:focus-visible { outline-color: #c66a2e; }
.if-example-link .if-compare-link-icon { color: #c66a2e; }
.if-example-link .if-compare-link-arrow { color: #b15a26; }
.if-modal-note a {
  color: #1f5a87;
  text-decoration: underline;
}
.if-modal-note a:hover { text-decoration: none; }
.if-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 18px;
  background: #ffffff;
}
.if-modal-footer-btn {
  appearance: none;
  border: 1px solid #c8d4e0;
  background: #ffffff;
  color: #1f3a55;
  font-family: inherit;
  font-size: clamp(1.4rem, 1.2rem + 0.25vw, 1.55rem);
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.if-modal-footer-btn:hover,
.if-modal-footer-btn:focus-visible {
  background: #eef4fb;
  border-color: #9ec3e3;
}
.if-modal-footer-btn:focus-visible {
  outline: 2px solid #2e6e9e;
  outline-offset: 2px;
}

@media (max-width: 540px) {
  .if-modal { max-width: calc(100vw - 16px); }
  .if-modal-header { padding: 16px 16px 12px; }
  .if-modal-body { padding: 14px 16px 2px; }
  .if-modal-footer { padding: 12px 16px 14px; }
  .if-compare-list li { padding: 12px 12px; }
}
.if-card-option {
  margin-top: 12px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, #fffdf3 0%, #fdf6e0 100%);
  border: 1px solid #e7d896;
  border-left: 4px solid #d4a017;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(212, 160, 23, 0.08);
}
/* カード内オプション（質問）の回答が未入力の間、その質問以外をフェイドアウトし操作不可にする。
   回答が入った時点で .if-form-pending-question / .if-card--pending-question が JS から外れる。 */
.if-form-pending-question .if-section,
.if-form-pending-question .wizard-nav {
  opacity: 0.32;
  filter: grayscale(0.25);
  pointer-events: none;
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.if-form-pending-question .if-section--has-pending-question {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}
.if-form-pending-question .if-section--has-pending-question .if-card:not(.if-card--pending-question) {
  opacity: 0.32;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.if-form-pending-question .if-card--pending-question {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.45), 0 6px 18px rgba(20, 40, 60, 0.12);
  border-radius: 10px;
}
.if-form-pending-question .if-card--pending-question > *:not(.if-card-option):not(.if-card-head) {
  opacity: 0.32;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
/* 商品名のチェックボックスは操作できるままにする。
   誤ってチェックした保険を、設問に答える前でも外せるようにするため（2026-09-16 ユーザー指示） */
.if-form-pending-question .if-card--pending-question > .if-card-head {
  opacity: 1;
  pointer-events: auto;
}
.if-form-pending-question .if-card--pending-question > .if-card-option {
  opacity: 1;
  pointer-events: auto;
  animation: ifCardOptionPulse 1.4s ease-out 1;
}
@keyframes ifCardOptionPulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.45); }
  60%  { box-shadow: 0 0 0 10px rgba(212, 160, 23, 0); }
  100% { box-shadow: 0 1px 2px rgba(212, 160, 23, 0.08); }
}
.if-card-option-title {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  font-weight: 500;
  color: #1d3a55;
  line-height: 1.65;
  overflow: hidden;
}
.if-card-option-title::before {
  content: "Q";
  float: left;
  margin: 2px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, #e0b231 0%, #b8870c 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(184, 135, 12, 0.3);
}
.if-card-option-note {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  line-height: 1.65;
  color: #5d6874;
}
.if-card-eligibility-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #b42318;
  background: #fff0f0;
  color: #b42318;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  font-weight: 700;
  line-height: 1.7;
}
.if-radio-group--compact {
  gap: 10px;
}

/* Sub-choice block for inline qualifiers (e.g. 臨時雇い 含む/含まない) */
.if-temp-choice {
  padding: 10px 12px;
  background: #f3f7fb;
  border: 1px solid #d8e1eb;
  border-left: 3px solid #4a8cc4;
  border-radius: 6px;
}
.if-temp-choice__label {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  font-weight: 700;
  color: #2b3e52;
}
.if-temp-choice__note {
  margin: 6px 0 0;
}

/* Product advice */
.if-advice {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f7fbf7;
  border: 1px solid #b9d9c1;
  border-left: 4px solid #3d8b4e;
  border-radius: 6px;
}

.if-advice-title {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 1.2rem + 0.4vw, 1.75rem);
  color: #245d32;
}

.if-advice-list {
  margin: 0;
  padding-left: 20px;
  color: #2f4635;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  line-height: 1.7;
}

.if-advice-list li {
  margin: 4px 0;
}

/* Detail block (after cards) */
.if-detail {
  margin-top: 20px;
  padding: 18px;
  background: #f8fbfe;
  border: 1px solid #c9dbec;
  border-radius: 8px;
}
.if-detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 1.35rem + 0.5vw, 1.95rem);
  color: #2b5a85;
  border-left: 4px solid #2b5a85;
  padding-left: 12px;
  line-height: 1.5;
}
.if-detail-title > span {
  min-width: 0;
}
.if-detail-join {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid #b9c8d6;
  border-radius: 6px;
  background: #fff;
  color: #2b3e52;
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
  font-weight: 700;
  cursor: pointer;
}
.if-detail-join input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #2b5a85;
}

.if-subblock {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #c9dbec;
}
.if-subblock-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 1.25rem + 0.4vw, 1.8rem);
  color: #2b3e52;
}

.if-example-box {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #c9dbec;
  border-left: 4px solid #2b5a85;
  border-radius: 6px;
  background: #f8fbfe;
  color: #2b3e52;
}
.if-example-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 700;
}
.if-example-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #2b5a85;
  color: #fff;
  font-size: clamp(1.4rem, 1.15rem + 0.3vw, 1.55rem);
}
.if-example-table {
  display: grid;
  gap: 0;
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.if-example-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(72px, 0.8fr) minmax(190px, 2fr) minmax(82px, 0.8fr);
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #edf1f5;
}
.if-example-row:last-child {
  border-bottom: 0;
}
.if-example-row > span {
  padding: 7px 10px;
}
.if-example-row--head {
  min-height: 30px;
  background: #edf5fc;
  color: #49647d;
  font-size: clamp(1.4rem, 1.15rem + 0.3vw, 1.55rem);
  font-weight: 700;
}
.if-example-row--sum {
  background: #fbfdff;
  font-weight: 700;
}
.if-example-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d8e1eb;
  font-weight: 700;
}
.if-example-total strong {
  color: #1f3e5a;
  font-size: clamp(1.65rem, 1.3rem + 0.5vw, 1.9rem);
}

.if-counts-block { margin-bottom: 6px; }

/* Summary table */
.if-summary-table {
  display: block;
  border: 1px solid #d8e1eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.if-summary-head,
.if-summary-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1.2fr 1fr 1.2fr;
  gap: 0;
}
.if-summary-head {
  background: #2b5a85;
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
}
.if-summary-head > div,
.if-summary-row > div {
  padding: 12px 14px;
  border-right: 1px solid #d8e1eb;
  word-break: break-word;
}
.if-summary-head > div:last-child,
.if-summary-row > div:last-child { border-right: 0; }
.if-summary-row {
  border-top: 1px solid #edf1f5;
  background: #fff;
  font-size: clamp(1.55rem, 1.2rem + 0.4vw, 1.75rem);
}
.if-summary-row--warn {
  background: #fff8ec;
}
.if-summary-row--warn .if-summary-sub {
  color: #b85b00;
  font-weight: 700;
}
.if-summary-empty {
  padding: 20px;
  text-align: center;
  color: #7a8a9a;
  background: #fff;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
}

.if-summary-sub { text-align: right; font-weight: 700; }

.if-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #2b5a85;
  color: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
}
.if-total-label { font-weight: 700; font-size: clamp(1.7rem, 1.35rem + 0.5vw, 2rem); }
.if-total-value { font-size: clamp(2.4rem, 1.9rem + 0.8vw, 2.8rem); font-weight: 700; }
.if-total-value output { min-width: 0; background: transparent; border: 0; color: #fff; padding: 0; }

.if-warnings {
  background: #fdecea;
  border-left: 3px solid #d9534f;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #a13029;
  margin-bottom: 10px;
  line-height: 1.7;
}
.if-warnings ul { margin: 4px 0 0 16px; padding: 0; }

/* Submit */
.if-submit-area {
  text-align: center;
  margin: 30px 0 0;
}
.if-submit {
  background: linear-gradient(180deg, #e89420, #c87510);
  color: #fff;
  border: 0;
  padding: 14px 42px;
  font-size: clamp(1.8rem, 1.4rem + 0.6vw, 2.1rem);
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(200, 117, 16, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.if-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(200, 117, 16, 0.38);
}
.if-submit:disabled {
  background: #b0b8c0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.if-submit-error {
  background: #fdecea;
  border: 1px solid #d9534f;
  color: #a13029;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 0 0 14px;
  text-align: left;
}
.if-small {
  font-size: clamp(1.4rem, 1.15rem + 0.3vw, 1.55rem);
  color: #7a8a9a;
  margin-top: 10px;
}

/* Server-side error banner (rendered after failed POST validation) */
.if-server-errors {
  background: #fdecea;
  border: 1px solid #d9534f;
  border-left: 6px solid #d9534f;
  color: #7a2320;
  padding: 14px 18px;
  border-radius: 6px;
  margin: 0 0 20px;
}
.if-server-errors__title { margin: 0 0 6px; font-size: clamp(1.7rem, 1.35rem + 0.5vw, 1.95rem); }
.if-server-errors ul { margin: 4px 0 0 18px; padding: 0; }
.if-server-errors li { margin: 2px 0; font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem); }

/* Note under grand-total row (shown when confirmation-only items exist) */
.if-total-note {
  margin: -6px 0 10px;
  padding: 12px 16px;
  background: #fff8ec;
  border-left: 3px solid #e0932f;
  border-radius: 4px;
  font-size: clamp(1.5rem, 1.2rem + 0.4vw, 1.7rem);
  color: #6b4510;
  line-height: 1.7;
}

/* Utility */
.if-hide { display: none !important; }

/* Invalid state */
.page-insurance-form input.if-invalid,
.page-insurance-form textarea.if-invalid {
  border-color: #d9534f;
  background: #fdf5f5;
}

/* Responsive */
@media (max-width: 720px) {
  .if-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .if-label { font-size: 1.65rem; }
  .if-section { padding: 18px 16px; }
  .if-section-title { font-size: 1.85rem; }
  .if-summary-head { display: none; }
  .if-summary-row {
    grid-template-columns: 1fr 1fr;
    padding: 8px 0;
  }
  .if-summary-row > div {
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px dashed #edf1f5;
  }
  .if-summary-row > div:nth-child(1) {
    grid-column: 1 / -1;
    background: #f1f5f9;
    font-weight: 700;
  }
  .if-total-value { font-size: 2.2rem; }
  .page-insurance-form input.if-num,
  input.if-num { width: 100%; max-width: 180px; }
  .if-example-box {
    padding: 12px;
  }
  .if-example-row,
  .if-example-row--head {
    grid-template-columns: 1fr;
  }
  .if-example-row {
    padding: 6px 0;
  }
  .if-example-row > span {
    padding: 3px 10px;
  }
  .if-example-row--head {
    display: none;
  }
  .if-example-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* 告知事項セクションは導入文(.if-note)と同じフォントサイズに揃える */
#disclosureSection .if-label,
#disclosureSection .if-radio span,
#disclosureSection .if-note {
  font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem);
}
@media (max-width: 720px) {
  #disclosureSection .if-label { font-size: clamp(1.45rem, 1.2rem + 0.3vw, 1.6rem); }
}

/* お申込みが確定している場合、商品カードは商品名のチェックのみ（説明・詳細・事故例を出さない）。
   中身が減るため、カードに最低の高さを設けず余白が空かないようにする（2026-09-15 ユーザー指示） */
#confirmed-school-insurance .if-card { min-height: 0; }
/* 同じ行に説明付きのカードがあっても、他のカードが引き伸ばされないようにする（2026-09-15 ユーザー指示） */
#confirmed-school-insurance .if-card-grid { align-items: start; }
/* 商品名が1行でも2行でもカードの高さを揃える（2026-09-15 ユーザー指示） */
#confirmed-school-insurance .if-card-name { min-height: 2.9em; }
