/*
Theme Name: APKPure Skin (App System)
Theme URI: https://github.com/hailstonelabs/wp-app-system-template
Description: Skin kho app/game dựng trên App System core, UI bám theo apkpure.com. Toàn bộ giao diện nằm ở templates/ + style.css; inc/system/ giữ nguyên nên đổi UI không phải viết lại logic. Nhận diện (logo, favicon, tên site, mô tả) để trong assets/brand/ và config.php — xem assets/brand/README.md trước khi chạy production.
Author: Hailstone Labs
Author URI: https://hailstonelabs.com/
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apkpure-skin
Tags: app-store, download, multilingual
*/

/* ==========================================================================
   0. TOKENS — số đo bám theo bản tham chiếu (xem UI-MISMATCH.md mục 1)
   ========================================================================== */
:root {
  --bg:         #f2f5f9;
  --surface:    #ffffff;
  --surface-2:  #f2f5f9;
  --text:       #5e5e5e;   /* màu tên app ở bản gốc */
  --muted:      #8b8b8b;   /* dòng phụ */
  --faint:      #a6a6a6;   /* ngày bài viết */
  --line:       #e8eaed;
  --line-2:     #e7e7e7;   /* viền ô trang chi tiết: icon, lưới info, thẻ review */
  --line-soft:  #eff3f9;   /* vạch ngăn giữa các dòng phiên bản */
  --surface-3:  #f9fafb;   /* nền thanh tổng hợp đánh giá */
  --band:       #f8f9fa;   /* băng dải tab bài viết — KHÁC --surface-2 (#f2f5f9) */
  --head:       #3c4043;   /* tiêu đề h2 của trang chi tiết */
  --link:       #00a6ed;   /* link xanh dương: how-to, tag, review */
  --link-soft:  #dbf4ff;   /* nền tag khi rê chuột */
  --brand-hover:#24dc83;   /* nút xanh khi rê chuột */
  --brand:      #24cd77;
  --brand-dark: #16a75b;
  --brand-soft: #e8faf0;
  --on-brand:   #ffffff;
  --star:       #fa8b16;   /* sao VÀ chữ điểm đều màu này */
  --btn-hover:  #d6f5e5;   /* nền nút .btn khi rê chuột */
  --chevron:    #8b8b8b;   /* mũi chevron sau tiêu đề khối */
  --pill-xapk-bg: #ece4ff;
  --pill-xapk-fg: #4a21c7;
  --shadow:     none;   /* panel không đổ bóng */

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 0px;    /* panel bản tham chiếu vuông góc, không bo */
  --r-icon: 15%;

  --wrap: 1200px;
  --main: 868px;
  --side: 316px;
  --col-gap: 16px;

  /* Hệ spacing lấy nguyên từ source (3 mốc: ≥996 / 720–995 / ≤719):
       --module-spacing      8 / 4 / 4     khoảng hở giữa các panel
       --app-horizontal-spacing 16 / 12 / 8   khe ngang giữa các thẻ
       --app-vertical-spacing   12          khe dọc giữa các hàng           */
  --gap-h: 16px;
  --gap-v: 12px;
  --module-gap: 8px;
  --header-h: 70px;   /* +1px border-bottom = 71px tổng, khớp bản tham chiếu */

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   1. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  /* CHÂN TRANG DÍNH ĐÁY: trang ngắn (vd /reviews/ lúc chưa có bài, thân chỉ
     cao 397) thì chân trang trước đây dừng giữa màn, chừa 235px trống bên
     dưới. Cột dọc + min-height 100vh đẩy nó xuống đáy; trang dài vẫn trôi
     bình thường vì đây là min-height chứ không phải height.
     Reset đã đặt box-sizing: border-box nên padding-top 45px của header cố
     định ở mobile nằm TRONG 100vh, không đẻ thêm thanh cuộn. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* dvh: trên mobile, 100vh tính cả thanh công cụ trình duyệt nên hụt/dư. */
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }

.site-main   { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 500; }
ul, ol { margin: 0; padding: 0; list-style: none; }   /* breadcrumb dùng <ol> — phải tắt số thứ tự */
table { border-collapse: collapse; width: 100%; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }

/* --wrap là bề rộng NỘI DUNG (1200). Thêm padding vào max-width để lòng trong
   đúng 1200, nếu không lưới 868+16+316 không đủ chỗ và cột chính bị co lại. */
.wrap { max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding: 0 16px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ==========================================================================
   2. HEADER — cao 71px, logo + nav có dropdown + icon search + tài khoản
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid #e7e7e7;
}
.site-header__bar { display: flex; align-items: center; gap: 56px; height: var(--header-h); }
/* Bản gốc KHÔNG cap lớp trong của header ở 1200 mà cho chạy theo lề 5%: màn
   càng rộng logo càng bám mép chứ không dồn vào giữa. Ở 1345 ra 1211 và logo
   x=67 — đúng số đo được. Chỉ áp từ 720 trở lên; mobile giữ lưới 45px riêng. */
@media (min-width: 720px) {
  .site-header__bar { max-width: none; margin: 0 5%; padding: 0; }
}

.brand { display: flex; align-items: center; gap: 9px; flex: none; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  font-size: 17px; font-weight: 700;
}
.brand:hover { color: inherit; }
.brand--img { flex: none; }
.brand--img picture { display: block; }
.brand--img img { display: block; height: 32px; width: auto; }

.site-nav-wrap { flex: 1 1 auto; min-width: 0; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav > li { position: relative; }
/* Chữ nav bản gốc: 14/500, cao dòng 26, màu #777 (không phải màu chữ chính). */
.site-nav a, .site-nav .nav-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 0 12px; height: 46px; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; line-height: 26px; color: #777; border-radius: var(--r-md);
}
.site-nav a:hover, .site-nav .nav-toggle:hover { color: var(--brand-dark); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--brand-dark); font-weight: 500; }
.nav-caret { width: 9px; height: 9px; transition: transform .15s ease; }
[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-sub {
  position: absolute; top: 100%; left: 0; min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: 0 8px 24px -8px rgba(0,0,0,.2);
}
.nav-sub[hidden] { display: none; }
.nav-sub a { height: 36px; font-size: 14px; }

.header-actions { display: flex; align-items: center; flex: none; margin-left: auto;
                  align-self: stretch; }
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: none; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); }

/* Mặt nạ tìm kiếm. MẶC ĐỊNH chỉ là icon (đệm 9/12, không viền, không chữ) —
   bản gốc chỉ bung thành hộp 300px từ 1155px trở lên. Bấm vào thì ẩn nav + mặt
   nạ và bung ô nhập thật ra chỗ nav. */
.search-box {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  box-sizing: border-box; height: 40px; padding: 9px 12px;
  margin-right: 12px; background: none; text-align: left; border: 0;
}
.search-box:hover { color: var(--text); }
.search-box__icon { flex: none; width: 20px; height: 20px; color: #666; }
.search-box__text { display: none; font-size: 12px; line-height: 14px; color: #c5c5c5;
                    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1155px) {
  .search-box { width: 300px; margin-right: 20px;
                border: 1px solid #eee; border-radius: 8px; }
  .search-box:hover { border-color: var(--line); }
  .search-box__text { display: block; }
}
.icon-btn--search { display: none; }   /* chỉ dùng ở mobile */

/* Ô nhập bung ra: rộng 600 (bản gốc 600×46) và CĂN GIỮA khoảng trống còn lại
   sau khi nav ẩn — bản gốc dùng `left: 50%; margin-left: -300px`. Để nó dính
   sát logo là sai: trên màn rộng ô nằm lệch hẳn về trái.
   Nút × neo tuyệt đối bên phải nên không kéo lệch tâm của ô nhập. */
.hsearch { flex: 1 1 auto; min-width: 0; position: relative;
           display: flex; align-items: center; justify-content: center; }
.hsearch[hidden] { display: none; }
.hsearch .search { flex: 0 1 600px; max-width: 600px; }
/* Bản gốc ở đầu trang: ô TRẮNG viền mảnh, kính lúp nằm BÊN TRÁI, không có nút
   xanh (ô ở sidebar thì vẫn giữ nút xanh — xem .side-search). */
.hsearch .search__field input {
  height: 46px; padding: 0 14px 0 42px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.hsearch .search__field input:focus { border-color: var(--line); }
.hsearch .search__field button {
  left: 12px; right: auto; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; background: none; color: #666; border-radius: 0;
}
.hsearch__close { position: absolute; right: 0; top: 50%; transform: translateY(-50%);
                  display: grid; place-items: center; width: 36px; height: 36px;
                  border: 0; background: none; cursor: pointer; color: var(--muted); }
.hsearch__close:hover { color: var(--text); }
/* Khi đang tìm: giấu nav và mặt nạ, đúng như .nav_new.searching của bản gốc. */
.site-header__bar.is-searching .site-nav-wrap,
.site-header__bar.is-searching .search-box { display: none; }

/* Tấm tài khoản 138×70: nền xám, cao bằng thanh, sát mép phải. */
.header-user { position: relative; display: flex; align-items: center; justify-content: center;
               align-self: stretch; min-width: 138px; background: #f5f5f5; }
.header-user__link { display: flex; align-items: center; gap: 8px; padding: 0 12px;
                     font-size: 14px; color: #777; border: 0; background: none; cursor: pointer; }
/* Menu tài khoản: thả xuống từ mép phải của tấm xám. */
.nav-sub--acct { top: 100%; right: 0; left: auto; min-width: 160px; }
.nav-sub--acct a { height: 36px; font-size: 14px; display: flex; align-items: center;
                   padding: 0 12px; border-radius: var(--r-md); color: var(--text); }
.nav-sub--acct a:hover { background: var(--surface-2); color: var(--brand-dark); }
.header-user__link:hover { color: var(--brand-dark); }
.header-user__name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ô tìm kiếm — dùng ở sidebar và trong lớp phủ */
.search { width: 100%; }
.search__field { position: relative; display: flex; }
.search__field input {
  width: 100%; height: 38px;
  padding: 0 44px 0 14px;
  font: inherit; color: var(--text);
  background: var(--surface-2);
  border: 1px solid transparent; border-radius: var(--r-sm);
}
.search__field input::placeholder { color: var(--faint); }
.search__field input:focus { background: var(--surface); border-color: var(--brand); outline: none; }
.search__field button {
  position: absolute; right: 3px; top: 3px;
  width: 32px; height: 32px; border: 0; border-radius: var(--r-sm);
  display: grid; place-items: center; cursor: pointer;
  background: var(--brand); color: var(--on-brand);
}
.search-overlay__box .search__field input { height: 48px; font-size: 16px; background: var(--surface); }
.search-overlay__box .search__field button { top: 6px; height: 36px; }

/* lớp phủ tìm kiếm — mở bằng icon kính lúp */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .35);
  display: grid; align-items: start; justify-items: center;
  padding-top: 15vh;
}
.search-overlay[hidden] { display: none; }
.search-overlay__box { width: min(640px, 92vw); }

/* ==========================================================================
   3. KHUNG 2 CỘT — cột chính 868px, sidebar 250px, khe 32px
   ========================================================================== */
.site-main { padding: 20px 0 32px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, var(--main)) var(--side);
  gap: var(--col-gap);
  align-items: start;
  justify-content: center;
}
.layout--full { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 995px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
}

/* Trang tĩnh (Terms, Privacy, About, Contact…): nội dung cần đệm để không
   sát mép thẻ, và giới hạn bề rộng dòng cho dễ đọc văn bản dài. */
.page-static { padding: 32px 40px 40px; }
.page-static .prose { max-width: 860px; }
@media (max-width: 640px) { .page-static { padding: 20px 16px 28px; } }

/* ==========================================================================
   4. RAIL — tiêu đề h3 16px/500 + mũi tên › ngay sau chữ
   ========================================================================== */
.rail { margin-bottom: var(--module-gap); }
.rail__head { display: flex; align-items: center; gap: 4px; padding: 10px 16px 12px; }
.rail__head-link { display: flex; align-items: center; gap: 4px; }
.rail-a, .rail-b, .rail-c, .rail-d,
.rail-e, .rail-f { padding: 0 16px 16px; }
.rail__title { font-size: 16px; font-weight: 500; line-height: 1.5; }
/* Chevron vẽ bằng border: ô 6×6 chỉ có viền trên + trái, xoay 135° thành mũi
   nhọn chỉ sang phải. Đo từ bản tham chiếu; dùng ký tự › cho hình dáng khác hẳn. */
.rail__arrow {
  display: block; width: 6px; height: 6px; flex: none;
  margin-left: 12px;
  border-top: 1px solid var(--chevron);
  border-left: 1px solid var(--chevron);
  transform: rotate(135deg);
}
.rail__head a:hover .rail__arrow, .rail__head a:hover .rail__title { color: var(--brand-dark); }

/* -- kiểu A: lưới 8 cột, icon 93px ------------------------------------- */
/* gap = --app-horizontal-spacing (16px). Cho ra item 90.5 ≈ 91 đúng như source;
   icon 93 là do ẢNH TRÀN ra ngoài item (xem .app-card__thumb img bên dưới). */
.rail-a { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--gap-h); }

/* -- kiểu B: lưới 3 cột, mỗi ô là 1 dòng ngang icon 74px --------------- */
.rail-b { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-v) var(--gap-h); }

/* -- kiểu C: danh sách dọc 1 cột, icon 62px (sidebar) ------------------ */
.rail-c { display: grid; gap: var(--gap-v); }

/* -- kiểu D: thẻ bài viết 2 cột, ảnh 142×80 ---------------------------- */
.rail-d { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px var(--gap-h); }

/* Tablet 720–995: bản gốc đổi list kiểu B/C thành cột-wrap cao tối đa 236px
   (tức cuộn ngang theo 3 hàng), mỗi khung 2 item. */
@media (max-width: 995px) { :root { --gap-h: 12px; --module-gap: 4px; } }
@media (max-width: 719px) { :root { --gap-h: 8px; } }

