/* SC-ICG Cixin0711 — 首頁跑馬燈（翻頁式：一次一則、置中、每隔數秒向上翻頁；撕紙邊色帶壓住主視覺） */
.sc-cixin-marquee {
	--scx-u: min(calc(100vw / 1920), 1px);
	--scx-gold: var(--theme-palette-color-2, #BA9A6B);
	--scx-band: var(--theme-palette-color-9, #F5E9DE);
	--scx-edge-h: calc(100vw * 160 / 1920 - 1px); /* 撕紙邊圖 1920×160 依寬度等比的高度 */
	position: relative;
	z-index: 2;
	width: 100vw;
	max-width: 100vw;
	margin: calc(-155 * var(--scx-u)) calc(50% - 50vw) 0;
	padding: calc(106 * var(--scx-u)) 0 calc(39 * var(--scx-u)); /* 文字較設計稿再下移 6px，總高不變 */
	/* 無撕紙邊圖時：整塊實色 */
	background-color: var(--scx-band);
	overflow: hidden;
	font-size: max(0.875rem, calc(18 * var(--scx-u))); /* 基準字級隨視窗縮放（1920 = 18px） */
	line-height: 1.8;
	letter-spacing: 0.1em;
	color: var(--scx-gold);
	text-align: center;
}

/* 有撕紙邊圖：頂端放圖（上緣透明可透出主視覺），圖下方才鋪實色 */
.sc-cixin-marquee.has-edge {
	background-color: transparent;
	background-image: var(--scx-marquee-edge), linear-gradient(to bottom, transparent var(--scx-edge-h), var(--scx-band) var(--scx-edge-h));
	background-repeat: no-repeat, no-repeat;
	background-position: top center, top center;
	background-size: 100% auto, 100% 100%;
}

.sc-cixin-marquee .sc-cixin-marquee__viewport {
	position: relative;
	/* 高度 = 最高的一則（JS 量測後設定），文字可換行、全部顯示 */
	overflow: hidden;
	max-width: calc(1400 * var(--scx-u));
	margin: 0 auto;
	padding: 0 16px;
}

.sc-cixin-marquee .sc-cixin-marquee__list {
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform 2400ms ease; /* 實際時長由 JS data-speed 覆寫 */
	will-change: transform;
}

.sc-cixin-marquee .sc-cixin-marquee__list.is-resetting {
	transition: none;
}

.sc-cixin-marquee .sc-cixin-marquee__item {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

.sc-cixin-marquee .sc-cixin-marquee__text {
	display: block;
	max-width: 100%;
	font-size: 1em;
	color: inherit;
	text-decoration: none;
}

.sc-cixin-marquee a.sc-cixin-marquee__text:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

@media (max-width: 1023px) {
	.sc-cixin-marquee {
		margin-top: -40px;
		padding: 40px 0 24px;
		font-size: 0.875rem;
	}
	.sc-cixin-marquee .sc-cixin-marquee__viewport {
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-cixin-marquee .sc-cixin-marquee__list {
		transition: none;
	}
}
