/*
Theme Name: Site 13 Daylight Showcase (Flatsome Child)
Description: site-13 daylight-game-showcase 設計系統移植到 Flatsome。版面在 UX Builder 編輯,設計 token 與元件樣式留在本檔。
Author: vn-site-template
Template: flatsome
Version: 0.8.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: site-13-flatsome-child
*/

/* ══════════════════════════════════════════════════════════════════
   Site 13 · Daylight Card Room — Flatsome port
   ------------------------------------------------------------------
   規則沒有改變,只是換了掛載點:
     Gutenberg              →  Flatsome / UX Builder
     .wp-block-columns      →  .row
     .wp-block-column       →  .col  (外層,負責 gutter)
     —                      →  .col-inner  (內層,負責卡片外觀)
     var(--wp--preset--*)   →  var(--s13-*)
   色值單一事實來源仍是 repo 根目錄的 palettes.json。
   ══════════════════════════════════════════════════════════════════ */

/* ── 1a. 原始 token ────────────────────────────────────────────────
   預設(紅金)寫在這裡;另外 7 組配色由 sync-palettes.py 產生到
   assets/css/palettes.css,靠 <body> 上的 .s13-palette-* class 覆寫。
   這一層只放「字面色值」,不放任何 var() 引用 — 理由見 1b。 */
:root {
	--s13-primary: #c8102e;
	--s13-secondary: #e0cfa0;
	--s13-accent: #faf2e0;
	--s13-surface: #ffffff;
	--s13-text: #1a1012;
	--s13-highlight: #c8961e;

	/* FSE 版有兩處寫死淺底假設,style variation 的 JSON 蓋不掉(見 DESIGN.md
	   「深底那套的兩個已知限制」)。移植時把它們也變成 token,深底配色就能
	   一起翻,限制在這個版本消失。 */
	--s13-hover-mix: black;                    /* 主按鈕 hover 的混色方向 */
	--s13-bar-shadow: rgba(0, 0, 0, .12);      /* 手機底欄陰影 */

	--s13-gutter: clamp(1.25rem, 4vw, 3rem);   /* 與配色無關,不會被覆寫 */

	/* z-index 級距。原本散落 9999 / 10000 這種任意值,新增元件時只能
	   往上加碼。集中成三層之後,層級關係在這裡一眼看得完。 */
	--s13-z-sticky: 100;    /* sticky header 之類 */
	--s13-z-mobile-cta: 200; /* 手機底部 CTA,必須蓋過內容但低於跳過連結 */
	--s13-z-skip: 300;      /* skip-link,鍵盤使用者的第一個焦點,永遠最上層 */
}

/* ── 1b. 衍生 token ────────────────────────────────────────────────
   必須宣告在 body,不能放 :root。
   自訂屬性裡的 var() 是在「宣告它的那個元素」上完成代換的:寫在 :root
   的話,--s13-muted 會在 :root 就被算成紅金那組的 text 色並向下繼承,
   之後 body.s13-palette-navy 改掉 --s13-text 也救不回來,切配色時
   灰字與線條會留在舊配色。宣告在 body 就跟覆寫落在同一個元素上。
   --wp--preset--color--* 是相容別名:demo/ 的靜態 HTML、舊 pattern 貼進
   UX Builder 的 HTML 區塊,都還在用那組變數名,留著可以直接沿用。 */
body {
	--s13-muted: color-mix(in srgb, var(--s13-text) 62%, transparent);
	--s13-hairline: 1px solid var(--s13-secondary);

	--wp--preset--color--primary: var(--s13-primary);
	--wp--preset--color--secondary: var(--s13-secondary);
	--wp--preset--color--accent: var(--s13-accent);
	--wp--preset--color--surface: var(--s13-surface);
	--wp--preset--color--text: var(--s13-text);
	--wp--preset--color--highlight: var(--s13-highlight);
}

/* ── 2. 基底 ───────────────────────────────────────────────────────*/
body {
	background: var(--s13-surface);
	color: var(--s13-text);
}
h1, h2, h3, h4,
.site-13-kicker,
.site-13-step-number {
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--s13-text);
}

