/* ============================================================
   chords.css - АППЛИКАТУРА АККОРДОВ
   Версия: 4.8 - АДАПТИВНОСТЬ ДЛЯ 4K
   ============================================================ */

/* ============================================================
   БАЗОВЫЕ СТИЛИ
   ============================================================ */
.chords-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px 24px;
    background-color: #0d0b09;
    color: #ede4d8;
    min-height: 85vh;
}

.chords-header {
    text-align: center;
    margin-bottom: 20px;
}

.chords-header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
    color: #d4a853;
    margin-bottom: 4px;
}

.chords-header h1 .highlight {
    color: #ede4d8;
}

.chords-header p {
    color: #b8aa9a;
    font-size: 0.95rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   ЛЕГЕНДА
   ============================================================ */
.chord-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: rgba(20,17,14,0.6);
    border-radius: 12px;
    border: 1px solid rgba(42,36,30,0.3);
}

.chord-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #b8aa9a;
}

.chord-legend .legend-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.chord-legend .legend-dot.finger {
    background: #d4a853;
    border-color: #b8923a;
}

.chord-legend .legend-dot.open {
    background: transparent;
    border: 2px solid #00c864;
    color: #00c864;
    line-height: 16px;
    text-align: center;
    font-size: 10px;
}

.chord-legend .legend-dot.muted {
    background: transparent;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    line-height: 16px;
    text-align: center;
    font-size: 10px;
}

.chord-legend .legend-dot.string {
    background: #6a5a4a;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.chord-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 12px;
    background: rgba(20,17,14,0.6);
    border-radius: 12px;
    border: 1px solid rgba(42,36,30,0.3);
}

.filter-btn {
    padding: 8px 18px;
    border: 2px solid #2a241e;
    border-radius: 25px;
    background: transparent;
    color: #b8aa9a;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
    border-color: #d4a853;
    color: #ede4d8;
    transform: translateY(-2px);
}

.filter-btn:active {
    transform: scale(0.96);
}

.filter-btn.active {
    background: #d4a853;
    border-color: #d4a853;
    color: #1a1510;
    box-shadow: 0 4px 20px rgba(212,168,83,0.3);
}

.filter-btn .count {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    margin-left: 6px;
    min-width: 20px;
    text-align: center;
}

.filter-btn.active .count {
    background: rgba(26,21,16,0.15);
}

/* ============================================================
   СЕТКА КАРТОЧЕК
   ============================================================ */
.chords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chord-card {
    background: #14110e;
    border: 2px solid #2a241e;
    border-radius: 20px;
    padding: 20px 18px 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    will-change: transform;
}

.chord-card:hover {
    border-color: #d4a853;
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(212,168,83,0.1);
}

.chord-card:active {
    transform: scale(0.98);
}

.chord-card:focus-visible {
    outline: 3px solid #d4a853;
    outline-offset: 2px;
}

.chord-card .chord-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
    width: 100%;
}

.chord-card .chord-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ede4d8;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 1px;
}

