/* Copyright (c) 2026 VaiFrame. All rights reserved. */
/* Mini Home Modal Styles
 *
 * - 사용자 미니 프로필(헤더 + 프로필 사진 + bio + 가입일) + Gallery 단일 탭 (Assets 탭은 2026-05-14 /vaiframe/gallery_assets/{handle} 페이지로 분리됨)
 * - editor.html 의 Asset Details 모달(z-index 9998) 위에 스택될 수 있도록 z-index 10100
 *
 * [변경 이력]
 * 2026-05-04 | 최초 생성 - Phase 2 (헤더 / 프로필). Gallery 는 Phase 3 placeholder
 * 2026-05-04 | Phase 3 - 커버 이미지(편집/제거 + 그라디언트 fallback), 갤러리 그리드/업로더/라이트박스 스타일 추가
 * 2026-05-04 | Asset card: share_type(public/private) 좌측 보더 + 우상단 즐겨찾기 / 우하단 삭제(본인) 버튼
 * 2026-05-04 | Gallery item: 좌하단 ♥ Like 오버레이 + 카운트 (본인 사진은 비활성)
 * 2026-05-09 | People Search panel - search icon button (self gallery only) + floating dropdown panel + Discover (recent + suggested) + result cards with Quick Follow + thin scrollbar
 * 2026-05-14 | Following nested modal - Stats 의 Following 카운트 클릭 시 표시되는 자체 모달(z-index 10200)
 * 2026-05-15 | Gallery card hover-only overlays - 데스크톱에서 like/view chip 을 hover 시에만 노출하여 시각 노이즈 제거. 모바일(@media hover:none) 은 메타 라인에 inline stats 표시
 * 2026-05-18 | Dead style purge - Following nested modal / 좌측 검색(iframe explore) 진입점 제거에 따른 잔존 스타일 일괄 제거 (.vf-mh-following-toolbar/list/card/empty/notice/unfollow + .vf-mh-following-modal-* + .vf-mh-explore-mask/modal/iframe/close). 약 400줄 dead style 영구 제거
 */

/* ── Modal mask & box ─────────────────────────────── */
.vf-mh-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vf-mh-mask.is-open {
    display: flex;
}
.vf-mh-modal {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 60px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    display: block;
    overflow-y: auto;
}

