/* カラーコードの定義 */
:root {
    --primary-color: #ed6c00; /* メインカラー */
    --secondary-color: #0086d1; /* サブカラー */
    --highlight-color: #fdf0e5; /* ハイライト色 */
    --highlight-color-sec: #edf7fc; /* ハイライト色（サブカラー） */
    --text-color: #000; /* 文字色 */
    --text-color-light: #666666; /* 文字色（薄い） */
    --error-color: #C11920; /* エラー色 */
    --background-color: #ffe75d; /* 背景色 */
    --border-color: #d9d9d9; /* 枠線色 */
}

body {
    min-height: 100vh;
    padding: 16px 0;
    background: linear-gradient(90deg, #ffdb77, #ffe99b 49.05%, #ffdb77);
}

body:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(/miraiz_app/zz_form/lpg_form/img/bg.jpg);
    background-size: 750px auto;
    background-position: top center;
    background-repeat: repeat;
    mix-blend-mode: soft-light;
}

/* すべてのフォーム要素に適用 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
    /* Androidの独自スタイルをリセット */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* box-sizingを指定（重要！） */
    box-sizing: border-box;

    /* 最小の高さを確保（タップしやすい） */
    /* min-height: 44px; Androidの推奨タップサイズ */

    /* line-heightを明示的に */
    line-height: 1.5;

    /* Androidでのレンダリング改善 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

table {
    overflow: hidden;
    border: solid 2px var(--highlight-color-sec);
    border-radius: 0 0 16px 16px;
}

@media (max-width: 480px) {
    table:not(#dtTable) {
        border: solid 2px var(--highlight-color-sec);
        padding: 0 12px!important;
    }
}

@media (max-width: 480px) {
    table:not(#dtTable) tr {
        border: none !important;
        margin-bottom: 0!important;
    }
}

table th, table td {
    padding: 18px 20px 16px!important;
    border: solid 1px var(--highlight-color-sec) !important;
    color: var(--text-color)!important;
}

table th pre {
    padding: 0!important;
    line-height: 1.8;
}

@media only screen and (max-width: 480px) {
    table tbody tr th pre:before {
        display: none !important;
    }

    table tbody tr th pre:after {
        display: none !important;
    }
}

table td {
    background-color: #FFF;
}

@media only screen and (max-width: 480px) {
    table td {
        padding: 10px 0 8px!important;
    }
}

table td pre {
    display: inline;
    line-height: 1.6;
}

@media only screen and (max-width: 480px) {
    table tbody tr th pre {
        padding: 16px 0 0 4px !important;
        font-size: 14px;
    }
}

input[type=text], input[type=password], select, textarea {
    box-shadow: none!important;
    border: 1px solid var(--border-color);
}

select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    background-color: #fff;
    border: 1px solid var(--border-color);
}

td input[type="text"]:focus, textarea:focus, input[type="password"]:focus, select:focus, input[type="radio"]:focus, input[type="checkbox"]:focus, input[type="button"]:focus {
    outline: none;
    border-color: var(--secondary-color)!important;
}

input[type="radio"]:focus {
    border-color: initial !important;
    box-shadow: none !important;
}

table td label {
    padding: 7px 0;
    display: block;
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/* input::placeholder {
    font-size: 14px;
    color: #999;
} */

@media only screen and (max-width: 480px) {
    input[type=button][name^="btnZipCode"] {
        width: auto!important;
        font-size: 14px;
    }
}

input[type="button"], input[type="submit"] {
    background: var(--secondary-color)!important;
    box-shadow: none!important;
}

.radio:after, .checkbox:after {
    border: 1px var(--secondary-color) solid;
}

/* PC/SPクラス */
@media only screen and (max-width: 480px) {
    .pc {
        display: none;
    }
}

.sp {
    display: none;
}

@media only screen and (max-width: 480px) {
    .sp {
        display: block;
    }
}

