/* ===== fonts (Google Sans, tu host; demo thay bang Be Vietnam Pro) ===== */
/*FONTS-START*/
@font-face { font-family: "Google Sans"; font-weight: 400; font-display: swap; src: url("/app/fonts/google-sans-vietnamese-400.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: "Google Sans"; font-weight: 400; font-display: swap; src: url("/app/fonts/google-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Google Sans"; font-weight: 500; font-display: swap; src: url("/app/fonts/google-sans-vietnamese-500.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: "Google Sans"; font-weight: 500; font-display: swap; src: url("/app/fonts/google-sans-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Google Sans"; font-weight: 700; font-display: swap; src: url("/app/fonts/google-sans-vietnamese-700.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: "Google Sans"; font-weight: 700; font-display: swap; src: url("/app/fonts/google-sans-latin-700.woff2") format("woff2"); }
:root { --font: "Google Sans", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; }
/*FONTS-END*/

/* ===== tokens: rung dem, xanh ngoc, ho phach ===== */
:root {
  --bg: #0a1710; --bg2: #0e1e15; --surface: #122419; --raised: #182f22; --raised2: #1e3a2a;
  --line: #24402f; --line2: #2f5a40; --text: #e9f1ec; --muted: #97b0a2; --muted2: #6f8a7c;
  --green: #34d399; --green2: #22c55e; --green3: #86efac; --green-deep: #15803d;
  --amber: #f5b53f; --amber2: #ffd479; --red: #f0655f; --blue: #6cc4f0; --violet: #c4b5fd;
  --r-lg: 22px; --r: 16px; --r-sm: 11px; --shadow: 0 14px 40px rgba(0, 0, 0, .35); --shadow-sm: 0 4px 14px rgba(0, 0, 0, .25);
  --container: 2200px;   /* 0.9.67: full chieu ngang man hinh (chu server 21/09: "dung de trong 2 ben"); tran 2200 chi de khong keo qua dai tren man hinh sieu rong */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(1100px 520px at 12% -8%, rgba(34, 197, 94, .16), transparent 60%), radial-gradient(800px 500px at 105% 8%, rgba(20, 120, 80, .22), transparent 55%), var(--bg); }
a { color: var(--green3); text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ===== top bar ===== */
.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(10, 23, 16, .78); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.brand img { height: 40px; width: 40px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); }
.nav { display: flex; gap: 2px; margin-left: 10px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }   /* 0.9.67: hep thi cuon ngang, khong tran */
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; }
.topbar .in > .pill, .topbar .in > .lang, .topbar .in > #userBox { flex: none; }
#userBox .userchip .bones { white-space: nowrap; }
.nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; transition: .15s; }
.nav a:hover { color: var(--text); background: var(--raised); }
.nav a.active { color: #06180d; background: var(--green); font-weight: 700; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.pill.on { color: var(--green3); border-color: var(--line2); }
.pill.off { color: var(--red); border-color: #5a2a2a; }
.pill.live { color: var(--amber2); border-color: #5a4a20; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.on .dot { box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); } 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, .05); } }
@media (prefers-reduced-motion: reduce) { .pill.on .dot { animation: none; } * { transition: none !important; } }
.lang { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 11px; cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .04em; }
.lang:hover { color: var(--text); border-color: var(--line2); }
.userchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.userchip:hover { border-color: var(--line2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--raised); border: 2px solid var(--line2); }
.avatar.lg { width: 72px; height: 72px; border-width: 3px; }

/* ===== buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line2); background: var(--raised); color: var(--text); cursor: pointer; font-weight: 600; font-size: 14px; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--green); transform: translateY(-1px); }
.btn:focus-visible, .lang:focus-visible, input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.pri { background: linear-gradient(135deg, var(--green), var(--green-deep)); border-color: transparent; color: #04140a; font-weight: 700; }
.btn.amber { background: linear-gradient(135deg, var(--amber2), var(--amber)); border-color: transparent; color: #1a1200; font-weight: 700; }
.btn.danger { background: #3a1818; border-color: #5a2a2a; color: #fecaca; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }

/* ===== layout ===== */
main { max-width: var(--container); margin: 0 auto; padding: 18px 20px 80px; display: grid; gap: 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-home { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }   /* 0.9.67: the cao theo noi dung, khong keo dai de lo khoang trong */
.g-side { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: start; }
.g-side-r { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1000px) { .g3, .g4, .g-home { grid-template-columns: 1fr 1fr; } .g-side, .g-side-r { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g3, .g4, .g-home { grid-template-columns: 1fr; } .nav { display: none; } .mobile-nav { display: flex !important; } main { padding-bottom: 96px; } }
/* 0.9.67: dien thoai - topbar gon: logo + ten ngan, pill server chi con cham, chip xuong; khong con tran ngang */
@media (max-width: 640px) { .topbar .in { gap: 8px; padding: 8px 12px; } .brand { font-size: 15px; gap: 6px; } .brand img { width: 32px; height: 32px; } #pillServer span { display: none; } #pillServer { padding: 6px 8px; gap: 0; } .lang { padding: 4px 8px; } .userchip { padding: 3px 8px 3px 3px; } .userchip .avatar { width: 24px; height: 24px; } }
@media (max-width: 480px) { #brandName { display: none; } .brand::after { content: none; } .userchip .avatar { display: none; } .userchip { padding: 5px 10px; } }

.card { background: linear-gradient(180deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-width: 0; }
.card > .body { flex: 1; }
.card h2 { font-size: 19px; letter-spacing: -.01em; }
.card h3, .eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }   /* 0.9.67: hep thi nut/pill xuong hang, khong tran */
.card .head > .row { min-width: 0; max-width: 100%; }
.card .head .pill, .card .head .badge, .empty .badge, .empty .pill { white-space: normal; max-width: 100%; text-align: left; }
.card .head > div { min-width: 0; max-width: 100%; }   /* dien thoai (.head xep doc, align flex-start): khong de tieu de/sub tran ra ngoai the */
.card .head .sub { max-width: min(62ch, 100%); overflow-wrap: break-word; }
.card .foot { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bones { color: var(--amber2); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== hero ===== */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line2); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 28px; align-items: center; padding: 30px 32px; box-shadow: var(--shadow); background: #0c1d13 url("/app/hero.jpg") center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 20, 13, .96) 0%, rgba(8, 20, 13, .82) 45%, rgba(8, 20, 13, .35) 100%), linear-gradient(0deg, rgba(8, 20, 13, .9), transparent 55%); }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.02em; margin: 10px 0 12px; }
.hero h1 em { font-style: normal; color: var(--green3); }
.hero p { max-width: 64ch; color: #cfe0d6; margin: 0 0 18px; font-size: 15.5px; }
.hero .ctas { display: flex; gap: 10px; flex-wrap: wrap; }
/* 0.9.67: 4 o tinh nang duoi nut - lap cho trong ben trai hero, moi o la link toi muc do */
.hero .lead { min-width: 0; }
.hero .btn.dl { font-weight: 800; }
.hero .feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
@media (min-width: 1500px) { .hero .feats { grid-template-columns: repeat(4, 1fr); } }   /* man hinh rong: 4 o mot hang; hep hon: 2x2 (khong bao gio le 1 o) */
.hero .feat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: rgba(12, 29, 19, .78); border: 1px solid var(--line2); color: inherit; text-decoration: none; min-width: 0; transition: transform .12s, border-color .12s; }
a.hero-feat:hover, .hero a.feat:hover { border-color: var(--green3); transform: translateY(-1px); }
.hero .feat .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--raised); display: grid; place-items: center; font-size: 19px; flex: none; }
.hero .feat > div:last-child { min-width: 0; }
.hero .feat b { display: block; font-size: 13.5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .feat span { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
@media (max-width: 520px) { .hero .feats { grid-template-columns: 1fr; } }
.servercard { align-self: center; width: 100%; max-width: 640px; justify-self: end; background: rgba(12, 29, 19, .82); backdrop-filter: blur(8px); border: 1px solid var(--line2); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.servercard .name { font-weight: 700; font-size: 16px; }
.servercard .cap { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.servercard .ip { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 6px 6px 12px; min-width: 0; }
.servercard .ip code { flex: 1; min-width: 0; font-size: 13.5px; color: var(--green3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }
.servercard .ip .btn { flex: none; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 22px; } }

/* ===== stat tiles ===== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.stat .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--raised); display: grid; place-items: center; font-size: 20px; flex: none; }
.stat b { display: block; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ===== lists / tables ===== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--raised); color: var(--muted); }
.rank.r1 { background: linear-gradient(135deg, #ffd479, #d99a1b); color: #1a1200; } .rank.r2 { background: #cbd5e1; color: #111; } .rank.r3 { background: #d9a066; color: #1a0f00; }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; } .who > * { min-width: 0; }
/* 0.9.67: ten / SteamID duoc xuong dong -> o bang co the co lai theo the (truoc: nowrap lam bang rong hon the, nut cuoi hang tran ra ngoai) */
.who span { overflow-wrap: anywhere; } .who .mono { overflow-wrap: anywhere; word-break: break-all; }
.who h2, .who h3 { overflow-wrap: anywhere; }
td .mono, .mono.muted { overflow-wrap: anywhere; }
td.num.small, td.num.muted { white-space: nowrap; }
.tscroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* 0.9.67: bang rong hon the -> cuon ngang trong the (JS tu boc moi <table>) */
.tscroll > table { min-width: 100%; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.item .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; font-size: 22px; flex: none; }
.item .tx { flex: 1; min-width: 0; } .item .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .tx span { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed { display: flex; flex-direction: column; }
.feed .ev { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; min-width: 0; }
.feed .ev:last-child { border-bottom: 0; }
.feed .ev .t { color: var(--muted2); font-size: 12px; font-variant-numeric: tabular-nums; }
.feed .ev .m { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: var(--raised); }
.bar { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-deep), var(--green3)); }
.bar.amber i { background: linear-gradient(90deg, #b07a12, var(--amber2)); }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; outline: none; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.field { display: grid; gap: 6px; } .field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button { background: var(--raised); border: 1px solid var(--line); color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; }
.tabs button.active { color: #06180d; background: var(--green3); border-color: transparent; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); font-weight: 600; white-space: nowrap; }
.badge.ok { color: var(--green3); border-color: var(--line2); } .badge.warn { color: var(--amber2); border-color: #5a4a20; } .badge.bad { color: var(--red); border-color: #5a2a2a; } .badge.info { color: var(--blue); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line2); border-radius: var(--r); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--raised2); border: 1px solid var(--line2); border-radius: 14px; padding: 12px 18px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; font-weight: 500; }
.toast.err { border-color: #7a2e2e; background: #3a1818; }

/* ===== earn strip ===== */
.earn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
/* 0.9.67: o cuoi keo dai het hang de khong con o trong (6 o = 2x3; 5 o = 3 + 2 rong; 4 o = 3 + 1 rong) */
.earn .e:last-child:nth-child(3n+1) { grid-column: span 3; } .earn .e:last-child:nth-child(3n+2) { grid-column: span 2; }
@media (max-width: 900px) { .earn { grid-template-columns: 1fr 1fr; } .earn .e:last-child:nth-child(3n+1), .earn .e:last-child:nth-child(3n+2) { grid-column: auto; } .earn .e:last-child:nth-child(odd) { grid-column: span 2; } }
@media (max-width: 520px) { .earn { grid-template-columns: 1fr; } .earn .e:last-child:nth-child(odd) { grid-column: auto; } }
.earn .e { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.earn .e .ic { font-size: 24px; } .earn .e b { display: block; font-size: 15px; } .earn .e span { color: var(--muted); font-size: 12.5px; }
.cmds { display: grid; gap: 6px; } .cmds div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); } .cmds div:last-child { border-bottom: 0; } .cmds code { color: var(--green3); font-family: ui-monospace, Consolas, monospace; }

/* ===== profile ===== */
.identity { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
@media (max-width: 700px) { .identity { grid-template-columns: 1fr; } }
.identity .name { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.balance-big { text-align: right; } .balance-big b { display: block; font-size: 34px; color: var(--amber2); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; } .balance-big span { color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kv .k { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; } .kv .k b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; } .kv .k span { color: var(--muted); font-size: 12px; }
.dino { display: grid; gap: 10px; } .dino .sp { font-size: 22px; font-weight: 700; }

/* ===== garage / shop cards ===== */
.slot { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--raised); min-height: 178px; display: flex; flex-direction: column; gap: 9px; }
.slot.empty { border-style: dashed; border-color: var(--line2); justify-content: center; align-items: center; color: var(--muted); text-align: center; background: transparent; }
.slot .sp { font-size: 20px; font-weight: 700; }
.shopcard { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--raised); display: flex; flex-direction: column; gap: 10px; min-height: 190px; }
.shopcard .ic { width: 50px; height: 50px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 28px; }
.shopcard .nm { font-size: 17px; font-weight: 700; }
.shopcard .ds { color: var(--muted); font-size: 13.5px; flex: 1; }

/* ===== map ===== */
.mapwrap { position: relative; width: 100%; aspect-ratio: 1000/1003; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); background: #0b1d12; cursor: grab; }
.mapwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.legend { display: grid; gap: 6px; } .legend div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; background: var(--raised); }

/* ===== mobile nav / footer ===== */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(10, 23, 16, .94); border-top: 1px solid var(--line); justify-content: space-around; padding: 8px 4px; z-index: 40; backdrop-filter: blur(10px); }
.mobile-nav { overflow-x: auto; scrollbar-width: none; } .mobile-nav::-webkit-scrollbar { display: none; } .mobile-nav a { flex: 1 0 auto; min-width: 56px; padding: 0 4px; white-space: nowrap; }
.mobile-nav a { color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mobile-nav a.active { color: var(--green3); } .mobile-nav a i { font-style: normal; font-size: 18px; }
footer { border-top: 1px solid var(--line); margin-top: 10px; }
footer .in { max-width: var(--container); margin: 0 auto; padding: 22px 20px 40px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted2); font-size: 13px; }
footer a { color: var(--muted); }
.announce { border-left: 4px solid var(--amber); }
.login-wall { max-width: 560px; margin: 30px auto; text-align: center; padding: 34px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.podium .p { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.podium .p.first { border-color: #7a5a14; background: linear-gradient(180deg, rgba(245, 181, 63, .12), var(--raised)); }
@media (max-width: 640px) { .podium { grid-template-columns: 1fr; } }

/* skin editor */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sw { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); cursor: pointer; }
.sw input[type="color"] { width: 44px; height: 44px; border: none; background: none; padding: 0; border-radius: 10px; cursor: pointer; }
.sw input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; } .sw input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line2); border-radius: 10px; }
.preview-strip { display: flex; height: 56px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.preview-strip i { flex: 1; display: block; }

/* skin 3D viewer */
.skin-viewport { position: relative; height: 460px; border-radius: var(--r); border: 1px solid var(--line); background: #0b0f0c center/cover no-repeat; overflow: hidden; }
.skin-viewport canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; }
.skin-viewport-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.skin-viewbar { gap: 16px; margin-top: 10px; flex-wrap: wrap; } .skin-viewbar select { padding: 4px 8px; }
@media (max-width: 640px) { .skin-viewport { height: 320px; } }

/* garage: model nho + o mua ngan */
.gview { height: 190px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 70%, #1c2a20 0%, #0b0f0c 75%); border: 1px solid var(--line); }
.gview canvas { width: 100% !important; height: 100% !important; display: block; }
.slot.empty.buy { cursor: pointer; border-color: var(--green3); color: var(--text); }
.slot.empty.buy:hover { background: var(--raised); }
.slot.empty.buy .plus { font-size: 44px; line-height: 1; font-weight: 700; color: var(--green3); }
.btn.xs { padding: 2px 7px; font-size: 12px; }

/* modal theo giao dien web */
.modal-back { position: fixed; inset: 0; background: rgba(4, 8, 6, 0.62); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; transition: opacity .15s; padding: 16px; }
.modal-back.show { opacity: 1; }
.modal { width: min(440px, 100%); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.5); transform: translateY(6px); transition: transform .15s; }
.modal-back.show .modal { transform: none; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.modal-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-input { width: 100%; margin-top: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
/* garage cards */
.slot { text-align: center; align-items: stretch; }
.slot .gname { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.slot .gname .sp { font-size: 19px; font-weight: 700; }
.row.center { justify-content: center; }
.small.center { text-align: center; }
.gview { height: 200px; }

/* vien vang (mau xuong) cho ngan trong va o mua ngan */
.slot.empty { border: 1px solid rgba(255, 212, 121, 0.55); }
.slot.empty:hover { border-color: var(--amber2); }
.slot.empty.buy { border: 1px solid var(--amber2); }
.slot.empty.buy .plus { color: var(--amber2); }
.slot.empty.buy:hover { background: rgba(255, 212, 121, 0.06); }

/* admin: full man, cot nguoi choi hep - gara rong */
body.wide main, body.wide .topbar .in, body.wide footer .in { max-width: min(1720px, 98vw); }
.g-admin { grid-template-columns: 360px minmax(0, 1fr); }
.g-admin .who span { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
@media (max-width: 1000px) { .g-admin { grid-template-columns: 1fr; } }
/* gara: dang cho dung yen */
.banner.wait { background: rgba(255, 210, 63, .16); border: 2px solid #e0a52a; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* role gate */
.rl-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rl-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); font-size: 13px; cursor: pointer; }
.rl-item input[type="checkbox"] { width: 34px; height: 20px; }
.rl-item input[type="checkbox"]::before { width: 14px; height: 14px; top: 1px; left: 1px; }
.rl-item input[type="checkbox"]:checked::before { left: 15px; }
.rl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
/* admin player bars */
.pbar { display: grid; gap: 4px; }
.pbar-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.pbar-track i { display: block; height: 100%; border-radius: 999px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.btn.active { outline: 2px solid var(--green); }
/* admin: log */
.lg-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-cats .chip { border: 1px solid var(--line); background: var(--raised); color: var(--muted); border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.lg-cats .chip b { background: rgba(0, 0, 0, .22); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.lg-cats .chip .share { font-style: normal; font-size: 11px; }
.lg-cats .chip.active { background: var(--green3); color: #06180d; border-color: transparent; font-weight: 800; }
.lg-table td { vertical-align: top; }
.lg-msg { line-height: 1.45; word-break: break-word; }
.lg-msg code { background: rgba(0, 0, 0, .25); padding: 0 5px; border-radius: 4px; font-size: 12px; }
.badge .x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 11px; opacity: .8; }
.badge .x:hover { opacity: 1; color: #f85149; }
/* admin: API key */
.api-scope { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; }
.api-scope code { background: rgba(0, 0, 0, .25); padding: 1px 6px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.api-scope span { font-size: 13px; color: var(--muted); }
.api-ex { background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow-x: auto; white-space: pre; margin: 8px 0 12px; }
.api-docs td { vertical-align: top; }
tr.muted td { opacity: .55; }

/* bang loai dang online (trang chu + admin) */
.sp-table{width:100%;border-collapse:collapse}.sp-table td{padding:6px 4px;border-bottom:1px solid var(--line,rgba(255,255,255,.06));vertical-align:middle}
.sp-table{table-layout:fixed}.sp-table .sp-name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:52%}.sp-table .sp-bar{width:22%;min-width:56px}.sp-table .sp-n{width:26%}
.sp-toggle{width:100%;margin-top:8px}.sp-table tr[hidden]{display:none}
.shopcard .locknote{margin-top:8px;padding:8px 10px;border-radius:10px;background:rgba(248,81,73,.12);border:1px solid rgba(248,81,73,.45);font-size:12.5px;line-height:1.35}.shopcard .locknote a{color:var(--amber2,#e3b341);font-weight:700;white-space:nowrap}.btn.locked{background:#4a2420;border-color:#8a3a3a;color:#ffb4a8;box-shadow:none}.btn.locked[disabled]{opacity:.9;cursor:not-allowed}
.sp-full{display:inline-block;font-size:10px;font-weight:800;letter-spacing:.04em;padding:1px 5px;border-radius:6px;background:#f85149;color:#fff;vertical-align:middle}.sp-table .sp-bar i{display:block;height:8px;border-radius:99px;background:linear-gradient(90deg,var(--accent,#3fb950),var(--accent2,#58a6ff));min-width:6px}
.sp-table .sp-n{text-align:right;white-space:nowrap}.sp-table tr.full .sp-bar i{background:linear-gradient(90deg,#f0883e,#f85149)}.sp-table tr.full .sp-name{color:#ff7b72}
.sp-note{margin-bottom:8px}.sp-admin td,.sp-admin th{padding:6px 8px}.sp-admin tr.full td.sp-name{color:#ff7b72}

/* anh loai chup tu model 3D */
.sp-img{display:inline-block;vertical-align:middle;object-fit:contain}
.sp-img.sm{width:40px;height:26px;margin-right:6px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.sp-img.lg{width:100%;height:150px;filter:drop-shadow(0 6px 10px rgba(0,0,0,.45))}
.sp-fb{display:inline-flex;align-items:center;justify-content:center;font-size:20px}.sp-fb.lg{font-size:64px;height:150px}
.shopcard.unlock .sp-hero{margin:-4px -4px 8px;padding:6px;border-radius:12px;background:radial-gradient(ellipse at 50% 70%,rgba(255,255,255,.10),transparent 70%)}

/* ---- che do an ---- */
.diet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.diet-card.mine { outline: 2px solid var(--ok, #3fb950); }
.diet-list.single { grid-template-columns: minmax(340px, 720px); }
.diet-hero { width: 56px; height: 56px; object-fit: contain; }
.diet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 16px 14px; }
.diet-col { min-width: 0; }
.diet-h { font-weight: 700; margin-bottom: 6px; font-size: 13px; letter-spacing: .02em; overflow-wrap: break-word; }
.diet-src { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; padding: 3px 0; min-width: 0; overflow-wrap: break-word; line-height: 1.3; }
.diet-src .diet-img { flex: 0 0 auto; }
.diet-src.dino { font-weight: 600; }
.diet-src.organ { opacity: .85; }
.diet-img { width: 22px; height: 22px; object-fit: contain; }
@media (max-width: 480px) { .diet-grid { grid-template-columns: 1fr; } }

/* 0.9.35: o trong grid khong duoc tran ra ngoai the (chu server 18/09: "Do bien the" nam de ra ngoai) */
.grid > *, .g2 > *, .g3 > *, .g4 > * { min-width: 0; }
.field { min-width: 0; }
.field input[type="range"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; accent-color: var(--green3, #3fb950); }
.field input, .field select, .field textarea { max-width: 100%; box-sizing: border-box; }

/* 0.9.39: bang chi tiet module trong the Hieu nang */
.perf-mods { margin-top: 10px; }
.perf-mods > summary { cursor: pointer; font-size: 12px; opacity: .85; }
.perf-mods table { margin-top: 8px; width: 100%; }

/* 0.9.73: Kho IslePilot - khung ben trai trang Chuong */
.garage-wrap { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 16px; align-items: start; }
.garage-wrap .hold { border: 1px dashed var(--line2); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.garage-wrap .hold h3 { margin: 0; }
.slot.hold-card { min-height: 0; }
@media (max-width: 900px) { .garage-wrap { grid-template-columns: 1fr; } }

/* ===== 0.9.183: skin studio + lich su dino + nut dang xuat ===== */
.skin-studio { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.skin-studio .skin-top { grid-column: 1 / -1; }
.skin-left, .skin-right { display: grid; gap: 16px; min-width: 0; }
.skin-center { display: grid; gap: 16px; min-width: 0; }
.skin-stage .skin-viewport { height: 400px; background: radial-gradient(ellipse at 50% 70%, #1c2a20 0%, #0b0f0c 75%); }
.skin-still { width: 100%; height: 100%; object-fit: contain; display: block; padding: 14px; }
.skin-viewport-msg { align-items: flex-end; padding-bottom: 14px; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .55)); }
.skin-regions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.skin-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.skin-chip i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line2); display: inline-block; }
.skin-chip.on { border-color: var(--amber); background: var(--raised2); box-shadow: 0 0 0 2px rgba(245, 181, 63, .25); }
.skin-swatches { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.skin-swatches .sw { padding: 8px; } .skin-swatches .sw.on { border-color: var(--amber); }
.skin-swatches .sw input[type="color"] { width: 38px; height: 38px; }
.skin-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 6px; margin-top: 6px; }
.skin-palette i { display: block; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line2); cursor: pointer; }
.skin-palette i:hover { outline: 2px solid var(--amber); }
.skin-presets-list { display: grid; gap: 8px; } .skin-presets-list .slot { padding: 10px; }
.skin-steps { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.btn.big { width: 100%; padding: 14px; font-size: 16px; }
.hist { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.hist-row { display: grid; grid-template-columns: 118px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--raised); }
.nav-logout { margin-left: 6px; padding: 6px 9px; }
@media (max-width: 1100px) { .skin-studio { grid-template-columns: 1fr; } .skin-stage .skin-viewport { height: 320px; } }
/* 0.9.190: dem nguoc dai di cu tren the vung ban do */
.mass-cd { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--r-sm); background: var(--raised); font-size: 13px; }
.mass-cd .cd { font-variant-numeric: tabular-nums; font-weight: 800; color: #f43f5e; }
/* ===== 0.9.190: bang xep hang theo mua (mockup 17/10) ===== */
.lb-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 22px 24px; border-radius: var(--r); overflow: hidden; margin-bottom: 14px; min-height: 170px; background: linear-gradient(90deg, rgba(8,14,10,.92) 0%, rgba(8,14,10,.55) 55%, rgba(8,14,10,.25) 100%), url("hero.jpg") center / cover no-repeat; border: 1px solid var(--line); }
.lb-hero h1 { margin: 0 0 4px; font-size: 38px; letter-spacing: .5px; color: #f5c542; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.lb-hero .sub { margin: 0 0 12px; max-width: 560px; color: #e7e3d6; }
.lb-season { display: inline-flex; gap: 18px; align-items: center; padding: 10px 14px; border: 1px solid rgba(245,197,66,.55); border-radius: 12px; background: rgba(0,0,0,.45); color: #f8f4e6; }
.lb-season .cd { font-variant-numeric: tabular-nums; color: #f5c542; font-weight: 800; }
.lb-reset { margin-top: 10px; color: #cfd8c9; } .lb-reset b { color: #2ef08a; }
.lb-hero-q { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; gap: 8px; }
.lb-hero-q q { font-family: inherit; font-style: italic; font-size: 20px; line-height: 1.35; color: #fff4d6; text-shadow: 0 2px 8px rgba(0,0,0,.7); quotes: none; max-width: 280px; }
.lb-hero-q .small { letter-spacing: 3px; color: #cdbf95; }
.lb-bar .lb-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); color: inherit; cursor: pointer; min-width: 150px; text-align: left; }
.lb-bar .lb-tab b { font-size: 14px; } .lb-bar .lb-tab .small { color: var(--muted); }
.lb-bar .lb-tab.active { border-color: #f5c542; background: linear-gradient(180deg, rgba(245,197,66,.28), rgba(245,197,66,.08)); box-shadow: 0 0 0 1px rgba(245,197,66,.35) inset; }
.lb-bar .lb-tab.active b { color: #f5c542; }
.lb-sep { width: 1px; height: 36px; background: var(--line); margin: 0 4px; }
.lb-bar .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: inherit; cursor: pointer; font-size: 13px; }
.lb-bar .chip.active { border-color: #2ef08a; color: #2ef08a; background: rgba(46,240,138,.12); }
.lb-bar select.chip { width: auto; max-width: 170px; appearance: auto; padding: 6px 10px; }
.lb-bar .chip .sp-img.xs { width: 26px; height: 18px; object-fit: contain; }
.lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.lb-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin-bottom: 14px; }
.lb-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.25)); text-align: center; }
.lb-pod .crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #1a1a1a; background: #c0c0c0; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.lb-pod.r1 { border-color: #f5c542; padding-top: 34px; box-shadow: 0 0 24px rgba(245,197,66,.18); } .lb-pod.r1 .crown { background: #f5c542; width: 36px; height: 36px; top: -18px; }
.lb-pod.r3 .crown { background: #cd7f32; }
.lb-pod .avatar.xl { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--line); } .lb-pod.r1 .avatar.xl { width: 88px; height: 88px; border-color: #f5c542; }
.lb-pod b { font-size: 16px; } .lb-pod .lb-val { font-size: 20px; font-weight: 900; color: #f5c542; }
.lb-pod.empty { opacity: .5; min-height: 120px; justify-content: center; }
.lb-pill { margin-top: 4px; padding: 6px 14px; border-radius: 10px; border: 1px solid rgba(245,197,66,.6); background: rgba(0,0,0,.35); font-weight: 700; font-size: 13px; }
.lb-sp { display: inline-flex; align-items: center; gap: 6px; } .lb-sp .sp-img.sm { width: 34px; height: 22px; object-fit: contain; }
.lb-table { width: 100%; border-collapse: collapse; } .lb-table th { text-align: left; padding: 10px 12px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.lb-table th.num, .lb-table td.num { text-align: right; } .lb-table th.sort { color: #f5c542; }
.lb-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb-table td.hi { color: #f5c542; font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-table tr.top1 td { background: rgba(245,197,66,.08); } .lb-table tr.me td { background: rgba(46,240,138,.08); }
.lb-rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; font-weight: 900; background: var(--raised); border: 1px solid var(--line); }
.lb-rank.r1 { background: #f5c542; color: #1a1a1a; border-color: #f5c542; } .lb-rank.r2 { background: #c0c0c0; color: #1a1a1a; border-color: #c0c0c0; } .lb-rank.r3 { background: #cd7f32; color: #1a1a1a; border-color: #cd7f32; }
.lb-reward { color: #f5c542; font-weight: 700; }
.lb-side .card { margin-bottom: 14px; }
.lb-mini { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); margin-bottom: 8px; }
.lb-mini.r1 { border-color: rgba(245,197,66,.6); } .lb-mini.r2 { border-color: rgba(192,192,192,.5); } .lb-mini.r3 { border-color: rgba(205,127,50,.6); }
.lb-mini .avatar { width: 40px; height: 40px; border-radius: 50%; }
.lb-mini-n { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; } .lb-mini-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lb-mini-n .lb-sp { font-size: 12px; color: var(--muted); } .lb-mini-n .lb-sp .sp-img.sm { width: 26px; height: 16px; }
.lb-mini-v { flex: 0 0 auto; text-align: right; color: #f5c542; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }
@media (max-width: 1000px) { .lb-hero, .lb-grid { grid-template-columns: 1fr; } .lb-hero-q { align-items: flex-start; text-align: left; } .lb-podium { grid-template-columns: 1fr; } }
/* 0.9.193: Kho - vat pham gioi han loai (mau chu server 19/10) */
.ul-head { margin-bottom: 12px; } .ul-ico { font-size: 26px; }
.ul-grid { margin-bottom: 14px; }
.ul-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid rgba(46, 240, 138, 0.35); }
.ul-art { display: flex; align-items: center; justify-content: center; min-height: 150px; border-radius: 10px; background: radial-gradient(ellipse at center, rgba(46, 240, 138, 0.12), rgba(0, 0, 0, 0.35)); }
.ul-art .sp-img { width: 100%; max-height: 150px; object-fit: contain; }
.ul-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ul-own { align-self: flex-end; } .ul-name { font-size: 17px; }
.ul-left { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(46, 240, 138, 0.5); background: rgba(46, 240, 138, 0.1); color: #2ef08a; font-weight: 800; font-size: 15px; width: fit-content; }
.ul-left.warn { border-color: rgba(245, 197, 66, 0.6); background: rgba(245, 197, 66, 0.12); color: #f5c542; }
.ul-left.forever { border-color: var(--line); background: var(--raised); color: var(--muted); font-weight: 700; }
.ul-exp { color: var(--muted); }
@media (max-width: 700px) { .ul-card { grid-template-columns: 1fr; } }

/* 0.9.197: Lich su chung (showDinoOverview) */
.modal-back .modal.dv-modal { width: min(96vw, 820px) !important; max-width: 820px !important; }
.modal.dv-modal .modal-text { max-width: none; }
.dv-sub { color: var(--muted); font-size: 13.5px; margin: -2px 0 12px; line-height: 1.45; }
.dv-cols, .dv-row { display: grid; grid-template-columns: 60px 92px minmax(0, 1fr) 176px 118px; gap: 12px; align-items: center; }
.dv-cols { padding: 0 12px 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted2); font-weight: 700; border-bottom: 1px solid var(--line); }
.dv-list { max-height: 58vh; overflow: auto; display: grid; gap: 8px; padding: 10px 4px 4px 2px; }
.dv-row { padding: 8px 12px; border-radius: var(--r); background: linear-gradient(180deg, var(--raised), var(--surface)); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.dv-row:hover { border-color: var(--line2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.dv-row.ok { border-color: #2f5a40; } .dv-row.bad { border-color: #4a2a2a; } .dv-row.warn { border-color: #5a4a20; }
.dv-art { width: 60px; height: 46px; object-fit: cover; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); display: block; }
.dv-art-none { display: grid; place-items: center; font-size: 22px; }
.dv-id { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; }
.dv-sp { min-width: 0; } .dv-sp b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dv-sp span { color: var(--amber2); font-weight: 700; font-variant-numeric: tabular-nums; }
.dv-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dv-pill.ok { color: var(--green3); border-color: #2f5a40; background: rgba(34, 197, 94, .08); } .dv-pill.bad { color: var(--red); border-color: #5a2a2a; background: rgba(240, 101, 95, .08); } .dv-pill.warn { color: var(--amber2); border-color: #5a4a20; background: rgba(245, 181, 63, .08); }
.dv-when { font-size: 12.5px; line-height: 1.35; } .dv-when b { display: block; font-variant-numeric: tabular-nums; } .dv-when span { color: var(--muted); display: block; } .dv-when em { font-style: normal; color: var(--muted2); font-size: 11.5px; }
@media (max-width: 640px) { .dv-cols { display: none; } .dv-row { grid-template-columns: 48px minmax(0, 1fr); } .dv-art { width: 48px; height: 38px; } .dv-id, .dv-st, .dv-when { grid-column: 2; } .modal-back .modal.dv-modal { width: 96vw !important; max-width: 96vw !important; } }

/* 0.9.199: goi Ultra + clan */
:root { --ultra: #ff7b1a; }
.ultra-row .badge { font-weight: 700; letter-spacing: .3px; }
tr.mine td { background: rgba(255, 123, 26, .08); }
.avatar.sm { width: 28px; height: 28px; border-radius: 50%; }
details summary { cursor: pointer; }

/* 0.9.201: clan theo mau */
.clan-hero h1 { font-size: clamp(44px, 7vw, 84px); letter-spacing: .02em; margin: 4px 0 0; }
.clan-hero .clan-hero-sub { font-family: var(--display, serif); color: var(--gold2, #ecd39a); font-size: 20px; margin: 0 0 6px; }
.clan-cta { text-align: center; } .clan-cta .clan-cta-ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; font-size: 26px; background: rgba(217,180,106,.15); border: 1px solid var(--wood, #3a3d35); }
.clan-cta .btn { width: 100%; margin-top: 8px; }
.clan-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.clan-list { display: flex; flex-direction: column; gap: 8px; }
.clan-row { display: grid; grid-template-columns: 44px 56px minmax(180px, 1.4fr) repeat(4, minmax(90px, .7fr)) minmax(140px, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--wood, #3a3d35); border-radius: 12px; background: linear-gradient(90deg, rgba(24,28,25,.95), rgba(16,19,17,.85)); }
.clan-row:hover { border-color: var(--gold, #d9b46a); }
.clan-rank { font-weight: 800; color: var(--gold2, #ecd39a); font-size: 18px; }
.clan-emblem { display: inline-grid; place-items: center; border-radius: 18px; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--em) 55%, #fff) 0%, var(--em) 55%, color-mix(in srgb, var(--em) 40%, #000) 100%); border: 2px solid rgba(255,255,255,.18); box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 0 0 3px rgba(0,0,0,.25); clip-path: polygon(50% 0, 100% 14%, 96% 62%, 50% 100%, 4% 62%, 0 14%); }
.clan-avatar { width: 112px; height: 112px; border-radius: 18px; object-fit: cover; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 6px 18px rgba(0,0,0,.45); flex: 0 0 auto; }   /* 0.9.250 anh dai dien clan */
.clan-name { font-weight: 800; font-size: 17px; } .clan-tagb { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(226,96,79,.2); color: #ffb3a8; font-size: 12px; font-weight: 800; letter-spacing: .06em; vertical-align: middle; }
.clan-slogan { color: var(--muted, #a39b8a); font-size: 13px; } .clan-slogan.big { font-size: 16px; color: var(--gold2, #ecd39a); font-family: var(--display, serif); }
.clan-col { display: flex; flex-direction: column; font-size: 12px; color: var(--muted, #a39b8a); } .clan-col b { color: var(--text, #ece6d9); font-size: 14px; }
.clan-tags { display: flex; gap: 4px; flex-wrap: wrap; } .clan-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--wood, #3a3d35); font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--muted, #a39b8a); cursor: default; }
.clan-tag.on { border-color: var(--gold, #d9b46a); color: var(--gold2, #ecd39a); } .clan-tagpick { display: flex; gap: 6px; flex-wrap: wrap; } .clan-tagpick .clan-tag { cursor: pointer; } .clan-tagpick input { display: none; }
.clan-act { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.clan-empick { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; } .clan-emopt { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--wood, #3a3d35); background: rgba(0,0,0,.25); font-size: 20px; cursor: pointer; } .clan-emopt.on { border-color: var(--gold, #d9b46a); box-shadow: 0 0 0 2px rgba(217,180,106,.35); }
.clan-form label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted, #a39b8a); } .clan-form input[type=text], .clan-form input:not([type]), .clan-form textarea { width: 100%; margin-top: 4px; }
.clan-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: start; }
.clan-side { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--wood, #3a3d35); background: rgba(16,19,17,.9); }
.clan-side a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text, #ece6d9); text-decoration: none; font-weight: 600; } .clan-side a i { width: 22px; text-align: center; font-style: normal; }
.clan-side a.active { background: rgba(217,180,106,.18); border: 1px solid rgba(217,180,106,.45); color: var(--gold2, #ecd39a); } .clan-side a:hover { background: rgba(255,255,255,.05); } .clan-side a.danger { color: #ff9b8f; } .clan-side-sep { height: 1px; background: var(--wood, #3a3d35); margin: 6px 0; }
.clan-nbadge { margin-left: auto; background: #e2604f; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.clan-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.clan-head { padding: 0; overflow: hidden; } .clan-head-in { display: flex; gap: 18px; align-items: center; padding: 18px; flex-wrap: wrap; background: linear-gradient(90deg, rgba(10,11,10,.92), rgba(10,11,10,.6)), url("/app/hero.jpg") center/cover; }
.clan-head-txt { flex: 1 1 320px; } .clan-head-txt h1 { margin: 0; font-family: var(--display, serif); font-size: 34px; } .clan-head-act { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.clan-facts { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0 6px; } .clan-facts span { display: flex; flex-direction: column; font-size: 13px; } .clan-facts span i { font-style: normal; color: var(--muted, #a39b8a); font-size: 11px; }
.clan-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.clan-stat { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--wood, #3a3d35); background: rgba(16,19,17,.9); text-decoration: none; color: inherit; }
.clan-stat i { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(217,180,106,.14); font-size: 22px; font-style: normal; } .clan-stat b { font-size: 22px; line-height: 1.1; color: var(--gold2, #ecd39a); } .clan-stat span { font-size: 12px; color: var(--muted, #a39b8a); } .clan-stat.link:hover { border-color: var(--gold, #d9b46a); }
.clan-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.clan-rules { margin: 0; padding-left: 20px; line-height: 1.7; } .clan-notice { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--wood, #3a3d35); }
.clan-logrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; } .clan-logit { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.2); } .clan-loglist { display: flex; flex-direction: column; gap: 6px; }
.clan-table td, .clan-table th { vertical-align: middle; } .clan-rolepill { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--wood, #3a3d35); font-size: 12px; } .clan-rolepill.leader { border-color: var(--gold, #d9b46a); color: var(--gold2, #ecd39a); } .clan-rolepill.fang { border-color: #58a6ff; color: #9ecbff; }
.clan-on { color: #7cc47c; } .clan-off { color: #e2604f; }
.clan-reqs { display: flex; flex-direction: column; gap: 8px; } .clan-req { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--wood, #3a3d35); } .clan-req .tx { flex: 1; }
.clan-pub-members { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 900px) { .clan-wrap { grid-template-columns: 1fr; } .clan-side { position: static; flex-direction: row; flex-wrap: wrap; } .clan-row { grid-template-columns: 36px 48px 1fr auto; } .clan-row .clan-col, .clan-row .clan-tags { display: none; } }
.clan-form input[type=color] { width: 56px; height: 32px; padding: 0; border-radius: 8px; vertical-align: middle; margin-left: 6px; }
/* 0.9.227: bang xep hang clan */
.clan-lv{color:#d9b46a;font-weight:800}
.clan-row.mine{box-shadow:inset 0 0 0 1px #d9b46a;border-radius:10px}
/* 0.9.229: keo tha doi cho ngan gara */
.slot.gdrag { cursor: grab; } .slot.gdrag:active { cursor: grabbing; }
.slot.dragging { opacity: .45; }
.slot.dropok { outline: 2px dashed var(--green3, #4ade80); outline-offset: 2px; }
.slot.pick { outline: 2px solid var(--green3, #4ade80); outline-offset: 2px; }

/* 0.9.233 (Ultra 08/11 anh ibb 'nut gia nhap bi loi'): hang danh sach co 10 o (hang, huy hieu, ten, 5 cot, the, nut) ma luoi chi 9 cot -> cum nut rot xuong dong 2, lot vao cot hang 44 px */
.clan-row.clan-dir { grid-template-columns: 44px 56px minmax(180px, 1.4fr) repeat(5, minmax(76px, .6fr)) minmax(120px, 1fr) auto; }
.clan-row.clan-rk { grid-template-columns: 44px 48px minmax(180px, 1.4fr) repeat(5, minmax(76px, .6fr)) auto; }
.clan-row .clan-act { flex-direction: row; align-items: center; gap: 6px; justify-self: end; }
.clan-row .clan-act .btn { white-space: nowrap; }
@media (max-width: 1280px) { .clan-row.clan-dir .clan-tags { display: none; } .clan-row.clan-dir { grid-template-columns: 44px 56px minmax(160px, 1.4fr) repeat(5, minmax(70px, .6fr)) auto; } }
@media (max-width: 900px) { .clan-row.clan-dir, .clan-row.clan-rk { grid-template-columns: 36px 48px 1fr auto; } .clan-row .clan-act { flex-direction: column; align-items: stretch; } }
