/* VNISES · Nhật ký vũ trụ (vnises_bv): lưới bài viết kiểu bảng tin.
 * Các thuộc tính dễ bị CSS của theme đè (khoảng cách, viền, chữ của h1, h3, p, a, img, input) có !important. */

@font-face { font-family: 'VNISES BV Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/noto-serif-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'VNISES BV Serif'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/noto-serif-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/be-vietnam-pro-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/be-vietnam-pro-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'VNISES BV Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/be-vietnam-pro-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =========================================================================
   THIẾT LẬP — màu, chữ, kích thước; đổi ở đây để tinh chỉnh
   ========================================================================= */
.vbv {
	--serif: 'VNISES BV Serif', 'VNISES Serif', 'Noto Serif', Georgia, serif;            /* tiêu đề trang */
	--sans: 'VNISES BV Sans', 'Be Vietnam Pro', Roboto, 'Segoe UI', system-ui, sans-serif; /* thẻ, ô tìm */
	--trang: #F3F6FB;        /* tiêu đề */
	--chu: #C4CDDA;          /* tóm tắt trên thẻ rộng */
	--mo: #8794A8;           /* dòng VNISES, chữ phụ */
	--nen: #0B1220;          /* nền trang (theme) */
	--the: #111A2B;          /* nền thẻ */
	--the-sang: #15203A;     /* nền thẻ khi rê chuột */
	--vien: rgba(255, 255, 255, .065);
	--vien-sang: rgba(156, 195, 255, .32);
	--nhan: #9CC3FF;         /* màu nhấn: ô tìm khi gõ, vòng chọn bàn phím, viền thẻ khi rê chuột */
	--bo: 14px;              /* bo góc thẻ */
	--gap: clamp(12px, 1.25vw, 20px); /* khe giữa các thẻ */
	--cot: 5;                /* số cột lưới */
	--ti: clamp(16px, 1.08vw, 17.5px); /* cỡ tiêu đề thẻ thường */
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto !important;
	padding: clamp(28px, 4.2vw, 64px) clamp(14px, 3vw, 40px) clamp(56px, 7vw, 104px) !important;
	color: var(--trang);
	font: 400 15px/1.5 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
.vbv *, .vbv *::before, .vbv *::after { box-sizing: border-box; }
.vbv [hidden][hidden] { display: none !important; }
.vbv a { color: inherit !important; text-decoration: none !important; box-shadow: none !important; border: 0 !important; background: none; }
.vbv p, .vbv h1, .vbv h3, .vbv form { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.vbv img { display: block; max-width: none !important; height: auto; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }

/* ---------- đầu trang ---------- */
.vbv-h { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding-bottom: clamp(18px, 2vw, 26px); margin-bottom: clamp(20px, 2.4vw, 32px); border-bottom: 1px solid var(--vien); }
.vbv .vbv-ti { font: 600 clamp(32px, 3.6vw, 52px)/1.3 var(--serif) !important; color: var(--trang) !important; letter-spacing: -.018em !important; text-transform: none !important; }
.vbv-f { position: relative; flex: 0 1 340px; min-width: 240px; margin-bottom: 4px !important; }
.vbv-si { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--mo); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.vbv .vbv-q { width: 100% !important; height: 44px !important; margin: 0 !important; padding: 0 44px !important; border: 1px solid var(--vien) !important; border-radius: 999px !important; background: rgba(255, 255, 255, .035) !important; color: var(--trang) !important; font: 400 15px/1 var(--sans) !important; box-shadow: none !important; outline: none !important; -webkit-appearance: none; appearance: none; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.vbv .vbv-q::placeholder { color: #66728A; opacity: 1; }
.vbv .vbv-q::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.vbv .vbv-q:hover { border-color: rgba(255, 255, 255, .16) !important; }
.vbv .vbv-q:focus { border-color: var(--nhan) !important; background: rgba(156, 195, 255, .06) !important; box-shadow: 0 0 0 4px rgba(156, 195, 255, .1) !important; }
.vbv .vbv-x { position: absolute; right: 7px; top: 50%; display: grid !important; place-items: center; width: 30px; height: 30px; transform: translateY(-50%); border-radius: 50% !important; color: var(--mo) !important; }
.vbv .vbv-x:hover { background: rgba(255, 255, 255, .08) !important; color: var(--trang) !important; }
.vbv-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- lưới ---------- */
.vbv-g { display: grid; grid-template-columns: repeat(var(--cot), minmax(0, 1fr)); grid-auto-flow: row dense; gap: var(--gap); }
.vbv-c { position: relative; min-width: 0; border-radius: var(--bo); background: linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, 0) 60%), var(--the); box-shadow: inset 0 0 0 1px var(--vien), 0 1px 0 rgba(255, 255, 255, .02); overflow: hidden; isolation: isolate;
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, background-color .3s; }
.vbv-c:hover { background-color: var(--the-sang); transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--vien-sang), 0 22px 44px -26px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .2); }
.vbv .vbv-l { display: flex !important; flex-direction: column; height: 100%; border-radius: inherit !important; }
.vbv .vbv-l:focus-visible { outline: 2px solid var(--nhan) !important; outline-offset: -2px; }
.vbv-m { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(120% 120% at 25% 15%, rgba(156, 195, 255, .14), rgba(11, 18, 32, 0) 62%), #0F1727; }
.vbv-m::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(255, 255, 255, .05); }
.vbv .vbv-img { width: 100% !important; height: 100% !important; object-fit: cover; transform: scale(1.001); transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.vbv-c:hover .vbv-img { transform: scale(1.045); }
.vbv-b { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 18px; }
.vbv .vbv-s { display: flex; align-items: center; gap: 7px; min-width: 0; font: 500 12px/1 var(--sans) !important; letter-spacing: .06em !important; color: var(--mo) !important; white-space: nowrap; }
.vbv .vbv-ic { width: 16px !important; height: 16px !important; border-radius: 50% !important; flex: none; }
.vbv .vbv-t { font: 600 var(--ti)/1.42 var(--sans) !important; color: #E9EEF6 !important; letter-spacing: -.005em !important; text-transform: none !important; text-wrap: pretty; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; transition: color .25s; }
.vbv-c:hover .vbv-t { color: #fff !important; }
.vbv .vbv-e { display: none; }

/* thẻ rộng: ảnh phủ kín, chữ đè lên ảnh */
.vbv .is-w { grid-column: span 2; min-height: 240px; background: #0F1727; } /* cao bằng hàng, theo thẻ thường bên cạnh */
.vbv .is-w .vbv-m { position: absolute; inset: 0; aspect-ratio: auto; }
.vbv .is-w .vbv-m::after { inset: 0; height: auto; background: linear-gradient(180deg, rgba(7, 11, 20, 0) 30%, rgba(7, 11, 20, .5) 56%, rgba(7, 11, 20, .94) 100%); }
.vbv .is-w .vbv-b { position: relative; z-index: 1; margin-top: auto; padding: clamp(18px, 1.8vw, 26px) clamp(18px, 2vw, 28px) clamp(20px, 2vw, 28px); gap: 10px; }
.vbv .is-w .vbv-s { color: rgba(236, 241, 248, .82) !important; }
.vbv .is-w .vbv-t { font-size: clamp(20px, 1.75vw, 27px) !important; line-height: 1.24 !important; letter-spacing: -.012em !important; color: #fff !important; text-wrap: balance; text-shadow: 0 2px 20px rgba(0, 0, 0, .45); -webkit-line-clamp: 3; line-clamp: 3; }
.vbv .is-w .vbv-e { display: -webkit-box; max-width: 62ch; font: 400 14.5px/1.6 var(--sans) !important; color: var(--chu) !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

/* trống, nút */
.vbv-empty { padding: 56px 0 12px; text-align: center; }
.vbv-empty p { font: 400 18px/1.5 var(--sans) !important; color: var(--chu) !important; }
.vbv-empty q { color: var(--trang); }
.vbv-pg { display: flex; justify-content: center; gap: 12px; padding-top: clamp(32px, 4vw, 52px); }
.vbv-pg:empty { display: none; }
.vbv .vbv-btn { display: inline-flex !important; align-items: center; justify-content: center; height: 46px; padding: 0 28px !important; margin-top: 20px; border-radius: 999px !important; border: 1px solid rgba(255, 255, 255, .18) !important; color: var(--trang) !important; font: 500 15px/1 var(--sans) !important; transition: background-color .2s, border-color .2s; }
.vbv-pg .vbv-btn { margin-top: 0; }
.vbv .vbv-btn:hover { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .32) !important; }
.vbv .vbv-more[aria-busy="true"] { opacity: .5; pointer-events: none; }

/* ---------- cỡ màn hình ---------- */
@media (min-width: 1800px) { .vbv { max-width: 1600px; --ti: 18px; } }
@media (max-width: 1180px) { .vbv { --cot: 4; } }
@media (max-width: 960px) { .vbv { --cot: 3; } .vbv .is-w .vbv-e { -webkit-line-clamp: 2; line-clamp: 2; font-size: 14px !important; } }
@media (max-width: 720px) {
	.vbv { --cot: 2; --ti: 15.5px; }
	.vbv-f { flex: 1 1 100%; margin-bottom: 0 !important; }
	.vbv-b { padding: 12px 13px 15px; gap: 7px; }
	.vbv .is-w { min-height: 0; aspect-ratio: 16 / 10; }
	.vbv .is-w .vbv-e { display: none; }
}
/* điện thoại xoay ngang: thấp, rộng vừa */
@media (max-height: 520px) and (orientation: landscape) { .vbv .is-w { min-height: 0; } .vbv .is-w .vbv-e { display: none; } }

/* điện thoại dọc: một cột; thẻ thường thành dòng (chữ trái, ảnh vuông phải) để lướt được nhiều bài */
@media (max-width: 540px) {
	.vbv { --cot: 1; --ti: 16px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)) !important; }
	.vbv-h { margin-bottom: 8px; padding-bottom: 18px; }
	.vbv-g { gap: 0; }
	.vbv .vbv-c:not(.is-w) { border-radius: 0; background: none; box-shadow: none; border-bottom: 1px solid var(--vien) !important; transform: none; }
	.vbv .vbv-c:not(.is-w) .vbv-l { flex-direction: row-reverse; align-items: flex-start; gap: 14px; padding: 16px 0; border-radius: 0 !important; }
	.vbv .vbv-c:not(.is-w) .vbv-m { flex: none; width: clamp(92px, 26vw, 116px); aspect-ratio: 1; border-radius: 12px; }
	.vbv .vbv-c:not(.is-w) .vbv-m::after { display: none; }
	.vbv .vbv-c:not(.is-w) .vbv-b { flex: 1; min-width: 0; padding: 2px 0 0; gap: 8px; }
	.vbv .is-w { grid-column: auto; aspect-ratio: 4 / 3.4; margin: 16px 0 8px; border-radius: 16px; }
	.vbv .is-w .vbv-t { font-size: clamp(21px, 5.8vw, 25px) !important; }
}

@media (hover: none) { .vbv-c:hover { transform: none; } .vbv-c:hover .vbv-img { transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.vbv *, .vbv *::before, .vbv *::after { transition: none !important; }
	.vbv-c:hover, .vbv-c:hover .vbv-img { transform: none; }
}