/* ── 2b. 字型優先權 ────────────────────────────────────────────────
   Flatsome 的 Customizer 排版設定輸出成 <style id="custom-css">,那是 head
   裡的 inline style,永遠排在本檔(外部 stylesheet)之後,同權重下它贏。
   它宣告的是 `body` 與 `h1,h2,...,.heading-font`,預設 Lato。

   後果不只是「字型不對」:Lato 沒有越南文字集,瀏覽器只好把 U+1ED7 這類
   預組字元拆成 base + 組合符號分開畫,整頁聲調跑位 ——「Mỗi」變「Môĩ」、
   「một」變「moṭ」。ae888uytin.com 上實測確認。

   所以這裡一律加 html 前綴把權重拉高一級,壓過那組 inline 規則。
   不走「請業主在 Customizer 選字型」那條路,因為七個站逐一手設不可靠,
   而且字型是設計契約的一部分,應該跟著 code 走而不是跟著 DB 走。 */
html body,
html button, html input, html select, html textarea {
	font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
html h1, html h2, html h3, html h4, html h5, html h6,
html .heading-font,
html .site-13-kicker,
html .site-13-step-number {
	font-family: 'Archivo', system-ui, sans-serif;
}
html .nav > li > a {
	font-family: 'Be Vietnam Pro', system-ui, sans-serif;
}
a { color: var(--s13-primary); }
.site-13-muted { color: var(--s13-muted); }

/* Flatsome 預設站寬 1080px。本設計要 1320px:
   Customizer → Layout → Site width 設 1320,這裡只處理手寫 HTML 的情況。 */
.site-13-shell {
	max-width: 1320px;
	margin-inline: auto;
	padding-inline: var(--s13-gutter);
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: var(--s13-z-skip); padding: .75rem 1rem; background: var(--s13-surface); color: var(--s13-text); }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ── 3. header / footer ────────────────────────────────────────────
   Flatsome Header Builder 產生 #header / .header-main;
   排列(logo、選單、CTA 的位置)在 Customizer 拖拉,這裡只給外觀。 */
#header .header-main,
.footer-wrapper .footer {
	background: var(--s13-surface);
}
#header .header-main { border-bottom: var(--s13-hairline); }
#header.stuck .header-main { box-shadow: 0 2px 12px color-mix(in srgb, var(--s13-text) 8%, transparent); }
.footer-wrapper .footer { border-top: var(--s13-hairline); }

#header .nav > li > a {
	color: var(--s13-text);
	font-family: 'Be Vietnam Pro', system-ui, sans-serif;
	font-weight: 600;
}
#header .nav > li > a:hover,
#header .nav > li.active > a { color: var(--s13-primary); }
#header .nav-line-bottom > li > a:before,
#header .nav-line > li > a:before { background: var(--s13-primary); }

/* ── 3b. Header 選單:完整標題、單行、不跑版 ───────────────────────
   選單顯示的是頁面**完整標題**(functions.php 的 wp_setup_nav_menu_item
   filter),長度不可控 —— AE888 那頁的標題就有 70 個字。

   實測 1477px 視窗:選單可用 883px、完整標題佔 549px,今天塞得下。
   但頁面一多就會換行,而 Flatsome 的 header-main 是固定高度的單列,
   換行會直接把 header 撐爆。三道防線:

     1. nowrap        — 標題本身永不斷行
     2. flex-wrap:nowrap — 選單列永不折成第二行
     3. overflow-x    — 真的塞不下時改成橫向捲動,不撐爆 header

   min-width:0 是必要的:flex item 預設 min-width:auto,不加的話 overflow
   不會生效,子項會反過來把容器推寬。用 :has() 選欄位比猜 Flatsome 的
   class 名穩,不支援時只是少了第 3 道防線,前兩道仍有效。 */
#header .header-nav-main { flex-wrap: nowrap; }
#header .header-nav-main > li > a { white-space: nowrap; }
#header .flex-col:has(> .header-nav-main) {
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
#header .flex-col:has(> .header-nav-main)::-webkit-scrollbar { display: none; }

/* ── 4. CTA 契約 ───────────────────────────────────────────────────
   .troy-cta 由 [troy_theme_cta] shortcode 輸出,四個版位共用同一組
   Theme Settings URL。直角 2px + 紅色 focus 光暈是本 Theme 的簽名。 */
