/**
 * 選手一覧ページ UIパターン CSS v3
 * Week 17: 選手一覧ページUI改善 - 6パターン（パターン1,6削除、パターン7,8追加）
 */

/* ===========================================
   共通変数・ランク別カラー
   ※ 基本変数は /css/variables.css で定義
   =========================================== */
:root {
    /* 能力バー色（variables.cssの変数を参照） */
    --bar-high: var(--ability-bar-high-gradient);
    --bar-mid: var(--ability-bar-mid-gradient);
    --bar-low: var(--ability-bar-low-gradient);
}

/* ランク別CSS変数は page-base.css で定義済み
   PlayerList専用: .card-standard向けのランクなしスタイル拡張 */
.card-standard:not([class*="rank-"]),
.card-standard[class*="rank-"]:not(.rank-1):not(.rank-2):not(.rank-3):not(.rank-4):not(.rank-5):not(.rank-6):not(.rank-7):not(.rank-8):not(.rank-9):not(.rank-10):not(.rank-11):not(.rank-12) {
    --current-rank-bg: var(--rank-null-bg);
    --current-rank-color: var(--rank-null-color);
    --current-rank-solid: var(--rank-null-solid);
}

/* ===========================================
   共通スタイル
   =========================================== */
.demo-section {
    margin-bottom: 60px;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.section-title {
    font-family: var(--font-family-base);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-800, #243b53);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-primary-800, #243b53);
}

.pattern-description {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 24px 0;
}

.pattern-link {
    display: inline-block;
    padding: 8px 16px;
    color: var(--color-primary-700, #334e68);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.pattern-link:hover {
    color: var(--color-primary-800, #243b53);
    background: #eff6ff;
    border-radius: 6px;
}

.pattern-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===========================================
   パターン1: カラフルカード
   =========================================== */
.card-colorful {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: white;
    border-left: 6px solid var(--current-rank-solid);
}

.colorful-header {
    background: var(--current-rank-bg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.colorful-rank-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 12px;
    min-width: 60px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.colorful-main { flex: 1; }

.colorful-name {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
}

.colorful-name a {
    color: white;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.colorful-name a:hover { text-decoration: underline; }

.colorful-team {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.colorful-team a { color: rgba(255,255,255,0.9); text-decoration: none; }
.colorful-team a:hover { text-decoration: underline; }

.colorful-grade {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 0.85rem;
}

.colorful-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.colorful-tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.colorful-tag.position { background: rgba(255,255,255,0.35); }

.colorful-score {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.colorful-score .score-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

.colorful-score .score-label {
    font-size: 0.75rem;
    color: #64748b;
}

.colorful-body {
    padding: 20px 24px;
}

.colorful-abilities {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.colorful-ability-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.colorful-ability-row .ability-label {
    width: 60px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.colorful-ability-row .ability-track {
    flex: 1;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.colorful-ability-row .ability-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease-out;
}

.colorful-ability-row .ability-val {
    width: 80px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.colorful-outline {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.colorful-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.colorful-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--current-rank-bg);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.colorful-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===========================================
   パターン2: グラデーションバー
   =========================================== */
.card-gradient {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: white;
}

.gradient-left {
    background: var(--current-rank-bg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.gradient-rank {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.gradient-center {
    flex: 1;
    padding: 20px;
}

.gradient-header { margin-bottom: 10px; }

.gradient-name {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
}

.gradient-name a {
    color: #1e293b;
    text-decoration: none;
}

.gradient-name a:hover { color: var(--current-rank-color); }

.gradient-team {
    color: #64748b;
    font-size: 0.9rem;
}

.gradient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.gradient-badge {
    background: var(--current-rank-solid);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.gradient-info {
    color: #64748b;
    font-size: 0.85rem;
}

.gradient-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gradient-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gradient-bar-row .bar-label {
    width: 50px;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.gradient-bar-row .bar-track {
    flex: 1;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.gradient-bar-row .bar-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--bar-mid);
    transition: width 0.8s ease-out;
}

.gradient-bar-row .bar-fill[data-percent^="7"],
.gradient-bar-row .bar-fill[data-percent^="8"],
.gradient-bar-row .bar-fill[data-percent^="9"],
.gradient-bar-row .bar-fill[data-percent="100"] { background: var(--bar-high); }

.gradient-bar-row .bar-fill[data-percent^="0"],
.gradient-bar-row .bar-fill[data-percent^="1"],
.gradient-bar-row .bar-fill[data-percent^="2"],
.gradient-bar-row .bar-fill[data-percent^="3"] { background: var(--bar-low); }

.gradient-bar-row .bar-value {
    width: 70px;
    text-align: right;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.gradient-bar-row .bar-value small {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
}

.gradient-right {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f8fafc;
    min-width: 100px;
}

.gradient-score {
    font-size: 2rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

.gradient-score small {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
}

.gradient-btn {
    padding: 8px 20px;
    background: var(--current-rank-solid);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.gradient-btn:hover { opacity: 0.85; }

/* ===========================================
   パターン3: コンパクトダッシュ
   =========================================== */
.card-compact {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: white;
}

.compact-header {
    background: var(--current-rank-bg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.compact-rank {
    background: rgba(255,255,255,0.25);
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.compact-info { flex: 1; }

.compact-name {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
}

.compact-name a {
    color: white;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.compact-name a:hover { text-decoration: underline; }

.compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.compact-team { font-weight: 500; }
.compact-pos {
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 4px;
}

.compact-details { opacity: 0.85; }

.compact-score-circle {
    background: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.compact-score-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

.compact-body { padding: 20px; }

.compact-charts {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.compact-chart { }

.compact-chart .chart-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.compact-chart .chart-name {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.compact-chart .chart-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.compact-chart .chart-bar-bg {
    height: 14px;
    background: #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
}

.compact-chart .chart-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.8s ease-out;
}

/* パーセント別カラー */
.chart-bar-fill.percent-70, .chart-bar-fill.percent-80, .chart-bar-fill.percent-90, .chart-bar-fill.percent-100 { background: var(--bar-high); }
.chart-bar-fill.percent-40, .chart-bar-fill.percent-50, .chart-bar-fill.percent-60 { background: var(--bar-mid); }
.chart-bar-fill.percent-0, .chart-bar-fill.percent-10, .chart-bar-fill.percent-20, .chart-bar-fill.percent-30 { background: var(--bar-low); }

.compact-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.compact-footer {
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.compact-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--current-rank-solid);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.compact-btn:hover { opacity: 0.85; }

/* ===========================================
   パターン4: スポーツマガジン
   =========================================== */
.card-magazine2 {
    display: flex;
    flex-wrap: wrap;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    background: white;
    position: relative;
}

.mag2-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--current-rank-bg);
}

.mag2-main {
    flex: 1;
    padding: 20px 20px 20px 26px;
    min-width: 300px;
}

.mag2-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.mag2-rank {
    background: var(--current-rank-bg);
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.mag2-title { flex: 1; }

.mag2-name {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
}

.mag2-name a {
    color: #1e293b;
    text-decoration: none;
}

.mag2-name a:hover { color: var(--current-rank-color); }

.mag2-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.mag2-grade {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 0.8rem;
}

.mag2-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.mag2-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.mag2-tag.primary {
    background: var(--current-rank-solid);
    color: white;
}

.mag2-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.mag2-stats {
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-width: 200px;
}

.mag2-stat-circles {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-circle {
    position: relative;
    width: 70px;
    height: 70px;
}

.stat-circle .circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.stat-circle .circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.stat-circle .circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.stat-circle .circle.high { stroke: #22c55e; }
.stat-circle .circle.mid { stroke: #eab308; }
.stat-circle .circle.low { stroke: #ef4444; }

.stat-circle-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-circle-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stat-circle-label {
    font-size: 0.65rem;
    color: #64748b;
}

.mag2-total {
    text-align: center;
}

.mag2-total-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

.mag2-total-label {
    font-size: 0.75rem;
    color: #64748b;
}

.mag2-action {
    width: 100%;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: white;
    text-align: center;
}

.mag2-btn {
    display: inline-block;
    padding: 10px 32px;
    background: var(--current-rank-bg);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.mag2-btn:hover { opacity: 0.9; }

/* ===========================================
   パターン5: ミニマルモダン
   =========================================== */
.card-minimal {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: white;
    position: relative;
}

.minimal-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--current-rank-bg);
}

.minimal-content {
    display: flex;
    padding: 20px;
    padding-top: 24px;
    gap: 16px;
}

.minimal-left {
    display: flex;
    align-items: flex-start;
}

.minimal-rank {
    background: var(--current-rank-bg);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.minimal-center { flex: 1; }

.minimal-header { margin-bottom: 8px; }

.minimal-name {
    margin: 0 0 2px 0;
    font-size: 1.1rem;
}

.minimal-name a {
    color: #1e293b;
    text-decoration: none;
}

.minimal-name a:hover { color: var(--current-rank-color); }

.minimal-team {
    color: #64748b;
    font-size: 0.85rem;
}

.minimal-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 14px;
}

.minimal-badge {
    background: #e2e8f0;
    color: #475569;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.minimal-text {
    color: #64748b;
    font-size: 0.8rem;
}

.minimal-abilities {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.minimal-ability { }

.minimal-ability-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #64748b;
}

.minimal-ability-value {
    font-weight: 600;
    color: #1e293b;
}

.minimal-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.minimal-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.minimal-bar-fill.high { background: var(--bar-high); }
.minimal-bar-fill.mid { background: var(--bar-mid); }
.minimal-bar-fill.low { background: var(--bar-low); }

.minimal-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.minimal-score {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

.minimal-score small {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 400;
}

.minimal-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--current-rank-solid);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.minimal-btn:hover { transform: scale(1.1); }

/* ===========================================
   パターン6: プレミアムカード
   =========================================== */
.card-premium {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    background: white;
    position: relative;
}

.premium-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: var(--current-rank-bg);
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

.premium-header {
    background: var(--current-rank-bg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.premium-rank-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.premium-rank {
    background: rgba(255,255,255,0.3);
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.premium-pos {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.premium-title-area { flex: 1; }

.premium-name {
    margin: 0 0 4px 0;
    font-size: 1.3rem;
}

.premium-name a {
    color: white;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.premium-name a:hover { text-decoration: underline; }

.premium-team {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.premium-score-badge {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.premium-score-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--current-rank-color);
    line-height: 1;
}

.premium-score-label {
    font-size: 0.7rem;
    color: #64748b;
}

.premium-body {
    padding: 20px 24px;
    position: relative;
}

.premium-specs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.premium-spec {
    display: flex;
    align-items: center;
    gap: 6px;
}

.premium-spec .spec-icon {
    font-size: 1rem;
}

.premium-spec .spec-value {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.premium-abilities {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.premium-ability { }

.premium-ability-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.premium-ability-name {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.premium-ability-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.premium-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.premium-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--bar-color, #334e68);
    transition: width 0.8s ease-out;
}

.premium-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.premium-desc {
    flex: 1;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.premium-btn {
    padding: 12px 28px;
    background: var(--current-rank-bg);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ===========================================
   レスポンシブ
   =========================================== */
@media (max-width: 768px) {
    .card-gradient {
        flex-direction: column;
    }

    .gradient-left {
        padding: 12px;
        min-width: auto;
    }

    .gradient-right {
        flex-direction: row;
        padding: 12px 20px;
    }

    .card-magazine2 {
        flex-direction: column;
    }

    .mag2-stats {
        flex-direction: row;
        justify-content: space-around;
        padding: 16px;
    }

    .minimal-content {
        flex-wrap: wrap;
    }

    .minimal-right {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid #e2e8f0;
    }

    .premium-footer {
        flex-direction: column;
        text-align: center;
    }

    .premium-specs {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ===========================================
   共通：選手リンク（下線付き）
   =========================================== */
.player-link {
    color: var(--color-primary-800, #243b53);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 700;
    transition: all 0.2s;
}

.player-link:hover {
    color: var(--current-rank-color, #243b53);
    text-decoration-thickness: 2px;
}

/* 詳細リンク（小さなテキストリンク） */
.detail-link {
    color: var(--color-primary-700, #334e68);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.detail-link:hover {
    text-decoration: underline;
}

/* ===========================================
   パターン7: 新・スタンダード
   =========================================== */
.card-standard {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    background: white;
    border: 2px solid #cbd5e1;
    margin-bottom: 12px;
}

.standard-header {
    /* ランク色グラデーション背景 */
    background: var(--current-rank-bg, var(--current-rank-solid));
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: none;
}

.standard-rank-badge {
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    min-width: 50px;
    text-align: center;
}

.standard-main-info {
    flex: 1;
    min-width: 200px;
}

.standard-name {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.standard-name .player-link {
    color: white;
    font-weight: 700;
    text-decoration: underline;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.standard-name .player-link:hover {
    color: #fef08a;
}

.standard-team {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 400;
}

.draft-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
    text-shadow: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.draft-badge-small {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}

.standard-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.meta-item {
    font-weight: 500;
}

.meta-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.standard-eval {
    display: flex;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 6px;
    overflow: hidden;
}

.eval-box {
    padding: 8px 14px;
    text-align: center;
    min-width: 60px;
    border-right: 1px solid rgba(255,255,255,0.3);
    background: transparent;
}

.eval-box:last-child {
    border-right: none;
}

.eval-box.primary {
    background: transparent;
}

.eval-label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1px;
}

.eval-value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: white;
}

/* スコア表示（ドーナツグラフ付き） */
.score-with-donut {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ミニドーナツチャート（PlayerList用） */
.mini-donut-pl {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.mini-donut-pl::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}

.score-with-donut .eval-value {
    display: inline;
}

.standard-body {
    padding: 10px 14px;
}

.standard-abilities {
    margin-bottom: 10px;
}

.abilities-compact {
    display: flex;
    flex-wrap: nowrap; /* 折り返さない - 5つ横並び */
    gap: 4px 24px; /* 間隔を広げる */
    max-width: 850px; /* 全体の最大幅を制限 */
}

.ability-compact-item {
    display: flex;
    flex-direction: column; /* 縦並び: ヘッダー→グラフ */
    gap: 2px;
    flex: 1 1 0; /* 均等分配 */
    min-width: 90px;
    max-width: 140px; /* 各アイテムの最大幅を小さく */
}

.ability-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    width: 90%; /* グラフバーと同じ幅 */
}

.ability-name {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.ability-bar-compact {
    width: 90%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.ability-fill-compact {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease-out;
}

.ability-fill-compact.high { background: var(--bar-high); }
.ability-fill-compact.mid { background: var(--bar-mid); }
.ability-fill-compact.low { background: var(--bar-low); }

.ability-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.no-abilities {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: italic;
}

.standard-career {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
    padding: 6px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.career-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.career-list {
    line-height: 1.6;
}

.career-team-link {
    color: var(--color-primary-700, #334e68);
    text-decoration: none;
    font-weight: 500;
}

.career-team-link:hover {
    text-decoration: underline;
    color: var(--color-primary-800, #243b53);
}

.career-team {
    color: #475569;
}

.career-none {
    color: #94a3b8;
}

.standard-outline {
    font-size: 0.9rem;
}

.outline-text {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.outline-none {
    color: #94a3b8;
    font-style: italic;
    margin: 0;
}

/* ===========================================
   パターン8: 新・コンパクト
   =========================================== */
.card-compact2 {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    background: white;
    border-left: 4px solid var(--current-rank-solid);
}

.compact2-left {
    background: var(--current-rank-bg);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
}

.compact2-rank {
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.compact2-main {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.compact2-row1 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.compact2-name {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.compact2-name .player-link {
    color: var(--color-primary-800, #243b53);
}

.compact2-team {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 400;
}

.compact2-info {
    color: #64748b;
    font-size: 0.8rem;
}

.compact2-pos {
    background: var(--current-rank-solid);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    margin-left: 4px;
}

.compact2-row2 {
    font-size: 0.85rem;
    color: #475569;
}

.compact2-career-label {
    color: #64748b;
    font-weight: 600;
}

.compact2-career-link {
    color: var(--color-primary-700, #334e68);
    text-decoration: none;
}

.compact2-career-link:hover {
    text-decoration: underline;
}

.compact2-row3 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
}

.compact2-abilities-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-ability {
    font-size: 0.8rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.inline-ability b {
    color: #1e293b;
    font-weight: 700;
    margin: 0 2px;
}

.compact2-outline {
    font-size: 0.85rem;
    color: #64748b;
    flex: 1;
    min-width: 200px;
}

.compact2-right {
    padding: 12px 16px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.compact2-eval {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.compact2-eval-count {
    font-size: 0.75rem;
    color: #64748b;
}

.compact2-eval-score {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--current-rank-color);
}

/* ===========================================
   パターン7, 8 レスポンシブ
   =========================================== */
@media (max-width: 768px) {
    /* パターン7 レスポンシブ: ランクを名前の左に配置 */
    .standard-header {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 8px;
        padding: 10px 12px;
    }

    .standard-rank-badge {
        font-size: 0.85rem;
        padding: 3px 8px;
        min-width: auto;
        border-radius: 4px;
        order: 0;
        align-self: center;
    }

    .standard-main-info {
        display: contents;
    }

    .standard-name {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .standard-meta {
        order: 2;
        flex: 0 0 100%;
    }

    .standard-eval {
        order: 3;
        flex: 0 1 auto;
        width: fit-content !important;
        margin: 4px auto 0 auto !important;
        justify-content: center;
    }

    /* 評価セクションを新しい行に配置するためのブレイク */
    .standard-meta::after {
        content: "";
        flex-basis: 100%;
        height: 0;
    }

    /* 紹介文: モバイル対応（3行まで表示） */
    .outline-text {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.5;
    }

    /* 最新コメント: モバイルでも1行インライン形式を維持 */
    .recent-comment-icon {
        display: none !important;
    }

    /* モバイルでは2カラム折り返し */
    .abilities-compact {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .ability-compact-item {
        flex: 1 1 45%; /* 2カラム */
        min-width: 120px;
    }

    /* パターン8 レスポンシブ */
    .card-compact2 {
        flex-direction: column;
    }

    .compact2-left {
        padding: 8px;
        min-width: auto;
    }

    .compact2-right {
        flex-direction: row;
        gap: 16px;
        padding: 10px 16px;
    }

    .compact2-eval {
        flex-direction: row;
        gap: 8px;
    }

    .compact2-outline {
        min-width: auto;
    }
}

/* ========================== */
/* 編集モード用スタイル */
/* ========================== */

.edit-link {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.8rem;
    margin-right: 8px;
}

.edit-link:hover {
    text-decoration: underline;
}

.duplicate-player-id {
    color: #dc2626;
    font-weight: bold;
    font-size: 0.8rem;
    margin: 0 8px;
}

.new-badge {
    display: inline-block;
    background: #22c55e;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.unapproved-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.meta-movie {
    font-size: 1rem;
    margin-left: 4px;
}

.edit-actions {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.delete-btn {
    padding: 8px 16px;
    background: #dc2626;
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #b91c1c;
}

.no-players {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* PlayerList用の追加スタイル */
.player-list-pattern7 {
    max-width: 100%;
    /* ページ背景色: カードとの区別を明確に */
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

/* モバイル: カード左右の余白を縮小 */
@media (max-width: 768px) {
    .player-list-pattern7 {
        padding: 12px 4px;
        border-radius: 0;
    }
}

/* ===========================================
   デモ用: カードヘッダー色パターン
   =========================================== */

/* H-A: 現行（card-standard使用、ランク色背景） */
/* → 既存の.card-standard .standard-headerを使用 */

/* H-B: 白背景＋左ラインのみ */
.card-header-b .standard-header {
    background: white !important;
    border-bottom: 1px solid #e2e8f0;
}

.card-header-b .standard-name .player-link {
    color: #1e293b !important;
    text-shadow: none !important;
}

.card-header-b .standard-team {
    color: #64748b !important;
}

.card-header-b .standard-meta {
    color: #475569 !important;
}

.card-header-b .meta-badge {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.card-header-b .standard-rank-badge {
    background: var(--current-rank-solid) !important;
}

.card-header-b .eval-box {
    background: #f8fafc !important;
}

.card-header-b .eval-label {
    color: #64748b !important;
}

.card-header-b .eval-value {
    color: #1e293b !important;
}

.card-header-b .eval-box.primary {
    background: white !important;
    border: 2px solid var(--current-rank-solid) !important;
}

.card-header-b .eval-box.primary .eval-value {
    color: var(--current-rank-color) !important;
}

/* H-C: 白背景＋ランクバッジのみ色付き */
.card-header-c {
    border-left: none !important;
}

.card-header-c .standard-header {
    background: white !important;
    border-bottom: 1px solid #e2e8f0;
}

.card-header-c .standard-name .player-link {
    color: #1e293b !important;
    text-shadow: none !important;
}

.card-header-c .standard-team {
    color: #64748b !important;
}

.card-header-c .standard-meta {
    color: #475569 !important;
}

.card-header-c .meta-badge {
    background: var(--current-rank-solid) !important;
    color: white !important;
}

.card-header-c .standard-rank-badge {
    background: var(--current-rank-bg) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header-c .eval-box {
    background: #f8fafc !important;
}

.card-header-c .eval-label {
    color: #64748b !important;
}

.card-header-c .eval-value {
    color: #1e293b !important;
}

.card-header-c .eval-box.primary {
    background: var(--current-rank-bg) !important;
}

.card-header-c .eval-box.primary .eval-label {
    color: rgba(255,255,255,0.9) !important;
}

.card-header-c .eval-box.primary .eval-value {
    color: white !important;
}

/* H-D: 薄いランク色背景 */
.card-header-d .standard-header {
    background: color-mix(in srgb, var(--current-rank-solid) 15%, white) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--current-rank-solid) 30%, white);
}

.card-header-d .standard-name .player-link {
    color: #1e293b !important;
    text-shadow: none !important;
}

.card-header-d .standard-team {
    color: #475569 !important;
}

.card-header-d .standard-meta {
    color: #475569 !important;
}

.card-header-d .meta-badge {
    background: var(--current-rank-solid) !important;
    color: white !important;
}

.card-header-d .standard-rank-badge {
    background: var(--current-rank-solid) !important;
}

.card-header-d .eval-box {
    background: white !important;
}

.card-header-d .eval-label {
    color: #64748b !important;
}

.card-header-d .eval-value {
    color: #1e293b !important;
}

.card-header-d .eval-box.primary {
    border: 2px solid var(--current-rank-solid) !important;
}

.card-header-d .eval-box.primary .eval-value {
    color: var(--current-rank-color) !important;
}

/* ===========================================
   デモ用: 左ラインパターン
   =========================================== */

/* L-A: 現行（5px） → card-standardデフォルト */

/* L-B: なし */
.card-line-none {
    border-left: none !important;
}

/* L-C: 細め（3px） */
.card-line-thin {
    border-left-width: 3px !important;
}

/* L-D: グラデーションライン */
.card-line-gradient {
    border-left: none !important;
    position: relative;
}

.card-line-gradient::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--current-rank-solid) 0%, transparent 100%);
    border-radius: 12px 0 0 12px;
}

/* ===========================================
   デモ用: セクション共通スタイル
   =========================================== */

.demo-pattern-section {
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.demo-pattern-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.demo-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.demo-pattern-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.demo-pattern-item-header {
    background: #f8fafc;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.demo-pattern-item-content {
    padding: 16px;
    background: #fafafa;
}

/* ===========================================
   ページネーション（P-C: 件数情報付き）
   =========================================== */
.pagination-container {
    margin: 24px 0;
}

.pagination-info {
    text-align: center;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 12px;
    font-weight: 500;
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.pagination-prev,
.pagination-next {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary-700, #334e68);
    background: white;
    border: 1px solid var(--color-primary-700, #334e68);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: #f0f4f8;
    color: var(--color-primary-800, #243b53);
}

.pagination-prev.disabled,
.pagination-next.disabled {
    color: #9ca3af;
    background: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: center;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-number:hover {
    background: #f0f4f8;
    border-color: var(--color-primary-700, #334e68);
    color: var(--color-primary-700, #334e68);
}

.pagination-number.current {
    background: var(--color-primary-700, #334e68);
    border-color: var(--color-primary-700, #334e68);
    color: white;
    font-weight: 700;
}

.pagination-ellipsis {
    padding: 0 4px;
    color: #9ca3af;
}

/* ===========================================
   最新コメント表示（C5風1行スタイル）
   =========================================== */
.standard-recent-comment {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.85rem;
}

.recent-comment-icon {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.75rem;
}

.recent-comment-text {
    margin: 0;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-comment-meta {
    flex-shrink: 0;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* パンくずリストはplayer-card.cssで共通定義 */

/* ===========================================
   選手一覧ページタイトル (H1)
   =========================================== */
.player-list-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    padding: 0;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .player-list-title {
        font-size: 1.25rem;
        margin: 0 0 10px 0;
    }
}

/* ===========================================
   Phase D: 統合フィルターUI
   =========================================== */
.integrated-filter {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0 16px 0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    padding: 6px 0;
}

.filter-row:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    min-width: 50px;
}

.filter-chip {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    color: var(--color-primary-700, #334e68);
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    cursor: pointer;
}

.filter-chip:hover {
    background: var(--color-primary-100, #ebf8ff);
    border-color: var(--color-primary-500, #63b3ed);
    color: var(--color-primary-800, #243b53);
}

.filter-chip.active {
    background: var(--color-primary-700, #334e68);
    color: white;
    border-color: var(--color-primary-700, #334e68);
}

/* 固定タグカテゴリ */
.kotei-tag-row {
    flex-wrap: wrap;
    align-items: flex-start;
}

.kotei-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kotei-category {
    position: relative;
}

.category-btn {
    display: inline-block;
    padding: 5px 12px;
    background: white;
    color: var(--color-primary-700, #334e68);
    border: 1px solid var(--color-primary-400, #63b3ed);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--color-primary-50, #f0f9ff);
    border-color: var(--color-primary-600, #3182ce);
}

.category-btn.open {
    background: var(--color-primary-700, #334e68);
    color: white;
    border-color: var(--color-primary-700, #334e68);
}

.category-tags {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 10px;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 200px;
    max-width: 400px;
    max-height: 300px;
    overflow-y: auto;
}

.kotei-chip {
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* 現在選択中の固定タグ */
.current-kotei-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primary-100, #ebf8ff);
    border: 1px solid var(--color-primary-500, #63b3ed);
    border-radius: 4px;
    padding: 4px 8px;
    margin-right: 8px;
}

.current-kotei-tag .tag-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary-800, #243b53);
}

.current-kotei-tag .tag-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--color-primary-600, #3182ce);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.current-kotei-tag .tag-clear:hover {
    background: #dc2626;
}

/* ドリルダウン行 */
.drilldown-row {
    background: var(--color-primary-50, #f0f9ff);
    margin: -12px -16px 8px -16px;
    padding: 10px 16px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid var(--color-primary-200, #bfdbfe);
}

/* 並び順セレクトボックス */
.sort-row {
    padding-top: 10px;
}

.sort-select {
    padding: 6px 32px 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334e68;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 8px center no-repeat;
    background-size: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 180px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sort-select:hover {
    border-color: var(--color-primary-400, #63b3ed);
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-primary-500, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* 除外フィルタ */
.exclude-row {
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 4px;
}

.exclude-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.15s;
    user-select: none;
}

.exclude-filter-label:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.exclude-filter-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary-600, #3182ce);
    cursor: pointer;
}

.exclude-filter-text {
    font-size: 0.8rem;
    color: #475569;
    white-space: nowrap;
}

.exclude-filter-label:has(.exclude-filter-checkbox:checked) {
    background: var(--color-primary-50, #f0f9ff);
    border-color: var(--color-primary-300, #90cdf4);
}

.exclude-filter-label:has(.exclude-filter-checkbox:checked) .exclude-filter-text {
    color: var(--color-primary-700, #334e68);
    font-weight: 500;
}

/* 固定タグドロップダウン全幅対応 */
.kotei-tag-row .kotei-categories {
    flex: 1;
    min-width: 0;
}

.kotei-tag-row .category-tags {
    z-index: 1000;
    left: 0;
    right: auto;
    min-width: 400px;
    max-width: calc(100vw - 40px);
}

/* 最後のカテゴリのみ右寄せ */
.kotei-category:last-child .category-tags {
    left: auto;
    right: 0;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .integrated-filter {
        padding: 10px 12px;
    }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-label {
        min-width: auto;
        width: auto;
        margin-bottom: 0;
    }

    /* ドリルダウン行（投打選択）: 1行に収める */
    .drilldown-row {
        margin: -10px -12px 8px -12px;
        padding: 8px 12px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .drilldown-row .filter-group {
        width: auto;
        flex: 0 0 auto;
    }

    .drilldown-row .filter-label {
        font-size: 0.7rem;
        min-width: auto;
    }

    .drilldown-row .filter-chip {
        padding: 3px 8px;
        font-size: 0.75rem;
    }

    .category-tags {
        left: 0;
        right: auto;
        max-width: calc(100vw - 40px);
    }

    .sort-select {
        width: 100%;
        min-width: auto;
        font-size: 0.9rem;
        padding: 8px 32px 8px 12px;
    }

    .kotei-tag-row .category-tags {
        min-width: 0;
        max-width: calc(100vw - 40px);
    }

    /* モバイルでは最後のカテゴリも左寄せ（右寄せだと画面外にはみ出す） */
    .kotei-category:last-child .category-tags {
        left: 0;
        right: auto;
    }

    /* 除外フィルタ（レスポンシブ）: 1行に収める */
    .exclude-row {
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: center !important;
        gap: 6px 10px;
    }

    .exclude-row .filter-label {
        flex-shrink: 0;
        font-size: 0.7rem;
    }

    .exclude-filter-label {
        flex: 0 0 auto;
        padding: 3px 8px;
    }

    .exclude-filter-text {
        font-size: 0.75rem;
    }

    .exclude-filter-checkbox {
        width: 14px;
        height: 14px;
    }

    /* ページネーション モバイル最適化 */
    .pagination-container {
        margin: 16px 0;
    }

    .pagination-info {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .pagination-nav {
        gap: 4px;
    }

    .pagination-prev,
    .pagination-next {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .pagination-number {
        min-width: 28px;
        height: 28px;
        padding: 0 4px;
        font-size: 0.75rem;
    }

    .pagination-numbers {
        gap: 2px;
    }

    /* モバイルでは6番目以降を非表示（最後の3つ: ...・末尾2ページは除く） */
    .pagination-numbers > *:nth-child(n+6):not(:nth-last-child(-n+3)) {
        display: none;
    }
}

/* ===========================================
   Phase C: コンパクトな切り替えリンク (後方互換)
   =========================================== */
.switch-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 10px 16px;
    margin: 8px 0 16px 0;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.switch-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.switch-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.switch-btn {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    color: var(--color-primary-700, #334e68);
    border: 1px solid var(--color-primary-300, #90cdf4);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.switch-btn:hover {
    background: var(--color-primary-700, #334e68);
    color: white;
    border-color: var(--color-primary-700, #334e68);
}

@media (max-width: 768px) {
    .switch-links {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }

    .switch-group {
        width: 100%;
    }

    .switch-btn {
        padding: 6px 12px;
    }
}

/* ===========================================
   管理用スタイル
   PlayerListPane.inc.tplから移動（2026-02-02）
   =========================================== */

/* 重複選手ID表示 */
.duplicate-player-id {
    color: red;
    font-weight: bold;
    margin: 0 10px;
}

/* ===========================================
   カスタムドロップダウン（モバイル対応）
   =========================================== */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    background: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-dropdown-trigger:hover {
    border-color: var(--color-primary-500, #627d98);
}

.custom-dropdown-trigger:focus {
    outline: none;
    border-color: var(--color-primary-600, #486581);
    box-shadow: 0 0 0 3px rgba(72, 101, 129, 0.15);
}

.custom-dropdown-value {
    flex: 1;
    color: #333;
}

.custom-dropdown-arrow {
    font-size: 0.7rem;
    color: #6b7280;
    margin-left: 8px;
    transition: transform 0.2s;
}

.custom-dropdown.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.custom-dropdown.open .custom-dropdown-menu {
    display: block;
}

.custom-dropdown-item {
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.15s;
}

.custom-dropdown-item:hover {
    background-color: #f3f4f6;
}

.custom-dropdown-item.active {
    background-color: var(--color-primary-100, #d9e2ec);
    color: var(--color-primary-800, #243b53);
    font-weight: 500;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .custom-dropdown-trigger {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .custom-dropdown-item {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}
