/* VARLOL V3 – ĐA GAME (public/js/design-preview-games.js).
   Khung, khoảng cách, nút, chữ dùng token chung của V3. Màu game (--ga, --ga2) chỉ là nhận diện phụ: viền, ký hiệu, quầng sáng. */
.gm { --ga: var(--red); --ga2: var(--gold); display: grid; gap: 28px; min-width: 0; }
.gm-home { margin-block: 4px 8px; }
.hm > .gm-home { grid-column: 1 / -1; }
@media (max-width: 1180px) { .hm > .gm-home { order: 5; } }
.gm-home:empty { display: none; }
.gm h2 { font-family: var(--display); font-size: var(--fs-xl); letter-spacing: .01em; }
.gm-sec { display: grid; gap: 14px; min-width: 0; }
.gm-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gm-sec-hd small, .gm-count { color: var(--muted); font-size: var(--fs-sm); }
.gm-more { color: var(--red); font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.gm-more svg { width: 16px; height: 16px; }
.gm-loading, .gm-none { color: var(--muted); font-size: var(--fs-sm); padding: 14px 0; }
.gm-hint { color: var(--text-2); font-size: var(--fs-sm); max-width: 80ch; }
.gm-center { text-align: center; margin: 0 0 24px; }
.gm-empty { grid-column: 1 / -1; }
.gm-box { padding: 20px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.gm-two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.gm-two > div { display: grid; gap: 20px; min-width: 0; }
.gm-two-wide { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); }

/* Ký hiệu game: chữ cái nghiêng theo màu game (dùng khi chưa có logo được phép dùng) */
.gm-mark { font-family: var(--display); font-weight: 700; font-style: italic; line-height: 1; color: var(--ga); display: inline-grid; place-items: center; user-select: none; }
.gm-mark-sm { width: 26px; height: 26px; border-radius: 7px; font-size: 16px; background: color-mix(in srgb, var(--ga) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ga) 45%, transparent); }
.gm-mark-lg { position: absolute; right: 6px; bottom: -18px; font-size: 128px; opacity: .22; pointer-events: none; }
.gm-mark-hero { position: absolute; right: 4%; top: 50%; translate: 0 -50%; font-size: clamp(140px, 24vw, 300px); opacity: .2; pointer-events: none;
  text-shadow: 0 0 80px color-mix(in srgb, var(--ga) 60%, transparent); }

/* Thẻ chọn game */
.gm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.gm-card { position: relative; overflow: hidden; display: grid; gap: 4px; padding: 20px 20px 18px; min-height: 132px; align-content: start;
  border-color: color-mix(in srgb, var(--ga) 38%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ga) 14%, transparent), transparent 62%), var(--gl-bg, var(--surface)); }
.gm-card:hover, .gm-card:focus-visible { border-color: var(--ga); transform: translateY(-2px); }
.gm-card-k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gm-card b { font-family: var(--display); font-size: var(--fs-xl); }
.gm-card small { color: var(--text-2); font-size: var(--fs-sm); }
.gm-card-n { margin-top: 10px; font-size: var(--fs-xs); color: var(--ga2); font-weight: 600; }
.gm-card i { position: absolute; right: 16px; bottom: 14px; color: var(--ga); }
.gm-card i svg { width: 18px; height: 18px; rotate: -45deg; }

/* Bộ lọc game + thẻ giải */
.gm-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-evs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.gm-ev { position: relative; display: grid; min-height: 176px; overflow: hidden; border-color: color-mix(in srgb, var(--ga) 55%, transparent); }
.gm-ev:hover, .gm-ev:focus-visible { border-color: var(--ga); transform: translateY(-2px); }
.gm-ev-top { position: absolute; inset: 0; display: grid; place-items: center end; overflow: hidden;
  background: radial-gradient(120% 140% at 80% 10%, color-mix(in srgb, var(--ga) 55%, transparent), transparent 60%), linear-gradient(160deg, #1a1418, #0d0a0d); }
.gm-ev-top img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gm-ev-top .gm-mark { font-size: 150px; opacity: .28; margin-right: 10px; }
.gm-ev-top .badge { position: absolute; left: 14px; top: 12px; }
.gm-chip { position: absolute; right: 12px; top: 12px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: #0b090b; background: var(--ga); }
.gm-ev-body { position: relative; display: grid; gap: 6px; padding: 50px 16px 14px; align-content: end;
 }
.gm-ev-top::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8, 7, 10, .9) 25%, rgba(8, 7, 10, .45) 70%, transparent); }
.gm-ev-top .badge, .gm-chip { z-index: 1; }
.gm-ev-title { font-family: var(--display); font-size: var(--fs-xl); font-style: italic; line-height: 1.12; text-transform: uppercase; overflow-wrap: anywhere; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.gm-ev-meta { color: var(--text-2); font-size: var(--fs-sm); }
.gm-ev-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); }
.gm-ev-foot span, .gm-ev-champ { display: inline-flex; align-items: center; gap: 6px; }
.gm-ev-champ { color: var(--gold); font-weight: 600; font-size: var(--fs-sm); }

