/* CSS Variables - Color Palette */
:root {
    /* Primary Colors */
    --primary-blue: #4a90e2;
    --primary-blue-light: #e3f2fd;
    --primary-blue-dark: #2e5bba;

    /* Secondary Colors */
    --secondary-green: #66bb6a;
    --secondary-green-light: #e8f5e8;

    /* Neutral Colors */
    --gray-50: #fcfcfc;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Accent Colors */
    --accent-pink: #f57c00;
    /* orange */
    --accent-pink-light: #fff3e0;
    /* light orange */
    --accent-yellow: #ffc107;
    --accent-yellow-light: #fff8e1;
    --accent-green: #4caf50;
    --accent-green-light: #e8f5e8;

    /* Additional Colors */
    --pink: #f57c00;
    /* replace pink with orange tone */
    --yellow: #ffeb3b;
    --light-green: #81c784;

    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-section: var(--gray-100);

    /* Text Colors */
    --text-primary: var(--gray-700);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);

    /* Border Colors */
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);
    --border-dark: var(--gray-400);
}

/* 1. box-sizing: border-box; の適用（テーブル計算の安定化） */
.table-container,
.table-container *,
.comparison-table,
.comparison-table * {
    box-sizing: border-box;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f5f7;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 730px;
    margin: 0 auto;
    background-color: #fff;
}

/* section */
section {
    padding: 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
    background-image: url("img/h2-bg.jpg");
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

h2.no-style {
    background-image: none;
    color: #000;
    padding: 0;
    border-radius: 0;
    text-align: left;
}

h3 {
    font-size: 1.5rem;
    align-items: center;
    gap: 10px;
    color: var(--primary-blue);
    border-left: 8px solid var(--primary-blue);
    background-color: #fcffaf;
    padding: 10px;
    padding-left: 10px;
    margin-top: 40px;
}

/* プレーン見出し（装飾解除） */
h3.attention {
    font-size: 1.6rem;
    border: none;
    border-radius: 5px;
    padding: 10px 14px;
    background-color: #000;
    color: var(--yellow);
    display: flex;
    align-items: center;
    list-style: 1.3;
}

h3.attention p {
    margin: 0;
}

h3.attention p.top {
    border-bottom: 1px solid var(--yellow);
    margin-bottom: 10px;
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.truth-icon {
    width: 80px;
    height: 80px;
    vertical-align: middle;
    margin-right: 10px;
    flex-shrink: 0;
}

/* アイコンとテキストを横並び調整 */
h3.plain img.truth-icon+span {
    vertical-align: middle;
}

@media (max-width: 599px) {
    h3.attention {
        font-size: 1.1rem;
        padding: 6px 6px;
        gap: 2px;
    }

    .truth-icon {
        width: 60px;
        height: 60px;
        margin-right: 8px;
    }
}

h4 {
    font-size: 1.2rem;
    font-weight: bold;
}

p {
    margin-bottom: 1em;
}

.bold {
    font-weight: bold;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul,
ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

/* Custom Ordered List */
ol {
    list-style: none;
    counter-reset: ol-counter;
    border: 5px solid #e0e0e0;
    padding-left: 0;
    padding: 15px;
    border-radius: 5px;
}

ol li {
    counter-increment: ol-counter;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 10px;
}

ol li:last-child {
    margin-bottom: 0px;
}

ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background-color: var(--secondary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.h3 {
    padding: 10px 0;
}

/* FVテキスト */
.fv-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Custom Check List */
.list-check {
    list-style: none;
    padding: 15px 15px 15px 15px;
    border-radius: 5px;
    font-weight: bold;
}

.manga-09 {
    text-align: center;
}

.manga-09 .list-check {
    margin: 0 auto;
    display: inline-block;
    text-align: left;
}

.list-check-container {
    text-align: center;
    border: 5px solid #e0e0e0;
    border-radius: 5px;
    margin: 20px 0;
}

.list-check li {
    padding-left: 24px;
    margin-bottom: 8px;
    position: relative;
    font-size: 1.2rem;
}

.list-check li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 16px;
    height: 16px;
    background-image: url('img/check.svg');
    background-repeat: no-repeat;
    background-size: 16px 16px;
    filter: brightness(0) saturate(100%) invert(15%) sepia(100%) saturate(7500%) hue-rotate(0deg) brightness(95%) contrast(120%);
}

/* ×マーク（list-check内のみ対象） */
.list-check li.x-mark::before {
    background-image: url('img/x.svg');
    filter: none;
}

/* Table of Contents */
.toc-container {
    margin: 40px 0;
    padding: 20px;
    background-color: #fafafa;
    border: 1px solid #c0c0c0;
    border-radius: 10px;
}

.toc-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin: 0 0 10px;
    padding: 0;
    border: none;
    background: none;
}

.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-list>li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}

.toc-list>li::before {
    content: '▼';
    position: absolute;
    left: 0;
    color: #000;
    font-size: 1rem;
}

.toc-list>li>a {
    font-weight: bold;
    color: #4a90e2;
    font-size: 1.1rem;
    text-decoration: none;
}

.toc-list>li>a:hover {
    text-decoration: underline;
}

.toc-list>li>ul {
    list-style: none;
    padding-left: 20px;
    margin-top: 8px;
    margin-bottom: 0;
}

.toc-list>li>ul>li {
    margin-bottom: 6px;
    position: relative;
    padding-left: 20px;
    color: #6c757d;
    font-size: 0.95rem;
}

.toc-list>li>ul>li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: #adb5bd;
    font-size: 0.8rem;
}

