@charset "UTF-8";

/*------------------------------------------------
breakpoint
pc --> (min-width: 1280px)
tab --> (min-width: 744px) and (max-width: 1279px)
sp --> (max-width: 743px)
-------------------------------------------------*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: #fff;
    color: #222;
    font-family: Osaka, "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS P Gothic", Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

h2 {
    font-size: 26px;
    line-height: 1.3;
}

h3 {
    font-size: 24px;
    line-height: 1.4;
}

a,
a:link,
a:visited {
    color: #222222;
}

img {
    max-width: 100%;
    height: auto;
}

@media (hover: hover) {
    a:hover {
        color: #0066cc;
        transition: color 0.2s ease;
        text-decoration: none;
    }

    a:hover img {
        opacity: 0.7;
        transition: opacity 0.2s ease;
    }
}

/*ボタン*/
.link-btn {
    font-size: 20px;
    line-height: 1;
    width: min(290px, 100%);
    color: #fff !important;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    background-color: #d70a16;
    box-shadow: 0px 3px 1px 0px #891f25;
    padding: 15px 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    text-decoration: none;
    text-align: center;
    margin: auto;
}

.link-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 10px;
    height: 16px;
    background: #fff;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

.reset-btn {
    font-size: 16px;
    line-height: 1;
    width: min(200px, 100%);
    color: #fff !important;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    background-color: #9a9a9a;
    box-shadow: 0px 3px 1px 0px #5a5a5a;
    padding: 15px 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    text-decoration: none;
    text-align: center;
    margin: auto;
    min-height: 50px;
}

@media (hover: hover) {

    .link-btn:hover,
    .reset-btn:hover {
        transform: translateY(3px);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

/*パンくず*/
#bread {
    max-width: 960px;
    font-size: 12px;
    margin: 0 auto;
}

#header {
    max-width: 960px;
    margin: 15px auto 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#header .logo img {
    display: block;
    width: 168px;
}

@media (hover: hover) {
    #header .logo:hover img {
        opacity: 1;
        transition: none;
    }
}

#header ul#subNavi {
    position: relative;
    top: auto;
    right: auto;
}

#pageTitle {
    position: relative;
    max-width: 960px;
    margin: 5px auto 0;
    background: #ffe7e7;
    display: grid;
    grid-template-columns: min(150px, 16%) 1fr min(214px, 22%);
    align-items: center;
    padding: 0 5px;
}

#pageTitle .pageTitleInner {
    text-align: center;
    padding: 15px 10px 10px;
}

#pageTitle>img:last-child {
    align-self: end;
}

#pageTitle .pageTitleInner h1 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: normal;
}

#main {
    max-width: 960px;
    margin: 0 auto;
}

#contents-wrap {
    margin-top: 30px;
}

#simulator h2,
#average h2,
#faq h2,
#related h2 {
    font-weight: bold;
    background-color: #ffe7e7;
    padding: 12px 22px 10px;
    margin-bottom: 20px;
    position: relative;
    border-left: solid 5px #d70a16;
}

#simulator h2:after,
#average h2:after,
#faq h2:after,
#related h2:after {
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    bottom: -15px;
    left: 0.8em;
    border-width: 22px 15px 0px 15px;
    border-style: solid;
    border-color: #ffe7e7 transparent transparent transparent;
}

.calculation-wrap {
    text-align: center;
    background-color: #eaf7f4;
    border-radius: 10px;
    padding: 30px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 40px;
    justify-items: center;
}

.calculation-form {
    width: 100%;
    display: grid;
    justify-items: flex-start;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 0.5rem;
}

.calculation-form label {
    grid-column: 1 / -1;
}

.calculation-form input {
    width: 100%;
}

.calculation-box {
    font-size: 26px;
    text-align: center;
    font-weight: bold;
    padding: 5px;
}

.notes {
    margin-top: 10px;
    font-size: 14px;
}

/*-------------------------
生活費シミュレーター
-------------------------*/
.lead {
    margin-bottom: 30px;
}

.simulator-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

.simulator-head {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.simulator-head h2 {
    flex: 1;
}

#simulator .simulator-head h2 {
    margin-bottom: 0;
}

