/* ==========================================================================
   static/css/member-feed.css — BẢNG TIN (file mới, Bước 15)
   --------------------------------------------------------------------------
   Nạp sau member.css (dùng chung các biến màu --mb-*). Gồm:
     1. Trang đăng bài: 2 tab Bài viết | Video, khung soạn bài, ảnh đã chọn
     2. Thẻ bài viết (Bảng Tin, trang cá nhân, bài đã lưu, trang 1 bài)
     3. Trang Bảng Tin, tab trang cá nhân, nút xem thêm
     4. Khung xem album phủ màn hình (ảnh + video, vuốt / mũi tên / X)
     5. Khung bình luận phủ màn hình (khung ngoài) + trang bình luận riêng
   Màu: nền tối như cả web, điểm nhấn đỏ --mb-red (#9A2C2C).
   ========================================================================== */

.mbp-ico {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.mbp-ico.is-fill {
    fill: currentColor;
    stroke: none;
}

/* --------------------------------------------------------------------------
   1. TRANG ĐĂNG BÀI
   -------------------------------------------------------------------------- */
.mbp-up-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 14px;
}
.mbp-up-tab,
.mbp-up-tab:visited {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--mb-border);
    border-radius: 12px;
    background: var(--mb-panel);
    color: var(--mb-text) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, background .15s ease;
}
.mbp-up-tab svg {
    grid-row: 1 / 3;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .8;
}
.mbp-up-tab span {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}
.mbp-up-tab small {
    min-width: 0;
    overflow: hidden;
    color: var(--mb-muted);
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mbp-up-tab:hover {
    border-color: var(--mb-border-2);
    background: var(--mb-panel-2);
}
.mbp-up-tab.is-active {
    border-color: var(--mb-red);
    background: linear-gradient(135deg, rgba(154, 44, 44, .32), rgba(154, 44, 44, .12));
}
.mbp-up-tab.is-active svg {
    opacity: 1;
}
.mbp-up-tab.is-active small {
    color: #e3c3c3;
}

.mbp-compose-who {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}
.mbp-compose-who img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #2a2f35;
}
.mbp-compose-who strong {
    display: block;
    color: #fff;
    font-size: 15px;
}
.mbp-compose-who small {
    color: var(--mb-muted);
    font-size: 12px;
}
.mbp-compose-text {
    min-height: 110px;
    font-size: 16px;
    line-height: 1.55;
}
.mbp-compose-count {
    margin: 5px 2px 12px;
    color: var(--mb-muted);
    font-size: 12px;
    text-align: right;
}
.mbp-compose-count.is-over {
    color: #f87171;
    font-weight: 700;
}
.mbp-drop {
    margin-bottom: 4px;
}
.mbp-drop[hidden] {
    display: none !important;
}
.mbp-picked {
    margin: 0 0 12px;
}
.mbp-picked-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    color: var(--mb-muted);
    font-size: 13px;
}
.mbp-picked-head strong {
    color: #fff;
    font-size: 14px;
}
.mbp-picked-head button {
    margin-left: auto;
}
.mbp-picked-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mbp-pick {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--mb-border);
    border-radius: 10px;
    background: #0b0d0f;
}
.mbp-pick[draggable="true"] {
    cursor: grab;
}
.mbp-pick.is-dragging {
    opacity: .4;
}
.mbp-pick-media,
.mbp-pick-media img {
    display: block;
    width: 100%;
    height: 100%;
}
.mbp-pick-media img {
    object-fit: cover;
}
.mbp-pick-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d2227, #121518);
    color: #8a9096;
    font-size: 22px;
}
.mbp-pick-no {
    position: absolute;
    left: 5px;
    top: 5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 9px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.mbp-pick-badge {
    position: absolute;
    left: 5px;
    bottom: 5px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .66);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
}
.mbp-pick-badge[hidden] {
    display: none;
}
.mbp-pick-x {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .66);
    color: #fff;
    font-size: 18px;
    line-height: 26px;
    cursor: pointer;
}
.mbp-pick-x:hover {
    background: var(--mb-red);
}
.is-busy .mbp-pick-x {
    display: none;
}
.mbp-pick-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity .2s ease;
}
.mbp-pick-bar i {
    display: block;
    width: 0;
    height: 100%;
    background: var(--mb-red);
    transition: width .25s ease;
}
.mbp-pick.is-sending .mbp-pick-bar {
    opacity: 1;
}
.mbp-pick.is-done::after {
    content: '✓';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1f9d55;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.mbp-pick.is-bad {
    border-color: #e04848;
    box-shadow: 0 0 0 2px rgba(224, 72, 72, .45);
}

/* --------------------------------------------------------------------------
   2. THẺ BÀI VIẾT
   -------------------------------------------------------------------------- */
.mbp-list {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 6px;
    box-sizing: border-box;
}
.mbp-card {
    position: relative;
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid var(--mb-border);
    border-radius: 16px;
    background: var(--mb-panel);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
/* Dải đỏ mảnh ở mép trên — dấu nhận diện riêng của thẻ Bảng Tin. */
.mbp-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--mb-red) 0%, rgba(154, 44, 44, .55) 35%, rgba(154, 44, 44, 0) 75%);
    pointer-events: none;
}
.mbp-card.is-flash {
    animation: mbp-flash 1.6s ease;
}
@keyframes mbp-flash {
    0%, 30% { box-shadow: 0 0 0 2px rgba(154, 44, 44, .9), 0 6px 18px rgba(0, 0, 0, .22); }
    100% { box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
}
.mbp-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 8px 9px 14px;
}
.mbp-avatar {
    flex: 0 0 42px;
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}
.mbp-avatar img {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #2a2f35;
    box-shadow: 0 0 0 2px var(--mb-panel), 0 0 0 3.5px rgba(154, 44, 44, .75);
}
.mbp-who {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.mbp-name,
.mbp-name:visited {
    overflow: hidden;
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mbp-name:hover {
    text-decoration: underline !important;
}
.mbp-time,
.mbp-time:visited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--mb-muted) !important;
    font-size: 12.5px;
    line-height: 1.3;
    text-decoration: none !important;
    white-space: nowrap;
}
.mbp-time:hover time {
    text-decoration: underline;
}
.mbp-time-sep {
    opacity: .7;
}
.mbp-media-label {
    overflow: hidden;
    text-overflow: ellipsis;
}
.mbp-menu-wrap {
    position: relative;
    flex: 0 0 auto;
}
.mbp-menu-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #b9bec4;
    cursor: pointer;
}
.mbp-menu-btn:hover,
.mbp-menu-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}
.mbp-menu {
    position: absolute;
    right: 4px;
    top: 40px;
    z-index: 30;
    min-width: 220px;
    padding: 6px;
    border: 1px solid var(--mb-border-2);
    border-radius: 12px;
    background: #181c20;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
.mbp-menu button,
.mbp-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 11px;
    box-sizing: border-box;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mb-text) !important;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
}
.mbp-menu button:hover,
.mbp-menu a:hover {
    background: rgba(255, 255, 255, .06);
}
.mbp-text {
    margin: 0 0 11px;
    padding: 0 14px;
    color: var(--mb-text);
    font-size: 15px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.mbp-text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mbp-text-more {
    display: block;
    margin: -5px 14px 11px;
    padding: 0;
    border: 0;
    background: none;
    color: #e79a9a;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mbp-text-more:hover {
    text-decoration: underline;
}

/* Lưới ảnh / video: tối đa 6 ô. */
.mbp-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    background: var(--mb-panel);
}
.mbp-tile {
    position: relative;
    display: block;
    grid-column: span 2;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #0b0d0f;
    cursor: zoom-in;
}
.mbp-tile.is-video {
    cursor: pointer;
}
.mbp-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease, filter .2s ease;
}
.mbp-tile:hover img {
    transform: scale(1.035);
}
.mbp-tile:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}
/* 1 ô: hiện theo tỉ lệ thật (dọc tối đa 4:5, ngang tối thiểu 16:9). */
.mbp-grid.g-1 .mbp-tile {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    min-height: 180px;
    max-height: 78vh;
}
.mbp-grid.g-1 .mbp-tile img {
    height: auto;
    max-height: 78vh;
    min-height: 180px;
    object-fit: cover;
}
.mbp-grid.g-1 .mbp-tile.is-video img,
.mbp-grid.g-1 .mbp-tile .mbp-tile-ph {
    aspect-ratio: 16 / 9;
    height: auto;
}
.mbp-grid.g-2 .mbp-tile {
    grid-column: span 3;
    aspect-ratio: 4 / 5;
}
.mbp-grid.g-3 .mbp-tile {
    aspect-ratio: 3 / 4;
}
.mbp-grid.g-4 .mbp-tile {
    grid-column: span 3;
    aspect-ratio: 4 / 3;
}
.mbp-grid.g-5 .mbp-tile:nth-child(-n+2) {
    grid-column: span 3;
    aspect-ratio: 4 / 3;
}
/* "Xem thêm": hiện hết ngay tại chỗ, 3 ô một hàng. */
.mbp-grid.is-all .mbp-tile,
.mbp-grid.is-all .mbp-tile:nth-child(-n+2) {
    grid-column: span 2;
    aspect-ratio: 1 / 1;
}
.mbp-grid.is-all .mbp-tile.is-new {
    animation: mbp-fade .35s ease both;
}
@keyframes mbp-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.mbp-tile-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 25%, rgba(154, 44, 44, .35), transparent 55%),
        linear-gradient(140deg, #1f2429, #0f1214);
    color: rgba(255, 255, 255, .45);
}
.mbp-tile-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    background: rgba(12, 13, 15, .5);
    color: #fff;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transition: transform .2s ease, background .2s ease;
    pointer-events: none;
}
.mbp-tile-play .mbp-ico {
    margin-left: 3px;
}
.mbp-tile:hover .mbp-tile-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(154, 44, 44, .78);
}
.mbp-grid.g-1 .mbp-tile-play {
    width: 62px;
    height: 62px;
}
.mbp-tile-dur {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
.mbp-showall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    min-height: 40px;
    margin: 10px 12px 0;
    box-sizing: border-box;
    border: 1px dashed var(--mb-border-2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
    color: var(--mb-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.mbp-showall:hover {
    border-color: var(--mb-red);
    background: rgba(154, 44, 44, .1);
}
.mbp-showall-chev {
    transition: transform .2s ease;
}
.mbp-showall.is-open .mbp-showall-chev {
    transform: rotate(180deg);
}

/* Thanh tương tác: 1 dải bo tròn chia 6 ngăn (số trước, biểu tượng sau). */
.mbp-bar {
    display: flex;
    margin: 12px 12px 13px;
    overflow: hidden;
    border: 1px solid var(--mb-border);
    border-radius: 999px;
    background: var(--mb-input);
}
.mbp-act,
.mbp-act:visited {
    position: relative;
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 0 3px;
    border: 0;
    border-left: 1px solid var(--mb-border);
    border-radius: 0;
    background: transparent;
    color: #c9cdd1 !important;
    font: inherit;
    font-size: 13px;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.mbp-act:first-child {
    border-left: 0;
}
.mbp-act b {
    overflow: hidden;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mbp-act:hover {
    background: rgba(255, 255, 255, .045);
    color: #fff !important;
}
.mbp-act:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}
.mbp-act.is-stat {
    color: var(--mb-muted) !important;
    cursor: default;
}
.mbp-act.is-stat:hover {
    background: transparent;
}
.mbp-act.is-like.is-on {
    background: rgba(154, 44, 44, .2);
    color: #ff7676 !important;
}
.mbp-act.is-dislike.is-on {
    background: rgba(90, 120, 230, .14);
    color: #a9bcff !important;
}
.mbp-act.is-save.is-on {
    color: #f2c94c !important;
}
.mbp-act.is-save.is-on .mbp-ico path {
    fill: currentColor;
}
.mbp-act.is-pop .mbp-ico {
    animation: mbp-pop .38s ease;
}
@keyframes mbp-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.38) rotate(-8deg); }
    100% { transform: scale(1); }
}
.mbp-act[data-voted="1"]:not(.is-on) {
    opacity: .55;
}
@media (max-width: 380px) {
    .mbp-act,
    .mbp-act:visited {
        gap: 4px;
        font-size: 12px;
    }
    .mbp-act .mbp-ico {
        width: 17px;
        height: 17px;
    }
    .mbp-head {
        padding-left: 12px;
    }
    .mbp-text {
        padding-left: 12px;
        padding-right: 12px;
    }
    .mbp-text-more {
        margin-left: 12px;
    }
}

/* --------------------------------------------------------------------------
   3. TRANG BẢNG TIN, TAB TRANG CÁ NHÂN, XEM THÊM
   -------------------------------------------------------------------------- */
.mbp-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 26px;
    padding: 0 6px;
    box-sizing: border-box;
}
.mbp-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 4px 12px;
}
.mbp-page-head h2 {
    margin: 0;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.mbp-page-head p {
    margin: 3px 0 0;
    color: var(--mb-muted);
    font-size: 13px;
}
.mbp-prompt,
.mbp-prompt:visited {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 14px;
    padding: 11px 12px;
    border: 1px solid var(--mb-border);
    border-radius: 16px;
    background: var(--mb-panel);
    color: var(--mb-muted) !important;
    text-decoration: none !important;
    transition: border-color .15s ease;
}
.mbp-prompt:hover {
    border-color: var(--mb-red);
}
.mbp-prompt img {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #2a2f35;
}
.mbp-prompt-box {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    overflow: hidden;
    border: 1px solid var(--mb-border-2);
    border-radius: 999px;
    background: var(--mb-input);
    font-size: 14.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mbp-prompt-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(154, 44, 44, .18);
    color: #ff8a8a;
}
.mbp-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin: 4px 0 0;
    border: 1px solid var(--mb-border-2);
    border-radius: 12px;
    background: var(--mb-panel);
    color: var(--mb-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mbp-more:hover {
    border-color: var(--mb-red);
}
.mbp-more[hidden] {
    display: none;
}
.mbp-more.is-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mbp-spin .8s linear infinite;
}
@keyframes mbp-spin {
    to { transform: rotate(360deg); }
}
.mbp-empty {
    padding: 34px 14px;
    border: 1px dashed var(--mb-border-2);
    border-radius: 16px;
    color: var(--mb-muted);
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}
.mbp-empty strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 16px;
}
.mbp-single-back,
.mbp-single-back:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 4px 12px;
    color: var(--mb-muted) !important;
    font-size: 14px;
    text-decoration: none !important;
}
.mbp-single-back:hover {
    color: #fff !important;
}