.troy-cta-group { display: flex; flex-wrap: wrap; gap: .625rem; align-items: center; }
.troy-cta {
	box-sizing: border-box;               /* 契約基底是 content-box,44px 會算成 67px */
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: .65rem 1rem;
	border: 1px solid currentColor; border-radius: 2px;
	font-family: 'Be Vietnam Pro', system-ui, sans-serif;
	font-weight: 700; text-decoration: none; line-height: 1.2;
}
.troy-cta--register {
	background: var(--s13-primary);
	color: var(--s13-surface);
	border-color: var(--s13-primary);
}
.troy-cta--register:hover {
	background: color-mix(in srgb, var(--s13-primary) 86%, var(--s13-hover-mix));
	color: var(--s13-surface);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--s13-primary) 26%, transparent);
}
/* login 是金色描邊 + 深色字。金在白底只有 2.7:1,永遠不承載文字。 */
.troy-cta--login { background: transparent; color: var(--s13-text); border-color: var(--s13-highlight); }
.troy-cta--login:hover { border-color: var(--s13-text); background: color-mix(in srgb, var(--s13-highlight) 16%, transparent); }
.troy-cta:focus-visible { outline: 2px solid var(--s13-primary); outline-offset: 3px; }

/* header 內 register 降級為描邊:同一視口不出現兩顆紅色實心。 */
.troy-cta-group--header { flex-wrap: nowrap; gap: .5rem; }
.troy-cta-group--header .troy-cta { padding-inline: .85rem; font-size: .9rem; white-space: nowrap; }
.troy-cta-group--header .troy-cta--register {
	background: transparent; color: var(--s13-primary);
	border-color: var(--s13-primary); box-shadow: none;
}
.troy-cta-group--header .troy-cta--register:hover {
	background: color-mix(in srgb, var(--s13-primary) 8%, transparent);
	color: var(--s13-primary);
}

/* UX Builder 原生 [button] 也吃同一套色彩紀律,避免業主自己拉的按鈕跑掉。 */
.button.primary:not(.is-outline) {
	background-color: var(--s13-primary);
	border-color: var(--s13-primary);
	color: var(--s13-surface);
	border-radius: 2px;
}
.button.secondary:not(.is-outline) {
	background-color: transparent;
	border-color: var(--s13-highlight);
	color: var(--s13-text);
	border-radius: 2px;
}
.button.is-outline { border-radius: 2px; }

/* ── 5. 手機底部 CTA ───────────────────────────────────────────────
   Flatsome 沒有等價功能,維持自幹。由 inc/theme-settings.php 掛在
   wp_footer 輸出,只在有設定 CTA URL 時才出現;清空間距的 padding
   跟著 body.has-mobile-cta 走,否則每頁都多一塊死空間。 */
.troy-cta-group--mobile { display: none; }
body { padding-bottom: 0; }
@media (max-width: 849px) {
	.troy-cta-group--header { display: none; }
	.troy-cta-group--mobile {
		position: fixed; z-index: var(--s13-z-mobile-cta); right: 0; bottom: 0; left: 0;
		display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
		padding: .625rem max(.75rem, env(safe-area-inset-right))
		         calc(.625rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
		background: var(--s13-accent);
		box-shadow: 0 -4px 18px var(--s13-bar-shadow);
	}
	body.has-mobile-cta { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ── 6. kicker + 區段標題 ──────────────────────────────────────────
   用法:UX Builder → Text 區塊,Class 欄填 site-13-kicker。 */
.site-13-kicker {
	display: inline-block; margin-bottom: .5rem;
	color: var(--s13-primary);
	font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.site-13-section-heading {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 1rem; flex-wrap: wrap;
	border-bottom: var(--s13-hairline);
	padding-bottom: .75rem; margin-bottom: 1.75rem;
}
.site-13-section-heading h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.site-13-section-heading p { margin: 0; font-size: .85rem; }
/* 區段標題的連結走 --text,不跟 CTA 搶眼睛。 */
.site-13-section-heading a,
.site-13-banner-body p:last-child a { color: var(--s13-text); font-weight: 600; }
.site-13-section-heading a:hover,
.site-13-banner-body p:last-child a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 7. hero ───────────────────────────────────────────────────────*/
.site-13-hero { padding-block: clamp(2rem, 5vw, 3.5rem); }
.site-13-hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.06; margin: .25rem 0 .85rem; }
.site-13-hero-desc { max-width: 34rem; font-size: 1.05rem; }

/* ── 8. banner 版位 A:頂部 4:1 全寬 ───────────────────────────────
   UX Builder → Section(Class: site-13-banner-hero),內放一張 Image。
   未上稿顯示佔位底紋,:has(img) 上稿後自動移除提示字,避免 CLS。 */
.site-13-banner-hero {
	position: relative; overflow: hidden;
	aspect-ratio: 4 / 1; min-height: 170px;
	display: grid; place-items: center;
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--s13-text) 6%, transparent) 0 1px, transparent 1px 13px),
		linear-gradient(160deg, color-mix(in srgb, var(--s13-highlight) 22%, transparent), transparent 60%),
		var(--s13-accent);
	border-bottom: 2px solid var(--s13-highlight);
}
.site-13-banner-hero::after {
	content: 'Banner ngang · 4:1 · chủ site tải ảnh lên trong UX Builder';
	font-size: .82rem; letter-spacing: .06em; text-align: center; padding-inline: 1rem;
	color: var(--s13-muted);
}
.site-13-banner-hero:has(img)::after { content: none; }
.site-13-banner-hero .section-content,
.site-13-banner-hero .row,
.site-13-banner-hero .col,
.site-13-banner-hero .col-inner,
.site-13-banner-hero .img,
.site-13-banner-hero figure { margin: 0; padding: 0; width: 100%; height: 100%; }
.site-13-banner-hero img { width: 100%; height: 100%; object-fit: cover; }