.simulator-head .reset-btn {
    flex-shrink: 0;
    width: auto;
    min-height: 0;
    margin: 5px 0 0;
    padding: 12px 15px;
    font-size: 14px;
}

.simulator-input .notes {
    margin-top: 25px;
}

#simulator .calculation-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
    padding: 20px;
    text-align: left;
}

.calculation-label {
    display: block;
    font-weight: bold;
}

.calculation-desc {
    display: block;
    font-size: 13px;
    color: #555;
}

.reset-status {
    min-height: 1.6em;
    font-size: 14px;
    font-weight: bold;
    color: #d70a16;
}

.simulator-result {
    position: sticky;
    top: 20px;
}

.result-card {
    background-color: #167c7c;
    color: #fff;
    border-radius: 10px;
    padding: 25px 20px;
}

.result-main {
    text-align: center;
    font-weight: bold;
}

.result-main-value {
    display: block;
    font-size: 22px;
}

.result-main-value span {
    font-size: 44px;
    line-height: 1.2;
    margin-right: 3px;
}

.result-sub {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 5px 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: solid 1px rgba(255, 255, 255, .3);
}

.result-sub dd {
    text-align: right;
}

.result-sub dd span {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 3px;
}

.result-note {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
}

.result-card .link-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px 35px 15px 15px;
    font-size: 17px;
    line-height: 1.4;
}

.sub-btn {
    display: block;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    background-color: #fff;
    color: #222 !important;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

@media (hover: hover) {
    .sub-btn:hover {
        opacity: .8;
        transition: opacity 0.2s ease;
    }
}

.breakdown-card {
    margin-top: 20px;
    padding: 20px;
    border: solid 1px #ccc;
    border-radius: 10px;
}

.breakdown-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.breakdown-list li {
    display: grid;
    grid-template-columns: 7em 3em minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breakdown-list li+li {
    margin-top: 6px;
}

.breakdown-rate {
    text-align: right;
}

.breakdown-bar {
    display: block;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.breakdown-bar span {
    display: block;
    height: 100%;
    background-color: #d70a16;
}

.text-link {
    margin-top: 20px;
    text-align: right;
}

/*平均データ*/
#average,
#faq,
#related {
    margin-top: 80px;
}

.average-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.average-list li {
    background-color: #eaf7f4;
    border-radius: 10px;
    padding: 20px 10px;
    text-align: center;
}

.average-label {
    display: block;
    font-weight: bold;
}

.average-value {
    display: block;
    font-size: 36px;
    line-height: 1.2;
    font-weight: bold;
    color: #d70a16;
}

.average-value span {
    font-size: 18px;
    margin-left: 3px;
}

/*よくある質問*/
.faq-item {
    border: solid 1px #ccc;
    border-radius: 5px;
}

.faq-item+.faq-item {
    margin-top: 10px;
}

.faq-item summary {
    padding: 15px 20px;
    font-weight: bold;
    cursor: pointer;
}

.faq-item summary::before {
    content: "Q.";
    color: #d70a16;
    margin-right: 8px;
}

.faq-item p {
    padding: 0 20px 15px;
}

.faq-item p::before {
    content: "A.";
    color: #57cbcb;
    font-weight: bold;
    margin-right: 8px;
}

.faq-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 20px 20px;
}

.faq-links a {
    display: block;
    padding: 10px 35px 10px 15px;
    border: solid 2px #d70a16;
    border-radius: 5px;
    background-color: #d70a16;
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
    position: relative;
}

.faq-links a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 7px;
    height: 11px;
    background: #fff;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

@media (hover: hover) {
    .faq-links a:hover {
        opacity: .8;
        transition: opacity 0.2s ease;
    }
}

/*関連リンク*/
.relatedInner {
    background: #fff;
    border: 1px solid #dadcd6;
    border-radius: 16px;
    padding: 24px 28px;
    line-height: 1.8;
}

.related-list {
    margin-top: 1em;
}

.related-list li {
    position: relative;
    padding-left: 1.2em;
}

.related-list li+li {
    margin-top: 0.5em;
}

.related-list li::before {
    content: "";
    position: absolute;
    left: 0.3em;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d70a16;
}

.related-list a,
.related-list a:link,
.related-list a:visited {
    color: #d70a16;
    font-weight: bold;
}

/*tab~smallPc
******************/
@media (min-width: 744px) and (max-width: 1279px) {
    body {
        font-size: 15px;
    }

    #pageTitle {
        grid-template-columns: min(130px, 13%) 1fr min(185px, 19%);
        padding: 0;
    }

    #pageTitle .pageTitleInner h1 {
        font-size: 30px;
    }

    .notes {
        font-size: 13px;
    }

    #average,
    #faq,
    #related {
        margin-top: 60px;
    }
}

