/* 인기 악보 · 최신 악보 (/popular · /new)
   파트별 목록(표 형태)과 다르게 — 밝은 배너 + 밑줄 탭, 인기는 1~3위 카드와 순위 목록, 최신은 숲 초록 벽 원목 진열대.
   보유 파트 뱃지(.part-badge) · 빈 목록(.part-empty)은 parts.css 것을 쓴다. */

.chart-page { padding-bottom: var(--space-16); }

/* ═══ 머리 영역 ═══ 밝은 바탕 + 오른쪽에 옅은 오선(5줄) 무늬 */
.chart-hero {
    position: relative;
    overflow: hidden;
    margin-top: calc(-1 * var(--space-4)); /* 내비게이션 아래 여백을 메워 붙어 보이게 */
    padding: var(--space-10) 0 0;
    background: linear-gradient(180deg, var(--forest-muted) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-200);
}
.chart-hero::before {
    content: '';
    position: absolute;
    right: -40px;
    top: 50%;
    width: 55%;
    height: 70px;
    transform: translateY(-50%) rotate(-4deg);
    background: repeating-linear-gradient(to bottom, transparent 0 13px, rgba(46, 125, 50, 0.14) 13px 14px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
            mask-image: linear-gradient(90deg, transparent, #000 40%);
    pointer-events: none;
}
.chart-hero__inner { position: relative; padding-bottom: var(--space-6); }
.chart-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
}
.chart-hero__date {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--gray-500);
}
.chart-hero__date::before { content: '·'; margin-right: var(--space-2); color: var(--gray-300); }
.chart-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--white);
    border: 1px solid var(--forest-border);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--forest);
}
.chart-hero__title {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    margin: 0;
    font-size: 2.25rem;
    font-weight: var(--font-extrabold);
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.03em;
}
/* "TOP 20" — 제목 옆 초록 글씨 */
.chart-hero__count {
    font-style: normal;
    font-size: 0.6em;
    font-weight: var(--font-extrabold);
    letter-spacing: 0.02em;
    color: var(--forest);
}
.chart-hero__count--new {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: var(--forest);
    color: var(--white);
    font-size: 0.45em;
    letter-spacing: 0.08em;
    align-self: center;
}

/* 둘러보기 탭 — 배너 아래 경계선에 붙은 밑줄 탭 (차트 사이트처럼) */
.chart-nav {
    position: relative;
    display: flex;
    gap: var(--space-8);
    margin-bottom: -1px; /* 밑줄이 배너 경계선 위에 겹치게 */
}
.chart-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 2px var(--space-4);
    color: var(--gray-400);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition-base);
}
.chart-nav__item i { font-size: var(--text-sm); transition: color var(--transition-base); }
.chart-nav__item::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--forest);
    opacity: 0;
    transform: scaleX(0.3);
    transition: transform var(--transition-base), opacity var(--transition-base);
}
.chart-nav__item:hover { color: var(--gray-700); }
.chart-nav__item:hover::after { opacity: 0.35; transform: scaleX(1); }
.chart-nav__item.is-active { color: var(--gray-900); }
.chart-nav__item.is-active i { color: var(--forest); }
.chart-nav__item.is-active::after { opacity: 1; transform: scaleX(1); }

.chart-body { padding-top: var(--space-8); }

/* 보유 파트 뱃지 묶음 */
.chart-badges { display: inline-flex; flex-shrink: 0; gap: var(--space-1); }   /* 곡명이 길어도 배지는 줄지 않고, 곡명이 말줄임된다 */
.chart-badges .part-badge { width: 22px; height: 22px; font-size: 10px; }


/* ═══ 인기 — 1~3위 ═══
   악보 첫 페이지는 작게 보면 읽히지 않아 커버 뒤에 종이처럼 살짝만 내보이고, "악보 미리보기" 버튼으로 크게 본다 */
.podium {
    list-style: none;
    margin: 0 0 var(--space-8);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}
.podium__item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.07);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.podium__item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(27, 94, 32, 0.16); }

/* 카드 전체를 덮는 상세 링크 */
.podium__link { color: inherit; text-decoration: none; min-width: 0; }
.podium__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.podium__item:hover .podium__title { color: var(--forest-dark); }

