/* ============================================================
   moments.css · 动态（朋友圈）
   夜间：底光 + 细线；日间：暖纸 + 白面
   ============================================================ */

#momentsPage.mo {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
}

/* ---------- 顶栏工具条 ---------- */
.mo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 6px;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.mo-sub {
    font-size: 10.5px;
    letter-spacing: .14em;
    color: var(--text-dim);
    opacity: .55;
}
.mo-acts { display: flex; align-items: center; gap: 2px; }
.mo-icon {
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
}
.mo-icon svg { width: 17px; height: 17px; }
.mo-icon:active { background: rgba(255, 255, 255, .05); }

.mo-rule {
    height: 1px;
    margin: 0 20px;
    flex: 0 0 auto;
    background: linear-gradient(90deg,
        rgba(246, 240, 244, .14) 0%,
        rgba(201, 166, 107, .38) 12%,
        rgba(246, 240, 244, .10) 34%,
        rgba(246, 240, 244, 0) 100%);
}

/* ---------- 流 ---------- */
.mo-feed {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 20px 24px;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 88%, transparent 100%);
}

.mo-item { position: relative; padding: 18px 0 17px; }
.mo-item + .mo-item::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(246, 240, 244, .12) 0%,
        rgba(246, 240, 244, .06) 46%,
        rgba(246, 240, 244, 0) 100%);
}
.mo-item.is-new::after {
    content: "";
    position: absolute;
    inset: -6px -14px 0 -14px;
    z-index: -1;
    background: radial-gradient(70% 90% at 8% 0%, rgba(212, 106, 147, .10), rgba(212, 106, 147, 0) 70%);
    pointer-events: none;
}
.mo-item.is-new .mo-hd-row::before {
    content: "";
    position: absolute;
    left: -20px; top: 19px;
    width: 2px; height: 22px;
    border-radius: 1px;
    background: linear-gradient(180deg, var(--primary), rgba(212, 106, 147, .15));
}

.mo-hd-row { display: flex; align-items: center; gap: 11px; position: relative; }
.mo-av {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(246, 240, 244, .66);
    background: linear-gradient(155deg, #3B2334 0%, #211626 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(246, 240, 244, .07);
}
.mo-item.is-new .mo-av {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07),
                0 0 0 1px rgba(212, 106, 147, .40),
                0 0 14px rgba(212, 106, 147, .18);
}
.mo-name { font-size: 13px; letter-spacing: .03em; color: var(--text); }
.mo-meta { font-size: 10.5px; color: var(--text-dim); opacity: .62; margin-top: 3px; letter-spacing: .05em; }

.mo-body {
    margin: 11px 0 0 49px;
    font-size: 14px;
    line-height: 1.74;
    letter-spacing: .012em;
    color: var(--text);
    opacity: .88;
    white-space: pre-wrap;
    word-break: break-word;
}
.mo-imgs { margin: 12px 0 0 49px; display: flex; gap: 7px; }
.mo-imgs i {
    width: 92px; height: 92px;
    border-radius: 11px;
    display: block;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .07);
}

.mo-ft {
    margin: 12px 0 0 49px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    letter-spacing: .06em;
    color: var(--text-dim);
    opacity: .58;
}
.mo-src { color: rgba(201, 166, 107, .72); opacity: .95; }
.mo-dot { width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .6; }

/* 空态 */
.mo-empty {
    flex: 1;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    color: var(--text-dim);
}
.mo-empty-t { font-size: 15px; color: var(--text); opacity: .72; letter-spacing: .04em; }
.mo-empty-d { font-size: 12px; line-height: 1.8; opacity: .62; }

/* ---------- 底部弹层 ---------- */
.mo-sheet-wrap {
    position: absolute;
    inset: 0;
    z-index: 950;
    display: none;
}
.mo-sheet-wrap.active { display: block; }
.mo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 4, 10, .58);
    backdrop-filter: blur(6px);
}
.mo-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 82%;
    display: flex;
    flex-direction: column;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(180deg, #171020 0%, #100A17 100%);
    box-shadow: 0 -18px 50px -20px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
    animation: moUp .22s ease-out;
}
@keyframes moUp { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }

.mo-sheet-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    font-size: 16px;
    letter-spacing: .04em;
    color: var(--text);
    flex: 0 0 auto;
}
.mo-x {
    width: 30px; height: 30px;
    border: 0; background: none;
    color: var(--text-dim);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.mo-sheet-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px 10px;
    -webkit-overflow-scrolling: touch;
}
.mo-sheet-ft {
    flex: 0 0 auto;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
}

/* 分区 */
.mo-sec { padding: 16px 0 4px; }
.mo-sec-t {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10.5px;
    letter-spacing: .2em;
    color: var(--text-dim);
    opacity: .6;
}
.mo-sec-t::before {
    content: "";
    width: 12px; height: 1px;
    background: rgba(201, 166, 107, .55);
}
.mo-sec-d {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-dim);
    opacity: .66;
}

