/* ===== Photos 242 (static/photos242.js) ===== */
#tab-photos242 {
    --p242-card-w: 168px;
    --p242-gap: 14px;
    padding: 16px 22px;
}

#tab-photos242 .p242-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 14px;
}

#tab-photos242 .p242-search {
    display: flex; align-items: center; gap: 8px;
    flex: 1 1 320px; max-width: 520px;
    padding: 0 12px; height: 36px;
    background: var(--surface); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
}
#tab-photos242 .p242-search:focus-within { border-color: var(--text); }
#tab-photos242 .p242-search svg { width: 16px; height: 16px; flex: none; }
#tab-photos242 .p242-search input {
    flex: 1; min-width: 0; height: 100%;
    border: none; outline: none; background: transparent;
    color: var(--text); font: inherit; font-size: 13px;
}

#tab-photos242 .p242-status { font-size: 12px; color: var(--text-secondary); }

#tab-photos242 .p242-btn {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: auto; height: 36px; padding: 0 14px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font: inherit; font-size: 13px; cursor: pointer;
}
#tab-photos242 .p242-btn:hover { border-color: var(--text); }
#tab-photos242 .p242-btn:disabled { opacity: .5; cursor: progress; }
#tab-photos242 .p242-btn svg { width: 15px; height: 15px; }

#tab-photos242 .p242-grid {
    display: grid; gap: var(--p242-gap);
    grid-template-columns: repeat(auto-fill, minmax(var(--p242-card-w), 1fr));
}

#tab-photos242 .p242-card {
    display: flex; flex-direction: column;
    background: var(--surface); color: var(--text); text-decoration: none;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition);
}
#tab-photos242 .p242-card:hover { border-color: var(--text); box-shadow: var(--shadow-md); }

#tab-photos242 .p242-img {
    position: relative; display: block; aspect-ratio: 3 / 4;
    background: var(--bg); color: var(--border);
}
#tab-photos242 .p242-img svg {
    position: absolute; inset: 0; margin: auto; width: 45%; height: 45%;
}
#tab-photos242 .p242-img img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}

#tab-photos242 .p242-name {
    padding: 8px 10px; font-size: 12px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Scroll trigger for the next page of cards (photos242.js _appendPage). */
#tab-photos242 .p242-sentinel { grid-column: 1 / -1; height: 1px; }

#tab-photos242 .p242-empty {
    grid-column: 1 / -1; padding: 40px; text-align: center;
    color: var(--text-secondary); font-size: 13px;
}

@media (max-width: 640px) {
    #tab-photos242 { --p242-card-w: 130px; --p242-gap: 10px; padding: 12px 16px; }
}
