/* Phong Vân — website (đen + vàng kiếm hiệp). Mobile trước: 1 cột trên điện thoại, rộng hơn trên máy tính. */
@import url("../fonts/fonts.css");
/* B158: Merriweather (Google Fonts, SIL OFL 1.1, Reserved Font Name "Merriweather" — dùng nguyên file Google phát hành, không tự subset) cho tiêu đề trang chủ.
   Khai báo ngay ở đây (không ở fonts.css) để ?v= của site.css làm mới luôn; tên file kèm v33 để Cloudflare không giữ bản cũ. Chỉ nạp Latin + tiếng Việt. */
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/Merriweather-v33-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Merriweather"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/Merriweather-v33-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --ink: #0a0806; --ink-2: #120e09; --panel: #16110b; --panel-2: #1d160d;
  --gold: #e7c26a; --gold-hi: #fbe7a8; --gold-lo: #a67a2c; --gold-deep: #6b4a17;
  --line: rgba(231, 194, 106, .42); --line-soft: rgba(231, 194, 106, .18);
  --text: #f1e7d0; --muted: #b8a684; --dim: #8d7c5e;
  --red: #7d1712; --red-hi: #b3261c; --ok: #58c27a; --err: #ff7b6b;
  --radius: 12px; --gutter: 16px; --max: 1120px;
  --script: "Dancing Script", "Brush Script MT", cursive;
  /* B158: tiêu đề trang chủ (banner + Quà Tân Thủ) — chỉnh hiệu ứng tại đây */
  --title: "Merriweather", Georgia, "Times New Roman", serif;
  --tt-weight: 800;                          /* độ đậm 300–900 */
  --tt-edge: #1c0d03; --tt-edge-w: 1px;      /* viền tối quanh chữ */
  --tt-drop: 2px;                            /* bóng đen đổ xuống */
  --tt-glow: rgba(255, 186, 72, .35); --tt-glow-r: 10px;   /* phát sáng vàng */
  --tt-skew: 0deg;                           /* nghiêng (âm = sang phải) */
  --sans: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font: 15px/1.55 var(--sans); color: var(--text); background: var(--ink);
  background-image: radial-gradient(ellipse at 50% 0, rgba(120, 86, 30, .18), transparent 60%);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--gold); color: #1b1206; padding: 13px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
