/* T8 Home — blog list / article / page (same palette as the T8 homepage) */
:root {
	--t8-blue: #407ae7;
	--t8-blue-2: #3b59a9;
	--t8-navy: #243d6b;
	--t8-sky: #9dbbf1;
	--t8-ice: #eef3fc;
	--t8-text: #2b3446;
	--t8-muted: #6b7690;
	--t8-line: #dbe4f5;
	--t8-grad: linear-gradient(90deg, #4079d8 0, #3c6bc2 48%, #3351a1 100%);
	--t8-radius: 12px;
}

/* ---------- page frame (inner pages only) ---------- */
body.t8-inner { background: #f3f6fc url("../images/background/bg6.webp") center top / cover fixed; }
.t8-inner #appLink { display: none; }                 /* app-download bar only on the homepage */
.t8-main { padding-top: 130px; min-height: 60vh; }   /* desktop: fixed top bar (40) + menu (82) + gap */
.t8-mtitle { display: none; }
.t8-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.t8-blog { padding: 24px 0 48px; color: var(--t8-text); }
.t8-blog a { color: var(--t8-blue); text-decoration: none; }
.t8-blog a:hover { color: var(--t8-blue-2); }

/* breadcrumb */
.t8-crumb { font-size: .875rem; color: var(--t8-muted); margin: 0 0 14px; }
.t8-crumb a { color: var(--t8-muted) !important; }
.t8-crumb a:hover { color: var(--t8-blue) !important; }
.t8-crumb .breadcrumb_last, .t8-crumb > span:last-child { color: var(--t8-text); }

/* list header */
.t8-blog__head { margin: 0 0 18px; }
.t8-blog__head h1 { margin: 0 0 6px; font-size: 2rem; font-weight: 700; color: var(--t8-navy); letter-spacing: .02em; }
.t8-blog__head p { margin: 0; color: var(--t8-muted); line-height: 1.7; }

/* category pills (same look as the T8 promotion tabs) */
.t8-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.t8-pills .promo-tab { display: inline-block; padding: 6px 18px; border-radius: 999px; background: #c9cdd6; color: #fff !important; font-size: .9rem; font-weight: 700; white-space: nowrap; transition: background .15s; }
.t8-pills .promo-tab:hover { background: var(--t8-sky); }
.t8-pills .promo-tab.active { background: var(--t8-blue); }

/* cards (image + blue title band, like the T8 promotion cards) */
.t8-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.t8-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--t8-radius); overflow: hidden; box-shadow: 0 4px 14px rgba(36, 61, 107, .12); transition: transform .2s, box-shadow .2s; }
.t8-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(36, 61, 107, .18); }
.t8-card__img { display: block; aspect-ratio: 16 / 9; background: var(--t8-ice); overflow: hidden; }
.t8-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t8-card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; font-weight: 900; font-style: italic; color: #fff; background: var(--t8-grad); }
.t8-card__tag { position: absolute; top: 12px; right: 0; padding: 3px 12px 3px 14px; background: var(--t8-blue); color: #fff !important; font-size: .8rem; font-weight: 700; border-radius: 4px 0 0 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.t8-card__title { margin: 0; padding: 12px 16px; background: var(--t8-grad); font-size: 1.05rem; line-height: 1.45; font-weight: 700; }
.t8-card__title a { color: #fff !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t8-card__excerpt { margin: 12px 16px 6px; color: var(--t8-muted); font-size: .9rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.t8-card__meta { margin: auto 16px 14px; padding-top: 8px; font-size: .8rem; color: #98a2b8; }

/* pagination */
.t8-pager { margin: 28px 0 0; }
.t8-pager .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.t8-pager .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: var(--t8-navy) !important; font-weight: 700; box-shadow: 0 2px 6px rgba(36, 61, 107, .1); box-sizing: border-box; }
.t8-pager .page-numbers.current { background: var(--t8-blue); color: #fff !important; }
.t8-pager .screen-reader-text { position: absolute; left: -9999px; }
.t8-empty { padding: 40px; text-align: center; background: #fff; border-radius: var(--t8-radius); color: var(--t8-muted); }

/* call to action */
.t8-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0; padding: 18px 22px; border-radius: var(--t8-radius); background: var(--t8-grad); color: #fff; box-shadow: 0 6px 18px rgba(51, 81, 161, .3); }
.t8-cta__text b { display: block; font-size: 1.15rem; }
.t8-cta__text span { font-size: .9rem; opacity: .9; }
.t8-cta__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.t8-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; border-radius: 999px; background: #fff; color: var(--t8-blue-2) !important; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.t8-btn:hover { background: var(--t8-ice); }
.t8-btn--line { background: #06c755; color: #fff !important; }
.t8-btn--line:hover { background: #05b04b; }
.t8-btn--ghost { background: transparent; color: var(--t8-blue) !important; border: 2px solid var(--t8-blue); box-shadow: none; }
.t8-cta--side { flex-direction: column; align-items: stretch; text-align: center; margin-top: 0; }
.t8-cta--side .t8-cta__btns { flex-direction: column; }

/* ---------- article ---------- */
.t8-single__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.t8-article { align-self: start; }
.t8-article { position: relative; background: #fff; border-radius: var(--t8-radius); padding: 30px 36px; box-shadow: 0 4px 14px rgba(36, 61, 107, .1); }
.t8-article--page { max-width: 900px; margin: 0 auto; }
.t8-article__cat { position: static; display: inline-block; border-radius: 4px; margin-bottom: 10px; }
.t8-article__head h1 { margin: 0 0 10px; font-size: 1.9rem; line-height: 1.4; color: var(--t8-navy); }
.t8-article__meta { margin: 0 0 18px; font-size: .85rem; color: var(--t8-muted); }
.t8-article__img { margin: 0 0 20px; border-radius: 10px; overflow: hidden; }
.t8-article__img img { width: 100%; height: auto; display: block; }

.t8-toc { background: var(--t8-ice); border: 1px solid var(--t8-line); border-radius: 10px; padding: 14px 18px; margin: 0 0 22px; }
.t8-toc summary { cursor: pointer; font-weight: 700; color: var(--t8-navy); }
.t8-toc__list { margin: 10px 0 0; padding-left: 20px; line-height: 1.9; }
.t8-toc__list a { color: var(--t8-text) !important; }
.t8-toc__list a:hover { color: var(--t8-blue) !important; }
.t8-toc__h3 { list-style: circle; margin-left: 16px; font-size: .92rem; }
.t8-toc--side { display: none; }

.t8-content { font-size: 1.06rem; line-height: 1.95; color: var(--t8-text); word-break: break-word; }
.t8-content > * + * { margin-top: 1em; }
.t8-content h2 { margin: 2em 0 .8em; padding: 10px 16px; font-size: 1.45rem; line-height: 1.45; color: #fff; background: var(--t8-grad); border-radius: 8px; scroll-margin-top: 140px; }
.t8-content h3 { margin: 1.6em 0 .6em; padding-left: 12px; font-size: 1.2rem; color: var(--t8-navy); border-left: 4px solid var(--t8-blue); scroll-margin-top: 140px; }
.t8-content h4 { font-size: 1.05rem; color: var(--t8-navy); }
.t8-content a { color: var(--t8-blue); text-decoration: underline; text-underline-offset: 3px; }
.t8-content img { max-width: 100%; height: auto; border-radius: 8px; }
.t8-content ul, .t8-content ol { padding-left: 1.4em; }
.t8-content ul li { list-style: disc; }
.t8-content ol li { list-style: decimal; }
.t8-toc__list li { list-style: decimal; }
.t8-content li + li { margin-top: .35em; }
.t8-content blockquote { margin: 1.4em 0; padding: 12px 18px; background: var(--t8-ice); border-left: 4px solid var(--t8-blue); border-radius: 0 8px 8px 0; color: var(--t8-navy); }
.t8-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.t8-content th { background: var(--t8-blue); color: #fff; }
.t8-content th, .t8-content td { padding: 10px 12px; border: 1px solid var(--t8-line); text-align: left; }
.t8-content tr:nth-child(even) td { background: #f7f9fe; }
.t8-content .schema-faq-section, .t8-content .wp-block-yoast-faq-block > div { margin: 0 0 10px; padding: 12px 16px; border: 1px solid var(--t8-line); border-radius: 10px; }
.t8-content .schema-faq-question { display: block; font-weight: 700; color: var(--t8-navy); }

.t8-tags { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.t8-tags a { padding: 4px 12px; border-radius: 999px; background: var(--t8-ice); font-size: .85rem; }
.t8-prevnext { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--t8-line); font-size: .95rem; }
.t8-prevnext__next { margin-left: auto; text-align: right; }
.t8-related { margin-top: 32px; }
.t8-related__title { margin: 0 0 14px; font-size: 1.3rem; color: var(--t8-navy); }

.t8-side { display: flex; flex-direction: column; gap: 18px; }
.t8-side__sticky { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 18px; }
.t8-side__box, .t8-toc--side { background: #fff; border-radius: var(--t8-radius); padding: 16px 18px; box-shadow: 0 4px 14px rgba(36, 61, 107, .1); }
.t8-side__title { margin: 0 0 8px; font-weight: 700; color: var(--t8-navy); }
.t8-side__list { margin: 0; padding: 0; list-style: none; }
.t8-side__list li + li { border-top: 1px dashed var(--t8-line); }
.t8-side__list a { display: block; padding: 8px 0; color: var(--t8-text) !important; line-height: 1.5; font-size: .92rem; }
.t8-side__list a:hover { color: var(--t8-blue) !important; }
@media (min-width: 1101px) {
	.t8-toc--inline { display: none; }   /* desktop: TOC lives in the sticky sidebar */
	.t8-toc--side { display: block; max-height: calc(100vh - 360px); overflow: auto; }
}

/* ---------- homepage 「娛樂城攻略」 block ---------- */
.t8-latest { padding: 40px 0 10px; }
.t8-latest .title { text-align: center; margin-bottom: 22px; }
.t8-latest__more { text-align: center; margin: 22px 0 0; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
	.t8-single__grid { grid-template-columns: minmax(0, 1fr); }
	.t8-side__sticky { position: static; }
	.t8-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- mobile: blue title bar on top, app-style bottom nav (from footer.html) ---------- */
@media (max-width: 950px) {
	.t8-main { padding-top: 0; }
	.t8-mtitle { display: block; position: sticky; top: 0; z-index: 50; }
	.t8-mtitle__back { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .2); color: #fff !important; }
	.t8-mtitle p { padding: 0 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.t8-wrap { padding: 0 14px; }
	.t8-blog { padding: 16px 0 24px; }
	.t8-crumb { display: none; }
	.t8-blog__head h1 { font-size: 1.5rem; }
	.t8-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 16px; padding: 0 14px 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.t8-pills::-webkit-scrollbar { display: none; }
	.t8-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.t8-article { padding: 20px 16px; border-radius: 10px; }
	.t8-article__head h1 { font-size: 1.45rem; }
	.t8-content { font-size: 1rem; line-height: 1.9; }
	.t8-content h2 { font-size: 1.2rem; scroll-margin-top: 70px; }
	.t8-content h3 { font-size: 1.08rem; scroll-margin-top: 70px; }
	.t8-toc--inline:not([open]) { padding-bottom: 14px; }
	.t8-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 16px; }
	.t8-cta__btns { justify-content: center; }
	.t8-btn { flex: 1; }
	.t8-latest { padding: 24px 0 0; }
}

/* fixes after first render */
.t8-article__head h1, .t8-blog__head h1 { white-space: normal; overflow: visible; text-overflow: clip; }
.t8-article__img img { aspect-ratio: 16 / 9; object-fit: cover; max-height: 460px; }
.t8-content .t8-btn { text-decoration: none; }
.t8-content th, .t8-content td { min-width: 5.5em; }
@media (max-width: 950px) {
	.t8-content table { font-size: .88rem; }
	.t8-content th, .t8-content td { padding: 8px 9px; }
}
