/* ==========================================================================
   [ymobile_monthly_simulator] ワイモバイル月額料金シミュレーター
   v21.143.0〜: 公式の料金シミュレーションの丸写し(黒い帯･オレンジのタブ･青いトグル)をやめ、
   同じプラグインの [ym_campaign_diagnosis](ym-diag-style.css)と同じ書式にそろえる。
     帯 = サイトの紺 #0f376a / 選択肢 = グレーの細枠の角丸。選ぶと青い枠+薄い青の面+青いチェック
     月額 = Oswald の赤い数字 / 申込ボタン = オレンジの角丸、2つ目は青い枠の角丸
   影の重ね・色付きの縦棒・ピンクの塗り・!important は使わない
   (.ym-sim から書いて、テーマの .post_content p などより強くする)。
   ========================================================================== */

/* 金額の数字だけに使う Oswald(数字・カンマ・マイナスだけを抜き出して同梱。SIL Open Font License) */
@font-face {
    font-family: "YMS Oswald";
    src: url("fonts/oswald-700-num.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
    unicode-range: U+0020-002F, U+0030-0039;
}

.ym-sim {
    --yms-ink: #323232;
    --yms-sub: #6b6f78;
    --yms-navy: #0f376a; /* サイトの紺(診断と同じ) */
    --yms-line: #bfc2ca;
    --yms-soft: #e3e5ea;
    --yms-face: #f5f6f9;
    --yms-blue: #228ef3;
    --yms-blue-bg: #e2f1ff;
    --yms-red: #ff0033;
    --yms-orange: #ff6400;
    --yms-num: "YMS Oswald", "Helvetica Neue", Arial, sans-serif;
    max-width: 640px;
    margin: 0 auto 2em;
    color: var(--yms-ink);
    line-height: 1.6;
}
.ym-sim *,
.ym-sim *::before,
.ym-sim *::after { box-sizing: border-box; }
.ym-sim p { margin: 0; }
/* テーマの「.post_content p」などの余白に負けないよう、段落と一覧の余白はクラスで打ち消してから各ルールで決める */
.ym-sim .ym-sim-year, .ym-sim .ym-sim-diff, .ym-sim .ym-sim-saving, .ym-sim .ym-sim-note, .ym-sim .ym-sim-applied,
.ym-sim .ym-sim-res-term, .ym-sim .ym-sim-res-total, .ym-sim .ym-sim-res-disc, .ym-sim .ym-sim-res-sub, .ym-sim .ym-sim-head, .ym-sim .ym-sim-cphead,
.ym-sim .ym-sim-cplist, .ym-sim .ym-sim-res-list, .ym-sim .ym-sim-intro { margin: 0; }
/* 文字は記事の本文と同じ大きさ。ただし ※の注釈･期間などの <small> は小さく(ブラウザの small の大きさ) */
.ym-sim small { font-size: smaller; }
.ym-sim .ym-sim-num { font-family: var(--yms-num); font-weight: 700; letter-spacing: .02em; }


/* 余白の決まり(テーマが「最初の子要素の上の余白を0」にしても崩れないよう、区切りの上の余白は親の padding で持つ)
     帯の上 28px / 帯の下 12px / 同じ欄の中のまとまりどうし 12px / 選択肢どうし 8px */

/* 帯(契約の種類・料金プラン・割引サービス・オプション…) */
.ym-sim .ym-sim-band {
    background: var(--yms-navy);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 11px 8px;
    margin: 28px 0 12px;
    border-radius: 6px;
}
.ym-sim > .ym-sim-band:first-child { margin-top: 0; } /* 枠の一番上の帯(契約の種類)は上の余白なし */
/* fold="on": 割引･オプションの欄を折りたたむ。見出しは帯と同じ見た目で、右に開閉の印 */
.ym-sim .ym-sim-fold { margin: 28px 0 0; }
.ym-sim .ym-sim-fold-head { display: block; position: relative; padding: 11px 36px; border-radius: 6px; background: var(--yms-navy); color: #fff; font-weight: 700; text-align: center; cursor: pointer; list-style: none; }
.ym-sim .ym-sim-fold-head::-webkit-details-marker { display: none; }
.ym-sim .ym-sim-fold-head::after { content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.3em; line-height: 1; }
.ym-sim .ym-sim-fold[open] > .ym-sim-fold-head::after { content: "−"; }
.ym-sim .ym-sim-fold [data-role="options"] { padding-top: 12px; }
/* 割引･オプションの欄は JS で描くので、先頭の帯の上の余白は欄の padding で取る */
.ym-sim [data-role="options"] { padding-top: 28px; }
.ym-sim [data-role="options"] > .ym-sim-band:first-child { margin-top: 0; }
/* 小見出し(PayPayカード割・通話料金…)は塗らずに紺の文字 */
.ym-sim .ym-sim-sub {
    color: var(--yms-navy);
    font-weight: 700;
    padding: 14px 2px 6px;
}
.ym-sim .ym-sim-band + .ym-sim-sub { padding-top: 0; } /* 帯のすぐ下の小見出しは、帯の下の余白だけ */
/* まとまり(PayPayカード割･割引サービス(重複割引不可)など)ごとの薄い色の面。色は帯の色を薄めたもの(帯の色を変えると一緒に変わる) */
.ym-sim .ym-sim-sec {
    padding: 12px;
    border-radius: 8px;
    background: #f1f3f7;
    background: color-mix(in srgb, var(--yms-navy) 7%, #fff);
}
.ym-sim .ym-sim-sec + .ym-sim-sec { margin-top: 12px; }
.ym-sim .ym-sim-sec > .ym-sim-sub { padding: 0 2px 8px; }
.ym-sim .ym-sim-pad { padding: 0; }

/* 契約の種類のセレクト */
.ym-sim .ym-sim-select {
    font: inherit; /* セレクトはブラウザが小さい文字にするので、本文の大きさにそろえる */
    display: block;
    width: 100%;
    /* テーマの select の装飾(矢印の背景画像・行の高さ)とブラウザの矢印を外し、矢印は右端の背景で描く。
       テーマの行の高さのままだと矢印が文の下の行に落ちて高さが 77px になっていた */
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    height: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--yms-line);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%23444' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
    color: var(--yms-ink);
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ym-sim .ym-sim-select:focus-visible { outline: 2px solid var(--yms-blue); outline-offset: 2px; }

/* プラン・SIMの種類(グレーの細枠の角丸が横並び。選ぶと青い枠+薄い青) */
.ym-sim .ym-sim-plantabs {
    display: flex;
    gap: 8px;
    margin: 0;
}
.ym-sim .ym-sim-tab {
    flex: 1;
    position: relative;
    margin: 0;
    cursor: pointer;
}
.ym-sim .ym-sim-tab input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.ym-sim .ym-sim-tab-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 7px 4px;
    background: #fff;
    border: 1px solid var(--yms-line);
    border-radius: 8px;
    color: var(--yms-ink);
    text-align: center;
}
.ym-sim .ym-sim-tab:hover .ym-sim-tab-in { border-color: var(--yms-blue); }
.ym-sim .ym-sim-tab input:checked + .ym-sim-tab-in {
    border: 2px solid var(--yms-blue);
    padding: 6px 3px;
    background: var(--yms-blue-bg);
    color: var(--yms-blue);
}
.ym-sim .ym-sim-tab input:focus-visible + .ym-sim-tab-in { outline: 2px solid var(--yms-blue); outline-offset: 2px; }
.ym-sim .ym-sim-tab-size { display: block; font-weight: 700; white-space: nowrap; } /* 「シンプル3 M」(プラン名は公式から取得) */
.ym-sim .ym-sim-tab-gb { font-weight: 700; }
.ym-sim .ym-sim-tab-gb .ym-sim-num { font-size: 30px; line-height: 1.15; }
.ym-sim .ym-sim-tab-rec { font-weight: 700; color: var(--yms-red); }

.ym-sim .ym-sim-simtabs .ym-sim-tab-in { min-height: 62px; }
.ym-sim .ym-sim-simtabs strong { }
.ym-sim .ym-sim-simtabs small { color: var(--yms-sub); }

/* 割引・オプションの行(グレーの細枠の角丸。左に丸いチェック、右に金額) */
.ym-sim .ym-sim-list { display: grid; gap: 8px; }
.ym-sim .ym-sim-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--yms-line);
    border-radius: 8px;
    cursor: pointer;
}
.ym-sim .ym-sim-row:hover { border-color: var(--yms-blue); }
.ym-sim .ym-sim-row input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
/* 丸いチェック(診断の選択肢と同じ形) */
.ym-sim .ym-sim-switch {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    border: 1px solid var(--yms-line);
    border-radius: 50%;
    background: #fff;
}
.ym-sim .ym-sim-switch::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    width: 8px;
    height: 4px;
    border-left: 2px solid #d0d3da;
    border-bottom: 2px solid #d0d3da;
    transform: rotate(-45deg);
}
.ym-sim .ym-sim-row:has(input:checked) {
    border: 2px solid var(--yms-blue);
    padding: 11px;
    background: var(--yms-blue-bg);
}
.ym-sim .ym-sim-row input:checked + .ym-sim-switch { background: var(--yms-blue); border-color: var(--yms-blue); }
.ym-sim .ym-sim-row input:checked + .ym-sim-switch::after { border-color: #fff; }
.ym-sim .ym-sim-row:has(input:checked) .ym-sim-row-name { color: var(--yms-blue); }
.ym-sim .ym-sim-row input:focus-visible + .ym-sim-switch { outline: 2px solid var(--yms-blue); outline-offset: 2px; }
.ym-sim .ym-sim-row.is-off { cursor: not-allowed; color: #b0b3ba; background: #f6f6f8; border-color: var(--yms-soft); }
.ym-sim .ym-sim-row.is-off .ym-sim-switch { background: #f6f6f8; border-color: var(--yms-soft); }
.ym-sim .ym-sim-row.is-off .ym-sim-switch::after { border-color: transparent; }
/* 通話オプションなしの行(選ぶものではないので、枠を点線に) */
.ym-sim .ym-sim-row--base { cursor: default; border-style: dashed; }
.ym-sim .ym-sim-row--base:hover { border-color: var(--yms-line); }
.ym-sim .ym-sim-row-text { flex: 1; min-width: 0; }
.ym-sim .ym-sim-row-name { display: block; font-weight: 700; }
.ym-sim .ym-sim-row-text small { display: block; color: var(--yms-sub); line-height: 1.5; }
.ym-sim .ym-sim-row.is-off .ym-sim-row-text small { color: #b0b3ba; }
.ym-sim .ym-sim-fee {
    flex: none;
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}
.ym-sim .ym-sim-fee .ym-sim-num { font-size: 19px; }
.ym-sim .ym-sim-months { display: block; color: var(--yms-sub); font-weight: 400; }
/* 独立させた帯(ワイモバ親子割)の説明。帯の下 12px のあと、行との間は 8px */
.ym-sim .ym-sim-intro { margin: 0 0 8px; }
.ym-sim .ym-sim-intro small { display: block; color: var(--yms-sub); } /* ※の注意は次の行に小さく */
.ym-sim .ym-sim-head {
    margin: 4px 0 -2px;
    font-weight: 700;
    color: var(--yms-sub);
}

/* 結果(紺の見出し+白い面。12カ月目までと13カ月目以降を上下に) */
.ym-sim .ym-sim-res {
    margin: 0;
    border: 1px solid var(--yms-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.ym-sim .ym-sim-res-head {
    background: var(--yms-navy);
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 8px;
}
.ym-sim .ym-sim-res-body { padding: 14px 14px 16px; }
.ym-sim .ym-sim-res-term { text-align: center; font-weight: 700; color: var(--yms-sub); }
.ym-sim .ym-sim-res-total {
    text-align: center;
    color: var(--yms-red);
    font-weight: 700;
    line-height: 1.2;
}
.ym-sim .ym-sim-res-total .ym-sim-num { font-size: 42px; margin-right: 2px; }
.ym-sim .ym-sim-res-disc {
    margin: 4px 0 0;
    text-align: center;
    color: var(--yms-red);
    font-weight: 700;
}
.ym-sim .ym-sim-res-sub { margin: 14px 0 2px; font-weight: 700; color: var(--yms-navy); }
.ym-sim .ym-sim-res-list { margin: 0; padding: 0; border-top: 1px solid var(--yms-soft); }
.ym-sim .ym-sim-res-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--yms-soft); }
.ym-sim .ym-sim-res-list dt { margin: 0; font-weight: 400; }
.ym-sim .ym-sim-res-list dd { margin: 0; font-weight: 700; white-space: nowrap; }
.ym-sim .ym-sim-res-list .is-disc dd { color: var(--yms-red); }
.ym-sim .ym-sim-res-next { margin: 14px -14px 0; padding: 12px 14px 0; border-top: 1px solid var(--yms-line); background: #fff; }
.ym-sim .ym-sim-res-total--next { color: var(--yms-ink); }
.ym-sim .ym-sim-res-total--next .ym-sim-num { font-size: 32px; }

/* 今のスマホ代との比較 */
.ym-sim [data-role="result"] { padding-top: 12px; }
.ym-sim .ym-sim-compare { padding: 16px 0 0; }
.ym-sim .ym-sim-compare-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font-weight: 700; }
.ym-sim .ym-sim-input {
    font-size: max(16px, 1em);
    width: 8em;
    padding: 10px 12px;
    border: 1px solid var(--yms-line);
    border-radius: 8px;
    background: #fff;
    text-align: right;
}
.ym-sim .ym-sim-input:focus-visible { outline: 2px solid var(--yms-blue); outline-offset: 1px; }
.ym-sim .ym-sim-year,
.ym-sim .ym-sim-diff,
.ym-sim .ym-sim-saving { text-align: center; }
.ym-sim .ym-sim-year strong,
.ym-sim .ym-sim-diff strong { font-size: 18px; }
.ym-sim .ym-sim-diff { margin-top: 4px; color: var(--yms-red); font-weight: 700; }
.ym-sim .ym-sim-saving { margin-top: 6px; font-weight: 700; }

/* 対象になるキャンペーン(横線区切りの一覧) */
.ym-sim .ym-sim-cplist { margin: 0; padding: 0; list-style: none; }
.ym-sim .ym-sim-cplist li { margin: 0; padding: 9px 2px; border-bottom: 1px solid var(--yms-soft); font-weight: 700; }
.ym-sim .ym-sim-cplist li::before { content: none; }
.ym-sim .ym-sim-cphead { margin: 12px 0 4px; font-weight: 700; color: var(--yms-navy); }
.ym-sim .ym-sim-note { margin-top: 6px; font-size: smaller; color: var(--yms-sub); } /* ※の注意も small と同じ大きさ */

/* 申し込み */
.ym-sim .ym-sim-apply { text-align: center; padding-top: 12px; }
.ym-sim .ym-sim-applied { margin: 0 0 10px; font-weight: 700; }
.ym-sim .ym-sim-applied-name { display: block; font-weight: 400; color: var(--yms-sub); }
.ym-sim .ym-sim-applied .ym-sim-num { font-size: 26px; color: var(--yms-red); margin: 0 2px; }
.ym-sim .ym-sim-btn,
.ym-sim .ym-sim-btn:visited {
    display: block;
    max-width: 380px;
    margin: 0 auto 10px;
    padding: 16px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--yms-orange);
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .32);
    /* スマホ幅で折り返すとき、末尾の1文字だけが次の行に落ちないよう文節で切って行の長さをそろえる */
    word-break: auto-phrase;
    text-wrap: balance;
}
.ym-sim .ym-sim-btn:hover { opacity: .85; color: #fff; }
.ym-sim .ym-sim-btn--sub,
.ym-sim .ym-sim-btn--sub:visited {
    padding: 12px;
    background: #fff;
    color: var(--yms-blue);
    border: 1px solid var(--yms-blue);
    box-shadow: none;
}
.ym-sim .ym-sim-btn--sub:hover { opacity: 1; color: var(--yms-blue); background: var(--yms-blue-bg); }
.ym-sim .ym-sim-btn img { position: absolute; width: 1px; height: 1px; }
.ym-sim [hidden] { display: none; }

/* 対象になるキャンペーンのバナー(画像の下で改行して文。画像は幅200px=[ym_cp_list] と同じ) */
.ym-sim .ym-sim-cp-pic { display: block; margin: 0 0 6px; line-height: 0; text-align: center; } /* 画像は中央寄せ(文は左寄せのまま) */
.ym-sim .ym-sim-cp-pic img { display: block; width: 200px; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.ym-sim .ym-sim-cp-text { display: block; }