/* Hoạt động + công cụ nhanh (trang chủ) */
.gm-act { display: grid; grid-template-columns: 132px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; min-height: 44px; }
.gm-act:first-child { border-top: 0; }
.gm-act time { color: var(--ga); font-weight: 700; font-size: var(--fs-sm); }
.gm-act span { display: grid; min-width: 0; }
.gm-act small { color: var(--muted); font-size: var(--fs-xs); }
.gm-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; align-content: start; }
.gm-tool { display: grid; justify-items: center; gap: 10px; padding: 20px 12px; text-align: center; color: var(--red); min-height: 96px; }
.gm-tool b { color: var(--text); font-size: var(--fs-sm); }
.gm-tool:hover, .gm-tool:focus-visible { border-color: var(--red); transform: translateY(-2px); }

/* Thanh bên: chọn tựa game */
.gm-nav.on, .gm-nav[aria-current="page"] { border-color: color-mix(in srgb, var(--ga) 60%, transparent); }
.gm-nav .gm-mark-sm { flex: none; }

/* Thanh bên: menu của game đang mở + thẻ đề nghị tổ chức giải */
.gm-sub:empty { display: none; }
.gm-sub-in { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.gm-sub-h { display: flex; align-items: center; gap: 8px; color: var(--ga2); }
.gm-sub .gm-nav.on { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--red) 80%, #000), color-mix(in srgb, var(--red) 50%, #000)); border-color: var(--red); }
.gm-sub a.gm-promo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; text-align: center; margin: 12px 0 6px; padding: 18px 14px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--red) 55%, transparent);
  background: radial-gradient(90% 70% at 50% 0, color-mix(in srgb, var(--ga) 35%, transparent), transparent 70%), linear-gradient(180deg, #1a0d12, #0d0a0d); }
.gm-promo b { font-family: var(--display); font-style: italic; font-size: var(--fs-lg); line-height: 1.2; text-transform: uppercase; color: var(--ga2); }
.gm-promo small { color: var(--text-2); font-size: var(--fs-xs); }
.gm-promo:hover, .gm-promo:focus-visible { border-color: var(--red); }

/* Cổng game */
.gm-crumb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); }
.gm-crumb a { color: var(--text-2); min-height: 32px; display: inline-flex; align-items: center; }
.gm-crumb a:hover { color: var(--text); }
.gm-crumb b { color: var(--text); overflow-wrap: anywhere; }
.gm-hero, .gm-evhd { position: relative; overflow: hidden; padding: clamp(20px, 3.4vw, 40px); min-height: 250px; display: grid; align-items: center;
  border-color: color-mix(in srgb, var(--ga) 45%, transparent);
  background: linear-gradient(115deg, rgba(8, 7, 10, .92) 30%, color-mix(in srgb, var(--ga) 30%, transparent) 78%, color-mix(in srgb, var(--ga2) 22%, transparent)), var(--surface); }
