/*
 * 深夜放映廳（theater）改版層
 * 載入順序：style.css → black/white.css → theater.css → 後台自訂 CSS
 * 只在 <html data-mode="dark|light"> 存在時生效（由 public/include.html 設定）。
 * 舊主題的規則仍在，這裡的選擇器一律以 html[data-mode] 開頭，確保優先權。
 */

html[data-mode="dark"] {
	--th-ink: #0E0C11;
	--th-velvet: #16131A;
	--th-seat: #201C25;
	--th-rule: #2C2631;
	--th-bone: #F2ECEF;
	--th-smoke: #9A8F9E;
	--th-neon: #FF2D78;
	--th-neon-hover: #FF4A8B;
	--th-neon-soft: rgba(255, 45, 120, .14);
	--th-gold: #F2C46D;
	--th-gold-light: #FBE2A4;
	--th-gold-deep: #C8923A;
	--th-on-gold: #2A1A05;
	--th-glass: rgba(14, 12, 17, .78);
	--th-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
	--th-glow-opacity: .5;
	color-scheme: dark;
}

html[data-mode="light"] {
	--th-ink: #F6F3F5;
	--th-velvet: #FFFFFF;
	--th-seat: #EFE9EC;
	--th-rule: #E2DADF;
	--th-bone: #1D1820;
	--th-smoke: #6E6372;
	--th-neon: #E0185F;
	--th-neon-hover: #C8124F;
	--th-neon-soft: rgba(224, 24, 95, .1);
	--th-gold: #A86E12;
	--th-gold-light: #FBE2A4;
	--th-gold-deep: #C8923A;
	--th-on-gold: #2A1A05;
	--th-glass: rgba(246, 243, 245, .85);
	--th-shadow: 0 20px 50px -24px rgba(60, 20, 40, .25);
	--th-glow-opacity: .22;
	color-scheme: light;
}

html[data-mode] {
	--th-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	--th-gutter: 32px;
	--th-max: 1760px;
	--th-radius: 14px;
}

/* ---------- 基底與版面 ---------- */

html[data-mode] body {
	background: var(--th-ink);
	color: var(--th-bone);
	font-family: var(--th-font);
	-webkit-font-smoothing: antialiased;
}

html[data-mode] a {
	color: inherit;
}

html[data-mode] :focus-visible {
	outline: 2px solid var(--th-neon);
	outline-offset: 2px;
}

/* 舊主題替左側欄與固定頂部列預留的位移全部歸零 */
html[data-mode] .main,
html[data-mode] .footer {
	margin-left: 0;
	padding: 0 var(--th-gutter);
	min-height: 0;
}

html[data-mode] .main {
	max-width: var(--th-max);
	margin: 0 auto;
	padding-top: 28px;
	padding-bottom: 48px;
}

/* 會員中心的容器原本扣掉側欄寬度 */
html[data-mode] .mxui-part-case.main {
	width: auto;
}

html[data-mode] .homepage::after {
	display: none;
}

html[data-mode] .th-top svg,
html[data-mode] .th-pill svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- 頂部列 ---------- */

html[data-mode] .th-top {
	position: sticky;
	top: 0;
	z-index: 30;
	background: var(--th-glass);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	backdrop-filter: saturate(180%) blur(18px);
	border-bottom: 1px solid var(--th-rule);
}

html[data-mode] .th-top-row {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 64px;
	max-width: var(--th-max);
	margin: 0 auto;
	padding: 0 var(--th-gutter);
}

html[data-mode] .th-logo {
	flex: none;
	display: flex;
	align-items: center;
}

html[data-mode] .th-logo img {
	height: 30px;
	width: auto;
}

/* 分類導覽：沿用 .navbar／.swiper-wrapper，手機版由 script.js 的 Swiper 接手橫向滑動 */
html[data-mode] .th-nav {
	flex: 0 1 auto;
	min-width: 0;
	width: auto;
	overflow-x: auto;
	scrollbar-width: none;
	transition: none;
}

html[data-mode] .th-nav::-webkit-scrollbar {
	display: none;
}

html[data-mode] .th-nav .navbar-items {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 4px;
	width: auto;
	height: auto;
	padding: 0;
}

