@charset "UTF-8";

/* ============================================================
   誰でもスマホ｜ご契約診断ウィジェット
   接頭辞 sd- / s-shindan で統一（LP既存CSSと衝突しません）
   ============================================================ */

.s-shindan {
    --sd-red: #f5004f;
    --sd-red-dark: #cf0032;
    --sd-orange: #ff7a00;
    --sd-text: #2b2b2b;
    --sd-bg: #f4f4f6;      /* 診断セクションの背景色 */
    --sd-head: #F2003B;    /* カード見出し帯の色 */
    --sd-line: #dcdce2;
    --sd-cream: #fff8e6;

    background: var(--sd-bg);
    padding: 40px 16px 48px;
    color: var(--sd-text);
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
}

.s-shindan *,
.s-shindan *::before,
.s-shindan *::after {
    box-sizing: border-box;
}

/* LP本体CSSの「div:after / section:after」クリアフィックスを
   ウィジェット内では無効化（余計な空ブロックでレイアウトが崩れるため） */
.s-shindan::after,
.s-shindan div::after,
.s-shindan section::after {
    content: none;
}

/* セレクトの▼だけは擬似要素で描画しているので戻す */
.s-shindan .sd-select::after {
    content: '';
}

.s-shindan__inner {
    max-width: 600px;
    margin: 0 auto;
}

.s-shindan img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------------------------------------
   入力カード
   ------------------------------------------------------------ */
.sd-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.sd-card__head {
    background: var(--sd-head);
    color: #fff;
    text-align: center;
    padding: 16px 16px 18px;
}

.sd-card__head-sub {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
}

.sd-card__head-main {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 4px;
}

.sd-card__body {
    padding: 20px 20px 24px;
}

/* ------------------------------------------------------------
   設問
   ------------------------------------------------------------ */
.sd-field {
    margin-bottom: 22px;
}

.sd-field[hidden] {
    display: none;
}

.sd-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.sd-label__q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    background: var(--sd-red-dark);
    color: #fff;
    font-size: 12px;
    letter-spacing: .02em;
}

.sd-req {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 3px;
    background: var(--sd-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* 選択肢（ボタン型ラジオ） */
.sd-choices {
    display: grid;
    gap: 10px;
}

.sd-choices--2 {
    grid-template-columns: 1fr 1fr;
}

/* 3択は文言が長いので、SPは縦積み・PCは横3列 */
.sd-choices--3 {
    grid-template-columns: 1fr;
}

.sd-choices--3 .sd-choice span {
    min-height: 46px;
}

.sd-label__note {
    flex: 1 0 100%;
    color: #777;
    font-size: 12px;
    font-weight: 400;
}

.sd-hint {
    margin: 8px 0 0;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
}

.sd-choice {
    position: relative;
    display: block;
    cursor: pointer;
}

.sd-choice input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sd-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px 10px;
    border: 2px solid var(--sd-line);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    transition: .15s;
}

.sd-choice input:checked+span {
    border-color: var(--sd-red);
    background: #fff2f6;
    color: var(--sd-red-dark);
}

.sd-choice input:focus-visible+span {
    outline: 2px solid var(--sd-red);
    outline-offset: 2px;
}

/* セレクト */
.sd-select {
    position: relative;
}

.sd-select::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 9px;
    height: 9px;
    margin-top: -6px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    pointer-events: none;
}

.sd-select select {
    width: 100%;
    min-height: 52px;
    padding: 8px 40px 8px 14px;
    border: 2px solid var(--sd-line);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    appearance: none;
}

.sd-select select:focus-visible {
    outline: 2px solid var(--sd-red);
    outline-offset: 2px;
}

/* エラー */
.sd-error {
    margin: 6px 0 0;
    color: var(--sd-red);
    font-size: 13px;
    font-weight: 700;
    min-height: 0;
}

.sd-error:empty {
    display: none;
}

.sd-field.is-error .sd-choice span,
.sd-field.is-error .sd-select select {
    border-color: var(--sd-red);
}

/* 診断ボタン */
.sd-submit {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 18px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--sd-red-dark);
    color: #fff;
    font-family: inherit;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    box-shadow: 0 4px 0 #a3002a;
    transition: .15s;
}

.sd-submit:hover {
    filter: brightness(1.08);
}

.sd-submit:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #a3002a;
}

/* ------------------------------------------------------------
   結果
   ------------------------------------------------------------ */
.sd-result {
    margin-top: 28px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .35s ease, transform .35s ease;
}

.sd-result.is-visible {
    opacity: 1;
    transform: none;
}

.sd-result[hidden] {
    display: none;
}

.sd-result__head {
    background: linear-gradient(90deg, var(--sd-red) 0%, var(--sd-orange) 100%);
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 20px;
    font-weight: 700;
}

.sd-result__body {
    padding: 20px 20px 26px;
}