/* ── 9. banner 版位 B:促銷帶橫向輪播(21:9) ──────────────────────
   純 CSS。scroll-snap 全瀏覽器支援;紅色進度條走 scroll-driven
   animation,不支援的瀏覽器退化為靜態提示條,不是壞掉。 */
.site-13-banner-scroller { position: relative; timeline-scope: --banner-rail; }
.site-13-banner-rail {
	display: flex; flex-wrap: nowrap !important;
	gap: 1rem;
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-timeline: --banner-rail x;
	padding-bottom: .1rem; scrollbar-width: none;
}
.site-13-banner-rail::-webkit-scrollbar { display: none; }
.site-13-banner-rail > .col {
	flex: 0 0 clamp(260px, 80%, 560px) !important;
	max-width: none !important;
	scroll-snap-align: start;
	padding: 0 !important;
}
.site-13-banner-rail > .col > .col-inner {
	background: var(--s13-accent);
	border: var(--s13-hairline);
	overflow: hidden;
	height: 100%;
	display: flex; flex-direction: column;
	transition: border-color .15s ease, transform .15s ease;
}
.site-13-banner-rail > .col > .col-inner:hover,
.site-13-banner-rail > .col > .col-inner:focus-within {
	border-color: var(--s13-text); transform: translateY(-3px);
}
.site-13-banner-track {
	height: 3px; margin-top: .8rem; border-radius: 999px;
	background: color-mix(in srgb, var(--s13-text) 8%, transparent);
	overflow: hidden;
}
.site-13-banner-track span {
	display: block; height: 100%; width: 42%;
	border-radius: 999px; background: var(--s13-primary);
}
@supports (animation-timeline: scroll()) {
	.site-13-banner-track span {
		width: 32%;
		animation: site-13-rail-progress linear both;
		animation-timeline: --banner-rail;
	}
	@keyframes site-13-rail-progress { to { transform: translateX(212%); } }
}

.site-13-banner-art {
	position: relative; aspect-ratio: 21 / 9;
	display: grid; place-items: center; overflow: hidden;
	border-bottom: var(--s13-hairline);
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--s13-text) 6%, transparent) 0 1px, transparent 1px 11px),
		linear-gradient(160deg, color-mix(in srgb, var(--s13-highlight) 18%, transparent), transparent 62%),
		var(--s13-surface);
}
.site-13-banner-art::after {
	content: 'Vị trí banner · 21:9';
	font-size: .7rem; letter-spacing: .06em; color: var(--s13-muted);
}
.site-13-banner-art:has(img)::after { content: none; }
.site-13-banner-art .img, .site-13-banner-art figure { margin: 0; width: 100%; height: 100%; }
.site-13-banner-art img { width: 100%; height: 100%; object-fit: cover; }

.site-13-banner-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.site-13-banner-body h3 { font-size: 1.05rem; margin: 0; }
.site-13-banner-body p { margin: 0; font-size: .85rem; color: var(--s13-muted); }
.site-13-banner-body p:last-child { margin-top: auto; padding-top: .5rem; }