.toc-list>li>ul>li>a {
    color: #6c757d;
    text-decoration: none;
}

.toc-list>li>ul>li>a:hover {
    text-decoration: underline;
    color: #4a90e2;
}

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

/* Scrollable Table Container */
.scrollable-table {
    width: 100%;
    border-collapse: collapse;
}

.scrollable-table th,
.scrollable-table td {
    white-space: nowrap;
    word-wrap: normal;
    min-width: 60px;
    padding: 12px 4px;
    border: 1px solid #ddd;
    text-align: left;
}

/* テーブルヘッダーのスタイル */
table th {
    background-color: var(--primary-blue);
    color: #fff;
    font-weight: bold;
}

/* ===== Checkpoint Summary (clone of .checkpoint-container) ===== */
.checkpoint-summary {
    background-color: #ffe78f;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0 40px;
    position: relative;
}

.checkpoint-summary ol {
    list-style: none;
    margin: 0;
    padding: 24px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.checkpoint-summary ol li {
    position: relative;
    padding-left: 34px;
    padding-top: 14px;
    padding-bottom: 14px;
    margin: 0;
    border-bottom: 1px solid #e6eee7;
}

.checkpoint-summary ol li:last-child {
    border-bottom: none;
}

.checkpoint-summary ol li::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

.summary-title {
    border: none;
}

.summary-title img {
    width: 250px;
}

.scrollable-table th {
    background-color: var(--primary-blue);
    color: #fff;
    font-weight: bold;
}

/* CTA Button */
.cta-button {
    text-align: center;
}

.cta-button a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e91e63 0%, #d81b60 50%, #c2185b 100%);
    color: #fff !important;
    padding: 18px 40px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.0rem;
    box-shadow:
        0 4px 8px rgba(33, 36, 141, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-origin: center;
    animation: ctaScalePulse 2s infinite ease-in-out;
    margin: 20px 0;
    width: 80%;
}

table .cta-button a {
    width: auto;
}

.cta-button a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button a:hover {
    background: linear-gradient(135deg, #f06292 0%, #ec407a 50%, #e91e63 100%);
    box-shadow:
        0 6px 12px rgba(76, 175, 80, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.cta-button a:hover::before {
    left: 100%;
}

.cta-button a::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("img/arrow-wht.svg");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.cta-button a:hover::after {
    transform: translateX(3px);
}

/* CTAの拡大縮小アニメーション */
@keyframes ctaScalePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-button a {
        animation: none;
    }
}

.cta-button a:active {
    box-shadow:
        0 2px 4px rgba(76, 175, 80, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@media (max-width: 599px) {
    .cta-button a {
        font-size: .8rem;
        padding: 12px 24px;
        animation: ctaScalePulse 2s infinite ease-in-out;
    }
}

/* テーブルを囲むコンテナでスクロール制御 */
.table-container {
    overflow-x: auto;
    width: 100%;
    margin: 10px 0;
}

/* スクロールバーのスタイリング（Webkit系ブラウザ） */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Buttons */
button,
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* Forms */
input,
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Keyframes for marker slide-in animation */
@keyframes markerSlideIn {
    0% {
        background-size: 0% 50%;
        background-position: left bottom;
    }

    100% {
        background-size: 100% 50%;
        background-position: left bottom;
    }
}

/* Highlight Markers */
.highlight-red {
    background: linear-gradient(to bottom, transparent 50%, #ffb3ba 50%);
    background-size: 0% 50%;
    background-position: left bottom;
    background-repeat: no-repeat;
    color: inherit;
    font-weight: bold;
    border-radius: 3px;
    position: relative;
    transition: all 0.1s ease;
}

.highlight-red.animate {
    animation: markerSlideIn 0.8s ease-out forwards;
}

.highlight-yellow {
    background: linear-gradient(to bottom, transparent 50%, #fff176 50%);
    background-size: 0% 50%;
    background-position: left bottom;
    background-repeat: no-repeat;
    color: inherit;
    font-weight: bold;
    border-radius: 3px;
    position: relative;
    transition: all 0.1s ease;
}

.highlight-yellow.animate {
    animation: markerSlideIn 0.8s ease-out forwards;
}



/* Font Size Utility Classes */
.fs-11 {
    font-size: 1.2rem;
}

.fs-12 {
    font-size: 1.2rem;
}

.fs-13 {
    font-size: 1.3rem;
}

.fs-14 {
    font-size: 1.4rem;
}

.fs-15 {
    font-size: 1.5rem;
}

.fs-16 {
    font-size: 1.6rem;
}

.fs-18 {
    font-size: 1.8rem;
}

.fs-20 {
    font-size: 2.0rem;
}

/* SP Only - 599px以上で非表示 */
@media (min-width: 599px) {
    .sp-only {
        display: none !important;
    }
}

/* SP-none 600以上で表示 */
@media (min-width: 600px) {
    .sp-none {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 768px) {

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* 数字とh3の組み合わせ */
.number {
    background-color: var(--pink);
    color: #fff;
    padding: 8px 12px;
    width: 6rem;
    min-height: 3em;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

/* 見出しの数字 */
.number-only {
    background-color: var(--pink);
    color: #fff;
    padding: 8px 12px;
    text-align: center;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    font-size: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

@media (max-width: 599px) {

    table th,
    table td {
        font-size: 12px;
    }

    table td:first-child {
        font-size: 11px;
    }
}

table th {
    background-color: var(--primary-blue);
    color: #fff;
    font-weight: bold;
}

.checkpoint-container {
    background-color: #e9fae9;
    padding: 20px;
    border-radius: 10px;
    margin: 60px 0;
    position: relative;
}

.checkpoint-container ul {
    text-align: left;
    list-style: none;
    padding-left: 0;
    background-color: #fff;
    border-radius: 10px;
    margin-bottom: 0;
    padding: 24px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.checkpoint-container li {
    position: relative;
    padding-left: 34px;
    padding-top: 14px;
    padding-bottom: 14px;
    margin: 0;
    border-bottom: 1px solid #e6eee7;
}

.checkpoint-container li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.checkpoint-container li::before {
    content: '';
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-image: url('img/check-02.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

/* ×マーク（checkpoint-container内のみ対象） */
.checkpoint-container li.x-mark::before {
    background-image: url('img/x.svg');
}

h4.checkpoint {
    margin: 0 0 20px;
}

h4.checkpoint img {
    width: 250px;
}

h4.support-title {
    position: absolute;
    top: -10px;
    left: 32px;
    background-color: #fff;
    padding: 10px 20px 10px 54px;
    border-radius: 10px;
    border: 1px solid var(--accent-green);
}

h4.support-title::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url('img/check-01.svg');
    background-repeat: no-repeat;
    background-size: 24px 24px;
}

table tbody tr:nth-child(even) {
    background: #f6f6f6;
}

.point-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 1.6rem;
    border: none;
    background: none;
    color: #000;
    background: linear-gradient(to right, transparent 96px, var(--primary-blue) 96px);
    background-size: 100% 2px;
    background-position: left bottom 10px;
    background-repeat: no-repeat;
    padding-bottom: 0;
}

.point-title-matome {
    color: #fff;
    display: block;
    padding: 10px;
    text-align: center;
    position: relative;
    width: fit-content;
    border: 2px solid #3f96a5;
    background-color: #3f96a5;
    margin: 20px auto 40px;
    border-radius: 10px;
}

.point-title-matome::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #3f96a5;
}


h4.point-title-matome {
    margin: 60px auto 20px;
    border-radius: 10px;
    padding: 10px 20px;
}

h4.point-title-matome::after {
    border-top: 20px solid var(--yellow);
}

.point-title::before {
    content: '';
    display: inline-block;
    width: 72px;
    height: 72px;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 4px;
    flex-shrink: 0;
}

.point-title-01::before {
    background-image: url("img/point-01.svg");
}

.point-title-02::before {
    background-image: url("img/point-02.svg");
}

.point-title-03::before {
    background-image: url("img/point-03.svg");
}

@media screen and (max-width: 599px) {

    .point-title-01::before,
    .point-title-02::before,
    .point-title-03::before {
        width: 48px;
        height: 48px;
    }

    .point-title {
        font-size: 1.2rem;
        background: linear-gradient(to right, transparent 67px, var(--primary-blue) 67px);
        background-size: 100% 2px;
        background-position: left bottom 10px;
        background-repeat: no-repeat;
    }
}

.comparison-table {
    table-layout: fixed;
    width: 100%;
    /* テーブル全体のボーダーを維持 */
    border: 1px solid #ddd;
    border-collapse: separate;
    /* ボーダーを個別に扱い、固定セルのズレを防ぐ */
    border-spacing: 0;
    /* セル間の隙間をなくす */
}

.comparison-table th {
    background-color: var(--primary-blue);
    color: #fff;
}

.comparison-table th,
.comparison-table td {
    text-align: center;
    /* セルがstickyになったときのボーダーを調整するため、ここで一度リセット/定義 */
    border: 1px solid #ddd;
}

/* 1列目の調整 */
.comparison-table td:first-child,
.comparison-table th:first-child {
    width: 120px;
    /* 左端のボーダーを維持 */
    border-left: 1px solid #ddd;
}

/* 2〜4列目の幅を揃える */
.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3),
.comparison-table td:nth-child(4),
.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3),
.comparison-table th:nth-child(4) {
    width: 300px;
}

@media (max-width: 599px) {

    .comparison-table td:first-child,
    .comparison-table th:first-child {
        width: 60px;
    }

    .comparison-table td:nth-child(2),
    .comparison-table td:nth-child(3),
    .comparison-table td:nth-child(4),
    .comparison-table th:nth-child(2),
    .comparison-table th:nth-child(3),
    .comparison-table th:nth-child(4) {
        width: 151px;
    }
}

.comparison-table td ul {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding-left: 1rem;
    width: fit-content;
}

.comparison-table td li {
    text-align: left;
}

.comparison-table th:first-child {
    background-color: var(--primary-blue) !important;
    color: #fff;
}


/* --- 【再修正】 comparison-tableの1列目・2列目固定用CSS --- */

/* 1列目を左端に固定 */
.comparison-table th:first-child,
.comparison-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;

    /* スクロールするセルとの重なりによるボーダーズレを防ぐため、右側のボーダーを解除 */
    border-right: none;

    /* 境界線が途切れた印象を box-shadow でカバー */
    box-shadow: 2px 0 2px -2px rgba(0, 0, 0, 0.1);

    /* 背景色を確実に設定 */
    background-color: #e4f0fc;
}

.comparison-table th:first-child {
    background-color: var(--primary-blue) !important;
}

/* 2列目を1列目の右側に固定 */
.comparison-table th:nth-child(2),
.comparison-table td:nth-child(2) {
    position: sticky;
    /* 1列目の幅 (120px) の右側で固定 */
    left: 120px;
    z-index: 9;

    /* スクロールするセルとの重なりによるボーダーズレを防ぐため、右側のボーダーを解除 */
    border-right: none;

    /* 境界線が途切れた印象を box-shadow でカバー */
    box-shadow: 2px 0 2px -2px rgba(0, 0, 0, 0.1);

    /* 背景色を確実に設定 (奇数行のデフォルト色) */
    background-color: #fff;
}

/* 【重要】1列目の偶数行・奇数行の背景色を固定後に再適用 */
.comparison-table tbody tr:nth-child(odd) td:first-child {
    background-color: #e4f0fc;
}

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

/* 【重要】2列目の偶数行・奇数行の背景色を固定後に再適用 */
.comparison-table tbody tr:nth-child(odd) td:nth-child(2) {
    background-color: #fff;
}

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

.comparison-table th:nth-child(2) {
    background-color: var(--primary-blue) !important;
}

/* 3列目（スクロール開始点）のボーダーを、固定解除したボーダーとして扱う */
.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
    border-left: 1px solid #ddd;
    /* 通常のボーダーを維持 */
}


/* --- (PCサイズでの幅を再適用) --- */
.comparison-table td:first-child,
.comparison-table th:first-child {
    width: 120px;
}

.comparison-table td:nth-child(2),
.comparison-table th:nth-child(2) {
    width: 300px;
}

/* --- スマートフォン対応（メディアクエリ内の修正） --- */
@media (max-width: 599px) {
    /* SPサイズでの固定位置の再調整 */

    /* 1列目を左端に固定 (SPサイズ) */
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        left: 0;
        /* ボーダー解除とシャドウはPC設定から継承 */
    }

    /* 2列目を1列目の右側に固定 (SPサイズ) */
    .comparison-table th:nth-child(2),
    .comparison-table td:nth-child(2) {
        /* SPサイズでの1列目の幅 (60px) の右側で固定 */
        left: 60px;
        /* ボーダー解除とシャドウはPC設定から継承 */
    }

    /* SPサイズでの幅を再適用 */
    .comparison-table td:first-child,
    .comparison-table th:first-child {
        width: 62px;
    }

    /* 2列目の幅も必要であれば再設定 */
    .comparison-table td:nth-child(2),
    .comparison-table th:nth-child(2) {
        width: 151px;
    }
}

/* --- 【再修正ここまで】 --- */


table th:first-child {
    background-color: inherit;
    color: inherit;
}

table td:first-child {
    font-weight: bold;
    background-color: #e4f0fc;
    /* 薄いオレンジ */
}

table tbody tr:nth-child(even) td:first-child {
    background-color: #d0e3f6;
    /* 薄いオレンジ（やや濃い） */
}

.comparison-table td {
    vertical-align: top;
}

.comparison-table td:first-child {
    vertical-align: middle;
}

.comparison-table td img {
    width: 250px;
    height: auto;
}

.comparison-table .cta-button,
.comparison-table .cta-button a {
    margin: 0;
}

.urara-recommendation .comparison-table td:first-child,
.urara-recommendation .comparison-table td {
    background-color: #fff;
    vertical-align: top;
    font-weight: normal;
}

/* urara-recommendationセクション内の比較表に対する固定解除/調整 */
.urara-recommendation .comparison-table {
    margin-top: 20px;
    table-layout: auto;
    /* 固定解除のため、ボーダーの設定を元に戻す */
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid #ddd;
}

/* urara-recommendation内の固定解除を明確化 */
.urara-recommendation .comparison-table th:first-child,
.urara-recommendation .comparison-table td:first-child,
.urara-recommendation .comparison-table th:nth-child(2),
.urara-recommendation .comparison-table td:nth-child(2) {
    position: static;
    /* stickyを解除 */
    left: auto;
    z-index: auto;
    background-color: #fff !important;
    /* 背景色をリセット */
    box-shadow: none;
    /* シャドウを解除 */
    border-right: 1px solid #ddd;
    /* ボーダーを元に戻す */
}

.urara-recommendation .comparison-table th:first-child {
    background-color: var(--primary-blue) !important;
    /* ヘッダーの背景色を再設定 */
}

/* 幅の設定を無効化 */
.urara-recommendation .comparison-table td:first-child,
.urara-recommendation .comparison-table th:first-child,
.urara-recommendation .comparison-table td:nth-child(2),
.urara-recommendation .comparison-table td:nth-child(3),
.urara-recommendation .comparison-table td:nth-child(4),
.urara-recommendation .comparison-table th:nth-child(2),
.urara-recommendation .comparison-table th:nth-child(3),
.urara-recommendation .comparison-table th:nth-child(4) {
    width: auto;
}

/* テーブル内のCTAボタンはアニメーション無効 */
table .cta-button a {
    animation: none !important;
}

@media (max-width: 599px) {
    .comparison-table td img {
        width: 200px;
    }

    .comparison-table td img.garden-logo {
        width: 150px;
    }
}

.fa-star {
    color: #ffc107;
}

.urara-mv {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.evaluation {
    text-align: center;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.plus {
    display: block;
    margin: -30px auto;
    width: 80px;
    height: 80px;
}

h3.reason-title {
    width: fit-content;
    margin: 20px auto;
    text-align: center;
    border: none;
}

.tab-slideshow {
    margin: 30px 0;
    text-align: center;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.tab-btn {
    background: var(--gray-600);
    color: #fff;
    border: none;
    padding: 12px 48px;
    border-radius: 4px 4px 0 0;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
    opacity: 0.7;
}

.tab-btn.active {
    background: var(--pink);
    color: #fff;
    opacity: 1;
}

.tab-images {
    position: relative;
    min-height: 220px;
}

.tab-image {
    display: none;
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    transition: opacity 0.3s;
    opacity: 0;
    z-index: 1;
}

.tab-image.active {
    display: block;
    opacity: 1;
    position: relative;
    z-index: 2;
}

@media (max-width: 599px) {
    .tab-btn {
        font-size: 0.95rem;
        padding: 12px 24px;
    }

    .tab-images {
        min-height: 120px;
    }
}

.footnote {
    font-size: 0.8rem;
}

.fn {
    font-size: 0.8em;
    vertical-align: baseline;
    /* 上付きにしない */
    margin-left: 0.15em;
}

.center {
    text-align: center;
}

/* 左揃えのまま中央に配置 */
.center-left {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    text-align: left;
}

/* 絵文字を::beforeで付けるアイコン付きリスト */
.icon-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1em 0;
}

.icon-list li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.3em;
}

.icon-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1.2;
}

.icon-list li.icon-money::before {
    content: "💰";
}

.icon-list li.icon-diamond::before {
    content: "💎";
}

.icon-list li.icon-gift::before {
    content: "🎁";
}

/* トロフィー付きリスト（::beforeで付与） */
.icon-list li.icon-trophy::before {
    content: "🏆";
}

/* 無料カウンセリング機能リスト用アイコン */
.icon-list li.icon-dna::before {
    content: "🧬";
}

.icon-list li.icon-clipboard::before {
    content: "📋";
}

.icon-list li.icon-question::before {
    content: "❓";
}

.comparison-table td img.circle-x-icon {
    width: 20px;
    height: 20px;
}

.campaign-table th,
.campaign-table td {
    vertical-align: middle;
}

.num-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 8px;
}

/* 画像の右から行頭を揃えるための行ラッパー */
.num-text-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.num-text-column {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.num-text-column .num-text {
    font-size: 1.2rem;
    color: var(--pink);
}

.num-icon {
    flex: 0 0 32px;
}

.num-text {
    font-size: 1.4rem;
    position: static;
}

.campaign-image {
    width: 100%;
    height: auto;
    margin: 20px auto;
    max-width: 500px;
}

.campaign-container {
    text-align: center;
}

h4.point-title-matome {
    border: 2px solid var(--yellow);
}

/* 口コミ画像スライドショー（Swiper） */
.review-slideshow {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.review-swiper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.review-swiper .swiper-wrapper {
    display: flex;
}

.review-swiper .swiper-slide {
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.review-slide {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid #2173a1;
    width: 100%;
    box-sizing: border-box;
}

.review-header {
    background-color: #2173a1;
    color: #fff;
    padding: 12px 16px;
    margin: 0;
}

.review-header .sex {
    margin: 0;
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

.review-body {
    background-color: #e0f2f7;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.review-body img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.review-body .text-left {
    margin: 0;
    flex: 1;
    text-align: left;
    line-height: 1.6;
    color: #000;
}

.review-swiper .swiper-slide {
    text-align: center;
}

.review-swiper .swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.review-swiper .swiper-pagination-bullet {
    background: var(--gray-400);
    opacity: 0.5;
}

.review-swiper .swiper-pagination-bullet-active {
    background: var(--pink);
    opacity: 1;
}

@media (max-width: 599px) {
    .review-swiper {
        max-width: 100%;
    }

    .review-body {
        padding: 16px;
        gap: 12px;
    }

    .review-body img {
        width: 60px;
        height: 60px;
    }

    .review-header {
        padding: 10px 14px;
    }

    .review-header .sex {
        font-size: 0.9rem;
    }
}

.conclusion {
    padding: 8px 16px;
    background-color: var(--pink);
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 6px;
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* FAQ 質問 吹き出し */
.question {
    position: relative;
    display: inline-block;
    max-width: 100%;
    background: var(--primary-blue-dark);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    border: none;
}

.answer {
    font-weight: bold;
    background-color: var(--primary-blue-dark);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--yellow);
}

.point-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
}

.point {
    background-color: var(--accent-yellow);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0px;
    min-width: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    width: auto;
    align-self: flex-start;
    font-size: .9rem;
}

.point-container p {
    margin: 0;
}

.point-container p:not(.point) {
    flex: 1 1 auto;
}

.anxiety-relief {
    background-color: var(--accent-yellow);
    padding: 10px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin-top: 20px;
}

/* 2行目以降をインデント（ハンギングインデント）*/
.hanging-indent {
    padding-left: 1.5em;
    text-indent: -1.5em;
}

/* サービス一覧（枠付き）を100%にしつつはみ出し防止 */
.ul-services,
.ul-cost {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

/* 「さらに」用 吹き出しスタイル */
.extra-point {
    display: block;
    width: fit-content;
    margin: 20px auto 12px;
    padding: 8px 16px;
    background-color: var(--accent-yellow);
    color: #000;
    border-radius: 8px;
    position: relative;
}

.extra-point::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid var(--accent-yellow);
}

.ul-trophy {
    border: 5px solid var(--accent-yellow);
    border-radius: 5px;
    padding: 15px;
    margin: 0 auto;
}

.ul-services,
.ul-cost {
    display: block;
    border: 5px solid var(--gray-300);
    border-radius: 5px;
    padding: 15px;
}

.campaign-title {
    text-align: center;
    font-size: 1.6rem;
    color: var(--pink);
}

.campaign-image {
    margin: 0;
}

.campaign-container {
    text-align: center;
}

.campaign-notice {
    text-align: center;
}

@media (max-width: 599px) {
    .campaign-notice {
        text-align: left;
    }
}

/* 検索UI */
.search-ui {
    margin: 0px 0 10px;
}

.search-ui,
.search-ui * {
    box-sizing: border-box;
}

.filter-card {
    background: var(--primary-blue);
    /* ティール系ベース */
    border-radius: 12px;
    padding: 14px;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    overflow: hidden;
}

.filter-header {
    color: #ffffff;
    font-weight: 800;
    text-align: center;
    padding: 14px 16px;
    font-size: 1.2rem;
    max-width: 100%;
}

.filter-body {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
    max-width: 100%;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    align-items: center;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
}

.filter-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    width: 100%;
    padding: 14px 16px;
    background: #ffc107;
    color: #000 !important;
    font-weight: 800;
    border-radius: 999px;
    border: 2px solid #ffb300;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) inset, 0 6px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    box-sizing: border-box;
}

.filter-submit i {
    color: #000;
}

@media (max-width: 599px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

.v-middle th,
.v-middle td {
    vertical-align: middle;
}

/* 吹き出し */

.chat-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: nowrap;
}

.chat-bubble {
    position: relative;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 10px 15px;
    line-height: 1.5;
    max-width: 100%;
    flex: 1;
    word-wrap: break-word;
    min-width: 0;
    box-sizing: border-box;
}

.chat-bubble::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -28px;
    width: 0;
    height: 0;
    border: 16px solid transparent;
    border-right-color: #f0f0f0;
}

.chat-avatar {
    width: 120px;
    height: auto;
    /* 高さは自動に変更 */
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
}

@media (max-width: 599px) {
    .chat-avatar {
        width: 80px;
        height: 80px;
    }

    .chat-avatar img {
        width: 80px;
        height: 80px;
    }
}

.avatar-label {
    font-size: 16px;
    text-align: center;
    padding: 2px 6px;
    margin-top: 4px;
    border: 1px solid #000;
    border-radius: 2px;
    line-height: 1.2;
}

.osusume-container {
    border: 2px solid var(--gray-400);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.evaluation-container {
    position: relative;
    top: -24px;
    display: flex;
    margin-bottom: -40px;
}

.evaluation-container p {
    text-align: center;
    margin: 24px auto 0;
    transform: translateX(-15%);
}

.no-1 {
    position: relative;
    top: -4px;
    height: 100px;
    width: auto;
}

p.evaluation {
    margin: 0;
}

@media (max-width: 599px) {
    .no-1 {
        height: 80px;
    }

    .evaluation-container p {
        text-align: center;
        margin: 12px auto 0;
        transform: translateX(-15%);
    }
}

@media (max-width: 480px) {
    .no-1 {
        top: -2px;
        left: -12px;
        height: 14vw;
    }

    .evaluation-container p {
        font-size: 1.4rem;
        transform: translateX(-10%);
    }

    .evaluation-container {
        margin-bottom: -20px;
    }
}

.comparison-table.v-middle th,
.comparison-table.v-middle td,
.comparison-table.v-middle td:first-child {
    vertical-align: middle;
}

.right {
    text-align: right;
    display: block;
    margin-top: 10px;
}

.ol-list {
    background-color: #fff;
}

.ol-list li::before {
    content: counter(ol-counter);
}

.smart-guide p.point {
    font-size: 1.2rem;
    margin-left: 12px;
    background-color: var(--yellow);
    padding: 12px;
}

.smart-guide p.point.correct {
    background-color: var(--accent-green);
    color: #fff;
}

.smart-guide img.x-icon {
    position: relative;
    width: 1.2rem;
    top: 3px;
    padding-right: 4px;
}

ul.point-x {
    padding-top: 32px;
    margin-top: -22px;
}

.difference {
    text-align: center;
    background-color: #f4f0cf;
    padding: 8px;
    margin-top: -30px;
}

tr.middle-align td,
td.middle-align {
    vertical-align: middle;
}


.comparison-table tbody tr.middle-align td:first-child {
    vertical-align: middle;
}

.red {
    color: #ff0000;
}

.step-title {
    display: flex;
    padding: 0;
    border: none;
    align-items: stretch;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

@media (max-width: 599px) {
    .step-title {
        flex-direction: column;
    }
}

.step-title span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.step-title span:first-child {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 16px;
    white-space: nowrap;
}

.step-3 {
    table-layout: auto;
    width: 100%;
}

.step-3 th {
    white-space: nowrap;
}

.video-container {
    width: 100%;
    height: auto;
    margin: 20px 0;
}

.video-container video {
    width: 100%;
    height: auto;
}

.text-left {
    text-align: left;
}

.area-container ul {
    display: flex;
    /* フレックスボックスを使用 */
    flex-wrap: wrap;
    /* 要素がコンテナの幅を超えた場合に折り返す */
    list-style: none;
    /* リストスタイルを削除 */
    padding: 0;
    /* パディングを削除 */
    margin: 0;
    /* マージンを削除 */
}

.area-container li {
    background-color: var(--primary-blue);
    border-radius: 10px;
    padding: 10px 20px;
    margin: 5px;
    flex: 0 1 auto;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.matome-container {
    text-align: center;
    margin-bottom: 20px;
}

p.matome {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    display: inline-block;
    margin: 0 auto;
}

.damage-title span:first-child {
    background-color: var(--accent-pink);
    color: #fff;
    white-space: nowrap;
    font-size: 1.2rem;
    padding: 4px 8px;
    margin-right: 4px;
}

.scrollable-image {
    overflow-x: auto;
    /* 横スクロールを有効にする */
    white-space: nowrap;
    /* 改行を防ぐ */
}

.scrollable-image img {
    display: inline-block;
    /* インラインブロックに設定 */
    max-width: 710px;
    /* 画像の最大幅を制限しない */
    height: auto;
    /* 高さを自動調整 */
}

td.sleep-medical {
    background-color: #fff9e2 !important;
}

.sleep-recommendation {
    border: 2px solid #ff006a;
    padding: 20px;
    max-width: calc(100% - 40px);
}

.sp-left {
    text-align: left;
}

small {
    display: block;
    margin-bottom: 16px;
}

.point-number {
    color: #000;
    display: block;
    padding: 10px;
    text-align: center;
    position: relative;
    width: fit-content;
    border: 2px solid var(--primary-blue);
    background-color: var(--yellow);
    margin: 20px auto 40px;
}

.point-number::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--primary-blue);
}

@media screen and (max-width: 599px) {
    .sp-center {
        text-align: center;
    }
}

.other-clinic-table tr:nth-child(odd) {
    background-color: #d7d7d7;
}

.other-clinic-table tr:nth-child(even) {
    background-color: #fff;
}

.other-clinic-table td:first-child {
    font-weight: normal;
    background-color: transparent;
}

.other-clinic-table tbody tr:nth-child(even) td:first-child {
    background-color: transparent;
}

img.other-logo {
    margin: 0 auto;
    display: block;
    width: 60%;
    max-width: 400px;
    margin-bottom: 20px;
}

h2.other-title {
    color: #fff;
    display: block;
    padding: 10px;
    text-align: center;
    position: relative;
    background-color: #0e1f88;
    margin: 20px auto 40px;
    background-image: none;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    border: none;
    margin-bottom: 15px;
}

h2.other-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #0e1f88;
}

.other-recommendation ul {
    background-color: #f7f0e6;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    list-style-position: outside;
    padding-left: 40px;
}

.other-recommendation ul li {
    padding-left: 0;
}

.other-recommendation h3.point-title-matome {
    color: #fff;
    display: block;
    padding: 10px;
    text-align: center;
    position: relative;
    width: fit-content;
    background-color: #ff0062;
    margin: 20px auto 40px;
    border-radius: 10px;
    border: none;
    margin-bottom: 15px;
}

h3.point-title-matome::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #ff0062;
}

#top3-clinics {
    padding: 20px 0;
}

.top3-compare-image-container {
    padding: 0 20px;
}

.compare-table-image-container {
    line-height: 0;
}

.compare-table-image-container img#compare-table-01.sticky-active {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #fff;
}