
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 20px;
    background-color: #f4f6f9;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items:start;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width:0;
}
.card.sticky-chart {
    position: -webkit-sticky; /* Safari 브라우저 지원 */
    position: sticky;
    top: 20px; /* 스크롤할 때 화면 상단에서 20px 여백 유지 */
    z-index: 10; /* 테이블 상단 레이어 보장 */
    height:fit-content;
}
/* 1. 카드 프레임 전체 컨테이너 */
.card-frame {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    background-color: #2b2b2b;
    display: inline-block;
    vertical-align: middle;
}

/* Layer 1: 메인 썸네일 이미지 */
.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Layer 2: 좌상단 속성 아이콘 (Cool, Cute, Pure 등) */
.card-attr {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
    z-index: 2;
}

/* Layer 3: 좌하단 레어리티 별 (Stars) */
.card-stars {
    position: absolute;
    bottom: 2px;
    left: 2px;
    display: flex;
    gap: 0px;
    line-height: 1;
    z-index: 2;
}

/* 미각성 노란색 별 */
.star.normal {
    color: #facc15;
    font-size: 8px;
    text-shadow: 0 0 2px #000, 0 0 2px #000;
}

/* 각성/특훈 완료 보라색 별 */
.star.after-training {
    color: #c084fc;
    font-size: 8px;
    text-shadow: 0 0 2px #000, 0 0 2px #000;
}

/* Layer 4: 우하단 카드 레벨 텍스트 */
.card-level {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 8px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 2px #000, 0 0 2px #000;
    z-index: 2;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

.chart-container {
    position: relative;
    height: 400px;
}
.player-icon{
    width:36px;
    height:36px;
    border-radius:10%;
    object-fit:cover;
    vertical-align:middle;
    border:1px solid #ddd;
}
/* 테이블 셀이 내부 콘텐츠 때문에 강제로 늘어나는 것을 방지 */
tr.inline-chart-row td {
    width: 100%;
    max-width: 0; /* flex/grid/table 내부에서 자식 요소가 부모 넘침 방지 핵심 */
    padding: 15px;
    box-sizing: border-box;
}

/* 차트 컨테이너가 화면 크기에 맞춰 동적으로 반응하도록 설정 */
.inline-chart-container {
    position: relative;
    width: 100%;
    height: 260px;
}
/* ==========================================================
   📱 모바일 및 태블릿 전용 반응형 미디어 쿼리 레이아웃 고정
   ========================================================== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .grid {
        grid-template-columns: 1fr; /* 좌우 분할을 한 줄로 변환 */
        gap: 16px;
    }

    .card.sticky-chart {
        display:none;
    }

    th, td {
        padding: 8px 6px;
        font-size: 0.9rem;
    }

    .card-frame {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

}