html[data-mode] .th-nav .navbar-item {
	display: block;
	flex: none;
	width: auto;
	height: auto;
	padding: 0;
	margin: 0;
	line-height: normal;
	background: none;
	box-shadow: none;
	border-radius: 999px;
}

html[data-mode] .th-nav .navbar-item::before,
html[data-mode] .th-nav .navbar-item::after {
	display: none;
}

html[data-mode] .th-nav .navbar-item a {
	display: block;
	width: auto;
	height: auto;
	padding: 7px 13px;
	border-radius: 999px;
	color: var(--th-smoke);
	background: none;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	transition: color .15s ease, background-color .15s ease;
}

html[data-mode] .th-nav .navbar-item a:hover,
html[data-mode] .th-nav .navbar-item.active a {
	color: var(--th-bone);
	background: var(--th-seat);
}

html[data-mode] .th-nav .navbar-item.active a {
	font-weight: 600;
}

html[data-mode] .th-nav-sep {
	flex: none;
	width: 1px !important;
	height: 18px;
	margin: 0 6px;
	background: var(--th-rule);
}

/* 搜尋 */
html[data-mode] .th-search-box {
	position: relative;
	z-index: 2;
	margin-left: auto;
	flex: 0 1 380px;
	min-width: 200px;
}

html[data-mode] .th-search {
	position: relative;
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 4px 0 14px;
	border-radius: 999px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
	transition: border-color .15s ease;
}

html[data-mode] .th-search:focus-within {
	border-color: var(--th-smoke);
}

html[data-mode] .th-search-icon {
	flex: none;
	width: 18px;
	height: 18px;
	color: var(--th-smoke);
}

html[data-mode] .th-search .search-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 10px;
	border: 0;
	outline: none;
	background: none;
	color: var(--th-bone);
	font: inherit;
	font-size: 14px;
}

html[data-mode] .th-search .search-input::placeholder {
	color: var(--th-smoke);
}

html[data-mode] .th-search .search-input::-webkit-search-cancel-button {
	display: none;
}

html[data-mode] .th-search .search-btn {
	flex: none;
	height: 32px;
	padding: 0 14px;
	border-radius: 999px;
	color: var(--th-bone);
	background: var(--th-seat);
	font-size: 13px;
	font-weight: 600;
}

html[data-mode] .th-search .search-btn:hover {
	background: var(--th-rule);
}

html[data-mode] .th-search-hot {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	padding: 14px;
	border-radius: 14px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
	box-shadow: var(--th-shadow);
}

html[data-mode] .th-search:focus-within .th-search-hot {
	display: block;
}

html[data-mode] .th-search-hot strong {
	display: block;
	margin-bottom: 8px;
	color: var(--th-smoke);
	font-size: 12px;
	font-weight: 600;
}

html[data-mode] .th-search-hot .search-tag {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	font-size: 13px;
}

html[data-mode] .th-search-hot .search-tag a {
	margin: 0;
	padding: 4px 12px;
	line-height: 1.5;
	font-size: 13px;
	font-weight: 500;
	border-radius: 999px;
	color: var(--th-bone);
	background: var(--th-seat);
}

html[data-mode] .th-search-hot .search-tag a.hot {
	color: var(--th-neon);
	background: var(--th-neon-soft);
}

/* 右側操作 */
html[data-mode] .th-actions {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
}

html[data-mode] .th-icon-btn {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: var(--th-smoke);
	background: none;
	cursor: pointer;
	transition: color .15s ease, background-color .15s ease;
}

html[data-mode] .th-icon-btn svg {
	width: 20px;
	height: 20px;
}

html[data-mode] .th-icon-btn:hover {
	color: var(--th-bone);
	background: var(--th-seat);
}

html[data-mode] .th-search-toggle {
	display: none;
}

html[data-mode] .th-vip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	color: var(--th-on-gold);
	background: linear-gradient(135deg, var(--th-gold-light), #F2C46D 45%, var(--th-gold-deep));
	box-shadow: 0 6px 18px -8px rgba(242, 196, 109, .7);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: filter .15s ease;
}

html[data-mode] .th-vip-btn:hover {
	color: var(--th-on-gold);
	filter: brightness(1.06);
}