/* ── 10. banner 版位 C:文內帶(3:2) ───────────────────────────────*/
.site-13-inline-band {
	max-width: 760px; margin-inline: auto;
	background: var(--s13-accent);
	border: var(--s13-hairline);
	padding: 1.25rem;
	margin-block: 2rem;
}
.site-13-banner-inline { gap: 1.1rem; margin-bottom: 1rem; }
.site-13-banner-inline > .col { padding: 0 !important; }
.site-13-banner-inline h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.site-13-banner-inline p { margin: 0; font-size: .9rem; color: var(--s13-muted); }
.site-13-banner-inline-art {
	position: relative; aspect-ratio: 3 / 2;
	display: grid; place-items: center; overflow: hidden;
	border: var(--s13-hairline);
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--s13-text) 6%, transparent) 0 1px, transparent 1px 11px),
		linear-gradient(160deg, color-mix(in srgb, var(--s13-highlight) 18%, transparent), transparent 62%),
		var(--s13-surface);
}
.site-13-banner-inline-art::after {
	content: 'Banner trong bài · 3:2';
	font-size: .68rem; letter-spacing: .06em; color: var(--s13-muted);
}
.site-13-banner-inline-art:has(img)::after { content: none; }
.site-13-banner-inline-art .img, .site-13-banner-inline-art figure { margin: 0; width: 100%; height: 100%; }
.site-13-banner-inline-art img { width: 100%; height: 100%; object-fit: cover; }

/* ── 11. 精選遊戲列(16:10 縮圖,4 格) ────────────────────────────*/
.site-13-featured > .col { padding: 0 .4rem .8rem !important; }
.site-13-featured > .col > .col-inner {
	position: relative; height: 100%;
	background: var(--s13-accent);
	border: var(--s13-hairline);
	padding: .55rem .65rem;
	font-size: .82rem; line-height: 1.35;
	transition: border-color .15s ease, transform .15s ease;
}
.site-13-featured > .col > .col-inner:hover,
.site-13-featured > .col > .col-inner:focus-within {
	border-color: var(--s13-text); transform: translateY(-3px);
}
.site-13-featured p { margin: 0; }
.site-13-rail-thumb {
	display: grid; place-items: center;
	aspect-ratio: 16 / 10; margin-bottom: .4rem;
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--s13-text) 6%, transparent) 0 1px, transparent 1px 9px),
		var(--s13-surface);
	border: var(--s13-hairline);
	font-size: .62rem; letter-spacing: .06em; color: var(--s13-muted);
}
.site-13-rail-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── 12. 分類 tile ─────────────────────────────────────────────────*/
.site-13-grid > .col { padding: 0 .5rem 1rem !important; }
.site-13-grid > .col > .col-inner {
	position: relative; height: 100%;
	background: var(--s13-accent);
	border: var(--s13-hairline);
	padding: 1.35rem;
	text-align: center;
	transition: border-color .15s ease, transform .15s ease;
}
.site-13-grid > .col > .col-inner:hover,
.site-13-grid > .col > .col-inner:focus-within {
	border-color: var(--s13-text); transform: translateY(-3px);
}
.site-13-grid h3 { font-size: 1rem; margin: .6rem 0 .25rem; }
.site-13-grid p { font-size: .82rem; margin: 0; color: var(--s13-muted); }
.site-13-feature-icon { display: inline-flex; color: var(--s13-text); }

/* 整格可點:hover 的位移與換色等於承諾一個目的地,所以整塊都要能點。 */
.site-13-grid h3 a,
.site-13-featured p a { color: inherit; text-decoration: none; }
.site-13-grid h3 a::after,
.site-13-featured p a::after { content: ''; position: absolute; inset: 0; }
.site-13-grid h3 a:focus-visible,
.site-13-featured p a:focus-visible { outline: 2px solid var(--s13-primary); outline-offset: 3px; }