/* Tab trang cá nhân: Video đã đăng | Bài viết */
.mbp-pf-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 6px 5px 12px;
    border-bottom: 2px solid #2b2b2b;
}
.mbp-pf-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    margin: 0 0 -2px;
    padding: 11px 4px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #8f959b;
    font: inherit;
    font-size: clamp(13px, 4vw, 17px);
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}
.mbp-pf-tab:hover {
    color: #fff;
}
.mbp-pf-tab.is-active {
    border-bottom-color: var(--mb-red);
    color: #fff;
}
.mbp-pf-tab .mbp-ico {
    opacity: .7;
}
.mbp-pf-tab.is-active .mbp-ico {
    opacity: 1;
}
.mbp-pf-count {
    min-width: 20px;
    padding: 1px 6px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #2a2f35;
    color: #cfd3d7;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}
.mbp-pf-tab.is-active .mbp-pf-count {
    background: var(--mb-red);
    color: #fff;
}
.mbp-pf-pane[hidden] {
    display: none !important;
}
.mbp-pf-note {
    margin: 0 4px 12px;
    padding: 10px 12px;
    border: 1px solid rgba(242, 201, 76, .35);
    border-radius: 10px;
    background: rgba(242, 201, 76, .08);
    color: #f3dc94;
    font-size: 13.5px;
}
.mbp-pf-note a {
    color: #fff !important;
    font-weight: 700;
}

/* Trang Clip đã lưu: 3 thẻ (Clip đã lưu | Bài viết đã lưu | Lịch sử xem). */
.hot-tabs.mb-lib-tabs.mbp-lib-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hot-tabs.mb-lib-tabs.mbp-lib-3 .hot-tab,
.hot-tabs.mb-lib-tabs.mbp-lib-3 .hot-tab:visited {
    gap: .3em;
    font-size: clamp(11px, 3.2vw, 17px);
    white-space: normal;
    text-align: center;
}

/* --------------------------------------------------------------------------
   4. KHUNG XEM ALBUM PHỦ MÀN HÌNH
   -------------------------------------------------------------------------- */
html.mbp-noscroll,
body.mbp-noscroll {
    overflow: hidden !important;
}
.mbp-viewer {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: block;
    background: rgba(6, 7, 8, .97);
    color: #fff;
    overscroll-behavior: contain;
    -webkit-user-select: none;
    user-select: none;
}
.mbp-viewer[hidden] {
    display: none;
}
.mbp-vw-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 8px 0 14px;
    padding-top: env(safe-area-inset-top);
    background: linear-gradient(180deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}
.mbp-vw-who {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mbp-vw-count {
    flex: 0 0 auto;
    padding: 4px 11px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.mbp-vw-close {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
}
.mbp-vw-close:hover,
.mbp-vw-close:focus-visible {
    background: var(--mb-red);
    outline: none;
}
.mbp-vw-stage {
    position: absolute;
    left: 0;
    right: 0;
    top: 56px;
    bottom: 78px;
    overflow: hidden;
    touch-action: none;
}
.mbp-viewer.is-single .mbp-vw-stage {
    bottom: 12px;
}
.mbp-vw-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-sizing: border-box;
}
.mbp-vw-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
    pointer-events: none;
}
.mbp-vw-poster {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.mbp-vw-poster img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(.82);
    pointer-events: none;
}
.mbp-vw-ph {
    display: grid;
    place-items: center;
    width: min(92vw, 640px);
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background:
        radial-gradient(circle at 30% 25%, rgba(154, 44, 44, .38), transparent 55%),
        linear-gradient(140deg, #1f2429, #0f1214);
    color: rgba(255, 255, 255, .4);
}
.mbp-vw-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(154, 44, 44, .82);
    box-shadow: 0 0 0 10px rgba(154, 44, 44, .18);
    animation: mbp-pulse 1.8s ease-in-out infinite;
}
.mbp-vw-play .mbp-ico {
    margin-left: 4px;
}
@keyframes mbp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(154, 44, 44, .35); }
    50% { box-shadow: 0 0 0 14px rgba(154, 44, 44, 0); }
}
.mbp-vw-play-text {
    position: absolute;
    left: 50%;
    top: calc(50% + 54px);
    transform: translateX(-50%);
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.mbp-vw-player {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}
.mbp-vw-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}
.mbp-vw-loading {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mbp-spin .8s linear infinite;
}
.mbp-vw-error {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(154, 44, 44, .3);
    font-size: 14px;
    text-align: center;
}
.mbp-vw-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-top: -6px;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    background: rgba(18, 20, 22, .55);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .15s ease, opacity .15s ease;
}
.mbp-vw-nav.is-prev {
    left: 10px;
}
.mbp-vw-nav.is-next {
    right: 10px;
}
.mbp-vw-nav:hover {
    background: var(--mb-red);
}
.mbp-vw-nav:disabled {
    opacity: 0;
    pointer-events: none;
}
.mbp-viewer.is-single .mbp-vw-nav {
    display: none;
}
@media (pointer: coarse) {
    .mbp-vw-nav {
        width: 40px;
        height: 40px;
        background: rgba(18, 20, 22, .35);
    }
    .mbp-vw-nav.is-prev {
        left: 4px;
    }
    .mbp-vw-nav.is-next {
        right: 4px;
    }
}
.mbp-vw-hint {
    position: absolute;
    left: 50%;
    bottom: 96px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    transform: translate(-50%, 10px);
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}
.mbp-vw-hint.is-show {
    transform: translate(-50%, 0);
    opacity: 1;
}
.mbp-vw-hint-arrows {
    display: inline-flex;
    gap: 2px;
    color: #ff9a9a;
    animation: mbp-nudge 1.2s ease-in-out infinite;
}
@keyframes mbp-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}
.mbp-vw-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    gap: 6px;
    height: 78px;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
    scrollbar-width: none;
}
.mbp-vw-strip::-webkit-scrollbar {
    display: none;
}
.mbp-vw-strip[hidden] {
    display: none;
}
.mbp-vw-thumb {
    position: relative;
    flex: 0 0 56px;
    height: 56px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #15181b;
    opacity: .55;
    cursor: pointer;
    transition: opacity .15s ease, border-color .15s ease;
}
.mbp-vw-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mbp-vw-thumb .mbp-vw-ph {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
}
.mbp-vw-thumb-play {
    position: absolute;
    right: 3px;
    bottom: 3px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .7);
    color: #fff;
}
.mbp-vw-thumb.is-active,
.mbp-vw-thumb:hover {
    opacity: 1;
}
.mbp-vw-thumb.is-active {
    border-color: var(--mb-red);
}