/* Banner cổng game: nền tím – vàng của game, tia sáng chéo, biểu tượng tinh thể bên phải */
.gm-hero { align-content: space-between; gap: 18px; min-height: 280px;
  background:
    radial-gradient(60% 90% at 78% 45%, color-mix(in srgb, var(--ga) 55%, transparent), transparent 70%),
    radial-gradient(30% 50% at 92% 12%, color-mix(in srgb, var(--ga2) 38%, transparent), transparent 70%),
    repeating-linear-gradient(115deg, transparent 0 46px, color-mix(in srgb, var(--ga2) 7%, transparent) 46px 48px),
    linear-gradient(100deg, #0b080d 22%, #1a0f2b 62%, #2a123a); }
.gm-hero .gm-crumb { position: relative; z-index: 1; }
.gm-hero h1 { font-style: italic; font-size: clamp(2.1rem, 6vw, 4.2rem); letter-spacing: .01em; text-shadow: 0 4px 24px rgba(0, 0, 0, .55); }
.gm-hero .vgb svg:last-child { width: 18px; height: 18px; }
.gm-art { position: absolute; right: clamp(-40px, 6%, 120px); top: 50%; translate: 0 -50%; width: clamp(200px, 30vw, 330px); pointer-events: none;
  filter: drop-shadow(0 0 46px color-mix(in srgb, var(--ga) 80%, transparent)) drop-shadow(0 0 12px color-mix(in srgb, var(--ga2) 60%, transparent)); }
.gm-art svg { display: block; width: 100%; height: auto; }
.gm-hero-in { position: relative; z-index: 1; display: grid; gap: 12px; max-width: 640px; }
.gm-kicker { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; color: var(--ga); }
.gm-hero h1, .gm-evhd h1 { font-family: var(--display); font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.02; text-transform: uppercase; overflow-wrap: anywhere; }
.gm-lead { color: var(--text-2); font-size: var(--fs-lg); line-height: 1.55; }
.gm-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.gm-hero-cta small { color: var(--text-2); font-size: var(--fs-sm); }
.gm-hero-foot { color: var(--muted); font-size: var(--fs-sm); }
.gm-evhd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.gm-evhd-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--text-2); font-size: var(--fs-sm); }
.gm-evhd-meta span { display: inline-flex; align-items: center; gap: 6px; }
.gm-tabs { display: flex; gap: 4px; padding: 6px; overflow-x: auto; scrollbar-width: thin; }
.gm-tab { flex: 1 0 auto; justify-content: center; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 44px; border-radius: 9px; color: var(--text-2); font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.gm-tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.gm-tab.on { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--red) 85%, #000), color-mix(in srgb, var(--red) 55%, #000)); border-color: var(--red); box-shadow: 0 6px 18px color-mix(in srgb, var(--red) 35%, transparent); }
/* Ô số liệu: tím · đỏ · tím · vàng như ảnh mẫu, số là dữ liệu thật */
.gm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.gm-tile { --tc: var(--ga); display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-color: color-mix(in srgb, var(--tc) 60%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--tc) 30%, transparent), color-mix(in srgb, var(--tc) 6%, transparent) 70%), var(--surface); }
.gm-tile:nth-child(2) { --tc: var(--red); } .gm-tile:nth-child(4) { --tc: var(--ga2); }
.gm-tile-ic { flex: none; color: color-mix(in srgb, var(--tc) 55%, #fff); display: grid; }
.gm-tile > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; position: relative; }
.gm-tile small { color: var(--text-2); font-size: var(--fs-sm); }
.gm-tile b { font-family: var(--display); font-size: var(--fs-2xl); line-height: 1.1; color: var(--ga2); }
.gm-tile:hover, .gm-tile:focus-visible { border-color: var(--tc); transform: translateY(-2px); }
.gm-all-hd { display: grid; gap: 8px; }
.gm-all-hd h1 { font-family: var(--display); font-size: var(--fs-3xl); }
.gm-all-hd p { color: var(--text-2); max-width: 70ch; }

/* Đội, BXH */
.gm-team { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.gm-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-team.is-tbd { color: var(--muted); font-style: italic; }
.gm-rk { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); min-height: 48px; }
.gm-rk:first-of-type { border-top: 0; }
.gm-rk-hd { min-height: 0; padding: 0 0 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.gm-rk-hd span:first-child { width: 28px; text-align: center; } .gm-rk-hd span:last-child { margin-left: auto; }
.gm-rk-hd + .gm-rk { border-top: 1px solid var(--line); }
.gm-rk-v b { font-family: var(--display); font-size: var(--fs-lg); color: var(--ga2); }
.gm-season { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.gm-season select { min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.gm-rk:hover b { color: var(--ga2); }
.gm-rk-pos { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); background: rgba(255, 255, 255, .06); }
.gm-rk-pos.p1 { background: var(--gold); color: #1a1205; } .gm-rk-pos.p2 { background: var(--silver); color: #16171a; } .gm-rk-pos.p3 { background: var(--bronze); color: #1d0f05; }
.gm-rk-v { margin-left: auto; display: grid; justify-items: end; text-align: right; font-size: var(--fs-sm); }
.gm-rk-v small { color: var(--muted); font-size: var(--fs-xs); }
.gm-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: rgba(255, 255, 255, .07); color: var(--text-2); white-space: nowrap; }
.gm-pill.is-cap { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); }
.gm-pill.is-ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.gm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gm-tcard { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.gm-tcard-hd { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; }
.gm-tcard-hd span { display: grid; min-width: 0; }
.gm-tcard-hd small { color: var(--muted); font-size: var(--fs-xs); }
.gm-teamp-hd { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.gm-teamp-hd h2 small { color: var(--ga2); font-size: var(--fs-md); }
.gm-teamp-hd p { color: var(--text-2); font-size: var(--fs-sm); }
.gm-teamp-acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.gm-teamp h3 { font-size: var(--fs-md); margin-top: 8px; }
.gm-mems, .gm-reqs { list-style: none; padding: 0; margin: 0; display: grid; }
.gm-mem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.gm-mem > span:nth-child(2) { display: grid; min-width: 0; }
.gm-mem small { color: var(--muted); font-size: var(--fs-xs); }
.gm-mem-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.gm-my p { color: var(--text-2); font-size: var(--fs-sm); }
.gm-my-ign { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text) !important; }
.gm-my-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.gm-reqs li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--text-2); font-size: var(--fs-sm); padding: 6px 0; }
.gm-dc p { color: var(--text-2); max-width: 60ch; }
.gm-dc .vgb { justify-self: start; }

/* Scrim + trận Battle Royale */
.gm-scrim { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 16px; padding: 14px 16px; align-items: center; margin-bottom: 10px; }
.gm-scrim > time { color: var(--ga); font-weight: 700; font-size: var(--fs-sm); }
.gm-scrim-main { display: grid; gap: 6px; min-width: 0; }
.gm-scrim-main small { color: var(--muted); font-size: var(--fs-xs); }
.gm-scrim-teams { display: flex; gap: 12px; flex-wrap: wrap; }
.gm-scrim-side { display: grid; gap: 8px; justify-items: end; }
.gm-vs { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gm-vs i { color: var(--muted); font-style: normal; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; }
.gm-note { color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.gm-room { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.gm-score { font-family: var(--display); font-size: var(--fs-xl); }
/* Danh sách dạng bảng: Thời gian · Trận đấu · Hình thức · Trạng thái */
.gm-list { display: grid; min-width: 0; }
.gm-listbox { padding: 8px 16px; }
.gm-list .gm-scrim { margin: 0 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: rgba(255, 255, 255, .03); color: inherit; }
.gm-list .gm-scrim-hd { border: 0; background: none; margin: 0; }
.gm-scrim > time { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.gm-list .badge { padding: 8px 12px; border-radius: 8px; }
.gm-scrim.has-fmt { grid-template-columns: 132px minmax(0, 1fr) 64px minmax(120px, auto); }
.gm-list .gm-scrim-hd { border-top: 0; padding: 6px 12px; color: var(--muted); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.gm-scrim-hd span:last-child { text-align: right; }
.gm-fmt { font-weight: 700; font-size: var(--fs-sm); color: var(--text-2); }
a.gm-scrim:hover .gm-team b { color: var(--ga2); }
.gm-reqlist { display: grid; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); }
.gm-reqlist p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gm-reqlist .gm-team { margin-right: auto; }
.gm-dots { display: inline-flex; gap: 5px; align-items: center; }
.gm-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ga2); }
.gm-dots i.b { background: var(--red); }

/* Nhánh đấu */
.gm-bracket { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; }
.gm-round { display: flex; flex-direction: column; gap: 14px; min-width: 240px; }
.gm-round h3 { flex: none; font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.gm-round .gm-match { margin-block: auto; }
.gm-match { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); padding: 10px 12px; display: grid; gap: 6px; }
.gm-match.is-bye { opacity: .6; }
.gm-match small { color: var(--muted); font-size: var(--fs-xs); }
.gm-side { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 30px; color: var(--text-2); }
.gm-side > b { font-family: var(--display); font-size: var(--fs-lg); }
.gm-side.is-win { color: var(--text); }
.gm-side.is-win > b { color: var(--ga2); }

/* Bảng tổng sắp Battle Royale */
.gm-h3 { font-family: var(--display); font-size: var(--fs-lg); margin-top: 8px; }
.gm-table-wrap { overflow-x: auto; }
.gm-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.gm-table th, .gm-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gm-table th { color: var(--muted); font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; }
.gm-table th:nth-child(-n+2), .gm-table td:nth-child(-n+2) { text-align: left; }
.gm-table td small { display: block; color: var(--muted); font-size: 11px; }
.gm-table tr.is-me td { background: color-mix(in srgb, var(--ga) 10%, transparent); }
.gm-table td b { color: var(--ga2); font-size: var(--fs-md); }
.gm-prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); line-height: 1.6; }

/* Hộp thoại */
.gm-dlg { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--text); padding: 0; width: min(520px, calc(100vw - 24px)); box-shadow: var(--sh-3); }
.gm-dlg::backdrop { background: rgba(4, 3, 5, .72); backdrop-filter: blur(3px); }
.gm-dlg-in { display: grid; gap: 14px; padding: 20px; }
.gm-dlg header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gm-dlg h2 { font-family: var(--display); font-size: var(--fs-xl); }
.gm-dlg-body { display: grid; gap: 12px; }
.gm-dlg-body p { color: var(--text-2); }
.gm-dlg footer { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.gm-err { color: var(--err); font-size: var(--fs-sm); }
.gm-f { display: grid; gap: 6px; font-size: var(--fs-sm); min-width: 0; }
.gm-f > span { color: var(--text-2); font-weight: 600; }
.gm-f input, .gm-f select { min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; width: 100%; }
.gm-f input:focus-visible, .gm-f select:focus-visible { outline: 0; box-shadow: var(--focus); }
.gm-f small { color: var(--muted); font-size: var(--fs-xs); }
.gm-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gm-chk { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: var(--fs-sm); color: var(--text-2); }
.gm-chk input { width: 20px; height: 20px; accent-color: var(--red); }

@media (max-width: 900px) {
  .gm-two, .gm-two-wide { grid-template-columns: minmax(0, 1fr); }
  .gm-scrim, .gm-scrim.has-fmt { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gm-list .gm-scrim-hd { display: none; }
  .gm-scrim-side { justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .gm-act { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 520px) {
  .gm { gap: 22px; }
  .gm-hero, .gm-evhd { min-height: 0; }
  .gm-mark-hero { opacity: .12; }
  .gm-art { opacity: .35; right: -60px; }
  .gm-tab { flex: 0 0 auto; }
  .gm-f2 { grid-template-columns: minmax(0, 1fr); }
  .gm-mem-acts, .gm-teamp-acts { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .gm-card, .gm-ev, .gm-tool { transition: none; transform: none !important; } }

/* ---------- Bố cục cổng game theo ảnh mẫu ---------- */
.gm h2 { display: flex; align-items: center; gap: 10px; }
.gm-panel { gap: 14px; }
.g-page .gm-chip { display: none; }
.gm-ev[data-phase="open"] { border-color: color-mix(in srgb, var(--red) 75%, transparent); }
.gm-ev[data-phase="open"] .gm-ev-top { background: radial-gradient(120% 140% at 80% 10%, color-mix(in srgb, var(--red) 55%, transparent), transparent 60%), linear-gradient(160deg, #1a1418, #0d0a0d); }
.gm-ev[data-phase="soon"], .gm-ev[data-phase="closed"], .gm-ev[data-phase="ended"] { border-color: color-mix(in srgb, var(--ga2) 60%, transparent); }
.gm-ev[data-phase="soon"] .gm-ev-top, .gm-ev[data-phase="closed"] .gm-ev-top, .gm-ev[data-phase="ended"] .gm-ev-top { background: radial-gradient(120% 140% at 80% 10%, color-mix(in srgb, var(--ga2) 40%, transparent), transparent 60%), linear-gradient(160deg, #1a1610, #0d0a0d); }
.gm-ev[data-phase="soon"] .gm-ev-title, .gm-ev[data-phase="closed"] .gm-ev-title, .gm-ev[data-phase="ended"] .gm-ev-title { color: var(--ga2); }
.gm-ev-title { font-size: clamp(1.35rem, 2vw, 1.75rem); max-width: 70%; }
.gm-ev-foot { justify-content: flex-start; gap: 6px 14px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--text-2); }
.gm-ev-foot span + span { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .22); }
.gm-crumb a { gap: 6px; }
.gm-hero .gm-lead { font-size: var(--fs-xl); color: #e6e1f2; }
.gm-tab + .gm-tab { position: relative; }
.gm-tab + .gm-tab::before { content: ''; position: absolute; left: -3px; top: 25%; height: 50%; width: 1px; background: var(--line-2); }
.gm-tab.on::before, .gm-tab.on + .gm-tab::before { display: none; }
/* Ô số liệu: biểu tượng lớn bên trái, nhãn nhỏ, số vàng, hình mờ bên phải */
.gm-tile { position: relative; overflow: hidden; min-height: 84px; padding: 14px 20px; }
.gm-tile b { font-size: var(--fs-2xl); }
.gm-tile b i { font-style: normal; font-size: var(--fs-lg); }
.gm-tile-bg { position: absolute; right: 8px; bottom: -10px; opacity: .16; pointer-events: none; }

/* Thanh bên: 2 khung "Chọn tựa game" và menu của game */
.gm-pick, .gm-sub-in { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .025); }
.gm-sub-in { margin-top: 12px; border-top: 1px solid var(--line); }
.gm-pick .side-label, .gm-sub-in .side-label { display: flex; align-items: center; gap: 8px; margin: 6px 6px 8px; font-size: 13px; color: var(--text); }
.gm-pick .gm-nav { border: 1px solid var(--line-2); }
.gm-pick .gm-nav.on { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--red) 80%, #000), color-mix(in srgb, var(--red) 50%, #000)); border-color: var(--red); }
.gm-sub a.gm-promo img { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ga2) 60%, transparent)); }
.gm-sub a.gm-promo .vgb svg { width: 16px; height: 16px; }
/* Ở cổng game: thanh bên chỉ còn phần game; menu chính của web chuyển lên thanh trên (bản điện thoại giữ menu ngăn kéo) */
body.gm-portal .side .side-nav > a, body.gm-portal .side .side-nav > .side-label { display: none; }
.gm-topnav { display: none; }
@media (min-width: 1181px) {
  body.gm-portal .greet { display: none; }
  body.gm-portal .gm-topnav { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1 1 auto; }
  body.gm-portal .top-search { flex: 0 1 150px; min-width: 44px; }
  body.gm-portal .gm-topnav { flex: 0 1 auto; }
}
.gm-tn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 clamp(8px, 1vw, 16px); border-radius: 9px; border: 1px solid transparent; color: #e9e3e6; font-weight: 600; white-space: nowrap; cursor: pointer; }
.gm-tn:hover, .gm-tn.cur { color: #fff; background: rgba(255, 255, 255, .06); }
.gm-tn.cur { box-shadow: inset 0 -2px 0 var(--red); }
.gm-tn-game { position: relative; }
.gm-tn-game summary { list-style: none; color: #fff; border-color: var(--red); background: linear-gradient(180deg, color-mix(in srgb, var(--red) 55%, #000), color-mix(in srgb, var(--red) 28%, #000)); }
.gm-tn-game summary::-webkit-details-marker { display: none; }
.gm-tn-game summary::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; margin: -4px 2px 0 4px; }
.gm-tn-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 200px; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-3); }
.gm-tn-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; font-weight: 600; }
.gm-tn-menu a:hover, .gm-tn-menu a:focus-visible { background: rgba(255, 255, 255, .07); }

/* Hình chính thức của game (g.art): banner, thẻ giải, icon */
.gm-mark-img { object-fit: cover; padding: 0; }
.gm-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 22%; }
.gm-hero.has-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(95deg, rgba(10, 7, 16, .94) 24%, rgba(22, 12, 40, .6) 50%, transparent 78%), linear-gradient(0deg, rgba(10, 7, 16, .55), transparent 40%); }
.gm-hero.has-art > * { z-index: 1; }
.gm-hero.has-art > .gm-hero-bg { z-index: 0; }
.gm-hero.has-art::after { z-index: 0; }
.gm-hero-logo { width: 132px; height: auto; }
.gm-ev-top img { object-position: 60% 20%; }
.gm-evhd-bg { object-position: 60% 20%; opacity: .5; }
@media (max-width: 520px) { .gm-hero-bg { object-position: 78% 20%; opacity: .7; } }

