/* Site-wide visual language, loaded after every page stylesheet.
 *
 * Public pages: plain white, blocks separated by space and 1px lines, no
 * nested cards. Management pages: one light-gray canvas, one layer of white
 * panels outlined by a 1px line instead of shadows.
 * Color: teal is the only accent (primary buttons, links, selection).
 * Every other button is neutral; delete only turns red on hover. Status is
 * a small colored dot next to neutral text.
 */

:root {
    --yuimg-page-bg: #fff;
    --yuimg-manage-bg: #f7f7f8;
    --yuimg-empty-bg: #f9fafb;
    --yuimg-empty-line: #e5e7eb;
    --yuimg-card-bg: #fff;
    --yuimg-line: #e5e7eb;
    --yuimg-line-strong: #d1d5db;
    --yuimg-surface-shadow: none;

    --yuimg-ink: #111827;
    --yuimg-heading: #111827;
    --yuimg-text: #1f2937;
    --yuimg-muted: #6b7280;
    --yuimg-subtle: #6b7280;
    --yuimg-border: #e5e7eb;
    --yuimg-soft-bg: #f9fafb;
    --yuimg-surface: #f3f4f6;
    --yuimg-accent: #111827;
    --yuimg-accent-soft: #f3f4f6;

    --yuimg-c-primary: #111827;
    --yuimg-c-primary-soft: #f3f4f6;
    --yuimg-c-primary-line: #d1d5db;
    --yuimg-c-info: #2563eb;
    --yuimg-c-info-soft: #eff6ff;
    --yuimg-c-info-line: #bfdbfe;
    --yuimg-c-edit: #7c3aed;
    --yuimg-c-edit-soft: #f5f3ff;
    --yuimg-c-edit-line: #ddd6fe;
    --yuimg-c-success: #16a34a;
    --yuimg-c-success-soft: #f0fdf4;
    --yuimg-c-success-line: #bbf7d0;
    --yuimg-c-warning: #d97706;
    --yuimg-c-warning-soft: #fffbeb;
    --yuimg-c-warning-line: #fde68a;
    --yuimg-c-danger: #dc2626;
    --yuimg-c-danger-soft: #fef2f2;
    --yuimg-c-danger-line: #fecaca;
    --yuimg-c-neutral: #4b5563;
    --yuimg-c-neutral-soft: #f3f4f6;
    --yuimg-c-neutral-line: #e5e7eb;
}

/* ── Canvas ─────────────────────────────────────────────────── */
body {
    background: var(--yuimg-page-bg);
    color: var(--yuimg-text);
}

body.yuimg-manage-view {
    background: var(--yuimg-manage-bg);
}

.yuimg-site-header {
    border-bottom: 1px solid var(--yuimg-line);
    background: rgba(255, 255, 255, .92);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(10px);
}

.yuimg-site-footer {
    border-top: 1px solid var(--yuimg-line);
    background: #fff;
}

.yuimg-search-band {
    background: transparent;
}