/* ── 13. 3:4 海報卡 — 本 Theme 的卡片簽名 ─────────────────────────*/
.site-13-poster-grid > .col { padding: 0 .5rem 1rem !important; }
.site-13-poster-grid > .col > .col-inner {
	height: 100%;
	background: var(--s13-accent);
	border: var(--s13-hairline);
	padding: 0;
	overflow: hidden;
	transition: border-color .15s ease, transform .15s ease;
}
.site-13-poster-grid > .col > .col-inner:hover,
.site-13-poster-grid > .col > .col-inner:focus-within {
	border-color: var(--s13-primary); transform: translateY(-3px);
}
.site-13-poster-art {
	aspect-ratio: 3 / 4;
	display: grid; place-items: center; overflow: hidden;
	background:
		repeating-linear-gradient(135deg, color-mix(in srgb, var(--s13-text) 6%, transparent) 0 1px, transparent 1px 11px),
		linear-gradient(160deg, color-mix(in srgb, var(--s13-highlight) 20%, transparent), transparent 62%),
		var(--s13-accent);
	border-bottom: var(--s13-hairline);
	font-size: .72rem; letter-spacing: .06em; color: var(--s13-muted);
}
.site-13-poster-art img { width: 100%; height: 100%; object-fit: cover; }
.site-13-poster-body { padding: .8rem .9rem 1rem; }
.site-13-poster-body h3 { font-size: .98rem; margin: 0 0 .3rem; }
.site-13-poster-body p { font-size: .8rem; margin: 0; color: var(--s13-muted); }
.site-13-badge {
	display: inline-block; margin-bottom: .45rem;
	border: var(--s13-hairline); color: var(--s13-text);
	font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	padding: .18rem .5rem;
}

/* ── 14. 三步驟 ────────────────────────────────────────────────────*/
.site-13-steps > .col > .col-inner { border-top: var(--s13-hairline); padding-top: 1rem; }
.site-13-step-number {
	font-size: 1.9rem; margin: 0 0 .25rem;
	color: color-mix(in srgb, var(--s13-text) 55%, transparent);
}

/* ── 15. 卡片 / 文章列表 ───────────────────────────────────────────*/
.site-13-card { background: var(--s13-accent); border: var(--s13-hairline); padding: 1.25rem; }
.post-item .box-text .post-title,
.post-item .box-text .post-title a { color: var(--s13-text); text-decoration: none; }
.post-item .box-text .post-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-item .box-text { padding-top: .75rem; }

/* ── 16. 麵包屑 ────────────────────────────────────────────────────*/
.site-13-theme-breadcrumb {
	font-size: .8rem; padding-block: .85rem; padding-inline: var(--s13-gutter);
	border-bottom: var(--s13-hairline);
}
.site-13-theme-breadcrumb a { color: inherit; text-decoration: none; }
.site-13-theme-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-13-theme-breadcrumb [aria-current="page"] { color: var(--s13-primary); font-weight: 700; }
/* 由 the_content filter 輸出時,麵包屑落在 .col-inner 內,外層已經有站寬
   的 padding,這裡不能再吃一次 gutter,否則會多縮一層。 */
.page-wrapper .site-13-theme-breadcrumb {
	padding-inline: 0;
	margin-bottom: 1.25rem;
	max-width: none;
}

/* ── 16b. 內頁正文的可讀行長 ───────────────────────────────────────
   Flatsome 的 page.php / single.php 輸出
       main > .page-wrapper > .row-main > .col > .col-inner
   這條鏈只負責站寬(1320px),**沒有任何 measure 限制**。內文因此一行
   會拉到 150 字元以上 —— 實測 ae888uytin.com/?page_id=19 最長段落
   327 字元、整段跑滿 1320px。

   FSE 版靠 theme.json 的 contentSize:760px 處理這件事,Flatsome 沒有等價物。

   ⚠ 夾的是**容器**並置中,不是個別元素。0.7.6 一度只夾了 p 與 h2,結果
   段落 649px 靠左躺在 1290px 的容器裡,右邊開一個 640px 的洞 —— 那個
   才是使用者回報的「跑版」。夾容器才會置中。

   ⚠ 首頁也走同一條 .col-inner,而且 11 個 UX Builder section 全在裡面。
   無條件夾會把整個首頁壓成一欄。用 :has() 排除:內容裡有 .section 的
   (UX Builder 版面)維持全寬,只有純文章頁吃這個 measure。
   :has() 不支援時整條選擇器失效 → 退回全寬,不會壞版。 */
.page-wrapper .row-main > .col > .col-inner:not(:has(> .section)) {
	max-width: 680px;
	margin-inline: auto;
}

/* ── 17. 結尾 CTA 帶 ───────────────────────────────────────────────*/
.site-13-final-band {
	background: var(--s13-accent);
	border: var(--s13-hairline);
	padding: clamp(2rem, 6vw, 3.25rem);
	text-align: center;
}
.site-13-final-band .troy-cta-group { justify-content: center; }

/* ── 18. FAQ ───────────────────────────────────────────────────────
   支援兩種寫法:UX Builder 的 [accordion],或手寫 <details>。 */
