/* ===========================================
   선수 비교 팝업 (player_compare.js)
   - 모바일 먼저: 아래에서 올라오는 시트(화면 거의 가득), 넓은 화면에서는 가운데 창
   - 색은 사이트 변수(--bg-card, --text-primary …)를 따라가서 라이트/다크 자동 적용
   =========================================== */
.fcc-ov { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; animation: fccIn .18s ease-out; }
@keyframes fccIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fccUp { from { transform: translateY(24px); } to { transform: none; } }
.fcc-box { width: 100%; max-width: 680px; height: 94vh; height: 94dvh; background: var(--bg-primary); color: var(--text-primary); border-radius: 20px 20px 0 0; border: 1px solid var(--border-color); border-bottom: 0; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); animation: fccUp .22s ease-out; }
.fcc-box, .fcc-box * { box-sizing: border-box; }
.fcc-box button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fcc-top { flex: none; height: 50px; display: flex; align-items: center; justify-content: center; position: relative; background: var(--bg-card); border-bottom: 1px solid var(--border-color); font-size: 1rem; font-weight: 900; }
.fcc-x { position: absolute; right: 8px; top: 7px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; font-size: 1.05rem; color: var(--text-secondary); }
.fcc-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }

/* 두 선수 칸 */
.fcc-hd { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 4px; align-items: start; }
.fcc-vs { padding-top: 38px; text-align: center; font-weight: 900; font-size: .8rem; color: var(--text-muted); }
.fcc-slot { min-width: 0; background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: 16px; padding: 8px; }
.fcc-slot.on { border-color: var(--primary-green); }
.fcc-slot.empty { width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-style: dashed; background: transparent; color: var(--text-secondary); font-weight: 800; font-size: .86rem; }
.fcc-slot.empty i { font-style: normal; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-card); border: 1.5px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--primary-green); }
.fcc-slot.empty.on { color: var(--primary-green); }
.fcc-load { min-height: 150px; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--text-muted); }
.fcc-who { width: 100%; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.fcc-face { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: radial-gradient(100% 100% at 50% 20%, #2a4a86 0, #0f192b 85%); border: 1px solid var(--border-color); display: block; }
.fcc-fi { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.fcc-nm { max-width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: .86rem; margin-top: 2px; }
.fcc-nm b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.fcc-se { height: 15px; width: auto; flex: none; }

.fcc-who .fcc-on { font-size: 1.9rem; font-weight: 900; color: var(--hc); line-height: 1.05; font-variant-numeric: tabular-nums; }
.fcc-pp { font-size: .7rem; font-weight: 700; color: var(--text-secondary); }
.fcc-pay { font-size: .66rem; color: var(--text-muted); font-weight: 700; }
.fcc-sel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 4px; margin-top: 8px; }
.fcc-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fcc-c > small { font-size: .62rem; font-weight: 800; color: var(--text-muted); text-align: center; line-height: 1; white-space: nowrap; }
.fcc-sel select.wide { grid-column: 1 / -1; }
.fcc-sel select { width: 100%; min-width: 0; height: 38px; border-radius: 10px; border: 1.5px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); font-weight: 800; font-size: .74rem; padding: 0 2px 0 6px; font-family: inherit; }

/* 적응도 · 클래스 요약 · 우세 수 */
.fcc-tgl { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: .76rem; font-weight: 800; color: var(--text-secondary); }
.fcc-tgl button { min-width: 44px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--border-color); background: var(--bg-secondary); font-weight: 900; font-size: .8rem; }
.fcc-tgl button.on { background: var(--primary-green); border-color: var(--primary-green); color: #fff; }
.fcc-cls { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.fcc-cls > div { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 5px 0; text-align: center; }
.fcc-cls small { display: block; font-size: .62rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcc-cls b { display: block; font-size: .9rem; font-weight: 900; line-height: 1.25; color: var(--hc); font-variant-numeric: tabular-nums; }
.fcc-sum { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 2px; }
.fcc-sum b { font-size: 1.5rem; font-weight: 900; color: var(--text-muted); min-width: 28px; text-align: center; }
.fcc-sum b.win { color: var(--primary-green); }
.fcc-sum span { font-size: .78rem; font-weight: 800; color: var(--text-secondary); padding: 3px 12px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border-color); }

/* 능력치 표 */
.fcc-gp { font-size: .74rem; font-weight: 800; color: var(--text-secondary); margin: 14px 2px 2px; }
.fcc-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); align-items: center; padding: 7px 2px; border-top: 1px solid var(--border-color); min-height: 40px; }
.fcc-gp + .fcc-row { border-top: 0; }
.fcc-k { text-align: center; font-size: .76rem; font-weight: 700; color: var(--text-secondary); line-height: 1.2; }
.fcc-v { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.08rem; color: var(--hc); font-variant-numeric: tabular-nums; }
.fcc-v.l { justify-content: flex-end; }
.fcc-v.r { justify-content: flex-start; }
.fcc-v.dim { font-weight: 700; opacity: .6; }
.fcc-v i { font-style: normal; font-size: .64rem; font-weight: 900; padding: 1px 6px; border-radius: 999px; background: rgba(52, 206, 87, .15); color: var(--primary-green); }

/* 선수 고르기 */
.fcc-pick { margin-top: 12px; }
.fcc-sch { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 14px; border-radius: 14px; border: 1.5px solid var(--primary-green); background: var(--bg-card); }
.fcc-sch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text-primary); font-size: 16px; font-family: inherit; }
.fcc-qx { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: .9rem; }
.fcc-qx[hidden] { display: none; }
.fcc-list { margin-top: 6px; }
.fcc-h4 { margin: 12px 4px 2px; font-size: .74rem; font-weight: 800; color: var(--text-secondary); }
.fcc-it { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 7px 6px; border: 0; border-top: 1px solid var(--border-color); background: transparent; text-align: left; font-size: .88rem; }
.fcc-h4 + .fcc-it { border-top: 0; }
.fcc-it:active { background: var(--bg-card); }
.fcc-it b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.fcc-it small { color: var(--text-secondary); font-size: .7rem; font-weight: 700; flex: none; }
.fcc-it em { font-style: normal; font-weight: 900; color: var(--primary-green); min-width: 30px; text-align: right; flex: none; font-size: 1rem; }
.fcc-av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; background: radial-gradient(100% 100% at 50% 20%, #2a4a86 0, #0f192b 85%); border: 1px solid var(--border-color); flex: none; }
.fcc-empty { padding: 22px 0; text-align: center; font-size: .8rem; color: var(--text-muted); }

/* 능력치 색 (사이트 공통: 170·160·150·140·130·120·110·100·80) */
.fcc-h9 { --hc: #00c957; } .fcc-h8 { --hc: #0fb59a; } .fcc-h7 { --hc: #f29100; } .fcc-h6 { --hc: #b88c00; } .fcc-h5 { --hc: #dc0000; }
.fcc-h4 { --hc: #cf13c0; } .fcc-h3 { --hc: #a82fe6; } .fcc-h2 { --hc: #6e3bff; } .fcc-h1 { --hc: #175dde; } .fcc-h0 { --hc: #4a5a68; }
:root[data-theme="dark"] .fcc-h9 { --hc: #04f669; } :root[data-theme="dark"] .fcc-h8 { --hc: #11caaa; }
:root[data-theme="dark"] .fcc-h7 { --hc: #ffa800; } :root[data-theme="dark"] .fcc-h6 { --hc: #d9a900; }
:root[data-theme="dark"] .fcc-h5 { --hc: #ff4d4d; } :root[data-theme="dark"] .fcc-h4 { --hc: #ee4fe0; }
:root[data-theme="dark"] .fcc-h3 { --hc: #c77dff; } :root[data-theme="dark"] .fcc-h2 { --hc: #8f7bff; }
:root[data-theme="dark"] .fcc-h1 { --hc: #4d8dff; } :root[data-theme="dark"] .fcc-h0 { --hc: #8b98a5; }
.fcc-cls b.dim { opacity: .6; font-weight: 700; }

/* 스크롤해도 두 선수가 보이는 얇은 줄 */
.fcc-mini { position: sticky; top: -12px; z-index: 5; margin: 10px -12px 0; padding: 7px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 4px; background: var(--bg-primary); border-bottom: 1px solid var(--border-color); font-size: .78rem; font-weight: 900; }
.fcc-mini span { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.fcc-mini b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcc-mini em { font-style: normal; color: var(--hc); }
.fcc-mini i { font-style: normal; text-align: center; color: var(--text-muted); font-size: .7rem; }

/* 넓은 화면: 가운데 창 */
@media (min-width: 700px) {
    .fcc-ov { align-items: center; padding: 20px; }
    .fcc-box { height: auto; max-height: 90vh; min-height: 560px; border-radius: 20px; border-bottom: 1px solid var(--border-color); }
    .fcc-face { width: 76px; height: 76px; }
    .fcc-slot { padding: 12px; }
    .fcc-row { grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); }
    .fcc-sel select { font-size: .8rem; }
}
@media (max-width: 359px) {
    .fcc-body { padding-left: 8px; padding-right: 8px; }
    .fcc-mini { margin-left: -8px; margin-right: -8px; padding-left: 8px; padding-right: 8px; }
    .fcc-sel select { font-size: .68rem; }
}

/* 시세 */
.fcc-px { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 2px; font-size: .78rem; font-weight: 900; color: var(--text-primary); }
.fcc-px em { font-style: normal; }
.fcc-bp { font-style: normal; width: 15px; height: 15px; border-radius: 50%; background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; font-size: .55rem; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fcc-v.px { flex-direction: column; align-items: flex-end; gap: 0; font-size: .9rem; }
.fcc-v.px.r { align-items: flex-start; }
.fcc-v.px b { font-weight: 900; color: var(--text-primary); }
.fcc-v.px small { font-size: .66rem; font-weight: 800; }
.fcc-v small.up, .fcc-px .up { color: #ef4444; }
.fcc-v small.dn, .fcc-px .dn { color: #3b82f6; }
.fcc-v small.fl, .fl { color: var(--text-muted); }

.fcc-seg { display: flex; align-items: center; justify-content: center; gap: 2px; height: 38px; padding: 0 3px; border-radius: 10px; border: 1.5px solid var(--border-color); background: var(--bg-secondary); }
.fcc-seg button { flex: 1 1 0; min-width: 0; max-width: 34px; height: 28px; border-radius: 8px; border: 0; background: transparent; font-weight: 900; font-size: .88rem; color: var(--text-secondary); padding: 0; }
.fcc-seg button.on { background: var(--primary-green); color: #fff; }
.fcc-sel select { text-align: center; text-align-last: center; padding: 0 !important; background-image: none; -webkit-appearance: none; appearance: none; }

/* 시세 7일·31일 변동 */
.fcc-px { flex-wrap: wrap; row-gap: 1px; }
.fcc-pds { display: inline-flex; gap: 6px; font-weight: 800; }
.fcc-pd { display: inline-flex; gap: 2px; align-items: baseline; font-size: .64rem; }
.fcc-pd i { font-style: normal; color: var(--text-muted); }
.fcc-pd small { font-size: .64rem; font-weight: 800; }
.fcc-pd small.up { color: #ef4444; } .fcc-pd small.dn { color: #3b82f6; } .fcc-pd small.fl { color: var(--text-muted); }

/* 특성 */
.fcc-trs { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; }
.fcc-tr.gold { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; padding: 2px 8px 2px 3px; border-radius: 99px; border: 1px solid #d9a21b; background: rgba(217, 162, 27, .12); color: #d9a21b; font-size: .66rem; font-weight: 800; line-height: 1.2; }
.fcc-tr img { width: 16px; height: 16px; flex: none; }
.fcc-ti { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.fcc-tn { width: 24px; height: 24px; border-radius: 7px; background: var(--bg-secondary); border: 1px solid var(--border-color); display: inline-flex; align-items: center; justify-content: center; }
.fcc-tn img { width: 16px; height: 16px; }
