/* Army2 Hi - giao diện web v2.4 "Ban ngày": trời xanh sáng như bản đồ trong game, nút cam san hô có gờ nổi kiểu game mobile.
   Chữ: Lexend (tiêu đề, con số) + Nunito (nội dung). Phẩm chất đồ: Tinh luyện, Bạch kim, Kim cương, Hoàng kim (cao nhất). */
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/lexend-vietnamese-600-normal.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: "Lexend"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/lexend-latin-600-normal.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; }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/lexend-vietnamese-700-normal.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: "Lexend"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/lexend-latin-700-normal.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; }
@font-face { font-family: "Lexend"; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/fonts/lexend-vietnamese-800-normal.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: "Lexend"; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/fonts/lexend-latin-800-normal.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/nunito-vietnamese-400-normal.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: "Nunito"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/nunito-latin-400-normal.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/nunito-vietnamese-600-normal.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: "Nunito"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/nunito-latin-600-normal.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/nunito-vietnamese-700-normal.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: "Nunito"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/nunito-latin-700-normal.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; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/fonts/nunito-vietnamese-800-normal.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: "Nunito"; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/fonts/nunito-latin-800-normal.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: #12303a;
  --ink-2: #2d4b55;
  --muted: #5f7781;
  --sky: #1b8fe0;
  --sky-deep: #0f6db3;
  --sky-soft: #e1f2fe;
  --coral: #ff6a3d;
  --coral-deep: #d9481d;
  --coral-soft: #ffe8df;
  --leaf: #1fa35a;
  --leaf-deep: #157a42;
  --leaf-soft: #ddf5e7;
  --sun: #ffc83a;
  --sun-soft: #fff3d2;
  --berry: #e0405a;
  --berry-deep: #b52c43;
  --berry-soft: #fde3e8;
  --bg: #eef7fc;
  --paper: #ffffff;
  --line: #d3e4ee;
  --line-2: #bcd4e2;
  --ledge: #d4e6f1;
  --r-1: 10px;
  --r-2: 14px;
  --r-3: 20px;
  --shadow-pop: 0 18px 40px rgba(18, 48, 58, .16);
  --font-display: "Lexend", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --topbar-h: 68px;
  --tabbar-h: 64px;
  /* tên cũ dùng ở vài trang quản trị */
  --paper-2: #f4f9fc; --hazard: var(--sun); --hazard-2: #e2a400; --fire: var(--berry);

  --bs-body-font-family: var(--font-body);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-link-color: var(--sky-deep);
  --bs-link-hover-color: var(--ink);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--r-2);
  --bs-border-radius-sm: var(--r-1);
  --bs-border-radius-lg: var(--r-3);
  --bs-primary-rgb: 255, 106, 61;
  --bs-success-rgb: 31, 163, 90;
  --bs-danger-rgb: 224, 64, 90;
  --bs-warning-rgb: 255, 200, 58;
  --bs-info-rgb: 27, 143, 224;
}

