:root {
  --blue: #273da4;
  --blue-dark: #1f3185;
  --blue-soft: #eef2ff;
  --border: #d8ddec;
  --text: #222;
  --muted: #666;
  --required: #b30d10;
  --warning-bg: #fff5f5;
  --warning-text: #9c1c1c;
  --disabled: #f0f0f0;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family:
    "BIZ UDPGothic", "Source Han Sans JP", "Hiragino Kaku Gothic Pro",
    "メイリオ", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.56;
  letter-spacing: 0.08em;
  background: #f5f6fb;
  overflow-x: hidden;
}

a {
  color: #0b74d1;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

button,
input {
  font: inherit;
}

input,
select,
textarea {
  max-width: 100%;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #b9cbe0;
}

.site-header__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 90px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: #333;
  text-decoration: none;
}

.site-header__logo-picture {
  display: block;
  flex-shrink: 0;
}

.site-header__logo {
  display: block;
  width: 170px;
  height: auto;
}

.site-header__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-header__organization {
  font-size: 12px;
  line-height: 1.3;
}

.site-header__name {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.site-header__meta {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
}

.site-header__brand:hover {
  opacity: 0.85;
}

.page {
  max-width: 1260px;
  margin: 24px auto 40px;
  padding: 0 24px;
}

.form-panel {
  background: #fff;
  border: 1px solid var(--border);
}

.section-heading {
  padding: 18px 24px;
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
}

.section-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 20px;
}

.lead {
  margin: 0;
  padding: 18px 24px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  padding: 20px 24px 28px;
}

.layout__main,
.layout__side {
  min-width: 0;
}

.input-card,
.result-card {
  border: 1px solid var(--border);
  background: #fff;
}

.input-card h3,
.result-card h3 {
  margin: 0;
  padding: 12px 16px;
  color: var(--blue-dark);
  background: #f4f6ff;
  border-bottom: 1px solid var(--border);
  font-size: 22px;
}

.field-block {
  margin: 0;
  padding: 18px 16px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.field-block:last-child {
  border-bottom: 0;
}

.field-block legend,
.field-label {
  display: block;
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 16px;
}

.field-label--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-number {
  margin-right: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.4;
  vertical-align: middle;
}

.badge--required {
  color: #fff;
  background: var(--required);
}

.radio-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: start;
  min-height: 88px;
  padding: 14px;
  border: 2px solid #8ba2ff;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
  min-width: 0;
}

.radio-card:has(input:checked) {
  border-color: var(--blue);
  background: #f7f9ff;
  box-shadow: inset 0 0 0 1px var(--blue);
}

.radio-card input {
  margin-top: 5px;
}

.radio-card__title {
  font-weight: 700;
}

.radio-card__text {
  grid-column: 2;
  color: var(--muted);
  font-size: 14px;
}

.radio-card--compact {
  min-height: 56px;
  align-items: center;
}

.radio-card--compact .radio-card__title {
  grid-column: auto;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #828c9a;
  border-radius: 4px;
  background: #fff;
  font-size: 16px;
  line-height: 1.56;
}

.input:focus {
  outline: 3px solid rgba(41, 73, 182, 0.18);
  border-color: var(--blue);
}

.input--readonly,
.input[readonly],
.input:disabled {
  color: #555;
  background: var(--disabled);
}

.note,
.detail-link {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field-error {
  display: block;
  margin: 6px 0 8px;
  color: var(--warning-text);
  font-size: 13px;
  line-height: 1.5;
  clear: both;
}

.detail-link {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
}

.note--warning {
  padding: 8px 10px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid #f3c2c2;
  border-radius: 3px;
}

.help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  color: var(--blue);
  font-weight: 700;
  line-height: 1;
  border: 2px solid #9bb0ff;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.help__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 10;
  display: none;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  white-space: normal;
  font-weight: 400;
  text-align: left;
  background: #222;
  border-radius: 3px;
  transform: translateX(-50%);
}

.help.is-active .help__tooltip {
  display: block;
}

.help__tooltip a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.help--interactive {
  vertical-align: middle;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.payment-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 16px;
  background: #fff;
}

.payment-table th,
.payment-table td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.payment-table thead th,
.payment-table tfoot th,
.payment-table tfoot td {
  background: var(--blue-soft);
  font-weight: 700;
}

.payment-table thead th:nth-child(1),
.payment-table tbody th,
.payment-table tfoot th {
  width: 34%;
}

.payment-table thead th:nth-child(2),
.payment-table tbody td:nth-child(2),
.payment-table tfoot td:nth-child(2) {
  width: 66%;
}

.days-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
}

.days-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: right;
}

#totalDays {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  text-align: right;
}

.days-cell > span {
  flex: 0 0 auto;
}

.accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  color: var(--blue-dark);
  font-weight: 700;
  text-align: left;
  border: 1px solid #9bb0ff;
  border-radius: 4px;
  background: #f7f9ff;
  cursor: pointer;
}

.transfer-heading {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.accordion__icon {
  font-size: 20px;
  line-height: 1;
}

.accordion-panel {
  padding: 14px 0 0;
}

.transfer-choice,
.transfer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.transfer-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.transfer-details {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fbfcff;
}

.field-inline label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 16px;
}

.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid #828c9a;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.input-with-unit.is-disabled {
  background: var(--disabled);
}

.input-with-unit:focus-within {
  outline: 3px solid rgba(41, 73, 182, 0.18);
  border-color: var(--blue);
}

.input-with-unit .input {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  text-align: right;
}