/*tab
******************/
@media (min-width:744px) and (max-width:980px) {
    #bread {
        margin: 0 15px;
    }

    #header {
        margin: 15px 15px 10px;
    }

    #main {
        margin: 0 15px;
    }

    .simulator-wrap {
        gap: 20px;
    }
}

/*sp
******************/
@media (max-width: 743px) {
    body {
        font-size: 14px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 20px;
    }

    #bread {
        font-size: 12px;
        display: flex;
        overflow-x: scroll;
        background-color: #dbdbdb;
        padding: 0;
        width: 100%;
    }

    #bread .pcarrow {
        display: none;
    }

    #bread>span {
        position: relative;
        font-size: 12px;
        vertical-align: middle;
        padding: 0 10px;
        height: 30px;
        line-height: 30px;
        white-space: nowrap;
        list-style: none;
        background-image: linear-gradient(to right, #ececec, #dbdbdb);
    }

    #bread>span:after {
        content: '';
        display: inline-block;
        position: absolute;
        margin-left: 10px;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
        border-left: 12px solid #dbdbdb;
        z-index: 1;
    }

    #bread>span:last-child:after {
        display: none;
    }

    #bread>span:nth-child(n+2) {
        padding-left: 20px;
    }

    #header {
        width: 100%;
        padding: 0 15px;
    }

    #header .logo img {
        width: 150px;
        height: auto;
    }

    #subNavi {
        display: none;
    }

    #pageTitle {
        grid-template-columns: min(160px, 18%) 1fr min(228px, 25%);
        justify-content: center;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    #pageTitle img {
        width: 100%;
        margin: 0 auto;
    }

    #pageTitle .pageTitleInner {
        padding: 15px 0 10px;
    }

    #pageTitle .pageTitleInner h1 {
        font-size: min(5.2vw, 28px);
        /* 375px基準：19.5px → 5.2vw（19.5 ÷ 375 × 100） */
        white-space: nowrap;
    }

    #contents-wrap {
        margin: 15px;
    }

    #simulator h2,
    #average h2,
    #faq h2,
    #related h2 {
        padding: 12px 15px 8px;
        margin-bottom: 20px;
    }

    .calculation-box {
        font-size: 24px;
    }

    .notes {
        font-size: 12px;
        margin-top: 8px;
    }

    .lead {
        margin-bottom: 20px;
    }

    .simulator-wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .simulator-head .reset-btn {
        padding: 10px;
        font-size: 13px;
    }

    #simulator .calculation-wrap {
        padding: 15px;
    }

    .simulator-result {
        position: static;
    }

    .result-main-value span {
        font-size: 38px;
    }

    .result-sub dd span {
        font-size: 22px;
    }

    .result-card .link-btn {
        font-size: 16px;
    }

    .breakdown-card {
        padding: 15px;
    }

    .breakdown-list li {
        grid-template-columns: 6.5em 2.5em minmax(0, 1fr);
        gap: 8px;
        font-size: 13px;
    }

    #average,
    #faq,
    #related {
        margin-top: 40px;
    }

    .average-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .average-list li {
        padding: 12px 10px;
    }

    .average-value {
        font-size: 30px;
    }

    .faq-item summary {
        padding: 12px 15px;
    }

    .faq-item p {
        padding: 0 15px 12px;
    }

    .faq-links {
        flex-direction: column;
        padding: 0 15px 15px;
    }

    .relatedInner {
        padding: 20px 16px;
    }
}
