
:root {
    --navy: #102744;
    --gold: #d6b678;
    --white: #ffffff;
    --background: #f5f7fa;
    --text: #26354a;
    --border: #dce3ed;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont,
        "Hiragino Sans", "Noto Sans JP", sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.8;
}

/* ヘッダー */

header {
    background: var(--white);
    padding: 20px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--navy);
}

.subtitle {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

/* メインビジュアル */

.hero {
    background: linear-gradient(135deg, #102744, #24476c);
    color: var(--white);
    text-align: center;
    padding: 100px 20px;
}

.tag {
    display: inline-block;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 30px;
    padding: 5px 20px;
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.5;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero p {
    color: #dce3ed;
    font-size: 17px;
    margin-bottom: 35px;
}

/* ボタン */

.main-button {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    padding: 17px 35px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.main-button:hover {
    background: #e8cd98;
    transform: translateY(-2px);
}

.main-button:focus-visible {
    outline: 3px solid #668fbd;
    outline-offset: 4px;
}

/* 特徴 */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.feature {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(16, 39, 68, 0.04);
}

.feature h3 {
    color: var(--navy);
    font-size: 18px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 14px;
    color: #64748b;
}

/* 診断フォーム */

#diagnosis {
    max-width: 760px;
    margin: 60px auto;
    padding: 40px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 39, 68, 0.08);
    scroll-margin-top: 30px;
}

#diagnosis h2 {
    color: var(--navy);
    font-size: 26px;
    text-align: center;
    margin-bottom: 10px;
}

#diagnosis > p {
    color: #64748b;
    text-align: center;
    font-size: 14px;
    margin-bottom: 30px;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    color: var(--navy);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

form select {
    width: 100%;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    margin-bottom: 25px;
    cursor: pointer;
}

form select:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

form .main-button {
    width: 100%;
    margin-top: 10px;
}

/* 診断結果 */

#result {
    margin-top: 30px;
    padding: 25px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}

#result[hidden] {
    display: none;
}

#result h3 {
    color: var(--navy);
    margin-bottom: 15px;
}

.result-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

/* フッター */

footer {
    background: var(--navy);
    color: #dce3ed;
    text-align: center;
    padding: 35px 20px;
    font-size: 13px;
}

footer p + p {
    margin-top: 8px;
}

/* スマートフォン対応 */

@media (max-width: 600px) {
    header {
        padding: 15px 20px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        padding: 65px 20px;
    }

    .hero p {
        font-size: 15px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 25px auto;
    }

    .feature {
        padding: 20px;
    }

    #diagnosis {
        margin: 30px 15px;
        padding: 25px 20px;
    }

    #diagnosis h2 {
        font-size: 21px;
    }

    .main-button {
        padding: 16px 20px;
    }
}


/* 年間還元額シミュレーション */

#simulator {
    max-width: 760px;
    margin: 60px auto;
    padding: 40px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 39, 68, 0.08);
}

#simulator h2 {
    color: var(--navy);
    font-size: 26px;
    text-align: center;
    margin-bottom: 10px;
}

#simulator > p {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
}

#annual-spending {
    width: 100%;
    padding: 18px;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 20px;
}

#annual-spending:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

#simulator-result {
    margin-top: 30px;
}

#simulator-result[hidden] {
    display: none;
}

.simulator-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 15px;
}

.simulator-rank {
    color: #94713c;
    font-size: 14px;
    font-weight: 700;
}

.simulator-name {
    color: var(--navy);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.simulator-amount {
    color: #16835d;
    font-size: 30px;
    font-weight: 800;
}

.simulator-amount.negative {
    color: #b42318;
}

.simulator-bar {
    height: 12px;
    background: #dce3ed;
    border-radius: 20px;
    overflow: hidden;
    margin: 15px 0;
}

.simulator-bar-fill {
    height: 100%;
    background: linear-gradient(
        90deg,
        #102744,
        #d6b678
    );
    border-radius: 20px;
    transition: width 0.4s ease;
}

.simulator-detail {
    color: #64748b;
    font-size: 13px;
}

#simulator .simulator-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 25px;
    margin-bottom: 0;
    text-align: left;
}