.podium__visual {
    position: relative;
    display: flex;
    justify-content: center;
    padding: var(--space-4) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--forest-muted);
}
.podium__cover {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: var(--gray-100);
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
}
/* 악보 첫 페이지는 카드 배경에 은은하게 깐다 — 작게 줄여 따로 세우면 글씨가 뭉개져 깨진 이미지처럼 보인다.
   넓게 깔고 흐리게 덮으면 오선 무늬 배경이 된다. 검색엔진용 이미지(alt "… 악보 미리보기")라 HTML 에 남기고,
   카드에 올리면 진해지며, 크게는 "악보 미리보기" 버튼으로 본다 */
.podium__sheet {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    /* 페이지 전체 대신 윗부분(제목 · 첫 단 오선)을 확대해서 음표가 굵게 비치게 */
    transform: scale(1.8);
    transform-origin: 50% 22%;
    opacity: 0.28;
    filter: grayscale(1);
    transition: opacity var(--transition-slow);
}
.podium__visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(241, 248, 233, 0.35) 0%, rgba(241, 248, 233, 0.75) 100%);
    pointer-events: none;
    transition: opacity var(--transition-slow);
}
.podium__item:hover .podium__sheet { opacity: 0.6; }
.podium__item:hover .podium__visual::after { opacity: 0.5; }

.podium__medal {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--white);
    background: linear-gradient(135deg, var(--forest-light), var(--forest-dark));
    border: 2px solid var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.podium__item.rank-1 .podium__medal { background: linear-gradient(135deg, #f6c544, #d99a06); } /* 금메달 — 디자인 시스템에 금색 토큰이 없어 이 한 곳만 직접 쓴다 */

.podium__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-right: 110px; }
.podium__title {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--gray-900);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color var(--transition-fast);
}
.podium__artist {
    margin-bottom: 4px;
    font-size: var(--text-xs);
    color: var(--gray-500);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 악보 미리보기 버튼 — 카드 링크 위에 따로 눌린다 */
.podium__zoom {
    position: absolute;
    right: var(--space-4);
    bottom: var(--space-4);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px var(--space-3);
    border: 1px solid var(--forest-border);
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--forest-dark);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: var(--transition-base);
}
.podium__zoom:hover { background: var(--forest); border-color: var(--forest); color: var(--white); }

/* 악보 미리보기 창 */
.sheet-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: auto;
}
.sheet-dialog::backdrop { background: rgba(17, 24, 39, 0.6); }
.sheet-dialog__head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    font-size: var(--text-sm);
}
.sheet-dialog__close {
    width: 44px;                 /* 터치 영역 (RESPONSIVE_VIEW_POLICY §5) */
    height: 44px;
    border: 0;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-500);
    cursor: pointer;
}
.sheet-dialog__img { display: block; width: 100%; height: auto; }


/* ═══ 인기 — 4위부터 ═══ 흰 판 안에, 10위까지는 순위 숫자를 초록으로 */
.rank-panel {
    padding: var(--space-5) var(--space-6) var(--space-3);
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: 0 6px 20px rgba(17, 24, 39, 0.05);
}
.rank-panel__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--gray-500);
    letter-spacing: 0.02em;
}
.rank-list__item:last-child .rank-row,
.rank-list__item:nth-last-child(2):nth-child(odd) .rank-row { border-bottom: 0; }
.rank-list__item:not(.is-top10) .rank-row__num { color: var(--gray-400); }

/* ═══ 목록 아래 소개글 ═══ */
.chart-intro {
    margin-top: var(--space-10);
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
}
.chart-intro__title {
    margin: 0 0 var(--space-2);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    color: var(--gray-800);
}
.chart-intro__text {
    max-width: 72em;            /* PC 에서 문장 하나가 한 줄에 들어가는 폭 — 좁으면 끝 어절이 혼자 다음 줄로 떨어진다 */
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
    line-height: 1.8;
    color: var(--gray-600);
    white-space: pre-line;      /* 문장 사이 \n 을 줄바꿈으로 (SongChartType.intro) */
    word-break: keep-all;       /* 단어 중간에서 끊지 않는다 */
    text-wrap: pretty;          /* 마지막 줄에 한 단어만 남지 않게 (지원 브라우저) */
}
.chart-intro__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
.chart-intro__links a {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--white);
    border: 1px solid var(--forest-border);
    color: var(--forest-dark);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: var(--transition-base);
}
.chart-intro__links a:hover { background: var(--forest); border-color: var(--forest); color: var(--white); }


