/* styles-memory-v2.css — Memory V2 关系式记忆 UI（暖色相册风，参考设计图） */

#layer-memory-v2 {
    /* [FIX-层级] 记忆V2作为独立全屏层，层级需高于旧记忆系统弹窗(5100)，否则被盖住只能靠返回键露出 */
    z-index: 5200;
    --mv2-bg: #f3efe7;
    --mv2-card: #fbf8f2;
    --mv2-card2: #f6f1e8;
    --mv2-ink: #4a4038;
    --mv2-ink2: #8c8175;
    --mv2-ink3: #b3a99b;
    --mv2-accent: #c99a8a;
    --mv2-accent2: #d8b7a8;
    --mv2-line: #e6ddce;
    --mv2-blue: #6b7a99;
    background: var(--mv2-bg);
    color: var(--mv2-ink);
    font-family: -apple-system, "PingFang SC", "Segoe UI", sans-serif;
}

/* 顶栏 */
.mv2-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 10px;
    background: transparent;
}
.mv2-nav .mv2-nav-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mv2-ink2); font-size: 17px; cursor: pointer;
    background: rgba(255,255,255,0.5);
    -webkit-tap-highlight-color: transparent;
}
.mv2-nav .mv2-nav-btn:active { background: rgba(0,0,0,0.05); }
.mv2-nav .mv2-nav-title { font-size: 17px; font-weight: 600; color: var(--mv2-ink); }

.mv2-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; height: auto; padding-bottom: 80px; }