.site-13-faq .accordion-item,
.site-13-faq details { border-top: var(--s13-hairline); padding-block: .9rem; }
.site-13-faq .accordion-title,
.site-13-faq summary {
	cursor: pointer; border: 0; padding: 0;
	font-family: 'Archivo', system-ui, sans-serif; font-weight: 700;
	color: var(--s13-text);
}
.site-13-faq .accordion-title:hover { color: var(--s13-primary); background: transparent; }
.site-13-faq .accordion-inner { padding: .6rem 0 0; }

/* ── 18b. 互動與排版收尾 ───────────────────────────────────────────
   本區是 /redesign-existing-projects 稽核補上的四個缺口,都不動設計系統。 */

/* 觸壓回饋:CTA 按下去要有實體感。位移只有 1px,不影響 44px 觸控目標。 */
.troy-cta:active,
.button:active { transform: translateY(1px); }

/* 錨點平滑捲動。header 選單的四個錨點原本是硬跳,配合既有的
   scroll-margin-top:90px 才完整。前庭功能障礙者對大幅度捲動敏感,
   所以包在 no-preference 裡,而不是無條件開啟。 */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

/* 孤字控制:標題用 balance 讓斷行平均,內文用 pretty 避免最後一行只剩一個字。
   越南文詞短、變音符號多,孤字特別明顯。不支援的瀏覽器只是維持現狀。 */
html h1, html h2, html h3,
.site-13-section-heading h2 { text-wrap: balance; }
.site-13-hero-desc,
.page-wrapper .row-main > .col > .col-inner > p { text-wrap: pretty; }

/* 等寬數字:步驟編號 01/02/03 垂直對齊,比例字寬會讓 1 明顯偏窄。 */
.site-13-step-number { font-variant-numeric: tabular-nums; }

/* ── 19. 錨點 ──────────────────────────────────────────────────────
   對應 header 選單的 Trò chơi / Khuyến mãi / Hướng dẫn / Tin tức。 */
[id="tro-choi"], [id="khuyen-mai"], [id="huong-dan"], [id="tin-tuc"] { scroll-margin-top: 90px; }

/* ── 20. 響應式 ────────────────────────────────────────────────────
   Flatsome 斷點:small ≤549、medium 550–849、large ≥850。
   欄數在 UX Builder 的 Row 設定,這裡只補設計層要的調整。 */
@media (max-width: 849px) {
	.site-13-banner-hero { aspect-ratio: 21 / 9; }
	.site-13-poster-grid .site-13-poster-art { aspect-ratio: 16 / 9; }
	.site-13-banner-inline-art { aspect-ratio: 21 / 9; }
	.site-13-section-heading { padding-bottom: .6rem; margin-bottom: 1.25rem; }
}

/* ── 21. reduced motion ────────────────────────────────────────────
   拿掉 3px 位移,保留換邊框色 — hover/focus 的回饋不能一起消失。 */
@media (prefers-reduced-motion: reduce) {
	.site-13-grid > .col > .col-inner,
	.site-13-poster-grid > .col > .col-inner,
	.site-13-featured > .col > .col-inner,
	.site-13-banner-rail > .col > .col-inner { transition: border-color .15s ease; }
	.site-13-grid > .col > .col-inner:hover,
	.site-13-grid > .col > .col-inner:focus-within,
	.site-13-poster-grid > .col > .col-inner:hover,
	.site-13-poster-grid > .col > .col-inner:focus-within,
	.site-13-featured > .col > .col-inner:hover,
	.site-13-featured > .col > .col-inner:focus-within,
	.site-13-banner-rail > .col > .col-inner:hover,
	.site-13-banner-rail > .col > .col-inner:focus-within { transform: none; }
}

/* 防禦 UX Builder 編輯時若發生標籤提早閉合，直屬多個 .row 被 flex-row 橫向並排，
   且 Flatsome 原生 align-items: center 會使未滿版的 row(如未展開的手風琴 FAQ)在桌機上水平置中、
   點擊展開後寬度變大又往左跳動。僅在 .section 直接包含 .row 時介入，
   強制直向排列與拉伸滿版，避免現有首頁內容跑版。 */
.section:has(> .row) {
	flex-direction: column;
	align-items: stretch;
}
.section > .row {
	width: 100% !important;
	align-self: stretch !important;
}