.vf-mh-sticky-head {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #ffffff;
}
/* ── Cover (header) ───────────────────────────────── */
.vf-mh-cover {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    flex-shrink: 0;
}
/* Unified top-right toolbar — single flex container holds [Lang | CoverSettings(self) | Logout/Login | Close] */
.vf-mh-cover-top-right {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 12;
}
/* Close button — flex child, no absolute position */
.vf-mh-cover-close {
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.vf-mh-cover-close:hover {
    background: rgba(0, 0, 0, 0.75);
}
/* Page-mode (opened in own tab) hides the close X */
body.vf-mh-page-mode .vf-mh-cover-close { display: none !important; }
.vf-mh-cover-self {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 12;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.vf-mh-cover-self:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}
.vf-mh-cover-self svg {
    width: 16px;
    height: 16px;
}

/* ── Profile (avatar + name + bio) ────────────────── */
.vf-mh-profile {
    position: relative;
    padding: 0 24px 14px;
    margin-top: -42px;
    flex-shrink: 0;
    display: block;
}
.vf-mh-profile-left {
    width: 100%;
    min-width: 0;
}
.vf-mh-profile-right {
    position: absolute;
    top: 56px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.vf-mh-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: #e5e7eb;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.vf-mh-avatar-fallback {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.vf-mh-name {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    padding-right: 220px;
}
.vf-mh-username {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}
.vf-mh-bio {
    margin-top: 0;
    padding: 8px 24px 14px;
    font-size: 12px;
    color: #475569;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}
.vf-mh-bio a {
    color: #4f46e5;
    text-decoration: underline;
    word-break: break-all;
}
.vf-mh-bio a:hover {
    color: #3730a3;
}
.vf-mh-bio-empty {
    margin-top: 0;
    padding: 8px 24px 14px;
    font-size: 12px;
    color: #cbd5e1;
    font-style: italic;
}
.vf-mh-meta {
    margin-top: 0;
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.vf-mh-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.vf-mh-meta-item svg {
    width: 12px;
    height: 12px;
}

/* ── Tabs ─────────────────────────────────────────── */
.vf-mh-tabs {
    position: sticky;
    top: var(--vf-mh-sticky-head-h, 226px);
    z-index: 7;
    display: flex;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
    flex-shrink: 0;
}
.vf-mh-tab {
    flex: 1;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.vf-mh-tab:hover:not(.is-active):not(:disabled) {
    color: #475569;
    background: #f3f4f6;
}
.vf-mh-tab.is-active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: #ffffff;
}
.vf-mh-tab:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}
.vf-mh-tab i,
.vf-mh-tab svg {
    width: 13px;
    height: 13px;
}
.vf-mh-tab-soon {
    margin-left: 4px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ── Tab body ─────────────────────────────────────── */
.vf-mh-body {
    flex: 0 0 auto;
    border-top: 1px solid #f1f5f9;
    min-height: 200px;
    overflow: visible;
    padding: 14px 18px 18px;
    background: #ffffff;
}


/* ── Gallery placeholder (Phase 3) ────────────────── */
.vf-mh-gallery-soon {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 40px 16px;
    line-height: 1.6;
}
.vf-mh-gallery-soon svg {
    width: 36px;
    height: 36px;
    color: #cbd5e1;
    margin-bottom: 10px;
}

/* ── Loading / error ──────────────────────────────── */
.vf-mh-loading,
.vf-mh-error {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 24px 12px;
}
.vf-mh-error {
    color: #dc2626;
}

/* ── Dark theme ───────────────────────────────────── */
.vf-theme-dark .vf-mh-modal {
    background: #1f2937;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.vf-theme-dark .vf-mh-sticky-head {
    background: #1f2937;
}
.vf-theme-dark .vf-mh-name {
    color: #f1f5f9;
}
.vf-theme-dark .vf-mh-username {
    color: #94a3b8;
}
.vf-theme-dark .vf-mh-bio {
    color: #cbd5e1;
}
.vf-theme-dark .vf-mh-bio a {
    color: #818cf8;
}
.vf-theme-dark .vf-mh-bio a:hover {
    color: #a5b4fc;
}
.vf-theme-dark .vf-mh-bio-empty {
    color: #475569;
}
.vf-theme-dark .vf-mh-meta {
    color: #64748b;
}
.vf-theme-dark .vf-mh-tabs {
    background: #111827;
    border-color: #374151;
}
.vf-theme-dark .vf-mh-tab {
    color: #6b7280;
}
.vf-theme-dark .vf-mh-tab:hover:not(.is-active):not(:disabled) {
    color: #cbd5e1;
    background: #1f2937;
}
.vf-theme-dark .vf-mh-tab.is-active {
    color: #a5b4fc;
    border-bottom-color: #a5b4fc;
    background: #1f2937;
}
.vf-theme-dark .vf-mh-tab-soon {
    background: #374151;
    color: #6b7280;
}
.vf-theme-dark .vf-mh-body {
    background: #1f2937;
    border-top-color: #374151;
}
.vf-theme-dark .vf-mh-gallery-soon,
.vf-theme-dark .vf-mh-loading {
    color: #6b7280;
}
.vf-theme-dark .vf-mh-avatar {
    border-color: #1f2937;
}
.vf-theme-dark .vf-mh-avatar-fallback {
    border-color: #1f2937;
}


/* ════════════════════════════════════════════════════
 * Phase 3 additions
 * ════════════════════════════════════════════════════ */

/* ── Cover image (header background) ──────────────── */
.vf-mh-cover.has-image {
    background-color: #1f2937;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.vf-mh-cover.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.25) 100%);
    pointer-events: none;
}

/* Cover settings wrapper — flex child of .vf-mh-cover-top-right (relative for dropdown anchor) */
.vf-mh-cover-settings {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Cover settings menu (single ⋮ button + dropdown — Change / Remove) */
.vf-mh-cover-menu-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.vf-mh-cover-menu-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}
.vf-mh-cover-menu-btn svg {
    width: 16px;
    height: 16px;
}
.vf-mh-cover-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 5;
}
.vf-mh-cover-menu-item {
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    color: #334155;
    border: 0;
    border-radius: 6px;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.12s;
}
.vf-mh-cover-menu-item:hover {
    background: #f1f5f9;
}
.vf-mh-cover-menu-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.vf-mh-cover-menu-item.is-danger {
    color: #b91c1c;
}
.vf-mh-cover-menu-item.is-danger:hover {
    background: #fef2f2;
}
html.vf-theme-dark .vf-mh-cover-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
html.vf-theme-dark .vf-mh-cover-menu-item {
    color: #cbd5e1;
}
html.vf-theme-dark .vf-mh-cover-menu-item:hover {
    background: #334155;
}
html.vf-theme-dark .vf-mh-cover-menu-item.is-danger {
    color: #fca5a5;
}
html.vf-theme-dark .vf-mh-cover-menu-item.is-danger:hover {
    background: #3b1414;
}

/* ── Gallery tab ──────────────────────────────────── */
.vf-mh-gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.vf-mh-gallery-count {
    font-size: 11px;
    color: #94a3b8;
}
.vf-mh-gallery-add-btn {
    height: 28px;
    padding: 0 12px;
    background: #2f4592;
    color: #ffffff;
    border: 0;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s;
}
.vf-mh-gallery-add-btn:hover {
    background: #26397a;
}
.vf-mh-gallery-add-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}
.vf-mh-gallery-add-btn svg {
    width: 12px;
    height: 12px;
}
html.vf-theme-dark .vf-mh-gallery-add-btn {
    background: #4f5ca8;
}
html.vf-theme-dark .vf-mh-gallery-add-btn:hover {
    background: #5f6db8;
}
html.vf-theme-dark .vf-mh-gallery-add-btn:disabled {
    background: #475569;
}
.vf-mh-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 8px;
    row-gap: 40px;
}
@media (max-width: 900px) {
    .vf-mh-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 32px;
    }
}
@media (max-width: 540px) {
    .vf-mh-gallery-grid {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 24px;
    }
}
.vf-mh-gallery-sentinel {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 8px;
    min-height: 48px;
}
.vf-mh-gallery-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.vf-mh-gallery-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    font-size: 11px;
    line-height: 1.35;
    padding: 0 2px;
}
.vf-mh-gallery-meta-date {
    flex: 0 0 auto;
    color: #94a3b8;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.vf-mh-gallery-meta-caption {
    flex: 1 1 auto;
    color: #475569;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.vf-theme-dark .vf-mh-gallery-meta-date {
    color: #64748b;
}
.vf-theme-dark .vf-mh-gallery-meta-caption {
    color: #cbd5e1;
}
.vf-mh-gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.vf-mh-gallery-item:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.12);
}
.vf-mh-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Card display variants (per-photo card_fit). */
/* cover (default) = fill the square card, center-cropped (current behavior).      */
/* contain = show the entire photo inside the card, no cropping (letterboxed).    */
/* top     = fill the card but anchor to the top edge (great for tall webtoons). */
/* bottom  = fill the card but anchor to the bottom edge.                         */
.vf-mh-gallery-item img[data-card-fit="cover"] {
    object-fit: cover;
    object-position: center center;
}
.vf-mh-gallery-item img[data-card-fit="contain"] {
    object-fit: contain;
    object-position: center center;
    background: #f8fafc;
}
html.vf-theme-dark .vf-mh-gallery-item img[data-card-fit="contain"] {
    background: #1e293b;
}
.vf-mh-gallery-item img[data-card-fit="top"] {
    object-fit: cover;
    object-position: center top;
}
.vf-mh-gallery-item img[data-card-fit="bottom"] {
    object-fit: cover;
    object-position: center bottom;
}
.vf-mh-gallery-item-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.55);
}
.vf-mh-gallery-item-del:hover {
    background: rgba(220, 38, 38, 0.95);
}
.vf-mh-gallery-item:hover .vf-mh-gallery-item-del {
    display: flex;
}