.gold-text {
  background: linear-gradient(180deg, #fff6cf 0%, #f3d27a 38%, #c9922f 62%, #fbe39a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Thanh trên ---------- */
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; }
.topbar.solid { position: sticky; background: rgba(10, 8, 6, .92); border-bottom: 1px solid var(--line-soft); backdrop-filter: blur(6px); }
.topbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 66px; }
.icon-btn {
  width: 46px; height: 46px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 50% 35%, #2a1f12, #0d0906); border: 1.5px solid var(--gold); color: var(--gold);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35), 0 0 14px rgba(231, 194, 106, .25);
}
.icon-btn svg { width: 22px; height: 22px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold); }
.brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.brand span { font: 700 26px/1 var(--script); }
.topbar .brand span { display: none; }
.topbar .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 999px; max-width: 58vw;
  background: rgba(12, 9, 6, .82); border: 1.5px solid var(--gold); color: var(--gold-hi); font-weight: 600; font-size: 14px;
}
.pill .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #fbe7a8, #c99337); color: #2a1a06; flex: none; }
.pill .av svg { width: 18px; height: 18px; }
.pill b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* Ngăn kéo menu */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; border: 0; width: 100%; padding: 0; }
.drawer.open .scrim { opacity: 1; }
.drawer nav {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); padding: 18px 16px; overflow-y: auto;
  background: linear-gradient(180deg, #19120a, #0b0806); border-right: 1.5px solid var(--line); transform: translateX(-102%); transition: transform .22s ease;
}
.drawer.open nav { transform: none; }
.drawer nav .brand { margin-bottom: 14px; }
.navlist { list-style: none; margin: 0; padding: 0; }
.navlist a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 10px; color: var(--text); font-weight: 600; }
.navlist a:hover, .navlist a[aria-current="page"] { background: rgba(231, 194, 106, .1); color: var(--gold-hi); }
.navlist svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.navlist .sep { border-top: 1px solid var(--line-soft); margin: 10px 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 18px; text-align: center; isolation: isolate; }
.hero .bg { position: absolute; inset: 0; z-index: -3; background: #0a0d18 url("../img/hero_bg_v2.jpg") 68% 30% / cover no-repeat; }   /* B161: điện thoại cắt giữa → lệch phải cho trăng nằm sau nhân vật phải */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(8, 7, 5, .05) 0%, rgba(8, 7, 5, .2) 38%, rgba(10, 8, 6, .8) 74%, var(--ink) 100%);
}
.hero .role { position: absolute; top: 40px; z-index: -1; pointer-events: none; filter: drop-shadow(0 0 18px rgba(0, 0, 0, .7)); }
.hero .role.l { left: -72px; width: 220px; opacity: .85; }
.hero .role.r { right: -96px; width: 240px; opacity: .5; }
.logo-word { margin: 4px 0 0; font: 700 clamp(66px, 20vw, 136px)/1 var(--script); letter-spacing: 1px; filter: drop-shadow(0 3px 0 #3a2508) drop-shadow(0 0 22px rgba(255, 190, 80, .45)); }
.logo-word span { display: inline-block; padding: 0 .14em .14em; }
/* B183: logo ảnh (logo_hero_*.webp, đã xoá trăng — nền đã có trăng); đáy mây vàng chồng nhẹ dưới băng .ribbon; img chung display:block → margin auto để căn giữa */
.logo-word.logo-img { margin: -4px auto -26px; line-height: 0; filter: none; }
.logo-word.logo-img img { width: min(94vw, 660px); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.ribbon {
  display: inline-block; margin: 2px 0 10px; padding: 8px 30px; color: #2a1606; font-weight: 800; font-size: clamp(13px, 3.7vw, 19px); letter-spacing: .5px;
  background: linear-gradient(180deg, #fff0bd, #e6b95a 48%, #b9822b); clip-path: polygon(0 50%, 14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%);
}
.tagline { margin: 0 auto; max-width: 560px; color: #efe4c9; font-size: 14px; text-shadow: 0 1px 3px #000, 0 0 8px #000; }
.tagline b { display: block; font-weight: 600; font-size: 15px; color: var(--gold-hi); }

/* Nút tải */
.dl-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 18px 0 10px; }
.dl { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; }
.btn-dl {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 78px; padding: 8px 4px;
  border-radius: 10px; color: var(--gold-hi); text-align: center; line-height: 1.2;
  background: linear-gradient(180deg, #2b2012, #0e0a06); border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(231, 194, 106, .35), 0 0 16px rgba(231, 194, 106, .18);
}
.btn-dl:hover { color: #fff; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(231, 194, 106, .6), 0 0 22px rgba(231, 194, 106, .35); }
.btn-dl svg { width: 26px; height: 26px; color: var(--gold); flex: none; }
.btn-dl .t { display: flex; flex-direction: column; min-width: 0; }
.btn-dl b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.btn-dl small { font-size: 11px; color: var(--muted); }
.btn-dl[aria-disabled="true"] { filter: grayscale(.85); opacity: .72; cursor: not-allowed; }
.dl .meta { font-size: 11px; line-height: 1.35; color: var(--dim); text-align: center; min-height: 30px; }
.links-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 4px; }
.btn-line {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 4px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  color: var(--text); background: rgba(14, 10, 6, .85); border: 1px solid var(--line); text-align: center; line-height: 1.2;
}
.btn-line svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.btn-line:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-line[aria-disabled="true"] { opacity: .55; cursor: not-allowed; border-style: dashed; }
.btn-line[aria-disabled="true"]:hover { border-color: var(--line); color: var(--text); }

/* ---------- Khung chung ---------- */
.frame {
  position: relative; border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1.5px solid var(--line); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .5), inset 0 0 0 4px var(--line-soft), 0 10px 24px rgba(0, 0, 0, .4);
}
.frame::before, .frame::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold); pointer-events: none; z-index: 2; }
.frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.frame::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
section { margin: 14px 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.sec-title h2 { margin: 0; font: 700 32px/1.1 var(--script); }
.sec-title a { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.sec-title a svg { width: 16px; height: 16px; }

/* Ba điểm nổi bật */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 4px; }
.feat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 5px; min-width: 0; }
.feat + .feat { border-left: 1px solid var(--line-soft); }
.feat .ic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--gold-hi);
  background: radial-gradient(circle, #3a2a12, #0f0a05 70%); border: 1.5px solid var(--gold); box-shadow: 0 0 0 3px rgba(0,0,0,.5), 0 0 12px rgba(231,194,106,.3); }
.feat .ic svg { width: 28px; height: 28px; }
.feat h3 { margin: 0; font-size: 12.5px; font-weight: 800; color: var(--gold); letter-spacing: .2px; }
.feat p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* Banner tính năng */
.banners { display: grid; gap: 12px; }
.banner { display: block; overflow: hidden; aspect-ratio: 2.2 / 1; color: var(--text); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 1px); }
.banner .shade { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(8, 6, 4, .95) 0%, rgba(8, 6, 4, .8) 32%, rgba(8, 6, 4, .08) 64%); }
.banner .cap { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); max-width: 55%; }
.banner h3 { margin: 0 0 4px; font: var(--tt-weight) clamp(20px, 5.6vw, 34px)/1.18 var(--title); }   /* B158: Merriweather rộng hơn Dancing Script → cỡ nhỏ lại cho cùng bề rộng */
.banner p { margin: 0; font-size: 12px; color: #e6dac0; line-height: 1.4; text-shadow: 0 1px 2px #000; }

/* Quà tân thủ */
.gift { padding: 14px; overflow: hidden; background: radial-gradient(ellipse at 18% 35%, rgba(179, 38, 28, .6), transparent 62%), linear-gradient(135deg, #3a0c09, #1a0806 60%, #120905); }
.gift-head { display: flex; align-items: center; gap: 12px; }
.gift-head .chest { width: 84px; height: 84px; flex: none; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 180, 60, .55)); }
.gift-head h2 { margin: 0; font: var(--tt-weight) 28px/1.18 var(--title); }
/* B158: hiệu ứng tiêu đề — chữ vàng (.gold-text) + viền tối + bóng + phát sáng; đệm trên để dấu chồng (Ấ Ể Ỗ) vẫn nằm trong nền vàng */
.banner h3, .gift-head h2 {
  padding-top: .14em; margin-top: -.14em; letter-spacing: .01em; transform: skewX(var(--tt-skew));
  filter: drop-shadow(var(--tt-edge-w) 0 0 var(--tt-edge)) drop-shadow(calc(var(--tt-edge-w) * -1) 0 0 var(--tt-edge))
          drop-shadow(0 var(--tt-edge-w) 0 var(--tt-edge)) drop-shadow(0 calc(var(--tt-edge-w) * -1) 0 var(--tt-edge))
          drop-shadow(0 var(--tt-drop) 1px rgba(0, 0, 0, .85)) drop-shadow(0 0 var(--tt-glow-r) var(--tt-glow));
}
.gift-head .sub { display: inline-block; margin-top: 6px; padding: 3px 12px; font-size: 12px; font-weight: 800; color: #fbe7a8; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 4px; letter-spacing: .4px; }
.items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 6px; list-style: none; padding: 0; }
.item { position: relative; aspect-ratio: 1; border-radius: 8px; background: radial-gradient(circle, #3b2a15, #120c06); border: 1.5px solid var(--gold-lo); display: grid; place-items: center; }
.item img { width: 80%; height: 80%; object-fit: contain; }
.item .n { position: absolute; right: 4px; bottom: 2px; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px #000; }
.item-names { margin: 0 0 10px; font-size: 12px; color: #d9c7a3; line-height: 1.45; }
.gift .note { margin: 8px 0 0; font-size: 12.5px; color: #e7d6b4; }
.gift .code { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin: 8px 0 0; border-radius: 9px; background: rgba(0,0,0,.45); border: 1px dashed var(--gold); font: 800 18px/1.2 ui-monospace, Consolas, monospace; color: var(--gold-hi); letter-spacing: 1px; }
.gift form { margin: 0; }

/* Nút vàng */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; cursor: pointer;
  font: 800 16px/1.1 var(--sans); letter-spacing: .3px; color: #2a1606; border: 1px solid #fff0bd; text-align: center;
  background: linear-gradient(180deg, #fff3c4 0%, #f0c664 42%, #c48a2f 100%);
  box-shadow: inset 0 -3px 0 rgba(90, 55, 10, .45), 0 0 0 2px rgba(0, 0, 0, .55), 0 0 18px rgba(240, 190, 90, .35);
}
.btn-gold:hover { color: #1a0d02; filter: brightness(1.06); }
.btn-gold svg { width: 20px; height: 20px; flex: none; }
.btn-gold.block { width: 100%; }
.btn-gold[disabled], .btn-gold[aria-disabled="true"] { filter: grayscale(.9) brightness(.75); cursor: not-allowed; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  font: 700 14px/1.1 var(--sans); color: var(--gold-hi); background: rgba(14, 10, 6, .9); border: 1.5px solid var(--gold); text-align: center;
}
.btn:hover { color: #fff; }
.btn svg { width: 18px; height: 18px; }
.btn.danger { border-color: #b3483c; color: #ffb2a6; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Tin tức */
.news { padding: 10px 12px 12px; }
.news-list { display: grid; gap: 8px; }
.news-item { display: grid; grid-template-columns: 118px 1fr 18px; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; color: var(--text); border: 1px solid var(--line-soft); background: rgba(0,0,0,.22); }
.news-item:hover { border-color: var(--line); background: rgba(231, 194, 106, .05); color: var(--text); }
.news-item .th { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-soft); }
.news-item .th img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 4px; right: 4px; padding: 1px 6px; font-size: 10px; font-weight: 800; color: #fff; background: var(--red-hi); border: 1px solid #f6b07a; border-radius: 3px; text-transform: uppercase; }
.tag.inline { position: static; display: inline-block; margin-right: 6px; vertical-align: 2px; }
.news-item h3 { margin: 0 0 2px; font-size: 14px; line-height: 1.3; }
.news-item time { display: block; font-size: 11px; color: var(--dim); }
.news-item p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .go { color: var(--gold); }
.news-item .go svg { width: 18px; height: 18px; }

/* CTA + chân trang */
.cta { text-align: center; padding: 18px 0 6px; }
.cta .btn-gold { min-height: 66px; font-size: clamp(20px, 6vw, 26px); padding: 0 34px; border-radius: 14px; letter-spacing: 1px; min-width: min(100%, 360px); }
.cta .btn-gold svg { width: 28px; height: 28px; }
.cta p { margin: 12px 0 0; font-size: 12px; letter-spacing: 3px; color: var(--muted); }
footer { margin-top: 26px; padding: 22px 0 28px; border-top: 1px solid var(--line-soft); background: #070504; color: var(--dim); font-size: 12.5px; }
footer .cols { display: grid; gap: 14px; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 16px; }
footer ul a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
footer ul a:hover { color: var(--gold-hi); }
footer p { margin: 4px 0; }

/* ---------- Trang tài khoản ---------- */
.page-head { position: relative; padding: 26px 0 14px; text-align: center; isolation: isolate; overflow: hidden; }
.page-head .bg { position: absolute; inset: 0; z-index: -2; background: url("../img/hero_bg_v2.jpg") 62% 30% / cover; opacity: .45; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,8,6,.3), var(--ink)); }
.page-head h1 { margin: 0; font: 700 clamp(38px, 11vw, 56px)/1.1 var(--script); }
.page-head h1 span { display: inline-block; padding: 0 .12em .1em; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card { padding: 16px; margin: 12px 0; }
.card h2 { margin: 0 0 10px; font-size: 17px; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.card h2 svg { width: 20px; height: 20px; flex: none; }
.card h2.mt { margin-top: 24px; }
.narrow { max-width: 480px; margin: 0 auto; }
.form { display: grid; gap: 12px; }
.field label, .field .lbl { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 9px; font: 16px var(--sans); color: var(--text);
  background: #0c0906; border: 1px solid rgba(231, 194, 106, .35);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 194, 106, .2); }
.field .hint { margin: 4px 0 0; font-size: 12px; color: var(--dim); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); }
.field label.check { display: flex; margin: 0; font-weight: 400; color: var(--text); }
.check input { flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row > a:not([class]) { display: inline-flex; align-items: center; min-height: 44px; }
.char img { object-position: 50% 20%; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.alert { padding: 11px 13px; border-radius: 9px; font-size: 14px; border: 1px solid; margin: 0 0 12px; }
.alert.err { color: #ffd3cb; background: rgba(160, 40, 28, .25); border-color: rgba(255, 123, 107, .5); }
.alert.ok { color: #d6f5df; background: rgba(40, 130, 70, .22); border-color: rgba(88, 194, 122, .5); }
.alert.info { color: #f3e6c4; background: rgba(231, 194, 106, .08); border-color: var(--line); }
.alert[hidden] { display: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--dim); font-weight: 600; font-size: 12px; }
td.num, th.num { text-align: right; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; border: 1px solid; }
.badge.ok { color: #9fe6b5; border-color: rgba(88, 194, 122, .6); }
.badge.bad { color: #ffb2a6; border-color: rgba(255, 123, 107, .6); }
.badge.wait { color: #f3dca0; border-color: var(--line); }
.chars { display: grid; gap: 10px; }
.char { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line-soft); }
.char img { width: 58px; height: 58px; object-fit: cover; border-radius: 50%; border: 1.5px solid var(--gold); background: #1b140c; }
.char h3 { margin: 0 0 2px; font-size: 16px; color: var(--gold-hi); }
.char .stats { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; color: var(--muted); }
.char .stats b { color: var(--text); }
.packs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pack { position: relative; display: block; }
.packs > .pack:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* B282: 2 cột (điện thoại) mà số ô lẻ → ô cuối trải hết hàng, "1.000.000 Vàng" không xuống dòng */
.pack input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pack span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 78px; padding: 8px; border-radius: 10px; cursor: pointer; text-align: center;
  background: #0f0b07; border: 1.5px solid rgba(231, 194, 106, .3); }
.pack span b { font-size: clamp(15px, 4.6vw, 18px); color: var(--gold-hi); }   /* B282: màn 360px "500.000 Vàng" vẫn một dòng; ≥ 392px = 18px như cũ */
.pack span small { font-size: 12.5px; color: var(--muted); }
.pack input:checked + span { border-color: var(--gold); background: linear-gradient(180deg, #2c2111, #120d07); box-shadow: 0 0 0 2px rgba(231,194,106,.25), 0 0 16px rgba(231, 194, 106, .2); }
.pack input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.pack.off span { cursor: not-allowed; opacity: .38; border-style: dashed; }
.pack.off span b { color: var(--muted); font-size: 15px; }
.methods { display: grid; gap: 4px; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--gold); }
.card-fields[hidden] { display: none; }
.vipbar { height: 10px; border-radius: 99px; background: #0c0906; border: 1px solid var(--line-soft); overflow: hidden; margin: 6px 0; }
.vipbar i { display: block; height: 100%; background: linear-gradient(90deg, #b8842e, #fbe7a8); }
.rate-table td:first-child { color: var(--muted); }
.article { padding: 16px; }
.article h1 { margin: 6px 0 4px; font-size: 22px; line-height: 1.3; color: var(--gold-hi); }
.article .cover { width: 100%; border-radius: 10px; margin: 12px 0; border: 1px solid var(--line-soft); }
.article h2 { font-size: 17px; color: var(--gold); margin: 18px 0 6px; }
.article p, .article li { color: #e8dcc2; }
.article ul { padding-left: 20px; }
.guide-img { width: 100%; max-width: 737px; margin: 0 auto 6px; border-radius: 6px; }
.guide-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; list-style: none; padding: 0; margin: 0; }
.guide-list a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); font-weight: 600; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.hide-sm { display: none; }
.grid-2 > * { min-width: 0; }

/* ---------- Máy tính bảng / máy tính ---------- */
@media (min-width: 640px) {
  .topbar .brand span { display: inline; }
  .hide-sm { display: initial; }
  .btn-dl { flex-direction: row; gap: 12px; min-height: 66px; text-align: left; }
  .btn-dl b { font-size: 19px; }
  .btn-dl svg { width: 34px; height: 34px; }
  .dl-row { gap: 14px; max-width: 580px; margin-left: auto; margin-right: auto; }
  .links-row { gap: 14px; max-width: 760px; margin-left: auto; margin-right: auto; }
  .btn-line { font-size: 14px; }
  .feat h3 { font-size: 15px; } .feat p { font-size: 13px; }
  .feat { flex-direction: row; text-align: left; gap: 12px; padding: 0 14px; }
  .feat .ic { width: 64px; height: 64px; } .feat .ic svg { width: 34px; height: 34px; }
  .banner { aspect-ratio: 3.4 / 1; }
  .banner img { object-position: 50% 42%; }
  .banner .cap { left: 30px; max-width: 42%; }
  .banner p { font-size: 14px; }
  .gift { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; align-items: center; padding: 18px 22px; }
  .gift-head .chest { width: 120px; height: 120px; }
  .gift-head h2 { font-size: 38px; }
  .news-list { grid-template-columns: 1fr 1fr; }
  .news-item { grid-template-columns: 150px 1fr 18px; }
  .packs { grid-template-columns: repeat(3, 1fr); }
  .packs > .pack:last-child:nth-child(odd) { grid-column: auto; }
  .chars { grid-template-columns: 1fr 1fr; }
  .guide-list { grid-template-columns: repeat(3, 1fr); }
  footer .cols { grid-template-columns: 1.2fr 1fr; }
  .hero .role.l { left: -20px; width: 300px; opacity: .9; }
  .hero .role.r { right: -40px; width: 320px; opacity: .75; }
}
@media (min-width: 980px) {
  .hero { padding: 100px 0 30px; }
  .hero .role.l { left: calc(50% - 650px); width: 420px; top: 60px; }
  .hero .role.r { right: calc(50% - 660px); width: 440px; top: 90px; opacity: .9; }
  .hero .bg { background-position: 50% 30%; }
  .hero .role { display: none; }   /* B161: nền hero_bg_v2 đã vẽ sẵn hai nhân vật hai bên — máy tính dùng tranh trong nền; điện thoại nền cắt giữa nên vẫn hiện .role */
  .grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start; }
  .grid-2 > .card { margin: 0; }
  .grid-2 > * { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Nạp Vàng: phương thức, đơn, QR ---------- */
.check.method { align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, .25); }
.check.method input { margin-top: 2px; }
.check.method span { display: flex; flex-direction: column; gap: 2px; }
.check.method b { color: var(--text); font-weight: 700; }
.check.method small { color: var(--muted); font-size: 12.5px; }
.check.method:has(input:checked) { border-color: var(--gold); background: rgba(231, 194, 106, .08); }
[data-show-for][hidden] { display: none; }
.narrow-lg { max-width: 760px; margin: 0 auto; }
.btn.small { min-height: 44px; padding: 0 10px; font-size: 12.5px; }
.order-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; font-size: 14px; }
.pay-grid { display: grid; gap: 14px; }
.qr { width: 240px; height: 240px; margin: 0 auto; background: #fff; border-radius: 10px; padding: 8px; object-fit: contain; }
.countdown { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.countdown b { color: var(--gold-hi); font-size: 18px; }
.countdown.expired { color: var(--err); }
.kv-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.kv-row .muted { grid-column: 1 / -1; font-size: 12px; }
.kv-row .val { font-weight: 700; overflow-wrap: anywhere; }
.kv-row .val.hl { color: var(--gold-hi); font-size: 17px; }
.notice-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 0; font-size: 13.5px; font-weight: 600; color: #2a1606;
  background: linear-gradient(180deg, #fbe7a8, #d9a445); box-shadow: 0 -4px 14px rgba(0, 0, 0, .45); text-align: center; }
body:has(.notice-bar) { padding-bottom: 56px; }
@media (min-width: 640px) { .pay-grid { grid-template-columns: 280px 1fr; align-items: start; } }

/* ---------- Chế độ app (mở từ nút Nạp Vàng trong game) ---------- */
.appbar { position: sticky; top: 0; z-index: 30; background: rgba(10, 8, 6, .95); border-bottom: 1px solid var(--line-soft); }
.appbar .wrap { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.appbar img { width: 32px; height: 32px; border-radius: 8px; }
.appbar .t { font-size: 16px; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .spacer { flex: 1; }
.appbar .btn { white-space: nowrap; flex: none; min-width: 44px; }
@media (max-width: 459px) { .appbar .btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .appbar .btn { padding: 0 12px; } }
.app-rate { margin: 12px 0 4px; text-align: center; font-size: 13px; color: var(--muted); }
.app-back { margin: 10px 0 10px; padding: 10px 12px; border-radius: 10px; text-align: center; font-weight: 700; color: #d6f5df; background: rgba(40, 130, 70, .22); border: 1px solid rgba(88, 194, 122, .5); }
.app-foot { padding: 16px 0 24px; color: var(--dim); text-align: center; border-top: 1px solid var(--line-soft); margin-top: 20px; }

/* ---------- Nạp Vàng: trình tự 3 bước ---------- */
.note-vang { margin: 0 0 10px; font-size: 13px; color: var(--muted); text-align: center; }
.note-vang b { color: var(--gold-hi); }
.topup-layout { display: grid; gap: 12px; align-items: start; }
.topup-layout > * { min-width: 0; }
.wz-step { margin: 0 0 12px; scroll-margin-top: 80px; }
.step-h { display: flex; align-items: center; gap: 10px; }
.step-h .n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #2a1606;
  background: linear-gradient(180deg, #fff0bd, #d9a445); }
.mcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcard { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 118px; padding: 14px 12px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, #211810, #0f0b07); border: 1.5px solid rgba(231, 194, 106, .28); transition: border-color .15s, box-shadow .15s; }
.mcard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mcard .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--gold-hi); background: radial-gradient(circle, #3a2a12, #120c06); border: 1px solid var(--line); }
.mcard .ic svg { width: 24px; height: 24px; }
.mcard .t { display: flex; flex-direction: column; gap: 2px; }
.mcard b { font-size: 15px; color: var(--text); line-height: 1.25; }
.mcard small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.mcard .tick { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; color: #2a1606; background: var(--gold); }
.mcard .tick svg { width: 16px; height: 16px; }
.mcard:hover { border-color: var(--line); }
.mcard:has(input:checked) { border-color: var(--gold); background: linear-gradient(180deg, #33250f, #140e07); box-shadow: 0 0 0 2px rgba(231, 194, 106, .22), 0 0 18px rgba(231, 194, 106, .18); }
.mcard:has(input:checked) .tick { display: grid; }
.mcard:has(input:focus-visible) { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
/* bước 2 chỉ hiện khi đã chọn hình thức (data-method do JS / ?m= đặt; :has cho trường hợp tắt JS) */
.wizard .wz-step2, .wizard .wz-panel { display: none; }
.wizard[data-method="sandbox"] .wz-step2, .wizard[data-method="bank_qr"] .wz-step2, .wizard[data-method="card"] .wz-step2, .wizard[data-method="e_wallet"] .wz-step2 { display: block; }
.wizard[data-method="sandbox"] .wz-panel[data-panel="sandbox"], .wizard[data-method="bank_qr"] .wz-panel[data-panel="bank_qr"],
.wizard[data-method="card"] .wz-panel[data-panel="card"], .wizard[data-method="e_wallet"] .wz-panel[data-panel="e_wallet"] { display: grid; }
.wizard:has(input[data-pick]:checked) .wz-step2 { display: block; }
.wizard:has(input[data-pick][value="sandbox"]:checked) .wz-panel[data-panel="sandbox"], .wizard:has(input[data-pick][value="bank_qr"]:checked) .wz-panel[data-panel="bank_qr"],
.wizard:has(input[data-pick][value="card"]:checked) .wz-panel[data-panel="card"], .wizard:has(input[data-pick][value="e_wallet"]:checked) .wz-panel[data-panel="e_wallet"] { display: grid; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt { position: relative; }
.pill-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px;
  background: #0f0b07; border: 1.5px solid rgba(231, 194, 106, .3); }
.pill-opt input:checked + span { border-color: var(--gold); color: var(--gold-hi); background: linear-gradient(180deg, #2c2111, #120d07); box-shadow: 0 0 0 2px rgba(231, 194, 106, .2); }
.pill-opt input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.two { display: grid; gap: 12px; }
.getline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(231, 194, 106, .08); border: 1px solid var(--line); font-size: 14px; }
.getline b { font-size: 20px; color: var(--gold-hi); white-space: nowrap; }
.wz-panel .btn-gold[disabled] { filter: grayscale(.85) brightness(.6); }
/* B258: ô chọn "Máy chủ · Nhân vật" — tự vẽ (appearance none) để chữ có dấu (Ễ, Ộ) không bị cắt theo chiều cao; tên dài cắt "…" theo chiều ngang, tên đủ ở Tóm tắt */
.wz-panel select { -webkit-appearance: none; appearance: none; height: auto; min-height: 52px; padding: 12px 42px 12px 14px; line-height: 1.45;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  background: #0c0906 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e7c26a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.wz-panel select option { background: #16100a; color: var(--text); }
/* B258: ô tự nhập số tiền — MỘT viền ở khung bọc (hết "ô trong ô"), chữ "đ" nằm trong ô bên phải */
.amount-box { position: relative; display: flex; align-items: center; min-height: 54px; border-radius: 9px; background: #0c0906; border: 1px solid rgba(231, 194, 106, .35); }
.amount-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 194, 106, .2); }
.field .amount-box input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 10px 44px 10px 14px; border: 0; border-radius: 9px; background: transparent;
  box-shadow: none; font-size: 18px; font-weight: 700; letter-spacing: .3px; text-overflow: clip; }
.field .amount-box input:focus { border-color: transparent; box-shadow: none; }
.field .amount-box input::placeholder { color: var(--dim); font-weight: 400; opacity: 1; }
.amount-box .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; font-weight: 700; pointer-events: none; }
.amount-box:has(input[aria-invalid="true"]) { border-color: #ff7b6b; box-shadow: 0 0 0 3px rgba(255, 123, 107, .15); }
.amount-err { margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(255, 123, 107, .55); background: rgba(160, 40, 28, .22); color: #ffd3cb; font-size: 13.5px; line-height: 1.45; }
.amount-err .amt-sug { display: block; min-height: 32px; margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--gold-hi); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; }
[data-vip-box].up .vipbar i { background: linear-gradient(90deg, #b8842e, #fbe7a8 70%, #fff6d6); box-shadow: 0 0 10px rgba(251, 231, 168, .5); }
[data-vip-box].up [data-vip-note] { color: var(--gold-hi); }
.result-big { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; margin: 0 0 10px; border-radius: 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 0, rgba(88, 194, 122, .18), transparent 70%); border: 1px solid rgba(88, 194, 122, .45); }
.result-big b { font-size: 34px; color: var(--gold-hi); line-height: 1.2; }
.result-err { padding: 14px; border-radius: 12px; border: 1px solid rgba(255, 123, 107, .5); background: rgba(160, 40, 28, .2); }
.result-err b { display: block; color: #ffd3cb; font-size: 16px; }
.result-err p { margin: 6px 0 0; }
.processing { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: rgba(231, 194, 106, .06); border: 1px dashed var(--line); }
.spin { width: 24px; height: 24px; flex: none; border-radius: 50%; border: 3px solid rgba(231, 194, 106, .25); border-top-color: var(--gold); animation: pvspin 1s linear infinite; }
@keyframes pvspin { to { transform: rotate(360deg); } }
.topup-side .sum { display: none; }
.sum .kv dd.hl { color: var(--gold-hi); font-size: 18px; }
details.acc { padding: 4px 16px; }
details.acc > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 52px; cursor: pointer; font-size: 16px; font-weight: 700; color: var(--gold); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary svg { width: 20px; height: 20px; flex: none; }
details.acc > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .15s; }
details.acc[open] > summary::after { transform: rotate(-135deg); }
details.acc[open] { padding-bottom: 14px; }
.topup-side details.acc, .wrap > details.acc { margin: 0 0 12px; }
@media (min-width: 640px) { .mcards { grid-template-columns: repeat(2, 1fr); } .two { grid-template-columns: 1fr 1fr; } .mcard { flex-direction: row; align-items: center; min-height: 88px; } }
@media (min-width: 980px) {
  .topup-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
  .topup-side .sum { display: block; margin-top: 0; }
  .note-vang { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* ---------- Tải iOS: 3 bước TestFlight (dòng thời gian) ---------- */
.ios-steps { list-style: none; margin: 14px 0 8px; padding: 0; position: relative; }
.ios-steps::before { content: ""; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(180deg, var(--gold-lo), var(--line-soft)); }
.ios-step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; margin: 0 0 16px; }
.ios-step .node {
  position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-hi); z-index: 1;
  background: radial-gradient(circle at 50% 35%, #2a1f12, #0d0906); border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 4px var(--ink), 0 0 16px rgba(231, 194, 106, .28);
}
.ios-step .node svg { width: 24px; height: 24px; }
.ios-step .node i {
  position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 800 12px/1 var(--sans); font-style: normal; color: #2a1606; background: linear-gradient(180deg, #fff3c4, #c48a2f); border: 1px solid #fff0bd;
}
.ios-step .card { margin: 0; padding: 16px 16px 18px; }
.ios-step .kicker { margin: 0 0 2px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); }
.ios-step h2 { margin: 0 0 6px; font-size: 19px; color: var(--gold-hi); }
.ios-step p { margin: 0 0 12px; color: #e7d6b4; }
.ios-step p b { color: var(--text); }
.ios-step .tip { padding: 9px 12px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: rgba(231, 194, 106, .08); font-size: 13px; }
.ios-step .tip.after { margin: 12px 0 0; }
.ios-step .btn-line.big { min-height: 50px; font-size: 16px; font-weight: 700; border-radius: 10px; }
.ios-step .btn-gold.block { min-height: 52px; font-size: 17px; }
.ios-foot { text-align: center; color: var(--muted); font-size: 13.5px; margin: 4px 0 24px; }
@media (min-width: 640px) { .ios-step { grid-template-columns: 64px 1fr; gap: 18px; } .ios-steps::before { left: 31px; } .ios-step .node { width: 64px; height: 64px; } .ios-step .card { padding: 20px 22px; } }