html[data-mode] .th-login {
	height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	color: var(--th-bone);
	background: var(--th-seat);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

html[data-mode] .th-avatar {
	display: block;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	overflow: hidden;
	background: var(--th-seat);
	box-shadow: 0 0 0 1px var(--th-rule);
	cursor: pointer;
}

html[data-mode] .th-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 下拉面板（觀看記錄、會員選單、手機看）：滑鼠移入或鍵盤聚焦時開啟 */
html[data-mode] .th-drop {
	position: relative;
}

html[data-mode] .th-drop-panel {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 40;
	min-width: 180px;
	margin-top: 8px;
	padding: 8px;
	border-radius: 14px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
	box-shadow: var(--th-shadow);
}

/* 面板與按鈕之間的空隙也算在 hover 範圍內，滑鼠移過去時不會關掉 */
html[data-mode] .th-drop-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -10px;
	height: 10px;
}

html[data-mode] .th-drop:hover .th-drop-panel,
html[data-mode] .th-drop:focus-within .th-drop-panel {
	display: block;
}

html[data-mode] .th-drop-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

html[data-mode] .th-member .th-drop-panel li a,
html[data-mode] .th-logout {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--th-bone);
	font-size: 14px;
}

html[data-mode] .th-member .th-drop-panel li a:hover,
html[data-mode] .th-logout:hover {
	background: var(--th-seat);
	color: var(--th-bone);
}

html[data-mode] .th-logout {
	margin-top: 6px;
	border-top: 1px solid var(--th-rule);
	border-radius: 0 0 8px 8px;
	color: var(--th-smoke);
}

/* 觀看記錄：內容由 script.js 的 show_history() 填入 */
html[data-mode] .th-history {
	width: 320px;
}

html[data-mode] .th-history .drop-item {
	position: static;
}

html[data-mode] .th-history .drop-item::after,
html[data-mode] .th-history .drop-item-link::before,
html[data-mode] .th-history .drop-item-link::after {
	display: none;
}

html[data-mode] .th-history .drop-item-title {
	padding: 6px 10px 8px;
}

html[data-mode] .th-history .drop-item-title strong {
	font-size: 13px;
	font-weight: 600;
	color: var(--th-smoke);
}

/* script.js 會多輸出一個「>」文字節點，用 font-size: 0 藏起來 */
html[data-mode] .th-history ul {
	font-size: 0;
}

html[data-mode] .th-history li {
	font-size: 14px;
}

html[data-mode] .th-history .drop-item-link {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	line-height: 1.45;
	font-size: 14px;
	color: var(--th-bone);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html[data-mode] .th-history .drop-item-link:hover {
	background: var(--th-seat);
}

html[data-mode] .th-history .drop-item-link span {
	float: right;
	max-width: none;
	min-width: 0;
	margin-left: 12px;
	color: var(--th-smoke);
	font-size: 12px;
}

html[data-mode] .th-history .drop-prompt {
	padding: 16px 10px;
	color: var(--th-smoke);
	font-size: 13px;
	text-align: center;
}

html[data-mode] .th-history .drop-item-op {
	padding: 6px 0 0;
}

html[data-mode] .th-history .drop-item-op a {
	display: block;
	height: auto;
	padding: 8px;
	line-height: 1.4;
	border-radius: 8px;
	text-align: center;
	color: var(--th-smoke);
	background: var(--th-seat);
	font-size: 13px;
}

html[data-mode] .th-history .drop-item-op a:hover {
	color: var(--th-bone);
	background: var(--th-rule);
}

/* ---------- 影片卡片（全站共用） ---------- */

html[data-mode] .module-poster-item {
	display: block;
}

html[data-mode] .module-poster-item .module-item-cover {
	position: relative;
	padding-top: 56.25%;
	border-radius: 12px;
	overflow: hidden;
	background-color: var(--th-seat);
	box-shadow: none;
}

html[data-mode] .module-poster-item .module-item-cover:hover {
	box-shadow: none;
}

html[data-mode] .module-poster-item .module-item-pic img {
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), filter .3s ease;
}