/* Edit button (top-right, left of delete on hover) */
.vf-mh-gallery-item-edit {
    position: absolute;
    top: 4px;
    right: 32px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.vf-mh-gallery-item-edit:hover { background: #2f4592; }
.vf-mh-gallery-item:hover .vf-mh-gallery-item-edit { display: flex; }

/* Visibility badge (bottom-right of image) */
.vf-mh-gallery-item-vis {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.18s ease;
}
.vf-mh-gallery-item-vis-public    { background: rgba(15, 23, 42, 0.82); opacity: 0; }
.vf-mh-gallery-item-vis-followers { background: rgba(47, 69, 146, 0.92); opacity: 0.55; }
.vf-mh-gallery-item-vis-private   { background: rgba(220, 38, 38, 0.92); opacity: 0.55; }
.vf-mh-gallery-item:hover .vf-mh-gallery-item-vis { opacity: 1; }

/* Mobile/touch devices: visibility badge always visible (no hover state) */
@media (hover: none) and (pointer: coarse) {
    .vf-mh-gallery-item-vis { opacity: 1 !important; }
}

/* ── Scheduled (publish_start_at in the future) — owner-only visual cue ──
   Other viewers do NOT see the card at all (filtered server-side).
   For the owner the card stays visible but is desaturated + dimmed and gets a
   small clock badge on the top-left so it's instantly recognizable as a
   "queued for later release" item.
*/
.vf-mh-gallery-card.is-scheduled .vf-mh-gallery-item > img,
.vf-mh-gallery-card.is-scheduled .vf-mh-gallery-item > .vf-gp-card-host,
.vf-mh-gallery-card.is-scheduled .vf-mh-gallery-item canvas,
.vf-mh-gallery-card.is-scheduled .vf-mh-gallery-item svg {
    filter: grayscale(0.85);
    opacity: 0.55;
}
.vf-mh-gallery-item-sched {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}
.vf-mh-gallery-item-sched svg {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
}
.vf-mh-gallery-item-sched-text {
    white-space: nowrap;
}
html.vf-theme-dark .vf-mh-gallery-item-sched {
    background: rgba(30, 41, 59, 0.88);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}

/* Overlay button SVG icons - drop shadow for visibility on any background */
.vf-mh-gallery-item-del svg,
.vf-mh-gallery-item-edit svg,
.vf-mh-gallery-item-vis svg {
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.55));
}

