/*
Theme Name: Tin Game 8
Theme URI: https://tingame8.local
Author: Tin Game 8
Author URI: https://tingame8.local
Description: Theme tin tức game cho WordPress, giao diện bám sát layout QuanTriMang: trang chủ 2 cột (hero + hộp "Khám phá thêm" + lưới + tin mới, sidebar phải), trang chuyên mục & bài viết 3 cột (icon strip + sidebar chuyên mục/TOC + nội dung), responsive với header tím trên mobile.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tin-game-8
Tags: news, magazine, blog, two-columns, custom-menu, featured-images, sticky-post, translation-ready
*/

/* =========================================================================
   01. VARIABLES
   ========================================================================= */
:root {
  --color-primary: #58257B;
  --color-primary-light: rgba(88, 37, 123, 0.57);
  --color-primary-soft: #f3eef8;
  --color-accent: #d93025;
  --color-text: rgba(0, 0, 0, 0.87);
  --color-text-secondary: #5f6368;
  --color-text-dark: #202124;
  --color-bg: #f8f8f8;
  --color-bg-footer: #f5f5f5;
  --color-white: #ffffff;
  --color-border: #eeeeee;
  --color-border-medium: #cccccc;
  --color-box-border: #e3e5ea;
  --color-link-toc: #334155;
  --color-link-body: #1a73e8;
  --color-pill-bg: #e8f0fe;
  --color-pill-text: #1a56b8;

  --font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  /* Tiêu đề bài + liên kết bài ở sidebar (19/11/2026): MỘT độ đậm cho mọi chỗ, 560 = 700 giảm 20%.
     Arial chỉ có 400/700 nên 560 vẫn hiện thành 700; font hệ thống (SF Pro, Segoe UI, Roboto)
     có mức trung gian và có sẵn trong máy, không tải thêm. */
  --font-title: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --title-weight: 560;
  --font-size-base: 15px;
  --line-height-base: 23px;

  --content-max-width: 1100px;
  --sidebar-right: 300px;
  --sidebar-width: 280px;
  --icon-strip-width: 44px;
  --article-body-width: 768px;
  --header-height: 67px; /* 56px cũ + 20%, cho hàng logo thoáng hơn trên PC */
  --nav-height: 41px; /* 36px cũ + 15% (19/11/2026), thanh menu PC thoáng hơn; điện thoại giữ 36px */
  --gap: 16px;
  /* MỘT hệ số bo duy nhất cho mọi khung trên site. Trước đây theme dùng 3px, plugin
     esports dùng 10px, lại rải thêm 4px, 8px và 999px - đứng cạnh nhau thì thấy chỗ bo
     nhiều chỗ bo ít. 6px là mức vừa: thấy được là có bo, không tròn tới mức thành viên
     thuốc. Đổi số ở ĐÂY là cả site đổi theo, kể cả plugin (nó đọc biến này). */
  --radius: 6px;
}

/* =========================================================================
   02. BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-family); color: var(--color-text); font-weight: 700; }
p { margin: 0 0 10px; }
ul, ol { margin: 0 0 10px; padding-left: 1.4em; }
button { font-family: inherit; cursor: pointer; }
svg { display: inline-block; vertical-align: middle; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--color-primary); color: #fff; padding: 8px 16px; }
.skip-link:focus { left: 8px; top: 8px; }

/* =========================================================================
   03. LAYOUT
   ========================================================================= */
.tg8-container { max-width: var(--content-max-width); margin: 0 auto; padding: 0 16px; width: 100%; }
.tg8-main { padding: 16px 0 32px; }

/* Trang chủ / index: nội dung + sidebar phải */
.tg8-cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar-right); gap: 24px; align-items: start; }
/* Chuyên mục / bài viết: icon strip + sidebar trái + nội dung */
.tg8-cols-3 { display: grid; grid-template-columns: var(--icon-strip-width) var(--sidebar-width) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.tg8-content { min-width: 0; }
.tg8-sidebar { min-width: 0; }

/* =========================================================================
   04. HEADER
   ========================================================================= */
/* Nét xám ngăn hàng logo với hàng menu. Nhạt hơn nét tím dưới thanh menu là cố ý: hai nét
   đậm bằng nhau thì hàng menu trông như bị kẹp giữa hai gạch. */
.tg8-header { background: var(--color-white); position: relative; z-index: 100; border-bottom: 1px solid var(--color-border); }
.tg8-header__inner {
  height: var(--header-height);
  /* 07/11/2026: hai cột 50/50 - logo trái, thanh tìm kiếm phủ hết nửa phải. */
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 20px;
}

/* Logo wordmark */
.tg8-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--color-primary); }
.tg8-logo:hover { text-decoration: none; }
.tg8-logo__icon {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.tg8-logo__text { display: flex; flex-direction: column; line-height: 1; }
.tg8-logo__name { font-size: 24px; font-weight: 700; letter-spacing: -0.6px; color: var(--color-primary); }
.tg8-logo__tagline {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  font-size: 10px; color: var(--color-text-secondary); white-space: nowrap;
}
.tg8-logo__tagline::before, .tg8-logo__tagline::after { content: ""; flex: 1 1 10px; height: 1px; background: #c9c9c9; }
/* Logo ảnh: ảnh đã có sẵn cả con cú lẫn chữ, nên bỏ biểu tượng 🎮 và để dòng khẩu hiệu
   nằm ngay dưới ảnh. display:block để ảnh không còn khoảng hở dưới của dòng chữ. */
.tg8-logo .custom-logo { display: block; max-height: 52px; width: auto; }
.tg8-logo--anh .tg8-logo__tagline { margin-top: 5px; }

/* Search */
.tg8-search { display: flex; align-items: stretch; width: 270px; max-width: 100%; height: 32px; }
.tg8-search__input {
  flex: 1 1 auto; min-width: 0; height: 32px; padding: 0 10px;
  font-size: 14px; font-family: var(--font-family); color: var(--color-text);
  border: 1px solid var(--color-primary-light); border-right: none;
  border-radius: var(--radius) 0 0 var(--radius); outline: none; background: #fff;
}
.tg8-search__input:focus { border-color: var(--color-primary); }
.tg8-search__btn {
  flex: none; width: 36px; height: 32px; padding: 0;
  border: 1px solid var(--color-primary); background: var(--color-primary); color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; align-items: center; justify-content: center;
}
.tg8-search__btn:hover { background: #6b2f93; }
.tg8-search__btn svg { width: 15px; height: 15px; }
.tg8-header__search { justify-self: stretch; width: 100%; margin-left: 0; }

/* Nút chỉ dùng mobile */
.tg8-icon-btn {
  display: none; width: 40px; height: 40px; border: none; background: transparent;
  color: #fff; align-items: center; justify-content: center; padding: 0; border-radius: var(--radius);
}
.tg8-icon-btn svg { width: 22px; height: 22px; }

/* =========================================================================
   05. NAV + MEGAMENU
   ========================================================================= */
.tg8-nav {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-primary);
  position: sticky; top: 0; z-index: 90;
}
.tg8-nav__inner { display: flex; align-items: center; position: relative; }
.tg8-nav__toggle {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: var(--nav-height); border: none; background: transparent; color: var(--color-primary); padding: 0;
}
.tg8-nav__toggle svg { width: 18px; height: 18px; }
.tg8-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; }
.tg8-menu > li { position: relative; flex: none; }
.tg8-menu > li > a {
  display: block; font-size: 15.5px; font-weight: 700; color: var(--color-primary);
  padding: 0 10px; line-height: var(--nav-height); white-space: nowrap;
}
.tg8-menu > li > a:hover { text-decoration: none; color: var(--color-accent); }
.tg8-menu > li.current-menu-item > a,
.tg8-menu > li.current-menu-ancestor > a,
.tg8-menu > li.current-menu-parent > a,
.tg8-menu > li.current_page_item > a { color: var(--color-accent); }
.tg8-menu .sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 95; display: none;
  list-style: none; margin: 0; padding: 6px 0; min-width: 200px;
  background: #fff; border: 1px solid var(--color-box-border); box-shadow: 0 6px 18px rgba(0,0,0,.12); border-radius: var(--radius);
}
.tg8-menu li:hover > .sub-menu { display: block; }
.tg8-menu .sub-menu a { display: block; padding: 7px 16px; font-size: 13px; color: var(--color-text-secondary); }
.tg8-menu .sub-menu a:hover { background: var(--color-primary-soft); color: var(--color-primary); text-decoration: none; }