html[data-mode] .module-poster-item .module-item-cover .module-item-note {
	position: absolute;
	top: 8px;
	left: 8px;
	right: auto;
	bottom: auto;
	z-index: 2;
	margin: 0;
	padding: 2px 7px;
	border-radius: 6px;
	color: #fff;
	background: rgba(0, 0, 0, .55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: .04em;
}

html[data-mode] .module-poster-item .module-item-cover .module-item-note.th-vip,
html[data-mode] .th-badge-vip {
	color: #2A1A05;
	background: linear-gradient(135deg, #FBE2A4, #F2C46D 50%, #C8923A);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	font-weight: 800;
	letter-spacing: .08em;
}

html[data-mode] .th-dur {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	padding: 1px 6px;
	border-radius: 6px;
	color: #fff;
	background: rgba(0, 0, 0, .72);
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
	font-variant-numeric: tabular-nums;
}

html[data-mode] .module-poster-item-info {
	margin: 10px 0 0;
	padding: 0;
}

html[data-mode] .module-poster-item-title {
	color: var(--th-bone);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	text-align: left;
	white-space: normal;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

html[data-mode] .th-card-meta {
	margin-top: 4px;
	color: var(--th-smoke);
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
	html[data-mode] .module-poster-item:hover .module-item-pic img {
		transform: scale(1.06);
		filter: brightness(1.08);
	}
}

/* 卡片列表：舊主題用 inline-block 加負邊距排版，統一改成 grid */
html[data-mode] .module-items.module-poster-items-small,
html[data-mode] .module-items.module-poster-items-base,
html[data-mode] .th-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 28px 18px;
	margin: 0;
	overflow: visible;
}

html[data-mode] .module-items.module-poster-items-small .module-poster-item,
html[data-mode] .module-items.module-poster-items-base .module-poster-item,
html[data-mode] .th-grid .module-poster-item {
	display: block !important;
	width: auto;
	margin: 0;
	background: none;
	box-shadow: none;
	border-radius: 0;
}

html[data-mode] .module-items.module-poster-items-small .module-item-cover,
html[data-mode] .module-items.module-poster-items-base .module-item-cover {
	border-radius: 12px;
}

html[data-mode] .module-items.module-poster-items-small .module-poster-item-info,
html[data-mode] .module-items.module-poster-items-base .module-poster-item-info {
	padding: 0;
	margin: 10px 0 0;
}

/* ---------- 區塊標題、分頁 ---------- */

html[data-mode] .module-title,
html[data-mode] .module-heading-tab-link {
	color: var(--th-bone);
	font-size: 22px;
	font-weight: 600;
}

html[data-mode] .module-title-en {
	display: none;
}

html[data-mode] .module-title a:hover {
	color: var(--th-bone);
}

html[data-mode] .page-link {
	background: var(--th-seat);
	color: var(--th-bone);
	border-radius: 999px;
}

html[data-mode] .page-current,
html[data-mode] .page-current:hover {
	background: var(--th-neon) !important;
	color: #fff !important;
	box-shadow: none;
}

/* ---------- 頁尾與右下角工具列 ---------- */

html[data-mode] .footer {
	padding: 0;
	border-top: 1px solid var(--th-rule);
}

html[data-mode] .footer .content {
	max-width: var(--th-max);
	margin: 0 auto;
	padding: 0 var(--th-gutter);
}

html[data-mode] .footer-content {
	margin: 0;
	padding: 28px 0 40px;
	background: none;
	align-items: center;
}

html[data-mode] .foot-logo img {
	height: 26px;
	width: auto;
	opacity: .8;
}

html[data-mode] .foot-copyright,
html[data-mode] .foot-copyright p,
html[data-mode] .foot-copyright a {
	color: var(--th-smoke);
	font-size: 12px;
}

html[data-mode] .fixedGroup {
	background-color: var(--th-velvet);
	border: 1px solid var(--th-rule);
	border-radius: 12px;
	box-shadow: var(--th-shadow);
}

html[data-mode] .fixedGroup .fixedGroup-item:hover i {
	background-color: var(--th-seat);
}

/* ---------- 播放頁 ---------- */

html[data-mode] .th-watch {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	grid-template-areas: "primary side" "related side";
	align-items: start;
	column-gap: 32px;
	padding-top: 28px;
}

html[data-mode] .th-primary {
	grid-area: primary;
	position: relative;
	z-index: 1;
	min-width: 0;
}

html[data-mode] .th-side {
	grid-area: side;
	position: relative;
	z-index: 1;
	min-width: 0;
}

html[data-mode] .th-related {
	grid-area: related;
	min-width: 0;
}

/* 招牌：播放器後方用封面做模糊光暈 */
html[data-mode] .th-glow {
	position: absolute;
	z-index: 0;
	top: -12px;
	left: var(--th-gutter);
	width: calc(100% - 432px - var(--th-gutter) * 2);
	aspect-ratio: 16 / 9;
	background-position: center;
	background-size: cover;
	filter: blur(80px) saturate(1.6);
	opacity: var(--th-glow-opacity);
	pointer-events: none;
}

html[data-mode] .th-player {
	position: relative;
	border-radius: var(--th-radius);
	overflow: hidden;
	background: #000;
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
}

html[data-mode] .th-player .MacPlayer {
	padding-bottom: 56.25%;
	height: 0;
}

html[data-mode] .th-player .MacPlayer > iframe,
html[data-mode] .th-player .MacPlayer > table,
html[data-mode] .th-player .MacPlayer > div {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

html[data-mode] .th-title {
	margin: 20px 0 0;
	color: var(--th-bone);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .005em;
}

html[data-mode] .th-title span {
	color: var(--th-smoke);
	font-weight: 500;
}

html[data-mode] .th-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin-top: 8px;
	color: var(--th-smoke);
	font-size: 13.5px;
	font-variant-numeric: tabular-nums;
}

html[data-mode] .th-meta b {
	color: var(--th-bone);
	font-weight: 600;
}

html[data-mode] .th-actions-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}

html[data-mode] .th-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 16px;
	border-radius: 999px;
	color: var(--th-bone);
	background: var(--th-seat);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease;
}

