/* ===== SA 전적검색 채널 셸(자체완결 그리드) ===== */
.sa-pf-shell { --sa-accent:#e8242a; --sa-accent2:#c81f24; --sa-accent-rgb:232,36,42; }
.sa-news-wrap, .sa-pf-body { width:100%; }
.ghp__wrap { display:block; }
.ghp__main { min-width:0; }

.sa-card { background:var(--surface,#fff); border:1px solid var(--border,#e5e7eb); border-radius:14px; padding:16px; }
.sa-card__h { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.sa-card__h h2 { font-size:15px; font-weight:600; margin:0; }
.sa-card__h h2 b { color:var(--sa-accent); }
.sa-soon-badge { font-size:11px; color:#9aa0a6; background:rgba(0,0,0,.04); border-radius:20px; padding:2px 9px; }
.sa-side-empty { text-align:center; color:#9aa0a6; font-size:13px; padding:22px 8px; }
.sa-side-search { display:flex; gap:8px; }
.sa-side-search__input { flex:1; height:40px; border:1.5px solid var(--border,#dde1e8); border-radius:10px; padding:0 12px; font-size:14px; background:var(--surface,#fff); }
.sa-side-search__input:focus { border-color:var(--sa-accent); outline:none; }
.sa-side-search__btn { flex:0 0 auto; height:40px; padding:0 16px; border:0; border-radius:10px; background:var(--sa-accent); color:#fff; font-weight:600; cursor:pointer; }
.sa-side-links { display:flex; flex-direction:column; gap:8px; }
.sa-side-link { display:flex; align-items:center; justify-content:space-between; font-size:13.5px; color:var(--text,#333); text-decoration:none; padding:9px 12px; border:1px solid var(--border,#eef0f3); border-radius:10px; }
.sa-side-link:hover { border-color:var(--sa-accent); color:var(--sa-accent); }
.sa-pf-apinote { text-align:center; font-size:12px; color:#aab; margin:26px 0 0; }

/* ===== SA 전적검색 ===== */

/* 검색 전: 큰 검색창 */
.sa-pf-search-zone {
    padding: 48px 0 36px;
    text-align: center;
    margin-bottom: 24px;
}
.sa-pf-search-title { font-size: 22px; font-weight: 700; color: #111; margin: 0 0 6px; }
.sa-pf-search-sub   { font-size: 14px; color: #888; margin: 0 0 22px; }
.sa-pf-sform { display: flex; justify-content: center; }
.sa-pf-sbox {
    display: flex; align-items: center;
    width: 100%; max-width: 560px;
    background: #fff; border: 1.5px solid #dde1e8;
    border-radius: 10px; overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.sa-pf-sbox:focus-within { border-color: var(--sa-accent); box-shadow: 0 0 0 3px rgba(var(--sa-accent-rgb),.12); }
.sa-pf-sinput {
    flex: 1; border: none; background: transparent;
    padding: 14px 18px; font-size: 16px; color: #111; outline: none;
}
.sa-pf-sinput::placeholder { color: #bbb; }
.sa-pf-sbtn {
    flex-shrink: 0; border: none; background: var(--sa-accent);
    width: 54px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer; transition: background .15s;
}
.sa-pf-sbtn:hover { background: var(--sa-accent2); }

/* 검색 후: 컴팩트 헤더 */
/* 페이지 헤더 */
.sapf-pg-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 8px;
    border-bottom: 1px solid #eef0f4;
    margin-bottom: 0;
    gap: 16px;
}
.sapf-pg-title {
    font-size: 20px; font-weight: 800; color: #111;
    margin: 0; white-space: nowrap; letter-spacing: -.02em;
}
.sapf-pg-form { display: flex; }
.sapf-pg-sbox {
    display: flex; align-items: center;
    background: #fff;
    border: 1.5px solid #dde1e8;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.sapf-pg-sbox:focus-within { border-color: var(--sa-accent); box-shadow: 0 0 0 3px rgba(var(--sa-accent-rgb),.10); }
.sapf-pg-sinput {
    border: none; background: transparent;
    padding: 9px 14px; font-size: 14px; color: #111; outline: none;
    width: 180px;
}
.sapf-pg-sinput::placeholder { color: #bbb; }
.sapf-pg-sbtn {
    flex-shrink: 0; border: none; background: var(--sa-accent);
    width: 40px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer; transition: background .15s;
}
.sapf-pg-sbtn:hover { background: var(--sa-accent2); }

/* 빈 상태 */
.sa-pf-empty {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 60px 20px;
    color: #aaa; font-size: 15px; text-align: center;
}
.sa-pf-empty__ic { font-size: 40px; }
.sa-pf-empty p { margin: 0; line-height: 1.7; color: #999; }

/* 로딩 */
.sa-pf-loading {
    display: flex; align-items: center; gap: 10px;
    padding: 48px 20px; color: #aaa; font-size: 14px;
    justify-content: center;
}
.sa-pf-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid #eee; border-top-color: var(--sa-accent); border-radius: 50%;
    animation: sa-spin .7s linear infinite;
}
@keyframes sa-spin { to { transform: rotate(360deg); } }


/* ===== 프로필 페이지 (sapf) ===== */
.sapf { display: flex; flex-direction: column; gap: 16px; }

/* 히어로 */
.sapf__hero {
    position: relative;
    display: flex; align-items: center; gap: 24px;
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    padding: 28px 28px;
}
.sapf__corner { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sapf__corner-top { display: flex; align-items: center; gap: 8px; }
.sapf__updated { font-size: 11px; color: #aaa; white-space: nowrap; }
.sapf__refresh {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fff; border: 1px solid #dde1e8; border-radius: 8px;
    padding: 6px 11px; font-size: 13px; font-weight: 600; color: #555;
    cursor: pointer; transition: all .15s;
}
.sapf__refresh:hover { border-color: var(--sa-accent); color: var(--sa-accent); }
.sapf__refresh.is-spin svg { animation: sa-spin .7s linear infinite; }
.sapf__views { font-size: 12px; color: #888; white-space: nowrap; }
.sapf__views b { color: var(--sa-accent); font-weight: 800; }
.sapf__grade-img-wrap {
    flex-shrink: 0;
    width: 96px; height: 96px;
    background: #f4f5f8;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.sapf__grade-img { width: 96px; height: 96px; object-fit: contain; }
.sapf__grade-img--empty { width: 96px; height: 96px; background: #eee; }

.sapf__hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* 닉네임 행 */
.sapf__nick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sapf__nick { font-size: 28px; font-weight: 800; color: #111; line-height: 1; }

.sapf__title-badge {
    padding: 3px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
    background: #f5f0ff; color: #7c3aed; border: 1px solid #ede9fe;
}
.sapf__manner-badge {
    padding: 3px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
    background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0;
}
.sapf__manner-badge--보통 { background: #f9fafb; color: #6b7280; border-color: #e5e7eb; }
.sapf__manner-badge--좋음 { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.sapf__manner-badge--매우좋음 { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.sapf__manner-badge--나쁨  { background: #fff7ed; color: #ea580c; border-color: #fed7aa; }

/* 칭호/매너 설명 툴팁 (hover / 모바일 탭=.is-tip) */
.sapf-tip { position: relative; cursor: help; }
.sapf-tip[data-tip]:hover::after, .sapf-tip.is-tip::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%);
    background: #1a1a2e; color: #fff; font-size: 11px; font-weight: 600;
    padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 30;
    box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none;
}
.sapf-tip[data-tip]:hover::before, .sapf-tip.is-tip::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1a1a2e; z-index: 30; pointer-events: none;
}

/* 계정 생성일·클랜 */
.sapf__meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sapf__meta-item { font-size: 13px; color: #888; }

/* 계급 뱃지 */
.sapf__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sapf__badge {
    display: inline-block; padding: 4px 12px;
    border-radius: 100px; font-size: 12px; font-weight: 600; line-height: 1.6;
}
.sapf__badge--grade  { background: #1a1a2e; color: #fff; }
.sapf__badge--season { background: var(--sa-accent); color: #fff; }

/* 탭 */
.sapf__tabs {
    display: flex; gap: 0;
    border-bottom: 2px solid #e3e6ec;
    margin-bottom: 20px;
}
.sapf__tab {
    border: none; background: none; cursor: pointer;
    padding: 12px 20px;
    font-size: 14px; font-weight: 600; color: #999;
    position: relative; transition: color .15s;
    text-decoration: none; display: inline-block;
}
.sapf__tab::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
    background: var(--sa-accent); transform: scaleX(0); transition: transform .2s;
}
.sapf__tab.is-active { color: var(--sa-accent); }
.sapf__tab.is-active::after { transform: scaleX(1); }
.sapf__tab:hover:not(.is-active) { color: #555; }

.sapf__panel { display: flex; flex-direction: column; gap: 16px; }
.sapf__panel.sapf__panel--hidden { display: none; }

/* 최근 동향 강조 블록 */
.sapf__recent-info {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    overflow: hidden;
}
.sapf__ri-main {
    display: grid; grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #f0f2f5;
}
.sapf__ri-sub {
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: #fafbfc;
}
.sapf__ri-item {
    display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
    padding: 20px 24px;
    border-right: 1px solid #f0f2f5;
}
.sapf__ri-item:last-child { border-right: none; }
.sapf__ri-lbl { font-size: 11px; color: #aaa; font-weight: 500; letter-spacing: .03em; }
.sapf__ri-val { font-size: 26px; font-weight: 900; color: #111; line-height: 1; }
.sapf__ri-val--sm { font-size: 18px; font-weight: 800; color: #333; }
.sapf__ri-item--big .sapf__ri-lbl { font-size: 12px; }

/* 계급 그룹 */
.sapf__rank-group {
    background: #fff;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    overflow: hidden;
}
.sapf__rank-group-title {
    padding: 12px 20px 10px;
    font-size: 11px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid #f0f2f5;
}
.sapf__stats {
    display: grid;
    gap: 0;
}
.sapf__stats--3 { grid-template-columns: repeat(3, 1fr); }
.sapf__stat {
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 4px;
    align-items: flex-start;
    border-right: 1px solid #f0f2f5;
}
.sapf__stat:last-child { border-right: none; }
.sapf__stat-lbl { font-size: 11px; color: #aaa; font-weight: 500; letter-spacing: .03em; }
.sapf__stat-val { font-size: 20px; font-weight: 800; color: #111; line-height: 1.2; }
.sapf__stat-val--grade { display: flex; align-items: center; gap: 8px; }
.sapf__grade-ic { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.sapf__grade-ic--round { border-radius: 6px; }

/* 티어 행 */
.sapf__tier-row {
    display: grid; grid-template-columns: 1fr 1fr;
    border-top: none;
}
.sapf__tier-item {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px;
    border-right: 1px solid #f0f2f5;
}
.sapf__tier-item:last-child { border-right: none; }
.sapf__tier-img       { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; }
.sapf__tier-img-empty { width: 56px; height: 56px; background: #f4f5f8; border-radius: 8px; flex-shrink: 0; }
.sapf__tier-lbl   { font-size: 11px; color: #aaa; margin-bottom: 3px; }
.sapf__tier-val   { font-size: 18px; font-weight: 800; color: #111; line-height: 1.2; }
.sapf__tier-score { font-size: 12px; color: var(--sa-accent); font-weight: 600; margin-top: 2px; }

/* 최근 전적 */
.sapf__section-title {
    font-size: 12px; font-weight: 700; color: #999;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 4px 2px;
}
.sapf__matches { display: flex; flex-direction: column; gap: 6px; }
.sapf__match {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
}
.sapf__match.is-win  { background: #f0fdf4; border: 1px solid #bbf7d0; }
.sapf__match.is-lose { background: #fff5f5; border: 1px solid #fecaca; }
.sapf__mres  { font-weight: 800; width: 22px; text-align: center; font-size: 14px; }
.is-win  .sapf__mres { color: #16a34a; }
.is-lose .sapf__mres { color: #dc2626; }
.sapf__mtype { flex: 1; color: #333; }
.sapf__mkd   { color: #777; font-size: 12px; min-width: 80px; text-align: right; }
.sapf__mdate { color: #bbb; font-size: 11px; min-width: 70px; text-align: right; }

/* 팀운 리포트 */
.sam__luck { border:1px solid #e3e6ec; border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.sam__luck.is-good    { background:#f0f7ff; border-color:#bfdbfe; }
.sam__luck.is-bad     { background:#fff5f3; border-color:#fecaca; }
.sam__luck.is-neutral { background:#f9fafb; border-color:#e5e7eb; }
.sam__luck-head { display:flex; align-items:center; gap:8px; }
.sam__luck-emoji { font-size:20px; }
.sam__luck-title { font-size:15px; font-weight:800; color:#111; }
.sam__luck-desc { font-size:13px; color:#555; margin:6px 0 10px; line-height:1.5; }
.sam__luck-twist { font-size:12.5px; font-weight:700; line-height:1.5; padding:9px 12px; border-radius:8px; margin-bottom:12px; }
.sam__luck-twist b { font-weight:800; }
.sam__luck-twist--good { background:#ecfdf5; color:#059669; border:1px solid #a7f3d0; }
.sam__luck-twist--bad  { background:#fef2f2; color:#dc2626; border:1px solid #fecaca; }
/* 팀 vs 팀 비교 */
.sam__vs { display:flex; flex-direction:column; gap:8px; }
.sam__vs-row { display:flex; align-items:center; gap:10px; }
.sam__vs-our, .sam__vs-enemy { width:70px; flex-shrink:0; font-size:13px; font-weight:700; color:#94a3b8; }
.sam__vs-our { text-align:right; }
.sam__vs-enemy { text-align:left; }
.sam__vs-our.sam__vs-w { color:#2563eb; font-weight:800; }
.sam__vs-enemy.sam__vs-w { color:#ef4444; font-weight:800; }
.sam__vs-mid { flex:1; position:relative; display:flex; flex-direction:column; align-items:center; gap:3px; }
.sam__vs-lbl { font-size:10px; color:#aaa; font-weight:600; }
.sam__vs-bar { display:flex; width:100%; height:9px; background:#fecaca; border-radius:100px; overflow:hidden; }
.sam__vs-me { height:100%; background:#1d4ed8; }
.sam__vs-mate { height:100%; background:#93c5fd; }
.sam__vs-mine { display:block; font-size:10px; font-weight:600; color:#1d4ed8; }
.sam__vs-legend { display:flex; align-items:center; gap:5px; justify-content:center; font-size:11px; color:#888; margin-bottom:8px; }
.sam__lg { display:inline-block; width:10px; height:10px; border-radius:3px; margin-left:8px; }
.sam__lg:first-child { margin-left:0; }
.sam__lg--me { background:#1d4ed8; }
.sam__lg--mate { background:#93c5fd; }
.sam__lg--enemy { background:#f87171; }

/* ===== 매치데이터 (sam) ===== */
.sam__cats { display: flex; gap: 4px; border-bottom: 2px solid #e3e6ec; margin-bottom: 14px; }
.sam__cat {
    border: none; background: none; cursor: pointer;
    padding: 10px 18px; font-size: 14px; font-weight: 700; color: #999;
    position: relative; transition: color .15s;
}
.sam__cat::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
    background: var(--sa-accent); transform: scaleX(0); transition: transform .2s;
}
.sam__cat.is-active { color: var(--sa-accent); }
.sam__cat.is-active::after { transform: scaleX(1); }
.sam__cat:hover:not(.is-active) { color: #555; }

.sam__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sam__chip {
    border: 1px solid #dde1e8; background: #fff; cursor: pointer;
    padding: 7px 16px; border-radius: 100px;
    font-size: 13px; font-weight: 600; color: #777;
    transition: all .15s;
}
.sam__chip:hover { border-color: var(--sa-accent2); color: var(--sa-accent2); }
.sam__chip.is-active { background: var(--sa-accent); border-color: var(--sa-accent); color: #fff; }

.sam__list { display: flex; flex-direction: column; gap: 8px; }
.sam__row {
    display: flex; align-items: center; gap: 16px;
    padding: 14px 18px; cursor: pointer;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 12px;
    border-left-width: 4px;
    transition: box-shadow .15s, border-color .15s;
}
.sam__row:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.sam__row.is-win  { border-left-color: #2563eb; }
.sam__row.is-lose { border-left-color: #dc2626; }
.sam__row.is-draw { border-left-color: #9ca3af; }
.sam__row.is-none { border-left-color: #e3e6ec; }
.sam__res {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 800; color: #fff;
}
.is-win  .sam__res { background: #2563eb; }
.is-lose .sam__res { background: #dc2626; }
.is-draw .sam__res { background: #9ca3af; }
.is-none .sam__res { background: #cbd5e1; }
.sam__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sam__mode { font-size: 14px; font-weight: 700; color: #111; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sam__type { font-size: 11px; font-weight: 500; color: #999; background: #f1f3f6; padding: 2px 8px; border-radius: 100px; }
.sam__kda  { font-size: 14px; font-weight: 700; color: #333; min-width: 84px; text-align: center; flex-shrink: 0; }
.sam__date { font-size: 11px; color: #b0b0b0; }
.sam__toggle { flex-shrink: 0; color: #ccc; font-size: 12px; width: 14px; text-align: center; }

.sam__detail { padding: 4px 0 12px; }
.sam__detail--hidden { display: none; }
.sam__dmap { font-size: 13px; color: #666; padding: 8px 4px 12px; font-weight: 600; }

/* 본인 매치 분석 카드 */
.sam__mc {
    background: linear-gradient(135deg, #fbfcfe 0%, #f4f6fb 100%);
    border: 1px solid #e3e6ec;
    border-radius: 12px; padding: 16px 18px; margin-bottom: 16px;
}
.sam__mc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sam__mc-label { font-size: 12px; font-weight: 700; color: #888; letter-spacing: -.01em; }
.sam__mc-res {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff;
}
.sam__mc-res--win  { background: #2563eb; }
.sam__mc-res--lose { background: #dc2626; }
.sam__mc-res--draw { background: #9ca3af; }
.sam__mc-res--rank { width: auto; padding: 0 12px; background: #6366f1; }
.sam__mc-nick { font-size: 17px; font-weight: 800; color: #111; }
.sam__mc-kda { margin-left: auto; font-size: 15px; color: #333; font-weight: 700; }
.sam__mc-kda b { color: #111; }
.sam__mc-kda em { font-style: normal; margin-left: 8px; font-size: 12px; color: #888; font-weight: 600; }

.sam__mc-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.sam__mc-m {
    background: #fff; border: 1px solid #eef0f4; border-radius: 9px;
    padding: 10px 8px; text-align: center;
    display: flex; flex-direction: column; gap: 3px;
}
.sam__mc-m--top { border-color: #fcd34d; background: #fffbeb; }
.sam__mc-l { font-size: 11px; color: #999; font-weight: 600; }
.sam__mc-v { font-size: 18px; font-weight: 800; color: #111; line-height: 1.1; }
.sam__mc-m--top .sam__mc-v { color: #d97706; }
.sam__mc-r { display: flex; flex-direction: column; gap: 3px; align-items: center; margin-top: 2px; }
.sam__mc-badge {
    font-size: 10px; font-weight: 700; line-height: 1;
    padding: 3px 7px; border-radius: 5px;
    background: #eef1f5; color: #64748b; white-space: nowrap;
}
.sam__mc-badge.is-top { background: #fef3c7; color: #d97706; }
.sam__mc-badge--none { background: transparent; color: #cbd5e1; padding: 3px 0; }

.sam__mc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sam__mc-tag { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 100px; }
.sam__mc-tag.is-good    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.sam__mc-tag.is-bad     { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.sam__mc-tag.is-neutral { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.sam__team { margin-bottom: 14px; }
.sam__team-h { font-size: 12px; font-weight: 700; color: #888; padding: 6px 4px; }
.sam__team-win { color: #2563eb; margin-left: 4px; }
.sam__me td { background: #fff8f0; }
.sam__me .sam__pn { color: var(--sa-accent); }
/* overflow:hidden 제거 — 계급 툴팁이 테이블 밖으로 표시되도록 (모서리 둥글림은 셀 radius로) */
.sam__tbl { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; background: #fff; border: 1px solid #eef0f4; border-radius: 8px; }
.sam__tbl th:first-child { border-top-left-radius: 8px; }
.sam__tbl th:last-child  { border-top-right-radius: 8px; }
.sam__tbl tr:last-child td:first-child { border-bottom-left-radius: 8px; }
.sam__tbl tr:last-child td:last-child  { border-bottom-right-radius: 8px; }
/* 양팀 표 컬럼 너비 고정 — 닉네임(가변) + K/D/A/HS/DMG(고정) */
.sam__tbl th:nth-child(1), .sam__tbl td:nth-child(1) { width: auto; }
.sam__tbl th:nth-child(2), .sam__tbl td:nth-child(2),
.sam__tbl th:nth-child(3), .sam__tbl td:nth-child(3),
.sam__tbl th:nth-child(4), .sam__tbl td:nth-child(4),
.sam__tbl th:nth-child(5), .sam__tbl td:nth-child(5) { width: 52px; }
.sam__tbl th:nth-child(6), .sam__tbl td:nth-child(6) { width: 88px; }
.sam__tbl th { background: #fafbfc; color: #999; font-weight: 600; font-size: 11px; padding: 8px 10px; text-align: center; border-bottom: 1px solid #eef0f4; }
.sam__tbl th:first-child { text-align: left; }
.sam__tbl td { padding: 9px 10px; text-align: center; border-bottom: 1px solid #f4f5f8; color: #333; }
.sam__tbl tr:last-child td { border-bottom: none; }
.sam__hi { color: var(--sa-accent) !important; font-weight: 800 !important; white-space: nowrap; }
.sam__pn { text-align: left !important; font-weight: 600; color: #111; }
.sam__pn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sam__plink { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sam__pc { flex-shrink: 0; }
.sam__pgrades { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.sam__pgrade { position: relative; flex-shrink: 0; display: inline-flex; cursor: help; }
.sam__pgrade-img { width: 24px; height: 24px; object-fit: contain; }
.sam__pgrade-img--main { border-radius: 5px; }
/* 계급 호버 레이어 툴팁 */
.sam__pgrade[data-tip]:hover::after, .sam__pdis[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; left: 0; bottom: calc(100% + 6px);
    background: #1a1a2e; color: #fff; font-size: 11px; font-weight: 600;
    padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 20;
    pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.sam__pgrade[data-tip]:hover::before, .sam__pdis[data-tip]:hover::before {
    content: ''; position: absolute; left: 8px; bottom: calc(100% + 1px);
    border: 5px solid transparent; border-top-color: #1a1a2e; z-index: 20; pointer-events: none;
}
.sam__pdis { position: relative; color: #9aa3af; font-weight: 600; cursor: help; }

/* 위장 유저 안내 배너 */
.sam__disguise { background:#f3f0ff; border:1px solid #e0d7ff; border-radius:10px; padding:10px 14px; margin-bottom:14px; font-size:13px; font-weight:600; color:#6d28d9; }
.sam__disg-count {
    position: relative; border:none; background:#6d28d9; color:#fff; cursor:pointer;
    padding:2px 9px; border-radius:100px; font-size:12px; font-weight:700; margin:0 2px;
}
.sam__disg-count[data-tip]:hover::after, .sam__disg-count.is-tip::after {
    content: attr(data-tip);
    position:absolute; left:50%; bottom:calc(100% + 7px); transform:translateX(-50%);
    background:#1a1a2e; color:#fff; font-size:11px; font-weight:600;
    padding:6px 10px; border-radius:6px; z-index:30; white-space:pre;
    text-align:center; line-height:1.6; box-shadow:0 2px 8px rgba(0,0,0,.25); pointer-events:none;
}
.sam__disg-count[data-tip]:hover::before, .sam__disg-count.is-tip::before {
    content:''; position:absolute; left:50%; bottom:calc(100% + 2px); transform:translateX(-50%);
    border:5px solid transparent; border-top-color:#1a1a2e; z-index:30; pointer-events:none;
}
.sam__ploading { display: inline-flex; align-items: center; gap: 6px; color: #bbb; font-size: 12px; font-weight: 400; }
.sa-pf-spinner--sm { width: 12px; height: 12px; border-width: 2px; }
.sam__plink { color: #111; font-weight: 600; text-decoration: none; }
.sam__plink:hover { color: var(--sa-accent); text-decoration: underline; }
.sam__pc { font-size: 11px; color: #aaa; font-weight: 400; }
.sam__me .sam__plink { color: var(--sa-accent); }
.sam__derr { padding: 16px; text-align: center; color: #aaa; font-size: 13px; }
/* 헤더 약어 설명 툴팁 (호버 / 모바일 탭=.is-tip) */
.sam__th { position: relative; cursor: help; }
.sam__th[data-tip]:hover::after, .sam__th.is-tip::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
    background: #1a1a2e; color: #fff; font-size: 11px; font-weight: 600;
    padding: 5px 9px; border-radius: 6px; white-space: nowrap; z-index: 30;
    pointer-events: none; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.sam__th[data-tip]:hover::before, .sam__th.is-tip::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 1px); transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1a1a2e; z-index: 30; pointer-events: none;
}
/* 마지막 열(DMG)은 화면 밖 방지 위해 오른쪽 정렬 */
.sam__th:last-child[data-tip]:hover::after, .sam__th:last-child.is-tip::after { left: auto; right: 0; transform: none; }
.sam__th:last-child[data-tip]:hover::before, .sam__th:last-child.is-tip::before { left: auto; right: 12px; transform: none; }
.sam__note { padding: 12px 14px; background: #f7f8fa; border-radius: 8px; color: #777; font-size: 13px; font-weight: 600; text-align: center; }
.sam__note-sub { color: #b0b0b0; font-weight: 400; font-size: 11px; }

.sam__more {
    margin-top: 14px; width: 100%; border: 1px solid #dde1e8; background: #fff;
    padding: 13px; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: #555; transition: background .15s;
}
.sam__more:hover:not(:disabled) { background: #f7f8fa; }
.sam__more:disabled { color: #bbb; cursor: default; }

/* ===== 메인 통계 바 ===== */
.sa-stats { display: flex; justify-content: center; gap: 0; background: #fff; border: 1px solid #e3e6ec; border-radius: 12px; padding: 14px 0; margin-bottom: 20px; }
.sa-stats__it { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border-right: 1px solid #f0f2f5; }
.sa-stats__it:last-child { border-right: none; }
.sa-stats__n { font-size: 22px; font-weight: 800; color: #111; line-height: 1; }
.sa-stats__it:last-child .sa-stats__n { color: var(--sa-accent); }
.sa-stats__l { font-size: 12px; color: #999; }

/* ===== 메인 가이드 ===== */
.sa-guide { margin-top: 28px; }
.sa-guide__head { text-align: center; margin-bottom: 20px; }
.sa-guide__head h2 { font-size: 20px; font-weight: 700; color: #444; margin: 0 0 6px; letter-spacing: -.02em; }
.sa-guide__head h2 b { color: var(--sa-accent); font-weight: 800; }
.sa-guide__head p { font-size: 13px; color: #999; margin: 0; }
.sa-guide__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sa-guide__card { display: flex; align-items: flex-start; gap: 12px; background: #fff; border: 1px solid #e3e6ec; border-radius: 12px; padding: 16px; transition: box-shadow .15s, transform .15s; }
.sa-guide__card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-2px); }
.sa-guide__ic { flex-shrink: 0; font-size: 24px; line-height: 1; }
.sa-guide__tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sa-guide__tx b { font-size: 14px; font-weight: 800; color: #111; }
.sa-guide__tx span { font-size: 12.5px; color: #888; line-height: 1.5; }

/* ===== 메인 리스트 (최근/인기 서든러) ===== */
.sal__wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sal__card { background: #fff; border: 1px solid #e3e6ec; border-radius: 14px; overflow: hidden; }
.sal__h { padding: 14px 18px; font-size: 15px; color: #444; border-bottom: 1px solid #f0f2f5; }
.sal__h b { color: #111; font-weight: 800; }
.sal__empty { padding: 40px 18px; text-align: center; color: #aaa; font-size: 13px; }
.sal__list { list-style: none; margin: 0; padding: 6px; }
.sal__row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: background .12s; }
.sal__row:hover { background: #f7f8fa; }
.sal__rank { flex-shrink: 0; width: 20px; text-align: center; font-size: 13px; font-weight: 800; color: #bbb; }
.sal__row:nth-child(1) .sal__rank { color: #f59e0b; }
.sal__row:nth-child(2) .sal__rank { color: #94a3b8; }
.sal__row:nth-child(3) .sal__rank { color: #d97706; }
.sal__grades { flex-shrink: 0; display: flex; gap: 2px; }
.sal__gimg { width: 22px; height: 22px; object-fit: contain; }
.sal__gimg--round { border-radius: 5px; }
.sal__nick { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: #111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal__clan { font-size: 11px; color: #aaa; font-weight: 400; margin-left: 6px; }
.sal__views { flex-shrink: 0; font-size: 11px; color: #999; }

/* ===== 기록 (sah) ===== */
.sah__chartbox { background:#fff; border:1px solid #e3e6ec; border-radius:14px; padding:16px 18px; margin-bottom:16px; }
.sah__chart-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.sah__ctab { border:1px solid #dde1e8; background:#fff; cursor:pointer; padding:6px 12px; border-radius:100px; font-size:12px; font-weight:600; color:#777; transition:all .15s; }
.sah__ctab:hover { border-color:var(--sa-accent2); color:var(--sa-accent2); }
.sah__ctab.is-active { background:var(--sa-accent); border-color:var(--sa-accent); color:#fff; }
.sah__chart { width:100%; }
.sah__svg { width:100%; height:auto; display:block; }
.sah__line { stroke:var(--sa-accent); stroke-width:2; }
.sah__dot { fill:#fff; stroke:var(--sa-accent); stroke-width:2; }
.sah__line { stroke-width:3; }
.sah__dot { stroke-width:3; }
.sah__vlbl { fill:#111; font-size:20px; font-weight:800; text-anchor:middle; }
.sah__xlbl { fill:#999; font-size:17px; text-anchor:middle; }
.sah__nochart { padding:40px; text-align:center; color:#aaa; font-size:13px; }
.sah__single { padding:32px 20px; text-align:center; }
.sah__single-v { font-size:40px; font-weight:900; color:var(--sa-accent); line-height:1; }
.sah__single-d { font-size:13px; color:#888; margin-top:10px; font-weight:600; }
.sah__single-note { font-size:12px; color:#aaa; margin-top:14px; }

.sah__tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid #e3e6ec; border-radius:12px; background:#fff; }
.sah__tbl { border-collapse:collapse; font-size:12px; white-space:nowrap; min-width:100%; }
.sah__tbl th { background:#fafbfc; color:#888; font-weight:700; font-size:11px; padding:10px 12px; text-align:center; border-bottom:1px solid #eef0f4; position:sticky; }
.sah__tbl td { padding:9px 12px; text-align:center; border-bottom:1px solid #f4f5f8; color:#333; }
.sah__tbl tr:last-child td { border-bottom:none; }
.sah__th-date, .sah__td-date { position:sticky; left:0; background:#fff; font-weight:700; color:#111; box-shadow:1px 0 0 #eef0f4; }
.sah__tbl th.sah__th-date { background:#fafbfc; z-index:1; }
.sah__tbl--single th, .sah__tbl--single td { padding:11px 16px; font-size:13px; text-align:center; }
.sah__tbl--single .sah__td-val { font-weight:800; color:#111; }
.sah__d { font-size:12px; font-weight:700; }
.sah__d--up { color:#16a34a; }
.sah__d--down { color:#dc2626; }
.sah__d--same { color:#cbd5e1; }

/* 모바일 */
@media (max-width: 768px) {
    .sapf__stats { grid-template-columns: repeat(2, 1fr); }
    .sapf__stat-val { font-size: 17px; }
    /* 3열 그룹(통합/시즌 계급)이 2열로 줄바꿈 → 랭킹을 전체너비로 + 상단 구분선(가로 풀) */
    .sapf__stats--3 .sapf__stat:nth-child(2) { border-right: none; }
    .sapf__stats--3 .sapf__stat:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #f0f2f5; }
    /* 랭크전 티어: 로고 위 / 정보 아래 세로 스택 */
    .sapf__tier-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }

    /* 컴팩트 헤더: 타이틀 위 / 검색창 아래 full-width */
    .sapf-pg-header { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 0 14px; }
    .sapf-pg-title { font-size: 18px; }
    .sapf-pg-form { width: 100%; }
    .sapf-pg-sbox { width: 100%; }
    .sapf-pg-sinput { width: 100%; flex: 1; }

    /* 히어로: 갱신/조회 한 줄 + 프로필 정보 스택 */
    .sapf__hero { flex-direction: column; align-items: stretch; padding: 18px; gap: 0; }
    .sapf__corner { position: static; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #f0f2f5; }
    .sapf__corner-top { order: 2; }
    .sapf__views { order: 1; font-size: 13px; }
    .sapf__nick { font-size: 24px; }
    .sapf__nick-row { gap: 8px; }
    .sapf__hero-info { gap: 10px; }
    .sam__row { gap: 10px; padding: 12px 14px; }
    .sam__kda { min-width: 64px; font-size: 13px; }

    /* 매치 상세 표 → 플레이어 카드형 */
    .sam__tbl { border: none; background: transparent; }
    .sam__tbl thead { display: none; }
    .sam__tbl tbody, .sam__tbl tr, .sam__tbl td { display: block; }
    .sam__tbl tr {
        display: flex; flex-wrap: wrap; align-items: center;
        background: #fff; border: 1px solid #eef0f4; border-radius: 10px;
        padding: 12px; margin-bottom: 8px;
    }
    .sam__tbl tr.sam__me { background: #fff8f0; border-color: #fcd9c0; }
    .sam__tbl td { border: none !important; padding: 0; }
    .sam__tbl td.sam__pn { display: flex; align-items: center; gap: 10px; flex: 0 0 100%; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f4f5f8 !important; }
    .sam__tbl td:not(.sam__pn) {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; width: auto !important;
        font-size: 14px; font-weight: 600; color: #333;
    }
    .sam__tbl td:not(.sam__pn)::before {
        content: attr(data-label); font-size: 9px; color: #aaa; font-weight: 600;
    }
    .sam__tbl { font-size: 12px; }
    .sam__tbl th, .sam__tbl td { padding: 6px 5px; }
    /* 대분류 탭이 넘치면 가로 스크롤 */
    .sam__cats { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
    .sam__cat { padding: 10px 12px; white-space: nowrap; flex-shrink: 0; }
    .sam__pgrade-img { width: 20px; height: 20px; }
    .sal__wrap { grid-template-columns: 1fr; }
    .sa-guide__grid { grid-template-columns: 1fr; }
    .sa-guide__head h2 { font-size: 17px; }
    .sam__mc { padding: 14px; }
    .sam__mc-kda { margin-left: 0; width: 100%; }
    /* 지표: 박스 래핑 대신 가로 선형 리스트 (라벨 | 값 | 순위) */
    .sam__mc-metrics { display: block; border: 1px solid #eef0f4; border-radius: 10px; overflow: hidden; gap: 0; margin-bottom: 12px; }
    .sam__mc-m { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border: none; border-bottom: 1px solid #f4f5f8; border-radius: 0; background: #fff; }
    .sam__mc-m:last-child { border-bottom: none; }
    .sam__mc-m--top { background: #fffbeb; }
    .sam__mc-l { flex: 0 0 52px; font-size: 12px; text-align: left; }
    .sam__mc-v { flex: 1; font-size: 16px; text-align: left; }
    .sam__mc-r { flex-direction: row; gap: 6px; align-items: center; margin-top: 0; }
    .sam__mc-badge { font-size: 10px; }
}