.input-with-unit.is-disabled .input,
.input-with-unit.is-disabled .input-unit {
  color: #555;
  background: var(--disabled);
}

.input-with-unit .input:focus {
  outline: 0;
}

.input-unit {
  padding: 0 10px 0 6px;
  color: var(--text);
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 16px;
}

.button {
  min-width: 120px;
  padding: 9px 16px;
  color: var(--blue-dark);
  font-weight: 700;
  border: 1px solid #8ba2ff;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background: #f1f4ff;
}

#printButton:disabled {
  color: #777;
  background: #e5e5e5;
  border-color: #c4c4c4;
  cursor: not-allowed;
  opacity: 1;
}

#printButton:disabled:hover,
#printButton:disabled:focus {
  color: #777;
  background: #e5e5e5;
  border-color: #c4c4c4;
}

.button--primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.button--primary:hover,
.button--primary:focus {
  background: var(--blue-dark);
}

.result-card {
  position: sticky;
  top: 16px;
  scroll-margin-top: 16px;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.result-actions .button {
  flex: 1 1 0;
  min-width: 0;
}

.result-card__main {
  padding: 16px;
  color: #fff;
  background: var(--blue);
}

.result-card__main span {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.result-card__main strong {
  display: block;
  font-size: 20px;
  line-height: 1.45;
  text-align: right;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.result-list {
  margin: 0;
}

.result-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  border-bottom: 1px solid var(--border);
}

.result-list dt,
.result-list dd {
  margin: 0;
  padding: 9px 10px;
  font-size: 14px;
}

.result-list dt {
  background: #f7f8fc;
  font-weight: 700;
}

.result-list dd {
  text-align: right;
}

.result-transfer-only[hidden] {
  display: none !important;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal[hidden] {
  display: none;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.image-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.image-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f7f8fc;
}

.image-modal__header h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 18px;
}

.image-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--blue-dark);
  font-size: 26px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.image-modal__close:hover,
.image-modal__close:focus {
  background: #eef2ff;
}

.image-modal__body {
  display: grid;
  justify-items: center;
  max-height: calc(90vh - 62px);
  padding: 16px;
  overflow: auto;
  text-align: center;
}

.image-modal__text {
  width: min(100%, 880px);
  margin: 0 0 12px;
  padding: 0 2px;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: pre-line;
}

.image-modal__body img {
  display: block;
  width: min(100%, 680px);
  max-width: none;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}

body.is-modal-open {
  overflow: hidden;
}

@media (max-width: 991.98px){

  .layout {
    grid-template-columns: 1fr;
  }

  .result-card {
    position: static;
    scroll-margin-top: 12px;
  }

}

@media (max-width: 767.98px){

  body {
    font-size: 14px;
    letter-spacing: 0.02em;
    line-height: 1.65;
    background: #fff;
  }

  .page {
    width: 100%;
    margin: 0 auto 24px;
    padding: 10px 12px 24px;
  }

  .site-header {
    display: block;
    background: #fff;
  }

  .site-header__inner {
    padding: 10px 18px;
  }

  .site-header__brand {
    display: flex;
    align-items: center;
    width: fit-content;
  }

  .site-header__logo {
    width: 105px;
    height: auto;
  }

  .site-header__text {
    display: none;
  }

  .form-panel {
    border: 0;
    background: transparent;
  }

  .section-heading {
    margin: 0 0 12px;
    padding: 0 0 0 8px;
    background: transparent;
    border-left: 3px solid var(--blue);
  }

  .section-heading h2 {
    color: var(--text);
    font-size: 16px;
    line-height: 1.45;
  }

  .input-card h3,
.result-card h3 {
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.45;
  }

  .lead {
    padding: 0 0 14px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text);
  }

  .layout {
    display: block;
    padding: 0;
  }

  .layout__main,
.layout__side {
    width: 100%;
  }

  .input-card,
.result-card {
    width: 100%;
    margin: 0 0 20px;
    border: 1px solid var(--border);
    background: #fff;
  }

  .field-block {
    padding: 14px 10px;
  }

  .radio-cards,
.transfer-choice,
.transfer-fields {
    grid-template-columns: 1fr;
  }

  .field-label,
.transfer-heading,
.field-inline label {
    font-size: 15px;
    line-height: 1.5;
  }

  .field-label--row {
    align-items: flex-start;
  }

  .radio-card {
    min-height: auto;
    padding: 10px;
    border-width: 1px;
  }

  .radio-card:has(input:checked) {
    border-width: 2px;
  }

  .radio-card__text {
    font-size: 12px;
  }

  .input {
    min-height: 42px;
    font-size: 16px;
  }

  .table-wrap {
    overflow-x: visible;
  }

  .payment-table,
.payment-table thead,
.payment-table tbody,
.payment-table tfoot,
.payment-table tr,
.payment-table th,
.payment-table td {
    display: block;
    width: 100%;
  }

  .payment-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .payment-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .payment-table tbody tr,
.payment-table tfoot tr {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    overflow: hidden;
  }

  .payment-table tbody th,
.payment-table tfoot th {
    display: block;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--blue-soft);
    color: var(--text);
    font-size: 13px;
  }

  .payment-table tbody td,
.payment-table tfoot td {
    display: block;
    min-width: 0;
    padding: 8px 10px;
    border: 0;
    border-bottom: 0;
    font-size: 13px;
  }

  .payment-table tr > :last-child {
    border-bottom: 0;
  }

  .payment-table tbody td::before,
