/* /television (視頻) 2026-11-05 — site style: navy #192f65, gold #f8c623, black-ruled section heads, no pills. */
.sftv { --sftv-navy: #192f65; --sftv-gold: #f8c623; --sftv-ink: #222; --sftv-mut: #6b6f75; --sftv-line: #e3e3e3; color: var(--sftv-ink); }
.sftv .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* live */
.sftv-live { margin: 0 0 28px; }
.sftv-live-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; padding: 12px 0 0; border-top: 3px solid var(--sftv-navy); }
.sftv-h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.3; font-weight: 700; color: var(--sftv-navy); }
.sftv-h1::before { content: ""; display: inline-block; width: 10px; height: 10px; margin: 0 10px 3px 0; background: #d0021b; border-radius: 50%; vertical-align: middle; animation: sftv-blink 2s ease-in-out infinite; }
@keyframes sftv-blink { 50% { opacity: .35; } }
.sftv-tabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sftv-tabs::-webkit-scrollbar { display: none; }
.sftv-tab { flex: 0 0 auto; margin: 0; padding: 8px 14px 10px; font: inherit; font-size: 16px; font-weight: 600; color: #50575e; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.sftv-tab:hover { color: var(--sftv-navy); }
.sftv-tab[aria-selected="true"] { color: var(--sftv-navy); border-bottom-color: var(--sftv-gold); }
.sftv-tab:focus-visible { outline: 2px solid #2271b1; outline-offset: -2px; }
.sftv-live-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; background: #111; }
.sftv-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.sftv-player video { display: block; width: 100%; height: 100%; background: #000; }
.sftv-unmute { position: absolute; left: 14px; top: 14px; padding: 8px 14px; font: inherit; font-size: 15px; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .72); border: 1px solid rgba(255, 255, 255, .5); cursor: pointer; }
.sftv-unmute::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: 8px; border-style: solid; border-width: 6px 9px 6px 0; border-color: transparent #fff transparent transparent; vertical-align: -1px; }
.sftv-unmute:hover { background: var(--sftv-navy); }
.sftv-player-msg { position: absolute; left: 0; right: 0; bottom: 56px; margin: 0 auto; width: max-content; max-width: 90%; padding: 8px 14px; font-size: 15px; color: #fff; background: rgba(0, 0, 0, .78); }
.sftv-sched { display: flex; flex-direction: column; height: 0; min-height: 100%; color: #e8e8e8; background: #1b1d22; }   /* height:0 + min-height:100%: the row is as tall as the 16:9 player, the list scrolls */
.sftv-sched-head { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 16px 8px; border-bottom: 1px solid #33363d; }
.sftv-sched-head h2 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
.sftv-sched-tz { font-size: 13px; color: #9a9ea6; }
.sftv-sched-list { flex: 1 1 auto; min-height: 0; max-height: 100%; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.sftv-sched-item { display: grid; grid-template-columns: 48px 1fr; gap: 0 10px; padding: 9px 16px; font-size: 15px; line-height: 1.45; border-bottom: 1px solid #2a2d33; }
.sftv-sched-item time { color: #9a9ea6; font-variant-numeric: tabular-nums; }
.sftv-sched-item.is-now { background: #262a33; box-shadow: inset 3px 0 0 var(--sftv-gold); }
.sftv-sched-item.is-now time, .sftv-sched-item.is-now .sftv-sched-title { color: #fff; font-weight: 700; }
.sftv-now { grid-column: 2; font-size: 12px; font-weight: 700; color: var(--sftv-gold); }
.sftv-sched-day { padding: 6px 16px; font-size: 13px; font-weight: 700; color: #c9ccd2; background: #23262c; }
.sftv-sched-empty { padding: 16px; font-size: 15px; color: #9a9ea6; }
.sftv-sched-more[hidden] { display: none; }
@media (min-width: 1001px) { .sftv-sched-more { display: none !important; } }
.sftv-sched-full { padding: 10px 16px; font-size: 14px; color: #c9d4f0; text-decoration: none; border-top: 1px solid #33363d; }
.sftv-sched-full:hover { color: #fff; text-decoration: underline; }

/* ads */
.sftv-ad { margin: 0 0 28px; text-align: center; }
.sftv-ad img { display: block; max-width: 100%; height: auto; margin: 0 auto; }

/* columns */
.sftv-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 25px; align-items: start; }   /* same edges as article pages: main ends 25px before the sidebar divider */
.sftv .sftv-side { float: none; width: auto; margin: 0; padding: 0 0 0 15px; box-sizing: border-box; }   /* keeps the theme's dotted divider, content 15px inside it like other pages */

/* programme sections */
.sftv-sec { margin: 0 0 32px; }
.sftv-sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; padding: 10px 0 0; border-top: 2px solid #000; }
.sftv-sec-head h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.sftv-sec-head h2 a { color: #222; text-decoration: none; }
.sftv-sec-head h2 a:hover { color: var(--sftv-navy); text-decoration: underline; }
.sftv-sec-note { font-size: 13px; color: var(--sftv-mut); }
.sftv-more { margin-left: auto; font-size: 14px; color: #50575e; text-decoration: none; white-space: nowrap; }
.sftv-more:hover { color: var(--sftv-navy); text-decoration: underline; }
.sftv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; margin: 0; padding: 0; list-style: none; }
.sftv-card { margin: 0; }
.sftv-card a { display: block; color: var(--sftv-ink); text-decoration: none; }
.sftv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e9eaec; }
.sftv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.sftv-card a:hover .sftv-thumb img { transform: scale(1.04); }
.sftv-play { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; background: rgba(0, 0, 0, .72); border-radius: 50%; }
.sftv-play::after { content: ""; position: absolute; left: 10px; top: 7px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.sftv-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 8px 0 2px; font-size: 16px; font-weight: 600; line-height: 1.45; }
.sftv-card a:hover .sftv-title { color: var(--sftv-navy); text-decoration: underline; }
.sftv-card a:focus-visible { outline: 2px solid #2271b1; outline-offset: 3px; }
.sftv-date { display: block; font-size: 13px; color: var(--sftv-mut); }

/* 節目回顧 */
.sftv-archive { margin: 8px 0 0; padding: 16px 0 0; border-top: 3px solid var(--sftv-navy); }
.sftv-archive-h { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--sftv-navy); }
.sftv-archive-p { margin: 0 0 20px; font-size: 15px; color: var(--sftv-mut); }
.sftv-sec.is-archive .sftv-sec-head h2 { font-size: 18px; }

/* old sidebar-tv headings in the site style */
.sftv-side .subcat_title { margin: 0 0 12px !important; padding: 10px 0 0; font-size: 17px !important; font-weight: 700; color: #333; border-top: 2px solid #000; float: none; }

/* desktop: one row of 4 per programme (9 programmes) so the column ends near the sidebar; phones swipe through all 8 */
@media (min-width: 801px) { .sftv-sec .sftv-card:nth-child(n+5) { display: none; } }

@media (max-width: 1000px) {
	.sftv-live-body { grid-template-columns: minmax(0, 1fr); }
	.sftv-sched { height: auto; min-height: 0; }
	/* phones/tablets: no scroll box inside the page (a swipe on it scrolled the list instead of the page);
	   show the next programmes and a button for the rest */
	.sftv-sched-list { max-height: none; overflow: visible; }
	.sftv-sched:not(.is-all) .sftv-sched-list > li:nth-child(n+7) { display: none; }
	.sftv-sched-more:not([hidden]) { display: block; width: 100%; padding: 12px 16px; font: inherit; font-size: 15px; font-weight: 600; color: #c9d4f0; text-align: left; background: #23262c; border: 0; border-top: 1px solid #33363d; cursor: pointer; }
	.sftv-sched-more::after { content: " ▾"; }
	.sftv-sched.is-all .sftv-sched-more::after { content: " ▴"; }
	.sftv-sched-more:focus-visible { outline: 2px solid #f8c623; outline-offset: -2px; }
	.sftv-cols { grid-template-columns: minmax(0, 1fr); }
	.sftv .sftv-side { margin-top: 12px; padding: 0; border-left: 0; }
}
@media (max-width: 800px) {
	.sftv-h1 { font-size: 22px; }
	.sftv-live-head { align-items: stretch; flex-direction: column; gap: 0; }
	.sftv-h1 { margin-bottom: 4px; }
	.sftv-tabs { margin: 0 -15px; padding: 0 15px; border-bottom: 1px solid var(--sftv-line); }
	.sftv-live-body { margin: 0 -15px; }
	.sftv-sched-item { font-size: 16px; }
	.sftv-sec-head h2 { font-size: 20px; }
	/* phones: one swipeable row per programme */
	.sftv-grid { display: flex; gap: 12px; margin: 0 -15px; padding: 0 15px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 15px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.sftv-grid::-webkit-scrollbar { display: none; }
	.sftv-card { flex: 0 0 68%; scroll-snap-align: start; }
	.sftv-title { font-size: 17px; }
	.sftv-date { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .sftv-h1::before { animation: none; } .sftv-thumb img { transition: none; } }

/* thumbnails are never cropped: includes/sf-thumb-fit.php (site-wide) */

/* video programme category pages (category-video.php) */
.sfvcat-head { margin-bottom: 24px; }
.sfvcat-note { margin: 8px 0 0; font-size: 15px; color: #8a5a00; }
.sfvcat-tabs { display: flex; gap: 0 4px; margin: 14px 0 -18px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sfvcat-tabs::-webkit-scrollbar { display: none; }
.sfvcat-tabs a { flex: 0 0 auto; padding: 8px 12px 10px; font-size: 16px; font-weight: 600; color: #50575e; text-decoration: none; border-bottom: 3px solid transparent; }
.sfvcat-tabs a:first-child { padding-left: 0; }
.sfvcat-tabs a:hover { color: #192f65; }
.sfvcat-tabs a[aria-current="page"] { color: #192f65; border-bottom-color: #f8c623; }
.sfvcat-tabs a:focus-visible { outline: 2px solid #2271b1; outline-offset: -2px; }
.sfvcat .sftv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
.sfvcat .sftv-title { font-size: 17px; }
.sfvcat-pager { margin: 28px 0 8px; }
@media (max-width: 800px) {
	.sft-head.sfvcat-head { margin-bottom: 18px; }
	.sfvcat-tabs { margin: 12px -15px -18px; padding: 0 15px; }
	.sfvcat .sftv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; margin: 0; padding: 0; overflow: visible; }
	.sfvcat .sftv-card { flex: none; }
	.sfvcat .sftv-title { font-size: 16px; -webkit-line-clamp: 3; }
}
