/* Windows の BIZ UDPGothic で特定サイズのアンダーバーが消える問題の回避 */
@font-face {
    font-family: "lowline-fix";
    src: local("Hiragino Sans"), local("Hiragino-Sans"), local("游ゴシック体"),
        local("YuGothic"), local("Meiryo"), local("Meiryo UI");
    unicode-range: U+005F, U+FF3F;
}

body {
    font-family: "lowline-fix", "BIZ UDPGothic", serif;
    font-weight: 400;
    font-style: normal;
}
a {
    color: var(--color-blue);
    transition: color 0.2s linear;
    text-decoration: none;
    word-break: break-word;
}

a:hover,
a:focus,
a:active {
    transition: color 0.2s ease-out;
    text-decoration: underline;
}

/* Overwrite */
.h1, h1{
    font-size: min(calc((1.375rem + 1.2vw) * 0.75),30px);
}
.h2, h2{
    font-size: unset;
}
.h3, h3{
    font-size: calc((1.3rem + .6vw) * 0.75);
}
.h4, h4{
    font-size: calc((1.275rem + .3vw) * 0.75);
}
.h5, h5{
    font-size: calc(1.25rem * 0.75);
}
.h6, h6{
    font-size: calc(1rem * 0.75);
}
.btn {
    --bs-btn-color: black;
}
legend {
    font-size: inherit;
    margin-bottom: unset;
}

/* Main */
.container {
    max-width: 1140px
}
@media (max-width: 767.98px) {
    .container {
        padding-right: unset;
        padding-left: unset;
    }
}

.top-nav {
    position: relative;
}

.top-nav-org {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .875rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .top-nav-org {
        position: static;
        display: block;
        text-align: right;
        transform: none;
        padding: 4px 12px 0 0;
    }
}

.top-nav-title {
    position: relative;
    display: block;
}

.title-logo {
    position: absolute;
    right: 20px;
    display: block;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
}

@media (max-width: 768px) {
    .title-logo {
        position: relative;
        top: unset;
        right: unset;
        margin: 0 auto 1rem;
        width: 110px;
        transform: unset;
    }
}

