/* Tivrela Social v0.3 — ตามแบบ "Tivrela ฟีดทริป" (ส้ม เขียวเข้ม พีช) */
.tvs {
	--o: #D9481C; --o-d: #B83A12; --o-l: #FBE6DA; --o-ink: #9A3B12;
	--g: #1E3D35; --g-l: #E3EEEA; --g-ink: #1E4D3F;
	--k: #14201C; --k2: #3C4A45; --mu: #66736E; --ln: #E4E8E6; --bg2: #EFF2F1; --wh: #fff;
	color: var(--k);
}
.tvs *, .tvs *::before, .tvs *::after { box-sizing: border-box; }
.tvs-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tvs :focus-visible { outline: 3px solid var(--o); outline-offset: 2px; }
.tvs [hidden] { display: none !important; }
body.tvs-page { background: var(--bg2, #EFF2F1); }

.tvs-wrap { max-width: 600px; margin: 0 auto; padding: 16px 0 100px; }
.tvs-band { background: var(--wh); }
@media (min-width: 640px) {
	.tvs-wrap { padding: 20px 0 60px; }
	.tvs-band, .tvs-card { border-radius: 18px; border: 1px solid var(--ln); }
}

/* แถบบนแบบแอป (มือถือ) */
.tvs-appbar { display: none; }
.tvs-logo { font-weight: 500; font-size: 1.6rem; letter-spacing: -.02em; color: var(--k); text-decoration: none; margin-right: auto; }
.tvs-logo i { font-style: normal; color: var(--o); }
.tvs-iconbtn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--k); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.tvs-iconbtn:hover { background: var(--bg2); }

/* แถวสถานที่ */
.tvs-stories { padding: 14px 0 12px 16px; }
.tvs-sec-h { font-size: 1rem; font-weight: 500; margin: 0 0 10px; color: var(--k); }
.tvs-story-row { list-style: none; margin: 0; padding: 0 16px 4px 0; display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; }
.tvs-story-row::-webkit-scrollbar { display: none; }
.tvs-story { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; padding: 0; border: 0; background: none; font: inherit; color: var(--k2); text-decoration: none; cursor: pointer; }
.tvs-story-ring { width: 72px; height: 72px; border-radius: 50%; padding: 3px; border: 3px solid var(--o); display: block; }
.tvs-story-ring img, .tvs-story-ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--g-l); color: var(--g); }
.tvs-story-add { border: 2px dashed #9AA6A1; display: flex; align-items: center; justify-content: center; color: var(--k2); }
.tvs-story:hover .tvs-story-add { border-color: var(--o); color: var(--o); }
.tvs-story-name { font-size: .78rem; line-height: 1.25; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ช่องโพสต์ */
.tvs-composer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 8px; }
.tvs-composer-btn { flex: 1; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid #D5DBD8; background: var(--bg2); color: var(--mu); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.tvs-composer-btn:hover { border-color: var(--o); }

/* แท็บฟีด */
.tvs-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; margin-top: 8px; }
.tvs-f { font-size: .95rem !important; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid #D5DBD8; background: var(--wh); color: var(--k2); font: inherit; font-weight: 400; cursor: pointer; }
.tvs-f.is-on { background: var(--k); border-color: var(--k); color: #fff; }
.tvs-status { font-size: .85rem; color: var(--mu); }

/* ฟีด */
.tvs-feed { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tvs-card { background: var(--wh); overflow: hidden; padding-bottom: 4px; }
.tvs-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.tvs-head > a { text-decoration: none; }
.tvs-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tvs-who small { color: var(--mu); font-size: .85rem; line-height: 1.35; }
.tvs-name { font-weight: 500; font-size: 1.05rem; color: var(--k); text-decoration: none; }
a.tvs-name:hover { text-decoration: underline; }
.tvs-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 1.1rem; background: var(--o-l); color: var(--o-ink); }
.tvs-av-sm { width: 32px; height: 32px; font-size: .85rem; }
.tvs-av-anon { background: var(--g-l); color: var(--mu); }
.tvs-follow { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--o); color: #fff; font: inherit; font-weight: 500; cursor: pointer; flex-shrink: 0; }
.tvs-demo-badge { flex-shrink: 0; align-self: center; padding: 3px 9px; border-radius: 999px; background: #FFF3C4; color: #7A5A00; font-size: .72rem; font-weight: 500; }
.tvs-clip-info .tvs-demo-badge { align-self: flex-start; }
.tvs-follow:hover { background: var(--o-d); }
.tvs-follow.is-on { background: var(--bg2); color: var(--k2); }

.tvs-title { margin: 12px 16px 0; font-size: 1.25rem; line-height: 1.35; font-weight: 500; }
.tvs-title-1 { font-size: 1.1rem; }
.tvs-place { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--k); text-decoration: none; }
.tvs-place svg { color: var(--o); flex-shrink: 0; }
.tvs-place:hover { text-decoration: underline; }

/* เส้นทางแบบตัวเลข */
.tvs-steps { list-style: none; margin: 14px 16px 2px; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.tvs-steps li { position: relative; flex: 1 0 90px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tvs-steps li + li::before { content: ""; position: absolute; top: 15px; right: calc(50% + 22px); width: calc(100% - 44px); height: 2px; background: #C9D1CD; }
.tvs-step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--g); color: #fff; font-weight: 500; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.tvs-steps a { font-size: .88rem; font-weight: 500; color: var(--k); text-decoration: none; line-height: 1.3; }
.tvs-steps a:hover { text-decoration: underline; }

.tvs-notes { margin: 10px 16px 0; }
.tvs-note { margin: 0 0 6px; font-size: 1rem; line-height: 1.6; }
.tvs-link { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--mu); cursor: pointer; text-decoration: none; }
.tvs-link:hover { text-decoration: underline; }

/* รูปแบบโมเสก */
.tvs-grid { display: grid; gap: 3px; margin-top: 14px; aspect-ratio: 3 / 2; }
.tvs-grid-1 { grid-template-columns: 1fr; }
.tvs-grid-2 { grid-template-columns: 1fr 1fr; }
.tvs-grid-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tvs-grid-3 .tvs-ph:first-child { grid-row: span 2; }
.tvs-ph { position: relative; display: block; width: 100%; height: 100%; min-height: 0; overflow: hidden; background: var(--g-l); border: 0; padding: 0; cursor: zoom-in; }
.tvs-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvs-more { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 12px; background: rgba(20, 32, 28, .78); color: #fff; font-size: 1.05rem; font-weight: 500; white-space: nowrap; }

/* ป้าย */
.tvs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 16px 0; }
.tvs-chip { font-size: .85rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; }
.tvs-cool { background: var(--g-l); color: var(--g-ink); }
.tvs-warm { background: var(--o-l); color: var(--o-ink); }

.tvs-stats { display: flex; flex-wrap: wrap; align-items: center; min-height: 22px; margin: 10px 16px 0; font-size: .9rem; color: var(--mu); }
.tvs-stat b { font-weight: 400; }
.tvs-stats:not(:has(.tvs-stat:not([hidden]))) { display: none; }
.tvs-stat:not([hidden]) ~ .tvs-stat:not([hidden])::before { content: "·"; margin: 0 6px; color: var(--mu); }
.tvs-actions { display: flex; border-top: 1px solid var(--ln); margin: 10px 8px 0; padding-top: 2px; }
.tvs-act { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 4px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .9rem; font-weight: 400; color: var(--k2); cursor: pointer; white-space: nowrap; }
.tvs-act:hover { background: var(--bg2); }
.tvs-act[data-like].is-on { color: var(--o); }
.tvs-act.is-on svg { fill: currentColor; }
.tvs-act[data-save].is-on { color: var(--g); }
@media (max-width: 420px) { .tvs-act { gap: 4px; } .tvs-act span { font-size: .8rem; } .tvs-act svg { width: 18px; height: 18px; } }

/* ความเห็น */
.tvs-cmts { border-top: 1px solid var(--ln); margin: 0 8px; padding: 10px 8px 12px; }
.tvs-cmt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tvs-cmt { display: flex; gap: 8px; align-items: flex-start; }
.tvs-cmt-b { min-width: 0; }
.tvs-cmt-bubble { background: var(--bg2); border-radius: 16px; padding: 8px 12px; }
.tvs-cmt-bubble .tvs-name { font-size: .88rem; }
.tvs-cmt-bubble p { margin: 2px 0 0; overflow-wrap: anywhere; }
.tvs-cmt small { display: block; margin: 2px 0 0 12px; color: var(--mu); font-size: .78rem; }
.tvs-cmt-loading { color: var(--mu); font-size: .9rem; }
.tvs-cmt-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.tvs-cmt-form textarea { flex: 1; min-height: 42px; max-height: 140px; resize: vertical; padding: 10px 14px; border-radius: 20px; border: 1px solid #D5DBD8; font: inherit; background: var(--bg2); color: var(--k); }
.tvs-cmt-login { margin: 8px 0 0; font-size: .9rem; color: var(--mu); }
.tvs-cmt-login a { color: var(--o); font-weight: 500; }

/* ปุ่ม */
.tvs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--o); color: #fff; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.tvs-btn:hover { background: var(--o-d); color: #fff; }
.tvs-btn[disabled] { opacity: .65; cursor: progress; }
.tvs-btn-sm { min-height: 42px; padding: 0 16px; }
.tvs-btn-o { background: var(--wh); color: var(--k); border: 1px solid #D5DBD8; }
.tvs-btn-o:hover { background: var(--bg2); color: var(--k); }
.tvs-loadmore { display: flex; width: calc(100% - 32px); margin: 14px auto 0; }
.tvs-empty { text-align: center; padding: 36px 20px; margin-top: 8px; }
.tvs-empty p { margin: 0 0 6px; color: var(--k2); }
.tvs-empty .tvs-btn { margin-top: 12px; }
.tvs-privacy { margin: 20px 16px 0; font-size: .8rem; color: var(--mu); text-align: center; }

/* หน้าต่าง */
.tvs-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 18px 44px rgba(0, 0, 0, .25); color: var(--k); background: var(--wh); }
.tvs-dialog::backdrop { background: rgba(14, 22, 19, .6); }
.tvs-cp { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.tvs-cp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--ln); }
.tvs-cp-head h2 { margin: 0; font-size: 1.15rem; }
.tvs-cp-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.tvs-cp-foot { padding: 12px 20px; border-top: 1px solid var(--ln); }
.tvs-cp-foot .tvs-btn { width: 100%; }
.tvs-field { position: relative; display: flex; flex-direction: column; gap: 6px; }
.tvs-field > label { font-weight: 500; }
.tvs-field small { font-weight: 400; color: var(--mu); }
.tvs-field input[type="search"], .tvs-field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid #D5DBD8; font: inherit; color: inherit; background: var(--wh); }
.tvs-cp-res { list-style: none; margin: 0; padding: 4px; border: 1px solid #D5DBD8; border-radius: 12px; background: var(--wh); max-height: 220px; overflow-y: auto; }
.tvs-cp-res button { width: 100%; min-height: 44px; text-align: left; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; }
.tvs-cp-res button:hover, .tvs-cp-res button:focus-visible { background: var(--bg2); }
.tvs-cp-res small { color: var(--mu); }
.tvs-cp-none { padding: 10px; color: var(--mu); }
.tvs-cp-picked { margin: 0; font-weight: 500; color: var(--g); }
.tvs-cp-prev { display: flex; flex-wrap: wrap; gap: 6px; }
.tvs-cp-prev img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.tvs-check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--mu); }
.tvs-check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--o); }
.tvs-cp-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--o-l); color: var(--o-ink); font-weight: 400; }
.tvs-cp-login { padding: 28px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.tvs-cp-login p { margin: 0; }
.tvs-sheet[open] { display: flex; flex-direction: column; }
.tvs-sheet { height: min(70dvh, 640px); }
.tvs-sheet-body { flex: 1; overflow-y: auto; }
.tvs-sheet-body .tvs-cmts { border: 0; margin: 0; padding: 12px 16px; }
@media (max-width: 640px) {
	.tvs-sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; }
}

