/* --- 响应式适配 --- */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .menu-toggle.mobile-only { display: flex; }
    .works-grid, .tools-grid, .scales-grid { grid-template-columns: 1fr; }
    .tool-card-wrapper { grid-column: auto; }
    .person-img { max-height: 180px; }
}

.filter-btn {
    font-size: 1rem;
    font-family: 'Musical', sans-serif;
}

.scales-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.scales-grid.filtered { display: flex; justify-content: center; }
.scales-grid.filtered .scale-card { width: 100%; max-width: 320px; }

/* 入场动画：轻微缩放 + 向上位移 + 淡入 */
@keyframes cardAppear {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.appearing { animation: cardAppear 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; }

.card {
    border-radius: var(--card-radius);
    flex-direction: column;
    height: 100%;
    pointer-events: none;
}

.scale-card { 
    padding: 25px; 
    align-items: flex-start; 
    justify-content: flex-start; 
    text-align: left;
    width: auto; /* 在 Grid 中自适应 */
}
.scale-header { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 10px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.scale-name { font-size: 1.4rem; font-weight: 700; color: var(--primary-blue); }
.scale-type { font-size: 1rem; color: var(--text-sub); font-weight: normal; }
.musical-key { font-family: 'Musical', sans-serif; font-feature-settings: normal; }
.note-list { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; }
.note-badge { display: flex; align-items: center; background: rgba(30, 102, 198, 0.08); color: var(--primary-blue); padding: 8px 15px; border-radius: 6px; font-weight: 600; font-size: 1.4rem; }
.note-badge i { font-style: normal; font-size: 0.75rem; opacity: 0.4; width: 1.6rem; text-align: left; font-weight: 400; }
.note-badge span { flex: 1; text-align: center; margin-right: 1.6rem; font-family: 'Musical', sans-serif; font-feature-settings: normal; }

[data-theme='dark'] .note-badge { background: rgba(147, 197, 253, 0.15); }
[data-theme='dark'] .scale-header { border-bottom-color: rgba(255,255,255,0.05); }
[data-theme='dark'] .scale-type { color: var(--text-sub); }


@media (prefers-color-scheme: dark) { 
	html:not([data-theme='light']) {
        .note-badge { background: rgba(147, 197, 253, 0.15); }
        .scale-header { border-bottom-color: rgba(255,255,255,0.05); }
        .scale-type { color: var(--text-sub); }
    }
}    

/* --- 响应式适配 (移动端强制单列) --- */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .menu-toggle.mobile-only { display: flex; }
    .page-hero h1 { font-size: 2rem; }
    .filter-container { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
    .filter-btn { width: auto; }
    .scales-grid { grid-template-columns: 1fr; } /* 放在最后确保能覆盖双列设置 */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-column { align-items: center; }
    .footer-column p, .footer-column span, .footer-column a { white-space: normal; }
    .reward-modal { padding: 30px; width: 85%; }
}