.sd-visual img {
    width: 100%;
    border-radius: 10px;
}

/* リード文 */
.sd-lead {
    margin: 18px 0 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
}

/* 電話ボタン */
.sd-tel {
    margin-top: 14px;
}

.sd-tel[hidden],
.sd-cta[hidden],
.sd-info[hidden],
.sd-note[hidden],
.sd-retry[hidden] {
    display: none;
}

.sd-tel__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 16px;
    border: 1px solid var(--sd-line);
    border-radius: 999px;
    background: #fff;
    color: var(--sd-text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.sd-tel__btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex: none;
}

/* CTA */
.sd-cta {
    margin-top: 22px;
    text-align: center;
}

.sd-cta__ribbon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    color: var(--sd-red);
    font-size: 14px;
    font-weight: 700;
}

.sd-cta__ribbon::before,
.sd-cta__ribbon::after {
    content: '';
    width: 2px;
    height: 16px;
    background: var(--sd-red);
}

.sd-cta__ribbon::before {
    transform: rotate(-20deg);
}

.sd-cta__ribbon::after {
    transform: rotate(20deg);
}

.sd-cta__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 52px 18px 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sd-red) 0%, var(--sd-orange) 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(245, 0, 79, .3);
}

.sd-cta__arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border-radius: 50%;
    background: #fff;
    color: var(--sd-orange);
    font-size: 15px;
    line-height: 1;
}

/* もう一度診断する */
.sd-retry {
    margin: 14px 0 0;
    text-align: center;
}

.sd-retry a {
    color: #1f7fd4;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.sd-retry a::before {
    content: '↻ ';
}

/* 情報ブロック */
.sd-info {
    margin-top: 20px;
    padding: 16px 16px 18px;
    border-radius: 10px;
    background: var(--sd-cream);
}

.sd-info__head {
    margin: 0 0 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.sd-info__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sd-info__list li {
    position: relative;
    padding-left: 26px;
    font-size: 13px;
    color: #555;
}

.sd-info__list li+li {
    margin-top: 12px;
}

.sd-info__list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 7px;
    width: 12px;
    height: 7px;
    border-left: 2.5px solid #00a95f;
    border-bottom: 2.5px solid #00a95f;
    transform: rotate(-45deg);
}

.sd-info__list b {
    display: block;
    color: var(--sd-text);
    font-size: 15px;
}

/* ご来店案内 */
.sd-info--store .sd-info__title {
    margin: 0 0 14px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.6;
}

.sd-info--store .sd-info__title strong {
    color: var(--sd-red);
    font-size: 20px;
}

.sd-info__docs {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sd-info__docs li {
    text-align: center;
}

.sd-info__docs img {
    width: 56px;
    margin: 0 auto 6px;
}

.sd-info__docs span {
    font-size: 11px;
    font-weight: 700;
}

.sd-info__shop {
    margin: 14px 0 0;
    text-align: center;
}

.sd-info__shop a {
    color: #1f7fd4;
    font-size: 14px;
    font-weight: 700;
}

/* 注意事項 */
.sd-note {
    margin-top: 22px;
    font-size: 13px;
    color: #555;
}

.sd-note__head {
    margin: 0 0 6px;
    color: var(--sd-text);
    font-size: 15px;
    font-weight: 700;
}

.sd-note p {
    margin: 0 0 6px;
}

.sd-note__small {
    padding-left: 1em;
    text-indent: -1em;
    font-size: 12px;
}

/* ------------------------------------------------------------
   PC
   ------------------------------------------------------------ */
@media (min-width: 769px) {
    .s-shindan {
        padding: 60px 20px 72px;
    }

    .s-shindan__inner {
        max-width: 760px;
    }

    .sd-card__head-main {
        font-size: 28px;
    }

    .sd-card__body,
    .sd-result__body {
        padding: 28px 32px 34px;
    }

    .sd-choices--2 {
        gap: 14px;
    }

    .sd-choices--3 {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 14px;
    }

    .sd-info__docs {
        gap: 48px;
    }
}


/* ============================================================
   LP（index.html）組み込み時の位置調整　※単体確認用HTMLでは無影響
   - LP側の .worries は「FVに重ねる」ため margin-top:-36vw が入っている。
     間にウィジェットを挟むと重なってしまうので、その関係を解いて
     FV → 診断 → お悩み の順に並ぶようにする。
   ============================================================ */
@media (min-width: 769px) {

    /* FV下部にある約19vwの空白を詰めてウィジェットを置く */
    .s-shindan {
        margin-top: -19vw;
        position: relative;
        z-index: 2;
    }

    /* FVへの重ね指定を解除し、ウィジェットの直後に配置 */
    .worries {
        margin-top: 0;
    }

    /* 重なり前提で確保されていた上部余白を圧縮 */
    .worries>.inner {
        padding-top: 6vw;
    }
}
