.zfm-app {
    --zfm-green: #07c160;
    --zfm-blue: #576b95;
    --zfm-text: #202124;
    --zfm-muted: #8a8f98;
    --zfm-line: #e7e8ea;
    --zfm-panel: #f5f6f7;
    --zfm-white: #fff;
    background: var(--zfm-white);
    color: var(--zfm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
    margin: 0 auto;
    max-width: 760px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.zfm-app *, .zfm-app *::before, .zfm-app *::after { box-sizing: border-box; }
.zfm-app button, .zfm-app input, .zfm-app textarea { font: inherit; letter-spacing: 0; }
.zfm-app button { -webkit-tap-highlight-color: transparent; }
.zfm-icon { display: block; flex: 0 0 auto; height: 1em; width: 1em; }
.zfm-is-busy { cursor: wait; opacity: .65; pointer-events: none; }
.zfm-app .is-hidden { display: none !important; }
body.zfm-moments-page .article.page-article,
.zfm-host-article { overflow: hidden; padding: 0 !important; }
body.zfm-moments-page .wp-posts-content,
.zfm-host-content { margin: 0 !important; }
body.zfm-moments-page .wp-posts-content > p:empty,
.zfm-host-content > p:empty { display: none; }

.zfm-hero {
    aspect-ratio: 16 / 6.4;
    background: #34423b;
    background-position: center;
    background-size: cover;
    min-height: 230px;
    position: relative;
}

.zfm-hero-shade {
    background: rgba(0, 0, 0, .18);
    inset: 0;
    position: absolute;
}

.zfm-hero-publish {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 3;
}

.zfm-create-trigger {
    align-items: center;
    background: var(--zfm-green);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 5px;
    box-shadow: 0 5px 18px rgba(0, 55, 27, .25);
    color: #fff !important;
    display: inline-flex;
    font-weight: 650;
    gap: 7px;
    height: 40px;
    justify-content: center;
    line-height: 1;
    min-width: 92px;
    padding: 0 16px;
    text-decoration: none !important;
}

.zfm-create-trigger:hover,
.zfm-create-trigger:focus-visible {
    background: #06ad56;
    color: #fff;
    outline: 2px solid rgba(255, 255, 255, .95);
    outline-offset: 2px;
}

.zfm-create-trigger .zfm-icon { font-size: 18px; }

.zfm-hero-profile {
    align-items: flex-end;
    bottom: -30px;
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    left: 24px;
    position: absolute;
    right: 24px;
    z-index: 2;
}

.zfm-hero-profile > strong {
    color: #fff;
    font-size: 19px;
    line-height: 1.35;
    margin-bottom: 40px;
    max-width: min(60%, 360px);
    overflow-wrap: anywhere;
    text-align: right;
    text-shadow: 0 1px 3px rgba(0,0,0,.55);
}

.zfm-hero-avatar {
    align-items: center;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    display: flex;
    height: 82px;
    justify-content: center;
    overflow: hidden;
    width: 82px;
}

.zfm-hero-avatar img, .zfm-avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.zfm-hero-avatar .custom-logo-link, .zfm-hero-avatar .custom-logo { height: 100%; width: 100%; }
.zfm-shell { margin: 0 auto; padding: 52px 24px 32px; }

.zfm-composer-row, .zfm-moment { align-items: flex-start; display: flex; gap: 13px; }
.zfm-compose-main, .zfm-moment-main { min-width: 0; flex: 1; }
.zfm-avatar { border-radius: 5px; flex: 0 0 44px; height: 44px; overflow: hidden; width: 44px; }
.zfm-composer .zfm-avatar { flex-basis: 48px; height: 48px; width: 48px; }
.zfm-avatar a { display: block; height: 100%; width: 100%; }

body.zfm-compose-open { overflow: hidden !important; }
.zfm-compose-modal {
    align-items: center;
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 100000;
}
.zfm-compose-modal[hidden] { display: none; }
.zfm-compose-backdrop {
    background: rgba(16, 20, 18, .62);
    border: 0;
    inset: 0;
    padding: 0;
    position: absolute;
    width: 100%;
}
.zfm-composer {
    background: var(--zfm-white);
    border-radius: 6px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
    display: flex;
    flex-direction: column;
    max-height: min(760px, calc(100vh - 48px));
    max-width: 620px;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 1;
}
.zfm-compose-header {
    align-items: center;
    border-bottom: 1px solid var(--zfm-line);
    display: grid;
    flex: 0 0 58px;
    grid-template-columns: 88px minmax(0, 1fr) 88px;
    padding: 0 14px;
}
.zfm-compose-header h2 {
    color: var(--zfm-text);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.4;
    margin: 0;
    text-align: center;
}
.zfm-compose-close { justify-self: start; }
.zfm-compose-header .zfm-publish-button { justify-self: end; }
.zfm-compose-body {
    min-height: 310px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 26px 20px;
}

.zfm-content {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--zfm-text);
    display: block;
    font-size: 16px;
    line-height: 1.65;
    min-height: 164px;
    outline: none;
    padding: 2px 0 10px;
    resize: none;
    width: 100%;
}

.zfm-content:focus { border: 0; box-shadow: none; }
.zfm-content::placeholder { color: #a6a9ae; }
.zfm-compose-meta {
    align-items: center;
    color: var(--zfm-muted);
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    line-height: 1.4;
    min-height: 24px;
}
.zfm-selected-count { color: #68716c; }
.zfm-compose-tools {
    border-top: 1px solid var(--zfm-line);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 18px;
    padding-top: 16px;
}
.zfm-media-button {
    align-items: center;
    background: #f6faf7;
    border: 1px dashed #b7d9c4;
    border-radius: 5px;
    color: #303631;
    display: grid;
    gap: 1px 9px;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 64px;
    padding: 10px 14px;
    text-align: left;
}
.zfm-media-button:hover,
.zfm-media-button:focus-visible { background: #edf8f1; border-color: var(--zfm-green); outline: none; }
.zfm-media-button .zfm-icon { color: var(--zfm-green); font-size: 24px; grid-row: 1 / 3; }
.zfm-media-button span { font-size: 14px; font-weight: 600; }
.zfm-media-button small { color: var(--zfm-muted); font-size: 11px; }
.zfm-compose-footer {
    align-items: center;
    border-top: 1px solid var(--zfm-line);
    color: var(--zfm-muted);
    display: flex;
    flex: 0 0 52px;
    font-size: 12px;
    justify-content: space-between;
    padding: 0 20px;
}
.zfm-compose-cancel { background: transparent; border: 0; color: var(--zfm-blue); padding: 8px; }

.zfm-icon-button, .zfm-more-button, .zfm-lightbox-close, .zfm-lightbox-prev, .zfm-lightbox-next {
    align-items: center;
    background: transparent;
    border: 0;
    color: #65706a;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.zfm-icon-button { border-radius: 4px; font-size: 21px; }
.zfm-icon-button:hover, .zfm-icon-button:focus-visible { background: var(--zfm-panel); color: var(--zfm-green); outline: none; }

.zfm-publish-button, .zfm-primary-button {
    align-items: center;
    background: var(--zfm-green);
    border: 0;
    border-radius: 4px;
    color: #fff !important;
    display: inline-flex;
    font-weight: 600;
    gap: 7px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0 18px;
    text-decoration: none !important;
}

.zfm-publish-button:hover, .zfm-primary-button:hover { background: #06ad56; color: #fff; }
.zfm-publish-button .zfm-icon, .zfm-primary-button .zfm-icon { font-size: 16px; }
.zfm-publish-button {
    font-size: 14px;
    min-width: 88px;
    padding: 0 8px;
    white-space: nowrap;
    width: 88px;
}
.zfm-publish-button > span { display: block; overflow: hidden; white-space: nowrap; }
.zfm-publish-button.zfm-is-busy { opacity: 1; }
.zfm-publish-button.zfm-is-busy .zfm-icon { display: none; }
.zfm-publish-button.zfm-is-busy::before {
    animation: zfm-spin .75s linear infinite;
    border: 2px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    border-top-color: #fff;
    content: "";
    flex: 0 0 14px;
    height: 14px;
    width: 14px;
}
.zfm-publish-button:disabled { cursor: not-allowed; opacity: .55; }
@keyframes zfm-spin { to { transform: rotate(360deg); } }
.zfm-compose-status { color: #c0392b; font-size: 13px; line-height: 1.5; min-height: 0; }
.zfm-compose-status:not(:empty) { margin-top: 8px; }

.zfm-media-preview {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 5px;
    max-width: 440px;
}

.zfm-compose-image { aspect-ratio: 1; background: #eef0f1; border-radius: 4px; overflow: hidden; position: relative; }
.zfm-compose-image img { display: block; height: 100%; object-fit: cover; width: 100%; }
.zfm-preview-remove {
    align-items: center;
    background: rgba(22,25,24,.78);
    border: 0;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 20px;
    height: 26px;
    justify-content: center;
    line-height: 1;
    padding: 0 0 2px;
    position: absolute;
    right: 6px;
    top: 6px;
    width: 26px;
}

.zfm-moment { border-bottom: 1px solid var(--zfm-line); padding: 24px 0; }
.zfm-author-row { align-items: center; display: flex; min-height: 28px; }
.zfm-author-row .zfm-user-name { margin-right: auto; }
.zfm-user-name { color: var(--zfm-blue) !important; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; text-decoration: none !important; }
.zfm-delete-moment { color: #9a9da2; font-size: 16px; height: 28px; width: 28px; }

.zfm-moment-content { color: var(--zfm-text); font-size: 16px; line-height: 1.7; margin: 4px 0 10px; overflow-wrap: anywhere; }
.zfm-moment-content p { margin: 0 0 7px; }
.zfm-moment-content p:last-child { margin-bottom: 0; }
.zfm-moment-content a { color: #2677b8; }

.zfm-media-grid {
    display: grid;
    gap: 5px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 10px 0 12px;
    max-width: 480px;
}

.zfm-media-grid.zfm-grid-1 { display: block; max-width: 390px; }
.zfm-media-grid.zfm-grid-2, .zfm-media-grid.zfm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 390px; }
.zfm-image { aspect-ratio: 1; background: #eef0f1; border: 0; cursor: zoom-in; display: block; overflow: hidden; padding: 0; width: 100%; }
.zfm-image img { display: block; height: 100%; object-fit: cover; transition: transform .2s ease; width: 100%; }
.zfm-image:hover img { transform: scale(1.015); }
.zfm-grid-1 .zfm-image { aspect-ratio: auto; max-height: 430px; width: auto; }
.zfm-grid-1 .zfm-image img { height: auto; max-height: 430px; object-fit: contain; width: auto; }
.zfm-video { background: #141615; margin: 10px 0 12px; max-height: 520px; max-width: 390px; overflow: hidden; }
.zfm-video video { display: block; max-height: 520px; width: 100%; }

.zfm-meta-row { align-items: center; display: flex; min-height: 34px; position: relative; }
.zfm-time { color: var(--zfm-muted) !important; font-size: 12px; text-decoration: none !important; }
.zfm-admin-badge { background: #eef1f5; border-radius: 3px; color: #66717b; font-size: 11px; margin-left: 8px; padding: 2px 5px; }
.zfm-actions-wrap { margin-left: auto; position: relative; }
.zfm-more-button { background: #f2f3f4; border-radius: 3px; color: var(--zfm-blue); font-size: 20px; height: 28px; width: 38px; }
.zfm-more-button:hover, .zfm-more-button:focus-visible { background: #e7e9eb; outline: none; }

.zfm-action-menu {
    align-items: stretch;
    background: #3d4144;
    border-radius: 4px;
    display: flex;
    height: 42px;
    overflow: hidden;
    position: absolute;
    right: 46px;
    top: -7px;
    width: 190px;
    z-index: 10;
}

.zfm-action-menu[hidden] { display: none; }
.zfm-action-menu a { align-items: center; color: #fff !important; display: flex; flex: 1; font-size: 14px; gap: 7px; justify-content: center; text-decoration: none !important; }
.zfm-action-menu a + a { border-left: 1px solid rgba(255,255,255,.12); }
.zfm-action-menu a:hover { background: #323638; }
.zfm-action-menu .zfm-icon { font-size: 16px; }
.zfm-action-menu .is-liked { color: #7ee6a9 !important; }

.zfm-social-box { background: var(--zfm-panel); border-radius: 3px; color: #33383c; font-size: 14px; line-height: 1.55; margin-top: 4px; padding: 7px 10px; position: relative; }
.zfm-social-box::before { border-bottom: 6px solid var(--zfm-panel); border-left: 6px solid transparent; border-right: 6px solid transparent; content: ""; left: 12px; position: absolute; top: -6px; }
.zfm-like-list { align-items: flex-start; color: var(--zfm-blue); display: flex; gap: 7px; padding: 1px 0 5px; }
.zfm-like-list .zfm-icon { fill: currentColor; font-size: 14px; margin-top: 3px; }
.zfm-like-list .zfm-user-name { font-weight: 550; }
.zfm-like-list + .zfm-comment-list, .zfm-like-list + .zfm-show-comments, .zfm-show-comments + .zfm-comment-list { border-top: 1px solid #e1e3e5; padding-top: 5px; }
.zfm-show-comments { background: transparent; border: 0; color: var(--zfm-blue); display: block; padding: 1px 0 5px; text-align: left; width: 100%; }
.zfm-comment { line-height: 1.65; overflow-wrap: anywhere; position: relative; }
.zfm-reply-comment { background: transparent; border: 0; color: var(--zfm-blue); display: inline; font-weight: 550; padding: 0; text-align: left; }
.zfm-reply-comment .zfm-user-name { font-weight: 550; pointer-events: none; }
.zfm-reply-comment > span { color: #555b60; font-weight: 400; margin: 0 2px; }
.zfm-delete-comment { background: transparent; border: 0; color: #9da1a5; display: inline-flex; font-size: 12px; margin-left: 5px; padding: 2px; vertical-align: middle; }
.zfm-delete-comment:hover { color: #c0392b; }
.zfm-comment-cap { color: var(--zfm-muted); font-size: 12px; padding-top: 4px; }

.zfm-comment-form { margin-top: 8px; position: relative; }
.zfm-comment-form[hidden] { display: none; }
.zfm-comment-input-row { align-items: center; background: var(--zfm-panel); border: 1px solid transparent; border-radius: 4px; display: flex; gap: 2px; min-height: 42px; padding: 3px 4px 3px 10px; }
.zfm-comment-input-row:focus-within { background: #fff; border-color: #b8d8c7; }
.zfm-comment-input-row input { background: transparent; border: 0; box-shadow: none; flex: 1; height: 34px; min-width: 0; outline: none; padding: 0; }
.zfm-comment-input-row input:focus { border: 0; box-shadow: none; }
.zfm-emoji-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 3px;
    color: #737b76;
    display: flex;
    flex: 0 0 34px;
    font-size: 19px;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}
.zfm-emoji-toggle:hover, .zfm-emoji-toggle:focus-visible, .zfm-emoji-toggle[aria-expanded="true"] { background: #e5e9e6; color: var(--zfm-green); outline: none; }
.zfm-emoji-panel {
    background: #fff;
    border: 1px solid var(--zfm-line);
    border-radius: 5px;
    bottom: calc(100% + 7px);
    box-shadow: 0 8px 24px rgba(30, 40, 34, .14);
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(8, 34px);
    left: 0;
    max-height: 210px;
    max-width: 100%;
    overscroll-behavior: contain;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 7px;
    position: absolute;
    scrollbar-color: #c7cdc9 transparent;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
}
.zfm-emoji-panel[hidden] { display: none; }
.zfm-emoji-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 3px;
    display: flex;
    font-size: 20px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 34px;
}
.zfm-emoji-item:hover, .zfm-emoji-item:focus-visible { background: #edf4ef; outline: none; }
.zfm-comment-submit { align-items: center; background: var(--zfm-green); border: 0; border-radius: 3px; color: #fff; display: flex; font-size: 16px; height: 34px; justify-content: center; width: 38px; }
.zfm-replying { align-items: center; color: var(--zfm-muted); display: flex; font-size: 12px; justify-content: space-between; padding: 0 3px 5px; }
.zfm-replying[hidden] { display: none; }
.zfm-cancel-reply { background: transparent; border: 0; color: #8e9398; display: inline-flex; padding: 2px; }

.zfm-login-required { align-items: center; color: var(--zfm-muted); display: flex; flex-direction: column; gap: 12px; min-height: 360px; justify-content: center; }
.zfm-login-required > .zfm-icon { font-size: 34px; }
.zfm-empty { align-items: center; color: #a2a6aa; display: flex; flex-direction: column; min-height: 210px; justify-content: center; }
.zfm-empty .zfm-icon { font-size: 34px; margin-bottom: 9px; }
.zfm-empty p { font-size: 14px; margin: 0; }
.zfm-load-more { background: transparent; border: 0; color: var(--zfm-blue); display: block; margin: 20px auto 0; min-height: 38px; padding: 0 18px; }

.zfm-lightbox { align-items: center; background: rgba(8,10,9,.96); display: flex; inset: 0; justify-content: center; position: fixed; z-index: 100000; }
.zfm-lightbox[hidden] { display: none; }
.zfm-lightbox img { max-height: 90vh; max-width: min(92vw, 1400px); object-fit: contain; }
.zfm-lightbox-close, .zfm-lightbox-prev, .zfm-lightbox-next { color: #fff; position: absolute; z-index: 2; }
.zfm-lightbox-close { font-size: 30px; right: 18px; top: 18px; }
.zfm-lightbox-prev, .zfm-lightbox-next { background: rgba(255,255,255,.08); border-radius: 50%; font-size: 30px; height: 48px; top: calc(50% - 24px); width: 48px; }
.zfm-lightbox-prev { left: 18px; }
.zfm-lightbox-next { right: 18px; }
.zfm-lightbox-count { bottom: 20px; color: #fff; font-size: 13px; left: 0; position: absolute; right: 0; text-align: center; }
.zfm-toast { background: rgba(30,33,31,.92); border-radius: 4px; bottom: 30px; color: #fff; left: 50%; max-width: min(360px, calc(100% - 32px)); opacity: 0; padding: 10px 16px; pointer-events: none; position: fixed; transform: translate(-50%, 12px); transition: opacity .18s ease, transform .18s ease; z-index: 100001; }
.zfm-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
    .zfm-app { margin-left: auto; margin-right: auto; }
    .zfm-hero { aspect-ratio: 4 / 2.7; min-height: 220px; }
    .zfm-hero-publish { right: 14px; top: 14px; }
    .zfm-hero-create { height: 38px; padding: 0 13px; }
    .zfm-hero-profile { bottom: -27px; left: 15px; right: 15px; }
    .zfm-hero-profile > strong { font-size: 17px; margin-bottom: 34px; max-width: 58%; }
    .zfm-hero-avatar { border-width: 2px; height: 74px; width: 74px; }
    .zfm-shell { padding: 48px 15px 24px; }
    .zfm-composer-row, .zfm-moment { gap: 10px; }
    .zfm-avatar { flex-basis: 42px; height: 42px; width: 42px; }
    .zfm-composer .zfm-avatar { flex-basis: 44px; height: 44px; width: 44px; }
    .zfm-compose-modal { align-items: stretch; padding: 0; }
    .zfm-composer { border-radius: 0; height: 100%; max-height: none; max-width: none; }
    .zfm-compose-header { flex-basis: calc(56px + env(safe-area-inset-top)); grid-template-columns: 88px minmax(0, 1fr) 88px; padding: env(safe-area-inset-top) 12px 0; }
    .zfm-compose-header h2 { font-size: 16px; }
    .zfm-compose-body { min-height: 0; padding: 20px 16px 14px; }
    .zfm-content { min-height: 132px; }
    .zfm-compose-tools { gap: 8px; }
    .zfm-media-button { grid-template-columns: 29px minmax(0, 1fr); padding: 7px 9px; }
    .zfm-media-button .zfm-icon { font-size: 21px; }
    .zfm-compose-footer { flex-basis: calc(50px + env(safe-area-inset-bottom)); padding: 0 16px env(safe-area-inset-bottom); }
    .zfm-content, .zfm-moment-content { font-size: 15px; }
    .zfm-moment { padding: 20px 0; }
    .zfm-media-grid { gap: 4px; max-width: 100%; }
    .zfm-media-grid.zfm-grid-1 { max-width: 82%; }
    .zfm-media-grid.zfm-grid-2, .zfm-media-grid.zfm-grid-4 { max-width: 86%; }
    .zfm-action-menu { right: 44px; width: 174px; }
    .zfm-emoji-panel { grid-template-columns: repeat(7, 34px); }
    .zfm-lightbox-prev, .zfm-lightbox-next { height: 40px; width: 40px; }
    .zfm-lightbox-prev { left: 8px; }
    .zfm-lightbox-next { right: 8px; }
}

@media (max-width: 360px) {
    .zfm-emoji-panel { grid-template-columns: repeat(6, 34px); }
}

@media (prefers-reduced-motion: reduce) {
    .zfm-app *, .zfm-app *::before, .zfm-app *::after { scroll-behavior: auto !important; transition: none !important; }
}