html[data-mode] .th-pill:hover {
	color: var(--th-bone);
	background: var(--th-rule);
}

html[data-mode] .th-pill svg {
	width: 18px;
	height: 18px;
}

html[data-mode] .th-pill-main {
	color: #fff;
	background: var(--th-neon);
}

html[data-mode] .th-pill-main:hover {
	color: #fff;
	background: var(--th-neon-hover);
}

html[data-mode] .th-qrcode .th-drop-panel {
	left: 0;
	right: auto;
	padding: 14px;
	text-align: center;
}

html[data-mode] .th-qrcode .drop-qrcode-img {
	padding: 8px;
	border-radius: 8px;
	background: #fff;
	line-height: 0;
}

html[data-mode] .th-qrcode p {
	margin-top: 10px;
	color: var(--th-smoke);
	font-size: 13px;
}

html[data-mode] .th-lines {
	display: flex;
	gap: 4px;
	margin-left: auto;
	padding: 4px;
	border-radius: 999px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
}

html[data-mode] .th-lines a,
html[data-mode] .th-lines span {
	display: block;
	padding: 5px 14px;
	border-radius: 999px;
	color: var(--th-smoke);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

html[data-mode] .th-lines a:hover {
	color: var(--th-bone);
}

html[data-mode] .th-lines .on {
	color: var(--th-bone);
	background: var(--th-seat);
}

html[data-mode] .th-episodes {
	margin-top: 20px;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
}

html[data-mode] .th-episodes-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

html[data-mode] .th-episodes-head h2 {
	font-size: 16px;
	font-weight: 600;
}

html[data-mode] .th-episodes-head small {
	margin-left: 6px;
	color: var(--th-smoke);
	font-size: 13px;
	font-weight: 400;
}

html[data-mode] .th-episodes .module-list {
	height: auto;
	max-height: 240px;
	overflow: auto;
	background: none;
	box-shadow: none;
	border: 0;
}

html[data-mode] .th-episodes .module-play-list-content {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
	padding: 0;
}

html[data-mode] .th-episodes .module-play-list-link {
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0 8px;
	line-height: 36px;
	border-radius: 8px;
	text-align: center;
	color: var(--th-bone);
	background: var(--th-seat) !important;
}

html[data-mode] .th-episodes .module-play-list-link::after {
	display: none;
}

html[data-mode] .th-episodes .module-play-list-link:hover {
	background: var(--th-rule) !important;
	color: var(--th-bone);
}

html[data-mode] .th-episodes .module-play-list-link.active {
	color: #fff;
	background: var(--th-neon) !important;
	font-weight: 600;
}

html[data-mode] .th-text-btn {
	padding: 0;
	color: var(--th-bone);
	background: none;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

html[data-mode] .th-text-btn:hover {
	color: var(--th-neon);
}

html[data-mode] .th-desc {
	margin-top: 18px;
	padding: 16px 18px;
	border-radius: 12px;
	background: var(--th-velvet);
	border: 1px solid var(--th-rule);
}

html[data-mode] .th-desc:empty {
	display: none;
}

html[data-mode] .th-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
}

html[data-mode] .th-tags a {
	color: var(--th-neon);
	font-size: 13.5px;
	font-weight: 500;
}

html[data-mode] .th-tags a:hover {
	text-decoration: underline;
}

html[data-mode] .th-blurb {
	margin: 10px 0 6px;
	color: var(--th-smoke);
	font-size: 14px;
	line-height: 1.75;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

html[data-mode] .th-blurb.open {
	display: block;
}

html[data-mode] .th-widget {
	margin: 24px 0 0;
	border-radius: 12px;
}

/* 接下來播放 */
html[data-mode] .th-side-title {
	margin-bottom: 14px;
	font-size: 16px;
	font-weight: 600;
}

html[data-mode] .th-upnext {
	display: grid;
	gap: 12px;
}

html[data-mode] .th-row {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr);
	gap: 12px;
	margin: -6px;
	padding: 6px;
	border-radius: 12px;
	transition: background-color .15s ease;
}

html[data-mode] .th-row:hover {
	background: var(--th-velvet);
}

html[data-mode] .th-row-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	overflow: hidden;
	background: var(--th-seat);
}

