.ag-wrap {
    width: 100%;
    margin: 0 auto 24px;
    text-align: left;
    box-sizing: border-box;
}
.ag-wrap *, .ag-wrap *::before, .ag-wrap *::after { box-sizing: border-box; }
.ag-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 0 12px;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
}
.ag-heading span { font-size: 14px; font-weight: normal; }
.ag-albums, .ag-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 14px;
    align-items: start;
}
.ag-year {
    grid-column: 1 / -1;
    padding: 14px 10px 3px;
    border-bottom: 1px solid #e4e4e4;
    font-size: 17px;
    font-weight: 600;
}
.ag-album { min-width: 0; text-align: center; }
.ag-album-link { display: block; color: inherit; text-decoration: none; }
.ag-album img, .ag-photo img {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: cover;
    margin: 0 auto;
}
.ag-album img { box-shadow: 0 2px 7px rgba(0,0,0,.22); }
.ag-caption { display: block; padding: 7px 3px 0; line-height: 1.35; }
.ag-no-thumb {
    display: flex;
    width: 150px;
    height: 150px;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: #eee;
    color: #666;
}
.ag-photos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ag-photo { display: block; }
.ag-photo img { box-shadow: 0 1px 5px rgba(0,0,0,.18); }
.ag-back { margin: 0 0 14px; }
.ag-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 22px 0; }
.ag-pagination a {
    display: inline-block;
    min-width: 30px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    text-align: center;
    text-decoration: none;
}
.ag-pagination a.current { background: #333; border-color: #333; color: #fff; }
.ag-message { margin: 12px 0; padding: 10px; }
.ag-error { color: #9b1c1c; background: #fff0f0; }
@media (max-width: 480px) {
    .ag-albums, .ag-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 8px; }
    .ag-heading { font-size: 16px; }
}

/* Album-card controls */
.ag-album-image {
    position: relative;
    display: block;
    width: 150px;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.ag-album-image > img { margin: 0; }
.ag-album-image > .ag-no-thumb { width: 100%; }
.ag-album-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .18s ease, transform .18s ease;
}
.ag-album-link:hover .ag-album-actions,
.ag-album-link:focus .ag-album-actions,
.ag-album-link:focus-visible .ag-album-actions {
    opacity: 1;
    transform: translateY(0);
}
.ag-album-icon {
    display: flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .72);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.ag-album-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ag-icon-play svg { fill: currentColor; stroke: none; width: 17px; height: 17px; }
@media (hover: none) {
    .ag-album-actions { opacity: 1; transform: none; }
}
