/* ============ 搜图专区 ============ */
.memberzone-fullscreen {
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    background: #f5f6f8;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.mz-header-placeholder { width: 36px; display: inline-block; flex: 0 0 36px; }

/* 顶部提示条 */
.memberzone-tip {
    display: none;
    margin: 10px 10px 0;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    background: #fff7e6;
    color: #a06800;
    border: 1px solid #ffe0a3;
}
.memberzone-tip.show { display: block; }

.memberzone-scroll { flex: 1; overflow-y: auto; padding: 10px 10px 24px; }
/* minmax(0,1fr)：1fr 等价 minmax(auto,1fr)，卡片内有固有宽度的 <img> 会把格子撑破导致横向溢出 */
.memberzone-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }

/* 工具栏：全部 / 我的发布 + 发布图片 */
.mz-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 10px 0;
}
.mz-scope { display: flex; background: #eceef1; border-radius: 8px; padding: 3px; }
.mz-scope-item {
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.mz-scope-item.active { background: #fff; color: #07C160; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.mz-publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #07C160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
}
.mz-publish-btn:active { opacity: .85; }

/* 文章卡片（一行三个，绿底二维码 + 标题 + 编号） */
.mz-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.mz-card:active { transform: scale(0.985); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10); }

/* 图片区：图片铺满整张卡片 */
.mz-cover-wrap {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    background: #f0f0f0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.mz-cover-wrap .mz-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    background: #f0f0f0;
    display: block;
}
/* 锁定态置灰 */
.mz-card.locked .mz-cover-wrap { filter: grayscale(0.6); }

/* 轻量图片预览层：点背景关闭，图片按原始比例显示 */
.mz-image-preview {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.mz-image-preview img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
}

/* 锁定态遮罩 */
.mz-lock-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.mz-body {
    padding: 10px 8px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mz-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}
.mz-id {
    font-size: 13px;
    color: #07C160;
    font-weight: 600;
}
.mz-card.locked .mz-title,
.mz-card.locked .mz-id { color: #8a8a8a; }

/* 权限徽章 */
.mz-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.mz-badge.lv0 { background: #e8f8ee; color: #07C160; }
.mz-badge.lv1 { background: linear-gradient(135deg, #ffdf8a, #f5c542); color: #7a5200; }
.mz-badge.lv2 { background: linear-gradient(135deg, #ffb36b, #ff7a45); color: #7a2e00; }

/* 空状态 / 加载 / 错误 */
.mz-empty, .mz-loading, .mz-error {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 14px;
}
.mz-empty i, .mz-error i { display: block; font-size: 40px; margin-bottom: 10px; color: #d5d8dc; }

/* ============ 文章详情 ============ */
.mz-detail { padding: 14px 14px 30px; }
.mz-detail-head {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.mz-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.45;
    word-break: break-all;
    margin-bottom: 8px;
}
.mz-detail-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #aaa;
}
.mz-detail-content {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 10px;
}
.mz-detail-imgs {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mz-detail-imgs img {
    width: 100%;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    background: #eceef1;
}

/* 图片预览层 */
.mz-preview {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mz-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mz-preview .mz-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10000;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .mz-title { font-size: 12px; }
    .mz-id { font-size: 12px; }
}

/* ============ 我的发布标记 / 删除 ============ */
.mz-mine-tag {
    position: absolute;
    left: 6px;
    top: 6px;
    background: rgba(7, 193, 96, 0.92);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    z-index: 3;
    pointer-events: none;
}
.mz-del-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}
.mz-del-btn:active { background: rgba(0, 0, 0, 0.68); }

/* ============ 发布图片表单 ============ */
.mz-pub-form { display: flex; flex-direction: column; gap: 12px; padding: 12px 2px 30px; }
.mz-field { background: #fff; border-radius: 10px; padding: 12px; }
.mz-field > label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px; }
.mz-field .req { color: #ff4d4f; }
.mz-field input[type="text"],
.mz-field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
}
.mz-field input[type="text"]:focus,
.mz-field textarea:focus { border-color: #07C160; }
.mz-field textarea { resize: none; line-height: 1.6; }
.mz-counter { text-align: right; font-size: 12px; color: #aaa; margin-top: 4px; }

.mz-pub-imgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mz-pub-imgs:empty { display: none; }
.mz-pub-img { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #f0f0f0; }
.mz-pub-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mz-pub-img-cover {
    position: absolute;
    left: 0;
    bottom: 0;
    background: rgba(7, 193, 96, 0.92);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 0 6px 0 0;
}
.mz-pub-img-del {
    position: absolute;
    right: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
}
.mz-add-img {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f5f6f8;
    border: 1px dashed #c8ccd0;
    color: #666;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}
.mz-pub-note {
    display: flex;
    gap: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #a06800;
    background: #fff7e6;
    border: 1px solid #ffe0a3;
    border-radius: 8px;
    padding: 9px 12px;
}
.mz-pub-note i { flex: 0 0 auto; margin-top: 2px; }