@media (max-width: 600px) {
    #simulator {
        margin: 30px 15px;
        padding: 25px 20px;
    }

    #simulator h2 {
        font-size: 21px;
    }

    .simulator-name {
        font-size: 18px;
    }

    .simulator-amount {
        font-size: 26px;
    }
}


#excluded-spending {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    color: var(--navy);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.input-note {
    font-size: 12px;
    color: #64748b;
    margin-top: -5px;
    margin-bottom: 15px;
}


#reward-excluded-spending {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    color: var(--navy);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
}

#simulator .input-note {
    margin-top: 5px;
    margin-bottom: 15px;
    line-height: 1.6;
}


/* マイル獲得シミュレーション */

#mile-simulator {
    max-width: 760px;
    margin: 60px auto;
    padding: 40px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(16, 39, 68, 0.08);
}

#mile-simulator h2 {
    color: var(--navy);
    font-size: 26px;
    text-align: center;
    margin-bottom: 10px;
}

#mile-simulator > p {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
}

#mile-annual-spending {
    width: 100%;
    padding: 18px;
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 20px;
}

#mile-annual-spending:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

#mile-simulator-result {
    margin-top: 30px;
}

#mile-simulator-result[hidden] {
    display: none;
}

.mile-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 15px;
}

.mile-program-label {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.mile-card-name {
    color: var(--navy);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.mile-amount {
    color: var(--navy);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.4;
}

.mile-unit {
    font-size: 16px;
    font-weight: 500;
}

.mile-value-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.mile-net-value {
    color: #16835d;
    font-size: 26px;
    font-weight: 800;
}

.mile-net-value.negative {
    color: #b42318;
}

.mile-detail {
    color: #64748b;
    font-size: 13px;
}

#mile-simulator .simulator-note {
    font-size: 12px;
    text-align: left;
    margin-top: 25px;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    #mile-simulator {
        margin: 30px 15px;
        padding: 25px 20px;
    }

    #mile-simulator h2 {
        font-size: 21px;
    }

    .mile-card-name {
        font-size: 18px;
    }

    .mile-amount {
        font-size: 30px;
    }
}


/* カード情報の確認状況 */

.verification-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin: 8px 0;
}

.verification-status.verified {
    background: #e8f5ee;
    color: #16835d;
}

.verification-status.pending {
    background: #fff4df;
    color: #946200;
}

.verification-date {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 12px;
}


/* クレジットカード一覧 */

#card-list {
    margin: 40px 0;
    padding: 30px;
    background: var(--white);
    border-radius: 16px;
}

.card-list-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin: 25px 0;
}

.card-list-filters label {
    font-weight: bold;
    color: var(--navy);
}

#card-search,
#card-category-filter {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-size: 16px;
    color: var(--text);
}

#card-search:focus,
#card-category-filter:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

#card-list-count {
    font-size: 14px;
    color: #64748b;
    margin: 15px 0;
}

#card-list-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card-list-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    background: var(--white);
    min-width: 0;
    transition: box-shadow 0.2s;
}

.card-list-item:hover {
    box-shadow: 0 6px 20px rgba(16, 39, 68, 0.08);
}

.card-list-category {
    font-size: 12px;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 8px;
}

.card-list-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 12px;
}

.card-list-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.card-list-detail {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.card-list-detail strong {
    color: var(--navy);
}

.card-list-item .main-button {
    display: block;
    margin-top: 20px;
    text-align: center;
}

@media (min-width: 601px) {

    .card-list-filters label[for="card-search"] {
        grid-column: 1;
        grid-row: 1;
    }

    .card-list-filters label[for="card-category-filter"] {
        grid-column: 2;
        grid-row: 1;
    }

    #card-search {
        grid-column: 1;
        grid-row: 2;
    }

    #card-category-filter {
        grid-column: 2;
        grid-row: 2;
    }

}