.payment-table tfoot td::before {
    content: attr(data-label);
    display: block;
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .payment-table tbody th::before {
    content: none;
  }

  .payment-table tfoot {
    display: block;
  }

  .payment-table tfoot th {
    color: var(--text);
    background: var(--blue-soft);
  }

  .payment-table tfoot td {
    background: #f7f8fc;
  }

  .days-cell {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .days-input {
    width: 86px;
    max-width: 86px;
    min-height: 42px;
    flex: 0 0 86px;
    text-align: right;
  }

  #totalDays {
    width: 86px;
    max-width: 86px;
    min-height: 42px;
    flex: 0 0 86px;
    text-align: right;
  }

  .premium-amount {
    display: none;
  }

  .transfer-details {
    padding: 12px;
  }

  .input-with-unit {
    min-width: 0;
  }

  .result-list div {
    grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
  }

  .actions .button,
.result-actions .button {
    flex: 1 1 100%;
    min-height: 42px;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin: -8px 0 20px;
  }

  .image-modal {
    padding: 12px;
  }

  .image-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .image-modal__header {
    padding: 10px 12px;
  }

  .image-modal__header h2 {
    font-size: 16px;
  }

  .image-modal__body {
    max-height: calc(100dvh - 82px);
    padding: 12px;
  }

  .image-modal__text {
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    font-size: 14px;
    line-height: 1.75;
  }

  .image-modal__body img {
    width: 100%;
  }

}

@media (max-width: 420px){

  body {
    letter-spacing: 0.01em;
  }

  .page {
    padding: 0 8px;
  }

  .section-heading,
.lead,
.layout {
    padding: 12px;
  }

  .field-block {
    padding: 14px 10px;
  }

  .payment-table tbody td,
.payment-table tfoot td {
    padding: 8px 10px;
  }

  .days-input,
#totalDays {
    width: 84px;
    max-width: 84px;
    flex-basis: 84px;
  }

  .result-list div {
    grid-template-columns: 1fr;
  }

  .result-list dt {
    border-bottom: 1px solid var(--border);
  }

}

.transfer-accordion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.transfer-heading-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.transfer-heading-help {
  flex: 0 0 auto;
}

.transfer-accordion {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.transfer-accordion:hover,
.transfer-accordion:focus-visible {
  color: var(--blue-dark);
  outline: none;
}

.transfer-accordion .accordion__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-dark);
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
}

.transfer .accordion-panel[hidden],
.transfer .transfer-details[hidden] {
  display: none !important;
}

@media (max-width: 767.98px){

  .transfer-accordion-row {
    align-items: center;
    gap: 10px;
  }

  .transfer-heading-text {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.5;
  }

  .transfer-accordion .accordion__icon {
    width: 26px;
    height: 26px;
    font-size: 20px;
  }

}

.transfer .transfer-accordion-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 12px !important;
}

.transfer .transfer-heading-text {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  color: var(--text) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
}

.transfer .transfer-heading-text #transfer-heading {
  display: inline !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  writing-mode: horizontal-tb !important;
}

.transfer .transfer-heading-help {
  flex: 0 0 auto !important;
}

.transfer #transferToggle.transfer-accordion {
  width: auto !important;
  min-width: 32px !important;
  height: 32px !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--blue-dark) !important;
  cursor: pointer !important;
}

.transfer #transferToggle.transfer-accordion:focus-visible {
  outline: 3px solid rgba(41, 73, 182, 0.22) !important;
  outline-offset: 2px !important;
}

.transfer #transferToggle.transfer-accordion .accordion__icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  height: 28px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--blue-dark) !important;
  border: 1px solid var(--border) !important;
  border-radius: 50% !important;
  background: #fff !important;
}

.transfer .transfer-panel-detail-link {
  margin: 2px 0 12px !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
}

.transfer .accordion-panel {
  padding-top: 10px !important;
}

@media (max-width: 767.98px){

  .transfer .transfer-accordion-row {
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  .transfer .transfer-heading-text {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  .transfer #transferToggle.transfer-accordion {
    min-width: 30px !important;
    height: 30px !important;
  }

  .transfer #transferToggle.transfer-accordion .accordion__icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 19px !important;
  }

  .transfer .transfer-panel-detail-link {
    font-size: 14px !important;
    margin-bottom: 12px !important;
  }

}


/* スマホでは掛金単価と納付日数を読みやすいカード幅で表示する。 */
@media (max-width: 767.98px){

  .table-wrap {
    overflow-x: visible !important;
  }

  .payment-table {
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent !important;
  }

  .payment-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .payment-table tbody,
.payment-table tfoot {
    display: block !important;
    width: 100% !important;
  }

  .payment-table tbody tr,
.payment-table tfoot tr {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  .payment-table tbody th,
.payment-table tfoot th {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    background: var(--blue-soft) !important;
    color: var(--text) !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    text-align: left !important;
  }

  .payment-table tbody td,
.payment-table tfoot td {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    border: 0 !important;
    background: #fff !important;
    font-size: 14px !important;
    text-align: left !important;
  }

  .payment-table tbody td + td,
.payment-table tfoot td + td {
    padding-top: 2px !important;
  }

  .payment-table tbody td::before,
.payment-table tfoot td::before {
    content: attr(data-label) !important;
    display: block !important;
    margin: 0 0 8px !important;
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
  }

  .payment-table tbody th::before,
.payment-table tfoot th::before {
    content: none !important;
  }

  .payment-table tfoot {
    display: block !important;
  }

  .days-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .days-input,
#totalDays {
    width: 180px !important;
    max-width: min(180px, calc(100% - 32px)) !important;
    flex: 0 1 180px !important;
    min-height: 54px !important;
    text-align: right !important;
    font-size: 20px !important;
  }

  .premium-amount {
    display: none !important;
  }

}