/* ===== 首页头图 ===== */
.mv2-hero { padding: 6px 20px 4px; position: relative; }
.mv2-hero-title {
    font-family: "Snell Roundhand", "Brush Script MT", cursive;
    font-size: 46px; font-weight: 500; color: var(--mv2-ink);
    letter-spacing: 1px; line-height: 1.1;
}
.mv2-hero-sub { font-size: 13px; color: var(--mv2-ink2); margin-top: 6px; letter-spacing: 2px; }
.mv2-hero-img {
    display: block; width: 100%; margin: 14px 0 4px; height: 150px; padding: 0; border-radius: 16px;
    background: linear-gradient(135deg, #e8ddcb, #d9c9b3);
    background-size: cover; background-position: center;
    box-shadow: 0 6px 20px rgba(150,130,100,0.18);
}
.mv2-upload-frame {
    position: relative; overflow: hidden; box-sizing: border-box; appearance: none;
    border: 0; color: var(--mv2-ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mv2-upload-frame img {
    display: block; width: 100%; height: 100%; object-fit: cover;
}
.mv2-upload-hint {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-width: 92px; padding: 12px 16px; border-radius: 18px; pointer-events: none;
    color: #6f6257; background: rgba(255,255,255,.72); box-shadow: 0 4px 14px rgba(80,65,50,.12);
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.mv2-upload-hint i { font-size: 18px; color: var(--mv2-accent); }
.mv2-upload-frame.has-photo .mv2-upload-hint {
    left: auto; top: auto; right: 10px; bottom: 10px; transform: none;
    width: 36px; height: 36px; min-width: 0; padding: 0; border-radius: 50%;
    color: #fff; background: rgba(35,31,28,.58); box-shadow: 0 3px 10px rgba(0,0,0,.2);
}
.mv2-upload-frame.has-photo .mv2-upload-hint i { color: #fff; font-size: 14px; }
.mv2-upload-frame.has-photo .mv2-upload-hint span { display: none; }
.mv2-upload-frame:focus-visible { outline: 3px solid rgba(201,154,138,.48); outline-offset: 2px; }

/* 卡片通用 */
.mv2-card {
    background: var(--mv2-card); border-radius: 16px; padding: 16px;
    margin: 12px 16px; box-shadow: 0 4px 16px rgba(160,140,110,0.08);
}
.mv2-card-title { font-size: 15px; font-weight: 600; color: var(--mv2-ink); }
.mv2-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 20px 18px 8px;
}
.mv2-section-head .t { font-size: 16px; font-weight: 700; color: var(--mv2-ink); }
.mv2-section-head .more { font-size: 12px; color: var(--mv2-accent); cursor: pointer; }

/* 我的记忆相册总览 */
.mv2-album-overview {
    display: flex; align-items: center; gap: 14px;
    background: var(--mv2-card); border-radius: 16px; padding: 16px;
    margin: 12px 16px; box-shadow: 0 4px 16px rgba(160,140,110,0.08);
}
.mv2-album-overview .meta { flex: 1; }
.mv2-album-overview .meta .n { font-size: 15px; font-weight: 600; }
.mv2-album-overview .meta .d { font-size: 12px; color: var(--mv2-ink2); margin-top: 4px; }
.mv2-album-overview .ico {
    width: 46px; height: 46px; border-radius: 12px; background: var(--mv2-card2);
    display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--mv2-accent);
}

/* 联系人（记忆对象）列表 */
.mv2-contact-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 4px;
    border-bottom: 1px solid var(--mv2-line); cursor: pointer;
}
.mv2-contact-row:last-child { border-bottom: none; }
.mv2-contact-avatar {
    width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
    background: var(--mv2-card2); flex-shrink: 0;
}
.mv2-contact-info { flex: 1; min-width: 0; }
.mv2-contact-info .name { font-size: 14px; font-weight: 600; }
.mv2-contact-info .stat { font-size: 11px; color: var(--mv2-ink2); margin-top: 3px; }
.mv2-contact-thumbs { display: flex; gap: 4px; }
.mv2-contact-thumbs .th {
    width: 34px; height: 34px; border-radius: 7px; object-fit: cover;
    background: var(--mv2-card2);
}

/* 最近的故事 横向 */
.mv2-story-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 8px; -webkit-overflow-scrolling: touch; }
.mv2-story-scroll::-webkit-scrollbar { display: none; }
.mv2-story-card { flex-shrink: 0; width: 108px; cursor: pointer; }
.mv2-story-card .cover {
    width: 108px; height: 88px; border-radius: 12px; object-fit: cover;
    background: linear-gradient(135deg,#e3d6c2,#cdbaa0);
    box-shadow: 0 4px 12px rgba(150,130,100,0.15);
}
.mv2-story-card .t { font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--mv2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv2-story-card .d { font-size: 10px; color: var(--mv2-ink3); margin-top: 2px; }

/* ===== Tab 切换 ===== */
.mv2-tabs { display: flex; gap: 22px; padding: 4px 20px 0; border-bottom: 1px solid var(--mv2-line); margin: 8px 0 0; overflow-x: auto; scrollbar-width: none; }
.mv2-tabs::-webkit-scrollbar { display: none; }
.mv2-tab { flex-shrink: 0; font-size: 14px; color: var(--mv2-ink2); padding: 10px 0; cursor: pointer; position: relative; }
.mv2-tab.active { color: var(--mv2-ink); font-weight: 700; }
.mv2-tab.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--mv2-accent); border-radius: 2px;
}

/* ===== 时光轴 ===== */
.mv2-timeline { padding: 8px 20px; }
.mv2-tl-year { font-size: 26px; font-weight: 700; color: var(--mv2-ink); margin: 18px 0 10px; letter-spacing: 1px; }
.mv2-tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.mv2-tl-item::before {
    content: ''; position: absolute; left: 4px; top: 16px; bottom: -6px; width: 1.5px;
    background: var(--mv2-line);
}
.mv2-tl-item:last-child::before { display: none; }
.mv2-tl-dot {
    width: 9px; height: 9px; border-radius: 50%; background: var(--mv2-accent2);
    margin-top: 6px; flex-shrink: 0; z-index: 1; border: 2px solid var(--mv2-bg);
    box-sizing: content-box;
}
.mv2-tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; align-items: stretch; }
.mv2-tl-text { flex: 1; min-width: 0; }
.mv2-tl-date { font-size: 12px; color: var(--mv2-ink2); }
.mv2-tl-title { font-size: 15px; font-weight: 600; margin: 4px 0 4px; }
.mv2-tl-desc {
    font-size: 12px; color: var(--mv2-ink2); line-height: 1.65;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
    overflow: hidden;
}
.mv2-tl-photo {
    width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 168px;
    border-radius: 10px; object-fit: cover; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg,#e3d6c2,#cdbaa0);
    box-shadow: 0 4px 12px rgba(150,130,100,0.15);
}

