.ar-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: var(--page-padding);
    background-color: var(--bg-primary);
    position: relative;
}

#main-content .ar-header:first-of-type {
    margin-top: var(--navbar-height);
}

.ar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--page-padding);
    right: var(--page-padding);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-subtle), transparent);
    pointer-events: none;
}

.ar-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
}

.ar-title {
    font-size: clamp(2.4rem, 4.5vw, 6rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin: 0 0 clamp(1.4rem, 2.5vw, 3rem);
}

.ar-desc {
    font-size: clamp(1rem, 1.3vw, 1.8rem);
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 clamp(0.8rem, 1.5vw, 1.8rem);
}

.ar-note {
    font-size: clamp(0.9rem, 1.1vw, 1.5rem);
    color: var(--text-muted);
    margin: 0 0 clamp(2.5rem, 4vw, 4.5rem);
}

.ar-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    max-width: 900px;
}

.ar-filter-input {
    flex: 1 1 120px;
    max-width: 160px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: clamp(0.9rem, 1.1vw, 1.3rem);
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ar-filter-input::placeholder {
    color: var(--text-muted);
}

.ar-filter-input:focus {
    border-color: var(--border-primary);
    background: rgba(212, 169, 41, 0.04);
    box-shadow: 0 0 0 3px rgba(212, 169, 41, 0.08);
}

.ar-filter-reset {
    flex: 0 0 auto;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ar-filter-reset:hover {
    border-color: var(--border-primary);
    color: var(--gold-core);
    background: rgba(212, 169, 41, 0.06);
}

.ar-section {
    width: 100%;
    padding-inline: var(--page-padding);
    padding-block: clamp(4rem, 8vh, 9rem);
    background-color: var(--bg-surface);
    position: relative;
}

.ar-section-inner {
    max-width: 2200px;
    margin-inline: auto;
}

.ar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(1.5rem, 2.2vw, 3rem);
    align-items: start;
}

.ar-card-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 380px;
    width: 100%;
    margin-inline: auto;
    cursor: pointer;
}


.ar-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-muted);
    font-size: 1.6rem;
    font-style: italic;
}

.ar-back {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: var(--page-padding);
    padding-block: clamp(3rem, 6vh, 6rem);
    background-color: var(--bg-surface);
    position: relative;
}

.ar-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--page-padding);
    right: var(--page-padding);
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-subtle), transparent);
    pointer-events: none;
}

.ar-back-icon {
    transform: scaleX(-1);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1920px) {
    :root {
        --navbar-height: 110px;
    }

    .ar-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    :root {
        --navbar-height: 90px;
    }

    .ar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    :root {
        --navbar-height: 80px;
    }

    .ar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(1.2rem, 2vw, 2rem);
    }

    .ar-desc br {
        display: none;
    }

    .ar-filter-input {
        max-width: 45%;
    }
}

@media (max-width: 640px) {
    :root {
        --navbar-height: 70px;
    }

    .ar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ar-card-wrap .card-cutout {
        height: clamp(70px, 18vw, 110px);
    }

    .ar-filter-input {
        flex: 1 1 calc(50% - 0.35rem);
        max-width: none;
    }
}

@media (max-width: 420px) {
    .ar-grid {
        grid-template-columns: 1fr;
    }

    .ar-filter-input {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* ----- Folder View ----- */
.ar-section--folders {
    display: none;
}

@media (max-width: 900px) {
    .ar-section:not(.ar-section--folders) {
        display: none;
    }

    .ar-section--folders {
        display: block;
    }

    .ar-folders {
        display: flex;
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--border-subtle);
    }

    .ar-folder {
        border-bottom: 1px solid var(--border-subtle);
    }

    .ar-folder-header {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 0.25rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-primary);
        font-family: inherit;
        font-size: clamp(1rem, 3.5vw, 1.25rem);
        font-weight: 500;
        letter-spacing: 0.01em;
        text-align: left;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .ar-folder-header:active {
        color: var(--gold-core);
    }

    .ar-folder-name {
        flex: 1;
    }

    .ar-folder-count {
        font-size: 0.8em;
        color: var(--text-muted);
        background: var(--bg-elevated);
        border: 1px solid var(--border-subtle);
        border-radius: 999px;
        padding: 0.1em 0.55em;
        line-height: 1.6;
        flex-shrink: 0;
    }

    .ar-folder-chevron {
        width: 1.1em;
        height: 1.1em;
        flex-shrink: 0;
        color: var(--text-muted);
        transition: transform 0.22s ease, color 0.15s ease;
    }

    .ar-folder-body {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
    }

    .ar-folder--l1[data-open]>.ar-folder-body {
        max-height: none;
        overflow: visible;
    }

    .ar-folder--l2 {
        border-bottom: none;
        border-top: 1px solid var(--border-subtle);
    }

    .ar-folder-header--l2 {
        padding-left: 1.1rem;
        font-size: clamp(0.88rem, 3.1vw, 1.1rem);
        font-weight: 400;
        color: var(--text-secondary);
    }

    .ar-folder--l1[data-open]>.ar-folder-header {
        color: var(--gold-core);
    }

    .ar-folder--l1[data-open]>.ar-folder-header .ar-folder-chevron {
        transform: rotate(90deg);
        color: var(--gold-core);
    }

    .ar-folder--l2[data-open]>.ar-folder-header--l2 {
        color: var(--text-primary);
    }

    .ar-folder--l2[data-open]>.ar-folder-header--l2 .ar-folder-chevron {
        transform: rotate(90deg);
        color: var(--text-primary);
    }

    .ar-folder-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 0.25rem 0.85rem 1.1rem;
        border-top: 1px solid var(--border-subtle);
        cursor: pointer;
        transition: background 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        gap: 0.75rem;
    }

    .ar-folder-row--l2 {
        padding-left: 2rem;
    }

    .ar-folder-row:active {
        background: rgba(212, 169, 41, 0.05);
    }

    .ar-row-event {
        flex: 1;
        font-size: clamp(0.85rem, 3.2vw, 1.05rem);
        color: var(--text-secondary);
        line-height: 1.3;
    }

    .ar-row-pos {
        font-size: clamp(0.78rem, 2.8vw, 0.92rem);
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
        flex-shrink: 0;
        letter-spacing: 0.03em;
    }

    .ar-row-pos--gold {
        color: var(--gold-core);
    }

    .ar-row-pos--silver {
        color: #c0c0c0;
    }

    .ar-row-pos--bronze {
        color: #cd7f32;
    }
}