/* Panel "Tất cả chuyên mục" */
.tg8-megamenu {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 95;
  background: #fff; border: 1px solid var(--color-box-border); border-top: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.14); padding: 16px 20px 20px;
}
.tg8-nav.is-open .tg8-megamenu { display: block; }
.tg8-megamenu__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 24px; }
.tg8-megamenu__silo > a { font-size: 14px; font-weight: 700; color: var(--color-primary); display: block; padding-bottom: 6px; border-bottom: 1px solid var(--color-border); margin-bottom: 6px; }
.tg8-megamenu__silo ul { list-style: none; margin: 0; padding: 0; }
.tg8-megamenu__silo li a { display: block; font-size: 13px; color: var(--color-text-secondary); padding: 3px 0; }
.tg8-megamenu__silo li a:hover { color: var(--color-primary); text-decoration: none; }

/* =========================================================================
   07. HERO SLIDER
   ========================================================================= */
.tg8-slider { position: relative; height: 364px; border-radius: var(--radius); overflow: hidden; background: #1f1f1f; margin-bottom: var(--gap); }
.tg8-slider__track { height: 100%; }
.tg8-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease; color: #fff; }
.tg8-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.tg8-slide__media { position: absolute; inset: 0; }
.tg8-slide__media img { width: 100%; height: 100%; object-fit: cover; }
.tg8-slide__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,0) 65%); }
.tg8-slide__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 24px 20px; text-align: center; }
.tg8-slide__title { font-family: var(--font-title); font-size: 22.5px; font-weight: var(--title-weight); line-height: 29.25px; color: #fff; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.tg8-slide:hover .tg8-slide__title { text-decoration: underline; }
.tg8-slider__dots { position: absolute; bottom: 8px; right: 12px; z-index: 5; display: flex; gap: 5px; }
.tg8-slider__dots button { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(255,255,255,.45); padding: 0; }
.tg8-slider__dots button.is-active { background: #fff; }

/* Bài nổi bật trang chuyên mục (dùng chung markup slide, chiều cao thấp hơn) */
.tg8-featured { height: 320px; }

/* =========================================================================
   08. LƯỚI 2 CỘT
   ========================================================================= */
.tg8-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; margin-bottom: var(--gap); }
.tg8-card { min-width: 0; }
.tg8-card__media { display: block; aspect-ratio: 304 / 159; border-radius: var(--radius); overflow: hidden; background: #e9e9e9; }
.tg8-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* Ảnh dọc (chân dung, cosplay, cúp) trong khung ngang: hiện trọn ảnh trên nền mờ của chính nó thay vì cắt còn khuôn mặt. */
.tg8-doc { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: #1e1b2e; }
.tg8-doc img.tg8-doc__nen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.6); transform: scale(1.2); }
.tg8-doc img.tg8-doc__anh { position: relative; width: 100%; height: 100%; object-fit: contain; }
.tg8-card__title { margin: 8px 0 0; font-family: var(--font-title); font-size: 18px; font-weight: var(--title-weight); line-height: 1.3; color: var(--color-text); }
.tg8-card__title a { color: inherit; }
.tg8-card__title a:hover { color: var(--color-primary); text-decoration: none; }

/* =========================================================================
   09. TRENDING TAGS
   ========================================================================= */
.tg8-trending { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 var(--gap); }
.tg8-trending__fire { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fdecea; color: var(--color-accent); display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.tg8-trending__fire svg { width: 15px; height: 15px; }
.tg8-trending__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tg8-tag {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px;
  font-size: 13px; color: var(--color-text-dark); background: #fff;
  border: 1px solid #cfd3d8; border-radius: var(--radius); white-space: nowrap;
}
.tg8-tag:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }

/* =========================================================================
   10. DANH SÁCH BÀI (lớn) + DANH SÁCH NHỎ (sidebar)
   ========================================================================= */
.tg8-list { list-style: none; margin: 0 0 var(--gap); padding: 0; }
.tg8-listitem { display: grid; grid-template-columns: 211px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.tg8-list > .tg8-listitem:first-child { padding-top: 4px; }
.tg8-listitem__thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #e9e9e9; }
.tg8-listitem__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tg8-listitem__title { font-family: var(--font-title); font-size: 18px; font-weight: var(--title-weight); line-height: 1.35; margin: 0 0 6px; color: var(--color-text); }
.tg8-listitem__title a { color: inherit; }
.tg8-listitem__title a:hover { color: var(--color-primary); text-decoration: none; }
.tg8-listitem__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 6px; }
.tg8-listitem__meta a { color: inherit; }
.tg8-meta-author { display: inline-flex; align-items: center; gap: 6px; }
.tg8-meta-author img { width: 20px; height: 20px; border-radius: 50%; }
.tg8-meta-time { display: inline-flex; align-items: center; gap: 4px; }
.tg8-meta-time svg { width: 12px; height: 12px; }
.tg8-listitem__excerpt { font-size: 13px; line-height: 1.5; color: var(--color-text-secondary); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.tg8-mini { list-style: none; margin: 0; padding: 0; }
.tg8-mini li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--color-border); align-items: start; }
.tg8-mini li:last-child { border-bottom: none; }
.tg8-mini__thumb { display: block; width: 80px; height: 42px; border-radius: var(--radius); overflow: hidden; background: #e9e9e9; }
.tg8-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tg8-mini__title { font-family: var(--font-title); font-size: 13px; line-height: 1.4; font-weight: var(--title-weight); color: var(--color-text-dark); margin: 0; }
.tg8-mini__title a { color: inherit; }
.tg8-mini__title a:hover { color: var(--color-primary); text-decoration: none; }

/* =========================================================================
   11. TIÊU ĐỀ KHỐI + NÚT XEM THÊM
   ========================================================================= */
.tg8-section { margin-bottom: 20px; }
.tg8-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e5e5e5; padding-bottom: 6px; margin: 0 0 10px; }
.tg8-section__title { font-size: 19px; font-weight: 700; color: var(--color-text-dark); margin: 0; }
.tg8-section__title--lg { font-size: 21px; }
.tg8-section__more { font-size: 13px; color: var(--color-primary); white-space: nowrap; }
.tg8-more-wrap { text-align: center; margin: 8px 0 20px; }
.tg8-btn-more { display: inline-block; min-width: 102px; padding: 5px 14px; font-size: 15px; color: var(--color-text); border: 1px solid var(--color-border-medium); border-radius: var(--radius); background: #fff; line-height: 23px; }
.tg8-btn-more:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); text-decoration: none; }

/* =========================================================================
   12. SIDEBAR PHẢI (trang chủ / index)
   ========================================================================= */