.chord-card .chord-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.chord-card .chord-tag {
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chord-card .chord-tag.major {
    background: rgba(212,168,83,0.2);
    color: #d4a853;
    border: 1px solid rgba(212,168,83,0.2);
}

.chord-card .chord-tag.minor {
    background: rgba(0,200,100,0.15);
    color: #00c864;
    border: 1px solid rgba(0,200,100,0.15);
}

.chord-card .chord-tag.seventh {
    background: rgba(255,165,2,0.15);
    color: #ffa502;
    border: 1px solid rgba(255,165,2,0.15);
}

.chord-card .chord-tag.barre {
    background: rgba(255,71,87,0.15);
    color: #ff4757;
    border: 1px solid rgba(255,71,87,0.15);
}

.chord-card .chord-tag.open {
    background: rgba(79,195,247,0.15);
    color: #4fc3f7;
    border: 1px solid rgba(79,195,247,0.15);
}

/* ============================================================
   ДИАГРАММА АККОРДА (SVG)
   ============================================================ */
.chord-diagram-wrapper {
    width: 100%;
    max-width: 260px;
    margin: 6px auto 10px;
    padding: 8px;
    background: #1a1714;
    border-radius: 12px;
    border: 1px solid #2a241e;
    contain: layout style paint;
}

.chord-diagram {
    width: 100%;
    height: auto;
    display: block;
    contain: layout style paint;
}

.chord-diagram .fret-board {
    fill: #1a1714;
    stroke: #3a322a;
    stroke-width: 1;
}

.chord-diagram .fret-line {
    stroke: #5a4a3a;
    stroke-width: 2;
}

.chord-diagram .fret-line.thick {
    stroke-width: 4;
    stroke: #8a7a6a;
}

.chord-diagram .string-line {
    stroke: #6a5a4a;
    stroke-width: 2;
}

.chord-diagram .string-line.thick {
    stroke-width: 3;
    stroke: #8a7a6a;
}

.chord-diagram .dot-finger {
    fill: #d4a853;
    stroke: #b8923a;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 8px rgba(212,168,83,0.3));
}

.chord-diagram .dot-finger text {
    fill: #1a1510;
    font-size: 9px;
    font-weight: 800;
    font-family: 'Inter', system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
}

.chord-diagram .mark-open {
    fill: #00c864;
    font-size: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
    filter: drop-shadow(0 0 8px rgba(0,200,100,0.2));
}

.chord-diagram .mark-muted {
    fill: #ff6b6b;
    font-size: 18px;
    font-family: 'Inter', system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
    filter: drop-shadow(0 0 8px rgba(255,107,107,0.2));
}

.chord-diagram .nut {
    fill: #3a322a;
}

.chord-diagram .label-fret {
    fill: #d4a853;
    font-size: 18px;
    font-weight: 900;
    font-family: 'Inter', system-ui, sans-serif;
    text-anchor: end;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
}

.chord-diagram .label-note {
    fill: #6a5a4a;
    font-size: 8px;
    font-family: 'Inter', system-ui, sans-serif;
    text-anchor: middle;
    dominant-baseline: baseline;
    font-weight: 600;
}

/* ============================================================
   ИНФОРМАЦИЯ ОБ АККОРДЕ
   ============================================================ */
.chord-info {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #8a7a6a;
    line-height: 1.6;
    width: 100%;
    padding: 6px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(42,36,30,0.2);
}

.chord-info .notes {
    color: #b8aa9a;
    font-weight: 500;
}

.chord-info .notes span {
    display: inline-block;
    padding: 0 4px;
    color: #d4a853;
}

.chord-card .chord-description {
    font-size: 0.7rem;
    color: #6b5f55;
    margin-top: 4px;
    font-style: italic;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */
.chord-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.chord-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.chord-modal {
    background: #14110e;
    border: 2px solid #d4a853;
    border-radius: 24px;
    padding: 32px 40px 36px;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,0.9);
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.chord-modal-overlay.active .chord-modal {
    transform: scale(1);
    opacity: 1;
}

/* Кастомный скроллбар */
.chord-modal::-webkit-scrollbar {
    width: 4px;
}
.chord-modal::-webkit-scrollbar-track {
    background: transparent;
}
.chord-modal::-webkit-scrollbar-thumb {
    background: #3a322a;
    border-radius: 4px;
}
.chord-modal::-webkit-scrollbar-thumb:hover {
    background: #5a4a3a;
}
.chord-modal {
    scrollbar-width: thin;
    scrollbar-color: #3a322a transparent;
}

.chord-modal .modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    color: #8a7a6a;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    font-family: inherit;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
    margin-right: -12px;
    margin-top: -8px;
}

.chord-modal .modal-close:hover {
    color: #ede4d8;
    background: rgba(255,255,255,0.05);
}

.chord-modal .modal-close:active {
    transform: scale(0.9);
}

.chord-modal .modal-name {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ede4d8;
    margin-bottom: 2px;
    padding-right: 30px;
    clear: both;
}

.chord-modal .modal-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a7a6a;
    margin-bottom: 16px;
}

.chord-modal .modal-diagram {
    max-width: 300px;
    margin: 0 auto 16px;
    background: #1a1714;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #2a241e;
}

.chord-modal .modal-diagram svg {
    width: 100%;
    height: auto;
    max-width: 300px;
    display: block;
    margin: 0 auto;
}

