/* ============================================================
 * Pkatsu Media Comparison Table
 * ============================================================ */

.pkatsu-comparison-wrap {
    --pkatsu-pink: #ec808d;
    --pkatsu-pink-light: #fff0f3;
    --pkatsu-pink-border: #f4b6bf;
    --pkatsu-text: #333;
    --pkatsu-muted: #666;
    --pkatsu-highlight: #b85c4a;
    --pkatsu-star: #f5b945;
    --pkatsu-star-empty: #e6e6e6;
    --pkatsu-gold: #d4a017;
    --pkatsu-silver: #b0b0b0;
    --pkatsu-bronze: #c1764a;
    --pkatsu-rank-default: #e6c3c8;

    margin: 1.5em 0;
    color: var(--pkatsu-text);
    font-size: 14px;
    line-height: 1.5;
}

.pkatsu-comparison-title {
    margin: 0 0 0.6em;
    padding: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--pkatsu-text);
}

.pkatsu-comparison-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pkatsu-comparison-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.pkatsu-comparison-table th,
.pkatsu-comparison-table td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--pkatsu-pink-border);
    background: #fff;
}

.pkatsu-comparison-table tbody tr:last-child th,
.pkatsu-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* 左ラベル列 */
.pkatsu-comparison-table th {
    width: 110px;
    background: var(--pkatsu-pink-light);
    color: var(--pkatsu-pink);
    font-weight: bold;
    font-size: 0.95em;
    border-right: 1px solid var(--pkatsu-pink-border);
}

/* 1位列ハイライト */
.pkatsu-col-top + col {
    /* placeholder */
}
.pkatsu-comparison-table colgroup .pkatsu-col-top {
    /* col selector */
}
.pkatsu-comparison-table tr td:nth-child(2) {
    box-shadow: inset 0 0 0 0 transparent;
}
.pkatsu-comparison-table tbody tr:first-child td:nth-child(2) {
    border-top: 2px solid var(--pkatsu-gold);
}
.pkatsu-comparison-table tbody tr td:nth-child(2) {
    border-left: 2px solid var(--pkatsu-gold);
    border-right: 2px solid var(--pkatsu-gold);
}
.pkatsu-comparison-table tbody tr:last-child td:nth-child(2) {
    border-bottom: 2px solid var(--pkatsu-gold);
}

/* 順位バッジ */
.pkatsu-rank-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-top: 18px;
    min-height: 90px;
}

.pkatsu-rank-badge {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    background: var(--pkatsu-rank-default);
    z-index: 1;
}

.pkatsu-rank-badge.pkatsu-rank-1 {
    background: linear-gradient(180deg, #f1c14b 0%, #d4a017 100%);
}
.pkatsu-rank-badge.pkatsu-rank-2 {
    background: linear-gradient(180deg, #d0d0d0 0%, #9e9e9e 100%);
}
.pkatsu-rank-badge.pkatsu-rank-3 {
    background: linear-gradient(180deg, #d68863 0%, #b76847 100%);
}

.pkatsu-rank-num {
    font-size: 1em;
}
.pkatsu-rank-suffix {
    font-size: 0.7em;
    margin-left: 1px;
}

/* ロゴ */
.pkatsu-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pkatsu-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
}

/* アプリ名 */
.pkatsu-name {
    font-weight: bold;
    color: var(--pkatsu-text);
}

/* 特徴 */
.pkatsu-feature-highlight {
    color: var(--pkatsu-highlight);
    font-weight: bold;
    margin-bottom: 2px;
}
.pkatsu-feature-sub {
    color: var(--pkatsu-text);
    font-size: 0.92em;
}

/* 星 */
.pkatsu-stars {
    display: inline-flex;
    gap: 1px;
    align-items: center;
}
.pkatsu-star {
    width: 18px;
    height: 18px;
    display: inline-block;
}
.pkatsu-star-full polygon {
    fill: var(--pkatsu-star);
}
.pkatsu-star-empty polygon {
    fill: var(--pkatsu-star-empty);
}
.pkatsu-star-half .pkatsu-star-bg {
    fill: var(--pkatsu-star-empty);
}
.pkatsu-star-half .pkatsu-star-fg {
    fill: var(--pkatsu-star);
}

/* 料金 */
.pkatsu-row-price td {
    color: var(--pkatsu-text);
}

/* CTAボタン */
.pkatsu-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--pkatsu-pink);
    color: #fff !important;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: bold;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(236, 128, 141, 0.3);
    white-space: nowrap;
}
.pkatsu-cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none;
}
.pkatsu-cta-arrow {
    font-size: 1.1em;
    line-height: 1;
}

/* スマホ */
@media (max-width: 600px) {
    .pkatsu-comparison-wrap {
        font-size: 13px;
    }
    .pkatsu-comparison-table {
        min-width: 640px;
    }
    .pkatsu-comparison-table th,
    .pkatsu-comparison-table td {
        padding: 10px 6px;
    }
    .pkatsu-comparison-table th {
        width: 90px;
        font-size: 0.85em;
    }
    .pkatsu-logo {
        width: 52px;
        height: 52px;
    }
    .pkatsu-star {
        width: 15px;
        height: 15px;
    }
    .pkatsu-cta-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    .pkatsu-rank-badge {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
    }
}