@media (max-width: 600px) {

    #card-list {
        padding: 20px;
    }

    .card-list-filters {
        grid-template-columns: 1fr;
    }

    #card-list-results {
        grid-template-columns: 1fr;
    }

    .card-list-item {
        padding: 18px;
    }

}


#card-sort {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-size: 16px;
    color: var(--text);
}

@media (min-width: 601px) {

    .card-list-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .card-list-filters label[for="card-sort"] {
        grid-column: 3;
        grid-row: 1;
    }

    #card-sort {
        grid-column: 3;
        grid-row: 2;
    }

}


/* カード詳細の展開表示 */

.card-details {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.card-details summary {
    padding: 12px 14px;
    background: var(--background);
    color: var(--navy);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.card-details summary:hover {
    background: #eaf0f7;
}

.card-details-content {
    padding: 14px;
}

.card-detail-notes {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text);
}

.card-detail-notes h4 {
    margin: 0 0 10px;
    color: var(--navy);
}

.card-detail-notes ul {
    padding-left: 20px;
    margin: 0 0 16px;
}

.card-detail-notes li {
    margin-bottom: 6px;
}


/* クレジットカード比較 */

#card-comparison {
    margin: 40px 0;
    padding: 30px;
    background: var(--white);
    border-radius: 16px;
}

.comparison-selectors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 25px 0;
}

.comparison-select-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.comparison-select-item label {
    font-size: 14px;
    font-weight: bold;
    color: var(--navy);
}

.comparison-select-item select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 16px;
}

#compare-button {
    width: 100%;
    margin-bottom: 20px;
}

#comparison-result[hidden] {
    display: none;
}

.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.comparison-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    border: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.comparison-table thead th {
    background: var(--navy);
    color: var(--white);
}

.comparison-table tbody th {
    background: var(--background);
    color: var(--navy);
    text-align: left;
    min-width: 120px;
}

.comparison-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.comparison-best {
    color: #16835d;
    font-weight: bold;
}

.comparison-table .main-button {
    display: block;
    font-size: 12px;
    padding: 10px;
}

@media (max-width: 600px) {

    #card-comparison {
        padding: 20px;
    }

    .comparison-selectors {
        grid-template-columns: 1fr;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px;
    }

    .comparison-table tbody th {
        position: sticky;
        left: 0;
        z-index: 1;
    }

}

#mile-reduced-spending, #mile-excluded-spending { width:100%; padding:14px; font-size:18px; color:var(--navy); background:var(--background); border:1px solid var(--border); border-radius:8px; margin-bottom:10px; }

#hotel-simulator{max-width:760px;margin:60px auto;padding:40px;background:var(--white);border-radius:16px;box-shadow:0 8px 30px rgba(16,39,68,.08)}
#hotel-simulator h2{color:var(--navy);text-align:center;margin-bottom:12px} #hotel-simulator form{margin-top:20px} #hotel-simulator input{width:100%;padding:14px;border:1px solid var(--border);border-radius:8px;background:var(--background);font-size:18px;margin-bottom:15px} #hotel-result:not(:empty){padding:20px;margin-top:20px;background:var(--background);border-radius:12px} #hotel-result p:last-child{font-weight:bold;color:var(--navy)} #hotel-simulator .simulator-note{font-size:12px;margin-top:20px;color:#64748b} @media(max-width:600px){#hotel-simulator{margin:30px 15px;padding:25px 20px}}

#hotel-auto{max-width:760px;margin:60px auto;padding:40px;background:var(--white);border-radius:16px} #hotel-auto h2{color:var(--navy);text-align:center} #hotel-auto input{width:100%;padding:14px;border:1px solid var(--border);border-radius:8px;background:var(--background);font-size:18px;margin-bottom:15px} #hotel-auto-result{margin-top:20px} #hotel-auto .simulator-note{font-size:12px;color:#64748b} @media(max-width:600px){#hotel-auto{margin:30px 15px;padding:25px 20px}}

