.album-stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.album-stat-card h6 {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.album-meta-badges .badge {
    background: #f3f4f6;
    color: #444;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    margin-right: 0.35rem;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.rating-bar-row .bar-wrap {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-row .bar-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 4px;
}

.reaction-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reaction-chip {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 20px;
    padding: 0.25rem 0.6rem;
    font-size: 0.9rem;
}

.reaction-picker {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.reaction-picker button {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    padding: 0.2rem 0.55rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.reaction-picker button:hover {
    background: #c5e8f2;
    border-color: var(--color-accent);
}

.album-photo-item .reaction-cloud {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.album-photo-item .reaction-picker {
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.album-photo-item .reaction-picker .react-btn {
    flex: 0 0 auto;
    padding: 0.15rem 0.35rem;
    font-size: 0.95rem;
    line-height: 1;
}

.album-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.album-photo-item {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.album-photo-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.album-photo-open:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.album-photo-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.album-photo-item .photo-body {
    padding: 0.75rem;
}

.album-photo-meta-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
}

.album-photo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    border: 1px solid #dfe3e7;
    background: #f8f9fa;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    color: #5d6570;
}

.album-photo-action {
    width: 30px;
    height: 30px;
    border: 1px solid #dfe3e7;
    background: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f5965;
    text-decoration: none;
    cursor: pointer;
}

.album-photo-action:hover {
    background: #eaf4f8;
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.album-photo-caption {
    margin-bottom: 0.35rem;
}

.album-photo-inline-status {
    min-height: 1rem;
    font-size: 0.78rem;
    color: #7a8591;
    margin-bottom: 0.25rem;
}

.album-photo-inline-status.is-success {
    color: #22824a;
}

.album-photo-inline-status.is-error {
    color: #b64141;
}

.lifehack-content {
    line-height: 1.7;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.lifehack-content p:last-child {
    margin-bottom: 0;
}

.album-comments-block {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    margin: 0;
}

.album-page-stats-row {
    align-items: stretch;
}

.album-page-stats-row .album-comments-block {
    flex: 1 1 auto;
}

.album-photo-rating-stars {
    font-size: 1rem;
    line-height: 1;
}

.album-photo-rating-stars .rating-star {
    margin-right: 0.1rem;
}

.album-brief-card__text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text, #2f3439);
    white-space: pre-wrap;
}

.album-brief-card__empty {
    font-style: italic;
}

[data-theme="dark"] .album-brief-card__text {
    color: var(--color-text);
}

[data-theme="dark"] .album-stat-card,
[data-theme="dark"] .album-photo-item,
[data-theme="dark"] .album-comments-block {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .album-stat-card h6 {
    color: var(--color-text-muted);
}

[data-theme="dark"] .album-meta-badges .badge {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

[data-theme="dark"] .rating-bar-row .bar-wrap {
    background: var(--color-bg-muted);
}

[data-theme="dark"] .reaction-chip {
    background: var(--color-bg-subtle);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .reaction-picker button {
    background: var(--color-bg-subtle);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .album-photo-badge,
[data-theme="dark"] .album-photo-action {
    background: var(--color-bg-subtle);
    border-color: var(--color-border);
    color: var(--color-text);
}

[data-theme="dark"] .album-photo-inline-status {
    color: var(--color-text-muted);
}

[data-theme="dark"] .album-photo-inline-status.is-success {
    color: #5ec184;
}

[data-theme="dark"] .album-photo-inline-status.is-error {
    color: #f08d8d;
}

.album-photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.album-photo-viewer[hidden] {
    display: none !important;
}

.album-photo-viewer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 18, 24, 0.88);
}

.album-photo-viewer__dialog {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.album-photo-viewer__close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.album-photo-viewer__close:hover,
.album-photo-viewer__close:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
}

.album-photo-viewer__nav {
    position: fixed;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.album-photo-viewer__nav:hover,
.album-photo-viewer__nav:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
}

.album-photo-viewer__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.album-photo-viewer__nav--prev {
    left: 1rem;
}

.album-photo-viewer__nav--next {
    right: 1rem;
}

.album-photo-viewer__nav[hidden] {
    display: none !important;
}

@media (max-width: 575.98px) {
    .album-photo-viewer__nav {
        width: 2.35rem;
        height: 2.35rem;
    }

    .album-photo-viewer__nav--prev {
        left: 0.5rem;
    }

    .album-photo-viewer__nav--next {
        right: 0.5rem;
    }
}

.album-photo-viewer__img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 3rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    cursor: default;
    user-select: none;
}

.album-photo-viewer__caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    text-align: center;
    max-width: 100%;
}

.album-photo-viewer__counter {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    text-align: center;
}

body.album-photo-viewer-open {
    overflow: hidden;
}