html[data-mode] .th-row-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

html[data-mode] .th-badge-vip {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 1px 6px;
	border-radius: 5px;
	font-size: 10px;
	line-height: 16px;
}

html[data-mode] .th-row .th-dur {
	right: 6px;
	bottom: 6px;
	font-size: 11px;
}

html[data-mode] .th-row-info {
	display: block;
	min-width: 0;
}

html[data-mode] .th-row-title {
	color: var(--th-bone);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

html[data-mode] .th-row-meta {
	display: block;
	margin-top: 4px;
	color: var(--th-smoke);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

html[data-mode] .th-vip-card {
	margin-top: 20px;
	padding: 18px;
	border-radius: 14px;
	background: radial-gradient(120% 140% at 100% 0%, rgba(242, 196, 109, .22), transparent 55%), var(--th-velvet);
	border: 1px solid rgba(242, 196, 109, .3);
}

html[data-mode] .th-vip-card b {
	display: block;
	color: var(--th-gold);
	font-size: 16px;
}

html[data-mode] .th-vip-card p {
	margin-top: 4px;
	color: var(--th-smoke);
	font-size: 13px;
	line-height: 1.6;
}

html[data-mode] .th-vip-card .th-vip-btn {
	display: flex;
	width: 100%;
	height: 40px;
	margin-top: 14px;
}

html[data-mode] .th-sec-title {
	margin: 40px 0 16px;
	font-size: 20px;
	font-weight: 600;
}

/* 舊主題的 .copyright 版權提示 */
html[data-mode] .th-player .MacPlayer.copyright {
	padding-bottom: 56.25%;
}

/* ---------- 響應式 ---------- */

/* 夠寬時分類完整顯示、由搜尋框讓出空間；不夠寬時分類可橫向捲動，右緣淡出提示還有內容 */
@media (min-width: 1360px) {
	html[data-mode] .th-nav {
		flex-shrink: 0;
	}
}

@media (min-width: 1024px) and (max-width: 1359px) {
	html[data-mode] .th-nav {
		-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
		mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
	}
}

@media (max-width: 1279px) {
	html[data-mode] .th-watch {
		grid-template-columns: minmax(0, 1fr) 340px;
		column-gap: 24px;
	}

	html[data-mode] .th-glow {
		width: calc(100% - 364px - var(--th-gutter) * 2);
	}

	html[data-mode] .th-row {
		grid-template-columns: 140px minmax(0, 1fr);
	}

	html[data-mode] .th-search-box {
		flex-basis: 280px;
	}
}

@media (max-width: 1023px) {
	html[data-mode] {
		--th-gutter: 20px;
	}

	/* 平板：分類移到第二行 */
	html[data-mode] .th-top-row {
		flex-wrap: wrap;
		height: auto;
		padding-top: 10px;
		padding-bottom: 0;
		row-gap: 6px;
	}

	html[data-mode] .th-nav {
		order: 3;
		flex: 1 0 100%;
		margin: 0 calc(var(--th-gutter) * -1);
		padding: 0 var(--th-gutter) 8px;
	}

	html[data-mode] .th-watch {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "primary" "side" "related";
	}

	html[data-mode] .th-side {
		margin-top: 32px;
	}

	/* 單欄時清單排在相關推薦前面，只留 6 部避免太長 */
	html[data-mode] .th-row:nth-child(n+7) {
		display: none;
	}

	html[data-mode] .th-glow {
		width: calc(100% - var(--th-gutter) * 2);
		filter: blur(56px) saturate(1.6);
	}

	html[data-mode] .th-row {
		grid-template-columns: 168px minmax(0, 1fr);
	}
}

@media (max-width: 639px) {
	html[data-mode] {
		--th-gutter: 14px;
	}

	html[data-mode] .th-top-row {
		gap: 6px;
		padding-top: 8px;
	}

	html[data-mode] .th-logo img {
		height: 26px;
	}

	html[data-mode] .th-actions {
		margin-left: auto;
		gap: 4px;
	}

	html[data-mode] .th-search-toggle {
		display: grid;
	}

	html[data-mode] .th-search-box {
		display: none;
		order: 2;
		flex: 1 0 100%;
		margin: 2px 0 4px;
	}

	html[data-mode] .th-top.is-search .th-search-box {
		display: block;
	}

	html[data-mode] .th-vip-btn {
		height: 32px;
		padding: 0 12px;
		font-size: 13px;
	}

	html[data-mode] .th-avatar {
		width: 32px;
		height: 32px;
	}

	html[data-mode] .th-history {
		position: fixed;
		top: 56px;
		left: 10px;
		right: 10px;
		width: auto;
	}

	html[data-mode] .th-nav .navbar-item a {
		padding: 6px 12px;
		font-size: 14px;
		background: var(--th-seat);
	}

	html[data-mode] .th-nav .navbar-item.active a {
		color: var(--th-ink);
		background: var(--th-bone);
	}

	html[data-mode] .th-nav-sep {
		display: none;
	}

	html[data-mode] .main {
		padding-top: 16px;
	}

	/* 手機播放頁：播放器滿版 */
	html[data-mode] .th-watch {
		padding-top: 0;
	}

	html[data-mode] .th-player {
		margin: 0 calc(var(--th-gutter) * -1);
		border-radius: 0;
		box-shadow: none;
	}

	html[data-mode] .th-glow {
		top: 0;
		left: 0;
		width: 100%;
		filter: blur(40px) saturate(1.6);
	}

	html[data-mode] .th-title {
		margin-top: 14px;
		font-size: 18px;
	}

	html[data-mode] .th-actions-row {
		flex-wrap: nowrap;
		margin-right: calc(var(--th-gutter) * -1);
		padding-right: var(--th-gutter);
		overflow-x: auto;
		scrollbar-width: none;
	}

	html[data-mode] .th-actions-row::-webkit-scrollbar {
		display: none;
	}

	html[data-mode] .th-pill {
		flex: none;
		height: 36px;
	}

	html[data-mode] .th-lines {
		flex: none;
		margin-left: 0;
	}

	/* 橫向捲動的列裡無法顯示下拉面板，手機看改到詳情頁 */
	html[data-mode] .th-qrcode {
		display: none;
	}

	html[data-mode] .th-row {
		grid-template-columns: 150px minmax(0, 1fr);
	}

	html[data-mode] .module-items.module-poster-items-small,
	html[data-mode] .module-items.module-poster-items-base,
	html[data-mode] .th-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 10px;
	}

	html[data-mode] .module-poster-item-title {
		font-size: 14px;
	}

	html[data-mode] .footer-content {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
}

/* ---------- 減少動態 ---------- */

@media (prefers-reduced-motion: reduce) {
	html[data-mode] .module-poster-item .module-item-pic img,
	html[data-mode] .th-nav .navbar-item a,
	html[data-mode] .th-pill,
	html[data-mode] .th-row,
	html[data-mode] .th-icon-btn {
		transition: none;
	}

	html[data-mode] .module-poster-item:hover .module-item-pic img {
		transform: none;
	}
}