#point-reduced {width:100%;padding:14px;border:1px solid var(--border);border-radius:8px;font-size:18px;margin-bottom:12px;}

#point-investment {width:100%;padding:14px;border:1px solid var(--border);border-radius:8px;font-size:18px;margin-bottom:12px;}

#diagnosis input[type="number"] {width:100%; padding:15px; font-size:16px; border:1px solid var(--border); border-radius:8px; background:var(--background); margin-bottom:25px;}

/* STEP27: mobile-first navigation and result presentation */
.skip-link{position:absolute;left:12px;top:-100px;background:var(--white);padding:12px;z-index:20}.skip-link:focus{top:8px}
.site-nav{position:sticky;top:0;z-index:10;display:flex;gap:6px;justify-content:center;overflow-x:auto;background:var(--white);border-bottom:1px solid var(--border);padding:8px 12px;scrollbar-width:thin}
.site-nav a{flex:0 0 auto;display:flex;align-items:center;min-height:44px;padding:8px 14px;border-radius:8px;color:var(--navy);font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap}.site-nav a:hover,.site-nav a:focus-visible{background:var(--background);outline:2px solid var(--gold);outline-offset:-2px}
main section[id], main [id$="result"],#card-list-results{scroll-margin-top:82px}
main section[id]{overflow-wrap:anywhere;min-width:0} form input,form select{min-width:0;max-width:100%;min-height:44px;font-size:16px} form input:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.diagnosis-rank{font-size:13px;color:#795b28;letter-spacing:.04em}.result-card h3{line-height:1.5;margin-top:6px}.diagnosis-value{background:var(--background);border-radius:10px;padding:14px;margin:12px 0}.diagnosis-value span{display:block;font-size:13px;color:var(--text)}.diagnosis-value strong{font-size:clamp(22px,5vw,32px);color:var(--navy);font-variant-numeric:tabular-nums}.result-card .main-button{display:block;text-align:center;width:100%}.footer-top{color:var(--white)}
@media(max-width:760px){.site-nav{justify-content:flex-start}.hero{padding:48px 18px}.hero h1{font-size:clamp(25px,7vw,38px)}main section[id]{margin:24px 12px;padding:22px 16px}#result{padding:12px}.result-card,.simulator-card{padding:15px}.main-button{max-width:100%;white-space:normal;overflow-wrap:anywhere}.simulator-amount{font-size:clamp(22px,7vw,30px)}.features{gap:10px}.feature{padding:15px}.feature h3{margin-bottom:3px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition:none!important;animation:none!important}.main-button:hover{transform:none}}

.seo-guide{max-width:760px;margin:40px auto;padding:32px;background:white;border:1px solid var(--border);border-radius:16px;overflow-wrap:anywhere}.seo-guide h2,.seo-guide h3{color:var(--navy)}.seo-guide h3{margin-top:20px;font-size:17px}.seo-guide p{margin-top:8px}.seo-guide a{color:#24476c;text-decoration:underline}@media(max-width:600px){.seo-guide{margin:30px 15px;padding:20px}}

/* STEP29 */
.site-policy{max-width:760px;margin:60px auto;padding:32px;background:#fff;border:1px solid var(--border);border-radius:16px}.site-policy h2,.site-policy h3{color:var(--navy)}.site-policy article{margin:24px 0;scroll-margin-top:90px}.site-policy article p{margin:8px 0;font-size:14px}.policy-links{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-bottom:20px}.policy-links a{color:#fff;text-decoration:underline;padding:8px}.site-policy .input-note{margin-top:20px}@media(max-width:600px){.site-policy{margin:30px 15px;padding:22px}.site-policy h2{font-size:21px}}

.affiliate-panel { border: 1px solid var(--border); padding: 20px; text-align: center; }
.affiliate-label { font-size: 13px; font-weight: 700; color: var(--text); }
.affiliate-banner { max-width: 100%; overflow-x: auto; text-align: center; }
.affiliate-banner > div { display: inline-block; }
@media (max-width: 480px) { .affiliate-panel { padding: 8px; } }