.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--space-8);
}
.rank-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--gray-100);
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-fast);
}
.rank-row:hover { background: var(--forest-muted); }
.rank-row__num {
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    font-size: var(--text-md);
    font-weight: var(--font-bold);
    color: var(--forest);
    font-variant-numeric: tabular-nums;
}
.rank-row__cover {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--gray-100);
}
.rank-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-row__title,
.rank-row__artist { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row__title { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--gray-900); }
.rank-row__artist { font-size: var(--text-xs); color: var(--gray-500); }


/* ═══ 최신 — 진열대 ═══
   갤러리 벽의 원목 선반. 곡마다 위에서 따뜻한 조명이 비추고, 앨범 커버를 앞에 · 악보 한 장을 뒤에 세운다
   (악보 윗부분이 커버 위로 보인다). 선반은 윗면 + 나뭇결 앞판 + 받침 쇠, 줄마다 한 장으로 이어진다 —
   칸 사이 간격을 0 으로 두고 칸마다 판을 칸 여백만큼 양옆으로 늘려 붙인다.
   나무 · 벽 · 조명 색은 디자인 시스템에 없는 재질 색이라 이 블록 안 변수로만 둔다. */
.store {
    /* 벽은 브랜드 숲 초록(--forest-dark)을 더 깊게 — 갈색 벽은 악보의숲과 따로 놀았다 */
    --wall: #1f4a2a;
    --wall-deep: #0f2617;
    --label-title: #f3f7ee;      /* 선반 아래 곡명 (진초록 벽 위) */
    --label-artist: #a9c4ad;     /* 선반 아래 아티스트 */
    --glow: 255, 226, 170;       /* 조명 빛 (rgb) — 숲 사이로 드는 햇살 */
    --wood-top-1: #e6cba4;
    --wood-top-2: #d4b07f;
    --wood-front-1: #b9895a;
    --wood-front-2: #8e6136;
    --bracket: #4a3a2a;
    --bracket-hi: #6b5641;
    --brass-glint: #fff1c4;      /* 조명 갓 윗면 반짝임 */
    --brass-hi: #f3d993;         /* 놋쇠 밝은 면 */
    --brass-1: #e5c172;
    --brass-2: #b9883a;
    --brass-3: #6f4e1b;          /* 놋쇠 그늘 */
    --stand-pad: var(--space-4);

    position: relative;
    /* 위쪽 여백 — 첫 줄에서 올리면 앨범 뒤 악보가 칸 위로 솟는다. 자르지 않도록 overflow 도 두지 않는다 */
    padding: var(--space-16) var(--space-6) var(--space-6);
    border-radius: var(--radius-2xl);
    /* 어두운 숲 초록 벽 — 밝은 벽에선 조명이 묻힌다 */
    background:
        repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, 0.025) 119px 120px),
        radial-gradient(ellipse 120% 60% at 50% 0%, rgba(var(--glow), 0.06), transparent 70%),
        linear-gradient(180deg, var(--wall) 0%, var(--wall-deep) 100%);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.4), 0 24px 60px rgba(15, 38, 23, 0.3);
}
.store__shelf {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-16) 0;      /* 아래 줄 조명 등이 위 줄 이름에 붙지 않게 */
}

.stand { position: relative; }
.stand__link { position: relative; display: block; color: inherit; text-decoration: none; }

/* 곡마다 스포트라이트 — 갤러리 액자등(벽 받침 · 놋쇠 기둥 · 길쭉한 갓 · 전구 빛 줄) + 아래로 퍼지는 빛줄기.
   등 모양은 배경 여러 겹으로 그리고, drop-shadow 가 그 모양을 따라 빛을 번지게 한다 */