.tg8-side-block { margin-bottom: 22px; }
.tg8-widget { margin-bottom: 22px; font-size: 14px; }
.tg8-widget__title { font-size: 17px; font-weight: 700; color: var(--color-text-dark); border-bottom: 1px solid #e5e5e5; padding-bottom: 6px; margin: 0 0 10px; }
.tg8-widget ul { list-style: none; margin: 0; padding: 0; }
.tg8-widget li { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.tg8-widget li:last-child { border-bottom: none; }

/* =========================================================================
   13. ICON STRIP + SIDEBAR CHUYÊN MỤC
   ========================================================================= */
.tg8-iconstrip {
  position: sticky; top: calc(var(--nav-height) + 10px);
  background: #e2e2ea; border: 1px solid #d2d2dc; border-radius: var(--radius); padding: 8px 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tg8-iconstrip a {
  width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 18px; opacity: .8; transition: opacity .15s, background .15s;
}
.tg8-iconstrip img { width: 24px; height: 24px; display: block; }
.tg8-iconstrip a:hover, .tg8-iconstrip a.is-active { background: #fff; opacity: 1; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.tg8-sidebar-box {
  position: sticky; top: calc(var(--nav-height) + 10px);
  background: #fff; border: 1px solid var(--color-box-border); border-radius: var(--radius); padding: 6px 0; margin-bottom: var(--gap);
}
.tg8-sidebar-box__title { font-size: 14px; font-weight: 700; color: var(--color-text-dark); padding: 8px 16px 6px; margin: 0; }
.tg8-sidebar-box__title a { color: inherit; }
.tg8-subcats { list-style: none; margin: 0; padding: 0; }
.tg8-subcats li a { display: block; padding: 7px 16px; font-size: 13px; color: var(--color-text-secondary); line-height: 1.4; }
.tg8-subcats li a::before { content: "# "; color: #9aa0a6; }
.tg8-subcats li a:hover { background: #fafafa; color: var(--color-primary); text-decoration: none; }
.tg8-subcats li.is-active a { background: var(--color-primary-soft); color: var(--color-accent); }
.tg8-subcats li.is-active a::before { color: var(--color-accent); }

/* align-self: stretch là chốt để mục lục bám theo màn hình. Lưới .tg8-cols-3 đặt
   align-items: start nên cột này chỉ cao bằng nội dung của nó (584px trong khi bài 4.810px):
   sticky không còn chỗ để trượt, cuộn một đoạn là mục lục trôi mất.
   Khung ghim cao tối đa bằng màn hình và tự cuộn bên trong, để mục lục dài trên laptop màn
   thấp vẫn xem được hết. Cả mục lục lẫn khối chuyên mục nằm chung MỘT vùng cuộn, không để
   mỗi khối một thanh cuộn. */
.tg8-sidebar-stack { min-width: 0; align-self: stretch; }
.tg8-sidebar-stack .tg8-sidebar-box { position: static; }
.tg8-sidebar-stack .tg8-sticky {
  position: sticky; top: calc(var(--nav-height) + 10px);
  max-height: calc(100vh - var(--nav-height) - 20px);
  overflow-y: auto; scrollbar-width: thin;
}

/* =========================================================================
   14. TRANG CHUYÊN MỤC
   ========================================================================= */
.tg8-cat-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--color-text-dark); margin: 0 0 10px; }
.tg8-cat-label a { color: inherit; }
.tg8-cat-label__icon { width: 20px; height: 20px; border-radius: 50%; background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.tg8-cat-label__icon svg { width: 11px; height: 11px; }
.tg8-cat-label .sep { color: #9aa0a6; font-weight: 400; }
.tg8-cat-label .sub { font-weight: 400; color: var(--color-text-secondary); }
.tg8-cat-label__h1 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--color-text-dark); }
.tg8-cat-label--h1 { margin-bottom: 12px; }
.tg8-cat-label--h1 .tg8-cat-label__icon { width: 24px; height: 24px; }
.tg8-cat-label--h1 .tg8-cat-label__icon svg { width: 13px; height: 13px; }
.tg8-cat-desc { font-size: 15px; line-height: 23px; margin: 14px 0 6px; color: var(--color-text); }
.tg8-cat-desc p { margin: 0 0 8px; }
.tg8-cat-pills { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px; }
/* PC: hộp mục con bên trái đã liệt kê đúng các mục này, nên ẩn hàng nút cho khỏi lặp. */
@media (min-width: 1024px) { .tg8-cat-pills { display: none; } }
.tg8-pill { display: inline-block; background: var(--color-pill-bg); color: var(--color-pill-text); border-radius: var(--radius); padding: 1px 9px; font-size: 13px; line-height: 20px; }
.tg8-pill:hover { background: #d7e5fc; text-decoration: none; }
.tg8-archive-title { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
.tg8-empty { background: #fff; border: 1px solid var(--color-box-border); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--color-text-secondary); font-size: 15px; margin: 8px 0; }

/* =========================================================================
   15. BÀI VIẾT
   ========================================================================= */
.tg8-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--color-text-secondary); margin: 0 0 8px; }
.tg8-breadcrumb a { color: var(--color-text-dark); font-weight: 700; }
.tg8-breadcrumb a:hover { color: var(--color-primary); }
.tg8-breadcrumb a ~ a { font-weight: 400; color: var(--color-text-secondary); }
.tg8-breadcrumb .sep { color: #9aa0a6; }
.tg8-breadcrumb .tg8-cat-label__icon { margin-right: 2px; }

.tg8-article { min-width: 0; max-width: var(--article-body-width); }
.tg8-article__title { font-size: 24px; font-weight: 700; line-height: 34px; margin: 0 0 10px; }
/* Khung tác giả: một dòng gọn "Tác giả: admin | Đăng ngày: 05/11/2026".
   Bản cũ có avatar gravatar 44px nên khung cao gần gấp đôi, mà avatar đó chỉ là hình mặc
   định xám - chiếm chỗ nhưng không nói thêm gì. */
.tg8-author {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  padding: 8px 12px; background: #fff; border: 1px solid var(--color-box-border);
  border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; line-height: 1.5;
}
.tg8-author__item { display: inline-flex; align-items: center; gap: 6px; }
.tg8-author__icon { display: inline-flex; color: var(--color-primary); }
.tg8-author__icon svg { width: 16px; height: 16px; display: block; }
/* Dấu ngăn vẽ bằng CSS, đặt SAU mỗi mục trừ mục cuối.
   Để dấu "|" thành thẻ riêng trong HTML thì lúc xuống dòng nó rơi xuống đầu dòng sau,
   nhìn lửng lơ. Gắn vào đuôi mục thì nó luôn ở cuối dòng trên, đúng như dấu ngăn thật. */
.tg8-author__item:not(:last-child)::after {
  content: "|"; margin-left: 10px; color: var(--color-border-medium);
}
/* display:block là của bố cục cũ (nhãn nằm trên tên); giờ tất cả trên một dòng. */
.tg8-author__label { font-size: 13px; color: var(--color-text-secondary); }
.tg8-author__name { font-weight: 700; color: var(--color-text-dark); }
/* Ảnh đầu bài: luôn cắt về dải ngang ~16:9, lấy phần trên để không mất mặt người (ảnh chân dung). */
.tg8-article__hero { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; max-height: 420px; }
.tg8-article__hero img { display: block; width: 100%; height: 420px; object-fit: cover; object-position: center 22%; margin: 0; border-radius: 0; }
.tg8-article__hero figcaption { font-size: 12px; color: var(--color-text-secondary); padding: 6px 2px 0; }
@media (max-width: 767px) { .tg8-article__hero, .tg8-article__hero img { max-height: 230px; height: 230px; } }
.tg8-article__body { font-size: 15px; line-height: 23px; color: var(--color-text); }
.tg8-article__body p { margin: 0 0 15px; }
.tg8-article__body img { border-radius: var(--radius); margin: 10px auto; }
.tg8-article__body h2 { font-size: 20px; font-weight: 700; line-height: 32px; margin: 20px 0 10px; scroll-margin-top: calc(var(--nav-height) + 16px); }
.tg8-article__body h3 { font-size: 17px; font-weight: 700; line-height: 1.4; margin: 16px 0 8px; scroll-margin-top: calc(var(--nav-height) + 16px); }
.tg8-article__body ul, .tg8-article__body ol { margin: 0 0 15px; }
.tg8-article__body li { margin-bottom: 5px; }
.tg8-article__body a { color: var(--color-link-body); }
.tg8-article__body blockquote { margin: 15px 0; padding: 10px 16px; border-left: 4px solid var(--color-primary); background: var(--color-primary-soft); }
.tg8-article__body figure { margin: 10px 0 15px; }
.tg8-article__body figcaption { font-size: 13px; color: var(--color-text-secondary); text-align: center; margin-top: 4px; }
.tg8-article__body table { border-collapse: collapse; width: 100%; margin-bottom: 15px; font-size: 14px; }
.tg8-article__body th, .tg8-article__body td { border: 1px solid var(--color-border-medium); padding: 6px 8px; }
/* Hàng tiêu đề cột nền tím nhạt, cùng khuôn với bảng sống và bảng hồ sơ esports (19/11/2026). */
.tg8-article__body th { background: var(--color-primary-soft); color: var(--color-text-dark); font-weight: 700; text-align: left; }
.tg8-article__tags { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tg8-article__tags .label { font-size: 13px; color: var(--color-text-secondary); }
.tg8-related { margin-top: 24px; }
.tg8-related .tg8-grid { margin-bottom: 0; }
.tg8-related .tg8-card__title { font-size: 15px; }

/* Trang lịch thi đấu: một cột rộng, không mục lục, không cột trái.
   Container chung là 1100px và trừ 16px đệm hai bên, nên 1000px là bề ngang dùng được gần
   hết mà vẫn còn lề thở. Bảng trận cần chỗ hơn bài đọc nên không dùng --article-body-width. */
.tg8-lich-don { max-width: 1000px; margin: 0 auto; }
.tg8-article--rong { max-width: none; }
.tg8-article--rong .tg8-article__title { margin-bottom: 14px; }

/* Trang sống: khối dữ liệu cập nhật được (inc/living.php) */
.tg8-live { margin: 18px 0 24px; border: 1px solid var(--color-box-border); border-radius: var(--radius); background: #fff; overflow: hidden; }
/* Khung bảng sống (19/11/2026): hàng tiêu đề cột là dải tím trên cùng; tiêu đề riêng của bảng (nếu có)
   nằm trên dải trắng phía trên; ghi chú và dấu "Cập nhật" ở chân khung. */
.tg8-live__head { padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--color-box-border); }
.tg8-live__title { margin: 0; font-size: 16px; font-weight: 700; color: var(--color-text-dark); line-height: 1.35; }
.tg8-live__stamp { display: block; font-size: 12px; color: var(--color-primary); font-weight: 700; }
.tg8-live__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tg8-article__body .tg8-live__table { margin: 0; min-width: 100%; font-size: 14px; border-collapse: collapse; }
.tg8-article__body .tg8-live__table th { background: var(--color-primary-soft); text-align: left; font-size: 13px; font-weight: 700; color: var(--color-text-dark); text-transform: none; white-space: nowrap; }
.tg8-article__body .tg8-live__table th, .tg8-article__body .tg8-live__table td { border: 0; border-bottom: 1px solid var(--color-border); padding: 9px 14px; vertical-align: top; }
.tg8-article__body .tg8-live__table tbody tr:last-child td { border-bottom: 0; }
.tg8-article__body .tg8-live__table tbody tr:nth-child(even) { background: #fcfcfd; }
.tg8-live__empty { margin: 0; padding: 16px 14px; font-size: 14px; color: var(--color-text-secondary); font-style: italic; }
.tg8-live__foot { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--color-border); background: #fcfcfd; }
.tg8-article__body .tg8-live__note { margin: 0; font-size: 13px; color: var(--color-text-secondary); }
.tg8-live--trong .tg8-live__stamp { color: var(--color-text-secondary); }

/* FAQ accordion (đóng/mở) */
.tg8-faq { display: grid; gap: 12px; margin: 14px 0 24px; }
.tg8-faq__item { border: 1px solid var(--color-box-border); border-radius: var(--radius); background: #fff; overflow: hidden; }
.tg8-faq__item[open] { border-color: var(--color-primary-light); box-shadow: 0 1px 3px rgba(88,37,123,.06); }
.tg8-faq__q { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 10.5px 18px; font-size: 16px; font-weight: 700; color: var(--color-text-dark); }
.tg8-faq__q::-webkit-details-marker { display: none; }
.tg8-faq__q:hover { background: #fafafd; }
.tg8-faq__q:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.tg8-faq__qtext { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.tg8-faq__plus { flex: none; position: relative; width: 26px; height: 26px; border: 1.5px solid #d6d9e0; border-radius: 50%; }
.tg8-faq__plus::before, .tg8-faq__plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--color-primary); border-radius: 2px; transition: opacity .2s; }
.tg8-faq__plus::before { width: 11px; height: 2px; transform: translate(-50%, -50%); }
.tg8-faq__plus::after  { width: 2px; height: 11px; transform: translate(-50%, -50%); }
.tg8-faq__item[open] .tg8-faq__plus::after { opacity: 0; } /* dấu + thành − khi mở */
.tg8-faq__chev { flex: none; width: 9px; height: 9px; border-right: 2px solid #9aa0a6; border-bottom: 2px solid #9aa0a6; transform: rotate(45deg); transition: transform .2s; margin: -3px 2px 0 2px; }
.tg8-faq__item[open] .tg8-faq__chev { transform: rotate(-135deg); margin-top: 3px; }
.tg8-faq__a { padding: 0 18px 16px 58px; color: var(--color-text); line-height: 1.65; }
.tg8-faq__a p { margin: 0 0 10px; }
.tg8-faq__a p:last-child { margin-bottom: 0; }
.tg8-faq__item[open] .tg8-faq__a { animation: tg8-faq-in .22s ease; }
@keyframes tg8-faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) { .tg8-faq__a { padding-left: 18px; } .tg8-faq__q { font-size: 15px; padding: 13px 14px; } }
@media (prefers-reduced-motion: reduce) { .tg8-faq__item[open] .tg8-faq__a { animation: none; } }
@keyframes tg8-tha-xuong { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tg8-header.is-search-open .tg8-header__search { animation: none; } }

/* TOC */
.tg8-toc { background: #fff; border: 1px solid var(--color-box-border); border-radius: var(--radius); padding: 10px 0; margin-bottom: var(--gap); }
.tg8-toc__title { font-size: 13px; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: .4px; padding: 0 16px 8px; margin: 0; border-bottom: 1px solid var(--color-border); }
.tg8-toc__list { list-style: none; margin: 6px 0 0; padding: 0; }
.tg8-toc__list a { display: block; position: relative; padding: 6px 12px 6px 32px; font-size: 14px; color: var(--color-link-toc); line-height: 1.35; }
.tg8-toc__list a::before { content: "○"; position: absolute; left: 14px; top: 6px; color: #aab1bd; font-size: 11px; }
.tg8-toc__list a:hover { color: var(--color-primary); text-decoration: none; }
.tg8-toc__list li.is-active > a { color: var(--color-accent); font-weight: 700; }
.tg8-toc__list li.is-active > a::before { content: "●"; color: var(--color-accent); }
.tg8-toc__list .toc-h3 a { padding-left: 44px; font-size: 13px; }
.tg8-toc__list .toc-h3 a::before { left: 26px; }
.tg8-toc__empty { padding: 8px 16px; font-size: 13px; color: var(--color-text-secondary); }

/* =========================================================================
   16. FOOTER
   ========================================================================= */
.tg8-footer { margin-top: 24px; font-size: 14px; }

/* --- hàng 1: nền xám như cũ, 3 cột --- */
/* Viền trên 1px màu tím, đúng kiểu viền dưới của thanh menu (.tg8-nav): hai đầu trang và
   cuối trang dùng chung một nét thì khung trang khép lại gọn, chứ nét xám #e9e9e9 cũ
   nhạt quá, nhìn như chân trang dính luôn vào bài. */
.tg8-footer__main { background: var(--color-bg-footer); border-top: 1px solid var(--color-primary); padding: 28px 0 30px; }
/* Cột giới thiệu rộng gấp rưỡi hai cột kia: nó chứa cả đoạn văn, còn hai cột kia chỉ là
   danh sách link ngắn và mấy cái biểu tượng. */
.tg8-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 26px 40px; align-items: start; }
.tg8-footer__tom { margin: 12px 0 0; max-width: 420px; color: var(--color-text-secondary); line-height: 1.7; }
.tg8-footer__tom p { margin: 0 0 8px; }
.tg8-footer__tom p:last-child { margin-bottom: 0; }
.tg8-footer__tom a { color: var(--color-primary); }

/* Ba dòng tòa soạn: lưới 2 cột để hình vẽ đứng yên một cột, chữ dài xuống dòng thì vẫn
   thẳng hàng với dòng trên chứ không chui xuống dưới hình. */
.tg8-footer__ts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; max-width: 420px; }
.tg8-footer__ts li {
  display: grid; grid-template-columns: 17px 1fr; gap: 9px; align-items: start;
  font-size: 13.5px; line-height: 1.55; color: var(--color-text-secondary);
}
.tg8-footer__ts svg { width: 17px; height: 17px; fill: var(--color-primary); margin-top: 2px; }
.tg8-footer__ts-nhan { color: var(--color-text-dark); font-weight: 600; }
.tg8-footer__ts a { color: var(--color-primary); font-weight: 600; }
.tg8-footer__ts a:hover { color: var(--color-accent); }
.tg8-footer__h { margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--color-text-dark); }
.tg8-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* Tím + đậm y như .tg8-menu trên thanh điều hướng: cùng là danh sách chuyên mục thì nên
   nhìn giống nhau, kể cả màu khi rê chuột. */
.tg8-footer__links a { color: var(--color-primary); font-weight: 700; }
.tg8-footer__links a:hover { color: var(--color-accent); }

.tg8-footer__mxh { display: flex; flex-wrap: wrap; gap: 8px; }
.tg8-footer__mxh a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--color-box-border, #e3e5ea);
  color: var(--color-text-secondary);
  transition: background .12s, border-color .12s, color .12s;
}
.tg8-footer__mxh a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tg8-footer__mxh svg { width: 18px; height: 18px; fill: currentColor; }
.tg8-footer__dmca { margin-top: 20px; }
.tg8-footer__dmca img { max-width: 130px; height: auto; display: block; }

/* logo riêng của chân trang: .tg8-logo bị đổi sang chữ trắng ở breakpoint di động để hợp
   header tím, dùng lại ở đây thì trên điện thoại chữ trắng nằm trên nền xám, mất hút. */
.tg8-fl { display: inline-flex; align-items: center; gap: 8px; }
.tg8-fl:hover { text-decoration: none; }
.tg8-fl__anh { display: block; max-height: 42px; width: auto; }
.tg8-fl--anh .tg8-fl__kh { margin-top: 6px; }
.tg8-fl__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; font-size: 18px;
  background: var(--color-primary); color: #fff;
}
.tg8-fl__chu { display: flex; flex-direction: column; line-height: 1; }
.tg8-fl__ten { font-size: 21px; font-weight: 700; letter-spacing: -0.5px; color: var(--color-primary); }
.tg8-fl__kh { margin-top: 5px; font-size: 11.5px; color: var(--color-text-secondary); }

/* --- hàng 2: nền tím, chữ trắng --- */
.tg8-footer__cuoi { background: var(--color-primary); color: #fff; }
.tg8-footer__cuoi-in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 14px; padding-bottom: 14px;
}
.tg8-footer__bq { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .92); }
.tg8-footer__trang { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.tg8-footer__trang a { color: #fff; font-size: 13px; }
.tg8-footer__trang a:hover { color: #fff; text-decoration: underline; }

/* =========================================================================
   17. MISC: phân trang, bình luận, 404, page, placeholder
   ========================================================================= */
.tg8-pagination { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.tg8-pagination .page-numbers { display: inline-block; min-width: 34px; text-align: center; padding: 5px 10px; border: 1px solid var(--color-border-medium); border-radius: var(--radius); background: #fff; color: var(--color-text); font-size: 14px; }
.tg8-pagination .page-numbers.current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.tg8-pagination a.page-numbers:hover { background: var(--color-primary-soft); text-decoration: none; }

.tg8-comments { margin-top: 28px; }
.tg8-comments__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.tg8-comments .commentlist { list-style: none; padding: 0; margin: 0; }
.tg8-comments .comment-form input[type="text"], .tg8-comments .comment-form input[type="email"], .tg8-comments .comment-form input[type="url"], .tg8-comments .comment-form textarea { width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid var(--color-border-medium); border-radius: var(--radius); font: inherit; }
.tg8-comments .comment-form .submit { background: var(--color-primary); color: #fff; border: none; padding: 8px 18px; border-radius: var(--radius); font-size: 14px; }

.tg8-404 { text-align: center; padding: 50px 0; }
.tg8-404__code { font-size: 80px; font-weight: 700; color: var(--color-primary); line-height: 1; }
.tg8-404 h1 { font-size: 24px; margin: 10px 0; }
.tg8-404 .tg8-search { margin: 0 auto; }

.tg8-page { min-width: 0; }
.tg8-page__title { font-size: 24px; font-weight: 700; line-height: 34px; margin-bottom: 12px; }

.tg8-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font-size: 28px; }
.tg8-ph--0 { background: linear-gradient(135deg,#6a11cb,#2575fc); }
.tg8-ph--1 { background: linear-gradient(135deg,#ff512f,#dd2476); }
.tg8-ph--2 { background: linear-gradient(135deg,#11998e,#38ef7d); }
.tg8-ph--3 { background: linear-gradient(135deg,#f7971e,#ffd200); }
.tg8-ph--4 { background: linear-gradient(135deg,#3a1c71,#d76d77); }
.tg8-ph--5 { background: linear-gradient(135deg,#1f4037,#99f2c8); }
.tg8-ph--6 { background: linear-gradient(135deg,#eb3349,#f45c43); }
.tg8-ph--7 { background: linear-gradient(135deg,#00c6ff,#0072ff); }
.tg8-ph--small { font-size: 16px; }

/* =========================================================================
   18. RESPONSIVE
   ========================================================================= */
@media (max-width: 1023px) {
  /* Máy tính bảng: chữ menu 15,5px của PC làm rơi mục cuối khỏi hàng, giữ cỡ cũ. */
  .tg8-menu > li > a { font-size: 13.5px; }
  .tg8-cols-2 { grid-template-columns: 1fr; }
  .tg8-cols-3 { grid-template-columns: 1fr; }
  /* Màn hẹp: hộp mục con xuống dưới nội dung, để H1 và bài viết lên đầu trang (trên đầu đã có
     hàng nút mục con ở phần mô tả chuyên mục). */
  .tg8-cols-3 > .tg8-sidebar-box { order: 2; }
  /* Đã có hàng nút mục con ở đầu trang thì bỏ hộp trùng danh sách ở cuối trang. */
  .tg8-cols-3--co-pills > .tg8-sidebar-box { display: none; }
  .tg8-iconstrip { display: none; }
  .tg8-sidebar-box { position: static; max-height: none; }
  .tg8-article { max-width: none; }
  .tg8-header__search { width: 100%; }
}

@media (max-width: 767px) {
  :root { --nav-height: 36px; }
  /* Header tím, logo giữa, nút ☰ và 🔍 hai bên. Bỏ nét ngăn: ở đây header tím liền một
     khối với thanh menu, thêm một gạch xám vào giữa chỉ làm bẩn. */
  .tg8-header { background: var(--color-primary); border-bottom: none; }
  /* position: static để ô tìm kiếm thả xuống bám theo .tg8-header (sticky) và phủ hết bề ngang,
     không bị thụt 16px theo lề của .tg8-container như trước. */
  .tg8-header__inner { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; height: 54px; position: static; }
  .tg8-icon-btn { display: inline-flex; }
  .tg8-icon-btn--menu { grid-column: 1; }
  .tg8-icon-btn--search { grid-column: 3; }
  .tg8-logo { grid-column: 2; justify-content: center; }
  .tg8-logo__icon { background: #fff; color: var(--color-primary); width: 30px; height: 30px; font-size: 16px; }
  /* Logo tím nằm trên header tím thì mất hút. Logo là một màu phẳng trên nền trong suốt
     nên bộ lọc này đổi nó thành trắng tinh, không cần làm thêm file ảnh thứ hai. */
  .tg8-logo--anh .custom-logo { filter: brightness(0) invert(1); max-height: 40px; }
  .tg8-logo--anh .tg8-logo__tagline { margin-top: 3px; }
  .tg8-logo__name { color: #fff; font-size: 22px; }
  .tg8-logo__tagline { color: rgba(255,255,255,.85); }
  .tg8-logo__tagline::before, .tg8-logo__tagline::after { background: rgba(255,255,255,.5); }
  /* Ô tìm kiếm thả xuống dưới header tím (19/11/2026). Trước đây form giữ height:32px của bản PC
     trong khi có thêm padding, nên nền trắng chỉ cao nửa ô và ô nhập tràn đè lên nội dung. */
  .tg8-header__search {
    display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; width: auto; height: auto;
    padding: 10px 16px 12px; background: #fff; z-index: 99;
    box-shadow: 0 8px 18px rgba(30, 10, 50, .16);
  }
  .tg8-header.is-search-open .tg8-header__search { display: flex; animation: tg8-tha-xuong .16s ease-out; }
  .tg8-header__search .tg8-search__input {
    height: 42px; padding: 0 14px; font-size: 16px; /* 16px: iPhone không tự phóng to khi chạm vào ô */
    border: 1.5px solid var(--color-primary); border-right: none; background: #faf8fc;
  }
  .tg8-header__search .tg8-search__input:focus { background: #fff; }
  .tg8-header__search .tg8-search__btn { width: 48px; height: 42px; }
  .tg8-header__search .tg8-search__btn svg { width: 18px; height: 18px; }
  .tg8-header.is-search-open .tg8-icon-btn--search { background: rgba(255, 255, 255, .18); border-radius: var(--radius); }
  .tg8-icon-btn--search span { display: flex; }
  .tg8-icon-btn--search .tg8-ico-dong,
  .tg8-header.is-search-open .tg8-icon-btn--search .tg8-ico-mo { display: none; }
  .tg8-header.is-search-open .tg8-icon-btn--search .tg8-ico-dong { display: flex; }

  /* Header dính trên, nav cuộn ngang không dính, panel chuyên mục cố định dưới header */
  .tg8-header { position: sticky; top: 0; z-index: 100; }
  .tg8-nav { position: static; }
  .tg8-nav__toggle { display: none; }
  .tg8-megamenu {
    position: fixed; top: 54px; left: 0; right: 0; z-index: 99;
    max-height: calc(100vh - 54px); overflow-y: auto;
    border: none; border-top: 1px solid var(--color-border);
  }
  .tg8-menu { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; width: 100%; }
  .tg8-menu::-webkit-scrollbar { display: none; }
  .tg8-menu > li > a { font-size: 14px; font-weight: 400; line-height: 38px; padding: 0 12px; }
  .tg8-menu .sub-menu { display: none !important; }
  .tg8-megamenu { padding: 8px 0 12px; }
  .tg8-megamenu__grid { grid-template-columns: 1fr; gap: 0; }
  .tg8-megamenu__silo > a { padding: 10px 16px 8px; margin: 0; border-bottom: 1px solid var(--color-border); }
  .tg8-megamenu__silo ul { padding: 4px 16px 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }

  /* Hero: ảnh trên, tiêu đề dưới (như bản mobile thật) */
  .tg8-slider { height: auto; background: transparent; }
  .tg8-slider__track { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #1f1f1f; }
  .tg8-slide { position: absolute; inset: 0; }
  .tg8-slide__overlay { display: none; }
  .tg8-slide__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 14px; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); }
  .tg8-slide__title { font-size: 19px; line-height: 1.3; }
  .tg8-slider__dots { bottom: 6px; right: 8px; }
  .tg8-featured { height: auto; }

  .tg8-grid { gap: 16px 12px; }
  .tg8-card__title { font-family: var(--font-family); font-size: 16px; font-weight: 400; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  .tg8-listitem { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .tg8-listitem__title { font-family: var(--font-family); font-size: 16px; font-weight: 400; }
  .tg8-listitem__excerpt { display: none; }

  .tg8-article__title { font-size: 22px; line-height: 30px; }
  /* Bảng trang sống trên điện thoại: cho TRƯỢT NGANG thay vì nén cột.
     Ở 375px mà để bảng co vào vừa màn thì "Hanwha Life Esports" xuống 4 dòng, đọc rất mệt;
     đặt bề ngang tối thiểu thì mỗi cột đủ chỗ và người đọc vuốt ngang như mọi bảng số liệu. */
  .tg8-article__body .tg8-live__table { min-width: 520px; }
  /* Bảng thường trong bài: cho ngắt chữ ở bất kỳ đâu (tên miền, cụm dài không dấu cách) để bảng
     gói trong bề ngang màn hình, không đẩy cả trang lắc ngang. Bảng mã giftcode có khung cuộn riêng ở trên. */
  .tg8-article__body td, .tg8-article__body th { overflow-wrap: anywhere; }
  .tg8-article__body .tg8-live__table td, .tg8-article__body .tg8-live__table th { overflow-wrap: normal; }
  .tg8-article__body .tg8-live__table th,
  .tg8-article__body .tg8-live__table td { padding: 9px 10px; }
  .tg8-live__scroll { position: relative; }
  .tg8-live__scroll::after { content: ""; position: absolute; top: 0; right: 0; width: 24px; height: 100%; pointer-events: none; background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.95)); }
  /* Chân trang xuống một cột; hàng tím căn giữa vì hai khối chồng lên nhau, căn trái
     thì dòng bản quyền và dãy link lệch nhau nhìn như lỗi. */
  .tg8-footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .tg8-footer__main { padding: 24px 0 26px; }
  .tg8-footer__tom { max-width: none; }
  .tg8-footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
  .tg8-footer__cuoi-in { flex-direction: column; justify-content: center; text-align: center; gap: 10px; }
  .tg8-footer__trang { justify-content: center; gap: 6px 16px; }
}

@media (max-width: 480px) {
  .tg8-logo__name { font-size: 20px; }
  .tg8-logo__tagline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tg8-slide { transition: none; }
}

/* Liên kết tới bài chưa đăng: hiện như chữ thường, không gạch chân, không màu link.
   Cố ý KHÔNG làm nó nhìn giống link hỏng - với người đọc đây chỉ là một cụm chữ. */
.tg8-chua-dang {
	color: inherit;
}
/* Người biên tập thì thấy dấu hiệu, để biết link này khách chưa bấm được. */
a[data-tg8-chua-dang] {
	border-bottom: 1px dashed currentColor;
}
a[data-tg8-chua-dang]::after {
	content: " (chưa đăng)";
	font-size: .85em;
	opacity: .7;
}

/* ─── Trang chủ: khối chuyên mục, chip liên kết ────────────────────────────── */
/* Mỗi khối là một cửa vào tầng silo. Viền trên mảnh thay cho khoảng trắng lớn,
   để trang dài nhưng vẫn đọc ra từng phần. */
.tg8-home-sec { margin: 0 0 28px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.tg8-home-sec:first-of-type { border-top: 0; padding-top: 0; }
.tg8-home-sec .tg8-section__title a { color: inherit; }
.tg8-home-sec .tg8-section__title a:hover { color: var(--color-primary); text-decoration: none; }
.tg8-home-sec__dan { margin: -4px 0 12px; font-size: 13px; color: var(--color-text-secondary); }
.tg8-home-sec__phu { margin: 14px 0 8px; font-size: 13px; font-weight: 700; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .03em; }
.tg8-home-sec .tg8-grid { margin-bottom: 0; }

.tg8-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--gap); }
.tg8-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--color-box-border); border-radius: var(--radius);
  background: var(--color-white); font-size: 13px; line-height: 1.4; color: var(--color-text);
}
.tg8-chip:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.tg8-chip__n { font-size: 11px; color: var(--color-text-secondary); }
.tg8-chip:hover .tg8-chip__n { color: inherit; }

/* Chuyên mục con: nền nhạt để tách khỏi chip hồ sơ, vì hai hàng chip hay đứng gần nhau. */
.tg8-chips--muc .tg8-chip { background: var(--color-primary-soft); border-color: transparent; }
.tg8-chips--muc .tg8-chip:hover { border-color: var(--color-primary); }


@media (max-width: 600px) {
  .tg8-home-sec { margin-bottom: 22px; }
  .tg8-chip { font-size: 12px; padding: 4px 10px; }
}

/* Lịch thi đấu ở sidebar: danh sách dọc, mỗi dòng ghi đủ tên giải.
   Không dùng .tg8-mini vì khối đó có ảnh thu nhỏ, còn đây chỉ cần chữ. */
.tg8-side-lich { list-style: none; margin: 0; padding: 0; }
.tg8-side-lich li { border-bottom: 1px solid var(--color-border); }
.tg8-side-lich li:last-child { border-bottom: 0; }
.tg8-side-lich a {
  display: block; padding: 9px 0 9px 16px; position: relative;
  font-family: var(--font-title); font-size: 14px; line-height: 1.4; font-weight: var(--title-weight); color: var(--color-text);
}
/* Dấu đầu dòng tự vẽ, canh theo dòng chữ đầu tiên kể cả khi tên dài xuống hai dòng. */
.tg8-side-lich a::before {
  content: ""; position: absolute; left: 2px; top: 15px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary-light);
}
.tg8-side-lich a:hover { color: var(--color-primary); text-decoration: none; }
.tg8-side-lich a:hover::before { background: var(--color-primary); }

/* ─── Căn đều hai mép cho chữ trong bài ───────────────────────────────────── */
/* Chỉ áp cho ĐOẠN VĂN và GẠCH ĐẦU DÒNG trong thân bài. Không áp cho đề mục, ô bảng,
   chú thích ảnh hay nút - những thứ đó ngắn, căn đều vào là giãn chữ trông kỳ. */
.tg8-article__body p,
.tg8-article__body li,
.tg8-faq__answer p,
.tg8-faq__answer li,
.tg8-cat-desc p {
  text-align: justify;
  /* Căn đều mà gặp chuỗi dài không chỗ ngắt (địa chỉ, tên file) thì chữ tràn ra
     ngoài khung. Dòng này buộc nó xuống dòng thay vì phá bố cục. */
  overflow-wrap: break-word;
}

/* Trừ ra những khối đã tự căn sẵn: thẻ hồ sơ tuyển thủ căn giữa, ghi chú dưới bảng
   dữ liệu. Không trừ thì luật trên đè lên và thẻ hồ sơ lệch hẳn. */
.tg8-article__body .tg8es-pcard p,
.tg8-article__body .tg8es-pcard li,
.tg8-article__body .tg8-live__note,
.tg8-article__body figcaption p {
  text-align: inherit;
}

/* Gạch đầu dòng trong blockquote (khối "Bài liên quan") KHÔNG căn đều.
   Mỗi dòng ở đó là một nhãn link ngắn; căn đều thì dòng nào dài quá một chút sẽ bị kéo giãn
   hết chiều rộng rồi rớt một hai chữ xuống dòng dưới - trên điện thoại nhìn rất rõ. */
.tg8-article__body blockquote li { text-align: left; }

/* H1 trang chủ: có mặt để nói trang này là gì, nhưng không được át slider ngay dưới -
   trang tin thì ảnh bài mới là thứ người đọc nhìn trước. */
.tg8-home-h1 {
  /* Chủ dự án yêu cầu to thêm 50%: 19px -> 28px, mobile 17px -> 25px. */
  font-size: 28px; line-height: 1.3; font-weight: 700;
  color: var(--color-text-dark); margin: 0 0 14px;
}
@media (max-width: 600px) { .tg8-home-h1 { font-size: 25px; margin-bottom: 12px; } }

/* Danh sách tin ngay sau hàng từ khoá, không có tiêu đề khối ngăn ở giữa nên tự nhấc
   một chút cho khỏi dính vào hàng thẻ. */
.tg8-trending + .tg8-list { margin-top: 4px; }

/* Tiêu đề phụ trong khối sidebar (Đội tuyển / Tuyển thủ). Nhỏ và nhạt hơn tiêu đề khối,
   để người đọc thấy ngay đây là hai nhóm trong cùng một khối chứ không phải hai khối. */
.tg8-side-phu {
  margin: 12px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--color-text-secondary);
}
.tg8-side-block .tg8-side-lich + .tg8-side-phu { margin-top: 14px; }

/* ─── Đề mục cuối bài phải bằng đề mục trong bài ──────────────────────────── */
/* H2 trong thân bài là 20px, nhưng "Bài viết cùng chuyên mục" lại 17px và "Để lại bình luận"
   chỉ là h3 - cùng một cấp mà chỗ to chỗ bé. Chỉ nâng những đề mục NẰM TRONG bài; đề mục ở
   sidebar (Mục lục 13px, Lịch thi đấu...) và ở trang chủ giữ nguyên, vì chúng là thành phần
   khác hẳn, phóng to lên là hỏng tỉ lệ. */
.tg8-article .tg8-section__title,
.tg8-comments__title,
.tg8-comments .comment-reply-title {
  font-size: 20px;
  line-height: 32px;
}

/* ─── Form bình luận: Tên và Email đứng cùng một dòng trên PC ──────────────── */
/* Dùng lưới ngay trên form nên không phải bọc thêm thẻ: mọi ô chiếm trọn chiều ngang,
   riêng Tên và Email mỗi ô một cột. Dưới 601px không áp lưới nên chúng tự xếp dọc. */
@media (min-width: 601px) {
  .tg8-comments .comment-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }
  .tg8-comments .comment-form > * { grid-column: 1 / -1; }
  .tg8-comments .comment-form-author { grid-column: 1; }
  .tg8-comments .comment-form-email { grid-column: 2; }
}

/* ─── Khu bình luận ────────────────────────────────────────────────────────── */
/* Lưới hai cột: ảnh bên trái, mọi thứ còn lại bên phải. Bản mặc định của WordPress xếp
   ảnh - tên - ngày thành ba dòng riêng nên một bình luận một dòng chữ vẫn cao năm dòng. */
.tg8-comments .commentlist { list-style: none; margin: 0 0 18px; padding: 0; }
.tg8-comments .commentlist ul.children {
  /* Mặc định trình duyệt trả về dấu chấm tròn và thụt 21px - vừa thừa dấu, vừa nông quá
     để nhận ra đây là câu trả lời. Thay bằng một vạch dọc, nhìn ra luồng ngay. */
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--color-primary-soft);
}
.tg8-bl { padding: 0; border: 0; }

.tg8-bl__hop {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.tg8-comments .commentlist > .tg8-bl:last-child > .tg8-bl__hop { border-bottom: 0; }

.tg8-bl__anh {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-primary-soft); display: block;
}

/* Tên, huy hiệu và ngày đứng chung một dòng. Ngày là thông tin phụ nên nhỏ và nhạt,
   KHÔNG tô màu link như bản cũ - nó không dẫn đi đâu mà người đọc cần. */
.tg8-bl__dau { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 3px; }
.tg8-bl__ten { font-size: 14px; font-weight: 700; color: var(--color-text-dark); }
.tg8-bl__ngay { font-size: 12px; color: var(--color-text-secondary); }

/* Trả lời của toà soạn phải nổi hơn: trên trang có người hỏi "chỗ giảm 40% có nên mua
   không", câu trả lời của ban biên tập chính là thứ cần đọc nhất. */
.tg8-bl__huy {
  font-size: 11px; font-weight: 700; line-height: 1.6;
  padding: 0 7px; border-radius: var(--radius);
  background: var(--color-primary-soft); color: var(--color-primary);
}
.tg8-bl--toasoan > .tg8-bl__hop { background: #fcfbfd; }

.tg8-bl__noi { font-size: 15px; line-height: 23px; color: var(--color-text); }
.tg8-bl__noi p { margin: 0 0 8px; }
.tg8-bl__noi p:last-child { margin-bottom: 0; }
.tg8-bl__cho { margin: 0 0 6px; font-size: 13px; color: var(--color-accent); }

.tg8-bl__dap { margin-top: 5px; }
.tg8-bl__dap a { font-size: 13px; font-weight: 700; color: var(--color-primary); }
.tg8-bl__ping { padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--color-border); }

@media (max-width: 600px) {
  /* Màn hẹp: ảnh nhỏ lại và vạch thụt nông hơn, để câu trả lời lồng ba cấp vẫn còn chỗ đọc. */
  .tg8-bl__hop { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .tg8-bl__anh { width: 30px; height: 30px; }
  .tg8-comments .commentlist ul.children { padding-left: 10px; }
  .tg8-bl__noi { font-size: 14.5px; }
}

/* ─── Mục lục trên màn một cột: nút nổi + ngăn kéo ─────────────────────────── */
/* Điện thoại và tablet dọc (từ 1023px trở xuống, đúng mốc lưới về một cột). Trước đây mục lục và
   khối chuyên mục xếp trên đầu bài, đoạn mở đầu bị đẩy xuống 857px trong khi màn cao 812px: khách
   mở bài ra không thấy nội dung. Nay chúng ra khỏi luồng trang, mục lục chờ sau một nút bấm.
   Khối chuyên mục chỉ ẩn bằng CSS nên link vẫn nằm trong HTML, và breadcrumb vẫn dẫn về silo. */
.tg8-toc-nut, .tg8-toc-man, .tg8-toc__dong { display: none; }

@media (max-width: 1023px) {
  /* display: contents để hai lớp vỏ không tạo ô lưới rỗng, nếu không bài bị thừa một khoảng trống
     ở trên. Mục lục được gắn position: fixed nên cũng ra khỏi lưới. */
  .tg8-sidebar-stack, .tg8-sidebar-stack .tg8-sticky { display: contents; }
  .tg8-sidebar-stack .tg8-sidebar-box, .tg8-sidebar-widgets { display: none; }

  .tg8-toc {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 210;
    width: min(86vw, 340px); margin: 0; padding: 16px 0 24px;
    border-width: 0 1px 0 0; border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: 0 0 24px rgba(0, 0, 0, .18);
    overflow-y: auto; overscroll-behavior: contain;
    /* visibility: lúc đóng, các link không nhận được phím Tab. Khi đóng nó đợi trượt xong mới
       ẩn; khi mở nó phải hiện NGAY (0s), nếu không lệnh đưa tiêu điểm vào nút đóng sẽ hụt vì
       khối vẫn đang hidden ở đầu transition. */
    visibility: hidden; transform: translateX(-100%);
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  .tg8-toc.is-open { visibility: visible; transform: none; transition: transform .22s ease, visibility 0s; }
  .tg8-toc__title { padding: 0 52px 12px 16px; font-size: 14px; }
  .tg8-toc__list a { padding-top: 10px; padding-bottom: 10px; }
  .tg8-toc__list a::before { top: 10px; }

  .tg8-toc__dong {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 4px; right: 6px; width: 44px; height: 44px;
    padding: 0; border: 0; background: none; color: var(--color-text-secondary); cursor: pointer;
  }
  .tg8-toc__dong svg { width: 20px; height: 20px; }

  .tg8-toc-man.is-open { display: block; position: fixed; inset: 0; z-index: 205; background: rgba(0, 0, 0, .45); }
  html.tg8-khoa-cuon { overflow: hidden; }

  /* Góc dưới bên phải: ngón cái với tới, và không đè lên đầu dòng chữ đang đọc. */
  .tg8-toc-nut {
    display: inline-flex; align-items: center; gap: 6px;
    position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 80;
    min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius);
    background: var(--color-primary); color: #fff;
    font: inherit; font-size: 14px; font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28); cursor: pointer;
  }
  .tg8-toc-nut svg { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tg8-toc, .tg8-toc.is-open { transition: none; }
}

/* ==========================================================================
   Form liên hệ
   ========================================================================== */
.tg8-lh, .tg8-lh__xong { scroll-margin-top: 70px; }
.tg8-lh { margin: 16px 0 24px; padding: 18px; border: 1px solid var(--color-box-border); border-radius: var(--radius); background: #fff; }
.tg8-article__body .tg8-lh p { margin: 0 0 14px; text-align: left; }
.tg8-lh__o label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 700; color: var(--color-text-dark); }
.tg8-lh__sao { color: var(--color-primary); }
.tg8-lh input[type="text"], .tg8-lh input[type="email"], .tg8-lh input[type="url"], .tg8-lh select, .tg8-lh textarea {
  display: block; width: 100%; max-width: 100%; padding: 9px 10px; border: 1px solid var(--color-border-medium); border-radius: var(--radius);
  background: #fff; color: var(--color-text-dark); font: inherit; font-size: 16px; line-height: 24px;
}
.tg8-lh textarea { min-height: 150px; resize: vertical; }
.tg8-lh input:focus, .tg8-lh select:focus, .tg8-lh textarea:focus { outline: 2px solid var(--color-primary); outline-offset: -1px; border-color: var(--color-primary); }
.tg8-lh [aria-invalid="true"] { border-color: #c62828; }
.tg8-lh__loi-o { display: block; margin-top: 5px; color: #c62828; font-size: 13.5px; font-weight: 400; line-height: 20px; }
.tg8-lh__tom-tat { margin-bottom: 14px; padding: 10px 12px; border-left: 3px solid #c62828; border-radius: var(--radius); background: #fdecea; color: #8e1c1c; font-size: 14.5px; line-height: 22px; }
.tg8-lh__bay { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tg8-lh__dong-y label { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 21px; cursor: pointer; }
.tg8-lh__dong-y input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-primary); }
.tg8-lh__nut { min-height: 44px; padding: 0 26px; border: 0; border-radius: var(--radius); background: var(--color-primary); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.tg8-lh__nut:hover { filter: brightness(1.1); }
.tg8-lh__nut:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.tg8-lh__xong { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 24px; padding: 16px 18px; border: 1px solid var(--color-box-border); border-left: 3px solid var(--color-primary); border-radius: var(--radius); background: #fff; text-align: left; }
@media (min-width: 601px) {
  .tg8-lh__hang { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
}
@media (max-width: 600px) {
  .tg8-lh { padding: 14px; }
  .tg8-lh__nut { width: 100%; }
}
