/* =============================================
   屋根修理シミュレーター CSS
============================================= */
:root {
    --rs-accent:      #e8a020;
    --rs-accent-dark: #c4861a;
    --rs-accent-bg:   #fdf3e0;
    --rs-text:        #1a1510;
    --rs-muted:       #6b6057;
    --rs-border:      #e8e4dc;
    --rs-white:       #ffffff;
    --rs-shadow:      0 2px 12px rgba(0,0,0,.08);
    --rs-radius:      12px;
}

/* ラッパー */
.rs-wrap {
    max-width: 780px;
    margin: 0 auto;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--rs-text);
}

/* =============================================
   プログレスバー
============================================= */
.rs-progress {
    display: flex;
    align-items: flex-start; /* ラベル有無に関わらず上揃えで管理 */
    justify-content: center;
    margin-bottom: 40px;
    gap: 0;
}
.rs-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.rs-progress__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rs-border);
    color: var(--rs-muted);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s, color .3s;
    flex-shrink: 0;
}
.rs-progress__label {
    font-size: 11px;
    color: var(--rs-muted);
    white-space: nowrap;
    transition: color .3s;
}
/* 線を円の垂直中心（36px / 2 - 1px = 17px）に合わせる */
.rs-progress__line {
    flex: 1;
    height: 2px;
    background: var(--rs-border);
    min-width: 12px;
    max-width: 60px;
    margin-top: 17px; /* circle高さの半分 */
    transition: background .3s;
}

/* アクティブ状態 */
.rs-progress__step.is-active .rs-progress__circle {
    background: var(--rs-accent);
    color: #fff;
}
.rs-progress__step.is-active .rs-progress__label {
    color: var(--rs-accent);
    font-weight: 700;
}
/* 完了状態 */
.rs-progress__step.is-done .rs-progress__circle {
    background: var(--rs-accent);
    color: #fff;
}
.rs-progress__step.is-done .rs-progress__circle::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 13px;
}
.rs-progress__step.is-done .rs-progress__circle { font-size: 0; }
.rs-progress__step.is-done + .rs-progress__line {
    background: var(--rs-accent);
}

/* =============================================
   ステップパネル
============================================= */
.rs-step {
    display: none;
    animation: rsFadeIn .3s ease;
}
.rs-step.is-active {
    display: block;
}
@keyframes rsFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.rs-step__title {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 900;
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.4;
}
.rs-step__sub {
    text-align: center;
    color: var(--rs-muted);
    font-size: 14px;
    margin: 0 0 28px;
}

/* =============================================
   選択カード
============================================= */
.rs-cards {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}
.rs-cards--3col { grid-template-columns: repeat(3, 1fr); }
.rs-cards--2col { grid-template-columns: repeat(2, 1fr); }

.rs-card {
    background: var(--rs-white);
    border: 2px solid var(--rs-border);
    border-radius: var(--rs-radius);
    padding: 24px 12px 20px;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, transform .15s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--rs-shadow);
    font-family: inherit;
}
.rs-card i {
    font-size: 32px;
    color: var(--rs-accent);
    transition: transform .2s;
}
.rs-card span {
    font-size: 13px;
    font-weight: 700;
    color: var(--rs-text);
    line-height: 1.4;
}
.rs-card:hover {
    border-color: var(--rs-accent);
    background: var(--rs-accent-bg);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(232,160,32,.18);
}
.rs-card:hover i { transform: scale(1.15); }
.rs-card.is-selected {
    border-color: var(--rs-accent);
    background: var(--rs-accent-bg);
}

/* =============================================
   注釈ボックス
============================================= */
.rs-note {
    background: #e8f4fb;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.rs-note p {
    margin: 0;
    font-size: 13px;
    color: #3a6a8a;
    line-height: 1.8;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}
.rs-note p + p { margin-top: 4px; }
.rs-note i {
    color: #4a9abf;
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 12px;
}

/* =============================================
   戻るボタン
============================================= */
.rs-back {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--rs-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    margin-top: 4px;
    transition: color .2s;
}
.rs-back:hover { color: var(--rs-text); }