@media (max-width: 420px){

  .payment-table tbody th,
.payment-table tfoot th {
    width: 100% !important;
    max-width: none !important;
  }

  .payment-table tbody td,
.payment-table tfoot td {
    width: 100% !important;
    max-width: none !important;
    padding: 12px 14px !important;
  }

  .days-input,
#totalDays {
    width: 180px !important;
    max-width: min(180px, calc(100% - 32px)) !important;
    flex-basis: 180px !important;
  }

}

.actions--form .button--primary {
  min-width: 156px;
  min-height: 52px;
  padding: 13px 26px;
  font-size: 18px;
}

@media (max-width: 767.98px){

  .actions--form .button--primary {
    width: 100%;
    min-height: 50px;
    font-size: 17px;
  }

}

/* フォーム操作ボタンの基本配置。 */
.actions--form {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
}

.actions--form .button--primary {
  flex: 0 0 220px;
  width: 220px;
  min-width: 220px;
  min-height: 54px;
  padding: 13px 28px;
  font-size: 18px;
}

.actions--form .button:not(.button--primary) {
  flex: 0 0 auto;
}

.layout__side {
  align-self: start;
  position: sticky;
  top: 16px;
}

.layout__side .result-card {
  position: static;
  top: auto;
}

.result-actions {
  display: block;
  width: 100%;
  margin-top: 16px;
}

.result-actions .button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
}

@media (max-width: 991.98px){

  .layout__side {
    position: static;
    top: auto;
  }

}

@media (max-width: 767.98px){

  .actions--form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions--form .button--primary {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }

  .result-actions {
    margin: -8px 0 20px;
  }

}

.actions--form {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}

.actions--form .button:not(.button--primary) {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
}

.actions--form .button--primary {
  flex: 0 0 260px;
  width: 260px;
  min-width: 260px;
  margin-left: auto;
}

@media (max-width: 767.98px){

  .actions--form {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .actions--form .button:not(.button--primary),
.actions--form .button--primary {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
    margin-left: 0;
  }

}


.actions--form {
  display: grid !important;
  grid-template-columns: auto minmax(320px, 420px);
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}

.actions--form .button:not(.button--primary) {
  grid-column: 1;
  justify-self: start;
  width: auto;
  min-width: 120px;
  min-height: 46px;
  margin-left: 0;
  flex: none;
}

.actions--form .button--primary {
  grid-column: 2;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  min-height: 56px;
  margin-left: 0;
  padding: 14px 28px;
  font-size: 18px;
  flex: none;
}

.layout__side {
  align-self: start !important;
  position: sticky !important;
  top: 16px !important;
}

.layout__side .result-card {
  position: static !important;
  top: auto !important;
}

.result-actions {
  display: block;
  width: 100%;
  margin-top: 16px;
}

.result-actions .button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
}

@media (max-width: 991.98px){

  .layout__side {
    position: static !important;
    top: auto !important;
  }

}

@media (max-width: 767.98px){

  .actions--form {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .actions--form .button:not(.button--primary),
.actions--form .button--primary {
    grid-column: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
  }

  .result-actions {
    margin: -8px 0 20px;
  }

}

.result-card__main strong {
  font-size: 20px;
  line-height: 1.45;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

@media (max-width: 767.98px){

  .result-card__main strong {
    font-size: 19px;
  }

}

/* PCでは掛金日額列を抑え、納付日数入力欄の幅を確保する。 */
@media (min-width: 768px){

  .payment-table {
    table-layout: fixed;
  }

  .payment-table thead th:nth-child(1),
.payment-table tbody th,
.payment-table tfoot th {
    width: 18% !important;
  }

  .payment-table thead th:nth-child(2),
.payment-table tbody td:nth-child(2),
.payment-table tfoot td:nth-child(2) {
    width: 82% !important;
  }

  .days-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .days-input,
#totalDays {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    text-align: right;
  }

  .days-cell > span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

}



/* 和暦プルダウン式の日付入力。 */
.lead--with-help {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}







.transfer-heading-text #transfer-heading {
  white-space: nowrap;
}

@media (max-width: 767.98px){

  .lead--with-help {
    align-items: flex-start;
  }

  

  

  

  .transfer-heading-text #transfer-heading {
    white-space: normal;
  }

}


.lead--with-help {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}









.transfer-heading-text {
  min-width: 0;
}

.transfer-heading-text #transfer-heading {
  display: inline-block;
  white-space: nowrap;
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1.6;
}

#transferToggle,
.transfer-accordion {
  display: none !important;
}

.transfer .accordion-panel {
  display: block;
}

@media (max-width: 767.98px){

  

  

  

  .transfer-heading-text #transfer-heading {
    white-space: nowrap;
    font-size: clamp(10px, 2.7vw, 13px);
  }

}






.transfer-fields {
  grid-template-columns: minmax(280px, 1.25fr) minmax(140px, 0.75fr) minmax(190px, 0.9fr);
  align-items: start;
}

.transfer-fields .field-inline {
  min-width: 0;
}

.transfer-fields .field-inline:first-child {
  min-width: 280px;
}



.input-with-unit--transfer-months {
  width: 118px;
  max-width: 100%;
}

