/* Diễn đàn riêng của trang Lập Lá Số; không thay đổi các thành phần cũ. */
.lctvf-hidden { display: none !important; }
.lctvf-tabs { display:flex;align-items:end;gap:5px;max-width:1100px;margin:0 auto -1px;padding:0 8px;position:relative;z-index:2; }
.lctvf-tab { border:1px solid #f0dbc3;border-bottom:0;background:#fff0e5;color:#a44222;border-radius:14px 14px 0 0;padding:13px 27px;font-size:15px;font-weight:800;cursor:pointer;min-height:51px;transition:background .15s; }
.lctvf-tab.is-active {background:#fff;border-color:#df9e9a;color:#9d102a;box-shadow:0 -2px 10px #6320110a;}
.lctvf-tab i {margin-right:9px}.lctvf-tab small {background:#a80d2b;color:white;font-size:9px;padding:2px 5px;border-radius:6px;margin-left:7px;vertical-align:top;}
.lctvf-section {max-width:1100px;margin:0 auto 24px;padding:15px;background:#fff9f1;border:1px solid #eddac5;border-radius:0 14px 14px 14px;box-shadow:0 12px 30px rgba(89,42,12,.055);color:#382a2a;font-family:inherit;}
.lctvf-columns {display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:17px;}
.lctvf-main,.lctvf-box {background:#fff;border:1px solid #f0e3d5;border-radius:13px;padding:15px;min-width:0;}
.lctvf-head {display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid #f3e5dc;padding-bottom:13px;margin-bottom:13px}
.lctvf-head h2 {font-size:21px;line-height:1.3;font-weight:800;color:#8c1126;margin:0}
.lctvf-head h2 i {margin-right:8px;color:#d39939}
.lctvf-subtitle {color:#897e79;font-size:12px;margin:3px 0 0;line-height:1.5}
.lctvf-button {display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#a30d2b;border:1px solid #a30d2b;border-radius:8px;color:#fff !important;padding:10px 13px;font-weight:800;font-size:12px;cursor:pointer;white-space:nowrap}
.lctvf-button:hover {background:#860820}.lctvf-button:disabled{opacity:.6;cursor:wait}
.lctvf-button-ghost{background:white;color:#9b102a !important;border-color:#ead2ce}.lctvf-button-ghost:hover {background:#fff1ed}
.lctvf-categories {display:flex;align-items:center;gap:7px;overflow-x:auto;padding:0 0 13px;margin-bottom:4px;scrollbar-width:thin}
.lctvf-category {white-space:nowrap;background:#fffaf6;color:#715a54;border:1px solid #efe0d6;padding:8px 11px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:700}
.lctvf-category.is-active{background:#a10d2a;color:#fff;border-color:#a10d2a}
.lctvf-listtitle {display:flex;justify-content:space-between;align-items:center;font-size:15px;color:#95112a;font-weight:800;border-bottom:1px solid #f0e9df;padding:8px 0 12px}
.lctvf-textlink {color:#a70f2e;font-size:12px;cursor:pointer;text-decoration:none;font-weight:700;border:0;background:transparent}
.lctvf-topic {border:1px solid #f2e5dc;border-radius:12px;padding:14px;margin-top:10px;display:flex;gap:13px;cursor:pointer;text-align:left;width:100%;background:#fff;color:inherit;align-items:flex-start;}
.lctvf-topic:hover{border-color:#d79a95;background:#fffaf6}
.lctvf-avatar {flex:none;display:grid;place-items:center;width:43px;height:43px;background:#fae3d9;border-radius:50%;font-size:18px;font-weight:900;color:#a0122d}
.lctvf-avatar.admin {background:linear-gradient(140deg,#861126,#c48d23);color:#fff;box-shadow:0 2px 9px #8e1a2a33}
.lctvf-topic-content{flex:1;min-width:0}
.lctvf-topic strong {display:block;color:#302a2b;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.lctvf-topic-desc{color:#7b7776;font-size:12px;line-height:1.5;margin:4px 0;overflow-wrap:anywhere;white-space:normal}
.lctvf-topic-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#888;font-size:11px;line-height:1.5}
.lctvf-tag{font-size:11px;display:inline-block;border-radius:25px;background:#fff0e6;color:#ab4f38;padding:2px 9px;font-weight:700}
.lctvf-admin-badge {display:inline-flex;align-items:center;gap:4px;background:none;color:#94642c;border:0;border-radius:0;padding:0;font-weight:800;font-size:11px;vertical-align:middle;margin-left:5px;box-shadow:none}
.lctvf-numbers{display:flex;gap:12px;color:#98929a;font-size:11px;white-space:nowrap;align-self:end}
.lctvf-sidebar{display:flex;flex-direction:column;gap:12px}
.lctvf-box h3{color:#8e1329;font-weight:800;font-size:16px;margin:0 0 9px;padding-bottom:10px;border-bottom:1px solid #f2e5dc}
.lctvf-box h3 i{color:#be8322;margin-right:6px}
.lctvf-ranking{border:0;border-bottom:1px solid #f2eee9;background:transparent;width:100%;display:flex;gap:10px;text-align:left;align-items:start;padding:10px 2px;cursor:pointer;color:#393039;font-size:12px;line-height:1.5}
.lctvf-ranking:last-child{border:0}.lctvf-rank{width:26px;height:26px;background:#edbe67;border-radius:50%;display:grid;place-items:center;flex:none;color:#fff;font-weight:900}.lctvf-ranking small{display:block;color:#988d8c;font-size:11px}
.lctvf-leader{display:flex;align-items:center;gap:9px;font-size:12px;border-bottom:1px solid #f5eee6;padding:9px 0}.lctvf-leader:last-child{border:0}.lctvf-leader strong{flex:1;min-width:0;overflow-wrap:anywhere}.lctvf-leader span:last-child{color:#a7875e}
.lctvf-status{font-size:12px;color:#8b5f51;padding:18px;text-align:center}
.lctvf-pagination{display:flex;justify-content:center;align-items:center;gap:14px;padding:17px 0 4px}
.lctvf-pane{min-width:0}.lctvf-details-title{color:#8c0f27;font-size:20px;font-weight:800;line-height:1.4;overflow-wrap:anywhere}
.lctvf-post-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:14px;margin:16px 0;color:#423c3a}
.lctvf-chart{max-width:100%;width:auto;max-height:650px;object-fit:contain;border-radius:10px;border:1px solid #eee4d9;display:block;margin:10px auto}
.lctvf-reply{padding:14px 0;border-bottom:1px solid #eee4d9}.lctvf-reply-head{display:flex;gap:10px;align-items:center;font-size:13px;font-weight:800}.lctvf-reply small{color:#968686;font-weight:400;margin-left:8px}.lctvf-reply p{margin:10px 0 0 50px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8}
.lctvf-form{margin:0;display:grid;gap:10px}.lctvf-form label{font-size:12px;color:#734940;font-weight:800}.lctvf-form input:not([type=file]),.lctvf-form textarea,.lctvf-form select{display:block;width:100%;margin-top:6px;background:#fff;border:1px solid #ddccc6;border-radius:9px;padding:11px 12px;color:#3b3333;font:inherit;font-size:14px;outline:none;min-width:0}.lctvf-form input:focus,.lctvf-form textarea:focus,.lctvf-form select:focus{border-color:#a30d2b;box-shadow:0 0 0 2px #a30d2b11}
.lctvf-form textarea{min-height:115px;resize:vertical}.lctvf-form input[type=file]{display:block;width:100%;margin-top:5px;font-size:12px}
.lctvf-form .lctvf-note{font-size:12px;color:#857573;font-weight:400;line-height:1.5}
.lctvf-form-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.lctvf-captcha{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.lctvf-captcha img{width:185px;height:50px;max-width:100%;border:1px solid #e6c9b8;border-radius:8px}.lctvf-captcha .lctvf-button{padding:8px 10px}.lctvf-captcha-input{max-width:190px}
.lctvf-alert{padding:10px 12px;border-radius:8px;background:#fff0e7;color:#9c2028;font-size:12px;line-height:1.55}
.lctvf-back{margin:0 0 15px}.lctvf-empty{padding:25px;text-align:center;color:#877776;font-size:13px}
.lctvf-editor-title{font-weight:900;font-size:18px;color:#8d152b;margin-bottom:7px}
@media(max-width:880px){.lctvf-columns{grid-template-columns:minmax(0,1fr)}.lctvf-sidebar{display:grid;grid-template-columns:1fr 1fr}.lctvf-section{margin-left:8px;margin-right:8px}}
@media(max-width:580px){.lctvf-tabs{padding:0 8px}.lctvf-tab{font-size:12px;padding:10px 13px;min-height:43px}.lctvf-tab i{margin-right:4px}.lctvf-section{padding:9px;margin-left:5px;margin-right:5px}.lctvf-columns{gap:9px}.lctvf-main,.lctvf-box{padding:10px}.lctvf-head{align-items:flex-start}.lctvf-head h2{font-size:16px}.lctvf-subtitle{font-size:11px}.lctvf-button{padding:9px 10px;font-size:11px}.lctvf-sidebar{grid-template-columns:1fr}.lctvf-topic{gap:9px;padding:9px}.lctvf-avatar{width:35px;height:35px;font-size:14px}.lctvf-topic strong{font-size:13px}.lctvf-numbers{gap:6px}}

/* Chỉ đổi phần hiển thị 2 tab, không đụng engine an sao.
   Lá số nằm ngoài khung nhìn nhưng không display:none để html2canvas vẫn chụp được
   nếu người dùng mở Diễn đàn khi đang trong quá trình lập lá số. */
body .lctv-laso-home-shell.lctvf-forum-mode > .lctv-laso-hero-stage,
body .lctv-laso-home-shell:not(.lctvf-forum-mode) > .lctvf-section {
    display: none !important;
}
body .lctv-laso-home-shell.lctvf-forum-mode > .lctvf-section {
    display: block !important;
}
body .lctv-laso-home-shell.lctvf-forum-mode > .lctv-laso-result-shell.lctvf-chart-parked {
    display: block !important;
    position: absolute !important;
    left: -99999px !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    pointer-events: none !important;
}

/* Khung diễn đàn rộng, cân đối và thông thoáng giống demo anh chọn. */
body .lctv-laso-home-shell > .lctvf-tabs {
    width: min(1240px, calc(100% - 32px));
    max-width: 1240px;
    padding: 0;
    margin: 18px auto -1px;
    box-sizing: border-box;
}
body .lctv-laso-home-shell > .lctvf-section {
    width: min(1240px, calc(100% - 32px));
    max-width: 1240px;
    margin: 0 auto 28px;
    padding: 18px;
    box-sizing: border-box;
    border-radius: 0 16px 16px 16px;
}
body .lctvf-section .lctvf-columns {
    grid-template-columns: minmax(0, 72fr) minmax(270px, 28fr);
    gap: 18px;
    align-items: start;
}
body .lctvf-section .lctvf-main,
body .lctvf-section .lctvf-box {
    padding: 24px;
    border-radius: 14px;
}
body .lctvf-section .lctvf-head {
    gap: 18px;
    margin-bottom: 19px;
    padding-bottom: 19px;
}
body .lctvf-section .lctvf-head h2 {
    font-size: 25px;
    line-height: 1.4;
}
body .lctvf-section .lctvf-subtitle {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 5px;
}
body .lctvf-section .lctvf-button {
    font-size: 14px;
    padding: 12px 17px;
    border-radius: 10px;
}
body .lctvf-section .lctvf-categories {
    flex-wrap: wrap;
    overflow-x: visible;
    column-gap: 8px;
    row-gap: 9px;
    padding-bottom: 17px;
    margin-bottom: 5px;
}
body .lctvf-section .lctvf-category {
    font-size: 13px;
    padding: 10px 13px;
    line-height: 1.3;
}
body .lctvf-section .lctvf-listtitle {
    font-size: 18px;
    padding: 13px 0 15px;
    line-height: 1.4;
}
body .lctvf-section .lctvf-page-label {
    font-size: 13px;
    color: #968582;
    font-weight: 500;
}
body .lctvf-section .lctvf-topic {
    min-height: 116px;
    padding: 19px 17px;
    gap: 16px;
    margin-top: 14px;
    align-items: center;
    border-radius: 12px;
}
body .lctvf-section .lctvf-avatar {
    width: 50px;
    height: 50px;
    font-size: 20px;
}
body .lctvf-section .lctvf-topic strong {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 3px;
}
body .lctvf-section .lctvf-topic-desc {
    font-size: 14px;
    line-height: 1.65;
    margin: 4px 0 9px;
}
body .lctvf-section .lctvf-topic-meta {
    font-size: 13px;
    gap: 9px;
    line-height: 1.5;
}
body .lctvf-section .lctvf-tag {
    font-size: 12px;
    padding: 3px 10px;
}
body .lctvf-section .lctvf-admin-badge {
    font-size: 11px;
    padding: 0;
}
body .lctvf-section .lctvf-numbers {
    font-size: 13px;
    gap: 12px;
}
body .lctvf-section .lctvf-sidebar {
    gap: 15px;
}
body .lctvf-section .lctvf-box h3 {
    font-size: 18px;
    margin-bottom: 13px;
    padding-bottom: 14px;
}
body .lctvf-section .lctvf-ranking {
    font-size: 14px;
    gap: 12px;
    padding: 12px 1px;
    line-height: 1.6;
}
body .lctvf-section .lctvf-ranking small {
    font-size: 12px;
    margin-top: 4px;
}
body .lctvf-section .lctvf-rank {
    width: 30px;
    height: 30px;
    font-size: 14px;
}
body .lctvf-section .lctvf-leader {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding: 12px 0;
    font-size: 13px;
}
body .lctvf-section .lctvf-leader > .lctvf-avatar {
    width: 36px;
    height: 36px;
    font-size: 15px;
}
body .lctvf-section .lctvf-leader-name {
    display: flex;
    flex-direction: column;
    flex: 1 1 92px;
    gap: 4px;
    min-width: 0;
}
body .lctvf-section .lctvf-leader-name strong {
    font-size: 14px;
    color: #50342f;
}
body .lctvf-section .lctvf-leader-name .lctvf-admin-badge {
    align-self: flex-start;
    margin-left: 0;
    font-size: 10px;
}
body .lctvf-section .lctvf-leader-score {
    font-size: 12px;
    margin-left: auto;
    white-space: nowrap;
    color: #9b837a;
}
body .lctvf-section .lctvf-empty {
    font-size: 14px;
    padding: 30px 12px;
    line-height: 1.6;
}
body .lctvf-section .lctvf-details-title { font-size: 23px; }
body .lctvf-section .lctvf-post-body { font-size: 15px; }
body .lctvf-section .lctvf-reply-head { font-size: 14px; }
body .lctvf-section .lctvf-reply p { font-size: 14px; }
body .lctvf-section .lctvf-form label { font-size: 14px; }
body .lctvf-section .lctvf-note { font-size: 13px; line-height: 1.6; }
body .lctvf-section .lctvf-editor-title { font-size: 21px; }

@media (max-width: 1000px) {
    body .lctvf-section .lctvf-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    body .lctvf-section .lctvf-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 580px) {
    body .lctv-laso-home-shell > .lctvf-tabs,
    body .lctv-laso-home-shell > .lctvf-section { width: calc(100% - 16px); }
    body .lctv-laso-home-shell > .lctvf-tabs { margin-top: 8px; }
    body .lctv-laso-home-shell > .lctvf-section { padding: 9px; margin-bottom: 14px; }
    body .lctvf-section .lctvf-main,
    body .lctvf-section .lctvf-box { padding: 14px; }
    body .lctvf-section .lctvf-sidebar { grid-template-columns: minmax(0, 1fr); }
    body .lctvf-section .lctvf-head { flex-wrap: wrap; gap: 12px; }
    body .lctvf-section .lctvf-head h2 { font-size: 21px; }
    body .lctvf-section .lctvf-subtitle { font-size: 13px; }
    body .lctvf-section .lctvf-button { font-size: 13px; padding: 10px 12px; }
    body .lctvf-section .lctvf-category { font-size: 12px; padding: 8px 11px; }
    body .lctvf-section .lctvf-listtitle { font-size: 16px; }
    body .lctvf-section .lctvf-topic {
        min-height: 95px;
        padding: 14px 12px;
        gap: 10px;
        flex-wrap: wrap;
    }
    body .lctvf-section .lctvf-avatar { width: 39px; height: 39px; font-size: 16px; }
    body .lctvf-section .lctvf-topic-content { flex-basis: calc(100% - 52px); }
    body .lctvf-section .lctvf-topic strong { font-size: 15px; }
    body .lctvf-section .lctvf-topic-desc { font-size: 13px; }
    body .lctvf-section .lctvf-topic-meta { font-size: 12px; }
    body .lctvf-section .lctvf-numbers { margin-left: auto; font-size: 12px; }
    body .lctvf-section .lctvf-box h3 { font-size: 17px; }
}

/* === MẪU 1: riêng giao diện danh sách Diễn đàn Tử Vi ===
   Giữ nguyên cách chuyển tab, form đăng bài, phần luận giải và an sao. */
body .lctv-laso-home-shell > .lctvf-tabs {
    margin-top: 14px;
}
body .lctv-laso-home-shell > .lctvf-section {
    padding: 15px;
    background: #fff9f1;
    border-color: #eddcc9;
}
body .lctvf-section .lctvf-columns {
    grid-template-columns: minmax(0, 70fr) minmax(295px, 30fr);
    gap: 15px;
}
body .lctvf-section .lctvf-main.lctvf-list-view {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}
body .lctvf-section .lctvf-board-top,
body .lctvf-section .lctvf-board-feed {
    background: #fff;
    border: 1px solid #efe0d3;
    border-radius: 13px;
}
body .lctvf-section .lctvf-board-top {
    padding: 18px 19px 15px;
}
body .lctvf-section .lctvf-board-feed {
    margin-top: 9px;
    padding: 14px 18px 12px;
}
body .lctvf-section .lctvf-board-top .lctvf-head {
    border-bottom: 0;
    margin: 0;
    padding: 0;
    gap: 16px;
}
body .lctvf-section .lctvf-board-top .lctvf-head h2 {
    font-size: 26px;
    letter-spacing: -.35px;
}
body .lctvf-section .lctvf-board-top .lctvf-head h2 i {
    color: #d59c25;
    margin-right: 12px;
}
body .lctvf-section .lctvf-board-top .lctvf-subtitle {
    padding-left: 43px;
    margin-top: 3px;
    font-size: 13px;
}
body .lctvf-section .lctvf-board-top .lctvf-categories {
    margin: 18px 0 0;
    padding: 0;
    column-gap: 7px;
    row-gap: 8px;
}
body .lctvf-section .lctvf-board-top .lctvf-category {
    font-size: 13px;
    padding: 9px 12px;
    border-radius: 8px;
}
body .lctvf-section .lctvf-board-feed .lctvf-listtitle {
    padding: 0 0 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid #f0e4dd;
}
body .lctvf-section .lctvf-feed-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
body .lctvf-section .lctvf-feed-tools .lctvf-textlink {
    font-size: 14px;
    padding: 4px 0;
}
body .lctvf-section .lctvf-feed-tools .lctvf-textlink i {
    margin-left: 4px;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic {
    width: 100%;
    min-height: 102px;
    border: 0;
    border-bottom: 1px solid #f3e9df;
    border-radius: 0;
    margin: 0;
    padding: 15px 8px;
    background: #fff;
    gap: 13px;
    align-items: center;
    transition: background .15s, border-color .15s;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic:hover,
body .lctvf-section .lctvf-board-feed .lctvf-topic:focus-visible {
    background: #fff9f4;
    outline-offset: -2px;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic:last-of-type {
    border-bottom-color: transparent;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic--featured {
    min-height: 115px;
    margin: 9px 0 5px;
    padding: 17px 14px;
    border: 1px solid #f1e1db;
    border-radius: 11px;
    background: linear-gradient(108deg, #fff5f3 0%, #fffaf9 100%);
}
body .lctvf-section .lctvf-board-feed .lctvf-topic--featured:hover {
    background: #fff0ee;
    border-color: #e5c9c2;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 12px;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic-heading strong {
    display: inline;
    font-size: 16px;
    line-height: 1.42;
    margin: 0;
    color: #243044;
}
body .lctvf-section .lctvf-board-feed .lctvf-featured-label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 3px 8px;
    color: #b42442;
    background: #ffedf1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic-desc {
    margin: 5px 0 7px;
    font-size: 14px;
    line-height: 1.55;
    color: #827b7b;
}
body .lctvf-section .lctvf-board-feed .lctvf-topic-meta {
    font-size: 12px;
    gap: 7px;
}
body .lctvf-section .lctvf-board-feed .lctvf-avatar {
    width: 53px;
    height: 53px;
    font-size: 23px;
}
body .lctvf-section .lctvf-board-feed .lctvf-tag {
    background: #ffece0;
    font-size: 12px;
    padding: 3px 10px;
}
body .lctvf-section .lctvf-board-feed .lctvf-numbers {
    gap: 17px;
    font-size: 13px;
    align-self: flex-end;
    padding-bottom: 5px;
}
body .lctvf-section .lctvf-topic-chevron {
    display: grid;
    place-items: center;
    align-self: center;
    flex: none;
    font-size: 12px;
    color: #b20c2b;
    margin-left: 2px;
}
body .lctvf-section .lctvf-board-feed .lctvf-pagination:empty {
    display: none;
}
body .lctvf-section .lctvf-sidebar .lctvf-box {
    padding: 19px;
    border: 1px solid #efdfd2;
    border-radius: 13px;
}
body .lctvf-section .lctvf-sidebar .lctvf-box h3 {
    font-size: 19px;
    padding-bottom: 14px;
    margin-bottom: 6px;
}
body .lctvf-section .lctvf-ranking {
    gap: 11px;
    padding: 12px 0;
    align-items: center;
    font-size: 13px;
}
body .lctvf-section .lctvf-ranking-content {
    flex: 1;
    min-width: 0;
}
body .lctvf-section .lctvf-ranking-content strong {
    display: block;
    font-weight: 650;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
body .lctvf-section .lctvf-ranking .lctvf-ranking-chevron {
    flex: none;
    font-size: 11px;
    color: #be203f;
}
body .lctvf-section .lctvf-ranking:hover .lctvf-ranking-content strong {
    color: #a70c2d;
}
body .lctvf-section .lctvf-rank {
    background: #e6b65b;
    width: 29px;
    height: 29px;
    font-size: 13px;
}
body .lctvf-section .lctvf-ranking:nth-of-type(2) .lctvf-rank,
body .lctvf-section .lctvf-leader:nth-of-type(2) .lctvf-rank { background: #b4b5bc; }
body .lctvf-section .lctvf-ranking:nth-of-type(3) .lctvf-rank,
body .lctvf-section .lctvf-leader:nth-of-type(3) .lctvf-rank { background: #df9265; }
body .lctvf-section .lctvf-ranking:nth-of-type(4) .lctvf-rank,
body .lctvf-section .lctvf-leader:nth-of-type(4) .lctvf-rank { background: #7592d6; }
body .lctvf-section .lctvf-ranking:nth-of-type(5) .lctvf-rank,
body .lctvf-section .lctvf-leader:nth-of-type(5) .lctvf-rank { background: #a08cda; }
body .lctvf-section .lctvf-leader {
    gap: 10px;
    padding: 11px 0;
    flex-wrap: nowrap;
}
body .lctvf-section .lctvf-leader > .lctvf-avatar {
    width: 43px;
    height: 43px;
    font-size: 19px;
}
body .lctvf-section .lctvf-leader-name strong {font-size: 14px;}
body .lctvf-section .lctvf-leader-score {font-size: 11px;white-space: normal;text-align:right;}
body .lctvf-section .lctvf-admin-badge {white-space:nowrap;}
@media (max-width: 1000px) {
    body .lctvf-section .lctvf-columns {grid-template-columns: minmax(0, 1fr);}
    body .lctvf-section .lctvf-sidebar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 650px) {
    body .lctvf-section .lctvf-sidebar {grid-template-columns:minmax(0,1fr);}
    body .lctvf-section .lctvf-board-top {padding: 15px 12px;}
    body .lctvf-section .lctvf-board-feed {padding: 14px 11px;}
    body .lctvf-section .lctvf-board-top .lctvf-head {flex-wrap:wrap;gap:12px;}
    body .lctvf-section .lctvf-board-top .lctvf-head h2 {font-size:22px;}
    body .lctvf-section .lctvf-board-top .lctvf-subtitle {padding-left:0;font-size:12px;}
    body .lctvf-section .lctvf-board-top .lctvf-category {font-size:12px;padding:8px 10px;}
    body .lctvf-section .lctvf-board-feed .lctvf-topic {gap:10px;min-height:0;padding:13px 3px;flex-wrap:wrap;}
    body .lctvf-section .lctvf-board-feed .lctvf-topic--featured {padding:13px 10px;}
    body .lctvf-section .lctvf-board-feed .lctvf-avatar {width:41px;height:41px;font-size:18px;}
    body .lctvf-section .lctvf-board-feed .lctvf-topic-content {flex:1 1 calc(100% - 66px);}
    body .lctvf-section .lctvf-board-feed .lctvf-topic-heading strong {font-size:15px;}
    body .lctvf-section .lctvf-board-feed .lctvf-topic-desc {font-size:13px;}
    body .lctvf-section .lctvf-board-feed .lctvf-topic-meta {font-size:12px;}
    body .lctvf-section .lctvf-board-feed .lctvf-numbers {margin-left:auto;padding-bottom:0;}
    body .lctvf-section .lctvf-topic-chevron {margin-left:0;}
    body .lctvf-section .lctvf-sidebar .lctvf-box {padding:15px;}
    body .lctvf-section .lctvf-leader-score {font-size:12px;}
}
/* Danh sách trên màn hình hẹp: avatar, nội dung và chỉ số nằm đúng cột. */
@media (max-width: 650px) {
    body .lctvf-section .lctvf-board-feed .lctvf-topic {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
        column-gap: 10px;
        row-gap: 8px;
    }
    body .lctvf-section .lctvf-board-feed .lctvf-topic > .lctvf-avatar {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }
    body .lctvf-section .lctvf-board-feed .lctvf-topic > .lctvf-topic-content {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        flex: none;
    }
    body .lctvf-section .lctvf-board-feed .lctvf-topic > .lctvf-numbers {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        align-self: center;
        margin-left: 0;
    }
    body .lctvf-section .lctvf-board-feed .lctvf-topic > .lctvf-topic-chevron {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
    }
}

/* === Chọn lá số đã an sao, không cần tải về rồi upload lại === */
body .lctvf-section .lctvf-chart-picker {
    min-width: 0;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid #ead8ca;
    border-radius: 11px;
    background: #fffaf6;
}
body .lctvf-section .lctvf-chart-picker legend {
    padding: 0 6px;
    color: #734940;
    font-size: 14px;
    font-weight: 800;
}
body .lctvf-section .lctvf-chart-options {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 2px 0 11px;
}
body .lctvf-section .lctvf-chart-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #e8d7c7;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    color: #8a2634;
}
body .lctvf-section .lctvf-chart-choice:has(input:checked) {
    background: #fff0ed;
    border-color: #b72740;
}
body .lctvf-section .lctvf-chart-choice input {
    accent-color: #a30d2b;
    margin: 0;
}
body .lctvf-section .lctvf-chart-choice i { color: #b57e30; margin-right: 4px; }
body .lctvf-section .lctvf-chart-upload[hidden],
body .lctvf-section .lctvf-chart-preview[hidden] { display: none !important; }
body .lctvf-section .lctvf-chart-preview {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
    margin: 3px 0 10px;
}
body .lctvf-section .lctvf-chart-preview img {
    max-width: min(100%, 340px);
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e6d4c3;
    border-radius: 8px;
}
body .lctvf-section .lctvf-chart-preview span { font-size: 12px; color: #856d61; }
body .lctvf-section .lctvf-chart-hint { margin: 8px 0 0; }
/* Admin trong danh sách thành viên: chữ và vương miện thanh thoát, không nền banner/viền. */
body .lctvf-section .lctvf-leader-name .lctvf-admin-badge {
    align-self: flex-start;
    display: inline-flex;
    gap: 5px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    color: #93652c;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.4;
}
body .lctvf-section .lctvf-leader-name .lctvf-admin-badge i {
    color: #bc8a38;
    font-size: 11px;
}
body .lctvf-section .lctvf-leader-name strong { color: #831b32; }
@media (max-width: 650px) {
    body .lctvf-section .lctvf-chart-picker { padding: 11px 10px; }
    body .lctvf-section .lctvf-chart-options { flex-direction: column; }
    body .lctvf-section .lctvf-chart-choice { width: 100%; }
}
/* Radio của phần chọn ảnh không dùng kiểu input văn bản trong form diễn đàn. */
body .lctvf-section .lctvf-form .lctvf-chart-choice input[type="radio"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    flex: none;
}

/* Nút xóa chỉ xuất hiện khi Admin xem chi tiết bài viết. */
body .lctvf-section .lctvf-detail-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
body .lctvf-section .lctvf-detail-heading .lctvf-details-title { min-width: 0; }
body .lctvf-section .lctvf-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: none;
    color: #a30d2b;
    background: #fff;
    border: 1px solid #e7c6c7;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
body .lctvf-section .lctvf-delete:hover { background: #fff1f1; border-color: #be6673; }
body .lctvf-section .lctvf-delete:disabled { opacity: .55; cursor: wait; }
body .lctvf-section .lctvf-reply-head .lctvf-delete-reply { margin-left: auto; padding: 5px 8px; }
@media (max-width: 580px) {
    body .lctvf-section .lctvf-detail-heading { flex-wrap: wrap; }
    body .lctvf-section .lctvf-delete { font-size: 11px; }
}
/* Avatar thành viên: dùng ảnh hồ sơ đã lưu, vẫn hiện chữ khi ảnh hỏng. */
body .lctvf-section .lctvf-avatar { position: relative; overflow: hidden; }
body .lctvf-section .lctvf-avatar-image {
    position: absolute;
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
/* Ghim chủ đề: nút riêng chỉ xuất hiện trong chi tiết với Admin. */
body .lctvf-section .lctvf-admin-actions {
    display: inline-flex;
    flex: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
body .lctvf-section .lctvf-pin-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #e8d0ac;
    background: #fffaf1;
    color: #90601e;
    border-radius: 7px;
    padding: 7px 10px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
body .lctvf-section .lctvf-pin-action:hover { background: #fff2d8; border-color: #dcb36e; }
body .lctvf-section .lctvf-pin-action:disabled { opacity: .55; cursor: wait; }
body .lctvf-section .lctvf-pinned-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #99631a;
    white-space: nowrap;
    vertical-align: middle;
}
body .lctvf-section .lctvf-pin-icon { color: #be852c; font-size: 11px; }
@media (max-width: 580px) {
    body .lctvf-section .lctvf-admin-actions { width: 100%; }
    body .lctvf-section .lctvf-pin-action { font-size: 11px; }
}
/* Bổ sung công cụ diễn đàn: giữ màu và bố cục mẫu 1. */
.lctvf-extra-tools{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin-top:12px}
.lctvf-extra-tools #lctvf-search{display:flex;gap:7px;flex:1 1 260px;min-width:0}
.lctvf-extra-tools input,.lctvf-extra-tools select{min-width:0;border:1px solid #efddcd;border-radius:9px;padding:10px 12px;background:#fff;color:#6d3932;font:inherit}
.lctvf-extra-tools input{flex:1;min-width:90px}.lctvf-extra-tools select{max-width:180px}
.lctvf-detail-tools,.lctvf-reply-tools{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.lctvf-reply-tools button{border:1px solid #eddccd;border-radius:8px;background:#fffaf6;color:#9c2536;padding:6px 10px;cursor:pointer}
.lctvf-resolved{color:#188451;font-weight:700}.lctvf-locked{color:#8b655d;font-weight:600}
.lctvf-reply{border-bottom:1px solid #f1e4dc;padding:16px 4px}.lctvf-reply>p{white-space:pre-wrap;overflow-wrap:anywhere}
.lctvf-notify{display:block;width:100%;text-align:left;background:#fff;border:1px solid #efdfd5;padding:13px;margin:7px 0;border-radius:10px;color:#5d3934;cursor:pointer}.lctvf-notify small{display:block;color:#a0887c;margin-top:5px}
.lctvf-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin:16px 0}.lctvf-stats>div{border:1px solid #efddcd;border-radius:12px;padding:15px;background:#fffaf6}.lctvf-stats strong{display:block;font-size:23px;color:#a50831}.lctvf-stats span{font-size:12px}
.lctvf-report{padding:12px;border:1px solid #eddccd;border-radius:9px;margin:9px 0}
.lctvf-chart-zoom-btn{display:flex;align-items:center;flex-direction:column;gap:8px;border:1px solid #efdccd;border-radius:9px;background:#fffaf7;color:#9c1230;cursor:zoom-in;max-width:100%;padding:10px}
.lctvf-zoom-overlay{position:fixed;inset:0;background:rgba(15,12,14,.92);z-index:2147483600;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;padding:15px;color:#fff}
.lctvf-zoom-overlay button{cursor:pointer;border:1px solid #fff6;background:#451b24;color:white;border-radius:7px;padding:8px 14px}
.lctvf-zoom-content{width:100%;max-width:95vw;max-height:77vh;overflow:auto;text-align:center;background:#2b2323}
.lctvf-zoom-content img{max-width:none;width:min(900px,100%);height:auto;transform-origin:top left;transition:transform .1s}
.lctvf-zoom-controls{display:flex;gap:10px}
@media(max-width:650px){.lctvf-extra-tools{align-items:stretch}.lctvf-extra-tools #lctvf-search{flex-basis:100%}.lctvf-extra-tools select{max-width:100%;flex:1}.lctvf-detail-tools .lctvf-button{font-size:12px}}