.content {
    padding: 30px 20px;
    background: var(--color-white);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
@media (max-width: 767.98px) {
    .content {
        padding: var(--bs-gutter-x) calc(var(--bs-gutter-x) * .5);
    }
}

.note {
    color: var(--color-red);
}

/* Forms */
.form-control,
.form-check-input,
.form-select {
    border: 1px solid #000
}
/* readonly フィールドを視覚的に区別する (Issue #3) */
.form-control[readonly],
.form-select[readonly] {
    background-color: #e9ecef;
    opacity: 1;
    cursor: default;
}
/* number フィールドは金額等のため右寄せ表示 (Issue #4) */
input[type="number"].form-control {
    text-align: right;
}

.form-radio-input,
.form-checkbox-input {
    width: 1em;
    height: 1em;
    border: 1px solid #000;
    margin-top: .25em;
    vertical-align: top;
}
.col-form-label .form-radio-input {
    margin-left: 1rem
}

.error {
    border-color: var(--color-form-invalid);
    border-width: 3px;
}

.error:focus {
    box-shadow: 0 0 0 .25rem rgba(var(--color-red),.25);
    border-color: var(--color-form-invalid);
}

.form-required, .error-message, .is-alert{
    color: var(--color-form-invalid);
}
.form-required {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Confirm */
.is-only-confirm {
    display: none;
}
.is-confirm .is-only-confirm {
    display: initial;
}
.is-confirm .is-only-input {
    display: none;
}

/*** Header ***/
.is-border {
    border-bottom: 1px solid;
    margin-bottom: 15px;
}
h3 {
    border-left: 3px solid var(--color-primary);
    padding-left: 10px;
    margin-bottom: 15px;
}
h4 {
    margin-bottom: 15px;
}

.is-title {
    background-color: var(--color-lightprimary);
    padding: 0 14px;
}

/*** Label ***/
.is-background-box {
    background-color: var(--color-lightprimary);
    padding: 0 14px;
    font-weight: bold;
}

@media (max-width: 767.98px) {
    .is-background-box {
        margin-bottom: 7px;
        display: inline-block
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row {
        display: flex;
        flex-wrap: wrap;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child {
        display: contents;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child > * {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child > label {
        order: 1;
        padding-bottom: 0;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child > [id$="-sample"].ms-3 {
        order: 2;
        margin-left: 0 !important;
        margin-top: -1rem;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:nth-child(2) {
        order: 3;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child > .form-text:has(button.js-ajaxzip) {
        order: 4;
        display: flex;
        justify-content: center;
        margin: 5px 0 0 0;
    }
    .form-item:has(.col-md > .form-text > button.js-ajaxzip) .row > .col-md:first-child > .form-text:has(button.js-ajaxzip) button {
        margin-bottom: 0;
    }
}

/* Custom styles for all disabled checkboxes and radios */
input[type="radio"]:disabled:checked,
input[type="radio"]:checked{
    appearance: none;
    border-radius: 50%;
    border-color: var(--color-primary);
    position: relative
}

input[type="radio"]:disabled:checked:before,
input[type="radio"]:checked:before{
    content: "";
    border-radius: 50%;
    background-color: var(--color-primary);
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    top: 2px;
    left: 2px;
}

input[type="checkbox"] {
    appearance: none;
    border-color: var(--color-primary);
    border-style: solid;
    width: 1.2rem;
    height: 1.2rem;
    position: relative;
    border-radius: 2px;
    margin-right: 1rem;
    top: 0.2rem;
}

input[type="checkbox"]:disabled:checked::before,
input[type="checkbox"]:checked::before{
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.957 2.566a.738.738 0 00-1.054.004L6.285 9.707 3.736 7.16a.738.738 0 00-1.052-.003.84.84 0 000 1.184l3.527 3.54a.738.738 0 001.054 0l7.012-7.058a.84.84 0 00-.002-1.185z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
}

.form-control, .form-select {
    border-radius: 0 !important;
}

.form-control, .form-select {
    border-radius: 0 !important;
}

/* Customize */
.is-file .form-required {
    width: 4rem;
}
.is-file [id$="-sample"] {
    display: block;
    margin-bottom: 1rem;
}
[id$="-note"] {
    word-break: break-all;
}
.form-item.select [id$="-error"] {
    display: block;
    margin-left: 2rem;
}
.is-confirm .is-input-only,
.is-confirm [id$="-sample"],
.is-confirm [id$="-details"],
.is-confirm .form-required {
    display: none !important;
}
.is-confirm-only {
    display: none;
}
.is-confirm .is-confirm-only {
    display: block !important;
}
label + [id$="-error"] {
    display: block;
}
.is-confirm [type=file] {
    display: none;
}
/* Select2: 確認モード（native select 側が disabled）で × クリアボタンを非表示にする。
   Select2 自体は disabled クラスを付与するが、.select2-selection__clear は
   依然として視覚的に表示／クリック可能なため、明示的に非表示化する。 */
.select2-container--disabled .select2-selection__clear {
    display: none !important;
}
/* Select2: × クリアボタンのモバイルタップ対応 (Issue #9)
   タッチターゲットを拡大し、z-index で親要素より前面に配置する。 */
.select2-selection__clear {
    font-size: 1.25em;
    padding: 0 8px !important;
    position: relative;
    z-index: 1;
}
@media (max-width: 767.98px) {
    .select2-selection__clear {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}
.fake-checkbox {
    display: inline-block;
    border-color: var(--color-primary);
    border-style: solid;
    width: 1.2rem;
    height: 1.2rem;
    position: relative;
    border-radius: 2px;
    top: 0.2rem;
}
.fake-checkbox.is-checked {
    content: "";
    background-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.957 2.566a.738.738 0 00-1.054.004L6.285 9.707 3.736 7.16a.738.738 0 00-1.052-.003.84.84 0 000 1.184l3.527 3.54a.738.738 0 001.054 0l7.012-7.058a.84.84 0 00-.002-1.185z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
}
.btn-primary {
    background-color: var(--color-orange) !important;
    border-color: var(--color-orange) !important;
    color: var(--color-white) !important;
}
.btn-secondary {
    background-color: var(--color-blue) !important;
    border-color: var(--color-blue) !important;
    color: var(--color-white) !important;
}
.news-wrapper {
  border: 1px solid;
  margin-bottom: 1rem;
  padding: 1rem;
  max-width: 80%;
}
@media (max-width: 768px) {
  .news-wrapper {
    max-width: unset;
  }
}
@media (min-width: 941px) {
    .d-smd-block {
        display: block !important;
    }
    .d-smd-inline {
        display: inline !important;
    }
}
.block-alert {
    border: 2px solid var(--color-red);
    padding: 0.5rem;
    word-wrap: break-word !important;
    word-break: break-word !important;
}
.block-note {
    border: 2px solid var(--color-orange);
    padding: 0.5rem;
    word-wrap: break-word !important;
    word-break: break-word !important;
}
.btn-primary,.btn-secondary {
    color: var(--color-white);
}
@media (min-width: 769px) {
    .col-md.no-padding-md {
        padding:0;
    }
}

.is-disabled,
.is-disabled:focus {
    pointer-events: none !important; /* クリック無効 */
    opacity: 0.5 !important; /* 無効っぽく見せる */
    background-color: var(--color-gray) !important;
    border-color: var(--color-gray) !important;
}

.agreement {
    max-height: 300px; /* PC・スマホ共通 */
    overflow-y: auto;  /* 縦スクロールを有効 */
}

/* デフォルトではリンクを無効化（PC用） */
.tel-link {
    pointer-events: none;
    cursor: default;
    text-decoration: none;
    color: inherit; /* 通常のテキストと同じ見た目に */
}

/* スマホ時（768px以下）にリンクを有効化 */
@media screen and (max-width: 768px) {
    .tel-link {
        pointer-events: auto;
        cursor: pointer;
        /*text-decoration: underline; /* 必要に応じて下線 */
        color: var(--color-blue); /* スマホ時はリンクらしい色に */
    }
}
@media (min-width: 769px) {
    .login-form {
        margin:0 auto;
        max-width: 800px;
    }

    .login-form legend {
        text-align: center;
    }
}

/* For screens up to 768px: Adjust .form-text layout */
@media screen and (max-width: 768px) {
  .form-text:has(button.is-only-input) button {
    display: flex;
    margin-bottom: 0.7rem;
  }
}

/* Remove underline on hover for primary and secondary buttons */
.btn-primary:hover,
.btn-secondary:hover,
.btn-primary:focus,
.btn-secondary:focus {
  text-decoration: none;
}

/* PCではtel:リンクを無効化 */
@media (min-width: 769px) {
    a[href^="tel:"] {
        pointer-events: none;
        cursor: default;
        text-decoration: none;
        color: inherit;
    }
}
/* CSS Block document */
.form-document {
    padding: 1rem 0;
    margin-left: -1rem;
}
.form-document .document-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}
.form-document .document-image {
    margin: 0 auto 0.5rem;
    width: 100%;
    max-width: 10.251rem;
}
.form-document .document-image img {
    display: block;
    width: 100%;
    height: auto;
}
.form-document .document-item {
    position: relative;
    text-align: center;
}
.form-document .document-block {
    border-radius: .8rem;
    background-color: #fff1ea;
    border: 1px solid #000;
    font-weight: 700;
    text-align: center;
}
.form-document .document-block strong {
    font-weight: 700;
    color: #f00;
}

@media screen and (max-width: 767.98px) {
    .form-document .document-wrapper {
        font-size: 0.8rem;
        padding-bottom: 1rem;
    }
    .form-document .document-block {
        font-size: .9rem;
        max-width: 26rem;
        margin: 0 auto;
        padding: .7rem 1rem .8rem;
    }
}
@media (min-width: 768px) {
    .form-document {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    .form-document .document-wrapper {
        flex: 0 0 auto;
        font-size: 0.95rem;
        padding-bottom: 1rem;
    }
    .form-document .document-block {
        width: 33.3rem;
        font-size: 1.2rem;
        padding: .6rem 1rem .8rem;
    }
}

/* CSS Block identification */
.form-identification {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: -1rem;
}
.form-identification .form-note {
    margin-bottom: 0.5rem;
    color: #ed1c24;
}
.form-identification .identification-image {
    width: 100%;
    margin-bottom: 0.5rem;
}
.form-identification .identification-image img {
    display: block;
    width: 100%;
    height: auto;
}
.form-identification .identification-text {
    width: 100%;
    text-align: right;
}
@media screen and (max-width: 767.98px) {
    .form-identification .identification-text {
        font-size: 0.7rem;
    }
    .form-identification .form-note {
        font-size: 0.9rem;
    }
}
@media (min-width: 768px) {
    .form-identification .identification-text {
        font-size: 0.95rem;
        max-width: 40.251rem;
    }
    .form-identification .form-note {
        font-size: 1.26rem;
    }
    .form-identification .identification-image {
        max-width: 40.251rem;
    }
}
@media screen and (max-width: 767.98px) {
    .form-text:has(button.is-only-input) {
        display: flex;
        justify-content: center;
    }
    .form-text button:not(.js-ajaxzip) {
        margin: 0.3rem 0 1rem -1rem;
    }
}
.form-details .is-only-input {
    margin-left: 10px;
}
@media screen and (max-width: 767.98px) {
    .form-details .is-only-input {
        display: block;
        width: fit-content;
        margin-top: 5px;
    }

    .form-details button[type="button"] {
        padding-top: 2px;
    }
}

/* Initial Loading (override loader.css for page load) */
.loader-bg.is-initial {
    display: flex;
    opacity: 1;
    background-color: #fff;
}
.loader-bg.is-initial .loader:after {
    background: #fff;
}

/*** Copy address checkbox ***/
.form-check.is-only-input {
    display: flex;
    align-items: center;
}
.form-check.is-only-input .form-check-input {
    margin-top: 0;
}

/*** No online apply ***/
.js-no-online-apply {
    display: none;
}
form.is-no-online-apply .js-after-techo {
    display: none;
}
form.is-no-online-apply .js-no-online-apply {
    display: block;
}

/* SmartWizard */
#smartwizard > .nav {
    display: none !important;
}
#smartwizard .toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
#smartwizard .toolbar .btn {
    min-width: 120px;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.form-check.form-check-inline label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0;
    padding-bottom: 0;
}
.form-check.form-check-inline label input[type="checkbox"] {
    margin: 0;
    top: 0;
}
.form-item.select > .row {
    align-items: center !important;
}
.form-item.select:has(input[type="checkbox"]) > .row > .col-md:first-child {
    display: flex;
    align-items: baseline;
}
.form-item.select:has(input[type="checkbox"]) > .row > .col-md:nth-child(2) {
    display: flex;
    align-items: center;
}
.form-item.select:has(input[type="checkbox"]) > .row > .col-md:nth-child(2) input[type="checkbox"] {
    top: 0;
}
#smartwizard .toolbar .sw-btn-group-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
form.is-confirm #smartwizard .tab-content,
form.is-confirm #smartwizard .tab-pane {
    height: auto !important;
}
form.is-confirm #smartwizard .toolbar .sw-btn-prev,
form.is-confirm #smartwizard .toolbar .sw-btn-next,
form.is-confirm #smartwizard .toolbar #js-wizard-save {
    display: none !important;
}
form.is-confirm #smartwizard .toolbar #js-wizard-confirm {
    display: inline-flex !important;
}
form.is-confirm #smartwizard .toolbar .sw-btn-group-extra {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
}

/* 世帯員・加算セクションのカード */
.js-member-block.card,
.js-addition-block.card {
    border: 1px solid var(--color-border);
    border-radius: 0;
}
.js-member-block .card-header {
    background-color: var(--color-lightprimary);
    border-bottom: 1px solid var(--color-border);
    border-radius: 0 !important;
}
.js-addition-block .card-body {
    background-color: transparent;
}

[id$="flag-note"] {
    margin-left: 1rem;
}

.is-label-bold .col-form-label,.is-label-bold .form-text {
    font-weight: bold;
}

.is-label-block label {
    display: block;
}

.col-md.is-file {
  display: flex;
  flex-direction: row;
  align-items: baseline;
}
@media (max-width: 768px) {
    .js-delete-file {
        display: block;
    }
}

@media (width >= 941px) {
    .col-md.is-file {
        flex: 1 0 0%;
    }
}
@media (768px <= width < 941px) {
    .col-md.is-file {
        flex: initial;
    }
    .col-md.is-file label {
        display: inline;
    }
}
@media (width < 768px) {
    .col-md.is-file {
        display: block;
    }
    .col-md.is-file label {
        display: inline;
    }
}

.note-list li::marker {
  content: "※ ";
}

.form-check, .form-check-inline {
    padding-left: unset;
    margin-left: unset;
}

@media (max-width: 767.98px) {
    .sw>.tab-content {
        padding: unset !important;
    }
    .sw>.tab-content>.tab-pane {
        padding: calc(var(--bs-gutter-x) * .25) !important;
    }
    .card .card-body .row>* {
        padding-right: unset;
        padding-left: unset;
    }
}

/* 日付ピッカー横並びレイアウト（期間・居所・加算等） */
.js-date-wrap {
    flex: 1;
    min-width: 120px;
}
.js-date-wrap input[data-class="js-date"] {
    width: 100%;
}
.js-date-wrap .error-message {
    display: block;
}
.js-date-wrap + .mx-1 {
    line-height: calc(1.5em + .75rem + 2px);
}
.js-period-row[data-period="1"] > .d-flex::after {
    content: '';
    width: 32px;
    flex-shrink: 0;
}
.is-confirm .js-period-row[data-period="1"] > .d-flex::after {
    display: none;
}

/* お問い合わせフォーム: ラベル上・入力枠下の縦積み（全画面。構成案準拠） */
form[name="fm-contact"] .form-item .row > .col-md {
    flex: 0 0 100%;
    max-width: 100%;
}
form[name="fm-contact"] .form-item .row > .col-md:first-child {
    margin-bottom: .25rem;
}
/* メール2分割・電話3分割の横並びボックス */
form[name="fm-contact"] .contact-split {
    display: flex;
    align-items: flex-start; /* エラーが下に付いても入力欄・区切りは上端で揃える */
    gap: .5rem;
    flex-wrap: nowrap;
}
form[name="fm-contact"] .contact-split-field {
    flex: 1 1 0;
    min-width: 0;
}
form[name="fm-contact"] .contact-split-field .form-control {
    width: 100%;
}
/* 分割ボックス直下に出す各エラーメッセージ（@後の項目は右側=ドメイン欄の下に表示される） */
form[name="fm-contact"] .contact-split-field .error-message {
    display: block;
}
form[name="fm-contact"] .contact-split-sep {
    flex: 0 0 auto;
    font-weight: bold;
    line-height: calc(1.5em + .75rem + 2px); /* 区切り(@,-)を入力欄の高さに合わせて中央寄せ */
}
/* 各項目ラベルの先頭に ● を付与（構成案準拠） */
form[name="fm-contact"] .col-form-label::before {
    content: "●";
    margin-right: .4em;
    color: var(--color-primary);
    font-size: .7em;
    vertical-align: middle;
}