.stand__link::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -48px;
    z-index: 4;
    width: 44px;
    height: 24px;
    transform: translateX(-50%);
    /* 위에 쓴 겹이 앞에 그려진다 — 하이라이트 · 전구 빛 · 갓(둥근 양 끝 + 몸통) · 관절 · 기둥 · 동그란 벽 받침 */
    background:
        /* 갓 윗면 하이라이트 선 */
        linear-gradient(90deg, transparent, rgba(255, 252, 235, 0.95), transparent) center top 13px / 62% 1px no-repeat,
        /* 전구 빛 줄 (갓 아래) */
        radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 250, 230, 1) 0%, rgba(var(--glow), 0) 80%) center bottom / 64% 3px no-repeat,
        /* 갓 — 양 끝 둥근 원통 */
        radial-gradient(circle at 50% 35%, var(--brass-hi) 0 2px, var(--brass-2) 3px, var(--brass-3) 4.5px, transparent 5px) left bottom 3px / 9px 9px no-repeat,
        radial-gradient(circle at 50% 35%, var(--brass-hi) 0 2px, var(--brass-2) 3px, var(--brass-3) 4.5px, transparent 5px) right bottom 3px / 9px 9px no-repeat,
        linear-gradient(180deg, var(--brass-glint) 0%, var(--brass-1) 22%, var(--brass-2) 62%, var(--brass-3) 100%) center bottom 3px / calc(100% - 8px) 9px no-repeat,
        /* 관절 구슬 */
        radial-gradient(circle at 40% 35%, var(--brass-hi) 0 1px, var(--brass-2) 2px, var(--brass-3) 3px, transparent 3.5px) center top 9px / 7px 7px no-repeat,
        /* 가는 기둥 */
        linear-gradient(90deg, var(--brass-3) 0%, var(--brass-hi) 50%, var(--brass-3) 100%) center top 4px / 2px 8px no-repeat,
        /* 동그란 벽 받침 */
        radial-gradient(circle at 45% 35%, var(--brass-hi) 0 1.5px, var(--brass-1) 3px, var(--brass-3) 4.5px, transparent 5px) center top / 10px 10px no-repeat;
    filter:
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55))
        drop-shadow(0 5px 7px rgba(var(--glow), 0.8));
    transition: opacity var(--transition-base);
}
.stand__link::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -26px;
    z-index: 0;
    width: 112%;
    height: calc(var(--beam-h, 92%));
    transform: translateX(-50%);
    /* 칸(링크)에는 선반 아래 이름표까지 들어 있어 빛줄기는 선반 높이(약 72%)에서 끝낸다.
       가운데가 더 밝은 원뿔 빛 + 전체를 감싸는 옅은 빛 두 겹 */
    background:
        radial-gradient(ellipse 30% 55% at 50% 0%, rgba(255, 246, 220, 0.45), transparent 70%),
        linear-gradient(180deg, rgba(var(--glow), 0.5) 0%, rgba(var(--glow), 0.2) 45%, rgba(var(--glow), 0.06) 66%, transparent 72%);
    clip-path: polygon(42% 0, 58% 0, 96% 100%, 4% 100%);
    filter: blur(3px);
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