/* =============================================
   SMS 認証モーダル
============================================= */
.rs-sms-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.rs-sms-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 36px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.rs-sms-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
}
.rs-sms-modal-close:hover { color: #333; }
.rs-sms-modal-icon {
    font-size: 40px;
    color: var(--rs-accent);
    margin-bottom: 12px;
}
.rs-sms-modal-icon--ok { color: #28a745; }
.rs-sms-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--rs-text);
    margin-bottom: 8px;
}
.rs-sms-modal-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.6;
}
.rs-sms-modal-phone {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--rs-text);
    background: #f4f4f4;
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    display: inline-block;
}
.rs-sms-modal-btn {
    display: block;
    width: 100%;
    background: var(--rs-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    margin-bottom: 12px;
}
.rs-sms-modal-btn:hover    { background: #d08010; }
.rs-sms-modal-btn:disabled { opacity: .6; cursor: not-allowed; }
.rs-sms-code-input {
    width: 100%;
    font-size: 28px;
    letter-spacing: .3em;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px 8px;
    margin-bottom: 14px;
    box-sizing: border-box;
    font-family: monospace;
    transition: border-color .2s;
}
.rs-sms-code-input:focus {
    border-color: var(--rs-accent);
    outline: none;
}
.rs-sms-resend-wrap {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.rs-sms-timer { display: block; }
.rs-sms-resend-link {
    background: none;
    border: none;
    color: #2a6496;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.rs-sms-modal-error {
    color: #c0392b;
    font-size: 13px;
    margin: 8px 0 0;
}
.rs-sms-modal-note {
    font-size: 11px;
    color: #aaa;
    margin: 8px 0 0;
}

/* =============================================
   連絡先フォーム
============================================= */
.rs-form {
    background: var(--rs-white);
    border-radius: var(--rs-radius);
    padding: 32px;
    box-shadow: var(--rs-shadow);
    margin-bottom: 20px;
}
.rs-form__row {
    margin-bottom: 20px;
}
.rs-form__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}
.rs-form__req {
    display: inline-block;
    background: var(--rs-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.rs-form__input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid var(--rs-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--rs-text);
    transition: border-color .2s;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
}
.rs-form__input:focus {
    outline: none;
    border-color: var(--rs-accent);
}
.rs-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8 0 0h12z' fill='%23a0998e'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.rs-form__note {
    font-size: 12px;
    color: var(--rs-muted);
    margin: 0 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.6;
}
.rs-form__note i { color: var(--rs-accent); margin-top: 2px; flex-shrink: 0; }
.rs-form__opt {
    display: inline-block;
    background: var(--rs-muted);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.rs-area-loading {
    display: none;
    margin-left: 8px;
    color: var(--rs-accent);
    font-size: 13px;
    vertical-align: middle;
}
.rs-form__error {
    color: #e33967;
    font-size: 13px;
    min-height: 20px;
    margin-top: 8px;
}
.rs-submit {
    width: 100%;
    background: var(--rs-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 18px;
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 16px rgba(232,160,32,.35);
}
.rs-submit:hover {
    background: var(--rs-accent-dark);
    transform: translateY(-2px);
}
.rs-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   完了画面
============================================= */
.rs-thanks {
    text-align: center;
    padding: 40px 20px;
    background: var(--rs-white);
    border-radius: var(--rs-radius);
    box-shadow: var(--rs-shadow);
}
.rs-thanks__icon {
    font-size: 64px;
    color: #4caf50;
    margin-bottom: 20px;
}
.rs-thanks__title {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 16px;
}
.rs-thanks__desc {
    color: var(--rs-muted);
    line-height: 1.9;
    margin: 0 0 28px;
}
.rs-thanks__ref {
    display: inline-block;
    background: var(--rs-accent-bg);
    border: 1px solid var(--rs-accent);
    color: var(--rs-accent-dark);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 6px;
    margin: 0 0 20px;
    font-family: 'Oswald', monospace;
    letter-spacing: .06em;
}
.rs-thanks__btn {
    display: inline-block;
    background: var(--rs-accent);
    color: #fff;
    padding: 14px 36px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background .2s;
}
.rs-thanks__btn:hover { background: var(--rs-accent-dark); }

/* =============================================
   レスポンシブ
============================================= */
@media (max-width: 600px) {
    .rs-cards--3col { grid-template-columns: repeat(2, 1fr); }
    .rs-cards--2col { grid-template-columns: repeat(2, 1fr); }
    .rs-card { padding: 18px 8px 14px; }
    .rs-card i { font-size: 26px; }
    .rs-card span { font-size: 12px; }
    .rs-form { padding: 20px 16px; }
    .rs-progress__label { display: none; }
    .rs-progress__circle { width: 30px; height: 30px; font-size: 13px; }
    /* SP では円が 30px なので中心 = 14px */
    .rs-progress__line { margin-top: 14px; min-width: 8px; }
}
@media (max-width: 360px) {
    .rs-cards--3col,
    .rs-cards--2col { grid-template-columns: 1fr 1fr; }
}