#error_msg {
    padding: 0 12px;
    margin-bottom: 20px;
    color: var(--error-color)!important;
    border-bottom: none;
    font-size: 14px;
    background: none;
}

#error_msg::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23D32F2F'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

#header h1 {
    padding-top: 10px;
    padding-left: 20px;
    line-height: 1.2;
}

@media screen and (max-width: 480px) {
    #header h1 {
        text-align: left;
        padding: 10px 20px 5px 12px!important;
        font-size: 16px;
    }
}

#nav {
    height: 4px;
    background: linear-gradient(90deg, #fff 0%, #fff 28px, var(--primary-color) 20px, var(--primary-color) 300px, var(--secondary-color) 520px, var(--secondary-color) 100%);
    margin-top: 32px;
}

@media screen and (max-width: 480px) {
    #nav {
        background: linear-gradient(90deg, #fff 0%, #fff 24px, var(--primary-color) 10px, var(--primary-color) 80px, var(--secondary-color) 220px, var(--secondary-color) 100%);
    }
}

#article {
    max-width: 960px;
    padding: 30px 60px;
}

@media screen and (max-width: 480px) {
    #article {
        padding: 20px 20px;
    }
}

#message {
    margin: 0!important;
}

#wrapper {
    position: relative;
    border-radius: 24px;
    box-shadow: 0 4px 20px #00000026;
}

.note-block {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 10px 10px 28px;
    font-size: 13px;
    line-height: 1.8;
    color: #666;
}

@media screen and (max-width: 480px) {
    .note-block {
        margin: 8px 8px 28px;
    }
}

.note-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.note-text {
    margin: 0;
    flex: 1;
    text-align: left;
}

/* STEP */
.form-step {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin: 30px 0 60px;
    position: relative;
    z-index: 0;
    display: flex;
    justify-content: center;
    gap: 90px;
}

.form-step__item {
    width: 3.3rem;
    position: relative;
}

.form-step__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.65rem;
    left: 3.8rem;
    width: 76px;
    height: 4px;
    background: var(--border-color);
    border-radius: 10px;
}