/* Màu ô số liệu + thẻ giải theo ảnh gốc: nền đậm theo màu ô, biểu tượng một màu sáng, nhãn trắng, số vàng */
.gm-ico { display: block; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.gm-tile { --tc: #6a4df0; --ti: #d6ccff; border-color: color-mix(in srgb, var(--tc) 85%, #fff 0%);
  background: linear-gradient(105deg, color-mix(in srgb, var(--tc) 62%, #0b0810), color-mix(in srgb, var(--tc) 24%, #0b0810) 75%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.gm-tile:nth-child(2) { --tc: #d81f36; --ti: #ff6474; }
.gm-tile:nth-child(4) { --tc: #b98a2c; --ti: #f8e6b4; }
.gm-tile-ic { width: 44px; height: 44px; color: var(--ti); }
.gm-tile-bg { width: 76px; height: 76px; right: 6px; bottom: -12px; color: var(--ti); opacity: .14; }
.gm-tile small { color: #fff; white-space: nowrap; }
.gm-tile b { color: #f5c542; white-space: nowrap; }
.gm-tiles { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* Thẻ giải: đang đăng ký = đỏ, đang diễn ra = tím, còn lại = vàng; nhãn trạng thái nền đặc */
.gm-ev { --pc: var(--ga2); border-color: color-mix(in srgb, var(--pc) 80%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pc) 25%, transparent), 0 10px 30px color-mix(in srgb, var(--pc) 16%, transparent); }
.gm-ev[data-phase="open"] { --pc: #ff2a3d; border-color: color-mix(in srgb, var(--pc) 80%, transparent); }
.gm-ev[data-phase="live"] { --pc: #7c5cf5; border-color: color-mix(in srgb, var(--pc) 80%, transparent); }
.gm-ev-top::after { background: linear-gradient(100deg, color-mix(in srgb, var(--pc) 34%, #08070a) 8%, color-mix(in srgb, var(--pc) 30%, rgba(8, 7, 10, .55)) 48%, color-mix(in srgb, var(--pc) 14%, transparent) 100%); }
.gm-ev .gm-ev-top .badge { border: 0; color: #1a1205; background: #f0b93a; }
.gm-ev[data-phase="open"] .gm-ev-top .badge { color: #fff; background: #e0243a; }
.gm-ev[data-phase="live"] .gm-ev-top .badge { color: #fff; background: #1f9d55; }
.gm-ev[data-phase="live"] .gm-ev-title { color: #c9b8ff; }
.gm-ev[data-phase="open"] .gm-ev-title { color: #fff; }

/* ---------- Gọn khi thu nhỏ: mọi thứ co theo bề rộng vùng nội dung (container), không tràn, không thanh cuộn thừa ---------- */
.g-page.gm { container: gm / inline-size; }
/* Thanh bên: chữ dài tự cắt "…" thay vì tràn khung */
.gm-pick, .gm-sub-in { grid-template-columns: minmax(0, 1fr); padding: 8px; }
.gm-pick .gm-nav, .gm-sub-in .gm-nav { min-width: 0; padding-inline: 10px; gap: 10px; }
.gm-pick .gm-nav > span:last-child, .gm-sub-in .gm-nav > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-pick .gm-nav > :first-child, .gm-sub-in .gm-nav > :first-child { flex: none; }
.gm-pick .side-label, .gm-sub-in .side-label { min-width: 0; letter-spacing: .08em; line-height: 1.25; }
.gm-sub a.gm-promo { padding: 14px 10px; }
.gm-sub a.gm-promo b { font-size: var(--fs-md); overflow-wrap: anywhere; }
/* Thanh trên: menu co lại, ô tìm kiếm nhường chỗ khi hẹp */
.gm-topnav { overflow: hidden; }
.gm-topnav .gm-tn-game { flex: none; }
@media (min-width: 1181px) and (max-width: 1500px) {
  body.gm-portal .top-search { display: none; }
  body.gm-portal .gm-topnav { flex: 1 1 auto; overflow: visible; }
  .gm-tn { padding-inline: 9px; font-size: var(--fs-sm); gap: 6px; }
}
/* Tab: chia đều, không bao giờ hiện thanh cuộn; hẹp thì bỏ biểu tượng, rất hẹp thì vuốt ngang */
.gm-tabs { scrollbar-width: none; }
.gm-tabs::-webkit-scrollbar { display: none; }
.gm-tab { flex: 1 1 0; min-width: 0; padding: 0 8px; }
.gm-tab > span { overflow: hidden; text-overflow: ellipsis; }
@container gm (max-width: 1040px) { .gm-tab > :first-child:not(span) { display: none; } .gm-tab { font-size: var(--fs-sm); } }
@container gm (max-width: 660px) { .gm-tab { flex: 0 0 auto; padding: 0 14px; } .gm-tab > :first-child:not(span) { display: inline-block; }
  .gm-tabs { -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); } }
/* Ô số liệu: 4 cột khi đủ chỗ, 2 cột khi hẹp, chữ không tràn */
.gm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gm-tile { padding: 14px 16px; gap: 12px; }
.gm-tile-ic { width: 40px; height: 40px; }
.gm-tile small, .gm-tile b { overflow: hidden; text-overflow: ellipsis; }
@container gm (max-width: 1040px) { .gm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container gm (max-width: 420px) { .gm-tile { padding: 12px; gap: 10px; } .gm-tile-ic { width: 32px; height: 32px; } .gm-tile b { font-size: var(--fs-xl); } .gm-tile b i { font-size: var(--fs-sm); } .gm-tile-bg { display: none; } }
/* Thẻ giải */
.gm-ev-title { max-width: 88%; }
.gm-ev-foot span { white-space: nowrap; }
@container gm (max-width: 700px) { .gm-evs { grid-template-columns: minmax(0, 1fr); } }
/* Hai khung dưới: xếp dọc khi vùng nội dung hẹp; bảng scrim gọn */
.gm-panel h2, .gm-sec-hd h2 { min-width: 0; }
.gm-sec-hd { flex-wrap: nowrap; }
.gm-sec-hd h2 > span { overflow-wrap: anywhere; }
.gm-more { flex: none; white-space: nowrap; }
.gm-scrim.has-fmt { grid-template-columns: 124px minmax(0, 1fr) 76px minmax(124px, auto); gap: 12px; }
.gm-scrim-hd span { white-space: nowrap; }
.gm-vs { flex-wrap: nowrap; min-width: 0; }
.gm-vs .gm-team { min-width: 0; }
.gm-reqlist p { flex-wrap: nowrap; }
.gm-reqlist .gm-team { min-width: 0; flex: 1 1 auto; }
.gm-scrim-side { justify-items: end; }
@container gm (max-width: 1100px) { .gm-two, .gm-two-wide { grid-template-columns: minmax(0, 1fr); } }
@container gm (max-width: 720px) {
  .gm-scrim, .gm-scrim.has-fmt { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gm-list .gm-scrim-hd { display: none; }
  .gm-scrim-side { justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .gm-reqlist p { flex-wrap: wrap; }
  .gm-sec-hd { flex-wrap: wrap; }
  .gm-hero { min-height: 0; }
}
@container gm (max-width: 480px) { .gm-vs { flex-wrap: wrap; } .gm-hero-cta .vgb { flex: 1 1 100%; justify-content: center; } }
.gm-pick, .gm-sub-in { padding: 6px; }
.gm-pick .gm-nav, .gm-sub-in .gm-nav { padding-inline: 8px; gap: 8px; font-size: 14px; letter-spacing: 0; }
@media (min-width: 1181px) and (max-width: 1340px) { .gm-topnav > .gm-tn:first-child span { display: none; } .gm-tn { padding-inline: 7px; } }
.gm-scrim-main { grid-template-columns: minmax(0, 1fr); }
.gm-reqlist p { flex-wrap: wrap; }
.gm-reqlist .gm-team { flex: 1 1 110px; }
@container gm (max-width: 800px) { .gm-tab { flex: 0 0 auto; padding: 0 14px; } .gm-tab > :first-child:not(span) { display: inline-block; }
  .gm-tabs { -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); } }
@container gm (max-width: 720px) { .gm-vs { flex-wrap: wrap; } }
@container gm (max-width: 520px) { .gm-tile { padding: 12px; gap: 10px; align-items: flex-start; } .gm-tile-ic { width: 28px; height: 28px; margin-top: 2px; } .gm-tile small { white-space: normal; font-size: var(--fs-xs); line-height: 1.3; }
  .gm-tile b { white-space: normal; font-size: var(--fs-xl); } .gm-tile b i { font-size: var(--fs-sm); } .gm-tile-bg { display: none; } }
/* Tên đội không bị cắt "…": xuống dòng khi hẹp */
.gm-vs { flex-wrap: wrap; }
.gm-team b { white-space: normal; overflow: visible; overflow-wrap: anywhere; }

/* Ô số liệu dùng icon 3D riêng (public/img/games/tiles/*.png); ảnh có lề trong suốt nên cho tràn nhẹ ra ngoài ô icon */
img.gm-tile-ic { width: 68px; height: 68px; margin: -14px -10px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
img.gm-tile-bg { width: 96px; height: 96px; right: -4px; bottom: -22px; opacity: .18; object-fit: contain; }
@container gm (max-width: 520px) { img.gm-tile-ic { width: 44px; height: 44px; margin: -6px -4px; } }

/* Icon game dạng ảnh: nền tối riêng để logo đỏ (VALORANT) vẫn rõ trên nút đang chọn màu đỏ */
.gm-mark-img.gm-mark-sm { background: #0d0a0d; }
.gm-mark-img[src$=".png"] { object-fit: contain; padding: 3px; }

/* ---------- Trang chủ chính (/) + phạm vi từng game ----------
   body[data-scope]: hub = trang chủ chính · val = các trang VALORANT · game = cổng game core (Liên Quân) */
.gm-valnav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 12px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .025); }
.gm-valnav .side-label { display: flex; align-items: center; gap: 8px; margin: 6px 6px 8px; font-size: 13px; color: var(--text); letter-spacing: .08em; }
.gm-valnav .side-label.gm-sub-h { color: var(--ga2); }
body[data-scope="hub"] .gm-valnav, body[data-scope="game"] .gm-valnav { display: none; }
body[data-scope="val"] .gm-pick [data-nav="game-valorant"] { color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--red) 80%, #000), color-mix(in srgb, var(--red) 50%, #000)); border-color: var(--red); }
/* Video câu chuyện VARLOL trên đầu trang chủ chính */
.gm-film { margin: 0; overflow: hidden; padding: 0; }
.gm-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.gm-film figcaption { padding: 14px 18px; font-family: var(--display); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
.gm-hub-hd { display: grid; gap: 8px; }
.gm-hub-hd h1 { font-family: var(--display); font-style: italic; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1.05; text-transform: uppercase; }
.gm-hub-hd p { color: var(--text-2); font-size: var(--fs-lg); max-width: 60ch; }
.gm-doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gm-door { position: relative; overflow: hidden; display: grid; align-items: end; min-height: 300px; padding: 20px; border-color: color-mix(in srgb, var(--ga) 70%, transparent);
  background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--ga) 55%, transparent), transparent 65%), linear-gradient(160deg, #1a1218, #0b090b); }
.gm-door:hover, .gm-door:focus-visible { border-color: var(--ga); transform: translateY(-3px); }
.gm-door-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 18%; }
.gm-door-wm { position: absolute; right: -6%; top: 6%; width: 62%; height: auto; opacity: .5; filter: drop-shadow(0 0 40px color-mix(in srgb, var(--ga) 70%, transparent)); }
.gm-door::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 7, 10, .94) 22%, rgba(8, 7, 10, .45) 58%, transparent); }
.gm-door-in { position: relative; z-index: 1; display: grid; gap: 6px; justify-items: start; min-width: 0; }
.gm-door-in b { font-family: var(--display); font-style: italic; font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.gm-door-in small { color: #e6e1f2; font-size: var(--fs-md); }
.gm-door-in .vgb { margin-top: 8px; }
.gm-door-in .vgb svg { width: 16px; height: 16px; }
.gm-door-logo { width: 132px; height: auto; max-height: 56px; object-fit: contain; object-position: left; }
.gm-door-duo { --ga: #ff4f9a; --ga2: #ffc2dd; }
/* Hình nền thẻ do chủ dự án cung cấp: canh vào nhân vật / khung ảnh, chữ có sẵn trong hình nằm ngoài vùng cắt */
.gm-door-valorant .gm-door-bg { object-position: 38% 30%; }
.gm-door-duo .gm-door-bg { object-position: 50% 35%; }
@container gm (max-width: 900px) { .gm-doors { grid-template-columns: minmax(0, 1fr); } .gm-door { min-height: 200px; } .gm-door-wm { width: 38%; } }
@media (prefers-reduced-motion: reduce) { .gm-door { transition: none; transform: none !important; } }