/* ===== 事件详情（拍立得风） ===== */
.mv2-detail-polaroid {
    background: #fff; padding: 12px 12px 40px; border-radius: 6px; margin: 16px;
    box-shadow: 0 10px 30px rgba(120,100,80,0.2); position: relative; transform: rotate(-1deg);
}
.mv2-detail-polaroid .pic {
    width: 100%; height: 260px; object-fit: cover; border-radius: 3px;
    background: linear-gradient(135deg,#d9c9b3,#c2ac90);
}
.mv2-detail-polaroid .clip {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    z-index: 2; pointer-events: none; font-size: 22px; color: #b3a99b;
}
.mv2-detail-meta { padding: 4px 20px 8px; }
.mv2-detail-meta .date { font-size: 12px; color: var(--mv2-ink2); }
.mv2-detail-meta .title { font-size: 22px; font-weight: 700; margin: 6px 0; display: flex; align-items: center; gap: 10px; }
.mv2-detail-meta .tag {
    font-size: 11px; color: var(--mv2-accent); background: rgba(201,154,138,0.12);
    padding: 3px 10px; border-radius: 20px; font-weight: 500;
}
.mv2-detail-meta .body { font-size: 14px; color: var(--mv2-ink); line-height: 1.9; margin-top: 8px; }

.mv2-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 16px; }
.mv2-photo-grid .g {
    aspect-ratio: 1; border-radius: 10px; object-fit: cover;
    background: linear-gradient(135deg,#e3d6c2,#cdbaa0);
}

/* 相关记忆碎片 */
.mv2-frag-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: var(--mv2-card); border-radius: 12px; margin: 8px 16px;
    box-shadow: 0 2px 10px rgba(160,140,110,0.06); cursor: pointer;
}
.mv2-frag-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mv2-accent2); flex-shrink: 0; }
.mv2-frag-item.spec .dot { background: var(--mv2-ink3); }
.mv2-frag-item .fi { flex: 1; min-width: 0; }
.mv2-frag-item .fi .ft { font-size: 13px; color: var(--mv2-ink); white-space: normal; overflow-wrap: anywhere; line-height: 1.65; }
.mv2-tl-desc { white-space: normal; overflow-wrap: anywhere; line-height: 1.65; }
.mv2-user-photo img, .mv2-tl-photo img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.mv2-frag-item .fi .fd { font-size: 11px; color: var(--mv2-ink3); margin-top: 3px; }
.mv2-frag-item .arrow { color: var(--mv2-ink3); font-size: 12px; }

.mv2-add-btn {
    display: block; margin: 18px 16px 30px; padding: 14px; text-align: center;
    background: linear-gradient(135deg, var(--mv2-accent), var(--mv2-accent2));
    color: #fff; border-radius: 26px; font-size: 15px; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 18px rgba(201,154,138,0.35);
}

/* ===== 故事集 ===== */
.mv2-saga-card {
    background: var(--mv2-card); border-radius: 16px; padding: 16px; margin: 12px 16px;
    box-shadow: 0 4px 16px rgba(160,140,110,0.08); cursor: pointer;
}
.mv2-saga-card .sh { display: flex; align-items: center; gap: 10px; }
.mv2-saga-card .sh .ic {
    width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--mv2-accent), var(--mv2-accent2));
}
.mv2-saga-card .sh .st { flex: 1; }
.mv2-saga-card .sh .st .n { font-size: 15px; font-weight: 700; }
.mv2-saga-card .sh .st .m { font-size: 11px; color: var(--mv2-ink2); margin-top: 2px; }
.mv2-saga-card .sh .badge {
    font-size: 10px; padding: 3px 8px; border-radius: 12px;
    background: rgba(107,122,153,0.12); color: var(--mv2-blue);
}
.mv2-saga-card .sh .badge.ongoing { background: rgba(120,180,120,0.15); color: #5a9a5a; }
.mv2-saga-card .desc { font-size: 12px; color: var(--mv2-ink2); line-height: 1.6; margin-top: 10px; }
.mv2-saga-phase {
    display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--mv2-line);
    font-size: 11px; color: var(--mv2-ink2);
}
.mv2-saga-phase .pdot { color: var(--mv2-accent); }