.chord-modal .modal-fingers {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}

.chord-modal .modal-fingers .finger-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: rgba(212,168,83,0.1);
    border: 1px solid rgba(212,168,83,0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #d4a853;
}

.chord-modal .modal-notes {
    font-size: 0.95rem;
    color: #b8aa9a;
    margin-bottom: 8px;
}

.chord-modal .modal-notes strong {
    color: #d4a853;
    font-weight: 600;
}

.chord-modal .modal-desc {
    font-size: 0.85rem;
    color: #8a7a6a;
    line-height: 1.6;
    padding: 10px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid rgba(42,36,30,0.2);
    margin-top: 4px;
}

/* Блокировка скролла фона */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* ============================================================
   АДАПТИВ ДЛЯ МОДАЛЬНОГО ОКНА
   ============================================================ */
@media (max-width: 768px) {
    .chord-modal {
        padding: 24px 28px 28px;
        max-width: 420px;
        border-radius: 20px;
        max-height: 80vh;
    }
    .chord-modal .modal-name {
        font-size: 2.2rem;
        padding-right: 20px;
    }
    .chord-modal .modal-diagram {
        max-width: 250px;
        padding: 8px;
    }
    .chord-modal .modal-diagram svg {
        max-width: 250px;
    }
    .chord-modal .modal-close {
        font-size: 1.6rem;
        padding: 6px 10px;
        margin-right: -8px;
        margin-top: -4px;
    }
}