/* 角色 chip */
.mo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mo-chip {
    height: 34px;
    padding: 0 15px 0 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 17px;
    border: 0;
    font-size: 12.5px;
    color: var(--text-dim);
    background: rgba(255, 255, 255, .022);
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .075);
    cursor: pointer;
}
.mo-chip .d {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .45;
}
.mo-chip.on {
    color: var(--text);
    background: linear-gradient(180deg, rgba(212, 106, 147, .16), rgba(212, 106, 147, .07));
    box-shadow: inset 0 0 0 1px rgba(212, 106, 147, .42), 0 0 16px rgba(212, 106, 147, .10);
}
.mo-chip.on .d { background: var(--primary); opacity: 1; }

/* 配对 */
.mo-pairs { margin-top: 10px; }
.mo-pair {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 0;
    font-size: 13px;
    color: var(--text);
    opacity: .86;
    border-bottom: 1px solid rgba(246, 240, 244, .055);
}
.mo-pair .arrow { color: rgba(201, 166, 107, .5); font-size: 11px; }
.mo-pair-x {
    margin-left: auto;
    border: 0;
    background: none;
    color: var(--text-dim);
    opacity: .6;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 0 4px 10px;
}
.mo-pair-add {
    margin-top: 12px;
    height: 38px;
    width: 100%;
    border: 0;
    border-radius: 19px;
    background: rgba(255, 255, 255, .022);
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .075);
    color: var(--text-dim);
    font-size: 12.5px;
    cursor: pointer;
}
.mo-pair-empty { font-size: 12px; color: var(--text-dim); opacity: .6; padding: 8px 0 2px; }
.mo-pair-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-dim);
}
.mo-pair-pick select {
    flex: 1;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(246, 240, 244, .12);
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    padding: 0 10px;
    font-size: 13px;
}

/* 发动态 */
.mo-panel {
    margin: 16px 0 0;
    border-radius: 18px;
    padding: 15px 15px 13px;
    background: linear-gradient(180deg, rgba(246, 240, 244, .035), rgba(246, 240, 244, .012));
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .07), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.mo-ta {
    width: 100%;
    min-height: 120px;
    border: 0;
    outline: none;
    resize: none;
    background: none;
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
    font-family: inherit;
}
.mo-ta::placeholder { color: rgba(246, 240, 244, .3); }
.mo-panel-ft {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(246, 240, 244, .055);
    font-size: 11.5px;
    color: var(--text-dim);
    opacity: .56;
}

.mo-opts { margin-top: 6px; }
.mo-opt {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 0;
    position: relative;
    cursor: pointer;
}
.mo-opt + .mo-opt::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(246, 240, 244, .09), rgba(246, 240, 244, 0));
}
.mo-opt input { display: none; }
.mo-opt .rd {
    width: 17px; height: 17px;
    flex: 0 0 17px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .26);
    position: relative;
}
.mo-opt.on .rd {
    box-shadow: inset 0 0 0 1px rgba(212, 106, 147, .85), 0 0 10px rgba(212, 106, 147, .22);
}
.mo-opt.on .rd::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(212, 106, 147, .7);
}
.mo-opt .txt { font-size: 14px; color: var(--text); opacity: .82; }
.mo-opt.on .txt { opacity: 1; }

.mo-sheet .mo-pick { margin-top: 4px; }

/* 按钮 */
.mo-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 24px;
    font-size: 14px;
    letter-spacing: .1em;
    color: #1B0C14;
    background: linear-gradient(180deg, #E07BA2 0%, #C4577F 100%);
    box-shadow: 0 10px 30px -12px rgba(212, 106, 147, .55), inset 0 1px 0 rgba(255, 255, 255, .22);
    cursor: pointer;
}
.mo-btn.ghost {
    background: rgba(255, 255, 255, .03);
    color: var(--text-dim);
    box-shadow: inset 0 0 0 1px rgba(246, 240, 244, .10);
}

/* ============================================================
   日间
   ============================================================ */