/* ===== 记忆星图 ===== */
.mv2-constellation { position: relative; height: 340px; margin: 12px 16px; }
.mv2-constellation svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mv2-node {
    position: absolute; transform: translate(-50%,-50%);
    display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
}
.mv2-node .bubble {
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(120,100,80,0.2);
}
.mv2-node.center .bubble { width: 64px; height: 64px; background: linear-gradient(135deg,#6b7a99,#8a97b3); font-size: 15px; }
.mv2-node.person .bubble { width: 48px; height: 48px; background: linear-gradient(135deg,#c99a8a,#d8b7a8); }
.mv2-node.small .bubble { width: 40px; height: 40px; background: linear-gradient(135deg,#b3a99b,#cabfae); font-size: 11px; }
.mv2-const-caption { padding: 0 20px; font-size: 12px; color: var(--mv2-ink2); line-height: 1.7; }

/* ===== 发现 ===== */
.mv2-discover-card {
    background: var(--mv2-card); border-radius: 16px; padding: 16px; margin: 12px 16px;
    box-shadow: 0 4px 16px rgba(160,140,110,0.08); position: relative; overflow: hidden;
}
.mv2-discover-card .dt { font-size: 13px; color: var(--mv2-ink2); line-height: 1.8; }
.mv2-discover-card .hl { color: var(--mv2-accent); font-weight: 700; font-size: 16px; }

/* ===== 底部 tab bar ===== */
.mv2-tabbar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 64px;
    background: rgba(251,248,242,0.96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--mv2-line);
    display: flex; align-items: center; justify-content: space-around; z-index: 5;
}
.mv2-tabbar .tb {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; color: var(--mv2-ink3); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mv2-tabbar .tb i { font-size: 18px; }
.mv2-tabbar .tb.active { color: var(--mv2-accent); }

/* 空状态 */
.mv2-empty { text-align: center; padding: 60px 30px; color: var(--mv2-ink3); }
.mv2-empty i { font-size: 40px; margin-bottom: 14px; opacity: 0.5; }
.mv2-empty .t { font-size: 15px; color: var(--mv2-ink2); margin-bottom: 6px; }
.mv2-empty .d { font-size: 12px; line-height: 1.7; }

.mv2-chip {
    display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 14px;
    background: var(--mv2-card2); color: var(--mv2-ink2); margin: 3px 4px 0 0;
}
.mv2-chip.person { background: rgba(201,154,138,0.14); color: var(--mv2-accent); }
.mv2-chip.place { background: rgba(107,122,153,0.12); color: var(--mv2-blue); }
.mv2-chip.emotion { background: rgba(200,150,150,0.14); color: #b57; }

/* ---- 顶栏下拉菜单 ---- */
.mv2-dropdown {
    position: absolute; right: 16px; top: 52px; z-index: 10;
    background: #fff; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 180px; overflow: hidden;
}
.mv2-menu-item {
    padding: 13px 18px; font-size: 13px; color: #4a4038;
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid #f5f0e8;
    -webkit-tap-highlight-color: transparent;
}
.mv2-menu-item:last-child { border-bottom: none; }
.mv2-menu-item:active { background: #f5f0e8; }
.mv2-menu-item i { color: var(--mv2-accent); width: 18px; text-align: center; font-size: 13px; }

/* ===== 维护操作与表单 ===== */
#layer-memory-v2 button,
.mv2-editor-overlay button,
.mv2-action-mask button {
    border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mv2-add-btn { border: 0; width: calc(100% - 32px); }
.mv2-page-actions {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 8px 16px 4px;
}
.mv2-page-actions .mv2-add-btn,
.mv2-add-btn.mv2-add-btn-compact {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    width: auto; min-height: 36px; margin: 0; padding: 8px 13px;
    border-radius: 18px; font-size: 12px; box-shadow: 0 3px 10px rgba(201,154,138,.22);
}
.mv2-entity-tools {
    display: inline-flex; align-items: center; gap: 3px; margin-left: auto; flex-shrink: 0;
}
.mv2-entity-tools button,
.mv2-portrait-tools button,
.mv2-inline-add {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(201,154,138,.11); color: var(--mv2-ink2); font-size: 11px;
}
.mv2-entity-tools button.danger,
.mv2-portrait-tools button.danger { color: #b85f5f; background: rgba(184,95,95,.08); }
.mv2-tl-title,
.mv2-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mv2-tl-title .mv2-entity-tools { margin-left: 4px; }
.mv2-saga-card .sh .mv2-entity-tools { margin-left: 2px; }
.mv2-frag-item .mv2-entity-tools { max-width: 62px; flex-wrap: wrap; justify-content: flex-end; }
.mv2-frag-item .mv2-entity-tools button { width: 26px; height: 26px; }

.mv2-user-photo { position: relative; overflow: hidden; cursor: pointer; }
.mv2-user-photo .mv2-photo-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px;
    color: #fff; font-size: 10px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.mv2-photo-edit {
    position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 9px; background: rgba(0,0,0,.45);
}
.mv2-photo-owner{position:absolute;left:6px;top:6px;max-width:calc(100% - 38px);padding:2px 6px;border-radius:8px;background:rgba(35,31,28,.62);color:#fff;font-size:9px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2}
.mv2-owner-label{display:inline-block;margin-left:6px;padding:1px 5px;border-radius:8px;background:#eee7dd;color:#87796b;font-size:9px;font-weight:500;vertical-align:middle;max-width:86px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mv2-detail-polaroid .pic { overflow: hidden; }
.mv2-detail-polaroid .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mv2-entity-summary { font-size: 13px; color: var(--mv2-ink2); line-height: 1.7; margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mv2-memory-summary {
    margin-top: 8px; padding: 8px 10px; border-radius: 9px; color: var(--mv2-ink);
    background: var(--mv2-card2); font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}
.mv2-memory-summary span { display: block; margin-bottom: 2px; color: var(--mv2-accent); font-size: 10px; font-weight: 600; }
.mv2-memory-fulltext { margin-top: 7px; color: #4a4038; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

.mv2-cluster-list { margin: 16px; display: flex; flex-direction: column; gap: 8px; }
.mv2-cluster-row {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
    background: var(--mv2-card); box-shadow: 0 2px 10px rgba(160,140,110,.06); cursor: pointer;
}
.mv2-cluster-row > span { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.mv2-cluster-row > small { color: var(--mv2-ink3); white-space: nowrap; }
.mv2-node .bubble { box-sizing: border-box; padding: 4px; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }

.mv2-portrait-item {
    position: relative; padding: 10px 0; border-top: 1px solid var(--mv2-line);
    color: var(--mv2-ink); font-size: 13px; line-height: 1.65;
}
.mv2-portrait-item.faded { opacity: .62; }
.mv2-portrait-value { display: inline; white-space: pre-wrap; overflow-wrap: anywhere; }
.mv2-portrait-tools { display: flex; gap: 4px; margin-top: 7px; }
.mv2-pin-mark { margin-left: 5px; color: var(--mv2-accent); font-size: 10px; }
.mv2-inline-add { margin-left: 2px; color: var(--mv2-accent); }
.mv2-evidence { margin-top: 8px; padding: 7px 9px; border-radius: 9px; background: var(--mv2-card2); color: var(--mv2-ink2); font-size: 11px; }
.mv2-evidence summary { cursor: pointer; color: var(--mv2-accent); }
.mv2-evidence div { padding-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }

.mv2-editor-overlay {
    position: fixed; inset: 0; z-index: 12000; display: flex; align-items: flex-end; justify-content: center;
    padding: 16px; box-sizing: border-box; background: rgba(40,32,25,.42); backdrop-filter: blur(2px);
}
.mv2-editor {
    width: min(100%, 440px); max-height: min(86vh, 720px); overflow-y: auto; box-sizing: border-box;
    border-radius: 20px; padding: 18px; background: #fffdf9; color: #4a4038;
    box-shadow: 0 20px 60px rgba(50,35,25,.25);
}
.mv2-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; font-size: 16px; }
.mv2-editor-head button { width: 32px; height: 32px; border-radius: 50%; color: #8c8175; background: #f3efe7; }
.mv2-form-field { display: block; margin: 12px 0; }
.mv2-form-field > span { display: block; margin-bottom: 6px; color: #8c8175; font-size: 12px; }
.mv2-form-field input,
.mv2-form-field textarea,
.mv2-form-field select {
    width: 100%; box-sizing: border-box; border: 1px solid #e6ddce; border-radius: 11px;
    padding: 10px 12px; outline: none; color: #4a4038; background: #fff; font: inherit; font-size: 14px;
}
.mv2-form-field textarea { min-height: 128px; resize: vertical; line-height: 1.65; }
.mv2-form-field input:focus,
.mv2-form-field textarea:focus,
.mv2-form-field select:focus { border-color: #c99a8a; box-shadow: 0 0 0 3px rgba(201,154,138,.12); }
.mv2-editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.mv2-editor-actions button { min-width: 82px; padding: 10px 16px; border-radius: 20px; color: #fff; background: #c99a8a; }
.mv2-editor-actions button.secondary { color: #8c8175; background: #f3efe7; }
.mv2-editor-delete { width: 100%; padding: 10px; border-radius: 10px; color: #b85f5f; background: rgba(184,95,95,.08); }
.mv2-editor-photo { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 12px; background: #f3efe7; }
.mv2-detail-fulltext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.85; color: #4a4038; }
.mv2-detail-fulltext.source { padding: 12px; border-radius: 10px; color: #665c53; background: #f6f1e8; }
.mv2-source-title { margin: 18px 0 7px; color: #c99a8a; font-size: 12px; font-weight: 600; }

/* 旧记忆弹窗仍是 V2 未就绪时的兜底入口；原样式固定三行却没有实际渲染“展开”按钮，
   会造成正文永久截断。兜底视图也必须能直接读完全文。 */
.mem-card-body {
    max-height: none !important;
    overflow: visible !important;
}
.mem-card-body:not(.expanded).is-clamped::after { display: none !important; }

.mv2-action-mask {
    position: fixed; inset: 0; z-index: 12000; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(0,0,0,.34);
}
.mv2-action-sheet { width: min(100%, 440px); max-height: 78vh; overflow-y: auto; padding: 10px 12px 18px; box-sizing: border-box; border-radius: 18px 18px 0 0; background: #fff; }
.mv2-action-sheet button { display: block; width: 100%; padding: 13px 16px; border-bottom: 1px solid #f2eee8; color: #4a4038; background: transparent; text-align: left; font-size: 14px; }
.mv2-action-sheet button.danger { color: #b85f5f; }
.mv2-action-sheet button:last-child { margin-top: 8px; border: 0; border-radius: 10px; text-align: center; color: #8c8175; background: #f3efe7; }

@media (max-width: 380px) {
    .mv2-frag-item { margin-left: 10px; margin-right: 10px; padding: 10px; gap: 8px; }
    .mv2-frag-item .mv2-entity-tools { max-width: 28px; }
    .mv2-saga-card .sh { flex-wrap: wrap; }
    .mv2-editor-overlay { padding: 8px; }
}

/* ==================== 内置使用教程 ==================== */
.mv2-guide-overlay {
    position: fixed; inset: 0; z-index: 5300;
    background: rgba(40, 34, 28, 0.55);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: mv2GuideFade 0.2s ease;
}
@keyframes mv2GuideFade { from { opacity: 0; } to { opacity: 1; } }
.mv2-guide-card {
    width: 100%; max-width: 380px; max-height: 82vh;
    display: flex; flex-direction: column;
    background: var(--mv2-card, #fbf8f2);
    color: var(--mv2-ink, #4a4038);
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    animation: mv2GuideUp 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes mv2GuideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mv2-guide-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--mv2-line, #e6ddce);
}
.mv2-guide-title { font-size: 16px; font-weight: 700; }
.mv2-guide-x {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mv2-ink2, #8c8175); cursor: pointer; font-size: 15px;
}
.mv2-guide-x:active { background: var(--mv2-card2, #f6f1e8); }
.mv2-guide-body { padding: 6px 18px 4px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mv2-guide-sec { padding: 12px 0; border-bottom: 1px dashed var(--mv2-line, #e6ddce); }
.mv2-guide-sec:last-child { border-bottom: none; }
.mv2-guide-sec-t { font-size: 14px; font-weight: 700; margin-bottom: 6px; color: var(--mv2-ink, #4a4038); }
.mv2-guide-sec-b { font-size: 13px; line-height: 1.7; color: var(--mv2-ink2, #8c8175); }
.mv2-guide-sec-b b { color: var(--mv2-accent, #c99a8a); font-weight: 700; }
.mv2-guide-foot { padding: 12px 18px 16px; border-top: 1px solid var(--mv2-line, #e6ddce); }
.mv2-guide-btn {
    width: 100%; padding: 12px; border: none; border-radius: 12px;
    background: var(--mv2-accent, #c99a8a); color: #fff;
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.mv2-guide-btn:active { opacity: 0.85; }