/* ดูรูป */
.tvs-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 10, .95); }
.tvs-lightbox::backdrop { background: rgba(8, 12, 10, .95); }
.tvs-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.tvs-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tvs-lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tvs-lb-close { top: 12px; right: 12px; }
.tvs-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.tvs-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.tvs-lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; }

/* แถบล่างแบบแอป */
.tvs-bnav { display: none; }
@media (max-width: 760px) {
	body.tvs-page .tv-header, body.tvs-page .tv-en-banner { display: none !important; }
	.tvs-appbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 16px; background: var(--wh); border-bottom: 1px solid var(--ln); }
	.tvs-wrap { padding-top: 0; }
	.tvs-trips .tvs-stories { margin-top: 0; }
	.tvs-bnav { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--wh); border-top: 1px solid var(--ln); }
	.tvs-bnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 50px; justify-content: center; font-size: .75rem; color: var(--mu); text-decoration: none; }
	.tvs-bnav a.is-on { color: var(--k); font-weight: 500; }
	.tvs-bnav-add { width: 60px; height: 44px; border: 0; border-radius: 14px; background: var(--o); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
	body.tvs-page { padding-bottom: 68px; }
	body.admin-bar .tvs-appbar { top: 46px; }
}
@media (max-width: 600px) { body.admin-bar .tvs-appbar { top: 0; } }