.input-with-unit--residual-amount {
  width: 190px;
  max-width: 100%;
}

.input-with-unit--transfer-months .input,
.input-with-unit--residual-amount .input {
  text-align: right;
}

@media (max-width: 991.98px){

  .transfer-fields {
    grid-template-columns: 1fr;
  }

  .transfer-fields .field-inline:first-child {
    min-width: 0;
  }

  

  .input-with-unit--transfer-months,
.input-with-unit--residual-amount {
    width: 100%;
  }

}

















.transfer .input-with-unit {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  max-width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.transfer .input-with-unit:focus-within {
  outline: 0;
  border-color: transparent;
}

.transfer .input-with-unit .input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #828c9a;
  border-radius: 4px;
  background: #fff;
  text-align: right;
}

.transfer .input-with-unit .input:focus {
  outline: 3px solid rgba(41, 73, 182, 0.18);
  border-color: var(--blue);
}

.transfer .input-with-unit .input-unit {
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  color: var(--text);
  white-space: nowrap;
}

.transfer .input-with-unit.is-disabled {
  background: transparent;
}

.transfer .input-with-unit.is-disabled .input {
  color: #555;
  background: var(--disabled);
}

.transfer .input-with-unit.is-disabled .input-unit {
  color: #555;
  background: transparent;
}

.transfer .input-with-unit--transfer-months .input {
  width: 180px;
  max-width: 180px;
  flex: 0 0 180px;
}

.transfer .input-with-unit--residual-amount .input {
  width: 190px;
  max-width: 190px;
  flex: 0 0 190px;
}

@media (max-width: 767.98px){

  .transfer .input-with-unit {
    width: 100%;
  }

  .transfer .input-with-unit--transfer-months .input,
.transfer .input-with-unit--residual-amount .input {
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
  }

}


.lead--with-help {
  display: block;
}

.lead--with-help .lead__main,
.lead--with-help .lead__sub {
  display: inline;
}

.term-with-help {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  vertical-align: middle;
}

.help--inline-term {
  margin-left: 2px;
  padding: 0;
  flex: 0 0 auto;
}

.transfer .transfer-heading-text #transfer-heading {
  display: inline !important;
  white-space: nowrap !important;
}

.transfer .transfer-heading-text .term-with-help {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
}

@media (max-width: 767.98px){

  .lead--with-help .lead__main,
.lead--with-help .lead__sub {
    display: inline;
  }

  .transfer .transfer-heading-text #transfer-heading {
    white-space: normal !important;
  }

}

.lead--with-help {
  display: block;
  padding-top: 14px;
  line-height: 1.65;
}

.lead--with-help .lead__main,
.lead--with-help .lead__sub {
  display: block;
}

.lead--with-help .lead__sub {
  margin-top: 2px;
}

@media (min-width: 768px){

  .lead--with-help .lead__main,
.lead--with-help .lead__sub {
    white-space: nowrap;
  }

}

@media (max-width: 767.98px){

  .lead--with-help {
    line-height: 1.7;
  }

  .lead--with-help .lead__main,
.lead--with-help .lead__sub {
    white-space: normal;
  }

}

.transfer-details .badge:not(.badge--required) {
  color: #111;
  background: #d9d9d9;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.transfer-fields {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  align-items: start;
}

.transfer-fields .field-inline {
  width: 100%;
  max-width: 420px;
  min-width: 0 !important;
}

.transfer-fields .field-inline:first-child {
  max-width: 480px;
  min-width: 0 !important;
}



.transfer .input-with-unit--transfer-months .input {
  width: 180px;
  max-width: 180px;
  flex: 0 0 180px;
}

.transfer .input-with-unit--residual-amount .input {
  width: 240px;
  max-width: 240px;
  flex: 0 0 240px;
}

@media (max-width: 767.98px){

  .transfer-fields .field-inline,
.transfer-fields .field-inline:first-child {
    max-width: 100%;
  }

  

  .transfer .input-with-unit--transfer-months,
.transfer .input-with-unit--residual-amount {
    width: 100%;
  }

  .transfer .input-with-unit--transfer-months .input,
.transfer .input-with-unit--residual-amount .input {
    width: auto;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
  }

}


.term-with-help {
  gap: 1px !important;
}

.help--inline-term,
.transfer-heading-help {
  margin-left: 1px !important;
}

.transfer .transfer-heading-text .term-with-help {
  gap: 1px !important;
}

.transfer .transfer-heading-text #transfer-heading {
  white-space: normal !important;
}

