/* AZLMH Game-App Hub: trang game/app. Dùng biến màu của theme TechPulse để tự theo sáng/tối. */
.gah-app {
	--g-bg: var(--tp-bg, #fff);
	--g-soft: var(--tp-bg-soft, #f5f6f8);
	--g-sunk: var(--tp-bg-sunken, #eef0f3);
	--g-card: var(--tp-surface, #fff);
	--g-ink: var(--tp-ink, #111);
	--g-ink2: var(--tp-ink-soft, #3b3f46);
	--g-mut: var(--tp-ink-mute, #6b7280);
	--g-line: var(--tp-line, #e5e7eb);
	--g-line2: var(--tp-line-strong, #d1d5db);
	--g-ac: var(--tp-accent, #155bd6);
	--g-ac-ink: var(--tp-accent-ink, #fff);
	--g-ac-soft: var(--tp-accent-soft, #e8effc);
	--g-ok: #1a7f4b;
	--g-r: 14px;
	--g-rs: 10px;
	color: var(--g-ink);
}
[data-theme="dark"] .gah-app { --g-ok: #4cc38a; }
.gah-app svg { flex: none; }
.gah-app .gah-bc { margin: 14px 0 6px; }

/* Đầu trang */
.gah-head { display: flex; gap: 18px; align-items: flex-start; margin: 8px 0 24px; }
.gah-icon { width: 104px !important; height: 104px !important; border-radius: 22%; object-fit: cover; flex: none; background: var(--g-sunk); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 10px rgba(0, 0, 0, .08); }
.gah-icon.is-ph { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 700; color: var(--g-ac); background: var(--g-ac-soft); }
.gah-head-t { min-width: 0; }
.gah-head .gah-name, .gah-head h1.gah-h1.is-solo { margin: 0 0 4px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 700; line-height: 1.2; color: var(--g-ink, inherit); }
.gah-head h1.gah-h1 { margin: 0 0 10px; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); font-weight: 600; line-height: 1.4; color: var(--g-ink2); }
.gah-tag { margin: 0 0 10px; color: var(--g-ink2); font-size: 1rem; line-height: 1.45; }
.gah-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.gah-pub { font-weight: 600; color: var(--g-ink2); margin-right: 4px; }
.gah-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; background: var(--g-soft); border: 1px solid var(--g-line); color: var(--g-ink2); font-size: .84rem; font-weight: 550; line-height: 1.5; text-decoration: none; }
.gah-chip svg { width: 15px; height: 15px; }
.gah-chip.is-link:hover { border-color: var(--g-ac); color: var(--g-ac); }
.gah-vi.is-yes { color: var(--g-ok); border-color: color-mix(in srgb, var(--g-ok) 40%, transparent); }
.gah-vi.is-com { color: #b26b00; border-color: color-mix(in srgb, #b26b00 35%, transparent); }
[data-theme="dark"] .gah-vi.is-com { color: #f0b153; }
.gah-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .87rem; color: var(--g-mut); }
.gah-meta span { display: inline-flex; align-items: center; gap: 5px; }
.gah-meta .is-ok { color: var(--g-ok); font-weight: 600; }
.gah-meta svg { width: 16px; height: 16px; }
.gah-meta a { color: inherit; }

/* Bố cục 2 cột */
.gah-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.gah-layout > * { min-width: 0; }
.gah-aside { order: 2; align-self: stretch; display: flex; flex-direction: column; gap: 14px; }
.gah-stick { position: sticky; top: 84px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.gah-aside > *, .gah-dl, .gah-panel, .gah-acts { min-width: 0; max-width: 100%; }
.gah-acts { grid-template-columns: minmax(0, 1fr); }
.admin-bar .gah-stick { top: 116px; }
.gah-main { order: 1; }

/* Khung thông tin + tải */
.gah-dl { background: var(--g-card); border: 1px solid var(--g-line); border-radius: var(--g-r); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .04); }
.gah-specs { margin: 0 0 12px; }
.gah-specs div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--g-line); font-size: .9rem; }
.gah-specs dt { color: var(--g-mut); flex: none; }
.gah-specs dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.gah-tabs { display: flex; gap: 4px; padding: 3px; margin: 0 0 10px; background: var(--g-sunk); border-radius: var(--g-rs); }
.gah-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 7px 6px; border-radius: 7px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--g-mut); cursor: pointer; }
.gah-tab svg { width: 16px; height: 16px; }
.gah-tab.is-on { background: var(--g-card); color: var(--g-ac); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.gah-acts { display: grid; gap: 8px; }
.gah-cta { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--g-rs); border: 1px solid var(--g-line2); background: var(--g-card); color: var(--g-ink); text-decoration: none; line-height: 1.3; }
.gah-cta svg { width: 22px; height: 22px; }
.gah-cta span { display: flex; flex-direction: column; min-width: 0; }
.gah-cta b { font-weight: 650; font-size: .97rem; }
.gah-cta small { font-size: .77rem; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gah-cta:hover { border-color: var(--g-ac); color: var(--g-ac); }
.gah-cta.is-main { background: var(--g-ac); border-color: var(--g-ac); color: var(--g-ac-ink); }
.gah-cta.is-main:hover { filter: brightness(1.08); color: var(--g-ac-ink); }
.gah-cta.gah-apk { border-color: color-mix(in srgb, var(--g-ok) 55%, var(--g-line2)); }
.gah-cta.gah-apk svg { color: var(--g-ok); }
.gah-cta.gah-apk.is-file { background: color-mix(in srgb, var(--g-ok) 10%, var(--g-card)); }
.gah-cta.gah-apk.is-main { background: var(--g-ok); border-color: var(--g-ok); color: #fff; }
.gah-cta.gah-apk.is-main svg { color: #fff; }
.gah-cta.gah-apk small { white-space: normal; }
.gah-note { margin: 8px 0 0; font-size: .84rem; color: var(--g-mut); line-height: 1.5; }
.gah-note code { font-size: .8rem; overflow-wrap: anywhere; }
.gah-checked { display: flex; gap: 7px; align-items: flex-start; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--g-line); font-size: .8rem; color: var(--g-mut); line-height: 1.45; }
.gah-checked svg { width: 15px; height: 15px; color: var(--g-ok); margin-top: 1px; }
.gah-safe { margin: 6px 0 0; font-size: .78rem; color: var(--g-mut); line-height: 1.45; }

/* Hộp phụ */
.gah-box { background: var(--g-card); border: 1px solid var(--g-line); border-radius: var(--g-r); padding: 14px 16px; }
.gah-box-h { display: flex; align-items: center; gap: 7px; margin: 0 0 8px !important; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--g-mut); }
.gah-box ul, .gah-box ol { margin: 0; }
.gah-hl ul { list-style: none; padding: 0; display: grid; gap: 7px; }
.gah-hl li { display: flex; gap: 8px; font-size: .92rem; line-height: 1.45; }
.gah-hl svg { width: 17px; height: 17px; color: var(--g-ok); margin-top: 2px; }
.gah-off ul { list-style: none; padding: 0; }
.gah-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--g-line); color: var(--g-ink); text-decoration: none; }
.gah-off li:last-child .gah-row { border-bottom: 0; }
.gah-row span { display: flex; flex-direction: column; min-width: 0; }
.gah-row b { font-weight: 600; font-size: .92rem; }
.gah-row small { font-size: .77rem; color: var(--g-mut); }
.gah-row > svg { color: var(--g-mut); }
.gah-row > svg:last-child { margin-left: auto; width: 15px; height: 15px; }
.gah-row:hover b { color: var(--g-ac); }

/* Theo dõi */
.gah-tracker { margin: 0 0 22px; border-left: 3px solid var(--g-ac); }
.gah-tracker dl { margin: 0; }
.gah-tracker dl > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--g-line); font-size: .93rem; }
.gah-tracker dl > div:first-child { border-top: 0; }
.gah-tracker dt { color: var(--g-mut); }
.gah-tracker dd { margin: 0; }
.gah-tracker small { color: var(--g-mut); }
.gah-sub { display: block; margin-top: 2px; }
.gah-evs { list-style: none; padding: 0; display: grid; gap: 8px; }
.gah-evs li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.gah-ev-n { font-weight: 600; }
.gah-count { font-size: .8rem; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--g-ac-soft); color: var(--g-ac); font-variant-numeric: tabular-nums; }
.gah-count:empty { display: none; }
.gah-count.is-live { background: color-mix(in srgb, var(--g-ok) 14%, transparent); color: var(--g-ok); }
.gah-count.is-over { background: var(--g-sunk); color: var(--g-mut); }

/* Nội dung bài */
.gah-content { overflow-wrap: break-word; }
.gah-content > *:first-child { margin-top: 0; }
.gah-content h2 { scroll-margin-top: 90px; }
.gah-content h3 { scroll-margin-top: 90px; }
.gah-tldr { background: var(--g-ac-soft); border: 1px solid color-mix(in srgb, var(--g-ac) 22%, transparent); border-left: 3px solid var(--g-ac); border-radius: var(--g-rs); padding: 12px 16px; margin: 0 0 18px; }
.gah-tldr p { margin: 0; }
.gah-tldr-l { display: block; margin-bottom: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--g-ac); }
.gah-toc { background: var(--g-card); border: 1px solid var(--g-line); border-radius: var(--g-rs); padding: 10px 16px; margin: 0 0 22px; }
.gah-toc summary { font-weight: 650; cursor: pointer; }
.gah-toc ol { margin: 8px 0 4px; padding-left: 1.3em; }
.gah-toc li { margin: 3px 0; }
.gah-toc a { text-decoration: none; }
.gah-toc a:hover { text-decoration: underline; }
.gah-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; }
.gah-tw > table { margin: 0; min-width: 100%; }
.gah-faq { margin-top: 2em; }
.gah-faq-i { background: var(--g-card); border: 1px solid var(--g-line); border-radius: var(--g-rs); margin: 0 0 8px; }
.gah-faq-i summary { position: relative; padding: 12px 44px 12px 16px; font-weight: 650; cursor: pointer; list-style: none; }
.gah-faq-i summary::-webkit-details-marker { display: none; }
.gah-faq-i summary::after { content: "+"; position: absolute; right: 16px; top: 8px; font-size: 1.35rem; color: var(--g-ac); }
.gah-faq-i[open] summary::after { content: "–"; }
.gah-faq-a { padding: 0 16px 4px; }

/* Khối sau nội dung */
.gah-sec { margin-top: 32px; }
.gah-sec h2 { margin: 0 0 14px; }
.gah-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.gah-table th, .gah-table td { border: 1px solid var(--g-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.gah-table th { background: var(--g-soft); font-weight: 650; }
.gah-compat, .gah-src { margin-top: 28px; }
.gah-compat-sum { margin: 0 0 8px; font-size: .95rem; }
.gah-compat-list { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.gah-compat-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--g-soft); font-size: .88rem; }
.gah-compat-list b { font-weight: 600; }
.gah-compat-list .ok { color: var(--g-ok); font-weight: 650; white-space: nowrap; }
.gah-compat-list .bad { color: #c53030; font-weight: 650; white-space: nowrap; }
.gah-compat-ask { margin-top: 10px; }
.gah-compat-ask p { margin: 0 0 6px; }
.gah-compat-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.gah-compat-btns button { padding: 8px 14px; border-radius: var(--g-rs); border: 1px solid var(--g-line2); background: var(--g-card); color: var(--g-ink); font: inherit; font-weight: 600; cursor: pointer; }
.gah-compat-btns button[data-ok="1"] { background: var(--g-ok); border-color: var(--g-ok); color: #fff; }
.gah-compat-btns button:disabled { opacity: .6; cursor: default; }
.gah-src p { margin: 0 0 6px; font-size: .92rem; line-height: 1.55; }
.gah-k { font-weight: 650; margin-right: 4px; }
.gah-src-meta { color: var(--g-mut); }
.gah-src ol { padding-left: 1.3em; font-size: .88rem; line-height: 1.55; }
.gah-src li { margin: 3px 0; overflow-wrap: anywhere; }
.gah-guides { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.gah-guides li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--g-line); }
.gah-guides a { font-weight: 600; text-decoration: none; }
.gah-guides small { color: var(--g-mut); white-space: nowrap; }
.gah-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gah-mini { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--g-line); border-radius: var(--g-rs); background: var(--g-card); color: var(--g-ink); text-decoration: none; }
.gah-mini:hover { border-color: var(--g-ac); }
.gah-mini img, .gah-mini i { width: 48px; height: 48px; border-radius: 22%; object-fit: cover; flex: none; }
.gah-mini i { display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; color: var(--g-ac); background: var(--g-ac-soft); }
.gah-mini span { display: flex; flex-direction: column; min-width: 0; }
.gah-mini b { font-weight: 650; font-size: .92rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gah-mini small { font-size: .78rem; color: var(--g-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gah-more { margin: 12px 0 0; font-size: .92rem; }
.gah-comments { margin-top: 36px; }

@media (max-width: 960px) {
	.gah-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.gah-aside { order: 0; align-self: auto; }
	.gah-stick { position: static; }
	.gah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.gah-head { gap: 14px; }
	.gah-icon { width: 76px !important; height: 76px !important; }
	.gah-tracker dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.gah-grid { grid-template-columns: minmax(0, 1fr); }
	.gah-guides li { flex-direction: column; gap: 2px; }
}

/* Ảnh chính thức */
.gah-gal { margin: 0 0 22px; padding-bottom: 10px; }
.gah-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: thin; }
.gah-shots:focus-visible { outline: 2px solid var(--g-ac); outline-offset: 2px; }
.gah-shot { flex: none; scroll-snap-align: start; border-radius: var(--g-rs); overflow: hidden; background: var(--g-sunk); line-height: 0; cursor: zoom-in; }
.gah-shot img { display: block; height: 220px; width: auto; max-width: none; object-fit: cover; margin: 0 !important; border-radius: 0 !important; }
.gah-gal .gah-note { margin-top: 4px; }
.gah-shot { display: flex; flex-direction: column; }
.gah-shot-cap { display: block; width: 0; min-width: 100%; padding: 6px 8px 7px; font-size: .8rem; line-height: 1.4; color: var(--g-mut); white-space: normal; cursor: default; }
.gah-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; }
.gah-lb img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: 6px; }
.gah-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; line-height: 44px; cursor: pointer; }
.gah-lb .x { top: 16px; right: 16px; }
.gah-lb .p { left: 12px; top: 50%; transform: translateY(-50%); }
.gah-lb .n { right: 12px; top: 50%; transform: translateY(-50%); }
.gah-lb .c { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: .85rem; }
@media (max-width: 560px) { .gah-shot img { height: 180px; } }