/* ---------- หน้าคลิป ---------- */
.tvs-clips-page { position: relative; display: block; width: 100%; background: #0E1613; --vh: calc(100dvh - var(--hh, 62px)); }
.tvs-clipbar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; padding: 14px 12px 24px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.tvs-clipbar > * { pointer-events: auto; }
.tvs-cliptabs { display: flex; gap: 18px; }
.tvs-ct { font-size: 1.05rem !important; position: relative; min-height: 40px; padding: 0 2px; border: 0; background: none; font: inherit; font-size: 1.05rem; font-weight: 400; color: rgba(255, 255, 255, .78); cursor: pointer; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.tvs-ct.is-on { color: #fff; font-weight: 500; }
.tvs-ct.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 3px; border-radius: 2px; background: #fff; }
.tvs-clip-search { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tvs-clipbar .tvs-status { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0, 0, 0, .55); border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.tvs-clipbar .tvs-status:empty { display: none; }
.tvs-clips { height: var(--vh); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.tvs-clips::-webkit-scrollbar { display: none; }
.tvs-clip { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; }
.tvs-clip-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(28px) brightness(.55); }
.tvs-clip-img { position: relative; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.tvs-clip-info { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; background: linear-gradient(transparent, rgba(10, 18, 15, .85) 40%); display: flex; flex-direction: column; gap: 6px; }
.tvs-clip-info .tvs-place { color: #fff; font-size: 1rem; padding-right: 72px; }
.tvs-clip-info .tvs-place svg { color: #fff; }
.tvs-clip-who { margin: 0; font-size: 1.1rem; }
.tvs-clip-who .tvs-name { color: #fff; font-size: 1.15rem; }
.tvs-cap { margin: 0; padding-right: 72px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tvs-clip-card { margin-top: 6px; padding: 12px 14px; border-radius: 16px; background: #fff; color: var(--k); }
.tvs-clip-when { margin: 0 0 8px; font-size: .9rem; color: var(--k2); }
.tvs-clip-card .tvs-chips { margin: 0 0 10px; }
.tvs-clip-go { font-weight: 500; color: var(--o); text-decoration: none; }
.tvs-clip-go:hover { text-decoration: underline; }
.tvs-rail { position: absolute; z-index: 3; right: 8px; bottom: 230px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tvs-rail-av { position: relative; margin-bottom: 8px; }
.tvs-rail-av .tvs-av { width: 54px; height: 54px; border: 2px solid #fff; }
.tvs-rail-follow { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--o); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tvs-rail-btn { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 0; background: none; color: #fff; font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.tvs-rail-btn.is-on[data-like] { color: #FF5A36; }
.tvs-rail-btn.is-on svg { fill: currentColor; }
.tvs-clip-empty { padding: 24px; text-align: center; }
.tvs-clip-empty p, .tvs-clip-empty b { margin: 0 0 10px; color: #fff; }
.tvs-sentinel { height: 1px; }
@media (min-width: 900px) { .tvs-clips { width: 480px; margin: 0 auto; } }
@media (max-width: 760px) {
	.tvs-clips-page { --vh: calc(100dvh - 68px); }
	body.tvs-page-clips .tvs-bnav { background: #0E1613; border-color: #24302C; }
	body.tvs-page-clips .tvs-bnav a { color: #AEB8B4; }
	body.tvs-page-clips .tvs-bnav a.is-on { color: #fff; }
	body.tvs-page-clips { background: #0E1613; }
	body.tvs-page-clips .tv-footer { display: none; }
}

/* ---------- โปรไฟล์ ---------- */
.tvs-wrap-p { position: relative; padding-top: 0; background: var(--wh); }
@media (min-width: 640px) { .tvs-wrap-p { margin-top: 20px; border-radius: 18px; border: 1px solid var(--ln); overflow: hidden; padding-bottom: 20px; } }
.tvs-cover { height: 150px; background: #8FC4C9; overflow: hidden; }
.tvs-cover svg { width: 100%; height: 100%; display: block; }
.tvs-back { position: absolute; top: 12px; left: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(20, 32, 28, .6); color: #fff; display: flex; align-items: center; justify-content: center; }
.tvs-p-head { padding: 0 16px 8px; }
.tvs-p-top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -48px; }
.tvs-p-av { width: 96px; height: 96px; border-radius: 28px; border: 4px solid #fff; background: var(--o-l); color: var(--o-ink); font-size: 2.2rem; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.tvs-p-btns { display: flex; gap: 8px; padding-bottom: 4px; }
.tvs-follow-lg { min-height: 44px; padding: 0 22px; }
.tvs-p-name { margin: 12px 0 2px; font-size: 1.5rem; font-weight: 500; line-height: 1.3; }
.tvs-p-handle { margin: 0; color: var(--mu); }
.tvs-p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 14px; }
.tvs-p-stats div { display: flex; flex-direction: column-reverse; }
.tvs-p-stats dd { margin: 0; font-size: 1.45rem; font-weight: 500; }
.tvs-p-stats dd small { font-size: .95rem; font-weight: 400; color: var(--mu); }
.tvs-p-stats dt { font-size: .85rem; color: var(--mu); }
.tvs-p-prog { padding: 14px; border-radius: 16px; background: var(--bg2); }
.tvs-p-prog-h { display: flex; justify-content: space-between; margin: 0 0 8px; }
.tvs-p-prog-h b:last-child { color: var(--g); }
.tvs-bar { height: 8px; border-radius: 999px; background: #D7DDDA; overflow: hidden; }
.tvs-bar span { display: block; height: 100%; border-radius: 999px; background: var(--g); }
.tvs-p-prog-f { margin: 8px 0 0; font-size: .85rem; color: var(--k2); }
.tvs-p-tabs { display: flex; border-bottom: 1px solid var(--ln); margin-top: 10px; }
.tvs-p-tabs button { font-size: 1rem !important; flex: 1; min-height: 50px; border: 0; background: none; font: inherit; font-weight: 400; color: var(--mu); cursor: pointer; border-bottom: 3px solid transparent; }
.tvs-p-tabs button.is-on { color: var(--k); font-weight: 500; border-color: var(--k); }
.tvs-p-panel { padding: 16px; }
.tvs-p-empty { color: var(--mu); text-align: center; padding: 20px 0; margin: 0; }
.tvs-tgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tvs-tcard a { display: block; border: 1px solid var(--ln); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--k); background: var(--wh); }
.tvs-tcard a:hover { border-color: var(--o); }
.tvs-tcard-img { position: relative; display: block; aspect-ratio: 16 / 9; }
.tvs-tcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvs-tone-terra { background: #C98763; } .tvs-tone-teal { background: #4E9BAE; } .tvs-tone-slate { background: #8E97B3; } .tvs-tone-khaki { background: #B59A6B; }
.tvs-tcard-badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 32, 28, .82); color: #fff; font-size: .78rem; font-weight: 500; }
.tvs-tcard-b { display: flex; flex-direction: column; padding: 10px 12px 12px; }
.tvs-tcard-b b { font-size: 1rem; }
.tvs-tcard-b small { color: var(--mu); font-size: .82rem; }
.tvs-provs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tvs-provs li { padding: 6px 12px; border-radius: 999px; background: var(--g-l); color: var(--g-ink); font-weight: 500; font-size: .9rem; }
.tvs-provs small { font-weight: 400; }
.tvs-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tvs-pgrid .tvs-ph { aspect-ratio: 1; }

/* ===== v0.5 แถบข้างซ้าย/ขวา (จอกว้าง) ===== */
.tvs-layout { display: block; }
.tvs-side { display: none; }
.tvs-box { background: var(--wh); border: 1px solid var(--ln); border-radius: 18px; padding: 16px; }
.tvs-box + .tvs-box, .tvs-snav + .tvs-side-post, .tvs-side-post + .tvs-box, .tvs-me + .tvs-snav, .tvs-join + .tvs-snav, .tvs-box + .tvs-side-foot { margin-top: 12px; }
.tvs-box-h { font-size: 1rem; font-weight: 500; margin: 0 0 10px; color: var(--k); }
.tvs-box p { margin: 0; }

/* ซ้าย */
.tvs-me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; text-decoration: none; color: var(--k); }
.tvs-me:hover { background: var(--wh); }
.tvs-me-t, .tvs-people-t, .tvs-rank-t { display: flex; flex-direction: column; min-width: 0; }
.tvs-me-t b, .tvs-people-t b, .tvs-rank-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-me-t small, .tvs-people-t small, .tvs-rank-t small { color: var(--mu); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-join { background: linear-gradient(160deg, var(--o-l), #fff 70%); }
.tvs-join-h { font-weight: 500; font-size: 1.1rem; margin-bottom: 4px !important; }
.tvs-join p:not(.tvs-join-h) { color: var(--k2); font-size: .9rem; line-height: 1.5; }
.tvs-join .tvs-btn { width: 100%; margin-top: 12px; min-height: 42px; }
.tvs-snav { display: flex; flex-direction: column; gap: 2px; }
.tvs-snav a { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 14px; color: var(--k2); font-weight: 400; text-decoration: none; }
.tvs-snav a:hover { background: var(--wh); color: var(--k); }
.tvs-snav a.is-on { background: var(--wh); color: var(--o); box-shadow: inset 3px 0 0 var(--o); }
.tvs-snav svg { flex-shrink: 0; }
.tvs-side-post { width: 100%; gap: 6px; }
.tvs-collect-n { color: var(--k2); margin: 2px 0 8px !important; }
.tvs-collect-n b { font-size: 1.6rem; color: var(--g); }
.tvs-collect-f { color: var(--mu); font-size: .82rem; line-height: 1.45; margin-top: 8px !important; }

/* ขวา */
.tvs-rank, .tvs-people, .tvs-pchips { list-style: none; margin: 0; padding: 0; }
.tvs-rank li + li, .tvs-people li + li { margin-top: 4px; }
.tvs-rank a { display: flex; align-items: center; gap: 10px; padding: 6px; margin: 0 -6px; border-radius: 12px; color: var(--k); text-decoration: none; }
.tvs-rank a:hover { background: var(--bg2); }
.tvs-rank-n { width: 18px; text-align: center; font-weight: 500; color: var(--o); flex-shrink: 0; }
.tvs-rank-img { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--g-l); color: var(--g); }
.tvs-rank-img img { width: 100%; height: 100%; object-fit: cover; }
.tvs-people li { display: flex; align-items: center; gap: 8px; }
.tvs-people a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; margin-left: -6px; border-radius: 12px; color: var(--k); text-decoration: none; }
.tvs-people a:hover { background: var(--bg2); }
.tvs-people .tvs-av { width: 40px; height: 40px; font-size: 1rem; }
.tvs-follow-sm { min-height: 34px; padding: 0 14px; font-size: .85rem; }
.tvs-pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tvs-pchips li { padding: 6px 12px; border-radius: 999px; background: var(--g-l); color: var(--g-ink); font-size: .88rem; font-weight: 400; }
.tvs-pchips small { color: var(--mu); font-weight: 500; margin-left: 2px; }
.tvs-side-foot { padding: 4px 8px; color: var(--mu); font-size: .8rem; line-height: 1.6; }
.tvs-side-foot p { margin: 0 0 4px; }
.tvs-side-foot a { color: var(--k2); }

@media (min-width: 1000px) {
	.tvs-layout { display: grid; grid-template-columns: minmax(0, 600px) 320px; justify-content: center; gap: 24px; padding: 0 20px; }
	.tvs-side-r { display: block; }
	.tvs-layout > .tvs-wrap { width: 100%; margin: 0; }
	.tvs-side-in { position: sticky; top: 20px; padding: 20px 0 40px; }
	body.admin-bar .tvs-side-in { top: 52px; }
}
@media (min-width: 1280px) {
	.tvs-layout { grid-template-columns: 260px minmax(0, 600px) 320px; gap: 28px; }
	.tvs-side-l { display: block; }
}
.tvs-side { font-size: 15px; line-height: 1.4; }
.tvs-side .tvs-box-h { font-size: 1.02em; }
.tvs-snav a { font-size: 1em; }
.tvs-me-t b, .tvs-people-t b, .tvs-rank-t b { font-size: .95em; font-weight: 500; }
.tvs-me-t small, .tvs-people-t small, .tvs-rank-t small { font-size: .82em; }
.tvs-side .tvs-btn { font-size: 1em; min-height: 44px; }
.tvs-join p:not(.tvs-join-h) { font-size: .9em; }
.tvs-join-h { font-size: 1.12em; }
.tvs-collect-n { font-size: .95em; }
.tvs-collect-n b { font-size: 1.7em; }
.tvs-collect-f, .tvs-side-foot { font-size: .8em; }
.tvs-pchips li { font-size: .88em; }
.tvs-rank-n { font-size: 1.05em; }
.tvs-side .tvs-demo-badge { font-size: .7em; }
.tvs-follow-sm { font-size: .85em; }

/* v0.5.1 แถบข้างในหน้าโปรไฟล์และหน้าคลิป */
.tvs-clip-col { position: relative; min-width: 0; }
@media (min-width: 1000px) {
	.tvs-layout > .tvs-wrap-p { margin: 20px 0 40px; }
	.tvs-layout-clips { grid-template-columns: 480px 300px; gap: 28px; padding: 0 20px; }
	.tvs-layout-clips .tvs-clips { width: 100%; margin: 0; }
	.tvs-clips-page .tvs-side-in { top: 0; max-height: var(--vh); overflow-y: auto; scrollbar-width: none; }
	.tvs-clips-page .tvs-side-in::-webkit-scrollbar { display: none; }
	body.admin-bar .tvs-clips-page .tvs-side-in { top: 0; }
	/* โทนมืดให้เข้ากับหน้าคลิป */
	.tvs-clips-page .tvs-side { color: #E6ECE9; }
	.tvs-clips-page .tvs-box { background: #17221E; border-color: #26342F; }
	.tvs-clips-page .tvs-box-h, .tvs-clips-page .tvs-rank a, .tvs-clips-page .tvs-people a, .tvs-clips-page .tvs-me { color: #F2F5F4; }
	.tvs-clips-page .tvs-me-t small, .tvs-clips-page .tvs-people-t small, .tvs-clips-page .tvs-rank-t small, .tvs-clips-page .tvs-collect-f, .tvs-clips-page .tvs-side-foot { color: #9AA8A2; }
	.tvs-clips-page .tvs-rank a:hover, .tvs-clips-page .tvs-people a:hover, .tvs-clips-page .tvs-me:hover { background: #22302B; }
	.tvs-clips-page .tvs-snav a { color: #C9D2CE; }
	.tvs-clips-page .tvs-snav a:hover { background: #17221E; color: #fff; }
	.tvs-clips-page .tvs-snav a.is-on { background: #17221E; color: #FF7A4D; box-shadow: inset 3px 0 0 #FF7A4D; }
	.tvs-clips-page .tvs-join { background: linear-gradient(160deg, #3A2318, #17221E 70%); }
	.tvs-clips-page .tvs-join p:not(.tvs-join-h) { color: #C9D2CE; }
	.tvs-clips-page .tvs-collect-n { color: #C9D2CE; }
	.tvs-clips-page .tvs-collect-n b { color: #7FD1B0; }
	.tvs-clips-page .tvs-bar { background: #2B3934; }
	.tvs-clips-page .tvs-bar span { background: #7FD1B0; }
	.tvs-clips-page .tvs-pchips li { background: #22302B; color: #DDE6E2; }
	.tvs-clips-page .tvs-pchips small { color: #9AA8A2; }
	.tvs-clips-page .tvs-side-foot a { color: #C9D2CE; }
	.tvs-clips-page .tvs-follow.is-on { background: #22302B; color: #DDE6E2; }
}
@media (min-width: 1280px) {
	.tvs-layout-clips { grid-template-columns: 240px 480px 300px; }
}
/* v0.5.2 ชื่อในแถบข้างหน้าคลิปให้อ่านออกบนพื้นมืด (กันสีลิงก์ของธีม) */
.tvs .tvs-side a b, .tvs .tvs-side a small { text-decoration: none; }
.tvs .tvs-side .tvs-rank a, .tvs .tvs-side .tvs-people a, .tvs .tvs-side .tvs-me { text-decoration: none; }
.tvs .tvs-side .tvs-rank-t b, .tvs .tvs-side .tvs-people-t b, .tvs .tvs-side .tvs-me-t b { color: var(--k); }
.tvs-clips-page .tvs-side .tvs-rank-t b, .tvs-clips-page .tvs-side .tvs-people-t b, .tvs-clips-page .tvs-side .tvs-me-t b { color: #F2F5F4; }
.tvs-rail-av, .tvs-rail-av:hover { text-decoration: none; }
.tvs-rail-av a, .tvs-rail-av a:hover { text-decoration: none; }

/* v0.5.5 แถบแจ้งโปรไฟล์ส่วนตัว */
.tvs-p-private { margin: 0; padding: 10px 16px; background: #FFF3C4; color: #6B4F00; font-size: .92rem; text-align: center; }
.tvs-p-private a { color: var(--o-ink); font-weight: 500; }

/* v0.5.7 หน้าแรก/โปรไฟล์: ไม่มีแถบขวา */
@media (min-width: 1000px) {
	.tvs-layout-noright { grid-template-columns: minmax(0, 600px); }
}
@media (min-width: 1100px) {
	.tvs-layout-noright { grid-template-columns: 260px minmax(0, 600px); gap: 28px; }
	.tvs-layout-noright .tvs-side-l { display: block; }
}

/* v0.5.8 ตัวอักษรเล็กลง บางลง (หน้าฟีด คลิป โปรไฟล์) */
html:has(body.tvs-page) { font-size: 15px; }
.tvs-side { font-size: 14px; }

/* v0.5.9 ฟีดและโปรไฟล์กว้างเต็มจอ */
@media (min-width: 1000px) {
	.tvs-layout-noright { grid-template-columns: minmax(0, 1fr); justify-content: stretch; padding: 0 24px; }
	.tvs-layout-noright > .tvs-wrap { max-width: none; }
	.tvs-layout-noright .tvs-grid { width: 100%; max-height: 640px; }
}
@media (min-width: 1100px) {
	.tvs-layout-noright { grid-template-columns: 260px minmax(0, 1fr); }
}

/* v0.5.11 กว้างเท่าแถบหัวเว็บ (โลโก้ ถึง ปุ่ม EN) */
@media (min-width: 1000px) {
	.tvs-layout-noright { box-sizing: border-box; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
}