.lead-detail-link {
  margin: 4px 0 0 !important;
  padding: 0 !important;
  color: var(--text) !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

.lead-detail-link a {
  font-weight: 700;
}

.input-card > .field-block:first-of-type {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.input-card > fieldset.field-block:first-of-type .radio-cards {
  margin-top: 10px !important;
}

@media (max-width: 767.98px){

  .lead-detail-link {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

  .input-card > .field-block:first-of-type {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

}

.input-card > fieldset.field-block:first-of-type {
  display: block;
  width: 100%;
  margin: 0;
  padding: 18px 16px !important;
  border: 0;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.input-card > fieldset.field-block:first-of-type > legend {
  display: block;
  float: left;
  width: 100%;
  margin: 0 0 10px !important;
  padding: 0 !important;
  line-height: 1.5;
  box-sizing: border-box;
}

.input-card > fieldset.field-block:first-of-type > legend + .radio-cards {
  clear: both;
  margin-top: 10px !important;
}

.input-card > fieldset.field-block:first-of-type::after {
  content: "";
  display: block;
  clear: both;
}

.transfer-detail-link {
  margin: 6px 0 12px !important;
  padding: 0 !important;
  color: var(--text) !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

.transfer-detail-link a {
  font-weight: 700;
}

.lead-detail-link {
  display: none !important;
}

@media (max-width: 767.98px){

  .input-card > fieldset.field-block:first-of-type {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .transfer-detail-link {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

}

.lead--with-help .lead__sub,
.transfer .transfer-heading-text #transfer-heading {
  line-height: 1.65 !important;
}

.lead--with-help .lead__sub .term-with-help,
.transfer .transfer-heading-text .term-with-help {
  display: inline !important;
  line-height: inherit !important;
  vertical-align: baseline !important;
  white-space: nowrap !important;
}

.lead--with-help .lead__sub .help--inline-term,
.transfer .transfer-heading-text .help--inline-term,
.transfer .transfer-heading-help {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin-left: 1px !important;
  padding: 0 !important;
  line-height: 1 !important;
  vertical-align: -0.28em !important;
}

.lead--with-help .lead__sub .help__tooltip,
.transfer .transfer-heading-text .help__tooltip {
  line-height: 1.5 !important;
}

@media (max-width: 767.98px){

  .lead--with-help .lead__sub,
.transfer .transfer-heading-text #transfer-heading {
    line-height: 1.7 !important;
  }

}

.lead--with-help .lead__sub .term-with-help,
.transfer .transfer-heading-text .term-with-help {
  display: inline-flex !important;
  align-items: center !important;
  gap: 1px !important;
  line-height: inherit !important;
  vertical-align: baseline !important;
  white-space: nowrap !important;
}

.lead--with-help .lead__sub .help--inline-term,
.transfer .transfer-heading-text .help--inline-term,
.transfer .transfer-heading-help {
  position: relative !important;
  top: -1px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin-left: 1px !important;
  padding: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

@media (max-width: 767.98px){

  .lead--with-help .lead__sub .help--inline-term,
.transfer .transfer-heading-text .help--inline-term,
.transfer .transfer-heading-help {
    top: -1px !important;
  }

}

.transfer-detail-link {
  font-size: clamp(12px, 1.05vw, 15px) !important;
  line-height: 1.65 !important;
}

.transfer-detail-link a {
  font-size: inherit !important;
}

@media (max-width: 767.98px){

  .transfer-detail-link {
    font-size: clamp(10px, 2.7vw, 13px) !important;
    line-height: 1.7 !important;
  }

}

/* ツールチップは端末幅に応じて画面外へのはみ出しを防ぐ。 */
.help__tooltip {
  width: max-content;
  max-width: min(360px, calc(100vw - 32px)) !important;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal !important;
  transform: translateX(calc(-50% + var(--tooltip-shift-x, 0px))) !important;
}

.help.help--tooltip-below .help__tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}

.help.help--tooltip-below .help__tooltip::before {
  top: auto;
  bottom: 100%;
}

@media (max-width: 767.98px){

  .help__tooltip {
    max-width: calc(100vw - 24px) !important;
    font-size: 12px;
    line-height: 1.55 !important;
  }

}












.transfer-detail-link--inside {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
}

.transfer-detail-link--inside a {
  font-size: inherit !important;
  font-weight: 700 !important;
}

.payment-table thead th,
.payment-table tbody th,
.payment-table tfoot th,
.payment-table tbody td,
.payment-table tfoot td {
  text-align: center !important;
}

.payment-table {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.payment-table thead th:nth-child(1),
.payment-table tbody th,
.payment-table tfoot th {
  width: 34% !important;
}

.payment-table thead th:nth-child(2),
.payment-table tbody td:nth-child(2),
.payment-table tfoot td:nth-child(2) {
  width: 66% !important;
}

.days-cell {
  justify-content: center !important;
}

.days-input,
#totalDays {
  flex: 0 1 220px !important;
  width: 220px !important;
  max-width: 100% !important;
}

@media (max-width: 767.98px){

  .payment-table {
    max-width: 100% !important;
  }

  .payment-table tbody th,
.payment-table tfoot th,
.payment-table tbody td,
.payment-table tfoot td {
    text-align: center !important;
  }

  .payment-table tbody td::before,
.payment-table tfoot td::before {
    text-align: center !important;
  }

  .days-cell {
    justify-content: center !important;
  }

  .days-input,
#totalDays {
    flex: 0 1 min(220px, 100%) !important;
    width: min(220px, 100%) !important;
  }

  .transfer-detail-link--inside {
    font-size: 14px !important;
    line-height: 1.7 !important;
  }

}



.payment-table {
  width: 100% !important;
  max-width: 820px !important;
  margin-inline: auto !important;
}
.payment-table thead th:nth-child(1),
.payment-table tbody th,
.payment-table tfoot th {
  width: 32% !important;
}
.payment-table thead th:nth-child(2),
.payment-table tbody td:nth-child(2),
.payment-table tfoot td:nth-child(2) {
  width: 68% !important;
}
.days-input,
#totalDays {
  flex: 0 1 240px !important;
  width: 240px !important;
  max-width: 100% !important;
}
@media (max-width: 767.98px){

  .payment-table {
    max-width: 100% !important;
  }
  .days-input,
#totalDays {
    flex-basis: min(220px, 100%) !important;
    width: min(220px, 100%) !important;
  }

}

/*
 * 納付日数欄は type="number" のため、ブラウザの増減ボタン領域が右側に確保される。
 * 合計欄は type="text" なので、その差分だけ右余白を追加して数字の右端を揃える。
 */
#totalDays {
  padding-right: 30px !important;
}

@media (max-width: 767.98px){

  #totalDays {
    padding-right: 30px !important;
  }

}


.lead--with-help,
.lead--with-help .lead__main,
.lead--with-help .lead__sub {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.lead--with-help .term-with-help {
  max-width: 100%;
}









/*
 * スマートフォン・タブレットでも、掛金日額と納付日数を
 * PCと同じ2列の表として表示する。
 */
@media (max-width: 767.98px){

  .table-wrap {
    width: 100%;
    overflow-x: hidden !important;
  }

  .payment-table {
    display: table !important;
    width: 100% !important;
    max-width: 820px !important;
    margin-inline: auto !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    background: #fff !important;
  }

  .payment-table thead {
    position: static !important;
    display: table-header-group !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 0 !important;
  }

  .payment-table tbody {
    display: table-row-group !important;
    width: auto !important;
  }

  .payment-table tfoot {
    display: table-footer-group !important;
    width: auto !important;
  }

  .payment-table tr,
.payment-table tbody tr,
.payment-table tfoot tr {
    display: table-row !important;
    width: auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  .payment-table th,
.payment-table td,
.payment-table tbody th,
.payment-table tbody td,
.payment-table tfoot th,
.payment-table tfoot td {
    display: table-cell !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 10px 8px !important;
    border: 1px solid var(--border) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  .payment-table thead th,
.payment-table tbody th,
.payment-table tfoot th,
.payment-table tfoot td {
    background: var(--blue-soft) !important;
  }

  .payment-table thead th:nth-child(1),
.payment-table tbody th,
.payment-table tfoot th {
    width: 32% !important;
  }

  .payment-table thead th:nth-child(2),
.payment-table tbody td:nth-child(2),
.payment-table tfoot td:nth-child(2) {
    width: 68% !important;
  }

  .payment-table tbody td::before,
.payment-table tfoot td::before,
.payment-table tbody th::before,
.payment-table tfoot th::before {
    content: none !important;
    display: none !important;
  }

  .days-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .days-input,
#totalDays {
    flex: 0 1 170px !important;
    width: min(170px, calc(100% - 27px)) !important;
    max-width: calc(100% - 27px) !important;
    min-width: 0 !important;
    min-height: 44px !important;
    font-size: 16px !important;
    text-align: right !important;
  }

  

  

  

  

}

/* 狭いスマートフォンでも1行を維持しつつ、入力文字が見切れない幅にする */
@media (max-width: 480px){

  .lead--with-help {
    padding-left: 0;
    padding-right: 0;
    font-size: 12px;
    line-height: 1.75;
  }

  

  

  

  

  

  .payment-table th,
.payment-table td,
.payment-table tbody th,
.payment-table tbody td,
.payment-table tfoot th,
.payment-table tfoot td {
    padding: 8px 5px !important;
    font-size: 13px !important;
  }

  .days-cell {
    gap: 5px !important;
  }

  .days-input,
#totalDays {
    flex-basis: 145px !important;
    width: min(145px, calc(100% - 23px)) !important;
    max-width: calc(100% - 23px) !important;
    min-height: 42px !important;
  }

}




.days-input,
#totalDays {
  box-sizing: border-box !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

/* number入力の増減ボタン領域による位置ずれをなくす */
.days-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.days-input::-webkit-outer-spin-button,
.days-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}











@media (max-width: 767.98px){

  .days-input,
#totalDays {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  

  

  

}




/*
 * 入力欄と「年・月・日」の間だけを狭くし、
 * 次の入力欄との間には適度な余白を確保する。
 */









/* 日付入力はPC・タブレット・スマートフォンで同じグリッド構造を共有する。 */
.wareki-date {
  display: grid;
  grid-template-columns:
    96px
    88px 1.2em
    56px 1.2em
    56px 1.2em;
  align-items: center;
  justify-content: start;
  column-gap: 4px;
  row-gap: 6px;
  width: fit-content;
  max-width: 100%;
}

.wareki-date--month {
  grid-template-columns:
    96px
    88px 1.2em
    56px 1.2em;
}

.wareki-date__era,
.wareki-date__number {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wareki-date__number {
  padding-left: 8px;
  padding-right: 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wareki-date > span {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
}

.transfer-fields .wareki-date--month {
  width: fit-content;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .wareki-date {
    grid-template-columns:
      78px
      76px 1.1em
      48px 1.1em
      48px 1.1em;
    column-gap: 3px;
    width: 100%;
  }

  .wareki-date--month {
    grid-template-columns:
      78px
      76px 1.1em
      48px 1.1em;
  }

  .wareki-date__era,
  .wareki-date__number {
    min-height: 46px;
  }

  .wareki-date__number {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (max-width: 374px) {
  .wareki-date {
    grid-template-columns:
      70px
      70px 1em
      44px 1em
      44px 1em;
    column-gap: 2px;
  }

  .wareki-date--month {
    grid-template-columns:
      70px
      70px 1em
      44px 1em;
  }

  .wareki-date__era,
  .wareki-date__number {
    font-size: 15px;
  }
}

/*
 * PC以外では、ツールチップを対象ボタン基準の絶対配置にせず、
 * 画面下部に固定表示する。
 * これにより、左右どちらの端にある「?」から開いても
 * ビューポート外へはみ出さず、横スクロールが発生しない。
 */
@media (max-width: 991.98px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .page,
  .form-panel,
  .lead--with-help,
  .layout,
  .input-card,
  .result-card {
    max-width: 100%;
    min-width: 0;
  }

  .help__tooltip,
  .help.help--tooltip-below .help__tooltip {
    position: fixed !important;
    z-index: 3000 !important;
    top: auto !important;
    right: 16px !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
    left: 16px !important;
    display: none;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 32px) !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: #fff;
    font-size: 13px;
    line-height: 1.6 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    transform: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .help.is-active .help__tooltip {
    display: block;
  }

  /*
   * JSが設定する横方向補正値や上下切替クラスは、
   * モバイル・タブレットでは使用しない。
   */
  .help {
    --tooltip-shift-x: 0px !important;
  }
}

@media (max-width: 480px) {
  .help__tooltip,
  .help.help--tooltip-below .help__tooltip {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 11px 12px !important;
    font-size: 12px;
  }
}

@media (max-width: 767.98px) {
  .section-heading {
    margin: 0 0 12px;
    padding: 18px 24px;
    background: var(--blue-soft);
    border-left: 4px solid var(--blue);
  }

  .section-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 20px;
    line-height: 1.45;
  }
}

.site-header {
  display: block !important;
  position: relative;
  z-index: 100;
  background: #fff !important;
  border-bottom: 0;
}

.site-header__inner {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  column-gap: 30px;
  width: 100%;
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 10px 15px !important;
  text-align: left !important;
  background: #fff;
}

.site-header__brand {
  display: flex;
  align-items: center;
  column-gap: 30px;
  width: auto;
  color: #1f1f1f;
  text-decoration: none;
}

.site-header__logo-picture {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header__logo {
  display: block;
  width: 170px;
  max-width: 100%;
  height: auto;
  flex: 0 0 auto;
}

.site-header__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-header__text > *:not(:first-child) {
  margin-top: 8px;
}

.site-header__organization {
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.site-header__name {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.site-header__meta {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .site-header__inner {
    max-width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    column-gap: 20px;
  }

  .site-header__brand {
    column-gap: 20px;
  }

  .site-header__logo {
    width: 130px;
  }
}

@media (max-width: 1023.98px) {
  .site-header__inner {
    justify-content: flex-start;
    width: 100%;
    max-width: none !important;
    height: 57.5px;
    margin: 0 !important;
    padding: 5px 5px 5px 15px !important;
    border-bottom: 1px solid #99a8f0;
  }

  .site-header__brand {
    column-gap: 0;
  }

  .site-header__logo {
    width: auto;
    max-width: none;
    max-height: 42px;
  }

  .site-header__text {
    display: none;
  }
}

/* 移動通算月数：ブラウザ標準の上下三角を非表示 */
#transferMonths {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: textfield !important;
}

#transferMonths::-webkit-outer-spin-button,
#transferMonths::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

.image-modal__dialog {
  width: min(920px, 100%);
  max-height: min(92dvh, 920px);
}

.image-modal__body {
  display: block;
  max-height: calc(92dvh - 86px);
  padding: 16px;
  overflow: auto;
  text-align: center;
}

.image-modal__text,
#handbookModal.image-modal--single-line-text .image-modal__text {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 0 12px;
  padding-left: 0;
  padding-right: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: normal;
}

.image-modal__text-line {
  display: block;
}

.image-modal__text-spacer {
  display: block;
  height: 0.7em;
}

.image-modal__note-line {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.35em;
  width: 100%;
  text-align: left;
}

.image-modal__note-marker {
  display: block;
  justify-self: start;
  align-self: baseline;
  width: 2.4em;
  min-width: 2.4em;
  line-height: inherit;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.image-modal__note-body {
  min-width: 0;
  line-height: inherit;
}

#handbookModalImage,
.image-modal__body img {
  display: block;
  width: auto !important;
  max-width: min(680px, 100%) !important;
  height: auto !important;
  max-height: calc(90dvh - 190px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  object-fit: contain !important;
  image-rendering: auto;
}

.image-modal__body img[hidden] {
  display: none !important;
}


@media (max-width: 991.98px) {
  #handbookModal.image-modal--single-line-text .image-modal__text {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 767.98px) {
  .image-modal {
    padding: 12px;
  }

  .image-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .image-modal__body {
    max-height: calc(100dvh - 86px);
    padding: 14px 12px 18px;
  }

  #handbookModalImage,
  .image-modal__body img {
    max-width: 100% !important;
    max-height: calc(100dvh - 230px) !important;
  }
}


/* 閉じるボタンは内容スクロールに影響されず右上へ表示する。 */
#handbookModal .image-modal__dialog {
  position: relative;
}

#handbookModal .image-modal__header {
  position: relative;
  min-height: 61px;
  padding-right: 64px !important;
}

#handbookModal .image-modal__close {
  position: absolute !important;
  top: 12px !important;
  right: 16px !important;
  z-index: 20 !important;
  display: inline-flex !important;
  flex: 0 0 36px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--blue-dark) !important;
  font-size: 26px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  border: 1px solid var(--border) !important;
  border-radius: 50% !important;
  background: #fff !important;
  cursor: pointer !important;
}

@media (max-width: 767.98px) {
  #handbookModal .image-modal__header {
    min-height: 57px;
    padding-right: 58px !important;
  }

  #handbookModal .image-modal__close {
    top: 10px !important;
    right: 12px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}