html[data-mode="day"] .mo-sub { color: var(--day-dim); opacity: .7; }
html[data-mode="day"] .mo-icon { color: var(--day-dim); }
html[data-mode="day"] .mo-rule {
    background: linear-gradient(90deg,
        rgba(36, 26, 34, .16) 0%,
        rgba(169, 128, 63, .40) 12%,
        rgba(36, 26, 34, .10) 34%,
        rgba(36, 26, 34, 0) 100%);
}
html[data-mode="day"] .mo-item + .mo-item::before {
    background: linear-gradient(90deg,
        rgba(36, 26, 34, .11) 0%,
        rgba(36, 26, 34, .05) 46%,
        rgba(36, 26, 34, 0) 100%);
}
html[data-mode="day"] .mo-item.is-new::after {
    background: radial-gradient(70% 90% at 8% 0%, rgba(178, 58, 102, .07), rgba(178, 58, 102, 0) 70%);
}
html[data-mode="day"] .mo-item.is-new .mo-hd-row::before {
    background: linear-gradient(180deg, var(--day-accent), rgba(178, 58, 102, .16));
}
html[data-mode="day"] .mo-av {
    color: rgba(36, 26, 34, .58);
    background: linear-gradient(155deg, #EFE3D8 0%, #E3D3C5 100%);
    box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .09), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-mode="day"] .mo-item.is-new .mo-av {
    box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .08),
                0 0 0 1px rgba(178, 58, 102, .40),
                0 0 0 4px rgba(178, 58, 102, .07);
}
html[data-mode="day"] .mo-name { color: var(--day-ink); }
html[data-mode="day"] .mo-meta { color: var(--day-dim); opacity: .8; }
html[data-mode="day"] .mo-body { color: var(--day-ink); opacity: .86; }
html[data-mode="day"] .mo-imgs i { box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .06); }
html[data-mode="day"] .mo-ft { color: var(--day-dim); opacity: .78; }
html[data-mode="day"] .mo-src { color: rgba(169, 128, 63, .9); }
html[data-mode="day"] .mo-empty-t { color: var(--day-ink); }
html[data-mode="day"] .mo-empty-d { color: var(--day-dim); }

html[data-mode="day"] .mo-backdrop { background: rgba(36, 26, 34, .30); }
html[data-mode="day"] .mo-sheet {
    background: #FFFFFF;
    box-shadow: 0 -18px 50px -26px rgba(36, 26, 34, .45), inset 0 1px 0 rgba(255, 255, 255, .9);
}
html[data-mode="day"] .mo-sheet-hd { color: var(--day-ink); }
html[data-mode="day"] .mo-x { color: var(--day-dim); }
html[data-mode="day"] .mo-sec-t { color: var(--day-dim); opacity: .85; }
html[data-mode="day"] .mo-sec-d { color: var(--day-dim); opacity: .8; }
html[data-mode="day"] .mo-chip {
    background: rgba(255, 255, 255, .6);
    box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .10);
    color: var(--day-dim);
}
html[data-mode="day"] .mo-chip.on {
    background: #fff;
    color: var(--day-ink);
    box-shadow: inset 0 0 0 1px rgba(178, 58, 102, .40), 0 2px 8px -3px rgba(178, 58, 102, .35);
}
html[data-mode="day"] .mo-pair { color: var(--day-ink); border-bottom-color: rgba(36, 26, 34, .07); }
html[data-mode="day"] .mo-pair-x { color: var(--day-dim); }
html[data-mode="day"] .mo-pair-add {
    background: rgba(255, 255, 255, .6);
    box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .10);
    color: var(--day-dim);
}
html[data-mode="day"] .mo-pair-pick select {
    border-color: rgba(36, 26, 34, .12);
    background: #fff;
    color: var(--day-ink);
}
html[data-mode="day"] .mo-panel {
    background: #fff;
    box-shadow: 0 1px 0 rgba(36, 26, 34, .04), 0 16px 34px -26px rgba(36, 26, 34, .55);
}
html[data-mode="day"] .mo-ta { color: var(--day-ink); }
html[data-mode="day"] .mo-ta::placeholder { color: rgba(36, 26, 34, .34); }
html[data-mode="day"] .mo-panel-ft { color: var(--day-dim); border-top-color: rgba(36, 26, 34, .07); }
html[data-mode="day"] .mo-opt + .mo-opt::before {
    background: linear-gradient(90deg, rgba(36, 26, 34, .10), rgba(36, 26, 34, 0));
}
html[data-mode="day"] .mo-opt .rd { box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .24); background: #fff; }
html[data-mode="day"] .mo-opt.on .rd { box-shadow: inset 0 0 0 1px rgba(178, 58, 102, .85); }
html[data-mode="day"] .mo-opt.on .rd::after { background: var(--day-accent); box-shadow: none; }
html[data-mode="day"] .mo-opt .txt { color: var(--day-ink); opacity: .78; }
html[data-mode="day"] .mo-opt.on .txt { opacity: 1; }
html[data-mode="day"] .mo-btn {
    color: #FFF7F9;
    background: linear-gradient(180deg, #C24A76 0%, #A8335B 100%);
    box-shadow: 0 10px 22px -12px rgba(168, 51, 91, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
html[data-mode="day"] .mo-btn.ghost {
    background: #fff;
    color: var(--day-dim);
    box-shadow: inset 0 0 0 1px rgba(36, 26, 34, .12);
}
