/* ================================================================
   eSIM 日数別料金比較（ドロップダウン版） - スタイルシート v3.0
   ================================================================ */

/* ================================================================
   1. コンテナ
   ================================================================ */
.esim-comparison-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ================================================================
   2. SEO用見出し（固定テキスト）
   ================================================================ */
.esim-seo-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.esim-sub-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

/* スマホ専用改行 */
.sp-only {
    display: none;
}

@media (max-width: 480px) {
    .sp-only {
        display: block;
    }
}

/* ================================================================
   3. ドロップダウンセレクター
   ================================================================ */
.esim-dropdown-wrapper {
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.25rem;  /* パディングを縮小 */
    background: #fff7ed;  /* 薄いオレンジ背景 */
    border-radius: 8px;  /* 少し小さく */
    border: 2px solid #fed7aa;  /* オレンジ枠 */
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;  /* 折り返しなし */
}

.esim-dropdown-label {
    font-size: 0.9375rem;  /* 少し小さく */
    font-weight: 600;
    color: #374151;  /* 濃いグレー */
    margin: 0;
    white-space: nowrap;  /* 改行しない */
    flex-shrink: 0;  /* 縮まない */
}

.esim-days-select {
    flex: 1;
    min-width: 200px;  /* 最小幅を縮小 */
    padding: 0.625rem 1rem;  /* パディングを縮小 */
    font-size: 0.9375rem;  /* 少し小さく */
    font-weight: 600;
    color: #1f2937;
    background: #ffffff;
    border: 2px solid #fed7aa;  /* 薄いオレンジ */
    border-radius: 6px;  /* 少し小さく */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);  /* 影を小さく */
}

.esim-days-select:hover {
    border-color: #f97316;  /* オレンジ */
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.2);
}

.esim-days-select:focus {
    outline: none;
    border-color: #f97316;  /* オレンジ */
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ================================================================
   4. コンテンツエリア
   ================================================================ */
.esim-content-area {
    position: relative;
}

.esim-day-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.esim-day-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================================
   5. 日数別見出しと説明
   ================================================================ */
.esim-day-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    padding: 1rem;
    background: #fef3c7;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
}

.esim-day-intro {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: #fff7ed !important;  /* オレンジ背景 */
    border-left: 4px solid #f97316;  /* オレンジ枠 */
    border-radius: 8px;
    color: #9a3412;  /* ダークオレンジテキスト */
    font-size: 1rem;
}

/* ================================================================
   6. TOP3 カードラッパー（画像2完全コピー版 + ボタン3つ）
   ================================================================ */
.esim-top3-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    overflow: visible;
}

/* シンプルカード */
.esim-simple-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.esim-simple-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* カテゴリーバッジ */
.esim-category-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.8125rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
    min-width: fit-content;
}

.esim-category-small .esim-category-badge {
    background: #f97316 !important;  /* オレンジ色に変更 */
    color: #ffffff !important;
}

.esim-category-medium .esim-category-badge {
    background: #10b981 !important;
    color: #ffffff !important;
}

.esim-category-unlimited .esim-category-badge {
    background: #f59e0b !important;
    color: #ffffff !important;
}

/* プロバイダー名（小さく） */
.esim-provider-name-small {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

/* ロゴ */
.esim-simple-card-logo {
    width: 100%;
    height: 80px;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esim-simple-card-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
}

.esim-simple-card-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

/* データ量バー（緑色） */
.esim-simple-card-data-bar {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #059669;
    color: #ffffff;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 価格（小さめに修正） */
.esim-simple-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 1rem;
}

/* 3つのボタン（コンパクト） */
.esim-card-buttons {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.esim-card-btn-small {
    flex: 1;
    min-width: calc(33.333% - 0.35rem);
    padding: 0.5rem 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.esim-card-btn-small:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.esim-btn-detail {
    color: #6b7280;  /* グレー */
    border-color: #6b7280;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.esim-btn-detail:hover {
    background: #f3f4f6;  /* 薄いグレー背景 */
    border-color: #4b5563;  /* 濃いグレー */
}

.esim-btn-info {
    color: #f97316;  /* オレンジ色に変更 */
    border-color: #f97316;
}

.esim-btn-info:hover {
    background: #fff7ed;  /* 薄いオレンジ背景 */
}

.esim-btn-buy {
    color: #ffffff;
    background: #3b82f6;  /* 青色に戻す */
    border-color: #3b82f6;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
}

.esim-btn-buy:hover {
    background: #2563eb;  /* ホバー時は濃い青 */
}

.esim-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.esim-btn-disabled:hover {
    background: #3b82f6;
}

/* ポップアップモーダル */
.esim-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.esim-popup-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem 1rem;  /* 左右のパディングを削減 */
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.esim-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

.esim-popup-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.esim-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    padding-right: 2rem;
}

.esim-popup-section {
    margin-bottom: 1.5rem;
}

.esim-popup-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.esim-popup-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.esim-popup-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.esim-popup-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: 700;
}

.esim-popup-list.demerit-list li::before {
    content: '✗';
    color: #ef4444;
}

.esim-popup-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 0.5rem;  /* ラベルと値の間隔 */
}