/* 진열 칸 — 높이를 폭에 맞춘다 (앨범 = 폭 78%, 위 여유까지 84%) */
.stand__display {
    position: relative;
    display: block;
    margin: 0 var(--stand-pad);
    aspect-ratio: 1 / 0.84;
    /* 앨범 뒤 벽에 번진 빛 */
    background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(var(--glow), 0.22), transparent 70%);
}
/* 선반 — 윗면(밝은 판) + 앞판(나뭇결, 두께) 을 한 요소의 배경 두 겹으로 */
.stand__display::after {
    content: '';
    position: absolute;
    left: calc(-1 * var(--stand-pad));
    right: calc(-1 * var(--stand-pad));
    top: calc(100% - 6px);       /* 물건이 윗면 위에 올라서게 6px 겹친다 */
    height: 26px;
    background:
        radial-gradient(ellipse 45% 100% at 50% 0%, rgba(255, 240, 210, 0.75), transparent 70%) top / 100% 9px no-repeat,  /* 선반에 떨어진 빛 */
        linear-gradient(180deg, var(--wood-top-1) 0%, var(--wood-top-2) 100%) top / 100% 9px no-repeat,
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 3px, rgba(0, 0, 0, 0.04) 3px 9px, transparent 9px 17px),
        linear-gradient(180deg, var(--wood-front-1) 0%, var(--wood-front-2) 100%);
    box-shadow: 0 16px 22px -10px rgba(70, 45, 20, 0.55);
    z-index: 0;
}
/* 선반 양 끝 모서리 */
.stand:nth-child(5n + 1) .stand__display::after { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.stand:nth-child(5n) .stand__display::after,
.stand:last-child .stand__display::after { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* 받침 쇠 — 줄 양 끝 칸, 선반 앞판 아래. 칸 여백(--stand-pad) 안에만 두어 이름표 글씨를 가리지 않는다 */
.stand__display::before {
    content: '';
    position: absolute;
    top: calc(100% + 20px);
    width: var(--bracket-w, 8px);
    height: 26px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: linear-gradient(90deg, var(--bracket), var(--bracket-hi));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.18);
    display: none;
}
.stand:nth-child(5n + 1) .stand__display::before { display: block; left: calc(-1 * var(--stand-pad) + 4px); }
.stand:nth-child(5n) .stand__display::before { display: block; right: calc(-1 * var(--stand-pad) + 4px); }

/* 앨범 — 음반 가게처럼 살짝 비스듬히 세운다. 표면 광택 · 선반에 닿는 그림자. 올리면 정면으로 돌며 들린다 */
.stand__album {
    position: absolute;
    left: 11%;
    bottom: 2px;
    z-index: 3;
    width: 78%;
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    transform: perspective(700px) rotateY(-14deg) rotateX(3deg);
    transform-origin: 50% 100%;
    box-shadow:
        6px 0 0 -2px rgba(0, 0, 0, 0.45),             /* 오른쪽 옆면 두께 */
        0 22px 26px -14px rgba(0, 0, 0, 0.75);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s;
}
.stand__album img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    background: var(--gray-100);
}
/* 표면 광택 + 종이 재킷 마감 (가장자리 선 · 윗변 하이라이트) */
.stand__album::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.08) 28%, transparent 45%);
    box-shadow:
        inset 0 0 0 1px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* 선반 위 닿는 그림자 */
.stand__album::before {
    content: '';
    position: absolute;
    left: 4%;
    right: -6%;
    bottom: -6px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(50, 30, 10, 0.45), transparent 70%);
    filter: blur(2px);
    z-index: -1;
}

/* 앨범 뒤에 숨긴 악보 — 올리면 뒤에서 올라온다 */
.stand__paper {
    position: absolute;
    left: 17%;
    bottom: 4px;
    z-index: 1;
    width: 66%;
    aspect-ratio: 1 / 1.414;
    overflow: hidden;
    border-radius: 2px;
    background: var(--white);
    box-shadow: 0 6px 14px rgba(40, 25, 10, 0.25);
    opacity: 0;
    transform: translateY(0) rotate(-4deg);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}
.stand__paper img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* 올리면 앨범이 정면으로 돌고 뒤에서 악보가 올라온다 — 마우스가 있는 기기에서만.
   터치 기기는 탭할 때 :hover 가 잠깐 켜졌다가, 상세에서 뒤로 오면 악보가 솟은 채 남는다 */
@media (hover: hover) {
    .stand__link:hover .stand__album {
        transform: perspective(700px) rotateY(0deg) rotateX(0deg) translateY(-8px);
        box-shadow:
            1px 1px 0 rgba(255, 255, 255, 0.4) inset,
            0 28px 34px -14px rgba(40, 25, 10, 0.6);
    }
    .stand__link:hover .stand__paper { opacity: 1; transform: translateY(-26%) rotate(-6deg); }
    /* 올라온 악보와 겹치지 않게 그 곡의 조명은 끈다 */
    .stand__link:hover::before,
    .stand__link:hover::after { opacity: 0; }
}