@media (min-width: 720px) and (max-width: 995px) {
  .rail-b, .rail-c {
    grid-auto-flow: column; grid-template-rows: repeat(3, auto);
    grid-template-columns: none; grid-auto-columns: calc((100% - 52px) / 2);
    overflow-x: auto;
  }
  .rail-d { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   5. CÁC KIỂU THẺ APP
   ========================================================================== */
/* A — icon vuông + tên 2 dòng + điểm.
   Chữ CĂN TRÁI theo bản tham chiếu (đo được text-align:start), không căn giữa. */
.app-card { display: block; text-align: left; }
.app-card__thumb { position: relative; }

/* Huy hiệu hạng — CHỈ 3 vị trí đầu, dạng dải ruy-băng vẽ bằng border
   (border-width 14/7/4, đáy trong suốt tạo khía chữ V). Số trắng nằm đè lên. */
.app-card__rank {
  position: absolute; top: 0; left: 12px; z-index: 2;
  width: 14px; line-height: 15px;
  font-size: 10px; font-weight: 400; color: #fff; text-align: center;
}
.app-card__rank::before {
  content: ""; position: absolute; top: 0; left: 0; z-index: -1;
  border-style: solid; border-width: 14px 7px 4px;
  border-color: var(--rank) var(--rank) transparent;
}
.app-card__rank--1 { --rank: #f3251b; }
.app-card__rank--2 { --rank: #f77e13; }
.app-card__rank--3 { --rank: #efab19; }
.app-card__thumb img {
  /* Source: item 91 nhưng icon 93 — ảnh tràn 1px mỗi bên. */
  width: calc(100% + 2px); max-width: none; margin-left: -1px;
  aspect-ratio: 1; border-radius: var(--r-icon);
  background: var(--surface-2); object-fit: cover;
}
/* Chiều cao suy từ bản gốc: Discover = 93 (icon) + 42 (khối tên) = 135;
   Popular = 135 + 14 (dòng điểm) = 149. Nên khối tên phải đúng 42 và dòng điểm 14. */
.app-card__name {
  /* Bản gốc: dy=95 (icon 93 + 2), cao CỐ ĐỊNH 40 = 2 dòng × 20, kể cả tên 1 dòng. */
  margin-top: 2px; height: 40px; font-size: 14px; line-height: 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card:hover .app-card__name { color: var(--brand-dark); }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--star); }
/* Bản gốc: điểm ở dy=139 (95+40+4), cao 10, CHỮ MÀU CAM. */
.app-card .rating { display: flex; margin-top: 4px; height: 10px; line-height: 10px; color: var(--star); }
.rating svg { width: 11px; height: 11px; fill: var(--star); }

/* B — dòng ngang icon 74px */
/* Bản gốc: chữ bắt đầu ở dx=84 (icon 74 + khe 10) và dy=0/26/52 — xếp từ trên
   xuống, KHÔNG căn giữa. 20 + 6+20 + 6+20 = 72 = đúng chiều cao ô. */
.app-tile { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; height: 72px; }
.app-tile__icon { width: 74px; height: 74px; border-radius: var(--r-icon); background: var(--surface-2); }
.app-tile__name {
  font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.app-tile:hover .app-tile__name { color: var(--brand-dark); }
.app-tile__sub { margin-top: 6px; font-size: 12px; line-height: 20px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tile__sub--strong { color: var(--text); }

/* C — dòng dọc icon 62px, có cột nút co theo nội dung */
.app-line { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: center; height: 60px; }
.app-line__icon { width: 62px; height: 62px; border-radius: var(--r-icon); background: var(--surface-2); }
.app-line__name {
  /* Bản gốc: Top New dùng fw 400, riêng khối giảm giá dùng 500. */
  font-size: 14px; font-weight: 400; line-height: 20px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.app-line:hover .app-line__name { color: var(--brand-dark); }
.app-line__sub { margin-top: 2px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.app-line__desc {
  margin-top: 12px; font-size: 12px; line-height: 20px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
/* Cột giá bên phải (bản gốc: dx=254, giá sale trên 14px/500, giá gốc dưới 12px). */
.app-line--sale { grid-template-columns: 62px minmax(0, 1fr) max-content; }
.app-line--sale .app-line__name { font-weight: 500; }
.app-line--sale .app-line__desc { margin-top: 4px; }
.app-line__price { display: grid; justify-items: end; text-align: right; }
.price__now { font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text); }
.price__was { margin-top: 6px; font-size: 12px; line-height: 20px; color: var(--muted); text-decoration: line-through; }

/* D — thẻ bài viết, ảnh 142×80 */
.article-card { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 12px; min-height: 88px; }
.article-card__img { width: 142px; height: 80px; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.article-card__title {
  font-size: 14px; font-weight: 500; line-height: 20px; height: 40px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card:hover .article-card__title { color: var(--brand-dark); }
.article-card__date { margin-top: 24px; font-size: 12px; line-height: 16px; color: var(--faint); }   /* bản gốc: dy=64 */

/* E — lưới 8 cột, icon 94px (chỉ trang chi tiết).
   Bản gốc trang chi tiết dùng bộ list KHÁC trang chủ: khe 12px và bề rộng item
   đúng bằng icon (12.5% − 10.5px của 836 = 94), nên ảnh KHÔNG tràn như kiểu A.
   Cao 170 = icon 94 + 8 + tên 2×22 + 8 + điểm 16. */
.rail-e { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.app-card--lg .app-card__thumb img { width: 100%; margin-left: 0; }
.app-card--lg .app-card__name { margin-top: 8px; height: 44px; line-height: 22px; font-weight: 700; }
.app-card--lg .rating { margin-top: 8px; height: 16px; line-height: 16px; }
/* App chưa có điểm: bản gốc VẪN chừa dòng điểm (thẻ .stars-zero) rồi cho chữ
   trong suốt, nhờ vậy mọi thẻ cao đúng 170 và hàng không bị so le. Ở đây dùng
   visibility cho rõ ý — giữ chỗ, không hiện số 0 giả. */
.app-card .rating--zero { visibility: hidden; }

/* Cột phải trang chi tiết dùng CÙNG thẻ với rail cột chính (kiểu E). Ở desktop
   CSS xếp lại thành danh sách dọc, mỗi dòng icon 60 + tên + điểm (đo 284×60);
   ở mobile nó tự trở về dạng thẻ dọc 86 — đúng cách bản gốc làm. */
.sidebar .rail-e { display: flex; flex-direction: column; gap: 8px; }
.sidebar .rail-e .app-card { display: grid; grid-template-columns: 60px minmax(0, 1fr);
                             gap: 12px; align-items: center; height: 60px; }
.sidebar .rail-e .app-card__thumb { width: 60px; }
.sidebar .rail-e .app-card__center { display: flex; flex-direction: column; gap: 12px;
                                     justify-content: center; min-width: 0; }
.sidebar .rail-e .app-card__name { margin-top: 0; height: auto; line-height: 24px;
                                   display: block; white-space: nowrap;
                                   overflow: hidden; text-overflow: ellipsis; }
.sidebar .rail-e .rating { margin-top: 0; height: 16px; line-height: 16px; font-size: 12px; }

/* F — thẻ bài viết DỌC, ảnh 16/9 (bản gốc: 4 thẻ/hàng, tối đa 220 mỗi thẻ). */
.rail-f { display: flex; gap: 12px; align-items: stretch; overflow-x: auto;
          scrollbar-width: none; }
.rail-f::-webkit-scrollbar { display: none; }
.article-card--tall { flex: 1; max-width: 220px; display: flex; flex-direction: column;
                      gap: 8px; justify-content: center; color: var(--text); }
.article-card--tall .article-card__img { width: 100%; height: auto; aspect-ratio: 16 / 9;
                                         border-radius: 4px; object-fit: cover;
                                         background: var(--surface-2); }
.article-card--tall .article-card__title {
  flex: 1; height: 48px; font-size: 14px; font-weight: 700; line-height: 24px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card--tall:hover { color: var(--link); }
.article-card--tall:hover .article-card__title { color: inherit; }

/* ==========================================================================
   6. HERO CAROUSEL — 868×415
   ========================================================================== */
.hero { position: relative; overflow: hidden; margin-bottom: var(--module-gap); background: var(--surface-2); }
.hero__track { display: flex; transition: transform .35s ease; }
@media (prefers-reduced-motion: reduce) { .hero__track { transition: none; } }
.hero__slide { flex: 0 0 100%; position: relative; }
.hero__img { width: 100%; height: 415px; object-fit: cover; }
.hero__bar {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: #fff;
}
.hero__icon { width: 48px; height: 48px; border-radius: var(--r-icon); flex: none; }
.hero__name { font-size: 17px; font-weight: 500; flex: 1 1 auto; }
.hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.85); color: #333; display: grid; place-items: center;
  opacity: 0; transition: opacity .15s ease;   /* chỉ hiện khi rê chuột, như bản tham chiếu */
}
.hero:hover .hero__nav, .hero__nav:focus-visible { opacity: 1; }
@media (hover: none) { .hero__nav { opacity: 1; } }   /* cảm ứng thì hiện luôn */
.hero__nav--prev { left: 12px; }
.hero__nav--next { right: 12px; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.hero__dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.hero__dots button[aria-current="true"] { background: #fff; }

/* ==========================================================================
   7. SIDEBAR — ô search + chip, thẻ quảng bá, editor's pick
   ========================================================================== */
.sidebar {
  display: grid;
  /* minmax(0,1fr): khoá track theo bề rộng cột. Thiếu dòng này, min-content của
     nút .btn (white-space:nowrap) kéo cả sidebar rộng ra và panel tràn khỏi cột. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--module-gap);
}
.sidebar .rail { margin-bottom: 0; }

.side-search { padding: 16px; }
.side-search .search { max-width: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.chip:hover { background: var(--brand-soft); color: var(--brand-dark); }
.side-search__label { font-size: 13px; color: var(--muted); margin-top: 14px; }

.promo { padding: 16px; }
.promo__top { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; }
.promo__icon { width: 48px; height: 48px; border-radius: var(--r-icon); }
.promo__name { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.promo__desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.promo__help { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: var(--brand-dark); }
.promo__social { display: flex; justify-content: space-between; gap: 6px; margin-top: 14px; }
.promo__social-item { width: 73px; height: 46px; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; color: var(--muted); text-align: center; }
.promo__social-item:hover { color: var(--brand-dark); }
.promo__social-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--faint); color: #fff; font-weight: 700; font-size: 15px;
}
.promo__social-dot img, .promo__social-dot svg { width: 18px; height: 18px; display: block; }
.promo__social-label { display: block; }

/* padding thân khối: .editor__list không mang class .rail-* nên phải khai riêng,
   nếu không item rộng bằng cả panel (316) thay vì 284 như bản tham chiếu. */
.editor__list { display: grid; gap: 14px; padding: 0 16px 16px; }

/* Mặc định (desktop, item KHÔNG phải dẫn đầu): dòng gọn icon 48, banner ẩn. */
.editor__item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 60px; }
.editor__item > .editor__banner { display: none; }
.editor__icon { width: 48px; height: 48px; border-radius: var(--r-icon); background: var(--surface-2); flex: none; }
.editor__name { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.editor__desc {
  margin-top: 2px; font-size: 12px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* Item dẫn đầu (284×180): banner tràn hết bề ngang panel, icon 62 ĐÈ LÊN mép dưới
   banner, tên + điểm là chữ TRẮNG trên banner, mô tả xám ở dưới. */
.editor__item--lead { position: relative; display: block; height: 180px; grid-template-columns: none; }
.editor__item--lead > .editor__banner {
  display: block; position: absolute; top: 0; left: -16px; z-index: 0;
  width: calc(100% + 32px); height: 149px; max-width: none;
  object-fit: cover; background: var(--surface-2);
}
.editor__item--lead::after {
  content: ""; position: absolute; z-index: 1;
  top: 99px; left: -16px; width: calc(100% + 32px); height: 50px;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.5));
  pointer-events: none;
}
.editor__item--lead > .editor__icon {
  position: absolute; top: 118px; left: 0; z-index: 2;
  width: 62px; height: 62px;
}
.editor__item--lead > .editor__body { position: absolute; top: 126px; left: 70px; right: 0; z-index: 2; }
.editor__item--lead .editor__name { font-size: 14px; font-weight: 500; color: #fff; }
.editor__item--lead .editor__name .rating { color: #fff; }
.editor__item--lead .editor__desc { margin-top: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   8. NÚT
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap; cursor: pointer;
  padding: 6px 16px; border: 0; border-radius: var(--r-sm);
  font-weight: 500; background: var(--brand-soft); color: var(--brand-dark);
}
.btn:hover { background: var(--btn-hover); color: var(--brand-dark); }
.btn--solid { background: var(--brand); color: var(--on-brand); }
.btn--solid:hover { background: var(--brand-dark); color: var(--on-brand); }
.btn--lg { padding: 11px 26px; font-size: 15px; border-radius: var(--r-md); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--block { width: 100%; }

.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars svg { width: 12px; height: 12px; }
.stars__on { fill: var(--star); }
.stars__off { fill: var(--line); }
.score { font-weight: 700; }

/* ==========================================================================
   9. TRANG CHI TIẾT APP
   ========================================================================== */
/* --- breadcrumb: 12px/16, mục cuối MÀU XANH, vạch ngăn là ô chevron xoay --- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
              font-size: 12px; line-height: 16px; color: var(--muted); }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:first-child)::before {
  content: ""; width: 6px; height: 6px; border: 1px solid var(--faint);
  border-left: 0; border-bottom: 0; transform: rotate(45deg); flex: 0 0 auto;
}
.breadcrumb li:last-child { color: var(--brand); }
.breadcrumb a:hover { color: var(--brand-dark); }

/* --- 9.1 HERO ------------------------------------------------------------
   Bản gốc là lưới 2 cột: cột phải đúng 316px (bằng sidebar) chứa nút tải, cột
   trái là icon + tên. Breadcrumb và dải chỉ số trải hết 2 cột.              */
.app-head {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--side);
  align-items: center; gap: 12px 0; padding: 12px 0; margin-bottom: var(--module-gap);
}
.app-head__crumbs,
.app-head__stats { grid-column: 1 / -1; padding: 0 16px; }
.app-head__info   { grid-column: 1; grid-row: 2; padding-left: 16px; }
.app-head__dl     { grid-column: 2; grid-row: 2; padding-right: 16px; }

.app-head__info { display: flex; gap: 20px; overflow: hidden; }
.app-head__icon {
  flex: 0 0 auto; width: 120px; height: 120px; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--r-icon);
  background: var(--surface-2); box-sizing: border-box;
}
.app-head__icon img { width: 100%; height: 100%; }
.app-head__id { min-width: 0; overflow: hidden; }
/* Ba dòng cùng line-height 30 — bản gốc xếp bằng <br>, ở đây dùng block cho sạch. */
.app-head__name,
.app-head__dev,
.app-head__ver { display: block; line-height: 30px; white-space: nowrap;
                 overflow: hidden; text-overflow: ellipsis; }
/* Bản gốc xếp 3 dòng bằng <br> trong một khối inline: dòng 1 cao 33 (hộp chữ
   20px line-height 30 cộng phần strut 14px/21 thò xuống do lệch baseline), hai
   dòng sau đúng 30. Ở đây dùng block nên ghi thẳng 3px chênh đó ra cho dễ đọc,
   chữ rơi đúng dy 43 / 79 / 111 như đo được. */
.app-head__name { margin-bottom: 3px; font-size: 20px; font-weight: 700; color: rgba(0, 0, 0, .8); }
.app-head__dev  { font-size: 14px; font-weight: 500; color: var(--text); }
.app-head__ver  { font-size: 12px; color: var(--muted); }

.app-head__dl { display: flex; flex-direction: column; gap: 8px; }
.dl-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  align-self: center; box-sizing: border-box; width: 300px; max-width: 100%;
  height: 52px; padding: 15px 16px; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 700; line-height: 20px;
}
.dl-btn:hover { background: var(--brand-hover); }
.dl-btn__text { flex: 1; font-weight: 500; }
.dl-btn__icon { flex: 0 0 auto; width: 20px; height: 20px; }
/* Nút tải phụ giữa trang: hộp trải hết bề ngang, nút 360 canh giữa. */
.dl-secondary { display: flex; justify-content: center; padding: 12px 16px;
                margin-bottom: var(--module-gap); background: var(--surface); }
.dl-btn--wide { width: 360px; }

.app-head__how {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  align-self: center; color: var(--link); font-size: 14px; line-height: 21px;
}
.app-head__how svg { width: 12px; height: 12px; flex: 0 0 auto; }

/* Dải chỉ số: các ô chia đều, vạch ngăn 1×24. */
/* Bản gốc cho chính hàng này cuộn ngang: các ô có white-space:nowrap nên khi
   màn hẹp chúng không co được, không cho cuộn là tràn cả trang (đo 103px). */
.app-head__stats { display: flex; align-items: center; gap: 16px;
                   overflow-x: auto; scrollbar-width: none; }
.app-head__stats::-webkit-scrollbar { display: none; }
.app-head__split { flex: 0 0 auto; width: 1px; height: 24px; background: var(--line-2); }
.stat2 { flex: 1; display: flex; flex-direction: column; align-items: center;
         text-align: center; white-space: nowrap; }
.stat2__head { display: flex; align-items: center; gap: 6px; height: 24px;
               font-size: 14px; font-weight: 500; color: var(--text); }
.stat2__score { display: flex; align-items: center; gap: 6px; }
.stat2__score svg { width: 14px; height: 14px; fill: var(--star); }
.stat2__desc { font-size: 12px; line-height: 18px; color: var(--muted); }

/* --- 9.2 KHỐI NỘI DUNG — tiêu đề h2 18px/700 --------------------------- */
.block2 { padding: 12px 16px; margin-bottom: var(--module-gap); }

/* TRANG CHI TIẾT: bản gốc KHÔNG chừa khe giữa các module — cả cột trái là một
   dải trắng liên tục (đo được đáy module này = đỉnh module kia, mb=0). Mỗi
   module tự đệm 12px trên/dưới nên vẫn tách bạch mà không cần vạch xám.
   Bản trước để khe 8px nên nhìn thành một chồng thẻ rời.
   Chỉ áp ở desktop: mobile bản gốc chưa đo nên giữ nguyên nếp cũ. */
@media (min-width: 996px) {
  .layout--detail > div > * { margin-bottom: 0; }
}
.block2--bleed { padding-left: 0; padding-right: 0; }          /* danh sách tràn viền */
.block2--bleed > .block2__title { padding: 0 16px; }
.block2__title { display: flex; align-items: center; justify-content: space-between;
                 gap: 12px; margin-bottom: 12px; }
.block2__title h2 { font-size: 18px; font-weight: 700; line-height: 28px;
                    color: var(--head); word-break: break-word; }
.block2__more { flex: 0 0 auto; font-size: 12px; color: var(--link); }

/* Rail dùng chung với trang chủ, nhưng panel trang chi tiết đo được khác:
   padding 12px 0 · tiêu đề h2 cao 28 + khe 12 · danh sách KHÔNG có padding đáy.
   (868×234 = 12 + 28 + 12 + 170 + 12 cho khối "Games like …".) */
.rail--big { padding: 12px 0; }
.rail--big .rail__title { font-size: 18px; font-weight: 700; line-height: 28px; color: var(--head); }
.rail--big .rail__head { padding: 0 16px 12px; }
.rail--big .rail-e, .rail--big .rail-f, .rail--big .rail-c { padding: 0 16px; }

/* --- 9.3 Additional Information — lưới 2 cột, vạch ngăn là khe 1px ------ */
.info-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line-2); border: 1px solid var(--line-2);
}
.info-cell { display: flex; flex-direction: column; gap: 4px;
             padding: 8px 12px; background: var(--surface); }
.info-cell p { margin: 0; }
/* Ô cuối lẻ hàng thì trải hết chiều ngang — giống bản gốc, không để ô trống. */
.info-cell:last-child:not(:nth-child(2n)) { grid-column: 1 / -1; }
.info-cell__k { font-size: 14px; font-weight: 500; line-height: 24px; color: var(--head); }
.info-cell__v { display: flex; gap: 8px; font-size: 12px; line-height: 20px; color: var(--muted); }
.info-cell__v--link, .info-cell__v a { color: var(--link); }

/* --- 9.4 What's New ---------------------------------------------------- */
.whatsnew { display: flex; flex-direction: column; gap: 4px; }
.whatsnew__date { font-size: 14px; font-weight: 700; line-height: 28px; color: var(--text); }
.whatsnew__text { font-size: 14px; line-height: 28px; color: var(--text); }
.whatsnew__text p { margin: 0; }

/* --- 9.5 Screenshots — cuộn ngang, ảnh cao 180 ------------------------- */
.shots-wrap { position: relative; }
.shots { display: flex; align-items: center; gap: 12px; padding: 0 16px;
         overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: 0 0 auto; height: 180px; width: auto; border-radius: 8px;
             background: var(--surface-2); }

/* Nút lùi/tiến: viên tròn trắng 40 (đệm 12 + icon 16), nổi đè lên ảnh, căn
   giữa theo chiều dọc, cách mép 38. Mặc định ẩn — JS bật .is-on khi phía đó
   còn chỗ cuộn, nên ở đầu/cuối danh sách nút tương ứng không hiện. */
.shots-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: none; align-items: center; justify-content: center;
  padding: 12px; border: 0; border-radius: 100px;
  background: var(--surface); color: var(--text); cursor: pointer;
  box-shadow: 0 3px 14px 2px rgba(0, 0, 0, .05),
              0 8px 10px 1px rgba(0, 0, 0, .06),
              0 5px 5px -3px rgba(0, 0, 0, .1);
}
.shots-nav.is-on { display: flex; }
.shots-nav:hover { color: var(--link); }
.shots-nav svg { width: 16px; height: 16px; display: block; }
.shots-nav--prev { left: 38px; }
.shots-nav--next { right: 38px; }
/* Bản gốc bỏ hẳn nút từ 996px trở xuống — dưới đó vuốt ngang bằng tay. */
@media (max-width: 996px) { .shots-nav.is-on { display: none; } }
@media (prefers-reduced-motion: reduce) { .shots { scroll-behavior: auto; } }

/* --- 9.6 Old Versions --------------------------------------------------- */
.vlist { display: flex; flex-direction: column; gap: 8px; }
.vlist__sep { height: 1px; background: var(--line-soft); }
.vitem { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vitem__info { flex: 1 0 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.vitem__name { font-size: 14px; font-weight: 700; line-height: 24px; color: var(--text);
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vitem:hover .vitem__name { color: var(--link); }
.vitem__meta { display: flex; align-items: center; gap: 12px; white-space: nowrap;
               font-size: 12px; line-height: 20px; color: var(--muted); }
.vtag { display: flex; align-items: center; justify-content: center; padding: 0 4px;
        border: 1px solid var(--brand); border-radius: 3px; color: var(--brand);
        font-size: 10px; line-height: 16px; }
.vtag--xapk { border-color: var(--link); color: var(--link); }
.vitem__btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
              min-height: 28px; padding: 0 8px; border-radius: 4px;
              background: var(--brand); color: #fff; font-size: 12px; line-height: 18px; }
.vitem__btn:hover { background: var(--brand-hover); }

/* --- 9.7 Featured Reviews (nguồn: bình luận WordPress) ------------------ */
.reviews { display: flex; flex-direction: column; gap: 12px; }
.reviews__bar { display: flex; align-items: center; gap: 8px; margin: 0 16px;
                padding: 12px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.reviews__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; }
.reviews__icon img { width: 100%; height: 100%; }
.reviews__app { flex: 1; display: flex; flex-direction: column; gap: 8px;
                font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text); }
.reviews__count { font-size: 12px; line-height: 14px; }
/* Bản gốc xếp HAI nút cạnh nhau, mỗi nút cao 32. */
.reviews__acts { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.reviews__btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
                min-height: 32px; padding: 0 8px; border: 1px solid var(--line-2);
                border-radius: 4px; background: var(--surface);
                color: var(--link); font-size: 12px; line-height: 20px; }
.reviews__btn:hover { border-color: var(--link); }
.reviews__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
                 gap: 12px; padding: 0 16px; }
.review { display: flex; flex-direction: column; gap: 12px; box-sizing: border-box;
          padding: 12px 8px; border: 1px solid var(--line-2); border-radius: 8px;
          background: var(--surface); overflow: hidden; }
.review__top { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.review__avatar { flex: 0 0 auto; width: 40px; height: 40px; }
.review__avatar img { width: 100%; height: 100%; border-radius: 999px; }
.review__who { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.review__name { font-size: 14px; font-weight: 700; line-height: 16px; color: var(--text);
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review__date { font-size: 12px; line-height: 12px; color: var(--muted); }
/* Thân review CAO CỐ ĐỊNH 60 (3 dòng × 20) như bản gốc: bình luận dài ngắn
   khác nhau nhưng mọi thẻ vẫn đúng 138, hàng không so le. Bản trước để clamp 5
   dòng và cao theo nội dung -> thẻ ngắn 118, thẻ dài kéo cả hàng giãn ra. */
.review__body { flex: 0 0 auto; height: 60px; padding: 0 8px;
                font-weight: 500; line-height: 20px; color: var(--text);
                display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
                overflow: hidden; }
.review__body p { margin: 0 0 8px; }

/* --- 9.8 Related Tags — viên bo tròn cao 36 ----------------------------- */
.tag-box { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tag-item { display: flex; align-items: center; justify-content: center;
            box-sizing: border-box; height: 36px; padding: 0 12px;
            border: 1px solid var(--bg); border-radius: 999px; background: var(--bg);
            color: var(--text); font-size: 14px; line-height: 20px; }
.tag-item:hover { background: var(--link-soft); border-color: var(--link-soft); color: var(--link); }

/* --- 9.9 Thẻ "Reviewed by …" -------------------------------------------
   Bản tham chiếu: avatar 40, cách chữ 12, hai dòng — nhãn nhỏ ở trên, tên
   (14/500) kèm chức danh ở dưới. Bản trước đây gộp một dòng 12px với avatar
   24 nên tên tác giả gần như biến mất. */
.app-reviewer { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.app-reviewer img { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; }
.app-reviewer__who { display: flex; flex-direction: column; min-width: 0; }
.app-reviewer__label { font-size: 12px; line-height: 20px; color: var(--muted); }
.app-reviewer__line { display: flex; align-items: baseline; gap: 6px;
                      font-size: 14px; line-height: 20px; }
.app-reviewer__name { font-weight: 500; color: var(--text); }
.app-reviewer__role { font-size: 12px; color: var(--muted); }

/* Dòng tóm tắt in đậm ngay trên phần mô tả. */
/* Bản gốc giữ đúng MỘT dòng (cao 28), dài quá thì cắt bằng dấu ba chấm. */
.app-short-desc { margin: 0 0 12px; font-size: 14px; font-weight: 700;
                  line-height: 28px; color: var(--head);
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 9.10 Nội dung bài + thu gọn --------------------------------------- */
.prose { color: var(--text); line-height: 1.7; }
.prose p { margin: 0 0 12px; }
.prose h2, .prose h3 { margin: 20px 0 8px; font-size: 15px; font-weight: 700; }
.prose ul { list-style: disc; padding-left: 20px; margin: 0 0 12px; }
.prose ol { list-style: decimal; padding-left: 20px; margin: 0 0 12px; }
.prose img { border-radius: var(--r-md); margin: 12px 0; }
.prose a { color: var(--brand-dark); }

.clamp { position: relative; overflow: hidden; }
.clamp[data-collapsed="true"] { max-height: 240px; }
.clamp[data-collapsed="true"]::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--surface));
}
.clamp-toggle { margin-top: 10px; color: var(--link); font-size: 14px; line-height: 21px; }

/* ==========================================================================
   9.12 TRANG DANH MỤC (danh mục lá)
   Đo từ bản tham chiếu /game_action: MỘT CỘT 1200, không sidebar. Mỗi khối là
   hộp trắng; dòng app cao 66 xếp lưới 3 cột (mục chính đo được 381 × 66,
   khe 12).
   ========================================================================== */
/* Các con số dưới đây lấy THẲNG từ CSS nguồn của bản tham chiếu, không phải
   đo mắt: .crumbs{font-size:12px;line-height:16px;padding:4px 0;margin-left:16px;
   margin-bottom:4px} */
.catpage__crumbs { padding: 4px 0; margin: 0 0 4px 16px; }
.catpage__crumbs .breadcrumb { font-size: 12px; line-height: 16px; color: var(--text); }

/* .category-apk-list-box{background-color:#fff;margin-bottom:4px;padding:8px 0 12px} */
.catbox { margin-bottom: 4px; padding: 8px 0 12px; }
/* .category-module-title{align-items:center;display:flex;justify-content:space-between;padding:0 16px} */
.catbox__head { display: flex; align-items: center; justify-content: space-between;
                gap: 16px; padding: 0 16px; }
/* .title-text{color:#3c4043;font-size:16px;font-weight:500;line-height:22px;padding:4px 0}
   + @media(min-width:996px){...font-size:20px;line-height:28px} */
.catbox__title { padding: 4px 0; font-size: 16px; font-weight: 500; line-height: 22px; color: var(--head); }
@media (min-width: 996px) { .catbox__title { font-size: 20px; line-height: 28px; } }

/* .tab-list>span{color:#4b4b4b;font-size:13px;font-weight:400;line-height:22px;padding:4px 0 10px;text-align:center}
   .tab-list>span.active{color:#24cd77;font-weight:500}
   .tab-list>span.active:before{background-color:#24cd77}  <- GẠCH CHÂN 2px, đo mắt không thấy */
.catbox__tabs { display: flex; align-items: center; margin-top: 10px; flex: 0 0 auto; }
.catbox__tabs a { position: relative; padding: 4px 12px 10px; font-size: 13px; font-weight: 400;
                  line-height: 22px; color: #4b4b4b; text-align: center; white-space: nowrap; }
.catbox__tabs a::before { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
                          height: 2px; background: transparent; }
.catbox__tabs a[aria-current="true"] { font-weight: 500; color: var(--brand); }
.catbox__tabs a[aria-current="true"]::before,
.catbox__tabs a:hover::before { background: var(--brand); }
.catbox__tabs a:hover { color: var(--brand); font-weight: 500; }

/* Băng chuyền banner đầu trang danh mục: thẻ 384×218, 3 thẻ nhìn thấy cùng
   lúc, cuộn ngang (khe 8 — đo từ nguồn: item ở x=81/473/865, bước 392). */
.cswipe { margin-bottom: 4px; padding: 16px 0; }
/* Không dùng scroll-snap: nó kéo băng chuyền trôi đúng bằng phần đệm 16px
   nên thẻ đầu dán sát mép (đo: thẻ ở x=65 thay vì 81). Bản gốc cuộn trơn. */
.cswipe__track { display: flex; gap: 8px; padding: 0 16px;
                 overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.cswipe__track::-webkit-scrollbar { display: none; }
/* Số đo lấy thẳng từ CSS nguồn:
   .swiper-item{width:328px;border-radius:8px;background:#f8f9fa} (desktop 384)
   .swiper-item+.swiper-item{margin-left:8px}
   .swiper-banner{background-size:cover;background-position:50%;padding-bottom:56.75%}
   .swiper-item:after{bottom:0;height:33.33%;background:linear-gradient(rgba(0,0,0,.01),rgba(0,0,0,.8));z-index:3}
   .swiper-banner-bg{bottom:0;height:33.33%;background-size:cover;background-position:50% bottom;filter:blur(30px);z-index:4}
   .swiper-item-info{bottom:0;padding:4px 12px;z-index:4} */
.chero { position: relative; flex: 0 0 328px; width: 328px; border-radius: 8px;
         overflow: hidden; background: #f8f9fa; }
@media (min-width: 996px) { .chero { flex-basis: 384px; width: 384px; } }
/* Nền phủ kín: ảnh banner thì để nguyên (cover, đúng nguồn); dùng screenshot
   thì làm mờ + phóng nhẹ để lấp hai bên, ảnh thật nằm nguyên tấm phía trên. */
.chero__back { position: absolute; inset: 0; background-size: cover;
               background-position: 50%; background-repeat: no-repeat; }
.chero--fit .chero__back { filter: blur(24px); transform: scale(1.15); }
.chero__art { position: relative; z-index: 2; display: block; width: 100%; padding-bottom: 56.75%; }
.chero__shot { position: absolute; inset: 0; margin: auto;
               max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
/* Lớp tối 1/3 dưới, nằm dưới dải mờ. */
.chero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 33.33%;
                background: linear-gradient(rgba(0, 0, 0, .01), rgba(0, 0, 0, .8)); z-index: 3; }
/* Dải đáy = CHÍNH ảnh đó, lấy phần dưới, làm mờ 30px -> mỗi thẻ một tông màu. */
.chero__blur { position: absolute; left: 0; bottom: 0; width: 100%; height: 33.33%;
               background-size: cover; background-position: 50% bottom; background-repeat: no-repeat;
               filter: blur(30px); z-index: 4; }
.chero__bar { position: absolute; left: 0; bottom: 0; width: 100%; z-index: 5;
              box-sizing: border-box; display: flex; align-items: center;
              justify-content: space-between; gap: 12px; padding: 4px 12px; }
.chero__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
               color: #fff; font-size: 14px; font-weight: 500; line-height: 22px;
               text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.chero__name:hover { color: #fff; text-decoration: underline; }
.chero__btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
              height: 26px; padding: 0 10px; border-radius: 4px;
              background: var(--brand); color: #fff; font-size: 12px; line-height: 18px; }
.chero__btn:hover { background: var(--brand-hover); color: #fff; }

/* Mũi tên cuộn của băng chuyền: dùng lại component .shots-nav của trang chi
   tiết (JS data-shots bật/tắt .is-on khi còn chỗ cuộn). */
.cswipe { position: relative; }
.cswipe .shots-nav--prev { left: 24px; }
.cswipe .shots-nav--next { right: 24px; }

/* Nút "Show More" của TRANG DANH MỤC: bản chính là nút xanh ĐẶC, chữ trắng,
   rộng đúng một cột (381) và canh giữa — khác nút nền nhạt ở trang tìm kiếm,
   nên chỉ chỉnh trong .catbox để không đụng trang kia. */
.catbox .smore { margin: 16px 0 0; padding: 0 16px; text-align: center; }
.catbox .smore__btn { display: inline-flex; align-items: center; justify-content: center;
                      width: 381px; max-width: 100%; height: 40px; border-radius: 4px;
                      background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; }
.catbox .smore__btn:hover { background: var(--brand-hover); color: #fff; }

/* Chưa có điểm: vẫn giữ dòng sao nhưng sao XÁM và không có số (bản gốc y vậy). */
.crow__score--none svg { fill: var(--chevron); }

/* Khe theo ĐÚNG CSS nguồn: .grid-col+.grid-col{margin-left:12px} (ngang 12)
   và .grid-row+.grid-row{margin-top:16px} (dọc 16) — không phải 12 cả hai.
   Cột: nguồn dùng calc(33.33333% - 8px) + lề 12; grid 3 cột khe 12 ra đúng
   cùng bề rộng (1168 -> 381.3). */
.crow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
             gap: 16px 12px; padding: 12px 16px; }
/* Dòng app dùng LẠI component .crow của cat-row.php (icon 64 + viền 1 = 66
   đúng bằng bản gốc, tên 14/500 #4b4b4b, biến thể 'developer' = NPH + điểm,
   nút tải ẩn ở desktop). Từng thử dựng .crow riêng ở đây -> TRÙNG TÊN CLASS
   với component cũ, rule sau đè rule trước và nút tải bị display:none. */

/* Nguồn: 3 cột từ 720px trở lên, dưới đó 1 cột. KHÔNG có nấc 2 cột cho lưới
   thường (nấc 50% chỉ dành cho biến thể .no-grid), nên bỏ nấc 1100 tôi tự thêm. */
@media (max-width: 719px) { .crow-grid { grid-template-columns: 1fr; }
                            .catbox__head { flex-wrap: wrap; }
                            .catbox__tabs { width: 100%; overflow-x: auto; } }

/* ==========================================================================
   10. TRANG DOWNLOAD
   ========================================================================== */
.version { display: grid; grid-template-columns: 48px minmax(0, 1fr) max-content; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.version:last-of-type { border-bottom: 0; }
.version__icon img { width: 48px; height: 48px; border-radius: var(--r-icon); }
.version__name { font-weight: 500; }
.version__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-2); font-weight: 700; font-size: 11px; }
.pill--xapk { background: var(--pill-xapk-bg); color: var(--pill-xapk-fg); }

/* --- 10.1 TRANG CHỌN PHIÊN BẢN (/download) ------------------------------
   Đo từ bản tham chiếu /versions: thẻ app đầu trang 868x106 (icon 80, khe 12,
   nút 212x38 canh giữa theo chiều dọc), hộp trắng tiêu đề 16/500 + đoạn dẫn
   14/400, rồi danh sách dòng cao 68 ngăn nhau bằng vạch 1px.
   Dòng dùng lại .vitem của khối Old Versions trang chi tiết — hai nơi đo ra
   giống hệt nhau nên không tách component thứ hai. */
/* Dải breadcrumb riêng của trang này: bản gốc đệm 12/16 và chữ 13px, cao 46 —
   khác trang chi tiết (12px, cao 16, không đệm). */
/* Dải breadcrumb NẰM TRONG mạch thẻ trắng — bản gốc để nền trắng, liền một
   khối với thẻ app bên dưới (đo được khe 0). Trước đây để trong suốt nên lòi
   nền xám #f2f5f9 ra, nhìn như thẻ trắng bắt đầu lệch xuống. */
.vercrumbs { padding: 12px 16px; background: var(--surface); }
.vercrumbs .breadcrumb { font-size: 13px; line-height: 22px; color: var(--text); }
.vercrumbs .breadcrumb li { line-height: 22px; }

/* Thẻ app: cột chữ cao 94 = tên 24 + khe 8 + NPH 22 + khe 4 + mô tả 2 dòng 36.
   Icon 80 nên phải canh TRÊN, không canh giữa. Nút tải canh giữa theo cột chữ. */
.verhead { display: flex; align-items: center; justify-content: space-between;
           gap: 16px; padding: 0 16px 12px; }
.verhead__app { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.verhead__icon { flex: 0 0 auto; width: 80px; height: 80px; border-radius: 15%;
                 border: 1px solid var(--line-2); background: var(--surface-2); box-sizing: border-box; }
.verhead__id { display: flex; flex-direction: column; min-width: 0; }
.verhead__name { margin-bottom: 8px; font-size: 14px; line-height: 24px; color: var(--head);
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verhead__dev { margin-bottom: 4px; font-size: 13px; line-height: 22px; color: var(--text);
                overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verhead__desc { font-size: 13px; line-height: 18px; color: var(--muted);
                 display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                 overflow: hidden; }
.verhead__dl { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
               gap: 6px;
               width: 212px; height: 38px; border-radius: 4px;
               background: var(--brand); color: #fff; font-size: 14px; line-height: 20px; }
/* Bản gốc cả hai nút tải đều có icon mũi tên xuống trước chữ. */
.verhead__dl svg { flex: 0 0 auto; width: 16px; height: 16px; }
.vitem__btn svg  { flex: 0 0 auto; width: 12px; height: 12px; }
.vitem__btn { gap: 4px; }
.verhead__dl:hover { background: var(--brand-hover); color: #fff; }

/* Bản gốc ngăn các thẻ trắng bằng khe 4px (margin-bottom của từng hộp), không
   dính liền. Riêng breadcrumb -> thẻ app là khe 0, cố ý liền mạch. */
.verhead { margin-bottom: 4px; }
.verbox  { margin-bottom: 4px; }

.verbox__head { padding: 12px 16px 0; }
.verbox__title { font-size: 16px; font-weight: 500; line-height: 24px; color: var(--head); }
.verbox__desc { margin: 12px 0 0; font-size: 14px; line-height: 22px; color: var(--text); }

/* Danh sách dòng cả trang: mỗi dòng tự kẻ vạch, không dùng .vlist__sep. */
/* Dòng cao đúng 68 = 10 đệm + 24 (tên) + 8 + 16 (dòng phụ) + 10 đệm. */
.vlist--page { gap: 0; padding: 0 16px; }
.vlist--page .vitem { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.vlist--page .vitem:last-child { border-bottom: 0; }
.vlist--page .vitem__info { gap: 8px; }
.vlist--page .vitem__name { color: #4b4b4b; }
.vlist--page .vitem__meta { line-height: 16px; }
/* Thẻ APK/XAPK cao đúng 16 kể cả viền; chữ trong lòng 14. */
.vlist--page .vtag { box-sizing: border-box; height: 16px; line-height: 14px; border-radius: 4px; }
.vlist--page .vitem__btn { width: 90px; }

.getfile { text-align: center; padding: 40px 20px; }
.getfile__spinner { width: 34px; height: 34px; margin: 0 auto 16px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .getfile__spinner { animation: none; } }

/* ==========================================================================
   11. ARCHIVE / TRẠNG THÁI TRỐNG / PHÂN TRANG
   ========================================================================== */
.page-head { margin-bottom: var(--module-gap); padding: 16px; }
.page-head__title { font-size: 20px; font-weight: 700; }
.page-head__count { color: var(--muted); font-size: 13px; margin-top: 2px; }

.sorts { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; }
.sorts a { padding: 6px 14px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.sorts a:hover { color: var(--text); }
.sorts a[aria-current="true"] { background: var(--brand); color: var(--on-brand); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty__title { font-size: 17px; color: var(--text); margin-bottom: 6px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination .page-numbers {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--surface); font-weight: 500;
}
.pagination .page-numbers.current { background: var(--brand); color: var(--on-brand); }
.pagination .dots { background: none; }

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer { background: var(--surface); border-top: 1px solid #e7e7e7; padding: 24px 0 0; margin-top: 8px; }
/* Chân trang co giãn theo lề 5% GIỐNG HEADER, không bị chặn 1232 như thân trang.
   Bản gốc: ở khổ 2453px header và chân trang đều 122..2316, còn nội dung giữa
   thì chặn 1200 và căn giữa. Để chân trang bị chặn thì trên màn rộng nó lệch
   khỏi header gần 500px, nhìn cả trang mất cân. */
@media (min-width: 720px) {
  .site-footer > .wrap { max-width: none; margin: 0 5%; padding: 0; }
}
.site-footer a { color: #8b8b8b; }
.site-footer a:hover { color: var(--brand-dark); }

/* MỘT hàng: cột thương hiệu 320 + các nhóm link, dàn đều hai mép. */
/* Bản gốc chừa 12px phía trên trong mỗi cột (logo và tiêu đề đều bắt đầu ở 13). */
.site-footer__cols { display: flex; justify-content: space-between; gap: 32px; }
.site-footer__cols > * { padding-top: 12px; }
.site-footer__brand { width: 320px; flex: none; }
.site-footer__brand .brand--img img { height: 18px; }
.site-footer__about { margin: 12px 0 0; font-size: 13px; line-height: 22px; color: #8b8b8b; }

/* Mạng xã hội: ô chạm 25×25, glyph 16×16, không nền. */
.site-footer__social { display: flex; flex-wrap: wrap; margin-top: 8px; }
.site-footer__social li { margin: 8px 6px 0 0; }
.site-footer__social a { display: grid; place-items: center; width: 25px; height: 25px; color: #8b8b8b; }
.site-footer__social a:hover { color: var(--brand-dark); }
.site-footer__social svg { display: block; }

.site-footer__group-title { font-size: 16px; font-weight: 500; line-height: 18px; color: #777; margin: 0; }
.site-footer__group li { margin: 8px 6px 0 0; }
.site-footer__group a { font-size: 13px; line-height: 22px; }

/* Hàng cuối: bản quyền TRÁI, chọn ngôn ngữ PHẢI, cùng một dòng. */
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 25px; padding: 8px 0; border-top: 1px solid #e7e7e7;
}
.lang-picker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 10px; height: 30px; border: 1px solid #e7e7e7; border-radius: 4px;
  font-size: 14px; color: #6f6f6f;
}
.lang-picker a[aria-current="true"] { color: var(--text); font-weight: 500; }
.site-footer__copy { margin: 0; color: #a6a6a6; font-size: 12px; line-height: 16px; }
.site-footer__legal a { color: #a6a6a6; }
.site-footer__legal a::before { content: " | "; }

@media (max-width: 995px) {
  /* Chân trang về một cột; hàng cuối tự xuống dòng thay vì ép hai mép. */
  .site-footer__cols { flex-wrap: wrap; gap: 24px; }
  .site-footer__brand { width: 100%; }
  .site-footer__group { min-width: 140px; }
  .site-footer__bottom { flex-wrap: wrap; gap: 12px; }
}

/* ==========================================================================
   14. TRANG LANDING DANH MỤC GỐC (Games / Apps)
   Bản tham chiếu: MỘT CỘT tràn 1200, không sidebar, không phân trang.
   Mỗi khối nền trắng, cách nhau 4px.
   ========================================================================== */
.landing { margin-top: 16px; background: var(--surface); }

/* Thanh tiêu đề: 20px/500, nền trắng, đệm 10/16/0 (đo từ nguồn). */
.landing__head { padding: 10px 16px 0; background: var(--surface);
                 font-size: 20px; font-weight: 500; line-height: 28px; color: var(--head); }
.landing__head h1 { display: inline; font-size: 20px; font-weight: 500; }

/* --- 14.1 Băng chuyền app nổi bật ------------------------------------- */
.cswiper { position: relative; padding: 8px 0; margin-bottom: 4px; background: var(--surface); }
/* Hai dải trắng che hai mép để thẻ không ló ra ngoài máng 16px. */
.cswiper::before, .cswiper::after {
  content: ""; position: absolute; top: 0; left: 0; z-index: 5;
  width: 16px; height: 100%; background: var(--surface);
}
.cswiper::after { left: auto; right: 0; }
.cswiper__list { display: flex; gap: 8px; padding: 0 16px;
                 overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.cswiper__list::-webkit-scrollbar { display: none; }

/* 3 thẻ/khung: (100% − 2×8)/3 = 33.333% − 5.333 */
.cslide { position: relative; flex: 0 0 auto; width: calc(33.3333% - 5.3333px);
          overflow: hidden; border-radius: 8px; background: var(--surface-2); }
/* Ảnh băng chuyền: bản gốc là 56.75% chứ không phải 16:9 (56.25%) —
   lệch nửa phần trăm nhưng đủ làm thẻ thấp đi 2px so với nguồn. */
.cslide__img { display: block; width: 100%; height: auto;
               aspect-ratio: 400 / 227; object-fit: cover; }
/* Dải chữ nằm đè đáy ảnh, nền chuyển tối dần để chữ trắng đọc được. */
.cslide__bar {
  position: absolute; left: 0; bottom: 0; z-index: 2; box-sizing: border-box;
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 12px;
  background: linear-gradient(rgba(0, 0, 0, .01), rgba(0, 0, 0, .8));
}
.cslide__name { flex: 1; min-width: 0; color: #fff; font-size: 14px; font-weight: 500;
                line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cslide__btn { flex: 0 0 auto; padding: 5px 8px; border-radius: 4px;
               background: var(--brand); color: #fff; font-size: 12px; line-height: 16px; }
.cslide:hover .cslide__btn { background: var(--brand-hover); }

/* Nút lùi/tiến: viên tròn 40 nổi trên mép, chỉ desktop (xem media ở dưới). */
.cswiper__nav {
  position: absolute; top: 50%; margin-top: -16px; z-index: 6;
  display: none; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: var(--surface); cursor: pointer;
  box-shadow: 0 0 4px rgba(0, 0, 0, .12);
}
.cswiper__nav.is-on { display: block; }
.cswiper__nav::before {                      /* mũi nhọn vẽ bằng 2 cạnh viền */
  content: ""; position: absolute; top: 14px; width: 10px; height: 10px;
  border: 2px solid #868686; border-bottom: 0; border-right: 0;
}
.cswiper__nav--prev { left: 0; }
.cswiper__nav--prev::before { right: 12px; transform: rotate(-45deg); }
.cswiper__nav--next { right: 0; }
.cswiper__nav--next::before { right: 16px; transform: rotate(135deg); }
.cswiper__nav:hover::before { border-color: var(--link); }

/* --- 14.2 Khối danh mục ------------------------------------------------ */
.cbox { padding: 8px 0 12px; margin-bottom: 4px; background: var(--surface); }
.cbox__title { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.cbox__link  { display: flex; align-items: center; }
.cbox__text  { padding: 4px 0 10px; font-size: 20px; font-weight: 500;
               line-height: 28px; color: var(--head); }
.cbox__arrow { align-self: center; flex: none; width: 6px; height: 6px; margin-left: 8px;
               border: 1.5px solid var(--chevron); border-bottom: 0; border-right: 0;
               transform: rotate(135deg); }
.cbox__link:hover .cbox__text  { color: var(--link); }
.cbox__link:hover .cbox__arrow { border-color: var(--link); }

/* --- 14.3 Kiểu GRID: 3 cột × 3 dòng, chảy DỌC từng cột ----------------- */
.clist--grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: calc(33.3333% - 8px);
  gap: 16px 12px; padding: 0 16px; margin-top: 10px;
  overflow-x: auto; scrollbar-width: none;
}
.clist--grid::-webkit-scrollbar { display: none; }
.crow { display: flex; align-items: center; justify-content: space-between; }
.crow__icon { flex: 0 0 auto; width: 64px; height: 64px; box-sizing: content-box;
              border: 1px solid var(--line-soft); border-radius: var(--r-icon);
              background: var(--surface); }
.crow__text { flex: 1; min-width: 0; margin: 0 12px; }
.crow__name, .crow__ver, .crow__date, .crow__dev {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crow__name { font-size: 14px; font-weight: 500; line-height: 22px; color: #4b4b4b; }
.crow__ver  { margin: 4px 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.crow__date { margin: 4px 0; font-size: 12px; line-height: 16px; color: var(--text); }
/* Biến thể "theo danh mục": nhà phát hành + điểm sao thay cho phiên bản + ngày. */
.crow__dev  { margin: 4px 0; font-size: 12px; line-height: 16px; color: var(--text); }
.crow__score { display: flex; align-items: center; gap: 4px; margin-left: -2px;
               font-size: 12px; line-height: 16px; color: var(--star); }
.crow__score svg { width: 11px; height: 11px; fill: var(--star); }
.crow:hover .crow__name { color: var(--link); }
/* Nút tải chỉ có ở MOBILE — bản gốc ẩn hẳn từ 720px trở lên. */
.crow__btn { display: none; flex: 0 0 auto; padding: 6px 8px; border-radius: 4px;
             background: var(--brand); color: #fff; font-size: 12px; line-height: 16px; }

/* --- 14.4 Kiểu SCROLL: cuộn ngang, icon 104 ---------------------------- */
/* Khe trên 8 (lưới là 10) và khe dưới 4: bản gốc dùng <ul> inline-block nên
   hộp danh sách cao hơn item 4px do khoảng baseline. Ở đây danh sách là grid
   nên không có khoảng thừa đó — ghi thẳng 4px ra cho đúng 247 như nguồn. */
.clist--scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 102px; gap: 16px;
  padding: 0 16px; margin: 8px 0 4px; overflow-x: auto; scrollbar-width: none;
}
.clist--scroll::-webkit-scrollbar { display: none; }
.clist--scroll .app-card__thumb img {
  width: calc(100% + 2px); max-width: none; margin-left: -1px;   /* icon 104 > ô 102 */
  border: 1px solid var(--line-soft); box-sizing: border-box;
}
.clist--scroll .app-card__name { margin-top: 4px; height: 44px;
                                 font-size: 13px; font-weight: 500; line-height: 22px; color: #4b4b4b; }
/* item 173 = icon 104 + 4 + tên 44 + 21 cho dòng điểm */
.clist--scroll .rating { margin-top: 5px; height: 16px; line-height: 16px; }

/* --- 14.5 Kiểu BANNER: 3 thẻ ảnh 16:9 mỗi hàng ------------------------- */
.clist--banner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
                 gap: 8px; padding: 0 16px; margin-top: 10px; }
.cbanner { display: block; overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.cbanner__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* Chân thẻ cao 49 để cả thẻ đúng 265 = ảnh 216 + 49 như bản gốc. */
.cbanner__foot { display: flex; align-items: center; gap: 8px;
                 box-sizing: border-box; height: 49px; padding: 0 12px; }
.cbanner__icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: var(--r-icon); }
.cbanner__text { min-width: 0; }
.cbanner__name { display: block; font-size: 14px; font-weight: 500; line-height: 22px;
                 color: #4b4b4b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbanner:hover .cbanner__name { color: var(--link); }

/* --- 14.6 Chip danh mục con -------------------------------------------- */
/* Bản gốc mỗi thể loại có icon riêng; WordPress không có nguồn cho icon danh
   mục (docs/06) nên ở đây là chip chữ. */
.cnames { display: flex; flex-wrap: wrap; gap: 8px 4px; padding: 0 16px; margin-top: 10px; }
.cname { display: flex; align-items: center; height: 36px; padding: 0 12px;
         border-radius: 36px; background: var(--bg); color: var(--link);
         font-size: 13px; line-height: 20px; }
.cname:hover { background: var(--link-soft); }

/* --- 14.7 Tablet & mobile (<996): bỏ nút băng chuyền, thẻ 328 cố định ---- */
@media (max-width: 995px) {
  .landing { margin-top: 4px; background: var(--bg); }
  .landing__head { font-size: 16px; line-height: 24px; }
  .landing__head h1 { font-size: 16px; }
  .cbox__text { font-size: 16px; line-height: 24px; }
  /* Bản gốc ẩn hẳn nút ở đây — dưới 996 là vuốt ngang bằng tay. */
  .cswiper__nav.is-on { display: none; }
  .cswiper::before, .cswiper::after { display: none; }
  .cslide { width: 328px; }
  /* Thẻ banner cũng chuyển sang cuộn ngang 328 thay vì 3 cột. */
  .clist--banner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .clist--banner::-webkit-scrollbar { display: none; }
  .cbanner { flex: 0 0 auto; width: 328px; }
}

/* ==========================================================================
   15. TRANG CHI TIẾT BÀI VIẾT (tin tức)
   Khung KHÁC trang app: bản gốc dùng container 1100 và hai cột 720 + 330
   (khe 50), trong khi trang app là 1200 với 868 + 316. Nên trang này không
   dùng chung .layout mà có khung riêng.
   ========================================================================== */
.narticle { max-width: 1100px; margin: 0 auto; }

/* --- dải tab thể loại trên cùng --- */
/* Băng tab TRÀN VIỀN (bản gốc rộng hết khung nhìn) nhưng danh sách tab bên
   trong vẫn thẳng lề với nội dung. Âm lề ra tới mép rồi đệm ngược đúng bằng
   phần vừa tràn. */
.ntabs { display: flex; background: var(--band);
         margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
         padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%); }
/* vw tính CẢ thanh cuộn nên băng thừa ra ~7px mỗi bên và sinh 8px cuộn ngang.
   clip (không phải hidden) cắt phần thừa mà không tạo ngữ cảnh cuộn, nên
   position:sticky ở nơi khác vẫn chạy. */
html, body { overflow-x: clip; }
/* Bản gốc viết hoa sẵn trong nội dung ("NEWS"); ở đây dùng text-transform để
   site không phải đặt tên danh mục bằng chữ hoa. Tab đang chọn có gạch chân 2px. */
.ntabs__item { padding: 18px 12px 16px; font-size: 14px; font-weight: 700;
               color: var(--muted); text-transform: uppercase;
               border-bottom: 2px solid transparent; }
.ntabs__item:hover { color: var(--brand); }
.ntabs__item.is-on { color: var(--brand); border-bottom-color: var(--brand); }

.narticle__top { display: flex; gap: 50px; align-items: flex-start; }
.narticle__main { width: 720px; min-width: 0; }
.narticle__side { width: 330px; flex: 0 0 auto; }

/* --- đầu bài --- */
.ncrumbs { font-size: 14px; color: #666; margin: 16px 0 12px; }
.narticle__title { font-size: 30px; font-weight: 700; line-height: 36px; color: var(--head); }

.nhead { display: flex; align-items: center; gap: 12px; padding: 0 0 20px; margin-top: 16px; }
.nhead__avatar { width: 44px; height: 44px; border-radius: 999px; flex: 0 0 auto; }
.nhead__who { min-width: 0; }
.nhead__name { display: block; font-size: 14px; font-weight: 500; line-height: 18px; color: var(--text); }
.nhead__date { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--muted); }
/* Bản gốc còn nhãn chức danh biên tập cạnh tên; WordPress chỉ có display_name
   nên theme bỏ hẳn thay vì bịa (xem docs/06). */

/* Tên + nhãn vai trò trên một dòng, nhãn là viên thuốc xanh nhạt. */
.nhead__line { display: flex; align-items: center; gap: 8px; }
.nhead__role { padding: 1px 8px; border-radius: 4px; background: rgba(36, 205, 119, .12);
               color: var(--brand-dark); font-size: 12px; line-height: 20px; white-space: nowrap; }

.nshare { display: flex; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.nshare__btn { display: grid; place-items: center; width: 32px; height: 32px;
               border-radius: 50%; background: var(--c, var(--muted)); color: #fff; }
.nshare__btn svg { width: 16px; height: 16px; fill: currentColor; }
.nshare__btn img { width: 16px; height: 16px; }
.nshare__btn:hover { opacity: .85; }
/* Nút cuối: nền trắng, viền xám, icon xám — như bản gốc. */
.nshare__btn--more { background: var(--surface); border: 1px solid var(--line);
                     color: var(--muted); cursor: pointer; padding: 0; }
.nshare__btn--more:hover { color: var(--text); opacity: 1; }

.narticle__body { font-size: 14px; line-height: 22px; color: var(--text); }
.narticle__tagtitle { margin: 24px 0 12px; font-size: 16px; font-weight: 500; color: #4b4b4b; }

/* --- cột phải --- */
.nside-nav { padding: 0 8px; }
.nside-nav__title { font-size: 18px; font-weight: 700; color: #4b4b4b; padding: 16px 0 12px; }
.nside-nav__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.nside-nav__tabs a { font-size: 13px; font-weight: 700; color: var(--muted);
                     padding: 6px 10px; border-radius: 4px; background: var(--surface-2); }
.nside-nav__tabs a:hover { color: var(--brand); }

.nlist__title { font-size: 18px; font-weight: 700; color: #4b4b4b; padding: 16px 0 0 8px; }
.nlist { display: flex; flex-direction: column; }
/* Mục 346×88 tràn ra 8px mỗi bên so với cột (bản gốc: cột 330, mục 346),
   nên đệm 8 đi kèm lề âm 8 để chữ vẫn thẳng mép cột. */
.nline { display: flex; padding: 8px; margin: 0 -8px; }
.nline:hover .nline__title { color: var(--link); }
.nline__img { flex: 0 0 auto; width: 128px; height: 72px; object-fit: cover;
              background: var(--surface-2); }
/* Khối chữ cao bằng ảnh (72) và đẩy ngày xuống đáy, đúng bản gốc. */
.nline__text { flex: 1; min-width: 0; padding: 0 12px; display: flex;
               flex-direction: column; justify-content: space-between; }
.nline__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                overflow: hidden; font-size: 14px; line-height: 22px; color: #4b4b4b; }
.nline__date { font-size: 12px; line-height: 16px; color: #a6a6a6; }

/* --- băng chuyền "Top News" cuối trang --- */
.narticle__bottom { margin-top: 24px; }
.nrow { display: flex; gap: 8px; padding: 12px 0 0; overflow-x: auto; scrollbar-width: none; }
.nrow::-webkit-scrollbar { display: none; }
/* Thẻ 269×237 = ảnh 151 + khối chữ 86 (đệm 8, tên 2 dòng ×22, khe 8, hàng tag 18).
   Hàng dưới là TAG của bài, không phải ngày đăng. */
.ncard { flex: 0 0 auto; width: 269px; display: flex; flex-direction: column; }
.ncard__media { display: block; }
.ncard__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
              object-fit: cover; background: var(--surface-2); }
.ncard__info { display: flex; flex-direction: column; padding: 8px; box-sizing: border-box; }
.ncard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                overflow: hidden; height: 44px; font-size: 14px; line-height: 22px; color: #4b4b4b; }
.ncard__title:hover { color: var(--link); }
.ncard__tags { display: flex; gap: 8px; margin-top: 8px; height: 18px; overflow: hidden; }
.ncard__tag { font-size: 14px; line-height: 18px; color: #666; white-space: nowrap; }
.ncard__tag:hover { color: var(--link); }

/* --- 15.1 Tablet & mobile: hai cột xếp dọc, tiêu đề nhỏ lại --- */
@media (max-width: 995px) {
  /* Bản gốc thu đệm tab ở khổ hẹp: 14/12/12 thay vì 18/12/16. */
  .ntabs__item { padding: 14px 12px 12px; }
  .narticle__top { flex-direction: column; gap: 0; }
  .narticle__main, .narticle__side { width: auto; }
  .narticle__title { font-size: 24px; line-height: 32px; }
}

/* ==========================================================================
   16. TRANG DANH SÁCH TIN TỨC
   Dùng chung khung 1100 của .narticle. Ba khối: mosaic, băng chuyền, mới nhất.
   ========================================================================== */
.nindex { display: flex; flex-direction: column; }

/* Nền trang khu bài viết là TRẮNG (bản gốc body #fff), khác nền xám xanh của
   trang app. Class do body_class() gắn — xem functions.php. */
body.is-article { background: var(--surface); }
/* Băng tab phải DÁN SÁT đáy header (bản gốc đo được khe -1px). .site-main có
   padding-top 20 cho các trang app, ở khu bài viết phải bỏ đi. */
body.is-article .site-main { padding-top: 0; }

/* Dải thẻ + hai nút: nút thò NỬA ra ngoài mép (left/right -20) và căn tâm ở
   111/237 chiều cao dải, đúng như đo được. Bóng đậm hơn nút ở trang landing
   (0 0 8px .25 so với 0 0 4px .12) nên phải khai riêng, không dùng chung. */
/* Khoảng hở 12 nằm ở lớp bọc, KHÔNG ở dải thẻ: để trong dải thì nó cao 249
   thay vì 237, và tâm nút lệch xuống 6px so với bản gốc. */
.nrow-wrap { position: relative; margin-top: 12px; }
.nindex .nrow { padding-top: 0; }
.nindex .cswiper__nav { top: 50%; margin-top: -8px; transform: translateY(-50%);
                        box-shadow: 0 0 8px rgba(0, 0, 0, .25); }
.nindex .cswiper__nav--prev { left: -20px; }
.nindex .cswiper__nav--next { right: -20px; }
.nblock { position: relative; margin-top: 24px; }

/* Khối rỗng của trang danh sách bài: hộp viền nhạt, chữ canh giữa. Nền khu bài
   viết vốn đã trắng nên phải có viền, không thì trông như trang lỗi. */
.nblock--empty { margin-bottom: 40px; }
.nempty { margin-top: 16px; padding: 56px 20px; text-align: center; color: var(--muted);
          border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.nempty p { margin: 0; }
.nempty .empty__title { margin-bottom: 6px; font-size: 17px; color: var(--text); }
.nempty__act { margin-top: 18px; }
.nblock__title { font-size: 20px; font-weight: 500; line-height: 28px; color: #4b4b4b; }
.nblock__desc { margin-top: 8px; font-size: 12px; line-height: 20px; color: #777; }
.nblock__desc p { margin: 0; }
.nblock__title a { color: inherit; }
.nblock__title a:hover { color: var(--link); }
/* Mũi tên ">" sau tiêu đề: ô 6×6 viền 2px xoay 45°, cách chữ 8px. */
.nblock__title a::after { content: ""; display: inline-block; width: 6px; height: 6px;
                          margin-left: 8px; border-top: 2px solid currentColor;
                          border-right: 2px solid currentColor; transform: rotate(45deg);
                          vertical-align: 2px; }

/* --- 16.1 Lưới mosaic "Popular News" ---------------------------------- */
/* Hàng 1: ô lớn + ô cao (cao 316). Hàng 2: ba ô bằng nhau (cao 192). */
.nmosaic { display: grid; gap: 16px; margin-top: 12px; }
.nmosaic--lead { grid-template-columns: 2fr 1fr; grid-auto-rows: 316px; }
.nmosaic--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 192px; }

.ntile { position: relative; display: block; overflow: hidden; border-radius: 4px;
         background: var(--surface-2); }
.ntile__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Chữ trắng đè đáy ảnh, cách mép 18px và đáy 12px, trên nền chuyển tối phủ
   40% dưới. (Bản clone trang tin không dựng được lớp phủ này — bố cục mosaic
   của nó cũng vỡ — nên lấy theo bản clone reviews chạy đúng.) */
.ntile::after { content: ""; position: absolute; left: 0; right: 0; top: 60%; bottom: 0;
                z-index: 1; pointer-events: none;
                background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .8)); }
.ntile__title {
  position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 2;
  color: #fff; font-size: 16px; font-weight: 500; line-height: 24px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ntile:hover .ntile__title { color: #fff; }

/* --- 16.1b Bố cục SPLIT (trang reviews) --------------------------------
   Ảnh lớn 550×291 bên trái, ba dòng 534 bên phải; mỗi dòng ảnh nằm BÊN PHẢI
   (bản gốc dùng flex-direction:row-reverse) kèm đoạn trích và ngày. */
.nsplit { display: grid; grid-template-columns: 550px minmax(0, 1fr);
          gap: 0 16px; align-items: start; margin-top: 12px; }
.nsplit .ntile { height: 291px; }
/* Ảnh lớn ở đây chỉ có MỘT dòng tiêu đề, hộp chữ co theo nội dung và neo sát
   góc dưới-trái (bản gốc: hộp 444×40 cách đáy 0, đệm 8, tiêu đề 428×24). */
.nsplit .ntile__title { left: 0; right: auto; bottom: 0; max-width: 100%;
                        padding: 8px; -webkit-line-clamp: 1; }
.nsplit__rows { display: flex; flex-direction: column; }
.nexrow { display: flex; flex-direction: row-reverse; padding: 8px 0; }
.nexrow:first-child { padding-top: 0; }
.nexrow__img { flex: 0 0 auto; width: 152px; height: 86px; object-fit: cover;
               border-radius: 4px; background: var(--surface-2); }
.nexrow__text { flex: 1; min-width: 0; padding-right: 16px;
                display: flex; flex-direction: column; }
.nexrow__title { font-size: 16px; font-weight: 500; line-height: 24px; color: #4b4b4b;
                 display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nexrow:hover .nexrow__title { color: var(--link); }
.nexrow__desc { font-size: 12px; line-height: 20px; color: var(--muted);
                display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nexrow__date { font-size: 12px; line-height: 20px; color: #777; }
/* Dòng phụ phát sẵn trong part, từng bố cục bật cái mình cần (xem 16.1c). */
.nexrow__author { display: none; }
.ncard__author  { display: none; }

/* Thẻ Trending ở bố cục split CHỈ có tiêu đề (269×211 = ảnh 151 + chữ 60),
   khác thẻ Top News của trang tin (269×237, có thêm ngày). */
.nindex--split .ncard__info { padding: 8px 0; }
.nindex--split .ncard__tags { display: none; }

/* Cột phải trang reviews đảo chiều: CHỮ bên trái, ảnh bên phải. */
.nlatest__side .nline { flex-direction: row-reverse; }
.nlatest__side .nline__text { padding: 0 12px 0 0; }
.nlatest__side .nline__title { font-weight: 500; }

/* --- 16.1c Bố cục GUIDE (trang how-to) ---------------------------------
   Khối đầu: thẻ dọc 483 + ba dòng 593, khe 24 (483 + 24 + 593 = 1100). */
.nindex--guide .nsplit { grid-template-columns: 483px minmax(0, 1fr); gap: 0 24px; }

/* Thẻ dọc: ảnh 483×272 rồi khối chữ CAO CỐ ĐỊNH 70 — bản gốc cắt cụt dòng mô
   tả thứ hai đúng như vậy (tiêu đề 36 + mô tả 40 = 76 > 70). */
.nindex--guide .nsplit .nlead { padding-bottom: 0; }
.nindex--guide .nsplit .nlead__info { height: 70px; overflow: hidden; padding-top: 0; }
.nindex--guide .nsplit .nlead__date { display: none; }
.nindex--guide .nsplit .nlead__title { padding: 6px 0; }
.nindex--guide .nsplit .nlead__desc { -webkit-line-clamp: 2; line-height: 20px; color: #777; }

/* Dòng 593: ảnh 175×98 bên phải, khối chữ cao cố định 100 gồm tiêu đề 1 dòng,
   mô tả 2 dòng và TÁC GIẢ (không phải ngày như bố cục split). */
.nindex--guide .nexrow__img { width: 175px; height: 98px; }
.nindex--guide .nexrow__text { height: 100px; padding-right: 16px; }
.nindex--guide .nexrow__desc { -webkit-line-clamp: 2; margin-top: 6px; color: #777; }
.nindex--guide .nexrow__date { display: none; }
.nindex--guide .nexrow__author { display: block; margin-top: 6px;
                                 font-size: 12px; line-height: 16px; color: #a6a6a6; }

/* Thẻ băng chuyền 269×235 = ảnh 151 + chữ 84: tiêu đề 2 dòng rồi TÁC GIẢ. */
.nindex--guide .ncard__info { padding: 8px 0; }
.nindex--guide .ncard__title { width: 100%; }
.nindex--guide .ncard__tags { display: none; }
.nindex--guide .ncard__author { display: block; margin-top: 8px;
                                font-size: 12px; line-height: 16px; color: #a6a6a6; }

/* Khối cuối: KHÔNG có thẻ lớn, mọi bài là dòng 740 với ảnh 208×117 BÊN PHẢI
   (bản gốc bọc ảnh trong link 240 = ảnh + 16 mỗi bên). Thứ tự chữ là tiêu đề
   → mô tả → ngày, nên đẩy ngày xuống cuối bằng order. */
.nindex--guide .nrow-item { flex-direction: row-reverse; }
.nindex--guide .nrow-item:first-child { padding-top: 0; }
.nindex--guide .nrow-item__img { width: 208px; height: 117px; margin: 0 16px; }
.nindex--guide .nrow-item__text { height: 117px; padding: 0; }
.nindex--guide .nrow-item__desc { -webkit-line-clamp: 2; line-height: 18px; }
.nindex--guide .nrow-item__date { order: 1; color: var(--muted); }

/* --- 16.2 "Latest News": thẻ lớn + các dòng ngang --------------------- */
/* Khối cuối: cột chính 740 + cột phải 316, khe 44 (1100 − 740 − 316). Bố cục
   mosaic thì bản gốc để cột phải TRỐNG nên template không dựng. */
.nlatest__grid { display: flex; gap: 44px; align-items: flex-start; }
.nlatest__side { width: 316px; flex: 0 0 auto; margin-top: 12px; }
.nlatest__col { width: 740px; max-width: 100%; margin-top: 12px; }
/* Thẻ đầu: ảnh 740×416 + khối chữ 76 (tên 2 dòng ×24, khe 12, ngày 16),
   đệm đáy 12 -> tổng 505 đúng như bản gốc. Chữ ĐEN, không phải overlay trắng. */
.nlatest__col .ncard { width: 100%; padding-bottom: 12px; }
.nlatest__col .ncard__img { height: 416px; aspect-ratio: auto; border-radius: 4px; }
/* Bài đầu 740×505 = ảnh 416 + khối chữ 76 (đệm trên 12) + đệm dưới 12.
   Thứ tự bản gốc: NGÀY (xanh) → TIÊU ĐỀ 1 dòng → MÔ TẢ 1 dòng. */
.nlead { display: block; padding-bottom: 12px; }
.nlead__img { display: block; width: 100%; height: auto; aspect-ratio: 740 / 416;
              object-fit: cover; background: var(--surface-2); }
.nlead__info { display: flex; flex-direction: column; padding-top: 12px; }
.nlead__date { font-size: 12px; line-height: 20px; color: #00a6ed; }
.nlead__title { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
                overflow: hidden; font-size: 16px; font-weight: 500; line-height: 24px; color: #4b4b4b; }
.nlead:hover .nlead__title { color: var(--link); }
.nlead__desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
               overflow: hidden; font-size: 12px; line-height: 20px; color: var(--muted); }

/* Dòng 740×115 = đệm 12 trên dưới + ảnh 160×90; khối chữ đệm ngang 16 và
   dàn đều theo chiều dọc (space-around) đúng như bản gốc. */
.nrow-item { display: flex; padding: 12px 0; align-items: flex-start; }
.nrow-item__img { flex: 0 0 auto; width: 160px; height: 90px; object-fit: cover;
                  background: var(--surface-2); }
.nrow-item__text { flex: 1; min-width: 0; height: 90px; box-sizing: border-box;
                   padding: 0 16px; display: flex; flex-direction: column;
                   justify-content: space-around; }
.nrow-item__date { font-size: 12px; line-height: 20px; color: #00a6ed; }
.nrow-item__title { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
                    overflow: hidden; font-size: 16px; font-weight: 500; line-height: 24px; color: #4b4b4b; }
.nrow-item:hover .nrow-item__title { color: var(--link); }
.nrow-item__desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
                   overflow: hidden; font-size: 12px; line-height: 20px; color: var(--muted); }

/* ==========================================================================
   17. TRANG KẾT QUẢ TÌM KIẾM — khung 1200, ruột 1168 (rộng hơn 1100 của các
       trang khác, đúng bản gốc).
   ========================================================================== */
.spage { max-width: 1200px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.spage__head { padding-top: 8px; }
.spage__title { margin: 0; font-size: 24px; font-weight: 500; line-height: 36px; color: #3c4043; }
.spage__count { margin: 0; font-size: 14px; line-height: 21px; color: var(--muted); }

/* Dải tab Apps | Articles: viên thuốc 180×38 viền mảnh. */
.stabs { display: flex; gap: 4px; margin-top: 16px; }
.stabs__item {
  display: grid; place-items: center; width: 180px; height: 38px; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--surface-2); border-radius: 999px;
  font-size: 14px; line-height: 21px; color: var(--muted);
}
.stabs__item:hover { color: var(--brand-dark); }
.stabs__item.is-on { color: var(--brand-dark); border-color: var(--brand); font-weight: 500; }

/* Thẻ kết quả nổi bật 1168×298 = ảnh/chữ bên trái + bài liên quan bên phải. */
.stop {
  display: flex; gap: 48px; align-items: flex-start;
  margin-top: 16px; padding: 24px; background: var(--surface); border-radius: 12px;
}
/* Bản gốc: icon + khối tên nằm HÀNG TRÊN, còn dãy số liệu và nút tải bắt đầu
   từ mép trái (DƯỚI icon) chứ không thụt theo cột chữ.
   Nhịp dọc: tên dy=6 · NPH 50 · ngày 88 · số liệu 140 · nút 210 · tổng cao 250. */
.stop__main { flex: 1 1 auto; min-width: 0; display: grid;
              grid-template-columns: 112px minmax(0, 1fr); gap: 0 24px; }
.stop__icon { grid-row: 1; grid-column: 1; width: 112px; height: 112px;
              border-radius: 15%; object-fit: cover; background: var(--surface-2); }
.stop__head { grid-row: 1; grid-column: 2; padding-top: 6px;
              display: flex; flex-direction: column; }
.stop__name { font-size: 24px; line-height: 28px; color: #4b4b4b; }
.stop__name:hover { color: var(--brand-dark); }
.stop__pub  { margin-top: 16px; font-size: 12px; line-height: 22px; color: #5e5e5e; }
.stop__date { margin-top: 16px; font-size: 12px; line-height: 18px; color: var(--muted); }

.stop__stats { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 32px; margin-top: 28px; }
.stop__stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stop__stat-v { font-size: 14px; line-height: 21px; color: #666; }
.stop__stat-v--star { display: inline-flex; align-items: center; gap: 4px; color: #fa8b16; }
.stop__stat-v--star svg { width: 14px; height: 14px; fill: currentColor; }
.stop__stat-l { font-size: 12px; line-height: 18px; color: var(--muted); }

.stop__dl { grid-row: 3; grid-column: 1 / -1; justify-self: start;
            display: inline-flex; align-items: center; justify-content: center; gap: 8px;
            margin-top: 30px; padding: 0 24px; min-width: 221px; height: 40px; }
.stop__dl-size { opacity: .85; }

/* Bài liên quan bên phải: ảnh phủ kín, chữ trắng đè đáy. */
.stop__art { position: relative; display: block; flex: 0 0 430px; width: 430px; height: 250px;
             overflow: hidden; border-radius: 8px; background: var(--surface-2); }
.stop__art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stop__art::after { content: ""; position: absolute; left: 0; right: 0; top: 55%; bottom: 0;
                    background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8)); }
.stop__art-kind, .stop__art-title { position: absolute; left: 16px; right: 16px; z-index: 2; color: #fff; }
.stop__art-kind  { bottom: 44px; font-size: 12px; line-height: 18px; opacity: .85; }
.stop__art-title { bottom: 14px; font-size: 14px; font-weight: 500; line-height: 22px;
                   display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* Lưới kết quả: 8 cột, ô 136×217 (icon 120 + tên 2 dòng + NPH + điểm). */
.sgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
/* Ô 136×217: icon 120 ở dy=8, tên 1 dòng ở dy=137, NPH dy=165, điểm dy=187.
   Tên CẮT MỘT DÒNG có "…" (bản gốc: hộp tên cao đúng 24, không phải 2 dòng). */
.shit { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0; }
.shit__icon { width: 120px; height: 120px; border-radius: 15%; object-fit: cover; background: var(--surface-2); }
.shit__name { margin-top: 9px; max-width: 100%; height: 24px; font-size: 14px; line-height: 24px; color: #3c4043;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shit:hover .shit__name { color: var(--brand-dark); }
.shit__pub { margin-top: 4px; height: 18px; font-size: 12px; line-height: 18px; color: var(--muted);
             max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shit__rate { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
              font-size: 13px; line-height: 22px; color: #fa8b16; }
.shit__rate svg { width: 14px; height: 14px; fill: currentColor; }
.shit__rate--none { color: #ccc; }

/* Gợi ý liên quan: 3 cột viên thuốc 384×40. */
.srel { margin-top: 24px; }
.srel__title { margin: 0; font-size: 18px; font-weight: 500; line-height: 24px; color: #4b4b4b; }
.srel__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.srel__item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
              background: var(--surface); border-radius: 999px;
              font-size: 14px; line-height: 21px; color: #5e5e5e; }
.srel__item:hover { color: var(--brand-dark); }
.srel__item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Thẻ CTA cuối trang. */
.scta { display: flex; align-items: center; justify-content: space-between; gap: 24px;
        margin: 24px 0; padding: 24px; background: var(--surface); border-radius: 8px; }
.scta__title { margin: 0; font-size: 18px; font-weight: 500; color: var(--link); }
.scta__desc  { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* Khối "Articles" dưới Related Searches: 4 cột khe 12, thẻ 283×246 nền TRẮNG
   bo 8 đệm 12 — ảnh 259×146 (dy 12), tiêu đề 2 dòng (dy 164), ngày (dy 216). */
.sarts { margin-top: 24px; }
.sarts__title { margin: 0; font-size: 18px; font-weight: 500; line-height: 27px; color: #4b4b4b; }
.sarts__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sart { display: block; box-sizing: border-box; padding: 12px;
        background: var(--surface); border-radius: 8px; }
.sart__img { display: block; width: 100%; height: auto; aspect-ratio: 259 / 146;
             object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.sart__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
               overflow: hidden; margin-top: 6px; height: 44px;
               font-size: 14px; line-height: 22px; color: #5e5e5e; }
.sart:hover .sart__title { color: var(--brand-dark); }
.sart__date { display: block; margin-top: 8px; font-size: 12px; line-height: 18px; color: var(--muted); }

/* Nút "Show More": 360×40, nền xanh nhạt 10%, chữ xanh, bo 4. */
.smore { margin: 16px 0 0; text-align: center; }
.smore__btn { display: inline-grid; place-items: center; width: 360px; max-width: 100%; height: 40px;
              background: rgba(36, 205, 119, .1); color: var(--brand); border-radius: 4px;
              font-size: 14px; }
.smore__btn:hover { background: rgba(36, 205, 119, .18); }

@media (max-width: 1100px) { .sgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
                             .sarts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sarts__list { grid-template-columns: minmax(0, 1fr); }
  .shit__icon { width: 100%; height: auto; aspect-ratio: 1; }
  .stop { flex-direction: column; }
  .stop__art { flex: none; width: 100%; }
  .stop__main { grid-template-columns: 80px minmax(0, 1fr); gap: 0 16px; }
  .stop__icon { width: 80px; height: 80px; }
  .stop__name { font-size: 18px; }
  .stop__stats { gap: 20px; }
  .srel__list { grid-template-columns: 1fr; }
  .scta { flex-direction: column; align-items: stretch; }
  .stabs__item { width: auto; flex: 1; }
}

/* ==========================================================================
   19. TRANG ĐĂNG NHẬP
   Dải xanh cao 470 tràn viền ngay dưới header; NÊM trắng 100px cắt đáy nó;
   thẻ trắng 400×444 bo 4 nổi giữa, cách đỉnh dải 100.
   ========================================================================== */
/* Hình học bản gốc ở 1345: header kết thúc 70 · dải xanh 70..540 (cao 470)
   · nêm 440..540 · thẻ 170..614 · chân trang 664.
   Tức: thẻ cách ĐỈNH dải 100, thò xuống DƯỚI đáy dải 74, và đáy dải cách đáy
   khối 124. Buộc dải theo tỉ lệ đó để thẻ cao bao nhiêu cũng cân. */
/* Nền trang trắng (mặc định site là #f2f5f9): vùng dưới nêm phải liền trắng
   tới chân trang, đúng bản gốc. */
body.is-login { background: var(--surface); }

/* margin âm để huỷ đệm trên/dưới của .site-main — bản gốc cho dải xanh dính
   sát header và chân trang dính sát khối này. */
.lgn { position: relative; margin: -20px 0 -32px; padding: 100px 0 50px;
       min-height: 594px; box-sizing: border-box; }
/* Tràn hết bề ngang dù đang nằm trong .wrap. Cao CỐ ĐỊNH 470 như bản gốc —
   trước đây buộc theo chiều cao thẻ nên chưa cấu hình đăng nhập mạng xã hội
   là dải mỏng dính, nhìn khác hẳn. */
.lgn__bg {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 100vw; top: 0; height: 470px; z-index: 0;
  background: linear-gradient(90deg, #49ca88 0%, #a3c259 100%);
  /* Đáy cắt chéo thẳng: trái cao hơn phải ~34px, đúng bản gốc apkpure. */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 34px));
}

.lgn__card {
  position: relative; z-index: 1;
  box-sizing: border-box; width: 400px; max-width: 100%; margin: 0 auto;
  padding: 32px 32px 48px; background: var(--surface); border-radius: 4px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, .12);
}
.lgn__title { margin: 0; font-size: 20px; font-weight: 500; line-height: 28px;
              color: #666; text-align: center; }

/* Nhịp dọc bản gốc (tính từ mép trong thẻ): tiêu đề 32 · nút mạng xã hội 148
   · gạch OR 204 · nút chính 260 · điều khoản 316 · mời đăng ký 356. */
.lgn__social { margin-top: 44px; display: flex; flex-direction: column;
               align-items: center; gap: 12px; }

/* Nút mạng xã hội: viên thuốc 336×40 nền màu thương hiệu (--c), icon trong
   vòng tròn trắng 28 cách mép trái 8, chữ trắng căn giữa. */
.lgn__prov {
  position: relative; box-sizing: border-box; display: grid; place-items: center;
  width: 100%; height: 40px; padding: 0 44px;
  border: 0; border-radius: 40px; cursor: pointer;
  background: var(--c, #5e5e5e); color: #fff; font: inherit; font-size: 14px;
}
.lgn__prov:hover { color: #fff; filter: brightness(1.05); }
.lgn__prov-icon { position: absolute; left: 8px; top: 6px;
                  display: grid; place-items: center; width: 28px; height: 28px;
                  background: #fff; border-radius: 50%; }
.lgn__prov-icon svg { display: block; }
.lgn__prov-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Chưa nối flow: giữ nguyên giao diện, chỉ chặn bấm. */
.lgn__prov[aria-disabled="true"] { cursor: default; }

/* Gạch "OR": hàng cao 40, đường kẻ nằm giữa, chữ đè lên có nền trắng che đường. */
.lgn__or { position: relative; margin: 16px 0 0; height: 40px;
           display: grid; place-items: center; }
.lgn__or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%;
                   height: 1px; background: var(--line); }
.lgn__or span { position: relative; padding: 0 12px; background: var(--surface);
                font-size: 12px; line-height: 20px; color: #a6a6a6;
                text-transform: lowercase; /* "or" như bản gốc apkpure */ }

.lgn__btn {
  display: grid; place-items: center; height: 40px; margin-top: 16px;
  background: var(--brand); color: var(--on-brand); border-radius: 40px;
  font-size: 14px; line-height: 18px;
}
/* Chưa cấu hình đăng nhập mạng xã hội thì nút này nằm ngay dưới tiêu đề —
   lúc đó cần thở hơn 16px. */
.lgn__title + .lgn__btn { margin-top: 36px; }
.lgn__btn:hover { background: var(--brand-dark); color: var(--on-brand); }

.lgn__terms { display: flex; gap: 8px; margin: 16px 0 0;
              font-size: 12px; line-height: 20px; color: #a6a6a6; }
.lgn__check { flex: none; width: 14px; height: 14px; margin-top: 3px;
              background: #e7e7e7; border-radius: 2px; }
.lgn__terms a { color: var(--brand); }

/* Một dòng: "Chưa có tài khoản? Đăng ký" — không để nó xuống dòng. */
.lgn__signup { margin: 0; height: 40px; display: flex; gap: 6px;
               align-items: center; justify-content: center;
               font-size: 13px; color: #a6a6a6; }
.lgn__signup a { color: #fa8b16; }

/* ---- Khung đăng nhập / đăng ký trong cùng thẻ ---- */
.lgn__pane[hidden] { display: none; }
/* Tiêu đề khung đăng ký nằm ở 38 (khung chọn là 32) nên đẩy thêm 6. */
.lgn__title--strong { margin-top: 6px; font-weight: 700; color: #3c4043; }

/* Nút quay lại: vòng tròn viền xanh ở góc trên trái. */
.lgn__back { display: grid; place-items: center; width: 24px; height: 24px;
             border: 1px solid var(--brand); border-radius: 50%; color: var(--brand); }
.lgn__back:hover { background: rgba(36, 205, 119, .1); color: var(--brand); }

/* Bản gốc: nút quay lại kết thúc ở 57, ô nhập đầu ở 92 -> cách 35. */
.lgn__form { margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
/* Khung đăng ký mở đầu bằng tiêu đề chứ không phải nút quay lại. */
.lgn__title + .lgn__form { margin-top: 25px; }
/* Ô nhập viên thuốc, icon nằm trong bên trái. */
.lgnf { position: relative; display: block; }
.lgnf__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
              color: #a6a6a6; pointer-events: none; display: grid; }
.lgnf__input {
  box-sizing: border-box; width: 100%; height: 40px; padding: 0 16px 0 46px;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 40px;
}
.lgnf__input::placeholder { color: #a6a6a6; }
.lgnf__input:focus { border-color: var(--brand); outline: none; }

/* Nút dạng <button> phải trông hệt nút dạng <a>. */
button.lgn__btn { width: 100%; border: 0; cursor: pointer; font: inherit; font-size: 14px; }
.lgn__form .lgn__btn { margin-top: 0; }
.lgn__form .lgn__terms { margin: 0; }

.lgn__forgot { margin: 18px 0 0; text-align: center; font-size: 13px; }
.lgn__forgot a { color: #666; }
.lgn__forgot a:hover { color: var(--brand-dark); }

/* Ở khung đăng nhập, hàng mời đăng ký nằm sau "Quên mật khẩu?" nên phải thở
   ra (bản gốc cách 48 tính từ đỉnh này sang đỉnh kia) và cao tự nhiên — khác
   khung chọn, nơi nó là một hàng 40 đứng riêng. */
.lgn__forgot + .lgn__signup { margin-top: 22px; height: auto; }
/* Khung đăng ký: hàng mời đăng nhập nằm ngay sau form, bản gốc cách 35. */
.lgn__form + .lgn__signup { margin-top: 35px; height: auto; }

.lgn__err { margin: 16px 0 0; padding: 8px 12px; border-radius: 4px;
            background: rgba(234, 67, 53, .08); color: #d93025;
            font-size: 13px; line-height: 20px; }

@media (max-width: 719px) {
  .lgn { padding: 48px 0 32px; min-height: 420px; }
  .lgn__bg { height: 330px; }
  .lgn__card { width: 100%; padding: 24px 24px 32px; }
  .lgn__social { margin-top: 32px; }
}

/* ==========================================================================
   18. KHUNG GỢI Ý TÌM KIẾM (dùng chung cho ô ở đầu trang và ở sidebar)
   ========================================================================== */
.search { position: relative; }
.sgst {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
  max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.18);
}
.sgst[hidden] { display: none; }
.sgst__group { padding: 4px 0; }
.sgst__group + .sgst__group { border-top: 1px solid var(--line); }

/* một dòng lịch sử: chữ bên trái, nút xoá bên phải */
.sgst__row--his { display: flex; align-items: center; }
.sgst__his { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
             padding: 9px 12px; font-size: 14px; color: var(--text); }
.sgst__his svg { flex: none; color: var(--faint); }
.sgst__his span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgst__row--his:hover { background: var(--surface-2); }
.sgst__del { flex: none; display: grid; place-items: center; width: 32px; height: 32px;
             margin-right: 6px; border: 0; background: none; cursor: pointer; color: var(--faint); }
.sgst__del:hover { color: var(--text); }

/* một app gợi ý: icon 40, tên (tô đậm phần khớp), dòng số liệu, nút tải */
.sgst__app { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.sgst__app:hover { background: var(--surface-2); }
.sgst__icon { flex: none; width: 40px; height: 40px; border-radius: 22%; object-fit: cover;
              background: var(--surface-2); }
.sgst__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sgst__name { font-size: 14px; line-height: 20px; color: var(--text);
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgst__name b { color: var(--brand-dark); font-weight: 500; }
.sgst__meta { display: flex; gap: 10px; font-size: 12px; line-height: 18px; color: var(--muted); }
.sgst__star { color: #fa8b16; }
.sgst__dl { flex: none; padding: 5px 14px; border-radius: 999px;
            background: var(--brand); color: var(--on-brand); font-size: 13px; }

/* một từ khoá gợi ý */
.sgst__kw { display: block; padding: 10px 12px; font-size: 14px; color: var(--text); }
.sgst__kw:hover { background: var(--surface-2); }
.sgst__kw b { color: var(--text); font-weight: 700; }

/* --- 16.3 Mobile ------------------------------------------------------- */
@media (max-width: 995px) {
  /* Split & guide về một cột; ảnh lớn giữ tỉ lệ, dòng vẫn ảnh bên phải. */
  .nsplit, .nindex--guide .nsplit { grid-template-columns: minmax(0, 1fr); }
  /* Bỏ các chiều cao cứng của bố cục guide; ảnh dòng thu lại cho vừa khổ hẹp
     (208 là số đo desktop, để nguyên thì cột chữ chỉ còn ~100px). */
  .nindex--guide .nexrow__text,
  .nindex--guide .nrow-item__text { height: auto; }
  .nindex--guide .nsplit .nlead__info { height: auto; }
  .nindex--guide .nexrow__img { width: 128px; height: 72px; }
  .nindex--guide .nrow-item__img { width: 128px; height: 72px; margin: 0 0 0 12px; }
  .nsplit .ntile { height: auto; aspect-ratio: 16 / 9; }
  .nsplit__rows { margin-top: 12px; }
  .nlatest__grid { flex-direction: column; gap: 0; }
  .nlatest__side { width: auto; }
  /* Mosaic về một cột; ô lớn giữ tỉ lệ thay vì chiều cao cứng. */
  .nmosaic--lead, .nmosaic--trio { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .nmosaic .ntile { aspect-ratio: 16 / 9; }
  .nlatest__col { width: auto; }
  .nlatest__col .ncard__img { height: auto; aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   13. WIDGET NỔI — dải chia sẻ, thanh cookie, nút lên đầu trang
   ========================================================================== */
.share-rail {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40;
  display: grid;
}
.share-rail__item {
  width: 38px; height: 46px;
  display: grid; place-items: center;
  background: var(--faint); color: #fff;
  font-weight: 700; font-size: 15px;
}
.share-rail__item:hover { color: #fff; filter: brightness(1.1); }
.share-rail__item img, .share-rail__item svg { width: 18px; height: 18px; display: block; }
@media (max-width: 995px) { .share-rail { display: none; } }

.cookie-bar {
  position: fixed; inset: auto 0 0 0; z-index: 90;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  padding: 16px 24px;
  background: #4a5a67; color: #fff;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar__text { margin: 0; flex: 1 1 340px; line-height: 1.5; }
.cookie-bar__actions { display: flex; gap: 10px; margin-left: auto; }
.cookie-bar .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.cookie-bar .btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 45;
  width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--brand-dark); }
@media (max-width: 995px) { .to-top { right: 12px; bottom: 12px; } }

/* ==========================================================================
   MOBILE — bản tham chiếu KHÔNG dùng lại layout desktop mà đổi hẳn:
   header xanh cao 45px cố định (hamburger · logo giữa · search), nav nằm trong
   drawer trượt, hero tràn viền, panel tràn viền, rail 4 cột icon 72px.
   ========================================================================== */
.nav-burger, .drawer, .drawer__scrim { display: none; }

@media (max-width: 719px) {
  body { padding-top: 45px; }

  /* Thẻ app trang versions: nút 212px cố định làm cột chữ bị bóp còn 23px ở
     375. Xuống dòng, nút trải hết bề ngang phía dưới. */
  .verhead { flex-direction: column; align-items: stretch; gap: 12px; }
  .verhead__dl { width: 100%; }

  .site-header {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--brand); border-bottom: 0;
  }
  .site-header__bar {
    position: relative;
    height: 45px; gap: 0; padding: 0;
    display: grid; grid-template-columns: 45px 1fr 45px; align-items: center;
  }

  /* hamburger trái */
  .nav-burger {
    display: grid; place-items: center;
    width: 45px; height: 45px; border: 0; background: none; cursor: pointer;
    color: var(--on-brand); padding: 0;
  }

  /* logo canh giữa, chữ trắng */
  /* PHẢI giới hạn trong .site-header: viết .brand trần thì rule này rơi cả xuống
     logo ở chân trang, làm nó bị căn giữa và đổi cỡ chữ. */
  .site-header .brand, .site-header .brand--img { grid-column: 2; justify-self: center; color: var(--on-brand); font-size: 17px; }
  .site-header .brand:hover { color: var(--on-brand); }
  .site-header .brand__mark { width: 24px; height: 24px; font-size: 13px; background: var(--on-brand); color: var(--brand); }
  .site-header .brand--img img { height: 24px; width: auto; }

  /* nav desktop ẩn đi, chuyển vào drawer */
  .site-header__bar > nav { display: none; }

  .header-actions { grid-column: 3; justify-self: end; gap: 0; align-self: center; }
  /* Chỉ còn icon tìm kiếm ở bên phải. Để cả hộp tìm kiếm 300px hay tấm tài
     khoản 138px thì chúng nhét vào cột 45px và lọt hẳn ra ngoài màn hình. */
  .search-box, .header-user { display: none; }
  .drawer__logout { display: block; padding: 10px 16px; font-size: 14px; color: var(--muted); }
  .drawer__logout:hover { color: var(--brand-dark); }
  .icon-btn--search { display: grid; }
  /* Ô bung 600px không có chỗ trong lưới header 45px của mobile — chốt ẩn hẳn
     kể cả khi trạng thái "đang tìm" còn sót lại từ lúc màn còn rộng. */
  .hsearch { display: none; }
  .icon-btn { width: 45px; height: 45px; color: var(--on-brand); }
  .icon-btn:hover { background: rgba(255,255,255,.15); color: var(--on-brand); }
  .avatar { width: 26px; height: 26px; }

  /* ---- drawer trượt từ trái ---- */
  .drawer {
    display: block; position: fixed; inset: 0 auto 0 0; z-index: 110;
    width: min(280px, 82vw); padding: 12px 0;
    background: var(--surface);
    transform: translateX(-100%); transition: transform .22s ease;
    overflow-y: auto;
  }
  .drawer[data-open="true"] { transform: none; }
  .drawer__scrim { display: block; position: fixed; inset: 0; z-index: 105; background: rgba(0,0,0,.4); }
  .drawer__scrim[hidden] { display: none; }
  /* đầu drawer: nút đóng + chỗ tài khoản */
  .drawer__head { padding: 6px 12px 12px; border-bottom: 1px solid var(--line); }
  .drawer__close {
    width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--muted);
  }
  .drawer__close:hover { color: var(--text); }
  .drawer__user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 14px; }
  .drawer .avatar { width: 36px; height: 36px; }
  .avatar--empty { display: grid; place-items: center; color: var(--faint); background: var(--surface-2); border-radius: 50%; }

  /* mục nav: icon trái, chữ, caret phải */
  .drawer a, .drawer .nav-toggle {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 0 20px; height: 44px;
    border: 0; background: none; cursor: pointer;
    font-size: 15px; color: var(--text); text-align: left;
  }
  .drawer a:hover, .drawer .nav-toggle:hover { background: var(--surface-2); }
  .drawer .nav-ico { width: 20px; height: 20px; flex: none; color: var(--muted); }
  .drawer .nav-toggle .nav-caret { margin-left: auto; }

  /* submenu: thụt vào + nền xám để tách khỏi mục cha */
  .drawer .nav-sub {
    position: static; border: 0; box-shadow: none; border-radius: 0;
    padding: 0; min-width: 0; background: var(--surface-2);
  }
  .drawer .nav-sub a { padding-left: 52px; height: 40px; font-size: 14px; color: var(--muted); }
  .drawer .nav-sub a:hover { background: var(--line); color: var(--text); }
  @media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

  /* ---- XEN KẼ KHỐI SIDEBAR VÀO DÒNG CHẢY CHÍNH ----
     Bản tham chiếu ở mobile KHÔNG dồn sidebar xuống cuối mà trộn vào giữa:
     hero → phím tắt → promo → Discover → Popular ×2 → Latest ×2 → Articles →
     Editor's → Games on Sale → Partner → Pre-reg → Top New ×2 → Hot ×2.
     display:contents "xoá" hai lớp bọc để mọi khối thành anh em, rồi order
     (biến --o mỗi khối tự khai) xếp lại đúng thứ tự trên. */
  .layout > div, .layout > .sidebar { display: contents; }
  .layout > div > *, .layout > .sidebar > * { order: var(--o, 50); }
  /* Khoảng hở giữa panel ở mobile là 4px (desktop 8px). Chỉ dùng gap của lưới —
     giữ margin-bottom của .rail/.hero nữa là cộng dồn thành 16px. */
  .layout > div > *, .layout > .sidebar > * { margin-bottom: 0; }

  /* Ô tìm kiếm + chip: bản tham chiếu ẩn hẳn ở mobile, chỉ còn icon trên header. */
  .side-search { display: none; }

  /* ---- nội dung tràn viền ---- */
  .site-main { padding: 0 0 24px; }
  .wrap { padding: 0; }
  /* chữ nằm ngoài panel (breadcrumb, nút quay lại) vẫn cần lề hai bên */
  .breadcrumb, .site-main > .wrap > p { padding-left: 16px; padding-right: 16px; }
  .layout { gap: var(--module-gap); }
  .card { border-radius: 0; }

  /* hero cao 170, sát mép */
  .hero { margin-bottom: 8px; }
  .hero__img { height: 170px; }
  .hero__bar { padding: 10px 12px; gap: 8px; }
  .hero__icon { width: 36px; height: 36px; }
  .hero__name { font-size: 14px; }

  /* rail A: 4 cột (bản gốc chỉ wrap 4/hàng ở ≤429; trên đó là cuộn ngang) */
  .rail-a { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-v) 16px; }
  .app-card__name { font-size: 12px; }

  /* --- Popular Games/Apps: MỘT hàng, cuộn ngang, item 76 rộng ---
     Bản gốc ở mobile đổi khối này sang display:block + white-space:nowrap,
     KHÔNG phải lưới 4 cột như Discover. */
  .rail-a--rank {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: 76px; gap: 12px;
    /* KHÔNG dùng scroll-snap: nó tự cuộn để căn item đầu vào mép snapport và
       ăn mất padding-left 16px. Bản gốc cũng chỉ dùng overflow-x: auto. */
    overflow-x: auto;
  }
  .rail-a--rank .app-card__name { font-size: 12px; }

  /* --- Hot Games/Apps: lưới 4 cột KHÔNG cuộn, thẻ dọc (icon trên, chữ dưới) ---
     Bản gốc chuyển .app-tile từ hàng ngang sang thẻ dọc và ẩn bớt dòng phụ. */
  /* .rail-b.rail-b--category (0,2,0) để thắng .rail-b (0,1,0) bất kể thứ tự —
     nếu chỉ dùng .rail-b--category thì rule .rail-b bên dưới đè mất. */
  .rail-b.rail-b--category {
    grid-auto-flow: row; grid-template-rows: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto; overflow-x: visible; gap: 12px 18px;
  }
  .rail-b--category .app-tile {
    display: block; height: auto; grid-template-columns: none;
  }
  .rail-b--category .app-tile__icon { width: 100%; height: auto; aspect-ratio: 1; }
  /* Bản gốc ô cao 132: icon 69 + tên(4+18) + 2 dòng phụ(2+18 mỗi dòng) = 131.
     Tên chỉ MỘT dòng — để 2 dòng là vọt lên 141. */
  .rail-b--category .app-tile__name { margin-top: 4px; font-size: 12px; line-height: 18px; -webkit-line-clamp: 1; white-space: normal; }
  .rail-b--category .app-tile__sub { margin-top: 2px; font-size: 12px; line-height: 18px; }

  /* rail B/C còn lại (Latest Update, Partner, Pre-registration): cột-wrap cao
     tối đa 236px — cuộn ngang theo 3 hàng, item rộng (viewport − 76px). */
  .rail-b, .rail-c {
    grid-auto-flow: column; grid-template-rows: repeat(3, auto);
    grid-template-columns: none;
    /* Bản gốc: item = viewport − 76px (284 ở màn 360). Ở đây 100% là content box
       đã trừ 32px padding hai bên, nên trừ 44 để ra đúng con số đó. */
    grid-auto-columns: calc(100% - 44px);
    overflow-x: auto;
    gap: 12px; padding-bottom: 12px;
  }
  /* Bản gốc @mobile: ô cao ĐÚNG 68 (desktop 72) và ba dòng chữ ở dy 0 / 24 / 48
     — tức khe giữa các dòng là 4px, không phải 6px như desktop. Dùng min-height
     thì không thắng được height:72px của rule desktop, phải ghi đè height. */
  .app-tile { grid-template-columns: 70px minmax(0, 1fr); height: 68px; }
  .app-tile__icon { width: 70px; height: 70px; }
  .app-tile__sub { margin-top: 4px; }

  /* thẻ bài viết: 1 cột, ảnh 124×70 */
  .rail-d { grid-template-columns: minmax(0, 1fr); }
  .article-card { grid-template-columns: 124px minmax(0, 1fr); min-height: 70px; }
  .article-card__img { width: 124px; height: 70px; }

  /* ---- promo: thanh ngang cao 60px, nút Download nằm bên phải ---- */
  .promo { display: grid; grid-template-columns: 40px minmax(0, 1fr) max-content;
           gap: 10px; align-items: center; padding: 8px 16px; min-height: 60px; }
  .promo__top { display: contents; }
  .promo__icon { width: 40px; height: 40px; }
  /* Một dòng + cắt ellipsis: nếu để xuống dòng thì cột chữ chỉ còn ~67px
     (nút Download chiếm 200px) và thanh promo cao vọt lên 140px thay vì 60. */
  .promo__name { font-size: 14px; font-weight: 500; line-height: 20px;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .promo__desc { font-size: 12px; line-height: 16px;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .promo .btn { max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .promo__help, .promo__social { display: none; }
  .promo > p { margin: 0; }
  .promo .btn--block { width: auto; padding: 6px 14px; }

  /* ---- Weekly Editor's @ mobile: carousel cuộn ngang, MỌI item là thẻ 260×188.
     Bố cục: banner 260×134 (bo 8px) chiếm trọn hàng 1; hàng 2 là icon 50 + chữ.
     PHẢI reset position/top/left — rule desktop dùng absolute (top:118px) và nếu
     chỉ đổi width/height thì icon vẫn đè lên banner. ---- */
  .editor__list {
    grid-auto-flow: column; grid-auto-columns: 260px;
    gap: 12px; overflow-x: auto; padding: 0 16px 16px;
  }
  .editor__item, .editor__item--lead {
    display: grid; grid-template-columns: 50px minmax(0, 1fr);
    column-gap: 8px; row-gap: 4px;
    position: static; height: auto; min-height: 0;
  }
  .editor__item--lead::after { display: none; }

  .editor__item > .editor__banner, .editor__item--lead > .editor__banner {
    display: block; grid-column: 1 / -1;
    position: static; top: auto; left: auto;
    width: 260px; height: 134px; max-width: none;
    margin: 0; border-radius: 8px; object-fit: cover;
  }
  .editor__item > .editor__icon, .editor__item--lead > .editor__icon {
    position: static; top: auto; left: auto;
    width: 50px; height: 50px;
  }
  .editor__item > .editor__body, .editor__item--lead > .editor__body {
    position: static; top: auto; left: auto; right: auto; margin: 0;
  }

  .editor__item .editor__name, .editor__item--lead .editor__name {
    font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text);
  }
  .editor__item--lead .editor__name .rating { color: var(--star); }
  .editor__item .editor__desc, .editor__item--lead .editor__desc {
    margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: normal;
  }

  /* Ẩn thanh cuộn của các rail cuộn ngang — bản tham chiếu đo được barHeight = 0.
     Vẫn vuốt/cuộn được bình thường, chỉ là không vẽ thanh. */
  .rail-a--rank, .rail-b, .rail-c, .editor__list { scrollbar-width: none; }
  .rail-a--rank::-webkit-scrollbar,
  .rail-b::-webkit-scrollbar,
  .rail-c::-webkit-scrollbar,
  .editor__list::-webkit-scrollbar { display: none; }

  /* ---- chân trang @ mobile: logo căn TRÁI, 3 nhóm link xếp DỌC ---- */
  .site-footer { padding: 24px 0 16px; }
  .site-footer > .wrap { padding: 0 16px; }
  .site-footer__groups { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .site-footer__about { font-size: 13px; }
  .site-footer .brand { justify-content: flex-start; font-size: 20px; color: var(--text); }
  .site-footer .brand__mark { width: 28px; height: 28px; font-size: 15px; background: var(--brand); color: var(--on-brand); }

  /* ---- hàng phím tắt tròn ---- */
  .shortcuts {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 12px 8px; margin-bottom: 8px;
  }
  .shortcut { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 64px; font-size: 12px; color: var(--text); }
  .shortcut:hover { color: var(--brand-dark); }
  .shortcut__icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand-dark);
  }
  .shortcut__icon svg { width: 18px; height: 18px; }
  /* ---- TRANG CHI TIẾT Ở MOBILE ----
     Bản gốc đo ở 360: hero xếp dọc (icon 86), nút tải tràn ngang, các rail app
     chuyển sang CUỘN NGANG item 86×162, thẻ bài 220×180, review cuộn ngang 312.
     Lưới "Additional Information" vẫn giữ 2 cột. */
  /* align-items:center là của lưới desktop — không huỷ thì các con co lại theo
     nội dung rồi bị căn giữa, dải chỉ số phình ra 479px và tràn ngang 60px. */
  .app-head { display: flex; flex-direction: column; align-items: stretch;
              gap: 12px; padding: 12px 0; }
  .app-head__crumbs, .app-head__info, .app-head__dl, .app-head__stats { padding: 0 16px; }
  .app-head__info { gap: 12px; }
  .app-head__icon { width: 86px; height: 86px; }
  .app-head__name { font-size: 18px; }
  .dl-btn { width: 100%; }

  /* Review: cuộn ngang, mỗi thẻ 312 */
  .reviews__list { display: flex; overflow-x: auto; scrollbar-width: none; }
  .reviews__list::-webkit-scrollbar { display: none; }
  .review { flex: 0 0 auto; width: 312px; }

  /* Rail app: cuộn ngang, item 86 (icon 86 + tên 2×22 + điểm 16 = 162) */
  .rail-e { display: flex; grid-template-columns: none; overflow-x: auto;
            scrollbar-width: none; }
  .rail-e::-webkit-scrollbar { display: none; }
  .rail-e .app-card { flex: 0 0 auto; width: 86px; }
  .app-card--lg .app-card__name { height: 44px; }

  /* Thẻ bài viết dọc: 220 rộng, ảnh 16/9 → 220+8+48 = 180 */
  .article-card--tall { flex: 0 0 auto; width: 220px; max-width: none; }

  /* Cột phải trở lại dạng thẻ dọc y như rail cột chính (bỏ dạng dòng ngang). */
  .sidebar .rail-e { flex-direction: row; gap: 12px; }
  .sidebar .rail-e .app-card { display: block; width: 86px; height: auto; }
  .sidebar .rail-e .app-card__thumb { width: auto; }
  .sidebar .rail-e .app-card__center { display: block; }
  .sidebar .rail-e .app-card__name { margin-top: 8px; height: 44px; line-height: 22px;
                                     display: -webkit-box; -webkit-line-clamp: 2;
                                     -webkit-box-orient: vertical; white-space: normal; }
  .sidebar .rail-e .rating { margin-top: 8px; }

  /* ---- TRANG LANDING DANH MỤC Ở MOBILE ----
     Bản gốc: lưới về MỘT cột, và nút tải ở cuối dòng hiện lại (desktop ẩn). */
  .clist--grid { grid-auto-flow: row; grid-template-rows: none;
                 grid-auto-columns: auto; gap: 16px; }
  .crow__btn { display: block; }
  .cbox__text { font-size: 16px; line-height: 22px; padding: 4px 0; }

  /* ---- TRANG TIN Ở MOBILE ----
     .wrap bỏ padding ở khổ này nên từng khối tự chừa lề 16 (bản gốc đo được
     nội dung rộng 328 trong khung 360, ảnh danh sách nằm đúng x=16). */
  .ncrumbs, .narticle__title, .nhead, .narticle__body,
  .narticle__tagtitle, .narticle .tag-box,
  .nlist, .nlist__title, .nrow,
  /* trang danh sách tin: các khối cũng phải có lề 16 như bản gốc */
  .nblock__title, .nblock__desc, .nmosaic, .nlatest__col { padding-left: 16px; padding-right: 16px; }
  /* Hộp rỗng cũng phải thụt 16 như mọi nội dung khác, không dán sát mép. */
  .nempty { margin-left: 16px; margin-right: 16px; padding: 40px 16px; }
  .nside-nav { padding-left: 16px; padding-right: 16px; }
  .nlist__title { padding-top: 16px; }
  /* dòng danh sách bỏ đệm ngang để ảnh thẳng lề 16 với phần chữ phía trên */
  .nline { padding: 8px 0; }
}

/* Hàng phím tắt CHỈ có ở mobile */
@media (min-width: 720px) { .shortcuts { display: none; } 
}