/* --------------------------------------------------------------------------
   5. KHUNG BÌNH LUẬN PHỦ MÀN HÌNH (trang ngoài) + TRANG BÌNH LUẬN RIÊNG
   -------------------------------------------------------------------------- */
.mbp-sheet {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483000;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .55);
}
.mbp-sheet[hidden] {
    display: none;
}
.mbp-sheet-frame {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    transform: translateY(30px);
    opacity: 0;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.mbp-sheet.is-in .mbp-sheet-frame {
    transform: none;
    opacity: 1;
}
.mbp-sheet-spin {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    transform: translate(-50%, -50%);
}
.mbp-sheet-spin span {
    display: block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mbp-spin .8s linear infinite;
}
.mbp-sheet-spin[hidden] {
    display: none;
}

/* Trang bình luận riêng (bên trong khung). */
html.mbp-sheet-html,
html.mbp-sheet-html body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: transparent !important;
}
.mbp-sheet-page {
    font-family: arial, sans-serif;
    font-size: 14px;
    color: var(--mb-text);
}
.mbp-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
}
.mbp-sheet-panel {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    transform: translateX(-50%);
    background: var(--mb-panel);
    box-shadow: 0 0 60px rgba(0, 0, 0, .55);
}
@media (min-width: 720px) {
    .mbp-sheet-panel {
        top: 24px;
        bottom: 24px;
        border: 1px solid var(--mb-border-2);
        border-radius: 18px;
        overflow: hidden;
    }
}
.mbp-sheet-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 4px 8px;
    padding-top: calc(4px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--mb-border);
    background: var(--mb-panel-2);
}
.mbp-sheet-x {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.mbp-sheet-x:hover,
.mbp-sheet-x:focus-visible {
    background: rgba(255, 255, 255, .08);
    outline: none;
}
.mbp-sheet-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: none;
}
.mbp-sheet-panel [hidden] {
    display: none !important;
}
.mbp-sheet-title .mbp-sheet-num {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--mb-red);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    vertical-align: 2px;
}
.mbp-sheet-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.mbp-sheet-post {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--mb-border);
}
.mbp-sheet-post img {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #2a2f35;
}
.mbp-sheet-post-who {
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
}
.mbp-sheet-post-who b {
    color: #fff;
}
.mbp-sheet-post-who p {
    display: -webkit-box;
    margin: 2px 0 0;
    overflow: hidden;
    color: var(--mb-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}
.mbp-sheet-page .mb-cmt-box {
    margin: 0;
    padding: 4px 12px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.mbp-sheet-compose {
    flex: 0 0 auto;
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--mb-border);
    background: var(--mb-panel-2);
}
.mbp-sheet-compose .mb-cmt-form {
    margin: 0;
}
.mbp-sheet-compose .mb-cmt-input {
    min-height: 44px;
    max-height: 30vh;
}
.mbp-sheet-compose .mb-emoji-panel {
    top: auto !important;
    bottom: calc(100% + 6px) !important;
}
.mbp-sheet-compose .mb-cmt-notice {
    margin: 0;
}
.mbp-sheet-gone {
    padding: 40px 18px;
    color: var(--mb-muted);
    font-size: 15px;
    text-align: center;
}