.esim-popup-info-item:last-child {
    border-bottom: none;
}

.esim-popup-info-label {
    font-weight: 600;
    color: #6b7280;
    flex: 0 0 auto;
    max-width: 35%;  /* ラベルの最大幅を制限 */
}

.esim-popup-info-value {
    font-weight: 600;
    color: #1f2937;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

/* クーポンセクションのスタイル */
.esim-popup-coupon-section {
    background: #fef3c7;
    padding: 12px 1rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-left: -1rem;
    margin-right: -1rem;
}

.esim-popup-coupon-title {
    color: #d97706;
    margin: 0 0 8px 0;
}

.esim-popup-coupon-text {
    color: #92400e;
    line-height: 1.6;
    margin: 0;
}

/* ================================================================
   7. 全プラン比較表セクション
   ================================================================ */
.esim-full-table-section {
    margin-top: 3rem;
}

.esim-full-table-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.esim-price-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.esim-price-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* テーブルヘッダー */
.esim-price-table thead {
    background: #f3f4f6;
    border-bottom: 2px solid #e5e7eb;
}

.esim-price-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* テーブルボディ */
.esim-price-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.esim-price-table tbody tr:hover {
    background: #f9fafb;
}

.esim-price-table tbody tr:last-child {
    border-bottom: none;
}

.esim-price-table td {
    padding: 1rem;
    font-size: 0.9375rem;
}

/* プロバイダーセル（ロゴ + 名前） */
.provider-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provider-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.provider-name {
    font-size: 1rem;
    color: #1f2937;
}

/* 価格セル */
.price-cell {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.125rem;
}

/* データ量セル */
.data-cell {
    color: #374151;
}

/* 1日あたりセル */
.perday-cell {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 評価セル */
.rating-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1rem;
}

.rating-score {
    font-weight: 600;
    color: #1f2937;
}

.rating-count {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ================================================================
   8. 購入ボタン
   ================================================================ */
.esim-buy-btn-table {
    padding: 0.625rem 1.25rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
}

.esim-buy-btn-table:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.esim-buy-btn-table:active {
    transform: translateY(0);
}

/* ================================================================
   9. データなし表示
   ================================================================ */
.esim-no-data {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

.esim-no-data p {
    margin: 0;
    font-size: 1rem;
}

/* ================================================================
   10. エラー表示
   ================================================================ */
.esim-error {
    padding: 1rem 1.5rem;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    color: #991b1b;
    font-weight: 500;
}

/* ================================================================
   11. レスポンシブ対応
   ================================================================ */

/* タブレット */
@media (max-width: 768px) {
    .esim-dropdown-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .esim-days-select {
        min-width: 100%;
    }
    
    .esim-top3-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .esim-price-table th,
    .esim-price-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .provider-name {
        font-size: 0.9375rem;
    }
    
    .price-cell {
        font-size: 1rem;
    }
}

/* スマートフォン（横スクロール対応） */
/* ================================================================
   12. ユーティリティ
   ================================================================ */
.esim-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.esim-loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* ================================================================
   4. TOP3 おすすめカードセクション
   ================================================================ */
.esim-top3-section {
    margin-bottom: 3rem;
}

.esim-top3-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.esim-top3-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* カード共通スタイル */
.esim-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.esim-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* バッジ */
.esim-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.esim-card-cheapest {
    border-color: #fbbf24;
}

.esim-card-cheapest .esim-card-badge {
    background: #fbbf24;
    color: #ffffff;
}

.esim-card-popular {
    border-color: #2563eb;
}

.esim-card-popular .esim-card-badge {
    background: #2563eb;
    color: #ffffff;
}

.esim-card-value {
    border-color: #10b981;
}

.esim-card-value .esim-card-badge {
    background: #10b981;
    color: #ffffff;
}

.esim-card-recommended {
    border-color: #8b5cf6;
}

.esim-card-recommended .esim-card-badge {
    background: #8b5cf6;
    color: #ffffff;
}

/* ロゴ */
.esim-card-logo {
    width: 100%;
    height: 60px;
    margin: 1rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esim-card-logo img {
    max-width: 150px;
    max-height: 60px;
    object-fit: contain;
}

.esim-card-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

/* 価格 */
.esim-card-price {
    margin-bottom: 1rem;
}

.esim-card-price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}

.esim-card-price-currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b7280;
    margin-left: 0.25rem;
}

/* データ量 */
.esim-card-data {
    margin-bottom: 0.75rem;
}

.esim-card-data-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.esim-card-data-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

/* 1日あたり */
.esim-card-perday {
    margin-bottom: 1.5rem;
}

.esim-card-perday-amount {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* カード内購入ボタン */
.esim-card-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.esim-card-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.esim-card-btn:active {
    transform: translateY(0);
}

/* ================================================================
   5. 全プラン比較表セクション
   ================================================================ */
.esim-full-table-section {
    margin-top: 3rem;
}

.esim-full-table-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.esim-price-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.esim-price-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

/* テーブルヘッダー */
.esim-price-table thead {
    background: #f3f4f6;
    border-bottom: 2px solid #e5e7eb;
}

.esim-price-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* テーブルボディ */
.esim-price-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.esim-price-table tbody tr:hover {
    background: #f9fafb;
}

.esim-price-table tbody tr:last-child {
    border-bottom: none;
}

.esim-price-table td {
    padding: 1rem;
    font-size: 0.9375rem;
}

/* プロバイダーセル（ロゴ + 名前） */
.provider-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.provider-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.provider-name {
    font-size: 1rem;
    color: #1f2937;
}

/* 価格セル */
.price-cell {
    color: #2563eb;
    font-weight: 600;
    font-size: 1.125rem;
}

/* データ量セル */
.data-cell {
    color: #374151;
}

/* 1日あたりセル */
.perday-cell {
    color: #6b7280;
    font-size: 0.875rem;
}

/* 評価セル */
.rating-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1rem;
}

.rating-score {
    font-weight: 600;
    color: #1f2937;
}

.rating-count {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ================================================================
   6. 購入ボタン
   ================================================================ */
.esim-buy-btn-table {
    padding: 0.625rem 1.25rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
}

.esim-buy-btn-table:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.esim-buy-btn-table:active {
    transform: translateY(0);
}

/* ================================================================
   7. データなし表示
   ================================================================ */
.esim-no-data {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

.esim-no-data p {
    margin: 0;
    font-size: 1rem;
}

/* ================================================================
   8. エラー表示
   ================================================================ */
.esim-error {
    padding: 1rem 1.5rem;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    color: #991b1b;
    font-weight: 500;
}

/* ================================================================
   9. レスポンシブ対応
   ================================================================ */

/* タブレット */
@media (max-width: 768px) {
    .esim-days-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .esim-tab-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .esim-top3-cards {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .esim-price-table th,
    .esim-price-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .provider-name {
        font-size: 0.9375rem;
    }
    
    .price-cell {
        font-size: 1rem;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    .esim-comparison-container {
        padding: 0 0.5rem;
    }
    
    .esim-seo-heading {
        font-size: 1.125rem;
    }
    
    /* h3もスマホで改行 */
    .esim-sub-heading {
        font-size: 1rem;
    }
    
    .esim-sub-heading br {
        display: inline; /* PCの改行を維持 */
    }
    
    .esim-dropdown-wrapper {
        padding: 0.625rem 0.875rem;  /* コンパクトに */
        margin-bottom: 1rem;
        flex-wrap: nowrap;  /* スマホでも1段 */
        gap: 0.5rem;
    }
    
    .esim-dropdown-label {
        font-size: 0.75rem;  /* 小さく */
        flex-shrink: 0;  /* 縮まない */
        min-width: fit-content;  /* 内容に合わせる */
        font-weight: 600;
        color: #374151;
    }
    
    .esim-days-select {
        padding: 0.5rem 0.625rem;  /* コンパクトに */
        font-size: 0.8125rem;
        min-width: 0;  /* 最小幅制限なし */
        flex: 1;  /* 残りのスペースを使う */
    }
    
    /* カテゴリーバッジをスマホで小さく */
    .esim-category-badge {
        font-size: 0.6875rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* カードは横スクロール（幅を220pxに縮小） */
    .esim-top3-cards-wrapper {
        display: flex;
        overflow-x: auto;
        gap: 0.75rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        margin: 0 -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        position: relative;
    }
    
    /* スクロールヒントを追加 */
    .esim-top3-cards-wrapper::after {
        content: '← スワイプできます →';
        position: absolute;
        bottom: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(249, 115, 22, 0.9);  /* オレンジ色に変更 */
        color: white;
        padding: 0.375rem 0.75rem;
        border-radius: 12px;
        font-size: 0.6875rem;
        font-weight: 600;
        white-space: nowrap;
        pointer-events: none;
        z-index: 10;
        animation: fadeInOut 3s ease-in-out infinite;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0; }
        50% { opacity: 1; }
    }
    
    .esim-simple-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
        max-height: 420px;  /* 最大高さを制限 */
        scroll-snap-align: center;
        padding: 0.875rem 0.625rem;
        padding-top: 1.25rem;  /* バッジのスペース確保 */
        overflow: visible;
        margin-top: 12px;  /* バッジが見切れないように上部余白 */
    }
    
    .esim-simple-card-price {
        font-size: 1.125rem;
        margin-bottom: 0.625rem;
    }
    
    /* ロゴのサイズをスマホでさらに小さく */
    .esim-simple-card-logo {
        height: 50px;
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .esim-simple-card-logo img {
        max-height: 50px;
    }
    
    /* データ量バーを小さく */
    .esim-simple-card-data-bar {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
        word-break: keep-all;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0.5rem;
    }
    
    /* ボタンのフォントサイズとパディング調整 */
    .esim-card-btn-small {
        font-size: 0.625rem;
        padding: 0.4rem 0.2rem;
        min-width: calc(33.333% - 0.35rem);
        line-height: 1.2;
    }
    
    /* ボタンコンテナの余白調整 */
    .esim-card-buttons {
        gap: 0.3rem;
        margin-top: 0.5rem;
    }
    
    /* プロバイダー名をスマホで小さく */
    .esim-provider-name-small {
        font-size: 0.6875rem;
        margin-top: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    /* カテゴリーバッジをさらに小さく */
    .esim-category-badge {
        font-size: 0.625rem;
        padding: 0.3rem 0.625rem;
        top: -8px;
    }
    
    /* ポップアップをスマホ対応（コンパクト版） */
    .esim-popup-overlay {
        padding: 0.5rem !important;
    }
    
    .esim-popup-content {
        padding: 1rem 0.5rem !important;  /* 左右のパディングをさらに削減 */
        max-height: 85vh !important;
        max-width: 95vw !important;
        border-radius: 8px !important;
    }
    
    .esim-popup-close {
        top: 0.5rem !important;
        right: 0.5rem !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 1.25rem !important;
    }
    
    .esim-popup-title {
        font-size: 1rem !important;
        margin: 0 0 1rem 0 !important;
        padding-right: 2rem !important;
        line-height: 1.3 !important;
    }
    
    .esim-popup-section {
        margin-bottom: 1rem !important;
        padding: 0 !important;  /* セクションのパディングを削除 */
    }
    
    .esim-popup-section-title {
        font-size: 0.875rem !important;
        margin: 0 0 0.5rem 0 !important;
    }
    
    .esim-popup-info-item {
        padding: 0.4rem 0 !important;
        font-size: 0.8125rem !important;
        gap: 0.25rem !important;  /* 間隔をさらに狭く */
        display: flex !important;
        justify-content: space-between !important;
    }
    
    .esim-popup-info-label {
        font-size: 0.75rem !important;
        flex: 0 0 auto !important;
        max-width: 32% !important;  /* 35% → 32%に変更 */
        padding-right: 0.25rem !important;
    }
    
    .esim-popup-info-value {
        font-size: 0.8125rem !important;
        text-align: right !important;
        flex: 1 !important;
        word-break: break-word !important;
        padding-left: 0 !important;
    }
    
    /* クーポンセクションのスタイル調整 */
    .esim-popup-coupon-section {
        padding: 0.75rem 0.5rem !important;
        margin-left: -0.5rem !important;
        margin-right: -0.5rem !important;
    }
    
    .esim-popup-coupon-title {
        font-size: 0.875rem !important;
        margin: 0 0 0.5rem 0 !important;
    }
    
    .esim-popup-coupon-text {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    .esim-tab-button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    /* カードは縦積みでOK */
    .esim-top3-cards {
        grid-template-columns: 1fr;
    }
    
    .esim-card {
        padding: 1.25rem;
    }
    
    .esim-card-price-amount {
        font-size: 2rem;
    }
    
    /* テーブルを縦積みレイアウトに変更 */
    .esim-price-table {
        display: block;
    }
    
    .esim-price-table thead {
        display: none;
    }
    
    .esim-price-table tbody,
    .esim-price-table tr,
    .esim-price-table td {
        display: block;
        width: 100%;
    }
    
    .esim-price-table tr {
        margin-bottom: 1.5rem;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
    }
    
    .esim-price-table tr:hover {
        background: #f9fafb;
    }
    
    .esim-price-table td {
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }
    
    .provider-cell {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .price-cell::before {
        content: "料金: ";
        font-weight: 600;
        color: #6b7280;
    }
    
    .data-cell::before {
        content: "データ量: ";
        font-weight: 600;
        color: #6b7280;
    }
    
    .perday-cell::before {
        content: "1日あたり: ";
        font-weight: 600;
        color: #6b7280;
    }
    
    .action-cell {
        margin-top: 1rem;
    }
    
    .esim-buy-btn-table {
        width: 100%;
        padding: 0.75rem;
    }
}

/* ================================================================
   10. ユーティリティ
   ================================================================ */
.esim-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.esim-loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* ================================================================
   11. タブナビゲーション（v4.3 NEW）
   ================================================================ */
.esim-tab-navigation {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.esim-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    background: white;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.esim-tab-btn:hover {
    color: #f97316;  /* オレンジ色に変更 */
    background: #fff7ed;  /* 薄いオレンジ背景 */
}

.esim-tab-btn.active {
    color: #f97316;  /* オレンジ色に変更 */
    border-bottom-color: #f97316;
    background: #fff7ed;  /* 薄いオレンジ背景 */
}

@media (max-width: 768px) {
    .esim-tab-navigation {
        gap: 4px;
    }
    
    .esim-tab-btn {
        min-width: 110px;
        padding: 12px 12px;
        font-size: 13px;
    }
}

/* タブコンテンツ */
.esim-tab-content {
    display: none;
}

.esim-tab-content.active {
    display: block;
    animation: fadeInTab 0.4s ease;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* タブが無効の場合は表示しない */
[data-enable-tabs="false"] .esim-tab-navigation {
    display: none;
}

/* ================================================================
   ツール用カスタム見出しスタイル
   ================================================================ */

/* h2用 - ツールに完全同化 */
.esim-tool-heading {
    background: #fff7ed !important;
    border: 2px solid #fed7aa !important;
    border-radius: 8px !important;
    padding: 0.875rem 1.25rem !important;
    margin: 0 0 1rem 0 !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.esim-tool-heading::before,
.esim-tool-heading::after {
    display: none !important;
    content: none !important;
}

/* h3用 - シンプルな左アクセント */
.esim-tool-heading-h3 {
    background: transparent !important;
    border-left: 4px solid #f97316 !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: 1px solid #fed7aa !important;
    padding: 0.5rem 0 0.5rem 1rem !important;
    margin: 0 0 1rem 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    line-height: 1.5 !important;
}

.esim-tool-heading-h3::before,
.esim-tool-heading-h3::after {
    display: none !important;
    content: none !important;
}

/* スマホ対応 */
@media (max-width: 767px) {
    .esim-tool-heading {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .esim-tool-heading-h3 {
        font-size: 0.9375rem !important;
        padding: 0.5rem 0 0.5rem 0.875rem !important;
    }
}