/* ── Public pages: no cards, just content on white ──────────── */
.yuimg-site-shell .yuimg-site-content > main,
.yuimg-site-shell .yuimg-site-content > :is(.yuimg-status-page, .yuimg-share-password-page) {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.yuimg-site-shell .yuimg-site-content > main {
    padding: 0;
}

/* Home: the uploader is the only framed block; the rest are sections. */
.yuimg-home .yuimg-quick {
    margin-bottom: 48px;
    padding: 20px;
    border: 1px solid var(--yuimg-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

.yuimg-home .yuimg-mine,
.yuimg-home .yuimg-wall-section {
    margin-bottom: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.yuimg-home {
    --home-surface: #f3f4f6;
    --home-line: #e5e7eb;
    --home-ink: #111827;
    --home-muted: #6b7280;
}

.yuimg-quick-drop {
    border-color: var(--yuimg-line-strong);
    background: var(--yuimg-soft-bg);
}

.yuimg-quick-drop:hover,
.yuimg-quick-drop.is-over {
    border-color: var(--yuimg-accent);
    background: var(--yuimg-accent-soft);
}

.yuimg-quick-privacy button.is-active {
    color: var(--yuimg-ink);
}

/* Cards in public lists: a hairline, no shadow until hover. */
:is(.yuimg-public-gallery-card, .yuimg-public-share-card, .yuimg-public-article-card,
    .yuimg-related-articles article, .yuimg-author-post-card, .yuimg-article-navigation > a) {
    border-color: var(--yuimg-line);
    box-shadow: none;
}

:is(.yuimg-gallery-card, .yuimg-mine-open) {
    box-shadow: none;
}

.yuimg-article-author-card {
    background: var(--yuimg-soft-bg);
}

/* Directory counters read as plain numbers. */
.yuimg-public-counts > div {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 20px 0 0;
}

.yuimg-public-counts > div + div {
    padding-left: 20px;
    border-left: 1px solid var(--yuimg-line);
}

.yuimg-public-counts dd {
    color: var(--yuimg-ink);
}

/* ── Empty states ───────────────────────────────────────────── */
.yuimg-mine-empty,
.yuimg-wall-empty,
.yuimg-public-empty,
.yuimg-author-empty,
.yuimg-home-empty,
.yuimg-gallery-empty,
body.yuimg-manage-view .yuimg-empty,
body.yuimg-manage-view .yuimg-file-empty {
    border: 1px dashed var(--yuimg-empty-line);
    background: var(--yuimg-empty-bg);
    color: var(--yuimg-muted);
}

/* ── Management: gray canvas, one layer of outlined white panels ── */
body.yuimg-manage-view :is(
    .yuimg-sidebar, .yuimg-file-sidebar,
    .yuimg-toolbar, .yuimg-file-toolbar,
    .yuimg-share-admin-page > .yuimg-admin-heading, .yuimg-system-hero,
    .yuimg-card, .yuimg-file-card, .yuimg-share-row,
    .yuimg-system-card, .yuimg-system-stat-grid article, .yuimg-system-user-card, .yuimg-system-category-row,
    .yuimg-system-tabs
) {
    border: 1px solid var(--yuimg-line);
    background: #fff;
    box-shadow: none;
}

body.yuimg-manage-view :is(.yuimg-sidebar, .yuimg-file-sidebar) {
    box-sizing: border-box;
    padding: 12px 10px;
    border-radius: 12px;
}

body.yuimg-manage-view :is(.yuimg-toolbar, .yuimg-file-toolbar, .yuimg-share-admin-page > .yuimg-admin-heading, .yuimg-system-hero) {
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 12px;
}

body.yuimg-manage-view :is(.yuimg-card, .yuimg-file-card):hover {
    border-color: var(--yuimg-line-strong);
}

body.yuimg-manage-view :is(.yuimg-card, .yuimg-file-card).is-selected {
    border-color: var(--yuimg-accent);
    box-shadow: 0 0 0 1px var(--yuimg-accent);
}

body.yuimg-manage-view .yuimg-pager .button,
body.yuimg-manage-view .yuimg-file-pager .button {
    background: #fff;
}

body.yuimg-manage-view .yuimg-system-tabs button.is-active {
    background: var(--yuimg-surface);
    color: var(--yuimg-ink);
    box-shadow: none;
}

/* ── Button system: primary (ink) / secondary (outline) / ghost ──
   #yuimg-btn-id matches nothing; it lifts each list to ID specificity so
   these beat page rules such as body.yuimg-manage-view .yuimg-admin-page .button. */
:is(.button, .yuimg-header-login, .yuimg-search-login-button, .yuimg-status-button, .yuimg-status-link, #yuimg-btn-id) {
    display: inline-flex;
    min-height: 34px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

:is(.button-small, #yuimg-btn-id) {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

:is(.yuimg-share-password-form button, .login-modal-submit, .yuimg-register-submit, #yuimg-btn-id) {
    min-height: 40px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    box-shadow: none;
}

:is(.button, .yuimg-status-link, #yuimg-btn-id):not(.button-primary) {
    border: 1px solid var(--yuimg-line-strong);
    background: #fff;
    color: var(--yuimg-ink);
}

:is(.button, .yuimg-status-link, #yuimg-btn-id):not(.button-primary):is(:hover, :focus-visible):not(:disabled) {
    border-color: #9ca3af;
    background: var(--yuimg-soft-bg);
    color: var(--yuimg-ink);
}

:is(.button-primary, .yuimg-header-login, .yuimg-search-login-button, .yuimg-status-button,
    .yuimg-share-password-form button, .login-modal-submit, .yuimg-register-submit, #yuimg-btn-id) {
    border: 1px solid var(--yuimg-ink);
    background: var(--yuimg-ink);
    color: #fff;
}

:is(.button-primary, .yuimg-header-login, .yuimg-search-login-button, .yuimg-status-button,
    .yuimg-share-password-form button, .login-modal-submit, .yuimg-register-submit, #yuimg-btn-id):is(:hover, :focus-visible):not(:disabled) {
    border-color: #374151;
    background: #374151;
    color: #fff;
}

:is(.button, .button-primary, .login-modal-submit, .yuimg-register-submit, #yuimg-btn-id):disabled {
    opacity: .5;
    cursor: not-allowed;
}

:is(.button-link, #yuimg-btn-id):not(.button) {
    min-height: 28px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--yuimg-muted);
    font-size: 13px;
    text-decoration: none;
    box-shadow: none;
}

:is(.button-link, #yuimg-btn-id):not(.button):is(:hover, :focus-visible) {
    background: var(--yuimg-surface);
    color: var(--yuimg-ink);
}

/* Segmented controls and the search field share the 6–8px radius. */
.yuimg-quick-privacy,
body.yuimg-manage-view .yuimg-system-tabs {
    border-radius: 8px;
}

.yuimg-quick-privacy button,
body.yuimg-manage-view .yuimg-system-tabs button {
    border-radius: 6px;
}

.yuimg-header-search .yuimg-global-search-form,
.yuimg-global-search-form {
    border-radius: 8px;
}

/* ── Buttons: neutral by default, red only when deleting ────── */
:is(
    .yuimg-mine-copy, .yuimg-mine-delete,
    [data-action="copy"], [data-action="preview"], [data-action="edit"], [data-copy-variant],
    .yuimg-resource-variant-url a, #yuimg-file-copy, #yuimg-file-download,
    [data-edit-file], #yuimg-manage-group, #yuimg-bulk-toggle, #yuimg-new-group,
    [data-bulk-op], .button-link-delete, #yuimg-resource-delete,
    #yuimg-group-cancel, #yuimg-upload-cancel,
    #yuimg-file-confirm-cancel, .yuimg-file-modal-close,
    [data-choice="cancel"], [data-answer="no"]
) {
    border: 1px solid var(--yuimg-line);
    background: #fff;
    color: #374151;
    box-shadow: none;
    transition: background .15s, border-color .15s, color .15s;
}

:is(
    .yuimg-mine-copy, .yuimg-mine-delete,
    [data-action="copy"], [data-action="preview"], [data-action="edit"], [data-copy-variant],
    .yuimg-resource-variant-url a, #yuimg-file-copy, #yuimg-file-download,
    [data-edit-file], #yuimg-manage-group, #yuimg-bulk-toggle, #yuimg-new-group,
    [data-bulk-op], .button-link-delete, #yuimg-resource-delete,
    #yuimg-group-cancel, #yuimg-upload-cancel,
    #yuimg-file-confirm-cancel, .yuimg-file-modal-close,
    [data-choice="cancel"], [data-answer="no"]
):is(button, a):is(:hover, :focus-visible):not(:disabled) {
    border-color: var(--yuimg-line-strong);
    background: var(--yuimg-soft-bg);
    color: var(--yuimg-ink);
}

:is(.yuimg-mine-delete, [data-bulk-op="delete"], .button-link-delete, #yuimg-resource-delete):is(button, a):is(:hover, :focus-visible):not(:disabled) {
    border-color: var(--yuimg-c-danger-line);
    background: var(--yuimg-c-danger-soft);
    color: var(--yuimg-c-danger);
}

#yuimg-bulk-toggle[aria-pressed="true"] {
    border-color: var(--yuimg-ink);
    background: var(--yuimg-ink);
    color: #fff;
}

/* ── Status: colored dot + neutral text ─────────────────────── */
/* #yuimg-status-id matches nothing; it lifts the list to ID specificity so
   the dot style beats rules such as .yuimg-tag.is-success in admin.css. */
:is(.yuimg-tag, .yuimg-mine-badge, .yuimg-invite-status, .yuimg-system-health, .yuimg-security-state, .yuimg-share-private-badge, #yuimg-status-id) {
    --dot: #9ca3af;
    display: inline-flex;
    height: auto;
    min-height: 0;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #4b5563;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
}

:is(.yuimg-tag, .yuimg-mine-badge, .yuimg-invite-status, .yuimg-system-health, .yuimg-security-state, .yuimg-share-private-badge, #yuimg-status-id)::before {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dot);
    content: "";
}

:is(.yuimg-tag.is-success, .yuimg-mine-badge:not(.is-private), .yuimg-invite-status.is-active, .yuimg-system-health.is-ok, .yuimg-security-state.is-enabled) { --dot: var(--yuimg-c-success); }
:is(.yuimg-tag.is-warning, .yuimg-mine-badge.is-private, .yuimg-system-health:not(.is-ok), .yuimg-share-private-badge) { --dot: var(--yuimg-c-warning); }
:is(.yuimg-tag.is-danger, .yuimg-invite-status.is-expired, .yuimg-security-state.is-disabled) { --dot: var(--yuimg-c-danger); }
:is(.yuimg-tag.is-info) { --dot: var(--yuimg-c-info); }
:is(.yuimg-tag.is-edit) { --dot: var(--yuimg-c-edit); }

body.yuimg-manage-view .yuimg-system-card dd.is-ok { color: var(--yuimg-c-success); }
body.yuimg-manage-view .yuimg-system-card dd.is-error { color: var(--yuimg-c-danger); }

.yuimg-toast,
.yuimg-home-toast {
    border-color: var(--yuimg-line);
    border-left-width: 3px;
    color: var(--yuimg-text);
}

.yuimg-toast.is-success,
.yuimg-home-toast.is-success { border-left-color: var(--yuimg-c-success); }

.yuimg-toast.is-error,
.yuimg-home-toast.is-error { border-left-color: var(--yuimg-c-danger); }

.yuimg-system-notice { background: var(--yuimg-ink); }
.yuimg-system-notice.is-error { background: var(--yuimg-c-danger); }

.yuimg-upload-mark { color: var(--yuimg-c-success); }
.yuimg-upload-mark.is-error { color: var(--yuimg-c-danger); }
.yuimg-upload-spin { border-top-color: var(--yuimg-ink); }
.yuimg-upload-item.is-uploading { background: var(--yuimg-soft-bg); }
.yuimg-quick-status { color: var(--yuimg-muted); }

/* ── Typography ─────────────────────────────────────────────── */
/* Reading text uses the UI sans stack: it renders Chinese far more evenly
   than the serif fallback chain did. */
.yuimg-share-article {
    color: var(--yuimg-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-size: 17px;
    line-height: 1.85;
}

.yuimg-share-article blockquote {
    border-left-color: var(--yuimg-line-strong);
    background: var(--yuimg-soft-bg);
    color: #4b5563;
}

.yuimg-share-article li::marker {
    color: var(--yuimg-muted);
}

:is(.yuimg-article-categories a, .yuimg-share-eyebrow .yuimg-gallery-kicker, .yuimg-public-card-meta span) {
    background: var(--yuimg-surface);
    color: #374151;
}

.yuimg-article-categories a:hover {
    background: var(--yuimg-ink);
    color: #fff;
}

:is(.yuimg-gallery-card > div a, .yuimg-gallery-expire) {
    background: var(--yuimg-surface);
    color: #374151;
}

/* ── Reading pages (articles and shares) ────────────────────── */
/* A 720px text column. Without a contents panel, images, carousels, videos
   and maps inside the text break out to 960px; with the panel they keep to
   the text column. The frame width with a panel is set in share-toc.css. */
:root {
    --yuimg-reading: 720px;
    --yuimg-reading-wide: 960px;
}

:is(.yuimg-article-hero, .yuimg-share-hero) {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--yuimg-line);
}

:is(.yuimg-article-title, .yuimg-share-hero h1) {
    color: var(--yuimg-heading);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

:is(.yuimg-article-meta, .yuimg-share-meta) {
    margin-top: 18px;
    font-size: 14px;
}

.yuimg-article-meta :where(strong, time) {
    color: #374151;
    font-size: 14px;
}

.yuimg-article-categories,
.yuimg-share-eyebrow {
    margin-bottom: 16px;
}

:is(.yuimg-article-categories a, .yuimg-share-eyebrow > span) {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.yuimg-article-cover {
    max-width: 1080px;
    margin-top: 32px;
    border-radius: 14px;
}

.yuimg-article-cover img {
    max-height: 560px;
}

.yuimg-share-reading-layout {
    margin-top: 40px;
}

.yuimg-share-article p {
    margin-bottom: 1.3em;
}

.yuimg-share-article h2 {
    margin: 2.2em 0 .8em;
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 1.45em;
    font-weight: 700;
}

.yuimg-share-article h3 {
    margin: 1.9em 0 .7em;
    font-size: 1.22em;
    font-weight: 700;
}

.yuimg-share-article :where(img, video) {
    border-radius: 10px;
}

.yuimg-share-article :is(.yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel) {
    margin: 36px 0;
    border-radius: 12px;
}

.yuimg-share-reading-layout:not(.has-toc) .yuimg-share-article > :is(
    .yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel,
    .yuimg-video-embed, .yuimg-share-map-section, .wp-block-image.alignwide, .wp-block-gallery
),
.yuimg-share-reading-layout:not(.has-toc) .yuimg-share-article > div:not([class]) > :is(
    .yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel,
    .yuimg-video-embed, .yuimg-share-map-section
) {
    width: auto;
    max-width: none;
    margin-right: calc((min(var(--yuimg-reading-wide), 100cqw) - 100%) / -2);
    margin-left: calc((min(var(--yuimg-reading-wide), 100cqw) - 100%) / -2);
}

.yuimg-share-article .yuimg-share-map-section {
    max-width: none;
    padding-top: 0;
    border-top: 0;
}

.yuimg-share-map {
    border-radius: 12px;
    box-shadow: none;
}

.yuimg-share-map-section > header strong {
    margin-top: 0;
}

.yuimg-article-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top-color: var(--yuimg-line);
}

.yuimg-article-author-card {
    border-color: var(--yuimg-line);
    border-radius: 12px;
}

.yuimg-related-articles,
.yuimg-share-gallery-section {
    max-width: 1080px;
    margin: 72px auto 0;
    padding-top: 32px;
    border-top: 1px solid var(--yuimg-line);
}

:is(.yuimg-related-articles > header h2, .yuimg-share-section-heading h2) {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.yuimg-share-section-heading p {
    color: var(--yuimg-muted);
    font-size: 13px;
}

/* ── Image galleries: masonry at original proportions ───────── */
.yuimg-gallery-grid.is-masonry {
    display: block;
    margin-top: 24px;
    columns: 4 220px;
    column-gap: 16px;
}

.yuimg-gallery-grid.is-masonry > .yuimg-gallery-card {
    display: block;
    margin: 0 0 16px;
    border-radius: 10px;
    break-inside: avoid;
}

.yuimg-gallery-grid.is-masonry .yuimg-gallery-open img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
}

@media (max-width: 760px) {
    .yuimg-share-reading-layout {
        margin-top: 28px;
    }

    .yuimg-share-article {
        font-size: 16px;
    }

    .yuimg-related-articles,
    .yuimg-share-gallery-section {
        margin-top: 48px;
        padding-top: 24px;
    }

    .yuimg-gallery-grid.is-masonry {
        columns: 2;
        column-gap: 8px;
    }

    .yuimg-gallery-grid.is-masonry > .yuimg-gallery-card {
        margin-bottom: 8px;
    }
}

/* ── Image loading: shimmer behind tiles, photos fade in ────── */
@keyframes yuimg-shimmer {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}

.yuimg-img-fade :is(
    .yuimg-home-cover, .yuimg-gallery-open, .yuimg-public-gallery-card, .yuimg-public-share-card,
    .yuimg-public-article-thumb, .yuimg-related-thumb, .yuimg-author-post-thumb
):has(> img:not(.is-loaded)) {
    background-color: #e9ecef;
    background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: yuimg-shimmer 1.4s linear infinite;
}

.yuimg-img-fade :is(
    .yuimg-home-cover img, .yuimg-gallery-open img, .yuimg-public-gallery-card > img, .yuimg-public-share-card > img,
    .yuimg-public-article-thumb img, .yuimg-related-thumb img, .yuimg-author-post-thumb img,
    .yuimg-share-article :is(.yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel) img
) {
    opacity: 0;
    transition: opacity .35s ease, transform .5s var(--yuimg-ease);
}

.yuimg-img-fade :is(
    .yuimg-home-cover img, .yuimg-gallery-open img, .yuimg-public-gallery-card > img, .yuimg-public-share-card > img,
    .yuimg-public-article-thumb img, .yuimg-related-thumb img, .yuimg-author-post-thumb img,
    .yuimg-share-article :is(.yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel) img
).is-loaded {
    opacity: 1;
}

.yuimg-share-article :is(.yuimg-content-image-single, .yuimg-content-image-grid, .yuimg-content-carousel) {
    background: #e9ecef;
}

/* Embedded players paint black until they load; show a calm frame instead. */
.yuimg-share-article .yuimg-video-embed {
    background: #1f2937;
}

.yuimg-share-article .yuimg-video-embed::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .55);
    font-size: 13px;
    content: "视频加载中…";
}

/* ── Placeholders for content without a cover ───────────────── */
.yuimg-public-placeholder {
    background: linear-gradient(135deg, #f9fafb, #eef0f3);
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
}

:is(.yuimg-public-article-thumb, .yuimg-related-thumb, .yuimg-author-post-thumb) > .yuimg-public-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    align-self: stretch;
    justify-self: stretch;
    place-items: center;
}

/* ── Page rhythm ────────────────────────────────────────────── */
/* Short pages still reach the footer instead of ending in a gray void. */
body > .yuimg-site-shell {
    flex: 1 0 auto;
}

@media (min-width: 981px) {
    .yuimg-site-shell > .yuimg-site-content {
        display: flex;
        align-self: stretch;
        flex-direction: column;
    }

    .yuimg-site-shell > .yuimg-site-content > main:not(.yuimg-home) {
        flex: 1 0 auto;
    }

    .yuimg-site-shell > .yuimg-site-content > :is(.yuimg-status-page, .yuimg-share-password-page) {
        width: 100%;
    }
}

/* List pages use a calmer title than reading pages. */
.yuimg-gallery-hero:not(.yuimg-share-hero) h1,
.yuimg-public-hero h1 {
    font-size: clamp(24px, 2.2vw, 32px);
}

.yuimg-gallery-hero:not(.yuimg-share-hero) {
    align-items: center;
}

/* ── Small text: nothing below 12px, labels without wide tracking ── */
.yuimg-gallery-kicker { letter-spacing: .04em; }
.yuimg-share-eyebrow .yuimg-gallery-kicker,
.yuimg-share-private-badge { font-size: 12px; letter-spacing: .02em; }
.yuimg-gallery-card > div a { font-size: 12px; }
.yuimg-public-gallery-card small,
.yuimg-public-share-card small { font-size: 12px; }
.yuimg-mine-name { font-size: 12px; }
.yuimg-mine-badge,
.yuimg-mine-copy,
.yuimg-mine-delete { height: 26px; font-size: 12px; }

/* ── Interaction: one focus ring ────────────────────────────── */
.yuimg-site-shell :where(a, button, [role="button"]):focus-visible,
.yuimg-site-footer a:focus-visible {
    outline: 2px solid var(--yuimg-c-primary);
    outline-offset: 2px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.yuimg-site-footer {
    padding: 20px 0;
}

.yuimg-site-footer-inner {
    align-items: center;
}

.yuimg-footer-brand {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
}

.yuimg-footer-brand strong {
    color: var(--yuimg-heading, #111827);
    font-size: 14px;
    font-weight: 650;
}

.yuimg-footer-brand p {
    max-width: 460px;
    margin: 0;
    color: var(--yuimg-muted, #6d7975);
    font-size: 13px;
    line-height: 1.7;
}

.yuimg-footer-brand span {
    color: #9ca3af;
    font-size: 12px;
}

.yuimg-site-footer-inner nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 18px;
    font-size: 13px;
}

/* ── Narrow screens ─────────────────────────────────────────── */
@media (max-width: 760px) {
    .yuimg-mine-badge,
    .yuimg-mine-copy,
    .yuimg-mine-delete {
        height: 32px;
        padding: 0 10px;
    }

    .yuimg-gallery-card > div a {
        display: inline-flex;
        min-height: 32px;
        align-items: center;
    }

    .yuimg-site-footer-inner nav {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(
        .yuimg-home-cover, .yuimg-gallery-open, .yuimg-public-gallery-card, .yuimg-public-share-card,
        .yuimg-public-article-thumb, .yuimg-related-thumb, .yuimg-author-post-thumb
    ) {
        animation: none !important;
    }
}

@media (max-width: 760px) {
    .yuimg-home .yuimg-quick {
        margin-bottom: 28px;
        padding: 14px;
        border-radius: 12px;
    }
}