.form-step__num {
    font-size: 0.5rem;
    font-weight: bold;
    line-height: 1.1;
    background: #fff;
    width: 100%;
    height: 3.3rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.form-step__num em {
    font-size: 1.2rem;
    font-weight: bold;
}

.form-step__txt {
    font-weight: bold;
}

.form-step__item.is-active {
    color: var(--primary-color);
}

.form-step__item.is-active .form-step__num {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 完了したステップ */
.form-step__item.is-completed {
    color: var(--primary-color);
}

.form-step__item.is-completed .form-step__num {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 0.6;
}

.form-step__item.is-completed .form-step__txt {
    opacity: 0.6;
}

@media screen and (max-width: 480px) {
    .form-step {
        margin: 10px 0 40px;
        gap: 30px;
        font-size: 0.8rem;
    }

    .form-step::before {
        width: calc(8rem + 140px);
    }

    .form-step__item {
        width: 3.2rem;
    }

    .form-step__item:not(:last-child)::after {
        left: 3.6rem;
        width: 20px;
    }

    .form-step__num {
        height: 3.2rem;
        font-size: 0.55rem;
    }

    .form-step__num em {
        font-size: 1.15rem;
    }

    .form-step::before {
        top: 1.9rem;
    }
}

.table-caption {
    padding: 12px 20px;
    border-radius: 16px 16px 0 0;
    border-left: none !important;
    text-align: left;
    color: var(--secondary-color)!important;
    font-weight: bold;
    background-color: var(--highlight-color-sec)!important;
}

.table-caption span {
    display: block;
    margin: 4px 0 0 0;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.8;
    color: #666;
}

@media screen and (max-width: 480px) {
    .table-caption {
        font-size: 16px;
    }
}

span.required {
    margin-top: 10px !important;
    margin-right: 8px;
    border-radius: 4px;
    background-color: var(--primary-color)!important;
}

@media screen and (max-width: 480px) {
    span.required {
        margin-top: 8px !important;
        margin-right: 0;
    }
}

span.optional {
    background-color: #BBB;
}

/* ラジオボタン カード型選択肢 */
/* カード型ラジオボタン（汎用版） */
.card-radio-container .flex-container {
    display: flex!important;
    gap: 16px;
}

.card-radio-container label {
    position: relative;
    flex: 1;
    margin-bottom: 16px!important;
    padding: 12px 16px!important;
    display: flex!important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px!important;
    background: #fff!important;
    cursor: pointer;
    transition: all 0.2s;
}

.card-radio-container label input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
    z-index: 1;
}

/* カスタムラジオボタン */
.card-radio-container label::before {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid var(--secondary-color);
    border-radius: 50%;
    background: #fff;
    transition: all 0.2s;
    z-index: 2;
    position: relative;
}

/* アイコン表示エリア */
.card-radio-container label::after {
    content: "";
    flex-shrink: 0;
    margin-left: 20px;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    order: 1;
}

/* アイコン指定なしの場合は非表示 */
.card-radio-container label:not([class*="icon-"])::after {
    display: none;
}

/* アイコンパターン定義（クラスベース） */
.card-radio-container label.icon-house::after {
    background-image: url('/miraiz_app/zz_form/lpg_form/img/icon_house.svg');
    width: 44px;
}

.card-radio-container label.icon-house-propane::after {
    background-image: url('/miraiz_app/zz_form/lpg_form/img/icon_house_propane.svg');
    width: 60px;
}

.card-radio-container label.icon-house-gas::after {
    background-image: url('/miraiz_app/zz_form/lpg_form/img/icon_house_gas.svg');
    width: 60px;
}

.card-radio-container label.icon-apartment::after {
    background-image: url('/miraiz_app/zz_form/lpg_form/img/icon_apartment.svg');
    width: 44px;
}

/* チェック時のスタイル */
.card-radio-container label:has(input[type="radio"]:checked) {
    border: 1px solid var(--secondary-color)!important;
    background: var(--highlight-color-sec)!important;
    box-shadow: inset 0 0 0 1px var(--secondary-color);
}

.card-radio-container label:has(input[type="radio"]:checked)::before {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    box-shadow: inset 0 0 0 3px #fff;
}

/* テキスト部分 */
.card-radio-container label .radio {
    margin: 0 !important;
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
    position: relative;
    z-index: 2;
    order: 2;
}

.card-radio-container label .radio::before,
.card-radio-container label .radio::after {
    display: none!important;
}

@media only screen and (max-width: 480px) {
    .card-radio-container .flex-container {
        flex-direction: column;
        gap: 0;
    }
    .card-radio-container label {
        min-width: auto;
        width: calc(100% - 32px);
    }
}

.building-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--highlight-color);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 13px;
    line-height: 1.7;
}

.building-note__icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

#event_area {
    display: flex;
    justify-content: center;
    /* row-gap: 20px; */
    column-gap: 40px;
}

#event_area .bt {
    position: relative;
    border-radius: 50px !important;
    letter-spacing: 0.1em;
    max-width: none !important;
    width: 280px !important;
    cursor: pointer;
    margin: 0 !important;
    box-shadow: none !important;
    background-color: var(--primary-color) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='9,6 15,12 9,18'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 20px 20px !important;
}

#event_area .bt.back {
    background-color: #BBB !important;
    border-color: #BBB !important;
    color: #FFF !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='15,6 9,12 15,18'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 16px center !important;
    background-size: 20px 20px !important;
}

#event_area .bt.outline {
    background-color: #FFF !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed6c00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='9,6 15,12 9,18'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 20px 20px !important;
}

@media only screen and (max-width: 480px) {
    #event_area {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    #event_area .bt {
        margin: 10px 0!important;
        width: 100%!important;
        max-width: 300px!important;
    }
}

#footer {
    border-radius: 0 0 24px 24px;
    background-color: #222!important;
}