/* 선반 아래 — 벽에 바로 쓴 이름 */
.stand__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin: 34px var(--stand-pad) 0;
    text-align: center;
}
.stand__title,
.stand__artist { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stand__title {
    font-size: var(--text-sm);
    font-weight: var(--font-extrabold);
    color: var(--label-title);
    letter-spacing: -0.01em;
    transition: color var(--transition-fast);
}
.stand__link:hover .stand__title { color: rgb(var(--glow)); }
.stand__artist { font-size: var(--text-xs); color: var(--label-artist); }


/* ═══ 반응형 ═══ */
@media (max-width: 768px) {
    .chart-hero { padding: var(--space-6) 0 0; }
    .chart-hero::before { width: 80%; height: 56px; top: 30%; }
    .chart-hero__title { font-size: var(--text-2xl); }
    /* 모바일 — 탭 셋을 화면 폭에 고르게 */
    .chart-hero__inner { padding-bottom: var(--space-4); }
    .chart-nav { gap: 0; }
    .chart-nav__item { flex: 1; justify-content: center; gap: 6px; padding: var(--space-3) 0; font-size: var(--text-sm); }
    .chart-nav__item i { font-size: var(--text-xs); }
    .chart-body { padding-top: var(--space-5); }

    /* 모바일은 카드를 가로로 — 왼쪽 커버(뒤에 악보 종이), 오른쪽 곡 정보, 미리보기는 아이콘 버튼 */
    .podium { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); margin-bottom: var(--space-6); }
    .podium__item { flex-direction: row; align-items: center; padding: var(--space-3); }
    .podium__visual { flex-shrink: 0; width: 118px; padding: 10px 0; }
    .podium__cover { width: 72px; height: 72px; border-radius: var(--radius-md); }
    .podium__sheet { transform: scale(2.4); } /* 모바일은 카드가 작아 더 확대해야 음표가 보인다 */
    .podium__medal { left: 6px; top: 6px; width: 26px; height: 26px; font-size: var(--text-xs); }
    .podium__info { padding-right: 44px; }
    /* 터치 영역 44px (RESPONSIVE_VIEW_POLICY §5) */
    .podium__zoom { right: var(--space-3); bottom: auto; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; justify-content: center; }
    .podium__zoom span { display: none; }

    .rank-list { grid-template-columns: minmax(0, 1fr); }   /* 1fr 는 긴 곡명만큼 열이 넓어져 오른쪽 파트 배지가 판 밖으로 밀린다 */
    .rank-panel { padding: var(--space-4) var(--space-3) var(--space-2); }
    .rank-list__item:nth-last-child(2):nth-child(odd) .rank-row { border-bottom: 1px solid var(--gray-100); }
    .chart-intro { margin-top: var(--space-8); padding: var(--space-4); }


    /* 진열대 — 한 선반에 3곡 (모서리 · 받침 쇠도 3곡 기준으로) */
    .store { --stand-pad: var(--space-2); padding: var(--space-12) var(--space-3) var(--space-4); border-radius: var(--radius-2xl); }
    .store__shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-16) 0; }
    .stand:nth-child(n) .stand__display::after { border-radius: 0; }
    .stand:nth-child(n) .stand__display::before { display: none; }
    .stand:nth-child(3n + 1) .stand__display::after { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
    .stand:nth-child(3n) .stand__display::after,
    .stand:last-child .stand__display::after { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
    .store { --bracket-w: 6px; }
    .stand:nth-child(3n + 1) .stand__display::before { display: block; left: calc(-1 * var(--stand-pad) + 1px); right: auto; }
    .stand:nth-child(3n) .stand__display::before { display: block; right: calc(-1 * var(--stand-pad) + 1px); left: auto; }
    .stand__display::after { height: 22px; }
    .stand__link::before { top: -42px; width: 38px; }
    .stand__link::after { top: -22px; }
    .stand__label { margin-top: 30px; }
}

@media (max-width: 480px) {
    /* 진열대 — 한 선반에 2곡 */
    .store__shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stand:nth-child(n) .stand__display::after { border-radius: 0; }
    .stand:nth-child(n) .stand__display::before { display: none; }
    .stand:nth-child(2n + 1) .stand__display::after { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
    .stand:nth-child(2n) .stand__display::after,
    .stand:last-child .stand__display::after { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
    .stand:nth-child(2n + 1) .stand__display::before { display: block; left: calc(-1 * var(--stand-pad) + 1px); right: auto; }
    .stand:nth-child(2n) .stand__display::before { display: block; right: calc(-1 * var(--stand-pad) + 1px); left: auto; }
    .rank-row { gap: 10px; padding: 10px var(--space-1); }
    .rank-row__num { width: 22px; font-size: var(--text-base); }
    .rank-row__cover { width: 44px; height: 44px; }
}