/* ------------------------------------------------------------------ nền tảng */
html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg); font-weight: 500; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font-display); font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.2; }
h1, .h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }
h3, .h3 { font-size: 1.15rem; }
h4, .h4, h5, .h5 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
a { color: var(--sky-deep); text-underline-offset: .18em; font-weight: 600; }
a:hover { color: var(--ink); }
img { max-width: 100%; }
b, strong { font-weight: 800; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 9999; background: var(--ink); color: #fff; padding: .5rem .9rem; border-radius: var(--r-1); font-weight: 800; }
.skip:focus { left: 8px; color: #fff; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------------ thanh trên cùng (nền trắng) */
.topbar { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; letter-spacing: -.03em; }
.brand:hover { color: var(--coral-deep); }
.mainnav { display: flex; align-items: center; gap: .2rem; flex: 1 1 auto; min-width: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 700; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); background: var(--sky-soft); }
.mainnav a[aria-current="page"] { color: var(--coral-deep); background: var(--coral-soft); }
.nav-live { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px rgba(31, 163, 90, .2); }
.acct { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; margin-left: auto; }
.acct-menu { position: relative; }
.acct-menu > summary { list-style: none; display: flex; align-items: center; gap: .5rem; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; cursor: pointer; color: var(--ink); background: var(--paper); border: 1px solid var(--line); font-weight: 800; }
.acct-menu > summary::-webkit-details-marker { display: none; }
.acct-menu > summary:hover, .acct-menu[open] > summary { border-color: var(--line-2); background: var(--sky-soft); }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--coral); color: #fff; font-family: var(--font-display); font-weight: 800; flex: 0 0 auto; box-shadow: 0 3px 0 var(--coral-deep); }
.acct-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-caret { width: 10px; height: 10px; color: var(--muted); }
.acct-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; background: var(--paper); color: var(--ink); border-radius: var(--r-3); box-shadow: var(--shadow-pop); border: 1px solid var(--line); overflow: hidden; z-index: 1040; }
.acct-money { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; padding: .75rem; background: var(--sky-soft); }
.acct-money div { background: var(--paper); border-radius: var(--r-1); padding: .55rem .75rem; }
.acct-money dt { font-size: .78rem; color: var(--muted); font-weight: 700; }
.acct-money dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.acct-links { list-style: none; margin: 0; padding: .4rem; }
.acct-links a { display: flex; align-items: center; padding: .55rem .75rem; border-radius: var(--r-1); color: var(--ink); text-decoration: none; font-weight: 700; }
.acct-links a:hover { background: var(--bg); }
.acct-links .sep { height: 1px; margin: .35rem .4rem; background: var(--line); }
.acct-links .danger { color: var(--berry-deep); }
.notice-bar { background: var(--sun-soft); border-bottom: 1px solid #f2dc9a; color: #5a4300; font-size: .92rem; font-weight: 600; }
.notice-bar .wrap { display: flex; align-items: center; gap: .75rem; padding-top: .55rem; padding-bottom: .55rem; flex-wrap: wrap; }
.notice-bar a { color: #5a4300; font-weight: 800; }

/* ------------------------------------------------------------------ thanh tab dưới (điện thoại) */
.tabbar { display: none; }
@media (max-width: 860px) {
  .mainnav { display: none; }
  .acct-name { display: none; }
  body.site { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(18, 48, 58, .06); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 800; }
  .tabbar svg { width: 24px; height: 24px; padding: 2px; border-radius: 10px; box-sizing: content-box; }
  .tabbar a[aria-current="page"] { color: var(--coral-deep); }
  .tabbar a[aria-current="page"] svg { background: var(--coral-soft); padding: 2px 12px; }
  .acct-pop { position: fixed; left: 12px; right: 12px; width: auto; top: calc(var(--topbar-h) + 6px); }
}

/* ------------------------------------------------------------------ nút có gờ nổi */
.btn { --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .55rem; --bs-btn-font-weight: 800; --bs-btn-font-family: var(--font-body); --bs-btn-border-radius: var(--r-2); --bs-btn-border-width: 0; --ledge-c: transparent;
  line-height: 1.3; box-shadow: 0 4px 0 var(--ledge-c); transition: transform .07s ease, box-shadow .07s ease, background-color .12s; }
.btn:active, .btn.active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ledge-c) !important; }
.btn:disabled, .btn.disabled { box-shadow: none; transform: none; }
.btn-sm { --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .32rem; --bs-btn-font-size: .875rem; --bs-btn-border-radius: var(--r-1); box-shadow: 0 3px 0 var(--ledge-c); }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: .8rem; --bs-btn-font-size: 1.08rem; --bs-btn-border-radius: 16px; box-shadow: 0 5px 0 var(--ledge-c); }
.btn-primary, .btn-hazard, .btn-coral {
  --ledge-c: var(--coral-deep);
  --bs-btn-color: #fff; --bs-btn-bg: var(--coral); --bs-btn-border-color: var(--coral);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #ff7b52; --bs-btn-hover-border-color: #ff7b52;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--coral); --bs-btn-active-border-color: var(--coral);
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #ffb79f; --bs-btn-disabled-border-color: #ffb79f; }
.btn-secondary, .btn-paper, .btn-light {
  --ledge-c: var(--line-2);
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--paper); --bs-btn-border-color: var(--line-2); --bs-btn-border-width: 1px;
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--sky-soft); --bs-btn-hover-border-color: var(--line-2);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: var(--sky-soft); --bs-btn-active-border-color: var(--line-2);
  --bs-btn-disabled-color: #8aa0aa; --bs-btn-disabled-bg: #f3f8fb; --bs-btn-disabled-border-color: var(--line); }
