/* บทความ (th/inc/articles.php) + หน้าจัดการบทความ (/th/owner/articles/) ; prefix lbat- ; โทเคนธีม --lbd-* (directory.css) */

/* ---------- รายการ ---------- */
.lbat-search { display: flex; align-items: center; gap: 10px; max-width: 720px; margin-top: 22px; padding: 6px 6px 6px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--lbd-line); box-shadow: 0 10px 28px rgba(16, 24, 40, .08); }
.lbat-search .fa { color: var(--lbd-accent); }
.lbat-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: none; font: inherit; font-size: 16px; color: var(--lbd-ink); outline: 0; }
.lbat-search .lbd-btn { height: 46px; border-radius: 12px; }
.lbat-cats { display: flex; gap: 8px; margin: 0 0 16px; padding: 2px 0 6px; overflow-x: auto; scrollbar-width: none; }
.lbat-cats::-webkit-scrollbar { display: none; }
.lbat-cats a { display: inline-flex; flex: none; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lbd-line); background: #fff; color: var(--lbd-text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.lbat-cats a .fa { color: var(--lbd-accent); }
.lbat-cats a em { font-style: normal; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: #eef1f5; color: var(--lbd-muted); font-size: 12px; }
.lbat-cats a:hover { border-color: #c7cbff; }
.lbat-cats a[aria-current="page"] { border-color: var(--lbd-accent); background: var(--lbd-accent); color: #fff; }
.lbat-cats a[aria-current="page"] .fa, .lbat-cats a[aria-current="page"] em { color: #fff; background: rgba(255, 255, 255, .2); }
.lbat .lbf { margin-bottom: 14px; }
.lbat-feat { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; margin-bottom: 22px; }
.lbat-feat-side { display: grid; gap: 18px; }
.lbat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.lbat-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #fff; border: 1px solid var(--lbd-line); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.lbat-card:hover { transform: translateY(-3px); border-color: #c7cbff; box-shadow: var(--lbd-shadow-hover); }
.lbat-card-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #eef0ff, #f6f8fb); color: #b8bdf5; font-size: 42px; }
.lbat-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.lbat-card:hover .lbat-card-img img { transform: scale(1.04); }
.lbat-card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.lbat-card-body b { color: var(--lbd-ink); font-size: 17px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbat-card-body small { color: var(--lbd-muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lbat-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: #eef0ff; color: var(--lbd-accent-dark); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.lbat-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 6px; color: var(--lbd-muted); font-size: 13px; }
.lbat-card.is-big .lbat-card-img { aspect-ratio: 16 / 9; }
.lbat-card.is-big .lbat-card-body b { font-size: 22px; -webkit-line-clamp: 3; }
.lbat-card.is-row { flex-direction: row; }
.lbat-card.is-row .lbat-card-img { flex: 0 0 42%; aspect-ratio: auto; min-height: 150px; }
.lbat-card.is-row .lbat-card-body { justify-content: center; }
.lbat-card.is-row .lbat-card-body .lbat-meta { margin-top: 4px; }	/* การ์ดแนวนอน : เนื้อหาอยู่กลาง ไม่เว้นว่างด้านล่าง */

/* ---------- อ่านบทความ ---------- */
.lbat-read { padding-top: calc(var(--lbnav-h, 72px) + 18px); }
.lbat-read .lbd-crumb { margin-bottom: 14px; }
.lbat-head { max-width: 860px; }
.lbat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px !important; }
.lbat-type { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--lbd-line); background: #fff; color: var(--lbd-muted); font-size: 12.5px; font-weight: 600; }
.lbat-head h1 { margin: 0 !important; color: var(--lbd-ink); font-size: clamp(26px, 3vw, 40px); line-height: 1.3; letter-spacing: -.01em; }
.lbat-lead { margin: 14px 0 0 !important; color: var(--lbd-text); font-size: 18px; line-height: 1.7; }
.lbat-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--lbd-line); border-bottom: 1px solid var(--lbd-line); }
.lbat-by { display: flex; align-items: center; gap: 12px; }
.lbat-by > span:last-child { display: grid; }
.lbat-by b { color: var(--lbd-ink); }
.lbat-by small { color: var(--lbd-muted); font-size: 13px; }
.lbat-by-ava { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #7b7bff, #4f46e5); color: #fff; }
.lbat-by-act { display: flex; gap: 8px; }
.lbat-by-act a.lbdv-act { text-decoration: none; }
.lbat-cover { margin: 24px 0 0; border-radius: 20px; overflow: hidden; background: #e8eef2; }
.lbat-cover img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.lbat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin-top: 30px; }
.lbat-prose { max-width: 760px; color: var(--lbd-text); font-size: 17px; line-height: 1.95; }
.lbat-prose > *:first-child { margin-top: 0 !important; }
.lbat-prose p { margin: 0 0 18px !important; }
.lbat-prose h2 { margin: 34px 0 12px !important; color: var(--lbd-ink); font-size: 24px; line-height: 1.4; scroll-margin-top: calc(var(--lbnav-h, 72px) + 20px); }
.lbat-prose h3 { margin: 24px 0 10px !important; color: var(--lbd-ink); font-size: 19px; scroll-margin-top: calc(var(--lbnav-h, 72px) + 20px); }
.lbat-prose ul, .lbat-prose ol { margin: 0 0 18px !important; padding-left: 24px; }
.lbat-prose li { margin-bottom: 6px; }
.lbat-prose blockquote { margin: 22px 0 !important; padding: 16px 20px; border-radius: 0 14px 14px 0; border-left: 4px solid var(--lbd-accent); background: #f6f7ff; color: var(--lbd-ink); font-weight: 500; }
.lbat-prose a { color: var(--lbd-accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.lbat-prose strong { color: var(--lbd-ink); }
.lbat-fig { margin: 24px 0 !important; }
.lbat-fig img { display: block; width: 100%; height: auto; border-radius: 16px; }
.lbat-fig figcaption { margin-top: 8px; color: var(--lbd-muted); font-size: 13.5px; text-align: center; }
.lbat-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0 !important; }
.lbat-tags a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: #f1f3f7; color: var(--lbd-text); font-size: 13.5px; text-decoration: none; }
.lbat-tags a:hover { background: #eef0ff; color: var(--lbd-accent-dark); }
.lbat-cta { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding: 18px 20px; border-radius: 18px; border: 1px solid #e4e2ff; background: linear-gradient(135deg, #f3f2ff, #fff 70%); }
.lbat-cta > span { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fff; color: var(--lbd-accent-dark); font-size: 20px; box-shadow: var(--lbd-shadow); }
.lbat-cta > div { display: grid; flex: 1; }
.lbat-cta b { color: var(--lbd-ink); font-size: 16px; }
.lbat-cta small { color: var(--lbd-muted); }
.lbat-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.lbat-pn a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--lbd-line); background: #fff; text-decoration: none; }
.lbat-pn a:hover { border-color: var(--lbd-accent); }
.lbat-pn a.is-next { text-align: right; }
.lbat-pn small { color: var(--lbd-muted); font-size: 13px; }
.lbat-pn b { color: var(--lbd-ink); line-height: 1.45; }
.lbat-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--lbnav-h, 72px) + 20px); }
.lbat-toc, .lbat-side-card { display: grid; gap: 8px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--lbd-line); }
.lbat-toc b, .lbat-side-card b { color: var(--lbd-ink); }
.lbat-toc b .fa { color: var(--lbd-accent); }
.lbat-toc ol { margin: 0 !important; padding-left: 20px; display: grid; gap: 6px; }
.lbat-toc a { color: var(--lbd-text); font-size: 14px; text-decoration: none; line-height: 1.5; }
.lbat-toc a:hover, .lbat-toc a.is-on { color: var(--lbd-accent-dark); font-weight: 700; }
.lbat-side-card a { display: flex; justify-content: space-between; color: var(--lbd-accent-dark); font-size: 14px; font-weight: 600; text-decoration: none; }
.lbat-related { margin-top: 44px; }

/* ---------- จัดการบทความ (/th/owner/articles/) ---------- */
.lbat-adm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lbat-adm-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lbat-adm-filter input, .lbat-adm-filter select { height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--lbd-line); background: #fff; font: inherit; font-size: 14px; }
.lbat-adm-filter input { flex: 1; min-width: 180px; }
.lbat-adm-list { display: grid; gap: 10px; }
.lbat-adm-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--lbd-line); }
.lbat-adm-img { width: 96px; height: 64px; border-radius: 10px; overflow: hidden; background: #eef0ff; display: flex; align-items: center; justify-content: center; color: #b8bdf5; }
.lbat-adm-img img { width: 100%; height: 100%; object-fit: cover; }
.lbat-adm-row b { color: var(--lbd-ink); display: block; line-height: 1.4; }
.lbat-adm-row small { color: var(--lbd-muted); font-size: 12.5px; }
.lbat-adm-act { display: flex; gap: 6px; }
.lbat-adm-act a, .lbat-adm-act button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--lbd-line); background: #fff; color: var(--lbd-text); cursor: pointer; text-decoration: none; }
.lbat-adm-act a:hover, .lbat-adm-act button:hover { border-color: var(--lbd-accent); color: var(--lbd-accent-dark); }
.lbat-adm-act button.is-del:hover { border-color: #e5484d; color: #e5484d; }
.lbat-st { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin-right: 6px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lbat-st.is-published { background: #e9f8f0; color: #0f6e4b; }
.lbat-st.is-draft { background: #f1f3f7; color: #55677a; }
.lbat-st.is-feat { background: #fff4e5; color: #b45309; }
.lbat-help { margin: 8px 0 0 !important; padding: 12px 14px; border-radius: 12px; background: #f6f7ff; color: var(--lbd-muted); font-size: 13px; line-height: 1.8; }
.lbat-help code { padding: 1px 6px; border-radius: 6px; background: #fff; border: 1px solid var(--lbd-line); color: var(--lbd-ink); font-size: 12.5px; }
.lbd .lbat-form textarea[name="body"] { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; line-height: 1.7; }
.lbd .lbat-form select, .lbd .lbat-form input[type="datetime-local"] { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--lbd-line); background: #fff; font: inherit; font-size: 16px; color: var(--lbd-ink); }
.lbat-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.lbat-imgs figure { margin: 0; padding: 8px; border-radius: 12px; border: 1px solid var(--lbd-line); background: #fff; display: grid; gap: 6px; }
.lbat-imgs img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; }
.lbat-imgs code { font-size: 12px; color: var(--lbd-accent-dark); }
.lbat-imgs input[type="text"] { height: 34px !important; font-size: 13px !important; }
.lbat-cover-prev { width: 220px; height: 130px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 8px; }

@media (max-width: 1000px) {
	.lbat-feat { grid-template-columns: minmax(0, 1fr); }
	.lbat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lbat-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.lbat-aside { position: static; order: -1; }
	.lbat-side-card { display: none; }
}
@media (max-width: 640px) {
	.lbat-grid { grid-template-columns: minmax(0, 1fr); }
	.lbat-card.is-row { flex-direction: column; }
	.lbat-card.is-row .lbat-card-img { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
	.lbat-read { padding-top: calc(var(--lbnav-h, 64px) + 10px); }
	.lbat-prose { font-size: 16px; }
	.lbat-pn { grid-template-columns: minmax(0, 1fr); }
	.lbat-pn a.is-next { text-align: left; }
	.lbat-cta { flex-wrap: wrap; }
	.lbat-cta .lbd-btn { width: 100%; justify-content: center; }
	.lbat-search { padding-left: 14px; }
	.lbat-search .lbd-btn { padding: 0 14px; }
	.lbat-adm-row { grid-template-columns: 64px minmax(0, 1fr); }
	.lbat-adm-img { width: 64px; height: 48px; }
	.lbat-adm-act { grid-column: 1 / -1; justify-content: flex-end; }
}
.lbo-h1 { margin: 0 !important; color: var(--lbd-ink); font-size: 24px; }
.lbo-sub { margin: 4px 0 0 !important; color: var(--lbd-muted); font-size: 14px; }
.lbo-sub a { color: var(--lbd-accent-dark); }
.lbat-adm-act form { margin: 0; }

/* ---------- รายการ v2 (2026-11-28) : หัวกะทัดรัด + แถบหมวด + ประเภท / เรียง แบบลิงก์ ---------- */
.lbat-top { padding: calc(var(--lbnav-h, 72px) + 20px) 0 0; background: linear-gradient(180deg, #f5f5ff 0%, rgba(245, 245, 255, 0) 100%); }
.lbat-top .lbd-crumb { margin-bottom: 12px; }
.lbat-top-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lbat-top-t { min-width: 0; }
.lbat-top h1 { margin: 0 !important; color: var(--lbd-ink); font-family: "Prompt", "IBM Plex Sans Thai Looped", sans-serif; font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.lbat-top h1 .lbd-accent { color: #6161ff; }
.lbat-top-t p { margin: 6px 0 0 !important; color: #667085; font-size: 15px; }
.lbat-top .lbat-search { flex: 0 1 420px; max-width: 420px; margin: 0; padding: 5px 5px 5px 16px; border-radius: 14px; box-shadow: 0 8px 22px -14px rgba(16, 24, 40, .25); }
.lbat-top .lbat-search input { height: 40px; font-size: 15px; }
.lbat-top .lbat-search .lbd-btn { height: 40px; padding: 0 16px; border-radius: 10px; background: #6161ff; }
.lbat-top .lbat-search .lbd-btn .fa { color: #fff; }
.lbat-top .lbat-search .lbd-btn span { margin-left: 2px; }
/* แถบหมวด : เส้นใต้แบบแท็บ เลื่อนแนวนอนได้ + ขอบจาง */
.lbat-top .lbat-cats { gap: 4px; margin: 20px 0 0; padding: 0; border-bottom: 1px solid #e7eaf0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.lbat-top .lbat-cats a { position: relative; height: 46px; padding: 0 12px; border: 0; border-radius: 0; background: none; color: #475467; font-size: 14.5px; font-weight: 500; }
.lbat-top .lbat-cats a .fa { color: #98a2b3; }
.lbat-top .lbat-cats a em { height: 19px; min-width: 20px; padding: 0 6px; background: #f2f4f7; color: #667085; font-size: 11.5px; }
.lbat-top .lbat-cats a:hover { color: #4b4bd6; }
.lbat-top .lbat-cats a:hover .fa { color: #6161ff; }
.lbat-top .lbat-cats a[aria-current="page"] { background: none; color: #4b4bd6; font-weight: 600; }
.lbat-top .lbat-cats a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: #6161ff; }
.lbat-top .lbat-cats a[aria-current="page"] .fa { color: #6161ff; background: none; }
.lbat-top .lbat-cats a[aria-current="page"] em { background: #6161ff; color: #fff; }
/* ประเภท (ซ้าย) + เรียง (ขวา) */
.lbat-body { padding-top: 18px !important; }
.lbat-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; }
.lbat-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.lbat-seg a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid #e4e7ec; border-radius: 999px; background: #fff; color: #475467; font-size: 13.5px; font-weight: 500; text-decoration: none; }
.lbat-seg a:hover { border-color: #c9c9fb; color: #4b4bd6; }
.lbat-seg a[aria-current="true"] { border-color: #6161ff; background: #efeffe; color: #4b4bd6; font-weight: 600; }
.lbat-sort { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.lbat-sort > .fa { margin: 0 6px 0 8px; color: #98a2b3; font-size: 13px; }
.lbat-sort a { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 9px; color: #475467; font-size: 13px; text-decoration: none; white-space: nowrap; }
.lbat-sort a:hover { color: #4b4bd6; }
.lbat-sort a[aria-current="true"] { background: #6161ff; color: #fff; font-weight: 600; }
.lbat .lbd-resultbar { margin-bottom: 14px; }
/* การ์ด : ไอคอนหมวดอยู่ใต้รูป (รูปเสีย / ไม่มีรูป ยังดูเป็นภาพปก) */
.lbat-card-img { position: relative; background: linear-gradient(135deg, #efeffe, #f6f8fb); color: #b4b4f5; }
.lbat-card-img img { position: absolute; inset: 0; }
.lbat-feat { align-items: stretch; }
.lbat-card.is-big { height: 100%; }
.lbat-card.is-big .lbat-card-img { flex: 1 1 auto; min-height: 260px; aspect-ratio: auto; }
.lbat-feat-side { grid-template-rows: 1fr 1fr; }
.lbat-card.is-row .lbat-card-body b { -webkit-line-clamp: 3; }

@media (max-width: 860px){
	.lbat-top-row { flex-direction: column; align-items: stretch; gap: 14px; }
	.lbat-top .lbat-search { flex: none; max-width: none; }
	.lbat-top .lbat-search .lbd-btn span { display: none; }
	.lbat-bar { flex-direction: column; align-items: stretch; }
	.lbat-seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.lbat-seg::-webkit-scrollbar { display: none; }
	.lbat-seg a { flex: none; }
	.lbat-sort { align-self: flex-start; }
	.lbat-card.is-big .lbat-card-img { min-height: 0; aspect-ratio: 16 / 9; }
	.lbat-feat-side { grid-template-rows: none; }
}
.lbat-top .lbat-cats a:not([aria-current="page"]) em { display: none; }	/* จำนวน : แสดงเฉพาะหมวดที่เลือก (หมวดครบแถวเดียว) */
@media (max-width: 1439px){ .lbat-top .lbat-cats a .fa { display: none; } .lbat-top .lbat-cats a { padding: 0 11px; } }	/* หมวด 11 แท็บ : ไม่มีไอคอน -> ครบแถวเดียวบนจอ 1280 */

/* แท็บหมวด v3 (2026-11-28) : แถบขาวแยกจากพื้น + หมวดที่เลือก = ปุ่มม่วงทึบ ; ประเภท = ตัวเลือกรอง (ข้อความ ไม่มีกรอบ) */
.lbat-top .lbat-cats { gap: 2px; margin: 20px 0 0; padding: 5px; border: 1px solid #e7eaf0; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px -14px rgba(16, 24, 40, .3); -webkit-mask-image: none; mask-image: none; }
.lbat-top .lbat-cats a { height: 38px; padding: 0 14px; border-radius: 10px; color: #475467; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s; }
.lbat-top .lbat-cats a:hover { background: #f5f5ff; color: #4b4bd6; }
.lbat-top .lbat-cats a[aria-current="page"] { background: #6161ff; color: #fff; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(97, 97, 255, .9); }
.lbat-top .lbat-cats a[aria-current="page"]::after { display: none; }
.lbat-top .lbat-cats a[aria-current="page"] .fa { color: #fff; }
@media (max-width: 1439px){ .lbat-top .lbat-cats a { padding: 0 11px; font-size: 14px; } }
.lbat-body { padding-top: 14px !important; }
.lbat-seg { gap: 2px; }
.lbat-seg a { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: #667085; font-size: 13.5px; }
.lbat-seg a:hover { background: #f2f4f7; color: #344054; }
.lbat-seg a[aria-current="true"] { background: #efeffe; color: #4b4bd6; font-weight: 600; }
@media (max-width: 860px){ .lbat-top .lbat-cats { border-radius: 12px; } }

/* แถบหมวดแบบ YouTube (2026-11-28) : ชิปเทาอ่อน , เลือก = ม่วงทึบ , ลูกศรเมื่อล้น , ติดใต้เมนูตอนเลื่อน */
.lbat-chipbar { position: sticky; top: var(--lbnav-h, 72px); z-index: 20; margin-top: 16px; padding: 10px 0; background: rgba(247, 248, 252, .92); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.lbat-chipbar-in { position: relative; }
.lbat-chipbar .lbat-cats { display: flex; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
.lbat-chipbar .lbat-cats::-webkit-scrollbar { display: none; }
.lbat-chipbar .lbat-cats a { flex: none; height: 36px; padding: 0 14px !important; border: 0; border-radius: 10px; background: #eceef3; color: #1f2937; font-size: 14px !important; font-weight: 500; white-space: nowrap; box-shadow: none; }
.lbat-chipbar .lbat-cats a .fa { display: none; }
.lbat-chipbar .lbat-cats a:hover { background: #e1e3ea; color: #101828; }
.lbat-chipbar .lbat-cats a[aria-current="page"] { background: #6161ff; color: #fff; font-weight: 600; box-shadow: none; }
.lbat-chipbar .lbat-cats a[aria-current="page"]::after { display: none; }
.lbat-chip-nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; margin-top: -18px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #1f2937; font-size: 20px; cursor: pointer; box-shadow: 0 2px 8px rgba(16, 24, 40, .18); }
.lbat-chip-nav:hover { background: #f5f5ff; color: #4b4bd6; }
.lbat-chip-nav[hidden] { display: none; }
.lbat-chip-nav.is-prev { left: 12px; }
.lbat-chip-nav.is-next { right: 12px; }
.lbat-chipbar-in::before, .lbat-chipbar-in::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 72px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.lbat-chipbar-in::before { left: 0; background: linear-gradient(90deg, rgb(247, 248, 252) 45%, rgba(247, 248, 252, 0)); }
.lbat-chipbar-in::after { right: 0; background: linear-gradient(270deg, rgb(247, 248, 252) 45%, rgba(247, 248, 252, 0)); }
.lbat-chipbar.is-l .lbat-chipbar-in::before, .lbat-chipbar.is-r .lbat-chipbar-in::after { opacity: 1; }
.lbat-chipbar + .lbat-body { padding-top: 8px !important; }
@media (hover: none){ .lbat-chip-nav { display: none !important; } }	/* จอสัมผัส : ปัดเลื่อนเอง */
@media (max-width: 860px){ .lbat-chipbar .lbat-cats a { height: 34px; padding: 0 12px !important; } }

/* หมวดย่อย (2026-11-29) : เส้นคั่นหมวดเสริม + แถวหมวดย่อยแทนแถบประเภท + ป้ายประเภทบนการ์ด */
.lbat-cats-sep { flex: none; align-self: center; width: 1px; height: 22px; margin: 0 6px; background: #d6dae3; }
.lbat-subs { flex-wrap: wrap; max-width: 100%; }
.lbat-subs a em { font-style: normal; margin-left: 4px; color: var(--lbd-muted); font-size: 12px; }
.lbat-subs a[aria-current="true"] em { color: inherit; opacity: .8; }
.lbat-card-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lbat-chip { max-width: 100%; height: auto; min-height: 26px; padding: 4px 10px; line-height: 1.35; }	/* ข้อความยาวขึ้น 2 บรรทัดได้ พื้นหลังขยายตาม (เดิม height 26px ข้อความล้นกรอบ) */
.lbat-card-body, .lbat-card-chips { min-width: 0; max-width: 100%; }	/* ให้คอลัมน์ข้อความหดตามการ์ด : ป้ายบรรทัดเดียวไม่ดันเนื้อหาล้นขวา (การ์ดแนวนอนด้านขวาของแถวเด่น) */
.lbat-card-chips .lbat-chip { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }	/* บนการ์ด : บรรทัดเดียว ยาวเกิน = … */
.lbat-card-chips .lbat-chip .fa { margin-right: 4px; }
.lbat-card-chips .lbat-type { font-size: 12px; font-weight: 600; color: var(--lbd-muted); background: #f1f3f7; border-radius: 999px; padding: 2px 9px; }
.lbat-chips .lbat-chip.is-sub { background: #f1f3f7; color: var(--lbd-text); }

/* กล่องค้นหาบทความ (หัวหน้า .lbat-top) : สมมาตร 2026-11-29 — ช่องพิมพ์กับปุ่มสูงเท่ากัน กึ่งกลางกล่อง ระยะบน = ล่าง
   (สไตล์ช่องกรอกส่วนกลางใส่ margin ล่าง / ความสูงทับ ทำให้กล่องเกินลงล่าง 10px) */
.lbat-search { box-sizing: border-box; align-items: center; }
.lbd .lbat-search input[name=q] { box-sizing: border-box; height: 44px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; line-height: 44px; align-self: center; }
.lbat-search .lbd-btn { flex: none; align-self: center; margin: 0 !important; }
.lbat-top .lbat-search { gap: 10px; padding: 6px 6px 6px 16px; }
.lbd .lbat-top .lbat-search input[name=q] { height: 42px !important; line-height: 42px; }
.lbat-top .lbat-search .lbd-btn { height: 42px; min-width: 96px; justify-content: center; }
@media (max-width: 900px) { .lbat-top .lbat-search .lbd-btn { min-width: 42px; width: 42px; padding: 0; } }

/* แถวหัวรายการ + เรียงลำดับ (2026-11-29) : ซ้าย = จำนวน / ผลการค้นหา , ขวา = segmented control (ไอคอน + คำ) แบบเดียวกับปุ่ม รายการ | แผนที่ */
.lbat-bar:not(:has(a)) { display: none; }	/* ไม่มีหมวดย่อย : ไม่เว้นแถวว่าง */
.lbat-resbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; }
.lbat-resbar-l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; color: #475467; font-size: 14.5px; }
.lbat-resbar-l > b { color: var(--lbd-ink); font-size: 16px; }
.lbat-count b { color: var(--lbd-ink); font-size: 16px; font-weight: 700; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.lbat-resbar .lbat-sort { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid #e4e7ec; border-radius: 999px; background: #f2f3f7; }
.lbat-resbar .lbat-sort a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: transparent; color: #475467; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.lbat-resbar .lbat-sort a .fa { font-size: 13px; color: #98a2b3; }
.lbat-resbar .lbat-sort a:hover { color: #3f3fb8; }
.lbat-resbar .lbat-sort a[aria-current="true"] { background: #fff; color: #3f3fb8; box-shadow: 0 2px 8px -3px rgba(16, 24, 64, .25); }
.lbat-resbar .lbat-sort a[aria-current="true"] .fa { color: #6161ff; }
.lbat-resbar .lbat-sort a[aria-current="true"] .fa-fire { color: #ea580c; }
.lbat-resbar .lbat-sort a:focus-visible { outline: 2px solid #6161ff; outline-offset: 2px; }
@media (max-width: 560px) {
	.lbat-resbar { gap: 8px; }
	.lbat-resbar .lbat-sort a { height: 30px; padding: 0 10px; gap: 5px; font-size: 12.5px; }
	.lbat-resbar-l { font-size: 13.5px; }
}
.lbat-count { white-space: nowrap; }
@media (max-width: 430px) { .lbat-resbar .lbat-sort a:not([aria-current="true"]) { padding: 0 11px; } .lbat-resbar .lbat-sort a:not([aria-current="true"]) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }	/* มือถือ : ปุ่มที่ไม่ได้เลือกเหลือไอคอน (คำยังอ่านได้ด้วยโปรแกรมอ่านหน้าจอ) ; ตัวที่เลือกมีคำ */
.lbat-resbar .lbat-sort a { position: relative; }