/* Edit metadata modal */
.vf-mh-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vf-mh-edit-overlay.is-open { display: flex; }
.vf-mh-edit-modal {
    width: 480px;
    max-width: 100%;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 14px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}
.vf-mh-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}
.vf-mh-edit-title { font-size: 14px; font-weight: 700; color: #111827; }
.vf-mh-edit-close {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    border-radius: 4px;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
}
.vf-mh-edit-close:hover { background: #f3f4f6; color: #111827; }
.vf-mh-edit-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.vf-mh-edit-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 4px;
}
.vf-mh-edit-form { display: flex; flex-direction: column; gap: 8px; }
.vf-mh-edit-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vf-mh-edit-input {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.vf-mh-edit-input:focus {
    border-color: #2f4592;
    box-shadow: 0 0 0 3px rgba(47, 69, 146, 0.1);
}
.vf-mh-edit-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #374151;
}
.vf-mh-edit-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2f4592;
    cursor: pointer;
    margin: 0;
}
.vf-mh-edit-vis-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.vf-mh-edit-vis-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #4b5563;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.vf-mh-edit-vis-opt input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.vf-mh-edit-vis-opt:hover { background: #f3f4f6; color: #111827; }
.vf-mh-edit-vis-opt:has(input[type="radio"]:checked) {
    background: #2f4592;
    border-color: #2f4592;
    color: #ffffff;
}
.vf-mh-edit-vis-icon { display: inline-flex; align-items: center; }
.vf-mh-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}
.vf-mh-edit-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.vf-mh-edit-btn:hover { background: #f3f4f6; }
.vf-mh-edit-btn-primary {
    background: #2f4592;
    border-color: #2f4592;
    color: #ffffff;
}
.vf-mh-edit-btn-primary:hover { background: #243775; border-color: #243775; }
.vf-mh-edit-btn:disabled { opacity: 0.55; cursor: default; }
/* Dark theme overrides */
.vf-theme-dark .vf-mh-edit-modal { background: #1e293b; }
.vf-theme-dark .vf-mh-edit-header { border-bottom-color: #334155; }
.vf-theme-dark .vf-mh-edit-title { color: #f1f5f9; }
.vf-theme-dark .vf-mh-edit-close { color: #94a3b8; }
.vf-theme-dark .vf-mh-edit-close:hover { background: #334155; color: #f1f5f9; }
.vf-theme-dark .vf-mh-edit-preview { background: #0f172a; }
.vf-theme-dark .vf-mh-edit-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
.vf-theme-dark .vf-mh-edit-checkbox-row { color: #cbd5e1; }
.vf-theme-dark .vf-mh-edit-vis-opt { background: #0f172a; border-color: #334155; color: #94a3b8; }
.vf-theme-dark .vf-mh-edit-vis-opt:hover { background: #1e293b; color: #f1f5f9; }
.vf-theme-dark .vf-mh-edit-footer { background: #1e293b; border-top-color: #334155; }
.vf-theme-dark .vf-mh-edit-btn { background: #0f172a; border-color: #334155; color: #cbd5e1; }
.vf-theme-dark .vf-mh-edit-btn:hover { background: #1e293b; }
.vf-mh-gallery-item-uploading {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vf-mh-gallery-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 28px 12px;
    line-height: 1.6;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
}
.vf-mh-gallery-empty.is-drag-over {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4f46e5;
}

/* ── Gallery lightbox ─────────────────────────────── */
.vf-mh-lightbox {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: zoom-out;
}
.vf-mh-lightbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: #000;
    pointer-events: none;
    z-index: 2;
}
/* Bottom gradient — only when caption/date is present (mirrors the top bar). */
.vf-mh-lightbox::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: #000;
    pointer-events: none;
    z-index: 2;
}
/* Scroll area always reserves bottom space (40px) regardless of caption. */
/* Caption presence only toggles the bottom gradient (::after), not the scroll area. */
.vf-mh-lightbox.is-open {
    display: flex;
}
/* Mobile: drop the outer padding so the image fills the screen. */
/* Nav/close buttons are absolute-positioned so they overlay the image safely. */
@media (max-width: 768px) {
    .vf-mh-lightbox {
        padding: 0;
    }
}
/* Scrollable wrapper around the lightbox image. */
/* Overflow defaults to hidden for 'fit' mode and is overridden per view_mode below.   */
.vf-mh-lightbox-scroll {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
}
.vf-mh-lightbox-scroll::-webkit-scrollbar { width: 7px; height: 7px; }
.vf-mh-lightbox-scroll::-webkit-scrollbar-track { background: transparent; }
.vf-mh-lightbox-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); border-radius: 3px; }
.vf-mh-lightbox-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); }
.vf-mh-lightbox-scroll { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
.vf-mh-lightbox-scroll img {
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
/* view_mode = fit (default) — both axes contained, no scroll */
.vf-mh-lightbox-scroll.vf-vm-fit { overflow: hidden; }
.vf-mh-lightbox-scroll.vf-vm-fit img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* view_mode = width — fill horizontally, vertical scroll (webtoon) */
.vf-mh-lightbox-scroll.vf-vm-width {
    overflow-y: auto;
    overflow-x: hidden;
    align-items: center;
    justify-content: center;
}
.vf-mh-lightbox-scroll.vf-vm-width img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    margin: auto;
}
/* view_mode = height — fill vertically, horizontal scroll */
.vf-mh-lightbox-scroll.vf-vm-height {
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    justify-content: center;
}
.vf-mh-lightbox-scroll.vf-vm-height img {
    height: 100%;
    width: auto;
    max-height: 100%;
    max-width: none;
    margin: auto;
}
/* view_mode = actual — natural pixel size, both axes scroll */
.vf-mh-lightbox-scroll.vf-vm-actual {
    overflow: auto;
    align-items: center;
    justify-content: center;
}
.vf-mh-lightbox-scroll.vf-vm-actual img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: auto;
}
/* view_mode = custom — inline width/height applied via JS; allow both scrolls */
.vf-mh-lightbox-scroll.vf-vm-custom {
    overflow: auto;
    align-items: center;
    justify-content: center;
}
.vf-mh-lightbox-scroll.vf-vm-custom img {
    max-width: none;
    max-height: none;
    margin: auto;
}
.vf-mh-lightbox-close {
    position: absolute;
    top: 22px;
    transform: translateY(-50%);
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.vf-mh-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Lightbox prev/next nav */
.vf-mh-lightbox-nav {
    position: absolute;
    top: 22px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.15s ease;
}
.vf-mh-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.28);
}
.vf-mh-lightbox-nav svg {
    width: 18px;
    height: 18px;
}
.vf-mh-lightbox-prev {
    left: 50%;
    right: auto;
    transform: translate(calc(-100% - 60px), -50%);
}
.vf-mh-lightbox-next {
    left: 50%;
    right: auto;
    transform: translate(60px, -50%);
}
.vf-mh-lightbox-counter {
    position: absolute;
    top: 22px;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    z-index: 5;
}
.vf-mh-lightbox-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 80px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
    cursor: default;
    z-index: 5;
}
.vf-mh-lightbox-meta-date {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    flex: 0 0 auto;
}
.vf-mh-lightbox-meta-caption {
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ── Lightbox: Owner avatar (top-left) ─────────────── */
/* Always reflects the gallery owner. Same component is shown in image view and page view. */
.vf-mh-lightbox-avatar {
    position: absolute;
    top: 22px;
    transform: translateY(-50%);
    left: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #334155;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    z-index: 5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}
.vf-mh-lightbox-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vf-mh-lightbox-avatar .vf-mh-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #334155;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ── Lightbox: Like overlay (bottom-left) ─────────── */
/* Same chip pattern as the grid card but a bit larger for the viewer. */
.vf-mh-lightbox-like {
    position: absolute;
    top: 22px;
    transform: translateY(-50%);
    bottom: auto;
    left: 64px;
    height: 26px;
    padding: 0 10px 0 8px;
    border: 0;
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    transition: background 0.15s, transform 0.1s;
    z-index: 5;
}
.vf-mh-lightbox-like:hover {
    background: rgba(15, 23, 42, 0.92);
}
.vf-mh-lightbox-like:active {
    transform: translateY(-50%) scale(0.96);
}
.vf-mh-lightbox-like svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    pointer-events: none;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.55));
}
.vf-mh-lightbox-like-count {
    pointer-events: none;
    min-width: 10px;
    text-align: left;
}
/* Active (liked by me) — red heart emphasis */
.vf-mh-lightbox-like.is-on {
    background: rgba(239, 68, 68, 0.92);
}
.vf-mh-lightbox-like.is-on:hover {
    background: rgba(220, 38, 38, 0.95);
}

/* Hidden file input */
.vf-mh-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ── Dark theme additions ─────────────────────────── */
.vf-theme-dark .vf-mh-gallery-item {
    background: #111827;
    border-color: #374151;
}
.vf-theme-dark .vf-mh-gallery-empty {
    border-color: #374151;
    color: #6b7280;
}
.vf-theme-dark .vf-mh-gallery-empty.is-drag-over {
    border-color: #818cf8;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}
.vf-theme-dark .vf-mh-gallery-count {
    color: #6b7280;
}



/* ════════════════════════════════════════════════════
 * Mini Home Follow (2026-05-04)
 * - Profile 우측 Follow 버튼 (타인 미니홈 한정)
 * - bio 아래 Stats 줄 (Followers / Visitors counts)
 * - Following 관리(목록/검색/언팔로우)는 /vaiframe/explore 페이지에서 통합 제공
 * ════════════════════════════════════════════════════ */

/* Follow / Following pill — flex child of .vf-mh-cover-top-right (used together with .vf-mh-cover-pill) */
.vf-mh-follow-btn {
    /* base layout/styles inherited from .vf-mh-cover-pill */
}
.vf-mh-follow-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #a78bfa;
}
.vf-mh-follow-btn.is-following { color: #d1d5db; }
.vf-mh-follow-btn.is-following:hover { color: #fca5a5; }
.vf-mh-follow-btn .vf-mh-fb-off { display: none; }
.vf-mh-follow-btn.is-following:hover .vf-mh-fb-on { display: none; }
.vf-mh-follow-btn.is-following:hover .vf-mh-fb-off { display: inline; }

/* Unified pill button (Login / Logout) — flex child of .vf-mh-cover-top-right (no absolute position) */
.vf-mh-cover-pill {
    height: 28px;
    padding: 0 14px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: 0;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    white-space: nowrap;
    flex-shrink: 0;
}
.vf-mh-cover-pill:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
}

/* VaiFrame Home button - top-left of cover, next to search button (logged-in viewer) */
.vf-mh-cover-home {
    position: absolute;
    top: 10px;
    left: 50px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 12;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.vf-mh-cover-home:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}
.vf-mh-cover-home svg {
    width: 16px;
    height: 16px;
}


/* Language selector — flex child of .vf-mh-cover-top-right (no absolute position) */
.vf-mh-cover-lang {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
/* Compact trigger override - dark translucent tone matches Close/Settings buttons over the cover image */
.vf-mh-cover-lang .vf-lang-trigger {
    height: 28px;
    padding: 0 8px 0 10px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    color: #ffffff;
    border-radius: 14px;
    max-width: 110px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s;
}
.vf-mh-cover-lang .vf-lang-trigger:hover,
.vf-mh-cover-lang .vf-lang-picker.is-open .vf-lang-trigger {
    background: rgba(0, 0, 0, 0.75);
}
.vf-mh-cover-lang .vf-lang-trigger-icon {
    width: 10px;
    height: 10px;
}
.vf-mh-cover-lang .vf-lang-trigger-label {
    color: #ffffff;
}
/* Dark theme - keep dark translucent (cover image already provides backdrop variability) */

/* Stats row */
.vf-mh-stats {
    margin-top: 0;
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #475569;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.vf-mh-stats-item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.vf-mh-stats-item strong {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.vf-mh-stats-label {
    color: #64748b;
}

/* Dark theme — Stats + Follow button */
.vf-theme-dark .vf-mh-stats { color: #cbd5e1; }
.vf-theme-dark .vf-mh-stats-item strong { color: #f1f5f9; }
.vf-theme-dark .vf-mh-stats-label { color: #94a3b8; }
.vf-theme-dark .vf-mh-follow-btn.is-following { background: rgba(0,0,0,0.6); color: #d1d5db; }
.vf-theme-dark .vf-mh-follow-btn.is-following:hover { background: rgba(0,0,0,0.8); color: #fca5a5; }

/* ── Gallery item: Like / View chips (inline in meta line) ────── */
.vf-mh-gallery-item-like {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 22px;
    padding: 0 8px 0 7px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s, color 0.15s;
}
.vf-mh-gallery-item-like:hover {
    background: #fef2f2;
    color: #ef4444;
}
.vf-mh-gallery-item-like:active {
    transform: scale(0.96);
}
.vf-mh-gallery-item-like svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    pointer-events: none;
}
.vf-mh-gallery-item-like-count {
    pointer-events: none;
    min-width: 6px;
    text-align: left;
}
.vf-mh-gallery-item-like.is-on {
    color: #ef4444;
}
.vf-mh-gallery-item-like.is-on:hover {
    background: #fef2f2;
}
.vf-mh-gallery-item-view {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 22px;
    padding: 0 8px 0 7px;
    border-radius: 11px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.vf-mh-gallery-item-view svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.vf-mh-gallery-item-view-count {
    min-width: 6px;
    text-align: left;
}
html.vf-theme-dark .vf-mh-gallery-item-like {
    color: #64748b;
}
html.vf-theme-dark .vf-mh-gallery-item-like:hover {
    background: #3b1414;
    color: #fca5a5;
}
html.vf-theme-dark .vf-mh-gallery-item-like.is-on {
    color: #fca5a5;
}
html.vf-theme-dark .vf-mh-gallery-item-like.is-on:hover {
    background: #3b1414;
}
html.vf-theme-dark .vf-mh-gallery-item-view {
    color: #64748b;
}

/* ── Cover Crop Modal ────────────────────────────── */
.vf-mh-crop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 12010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vf-mh-crop-overlay.is-open {
    display: flex;
}
.vf-mh-crop-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: min(1200px, 90vw);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.vf-mh-crop-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
}
.vf-mh-crop-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 12px;
}
.vf-mh-crop-stage {
    background: #1f2937;
    border-radius: 6px;
    overflow: hidden;
    max-height: 75vh;
}
.vf-mh-crop-stage img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
}
/* Cover Crop Modal - Cropper.js handle/line override (visibility) */
.vf-mh-crop-stage .cropper-line {
    background-color: #2f4592;
    opacity: 0.9;
}
.vf-mh-crop-stage .cropper-point {
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border: 2px solid #2f4592;
    border-radius: 50%;
    opacity: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.vf-mh-crop-stage .cropper-point.point-n {
    top: -7px;
    left: 50%;
    margin-left: -7px;
    cursor: ns-resize;
}
.vf-mh-crop-stage .cropper-point.point-s {
    bottom: -7px;
    left: 50%;
    margin-left: -7px;
    cursor: ns-resize;
}
.vf-mh-crop-stage .cropper-point.point-e {
    top: 50%;
    right: -7px;
    margin-top: -7px;
    cursor: ew-resize;
}
.vf-mh-crop-stage .cropper-point.point-w {
    top: 50%;
    left: -7px;
    margin-top: -7px;
    cursor: ew-resize;
}
.vf-mh-crop-stage .cropper-point.point-ne {
    top: -7px;
    right: -7px;
    cursor: nesw-resize;
}
.vf-mh-crop-stage .cropper-point.point-nw {
    top: -7px;
    left: -7px;
    cursor: nwse-resize;
}
.vf-mh-crop-stage .cropper-point.point-se {
    width: 14px;
    height: 14px;
    margin: 0;
    bottom: -7px;
    right: -7px;
    cursor: nwse-resize;
}
.vf-mh-crop-stage .cropper-point.point-se::before {
    display: none;
}
.vf-mh-crop-stage .cropper-point.point-sw {
    bottom: -7px;
    left: -7px;
    cursor: nesw-resize;
}
.vf-mh-crop-stage .cropper-view-box {
    outline: 2px solid #2f4592;
    outline-color: rgba(47, 69, 146, 0.85);
}
.vf-mh-crop-stage .cropper-dashed {
    border-color: rgba(255,255,255,0.7);
}
.vf-mh-crop-msg {
    margin-top: 8px;
    font-size: 12px;
    min-height: 16px;
    color: #6b7280;
}
.vf-mh-crop-msg.err {
    color: #ef4444;
}
.vf-mh-crop-msg.info {
    color: #2563eb;
}
.vf-mh-crop-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}
.vf-mh-crop-btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.vf-mh-crop-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.vf-mh-crop-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.vf-mh-crop-btn-primary {
    background: #2f4592;
    border-color: #2f4592;
    color: #ffffff;
}
.vf-mh-crop-btn-primary:hover {
    background: #243673;
    border-color: #243673;
}
/* Dark theme */
.vf-theme-dark .vf-mh-crop-box {
    background: #1f2937;
}
.vf-theme-dark .vf-mh-crop-title {
    color: #f3f4f6;
}
.vf-theme-dark .vf-mh-crop-desc {
    color: #9ca3af;
}
.vf-theme-dark .vf-mh-crop-btn {
    background: #111827;
    border-color: #374151;
    color: #d1d5db;
}
.vf-theme-dark .vf-mh-crop-btn:hover {
    background: #374151;
    border-color: #4b5563;
}

/* ── Custom scrollbar (modal whole-area scroll) ───── */
.vf-mh-modal::-webkit-scrollbar { width: 7px; height: 7px; }
.vf-mh-modal::-webkit-scrollbar-track { background: transparent; }
.vf-mh-modal::-webkit-scrollbar-thumb { background: #d4d7e0; border-radius: 3px; }
.vf-mh-modal::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
.vf-theme-dark .vf-mh-modal::-webkit-scrollbar-thumb { background: #475569; }
.vf-theme-dark .vf-mh-modal::-webkit-scrollbar-thumb:hover { background: #64748b; }


/* Cover home/explore icon — top-left of cover. Click navigates to /vaiframe/explore page (Phase 3, 2026-05-18) */
.vf-mh-cover-search {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
    z-index: 12;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.vf-mh-cover-search:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}
.vf-mh-cover-search.is-active {
    background: rgba(99, 102, 241, 0.9);
}
.vf-mh-cover-search svg {
    width: 16px;
    height: 16px;
}

/* ════════════════════════════════════════════════════════════════════════════
   Gallery Page Post (post_type='page') — card preview + lightbox renderer
   Renders pages of VaiFrame projects as vector snapshots (not raster images).
   Implemented in /vaiframe/asset/gallery_page_post.js — Stage 3 (viewer).
   ════════════════════════════════════════════════════════════════════════════ */

/* Card host — fills the grid item area. Snapshot DOM is injected here. */
.vf-gp-card-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #f8fafc;
    border-radius: inherit;
    pointer-events: none;
}
.vf-theme-dark .vf-gp-card-host { background: #0f172a; }

/* "Page" badge on the card (top-left, inside the image area). */
.vf-gp-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    padding: 3px 8px;
    background: rgba(47, 69, 146, 0.92);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.2px;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
}
.vf-theme-dark .vf-gp-card-badge {
    background: rgba(79, 92, 168, 0.92);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Loading shimmer (used both in card and lightbox). */
.vf-gp-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: vf-gp-shimmer 1.2s linear infinite;
}
.vf-theme-dark .vf-gp-shimmer {
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
}
@keyframes vf-gp-shimmer {
    0%   { background-position:  100% 0; }
    100% { background-position: -100% 0; }
}

/* Photo card image loading state — same shimmer language as page-post cards. */
/* Sits above the (still empty) <img> until 'load' fires, then is removed. */
.vf-img-loading {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: vf-gp-shimmer 1.2s linear infinite;
    pointer-events: none;
    z-index: 1;
}
html.vf-theme-dark .vf-img-loading {
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    background-size: 200% 100%;
}
.vf-mh-gallery-item img.vf-img-pending {
    opacity: 0;
}
.vf-mh-gallery-item img.vf-img-loaded {
    opacity: 1;
    transition: opacity 0.25s ease;
}

/* Error fallback (snapshot unavailable). */
.vf-gp-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 11px;
    background: #f8fafc;
}
.vf-theme-dark .vf-gp-error {
    color: #64748b;
    background: #0f172a;
}
.vf-gp-error-lb {
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.6);
    font-size: 13px;
}

/* Lightbox host — snapshot renderer occupies the scroll wrapper. */
.vf-mh-lightbox-scroll.vf-gp-lb-scroll {
    overflow: auto;
    display: flex;
    align-items: safe center;
    justify-content: safe center;
    padding: 0;
    box-sizing: border-box;
}
.vf-gp-lb-host {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    max-width: 100%;
    max-height: 100%;
}

/* "View Original" floating chip on the lightbox (top-right, below close button). */
.vf-gp-lb-original {
    position: absolute;
    top: 18px;
    right: 64px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(47, 69, 146, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.15s;
}
.vf-gp-lb-original:hover {
    background: rgba(37, 58, 122, 0.96);
    color: #ffffff;
}
.vf-theme-dark .vf-gp-lb-original {
    background: rgba(79, 92, 168, 0.92);
}
.vf-theme-dark .vf-gp-lb-original:hover {
    background: rgba(95, 109, 184, 0.96);
}

/* ── Meta line stats container (always shown, right-aligned) ──── */
.vf-mh-gallery-meta-stats {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    margin-left: auto;
}