.btn-success {
  --ledge-c: var(--leaf-deep);
  --bs-btn-color: #fff; --bs-btn-bg: var(--leaf); --bs-btn-border-color: var(--leaf);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #26b766; --bs-btn-hover-border-color: #26b766;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--leaf); }
.btn-danger {
  --ledge-c: var(--berry-deep);
  --bs-btn-color: #fff; --bs-btn-bg: var(--berry); --bs-btn-border-color: var(--berry);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #ea5570; --bs-btn-hover-border-color: #ea5570;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--berry); }
.btn-info, .btn-sky {
  --ledge-c: var(--sky-deep);
  --bs-btn-color: #fff; --bs-btn-bg: var(--sky); --bs-btn-border-color: var(--sky);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #2c9ff0; --bs-btn-hover-border-color: #2c9ff0;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--sky); }
.btn-warning {
  --ledge-c: #e2a400;
  --bs-btn-color: var(--ink); --bs-btn-bg: var(--sun); --bs-btn-border-color: var(--sun);
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #ffd25e; --bs-btn-active-bg: var(--sun); }
.btn-dark, .btn-ink {
  --ledge-c: #08181e;
  --bs-btn-color: #fff; --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ink-2); --bs-btn-active-bg: var(--ink); }
.btn-ghost, .btn-outline-light, .btn-outline {
  --ledge-c: var(--line-2);
  --bs-btn-color: var(--ink); --bs-btn-bg: rgba(255, 255, 255, .75); --bs-btn-border-color: var(--line-2); --bs-btn-border-width: 1px;
  --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: var(--line-2);
  --bs-btn-active-color: var(--ink); --bs-btn-active-bg: #fff; }
.btn-link { --bs-btn-color: var(--sky-deep); --bs-btn-hover-color: var(--ink); box-shadow: none !important; transform: none !important; text-decoration: none; }
.btn:focus-visible { box-shadow: 0 4px 0 var(--ledge-c), 0 0 0 .25rem rgba(27, 143, 224, .35); }

/* ------------------------------------------------------------------ ô nhập, bảng, thông báo, hộp thoại */
.form-label, label.fw-semibold { font-weight: 800; font-size: .92rem; color: var(--ink); margin-bottom: .35rem; }
.form-control, .form-select { border: 2px solid var(--line); border-radius: var(--r-2); padding: .58rem .85rem; background-color: var(--paper); color: var(--ink); font-size: 1rem; font-weight: 600; }
.form-control-sm, .form-select-sm { padding: .3rem .6rem; font-size: .9rem; border-radius: var(--r-1); }
.form-control:focus, .form-select:focus { border-color: var(--sky); box-shadow: 0 0 0 .22rem rgba(27, 143, 224, .18); }
.form-control::placeholder { color: #93a8b1; font-weight: 500; }
.form-control-solid { background-color: var(--bg); border-color: var(--bg); }
.form-control-solid:focus { background-color: var(--paper); }
.form-text { color: var(--muted); font-size: .85rem; font-weight: 600; }
.form-check-input { border-width: 2px; border-color: var(--line-2); }
.form-check-input:checked { background-color: var(--leaf); border-color: var(--leaf); }
.input-group-text { background: var(--bg); border: 2px solid var(--line); color: var(--muted); font-weight: 700; }
.invalid-feedback { font-size: .85rem; font-weight: 700; }

.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-striped-bg: #f5fafd; --bs-table-hover-bg: #f1f8fd; --bs-table-border-color: var(--line); margin-bottom: 0; vertical-align: middle; }
.table > thead th, .table > thead td { background: var(--bg); color: var(--muted); font-size: .8rem; font-weight: 800; border-bottom-width: 1px; white-space: nowrap; }
.table > :not(caption) > * > * { padding: .65rem .8rem; border-bottom-color: var(--line); }
.table-dark, .table-success, .table-dark > thead, .table-success > * { --bs-table-bg: var(--bg); --bs-table-color: var(--muted); --bs-table-border-color: var(--line); color: var(--muted); }
.text-uppercase.small, thead.text-uppercase { text-transform: none !important; }

.alert { --bs-alert-padding-x: 1rem; --bs-alert-padding-y: .8rem; --bs-alert-border-radius: var(--r-2); border-width: 0; font-size: .95rem; font-weight: 600; }
.alert-success { --bs-alert-color: #0f5a31; --bs-alert-bg: var(--leaf-soft); }
.alert-danger { --bs-alert-color: #8c1d31; --bs-alert-bg: var(--berry-soft); }
.alert-warning { --bs-alert-color: #5a4300; --bs-alert-bg: var(--sun-soft); }
.alert-info, .alert-primary { --bs-alert-color: #0b4f86; --bs-alert-bg: var(--sky-soft); }
.alert a { font-weight: 800; color: inherit; }

.modal { --bs-modal-border-radius: 24px; --bs-modal-border-width: 0; --bs-modal-padding: 1.5rem; --bs-modal-header-padding: 1.3rem 1.5rem .25rem; --bs-modal-box-shadow: var(--shadow-pop); --bs-modal-bg: var(--paper); --bs-modal-color: var(--ink); }
.modal-header { border-bottom: 0; }
.modal-footer { border-top: 1px solid var(--line); background: var(--bg); border-bottom-left-radius: 24px; border-bottom-right-radius: 24px; }
.modal-title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.modal-backdrop { --bs-backdrop-bg: #0c2129; --bs-backdrop-opacity: .45; }
.badge { --bs-badge-font-weight: 800; --bs-badge-border-radius: 999px; --bs-badge-padding-x: .6em; }
.pagination { --bs-pagination-color: var(--ink); --bs-pagination-border-color: var(--line); --bs-pagination-hover-bg: var(--sky-soft); --bs-pagination-active-bg: var(--coral); --bs-pagination-active-border-color: var(--coral); --bs-pagination-border-radius: var(--r-1); }
.nav-pills { --bs-nav-pills-border-radius: 999px; --bs-nav-pills-link-active-bg: var(--coral); }
.nav-link { color: var(--muted); font-weight: 800; }
.nav-link:hover { color: var(--ink); }
.card { --bs-card-border-color: var(--line); --bs-card-border-radius: var(--r-3); --bs-card-bg: var(--paper); }
.progress { --bs-progress-bg: #e1eef6; --bs-progress-border-radius: 999px; --bs-progress-bar-bg: var(--sky); }

.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.pill--ok { background: var(--leaf-soft); color: var(--leaf-deep); }
.pill--wait { background: var(--sun-soft); color: #8a6200; }
.pill--info { background: var(--sky-soft); color: var(--sky-deep); }
.pill--bad { background: var(--berry-soft); color: var(--berry-deep); }
.pill--mute { background: #edf3f6; color: #6b818a; }
.pill--dark { background: var(--ink); color: #fff; }
.pill--coral { background: var(--coral); color: #fff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9db0b8; flex: 0 0 auto; }
.dot.on { background: var(--leaf); box-shadow: 0 0 0 3px rgba(31, 163, 90, .22); }
.dot.off { background: var(--berry); box-shadow: 0 0 0 3px rgba(224, 64, 90, .18); }

/* ------------------------------------------------------------------ khung trang con */
.pagehead { position: relative; overflow: hidden; background: linear-gradient(180deg, #cdeeff 0%, #e6f6ff 70%, var(--bg) 100%); }
.pagehead::after { content: ""; position: absolute; right: max(2vw, calc((100vw - var(--wrap)) / 2)); top: 18px; width: 300px; height: 120px; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120'%3E%3Cpath d='M10 112 Q150 -40 290 104' fill='none' stroke='%23ff6a3d' stroke-width='4' stroke-linecap='round' stroke-dasharray='0.1 14'/%3E%3Ccircle cx='290' cy='104' r='7' fill='%23ff6a3d'/%3E%3C/svg%3E"); }
.pagehead .wrap { position: relative; z-index: 1; padding-top: 2.2rem; padding-bottom: 1.6rem; }
.pagehead h1 { margin: 0; }
.pagehead p { color: var(--ink-2); margin: .5rem 0 0; max-width: 60ch; font-weight: 600; }
@media (max-width: 760px) { .pagehead::after { display: none; } }
.page-body { padding-top: 1.25rem; padding-bottom: 3rem; }
.sheet, .block, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: 0 4px 0 var(--ledge); }
.sheet { padding: clamp(1rem, 2.5vw, 1.75rem); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.block-head h2, .block-head h3 { margin: 0; font-size: 1.15rem; }
.block-body { padding: 1.1rem 1.25rem; }
.section { padding: 2.5rem 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--muted); font-weight: 600; }
.section-link { font-weight: 800; text-decoration: none; white-space: nowrap; color: var(--coral-deep); }
.section-link:hover { color: var(--ink); }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--muted); font-weight: 600; }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; margin-bottom: .25rem; }
.panel { overflow: hidden; }
.panel-head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); background: none; }
.panel-title { margin: 0; font-size: 1.15rem; }
.panel-body { padding: 1.1rem 1.25rem; }
.sheet .panel { box-shadow: none; }
.sheet .text-white:not(.btn):not(.badge) { color: var(--ink) !important; }
/* trang cũ dùng khối nền tối: đổi sang nền sáng cho hợp giao diện */
.sheet .bg-dark, .sheet .table-dark, .sheet .bg-secondary { background-color: var(--bg) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.sheet .bg-dark *, .sheet .table-dark * { color: inherit; }
.sheet .bg-dark .form-control, .sheet .bg-dark input { background-color: var(--paper) !important; color: var(--ink) !important; }
.empty-note { color: var(--muted); }

/* ------------------------------------------------------------------ đầu trang chủ: chiến trường ban ngày */
.hero { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #a6dcff 0%, #c9ecff 45%, #e9f7ff 82%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; align-items: center; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero-status { display: inline-flex; align-items: center; gap: .55rem; padding: .38rem .85rem .38rem .7rem; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--ledge); font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.hero-status b { color: var(--ink); font-family: var(--font-display); }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.02; color: var(--ink); margin: 1.1rem 0 1rem; letter-spacing: -.045em; }
.hero-lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-2); font-weight: 600; max-width: 44ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0 0; }
.hero-facts div { padding: .55rem .9rem; border-radius: var(--r-2); background: rgba(255, 255, 255, .75); border: 1px solid rgba(255, 255, 255, .95); }
.hero-facts dt { font-size: .76rem; color: var(--muted); font-weight: 700; }
.hero-facts dd { margin: .05rem 0 0; font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .45rem; }
.hero-facts a { color: var(--ink); }
.copy-btn { border: 0; background: var(--sky-soft); color: var(--sky-deep); border-radius: 8px; font-size: .74rem; font-family: var(--font-body); font-weight: 800; padding: .12rem .5rem; cursor: pointer; }
.copy-btn:hover { background: var(--sky); color: #fff; }
.hero-scene { margin: 0; position: relative; }
.hero-scene svg { width: 100%; height: auto; display: block; overflow: visible; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: .5rem; }
  .hero-scene { order: -1; max-width: 520px; margin: 0 auto; }
}

/* ------------------------------------------------------------------ sự kiện */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.1rem; }
.ev { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; box-shadow: 0 4px 0 var(--ledge); }
.ev-banner { position: relative; min-height: 124px; display: flex; align-items: flex-end; padding: 1rem 1.15rem; color: #fff; overflow: hidden; background: linear-gradient(135deg, #39a8f2, #1679c9); }
.ev-banner::before { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 85% 120%, rgba(255, 255, 255, .13) 0 8deg, transparent 8deg 16deg); }
.ev-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-banner.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 30, 36, 0) 35%, rgba(10, 30, 36, .7)); }
.ev-banner--exp { background: linear-gradient(135deg, #3ccf7d, #149150); }
.ev-banner--xu { background: linear-gradient(135deg, #ffb52e, #f0700f); }
.ev-banner--drop { background: linear-gradient(135deg, #a874ff, #6a35d9); }
.ev-fx { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: 1; letter-spacing: -.04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.ev-fx small { display: block; font-size: .95rem; font-weight: 700; letter-spacing: 0; color: rgba(255, 255, 255, .92); margin-top: .3rem; }
.ev-state { position: absolute; top: .8rem; right: .8rem; z-index: 1; background: #fff !important; }
.ev-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.ev-title { margin: 0; font-size: 1.15rem; }
.ev-time { font-size: .875rem; color: var(--muted); font-weight: 700; }
.ev-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.ev-text { color: var(--ink-2); font-size: .95rem; white-space: pre-line; }
.ev--ended { opacity: .75; }
.ev--ended .ev-banner { filter: grayscale(.85); }
.ev-list { display: grid; gap: 1.1rem; }
.ev-list .ev { flex-direction: row; }
.ev-list .ev-banner { flex: 0 0 300px; min-height: 164px; }
.ev-list .ev-fx { font-size: 2.7rem; }
.ev-list .ev-body { padding: 1.2rem 1.4rem; }
.ev-list .ev-title { font-size: 1.3rem; }
@media (max-width: 760px) { .ev-list .ev { flex-direction: column; } .ev-list .ev-banner { flex-basis: auto; min-height: 120px; } .ev-list .ev-fx { font-size: 2.1rem; } }
.powerbar { position: relative; height: 14px; border-radius: 999px; background: #e1eef6; overflow: hidden; box-shadow: inset 0 2px 0 rgba(18, 48, 58, .06); }
.powerbar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #2fc46c 0%, #ffd23c 55%, #ff8a2a 82%, #f0445a 100%); background-size: var(--full, 100%) 100%; }
.powerbar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(255, 255, 255, .8) calc(10% - 2px) 10%); }
.powerbar-label { display: flex; justify-content: space-between; gap: .75rem; font-size: .82rem; color: var(--muted); font-weight: 700; margin-top: .35rem; }
.powerbar-label b { color: var(--ink); font-family: var(--font-display); }

/* ------------------------------------------------------------------ phẩm chất trang bị: Tinh luyện, Bạch kim, Kim cương, Hoàng kim */
.slot { position: relative; display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: #fff; border: 2px solid #cfe3ee; box-shadow: 0 3px 0 #c3dbe8; }
.slot img { position: relative; z-index: 1; width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.slot .q { position: absolute; z-index: 2; right: -6px; bottom: -8px; min-width: 24px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--font-display); font-size: .72rem; font-weight: 700; line-height: 20px; text-align: center; }
/* Bạc */
.slot.r1 { border-color: #b4c0ca; background: linear-gradient(#ffffff, #f2f5f7); box-shadow: 0 3px 0 #94a3b0; }
/* Vàng */
.slot.r2 { border-color: #f2b705; background: linear-gradient(#fffdf3, #fff3c9); box-shadow: 0 3px 0 #c99400, 0 0 12px rgba(242, 183, 5, .35); }
/* Bạch kim */
.slot.r3 { border: 3px solid transparent; background: linear-gradient(#ffffff, #f1f5f8) padding-box, linear-gradient(135deg, #ffffff 0%, #aebbc6 30%, #f6f9fb 52%, #8796a3 78%, #e7edf2 100%) border-box;
  box-shadow: 0 3px 0 #8796a3, 0 0 18px rgba(170, 186, 200, .9); }
/* Kim cương */
.slot.r4 { border: 3px solid transparent; background: linear-gradient(#f4feff, #dff8ff) padding-box, linear-gradient(135deg, #e9fdff 0%, #3cc9f2 32%, #c9f6ff 55%, #0f9cd0 80%, #b4f0ff 100%) border-box;
  box-shadow: 0 3px 0 #0f8cbb, 0 0 20px rgba(60, 201, 242, .7); }
.slot.r4::after { content: ""; position: absolute; z-index: 2; top: -5px; right: -5px; width: 14px; height: 14px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 3px #3cc9f2); animation: twinkle 2.2s ease-in-out infinite; }
/* Hoàng kim: cao nhất */
.slot.r5 { border: 3px solid transparent; background: linear-gradient(#fff6ef, #ffe1d6) padding-box, conic-gradient(from var(--spin, 0deg), #ffe27a, #d61f35, #8e0f22, #ffd84a, #c41e3a, #ffefb0, #ffe27a) border-box;
  box-shadow: 0 3px 0 #8e0f22, 0 0 28px rgba(214, 31, 53, .55), 0 0 10px rgba(255, 210, 70, .8); animation: spin 3s linear infinite; }
.slot.r5::before { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 12px; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) no-repeat; background-size: 260% 100%; animation: shine 2.6s ease-in-out infinite; mix-blend-mode: soft-light; }
/* đồ thường đã cường hóa cao */
.slot.rx { border-color: #3f86f2; box-shadow: 0 3px 0 #2c6bd0, 0 0 12px rgba(63, 134, 242, .35); }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes shine { 0%, 35% { background-position: 130% 0; } 75%, 100% { background-position: -40% 0; } }
@keyframes twinkle { 0%, 100% { transform: scale(.55) rotate(0); opacity: .55; } 50% { transform: scale(1.05) rotate(45deg); opacity: 1; } }
/* Cấp đập đồ +N: góc trên bên phải ô đồ; +10..+15 xanh, +16 lửa cháy */
.slot .lv { position: absolute; z-index: 4; top: -8px; right: -8px; min-width: 24px; padding: 0 5px; border-radius: 8px; background: var(--ink); color: #ffd84a; border: 2px solid #fff;
  font-family: var(--font-display); font-size: .72rem; font-weight: 800; line-height: 16px; text-align: center; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.slot .lv.lv-hi { color: #8fd3ff; }
.slot .lv.lv-max { color: #fff8d6; border-color: #ffd84a; background: linear-gradient(0deg, #7a0d1c 0%, #d61f35 45%, #ff7a00 100%);
  text-shadow: 0 0 3px #ff4d00, 0 1px 0 #6b0a17; box-shadow: 0 0 10px rgba(255, 106, 0, .75); animation: lvglow .9s ease-in-out infinite alternate; }
.slot .lv.lv-max::before, .slot .lv.lv-max::after { content: ""; position: absolute; z-index: -1; bottom: 55%; pointer-events: none; border-radius: 50% 50% 35% 35%; transform-origin: 50% 100%; }
.slot .lv.lv-max::before { left: 1px; width: 10px; height: 15px; background: radial-gradient(ellipse at 50% 85%, #fff2a8 0 22%, #ffb21a 40%, #ff4d00 70%, transparent 72%); animation: flame .42s ease-in-out infinite alternate; }
.slot .lv.lv-max::after { right: 2px; width: 9px; height: 12px; background: radial-gradient(ellipse at 50% 85%, #ffe27a 0 20%, #ff8a00 45%, #d61f35 70%, transparent 72%); animation: flame .36s ease-in-out infinite alternate-reverse; }
.slot.has-lv.r4::after { right: auto; left: -5px; }
.slot-sm .lv { top: -7px; right: -8px; min-width: 20px; padding: 0 3px; font-size: .62rem; line-height: 13px; border-width: 1.5px; border-radius: 6px; }
.slot-sm .lv.lv-max::before { width: 8px; height: 11px; }
.slot-sm .lv.lv-max::after { width: 7px; height: 9px; }
@keyframes flame { from { transform: scale(.85, .8) skewX(-6deg); opacity: .8; } to { transform: scale(1.05, 1.18) skewX(6deg); opacity: 1; } }
@keyframes lvglow { from { box-shadow: 0 0 6px rgba(255, 106, 0, .55); } to { box-shadow: 0 0 13px rgba(255, 160, 0, .95); } }
.slot-sm { width: 36px; height: 36px; border-radius: 11px; border-width: 2px; box-shadow: 0 2px 0 #c3dbe8; flex: 0 0 auto; }
.slot-sm img { width: 24px; height: 24px; }
.slot-sm.r1 { box-shadow: 0 2px 0 #94a3b0; } .slot-sm.r2 { box-shadow: 0 2px 0 #c99400; } .slot-sm.rx { box-shadow: 0 2px 0 #2c6bd0; }
.slot-sm.r3, .slot-sm.r4, .slot-sm.r5 { border-width: 2px; }
.slot-sm.r3 { box-shadow: 0 2px 0 #8796a3, 0 0 8px rgba(170, 186, 200, .85); }
.slot-sm.r4 { box-shadow: 0 2px 0 #0f8cbb, 0 0 9px rgba(60, 201, 242, .6); }
.slot-sm.r5 { box-shadow: 0 2px 0 #8e0f22, 0 0 12px rgba(214, 31, 53, .55); }
.slot-sm.r4::after { width: 9px; height: 9px; top: -4px; right: -4px; }
.slot-sm.r5::before { border-radius: 8px; }
.tier { display: inline-block; margin-left: .35rem; padding: .02rem .45rem; border-radius: 6px; font-family: var(--font-body); font-size: .7rem; font-weight: 800; vertical-align: .12em; white-space: nowrap; }
.tier-1 { background: linear-gradient(135deg, #ffffff, #dfe5ea); color: #4a5866; box-shadow: inset 0 0 0 1px #b4c0ca; }
.tier-2 { background: #fff1c2; color: #7a5600; box-shadow: inset 0 0 0 1px #f2b705; }
.tier-3 { background: linear-gradient(135deg, #ffffff, #e2e8ee 55%, #c6d0d9); color: #3e4c58; box-shadow: inset 0 0 0 1px #9aa8b4; }
.tier-4 { background: linear-gradient(135deg, #ecfdff, #a7ecfa); color: #05607d; box-shadow: inset 0 0 0 1px #7fdcf2; }
.tier-5 { background: linear-gradient(135deg, #e0283f, #9b0f24); color: #ffe27a; box-shadow: inset 0 0 0 1px #ffd84a; }

/* ------------------------------------------------------------------ shop gói */
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .9rem; border-radius: 999px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 3px 0 var(--ledge); font-weight: 800; font-size: .9rem; text-decoration: none; }
a.chip:hover { color: var(--ink); background: var(--sky-soft); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 3px 0 #08181e; }
.chip .n { font-family: var(--font-display); font-size: .78rem; opacity: .65; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; }
.pack { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; box-shadow: 0 4px 0 var(--ledge); }
.pack-loot { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; min-height: 140px; padding: 1.9rem 1rem 1.4rem; overflow: hidden;
  background: radial-gradient(80% 90% at 50% 100%, #ffffff 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #bfe6ff 0%, #e2f4ff 100%); }
.pack-loot::before { content: ""; position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg at 50% 62%, rgba(255, 255, 255, .55) 0 7deg, transparent 7deg 18deg); pointer-events: none; }
.pack-loot.t5 { background: radial-gradient(80% 90% at 50% 100%, #fff4d6 0%, rgba(255, 244, 214, 0) 70%), linear-gradient(180deg, #f2a0a0 0%, #ffe9cf 100%); }
.pack-loot.t4 { background: radial-gradient(80% 90% at 50% 100%, #f2feff 0%, rgba(242, 254, 255, 0) 70%), linear-gradient(180deg, #a9ecfb 0%, #e3fbff 100%); }
.pack-loot.t3 { background: radial-gradient(80% 90% at 50% 100%, #ffffff 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #d3dde6 0%, #f3f6f9 100%); }
.pack-loot > * { position: relative; }
.pack-loot.has-img { padding: 0; min-height: 0; aspect-ratio: 16 / 8; }
.pack-loot.has-img::before { display: none; }
.pack-loot.has-img img { width: 100%; height: 100%; object-fit: cover; }
.pack-loot .more { color: var(--ink-2); font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.pack-badge { position: absolute !important; top: .75rem; left: .75rem; padding: .2rem .65rem; border-radius: 999px; background: var(--coral); color: #fff; font-weight: 800; font-size: .78rem; box-shadow: 0 2px 0 var(--coral-deep); }
.pack-cat { position: absolute !important; top: .75rem; right: .75rem; padding: .18rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--ink-2); font-size: .75rem; font-weight: 800; }
.pack-body { padding: 1rem 1.15rem .4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.pack-name { margin: 0; font-size: 1.2rem; }
.pack-desc { color: var(--muted); font-size: .92rem; font-weight: 600; margin: 0; }
.pack-list { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .5rem; }
.pack-list li { display: flex; align-items: center; gap: .6rem; font-size: .93rem; min-width: 0; }
.pack-list .nm { min-width: 0; flex: 1; line-height: 1.3; }
.pack-list .nm b { font-weight: 800; }
.pack-list .nm small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.pack-list .qt { font-family: var(--font-display); font-weight: 700; color: var(--ink); white-space: nowrap; }
.pack-list .r1 + .nm b { color: #5b6976; } .pack-list .r2 + .nm b { color: #9a6c00; } .pack-list .r3 + .nm b { color: #46545f; } .pack-list .r4 + .nm b { color: #0a7fa3; } .pack-list .r5 + .nm b { color: #b0182e; } .pack-list .rx + .nm b { color: #2563d0; }
.pack-foot { padding: .9rem 1.15rem 1.15rem; border-top: 2px dashed var(--line); margin-top: .6rem; display: grid; gap: .6rem; }
.pack-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.price { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.price-luong { color: #c07b00; } .price-xu { color: var(--sky-deep); } .price-vnd { color: var(--coral-deep); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .95rem; font-weight: 700; }
.pack-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.pack--closed .pack-loot { filter: saturate(.35); }
.buy-sum { display: grid; gap: .5rem; padding: .9rem 1rem; border-radius: var(--r-2); background: var(--bg); }
.buy-sum div { display: flex; justify-content: space-between; gap: 1rem; }
.buy-sum dt { color: var(--muted); font-weight: 700; }
.buy-sum dd { margin: 0; font-weight: 800; text-align: right; }
.pay-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: start; }
.pay-panel dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 0; }
.pay-panel dt { color: var(--muted); font-weight: 700; }
.pay-panel dd { margin: 0; font-weight: 800; word-break: break-word; }
.pay-panel .code { font-family: var(--font-display); font-size: 1.15rem; color: var(--coral-deep); }
.pay-qr { width: 200px; border-radius: var(--r-2); border: 1px solid var(--line); background: #fff; }
@media (max-width: 640px) { .pay-panel { grid-template-columns: 1fr; } .pay-qr { justify-self: center; } }

/* ------------------------------------------------------------------ trang chủ */
.home-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .home-cols { grid-template-columns: 1fr; } }
.news { list-style: none; margin: 0; padding: .3rem 0; }
.news li + li { border-top: 1px solid var(--line); }
.news a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: center; padding: .8rem 1.25rem; color: var(--ink); text-decoration: none; }
.news a:hover { background: #f6fbfe; }
.news-date { display: grid; place-items: center; width: 54px; height: 54px; border-radius: var(--r-2); background: var(--sky-soft); color: var(--sky-deep); font-family: var(--font-display); font-weight: 800; line-height: 1.05; text-align: center; font-size: 1.15rem; }
.news-date small { display: block; font-size: .7rem; font-weight: 700; font-family: var(--font-body); }
.news-title { font-weight: 800; color: var(--ink); display: block; }
.news-meta { font-size: .82rem; color: var(--muted); font-weight: 600; }
.toplist { list-style: none; margin: 0; padding: .4rem 0; counter-reset: top; }
.toplist li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .5rem 1.25rem; }
.toplist li::before { counter-increment: top; content: counter(top); display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 10px; font-family: var(--font-display); font-weight: 800; background: var(--bg); color: var(--muted); }
.toplist li:nth-child(1)::before { background: #ffe8a3; color: #8a5a00; } .toplist li:nth-child(2)::before { background: #e3edf2; color: #4c6670; } .toplist li:nth-child(3)::before { background: #ffd9c4; color: #93451a; }
.toplist .who { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toplist .val { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: st; }
.steps3 li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .8rem; align-items: start; }
.steps3 li::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--coral); color: #fff; font-family: var(--font-display); font-weight: 800; box-shadow: 0 3px 0 var(--coral-deep); }
.steps3 strong { display: block; color: var(--ink); }
.steps3 span { color: var(--muted); font-size: .93rem; font-weight: 600; }
.rank-no { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; border-radius: 10px; font-family: var(--font-display); font-weight: 800; background: var(--bg); color: var(--ink-2); }
.rank-no.g1 { background: #ffe8a3; color: #8a5a00; } .rank-no.g2 { background: #e3edf2; color: #4c6670; } .rank-no.g3 { background: #ffd9c4; color: #93451a; }

/* ------------------------------------------------------------------ tài khoản */
.profile { padding: 1.25rem; display: grid; gap: 1.1rem; }
.profile-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 0; }
.profile-id h2 { margin: 0; font-size: 1.5rem; }
.avatar-lg { width: 58px; height: 58px; border-radius: 18px; font-size: 1.55rem; box-shadow: 0 4px 0 var(--coral-deep); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: 0; }
.tiles div { padding: .75rem .9rem; border-radius: var(--r-2); background: var(--bg); }
.tiles dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.tiles dd { margin: .15rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); overflow-wrap: anywhere; }
.kv { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.kv dt { font-size: .8rem; color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 800; }
.kv dd a { font-size: .85rem; margin-left: .35rem; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.1rem; }
.char { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: 0 4px 0 var(--ledge); padding: 1.1rem 1.2rem; display: grid; gap: .9rem; align-content: start; }
.char--on { border: 2px solid var(--coral); box-shadow: 0 4px 0 var(--coral-deep); }
.char-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.char-head h3 { margin: 0; font-size: 1.25rem; }
.char-level { margin-left: auto; color: var(--muted); font-size: .9rem; font-weight: 700; }
.char-level b { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.char-stats { display: grid; margin: 0; }
.char-stats div { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-bottom: 1px dashed var(--line); }
.char-stats div:last-child { border-bottom: 0; }
.char-stats dt { color: var(--muted); font-weight: 700; }
.char-stats dd { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.char-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.char-equips { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.char .powerbar-label span:last-child { text-align: right; }

/* ------------------------------------------------------------------ chân trang */
.sitefoot { background: var(--paper); border-top: 1px solid var(--line); color: var(--ink-2); margin-top: 3rem; font-size: .93rem; font-weight: 600; }
.sitefoot .wrap { padding-top: 2.4rem; padding-bottom: 1.6rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
.foot-grid h2 { font-size: 1rem; margin: 0 0 .7rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-grid a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.foot-grid a:hover { color: var(--coral-deep); }
.foot-brand p { margin: .7rem 0 0; max-width: 40ch; color: var(--muted); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.age-rule { display: flex; align-items: center; gap: .5rem; }
.age-rule img { height: 18px; width: auto; border-radius: 4px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ hộp đăng nhập / đăng ký */
.auth .modal-dialog { max-width: 440px; }
.auth-head { text-align: center; margin-bottom: 1.1rem; }
.auth-head img { height: 56px; width: auto; margin-bottom: .5rem; }
.auth-head h2 { margin: 0; font-size: 1.5rem; }
.auth-head p { margin: .3rem 0 0; color: var(--muted); font-size: .93rem; font-weight: 600; }
.auth-form { display: grid; gap: .85rem; }
.auth-foot { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); text-align: center; font-size: .93rem; color: var(--muted); font-weight: 600; }
.auth-alt { padding: .7rem .85rem; border-radius: var(--r-2); background: var(--leaf-soft); color: var(--leaf-deep); font-size: .88rem; font-weight: 700; }

#NotiflixLoadingWrap { position: fixed; inset: 0; z-index: 4000; display: grid !important; place-items: center; background: rgba(238, 247, 252, .7) !important; backdrop-filter: blur(2px); }
#NotiflixLoadingWrap.hide { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