@media (max-width: 480px) {
    .chord-modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    .chord-modal {
        padding: 20px 18px 24px;
        max-width: 100%;
        max-height: 80vh;
        border-radius: 16px;
        border-width: 1.5px;
        margin: 0;
    }
    .chord-modal .modal-name {
        font-size: 1.8rem;
        padding-right: 16px;
    }
    .chord-modal .modal-type {
        font-size: 0.65rem;
        margin-bottom: 10px;
    }
    .chord-modal .modal-diagram {
        max-width: 200px;
        padding: 6px;
        margin-bottom: 10px;
    }
    .chord-modal .modal-diagram svg {
        max-width: 200px;
    }
    .chord-modal .modal-notes {
        font-size: 0.8rem;
    }
    .chord-modal .modal-desc {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    .chord-modal .modal-fingers .finger-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
    .chord-modal .modal-close {
        font-size: 1.4rem;
        padding: 4px 8px;
        margin-right: -6px;
        margin-top: -2px;
    }
}

@media (max-width: 380px) {
    .chord-modal-overlay {
        padding-top: 10px;
        padding-left: 6px;
        padding-right: 6px;
    }
    .chord-modal {
        padding: 16px 14px 20px;
        border-radius: 14px;
        max-height: 75vh;
    }
    .chord-modal .modal-name {
        font-size: 1.5rem;
    }
    .chord-modal .modal-diagram {
        max-width: 160px;
        padding: 4px;
    }
    .chord-modal .modal-diagram svg {
        max-width: 160px;
    }
    .chord-modal .modal-notes {
        font-size: 0.7rem;
    }
    .chord-modal .modal-desc {
        font-size: 0.65rem;
        padding: 6px 10px;
    }
    .chord-modal .modal-fingers .finger-badge {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
    .chord-modal .modal-close {
        font-size: 1.2rem;
        padding: 3px 6px;
        margin-right: -4px;
        margin-top: -2px;
    }
}

@media (min-width: 1024px) {
    .chord-modal {
        max-width: 520px;
        padding: 36px 44px 40px;
        max-height: 80vh;
    }
    .chord-modal .modal-name {
        font-size: 3.2rem;
    }
    .chord-modal .modal-diagram {
        max-width: 340px;
    }
    .chord-modal .modal-diagram svg {
        max-width: 340px;
    }
}

/* ============================================================
   ⭐ 4K ЭКРАНЫ (3840x2160 и выше)
   ============================================================ */
@media (min-width: 2560px) {
    .chords-wrapper {
        max-width: 1800px;
        padding: 24px 32px 48px;
    }
    
    .chords-header h1 {
        font-size: 3.2rem;
        letter-spacing: 6px;
    }
    
    .chords-header p {
        font-size: 1.4rem;
        max-width: 800px;
    }
    
    .chords-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 32px;
    }
    
    .chord-card {
        padding: 32px 28px 36px;
        border-radius: 28px;
        border-width: 3px;
    }
    
    .chord-card .chord-name {
        font-size: 2.8rem;
    }
    
    .chord-card .chord-tag {
        font-size: 0.7rem;
        padding: 4px 18px;
        border-radius: 16px;
    }
    
    .chord-diagram-wrapper {
        max-width: 380px;
        padding: 16px;
        border-radius: 16px;
    }
    
    .chord-info {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    .chord-card .chord-description {
        font-size: 0.9rem;
    }
    
    .filter-btn {
        font-size: 1rem;
        padding: 12px 28px;
        border-radius: 30px;
        border-width: 3px;
    }
    
    .filter-btn .count {
        font-size: 0.8rem;
        padding: 0 12px;
        min-width: 28px;
    }
    
    .chord-legend {
        padding: 20px 32px;
        border-radius: 16px;
        gap: 32px;
    }
    
    .chord-legend .legend-item {
        font-size: 1rem;
        gap: 10px;
    }
    
    .chord-legend .legend-dot {
        width: 22px;
        height: 22px;
    }
    
    .chord-legend .legend-dot.string {
        width: 6px;
        height: 28px;
    }
    
    .chord-seo-text {
        padding: 32px 40px;
        font-size: 1.1rem;
        border-radius: 16px;
    }
    
    .chord-seo-text h2 {
        font-size: 1.6rem;
    }
    
    .chord-seo-text h3 {
        font-size: 1.3rem;
    }

    /* Модальное окно на 4K */
    .chord-modal {
        max-width: 700px;
        padding: 48px 56px 52px;
        border-radius: 32px;
        border-width: 3px;
    }
    
    .chord-modal .modal-name {
        font-size: 4rem;
    }
    
    .chord-modal .modal-type {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }
    
    .chord-modal .modal-diagram {
        max-width: 420px;
        padding: 16px;
    }
    
    .chord-modal .modal-diagram svg {
        max-width: 420px;
    }
    
    .chord-modal .modal-notes {
        font-size: 1.2rem;
    }
    
    .chord-modal .modal-desc {
        font-size: 1.1rem;
        padding: 14px 20px;
    }
    
    .chord-modal .modal-fingers .finger-badge {
        font-size: 1rem;
        padding: 6px 20px;
        border-radius: 28px;
    }
    
    .chord-modal .modal-close {
        font-size: 2.4rem;
        padding: 12px 16px;
    }
}

/* ============================================================
   5K+ ЭКРАНЫ (5120x2880 и выше)
   ============================================================ */
@media (min-width: 3840px) {
    .chords-wrapper {
        max-width: 2400px;
        padding: 32px 48px 64px;
    }
    
    .chords-header h1 {
        font-size: 4rem;
        letter-spacing: 8px;
    }
    
    .chords-header p {
        font-size: 1.8rem;
        max-width: 1000px;
    }
    
    .chords-grid {
        grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
        gap: 40px;
    }
    
    .chord-card {
        padding: 40px 36px 44px;
        border-radius: 32px;
        border-width: 4px;
    }
    
    .chord-card .chord-name {
        font-size: 3.6rem;
    }
    
    .chord-card .chord-tag {
        font-size: 0.85rem;
        padding: 6px 22px;
        border-radius: 18px;
    }
    
    .chord-diagram-wrapper {
        max-width: 480px;
        padding: 20px;
        border-radius: 20px;
        border-width: 2px;
    }
    
    .chord-info {
        font-size: 1.1rem;
        padding: 14px 20px;
        border-radius: 12px;
    }
    
    .chord-card .chord-description {
        font-size: 1.1rem;
    }
    
    .filter-btn {
        font-size: 1.2rem;
        padding: 16px 36px;
        border-radius: 35px;
        border-width: 3px;
    }
    
    .filter-btn .count {
        font-size: 0.9rem;
        padding: 0 14px;
        min-width: 32px;
    }
    
    .chord-legend {
        padding: 24px 40px;
        border-radius: 20px;
        gap: 40px;
    }
    
    .chord-legend .legend-item {
        font-size: 1.2rem;
        gap: 12px;
    }
    
    .chord-legend .legend-dot {
        width: 28px;
        height: 28px;
    }
    
    .chord-legend .legend-dot.open,
    .chord-legend .legend-dot.muted {
        font-size: 14px;
        line-height: 28px;
    }
    
    .chord-legend .legend-dot.string {
        width: 8px;
        height: 36px;
    }
    
    .chord-seo-text {
        padding: 40px 48px;
        font-size: 1.3rem;
        border-radius: 20px;
    }
    
    .chord-seo-text h2 {
        font-size: 2rem;
    }
    
    .chord-seo-text h3 {
        font-size: 1.6rem;
    }

    /* Модальное окно на 5K */
    .chord-modal {
        max-width: 900px;
        padding: 56px 64px 60px;
        border-radius: 40px;
        border-width: 4px;
    }
    
    .chord-modal .modal-name {
        font-size: 5rem;
    }
    
    .chord-modal .modal-type {
        font-size: 1.3rem;
        letter-spacing: 4px;
    }
    
    .chord-modal .modal-diagram {
        max-width: 540px;
        padding: 20px;
        border-radius: 20px;
    }
    
    .chord-modal .modal-diagram svg {
        max-width: 540px;
    }
    
    .chord-modal .modal-notes {
        font-size: 1.4rem;
    }
    
    .chord-modal .modal-desc {
        font-size: 1.3rem;
        padding: 16px 24px;
    }
    
    .chord-modal .modal-fingers .finger-badge {
        font-size: 1.2rem;
        padding: 8px 24px;
        border-radius: 32px;
        gap: 8px;
    }
    
    .chord-modal .modal-close {
        font-size: 3rem;
        padding: 16px 20px;
    }

    .chord-filters {
        padding: 20px;
        border-radius: 16px;
        gap: 12px;
    }
}

/* ============================================================
   ОБЩАЯ АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 768px) {
    .chords-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    .chords-header h1 {
        font-size: 1.6rem;
    }
    .chord-card .chord-name {
        font-size: 1.6rem;
    }
    .chord-diagram-wrapper {
        max-width: 220px;
    }
    .chord-legend {
        gap: 12px;
        padding: 10px 14px;
    }
    .chord-legend .legend-item {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .chords-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .chords-header h1 {
        font-size: 1.3rem;
    }
    .chords-header p {
        font-size: 0.8rem;
    }
    .chord-card .chord-name {
        font-size: 1.4rem;
    }
    .chord-diagram-wrapper {
        max-width: 200px;
        padding: 4px;
    }
    .filter-btn {
        font-size: 0.65rem;
        padding: 5px 12px;
    }
    .chord-filters {
        gap: 4px;
        padding: 8px;
    }
    .chord-legend {
        gap: 8px;
        padding: 8px 10px;
    }
    .chord-legend .legend-item {
        font-size: 0.55rem;
    }
    .chord-seo-text {
        padding: 14px 16px;
        font-size: 0.75rem;
    }
    .chord-seo-text h2 {
        font-size: 0.9rem;
    }
    .chord-seo-text h3 {
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .chord-card {
        padding: 14px 12px 18px;
    }
    .chord-card .chord-name {
        font-size: 1.2rem;
    }
    .chord-diagram-wrapper {
        max-width: 170px;
        padding: 4px;
    }
    .filter-btn {
        font-size: 0.55rem;
        padding: 4px 10px;
    }
}

/* ============================================================
   PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .chord-card,
    .chord-modal,
    .chord-modal-overlay,
    .filter-btn {
        transition: none !important;
    }
    .chord-card:hover,
    .filter-btn:hover {
        transform: none !important;
    }
    .chord-modal-overlay.active .chord-modal {
        transform: none !important;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .chord-filters,
    .chord-legend,
    .chord-modal-overlay {
        display: none !important;
    }
    .chords-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .chord-card {
        break-inside: avoid;
        border-color: #666;
    }
    .chord-card .chord-name {
        color: #000;
    }
    .chord-card .chord-tag {
        border: 1px solid #999;
    }
}