/* ==========================================================
   WARZ PLUS+ — ธีมมืดทันสมัย (แนว Infestation)
   แถบเมนูบน, ป้ายพู่กันแดง, การ์ดมืดขอบบาง, ป่าหมอก
   ========================================================== */
:root {
  --bg: #0b0c0e;
  --panel: rgba(20, 21, 24, .94);
  --line: #26282d;
  --line-2: #33363c;
  --text: #ececee;
  --dim: #8f9299;
  --red: #d32f2f;
  --red-hi: #ef4444;
  --gold: #f4b740;
  --blue: #4ea4ff;
  --purple: #b26bff;
  --green: #4ade80;
  --font: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 6px;
  --bar-h: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 15px/1.6 var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; }
body.locked { overflow: hidden; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 .8em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dim { color: var(--dim); } .small { font-size: .85rem; } .center { text-align: center; }
.c-gold { color: var(--gold); } .c-blue { color: var(--blue); } .c-purple { color: var(--purple); } .c-green { color: var(--green); } .c-red { color: var(--red-hi); }
.pos { color: var(--green); } .neg { color: var(--red-hi); }

/* ───────── พื้นหลังหน้า ───────── */
.page-bg { position: fixed; inset: 0; z-index: -2; background: var(--bg) center / cover no-repeat; transform: translateZ(0); will-change: transform; }
.page-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 20%, rgba(0, 0, 0, .2), rgba(0, 0, 0, .75) 70%), linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .7)); }
.deco { position: fixed; bottom: 0; z-index: -1; max-height: 70vh; width: auto; pointer-events: none; filter: drop-shadow(0 0 30px rgba(0, 0, 0, .8)); }
.deco.l { left: 0; } .deco.r { right: 0; }
@media (max-width: 1360px) { .deco { display: none; } }

/* ───────── แถบเมนูบน ───────── */
.bar { position: sticky; top: 0; z-index: 40; height: var(--bar-h); display: flex; align-items: center; gap: 28px; padding: 0 48px; background: rgba(19, 20, 23, .97); border-bottom: 1px solid #1f2125; }
.bar-logo img { height: 52px; width: auto; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); }
.nav { display: flex; align-items: stretch; height: 100%; gap: 4px; margin-left: 70px; }
.nav > a, .nav .dd > button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; margin: 4px 0 8px; border-radius: 6px 6px 0 0; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1.15; }
.nav b { font-weight: 600; font-size: 1rem; }
.nav small { font-size: .72rem; color: #b9bcc2; font-weight: 300; margin-top: 2px; }
.nav > a:hover, .nav .dd > button:hover { background: rgba(255, 255, 255, .04); }
.nav > a.on, .nav .dd.on > button { background: linear-gradient(rgba(211, 47, 47, .14), rgba(211, 47, 47, .02)); }
.nav > a.on::after, .nav .dd.on > button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 2px; background: var(--red); }
.nav .dd > button .fa-chevron-down { position: absolute; right: -2px; top: 50%; font-size: .7rem; color: var(--dim); transform: translateY(-50%); }
.dd { position: relative; display: flex; }
.dd-menu { position: absolute; top: calc(100% + 2px); left: 0; min-width: 210px; padding: 6px; background: #17181b; border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); display: none; z-index: 50; }
.dd.open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; color: var(--text); background: none; border: 0; border-radius: 6px; text-align: left; cursor: pointer; font-size: .92rem; }
.dd-menu a i, .dd-menu button i { width: 18px; text-align: center; color: var(--dim); }
.dd-menu a:hover, .dd-menu button:hover { background: rgba(211, 47, 47, .14); }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.dd-right .dd-menu { left: auto; right: 0; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.soc { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 1rem; transition: transform .15s; }
.soc:hover { transform: translateY(-2px); }
.soc.facebook { background: #1877f2; } .soc.group { background: #1d9bf0; } .soc.discord { background: #5865f2; }
.soc.line { background: #06c755; } .soc.tiktok { background: #111; box-shadow: inset 0 0 0 1px #333; } .soc.youtube { background: #ff0000; }
.btn-login { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px; height: 42px; margin-left: 10px; padding: 0 22px; color: #fff; font-weight: 600; background: linear-gradient(#2a0f11, #1d0b0c); border: 1px solid #5a1a1d; border-radius: 4px; }
.btn-login:hover { border-color: var(--red); }
.user-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 10px; color: #fff; background: none; border: 0; cursor: pointer; font-size: .92rem; }
.user-btn .fa-chevron-down { font-size: .7rem; color: var(--dim); }
.menu-toggle { display: none; margin-left: auto; width: 42px; height: 42px; color: #fff; background: #1d1e22; border: 1px solid var(--line-2); border-radius: 6px; font-size: 1.1rem; }

/* ป้ายออนไลน์ด้านซ้าย */
.online { position: fixed; z-index: 30; left: 0; top: calc(var(--bar-h) + 44px); display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 14px; background: rgba(20, 21, 24, .95); border: 1px solid var(--line-2); border-left: 0; border-radius: 0 8px 8px 0; font-weight: 600; font-size: .85rem; letter-spacing: .02em; transition: transform .25s; }
.online .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.online b { color: var(--green); }
.online button { color: var(--green); background: none; border: 0; cursor: pointer; padding: 0 0 0 4px; }
.online.min { transform: translateX(calc(-100% + 34px)); }
.online.min button i { transform: rotate(180deg); }
@keyframes pulse { 50% { opacity: .35; } }

/* ───────── ป้ายหัวข้อพู่กันแดง ───────── */
.ribbon { display: block; width: fit-content; margin: 0 auto 34px; padding: 8px 34px 10px; font-size: 1.25rem; font-weight: 500; color: #fff; letter-spacing: .01em; background: url("../img/brush.svg") center / 100% 100% no-repeat; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.ribbon.sm { font-size: 1.05rem; padding: 6px 28px 8px; margin-bottom: 26px; }
.page-title { text-align: center; font-size: 1.6rem; font-weight: 600; margin: 0 0 28px; }

/* ───────── โครงหน้า ───────── */
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 60px; }
.wrap.narrow { width: min(960px, calc(100% - 32px)); }
.wrap.wide { width: min(1380px, calc(100% - 32px)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.card.flat { background: rgba(14, 15, 17, .9); }
.card h3 { font-size: 1.15rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-7-5 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; }

/* ───────── ปุ่ม / ฟอร์ม ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; font-weight: 500; color: var(--text); background: #1d1e22; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: #4a4d55; background: #232429; }
.btn.red { color: #fff; background: linear-gradient(90deg, #b71c1c, var(--red-hi)); border-color: transparent; }
.btn.red:hover { filter: brightness(1.1); }
.btn.dark-red { color: #fff; background: #8b1218; border-color: #a41d24; }
.btn.outline { background: transparent; border-color: #fff3; }
.btn.lg { height: 52px; font-size: 1.02rem; font-weight: 600; }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 12px; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: .88rem; color: #c9cbd0; }
.form small { color: var(--dim); font-size: .78rem; }
input, select, textarea { width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: .95rem; color: var(--text); background: #0e0f11; border: 1px solid var(--line-2); border-radius: 6px; }
textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; }
select { appearance: none; background: #0e0f11 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aaa' stroke-width='1.6'/%3E%3C/svg%3E") right 14px center no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6b1d22; box-shadow: 0 0 0 3px rgba(211, 47, 47, .18); }
input::placeholder, textarea::placeholder { color: #6c6f76; }
.input-ic { position: relative; }
.input-ic input { padding-right: 46px; }
.input-ic > i, .input-ic > button { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #6a6d73; background: none; border: 0; cursor: pointer; padding: 4px; }
.light-in input { background: #d9dadd; color: #111; border-color: transparent; }
.light-in input:focus { background: #e6e7ea; }
.form .check { display: flex; align-items: flex-start; gap: 10px; color: var(--text); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--red); }
.hpot { position: absolute !important; left: -9999px; }
.inline { display: flex; gap: 10px; }
.inline > input { flex: 1; }
.pw-meter { height: 5px; background: #1f2125; border-radius: 3px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.pw-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .84rem; color: var(--dim); }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: "✓ "; }

/* แท็บ */
.pills { display: inline-flex; gap: 6px; padding: 6px; background: #121316; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 26px; }
.pills button, .pills a { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; color: #c9cbd0; background: none; border: 0; border-radius: 999px; cursor: pointer; font-weight: 500; }
.pills .on { color: #fff; background: linear-gradient(90deg, #b71c1c, var(--red-hi)); box-shadow: 0 6px 18px rgba(211, 47, 47, .35); }
.pills.wide { display: flex; width: 100%; }
.pills.wide > * { flex: 1; justify-content: center; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.chips button { min-width: 64px; height: 44px; padding: 0 22px; color: #fff; background: rgba(15, 15, 17, .6); border: 1px solid #6b1d22; border-radius: 3px; cursor: pointer; font-weight: 500; }
.chips button.on { background: #b71c1c; border-color: #e53935; }
.underline-tabs { display: flex; flex-wrap: wrap; gap: 26px; margin: 4px 0 22px; }
.underline-tabs button, .underline-tabs a { padding: 6px 0; color: var(--dim); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; }
.underline-tabs .on { color: #fff; border-bottom-color: var(--red-hi); }
.tab-pane[hidden] { display: none !important; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.seg2 button, .seg2 a { height: 44px; color: #c9cbd0; background: #18191c; border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; }
.seg2 .on { color: #fff; background: #c62828; border-color: #c62828; }

/* ───────── หน้าแรก ───────── */
.hero { position: relative; min-height: calc(100vh - var(--bar-h)); display: grid; place-items: center; text-align: center; background: #070708 center / cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .75) 72%), linear-gradient(transparent 60%, var(--bg)); }
.hero-inner { position: relative; padding: 40px 16px; }
.hero-logo { width: min(560px, 80vw); margin: 0 auto; filter: drop-shadow(0 10px 40px rgba(0, 0, 0, .8)); animation: rise 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.hero p { margin-top: 18px; font-size: 1.1rem; color: #d9d9dc; text-shadow: 0 2px 10px #000; animation: rise 1.1s .2s cubic-bezier(.2, .8, .2, 1) both; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); color: #ffffff99; font-size: 1.3rem; animation: bob 2s infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
.home-sec { position: relative; padding: 60px 0 90px; }

/* สไลด์ */
.slider { position: relative; width: min(1100px, calc(100% - 32px)); margin: 0 auto 70px; aspect-ratio: 16 / 9; border: 1px solid rgba(211, 47, 47, .35); background: #000; overflow: hidden; }
.slider.shop { width: 100%; aspect-ratio: auto; height: 260px; border-radius: 10px; border: 0; margin-bottom: 26px; }
.slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.65, 0, .35, 1); }
.slide { flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.sl-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .45); border: 0; cursor: pointer; z-index: 2; }
.sl-arrow:hover { background: rgba(0, 0, 0, .7); }
.sl-arrow.prev { left: 18px; } .sl-arrow.next { right: 18px; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 12px; z-index: 2; }
.sl-dots button { width: 26px; height: 3px; padding: 0; border: 0; background: #ffffff66; cursor: pointer; }
.sl-dots button.on { background: var(--red-hi); }
.slider-empty { display: grid; place-items: center; height: 100%; color: var(--dim); background: #0e0f11; text-align: center; padding: 20px; }

/* การ์ดข่าว */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; width: min(1000px, calc(100% - 32px)); margin: 0 auto; }
.news-card { position: relative; display: block; aspect-ratio: 311 / 260; overflow: hidden; background: #111 center / cover no-repeat; border: 1px solid #000; transition: transform .2s; }
.news-card:hover { transform: translateY(-4px); }
.news-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .9)); }
.news-card .meta { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 16px; }
.news-card .tag { display: inline-block; padding: 2px 10px; font-size: .74rem; font-weight: 600; letter-spacing: .03em; color: #fff; background: #3b3d42; margin-bottom: 8px; text-transform: uppercase; }
.tag.Event, .tag.Promotion { background: #d32f2f; } .tag.Patch { background: #45474d; } .tag.News { background: #b7791f; }
.news-card h3 { font-size: 1rem; font-weight: 600; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-card.noimg { background-image: linear-gradient(135deg, #2a0d0f, #121316); }
.news-card[hidden] { display: none; }

/* ───────── ดาวน์โหลด ───────── */
.dl-cards { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 70px; }
.dl-card { width: 205px; padding: 34px 18px 24px; text-align: center; background: rgba(19, 20, 22, .92); border: 1px solid var(--line); }
.dl-card h3 { font-size: .9rem; font-weight: 500; }
.dl-card h3 em { font-style: normal; color: var(--red-hi); }
.dl-ic { font-size: 2.1rem; color: var(--red); margin: 14px 0 26px; }
.dl-ic::after { content: ""; display: block; width: 36px; height: 4px; margin: 6px auto 0; background: var(--red); border-radius: 1px; }
.dl-card p { font-size: .78rem; color: #c7c9cd; margin: 0 0 10px; }
.prog-list { display: grid; gap: 4px; margin-bottom: 70px; }
.prog { display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; align-items: center; gap: 16px; padding: 12px 0; font-size: .9rem; }
.prog .nm { display: flex; align-items: center; gap: 16px; font-weight: 500; }
.prog .nm i { color: var(--red); font-size: 1.2rem; }
.prog .type { color: var(--red-hi); text-align: center; }
.prog .size { color: var(--dim); text-align: center; }
.req h3 { text-align: center; font-weight: 500; font-size: 1rem; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.req ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: .9rem; }
.req b { font-weight: 600; color: var(--blue); }
.req.rec b { color: var(--gold); }

/* ───────── อันดับ (โพเดียม) ───────── */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; justify-items: center; gap: 12px; margin-bottom: 40px; }
.podium > div { display: grid; justify-items: center; }
.badge { position: relative; width: 136px; text-align: center; }
.podium .first .badge { width: 168px; }
.badge svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); }
.badge .nm { position: absolute; top: 7.4%; left: 25%; right: 25%; height: 9%; display: grid; place-items: center; font-size: .7rem; font-weight: 600; line-height: 1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.first .badge .nm { color: #ffd98a; }
.podium .lbl { font-size: .75rem; color: #c9cbd0; margin: 6px 0 6px; }
.podium .val { min-width: 76px; padding: 6px 14px; font-weight: 600; text-align: center; background: #0d0e10; border: 1px solid #3a3c42; }
.podium .first .val { border-color: #b98a2e; }
.outlaw .podium .first .val { border-color: #b3302b; color: var(--red-hi); }
.rank-list { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rank-list th { text-align: left; font-weight: 400; color: var(--dim); padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.rank-list td { padding: 8px 6px; border-bottom: 1px solid #1c1d21; }
.rank-list th:last-child, .rank-list td:last-child { text-align: right; }
.rank-list .ic { width: 22px; color: #46b6e8; font-size: .8rem; }
.outlaw .rank-list .ic { color: var(--red-hi); }
.board-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 60px 0 26px; }

/* ───────── ตาราง ───────── */
.tbl-card { background: rgba(22, 23, 26, .88); border: 1px solid #1d1f23; border-radius: 6px; padding: 26px 30px; }
.tbl-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; font-size: .88rem; color: #c9cbd0; }
.tbl-tools select { width: 64px; height: 34px; padding: 0 22px 0 10px; background-position: right 8px center; font-size: .88rem; }
.tbl-tools input { width: 210px; height: 34px; font-size: .86rem; }
.tbl-tools label { display: flex; align-items: center; gap: 8px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 400; color: var(--dim); padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; white-space: nowrap; }
.tbl td { padding: 14px; border-bottom: 1px solid #202227; vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, .015); }
.tbl .num { font-weight: 600; }
.tbl-round { background: #121316; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl-round .tbl th { background: #15161a; }
details.chars-dd { position: relative; display: inline-block; }
details.chars-dd summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: #23252a; border: 1px solid #34363c; border-radius: 4px; cursor: pointer; font-size: .85rem; }
details.chars-dd summary::-webkit-details-marker { display: none; }
details.chars-dd ul { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 180px; margin: 0; padding: 6px; list-style: none; background: #17181b; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); }
details.chars-dd li { padding: 5px 8px; font-size: .85rem; }
.pager { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pager a, .pager span { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 10px; font-size: .85rem; background: #18191c; border: 1px solid var(--line); border-radius: 4px; }
.pager .on { background: var(--red); border-color: var(--red); }
.status { display: inline-block; padding: 3px 12px; font-size: .8rem; border-radius: 999px; }
.status.ok { color: #4ade80; background: rgba(74, 222, 128, .12); } .status.fail { color: #f87171; background: rgba(248, 113, 113, .12); } .status.wait { color: var(--gold); background: rgba(244, 183, 64, .12); }

/* ───────── Bug fix ───────── */
.guide { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.guide-list { padding: 14px; background: rgba(22, 23, 26, .9); border: 1px solid #1d1f23; border-radius: 6px; align-self: start; }
.guide-list button { display: block; width: 100%; text-align: left; padding: 10px 16px; margin-bottom: 4px; color: #d4d5d9; background: none; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: .9rem; }
.guide-list button.on { color: var(--red-hi); background: rgba(211, 47, 47, .14); border-color: #8b1d22; }
.guide-view { background: #000; border-radius: 4px; overflow: hidden; }
.guide-view .yt { aspect-ratio: 16 / 9; }
.guide-view iframe { width: 100%; height: 100%; border: 0; display: block; }
.guide-view .txt { padding: 18px 20px; background: #141518; color: #cfd0d4; font-size: .92rem; }

/* ───────── สมัคร / ล็อกอิน ───────── */
.auth { display: grid; grid-template-columns: 1.15fr 1fr; width: min(960px, 100%); margin: 6vh auto 0; background: #121316; border: 1px solid #1d1f23; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.auth-art { min-height: 420px; background: #1a1210 center / cover no-repeat; display: grid; place-items: center; }
.auth-art img { width: 70%; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .8)); }
.auth-form { padding: 48px 42px; }
.auth-form h1 { text-align: center; font-size: 1.5rem; font-weight: 500; margin-bottom: 26px; color: #d8d9dc; }
.btn-blood { position: relative; width: 100%; height: 52px; color: #f2d4d4; font-weight: 600; font-size: 1.02rem; background: #b71c1c url("../img/brush.svg") center / 140% 160% no-repeat; border: 0; border-radius: 4px; cursor: pointer; overflow: hidden; }
.btn-blood:hover { filter: brightness(1.12); color: #fff; }
.auth-foot { font-size: .82rem; color: var(--dim); margin: 14px 0 0; }
.auth-foot a { color: var(--red-hi); }

/* ───────── เติมเงิน ───────── */
.box { padding: 26px; background: #121316; border: 1px solid #1f2125; border-radius: 10px; }
.box h3 { font-size: 1.15rem; font-weight: 600; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.notice { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 18px; font-size: .85rem; background: rgba(244, 183, 64, .06); border: 1px solid #4b3a1a; border-left: 4px solid var(--gold); border-radius: 6px; }
.amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.amts button { height: 52px; color: #fff; background: #17181b; border: 1px solid #2a2c31; border-radius: 6px; cursor: pointer; font-weight: 500; }
.amts button.on { border-color: var(--red-hi); background: rgba(211, 47, 47, .14); }
.ph { display: grid; place-items: center; align-content: center; text-align: center; min-height: 300px; color: #c9cbd0; font-size: .88rem; }
.ph-frame { width: 200px; height: 200px; display: grid; place-items: center; margin-bottom: 26px; border: 1px dashed #3a3d43; border-radius: 10px; font-size: 5rem; color: #74777e; }
.ph-frame.doc { color: #2d6bb3; }
.qr-out img { width: 240px; height: 240px; padding: 10px; margin: 0 auto 14px; background: #fff; border-radius: 8px; }
.result-ok { color: var(--green); font-size: 1.1rem; font-weight: 600; }

/* ───────── ร้านค้า ───────── */
.balbar { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; padding: 16px 26px; margin-bottom: 36px; background: #121316; border: 1px solid #1f2125; border-radius: 6px; font-size: .9rem; color: #c9cbd0; }
.balbar span { display: inline-flex; align-items: center; gap: 8px; }
.balbar b { font-weight: 600; }
.balbar .sep { width: 1px; height: 22px; background: var(--line-2); }
.coin { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.coin.purple { background: radial-gradient(circle at 35% 35%, #e7c6ff, #8b3fd9); box-shadow: 0 0 6px #b26bff88; }
.coin.gray { background: radial-gradient(circle at 35% 35%, #ddd, #666); }
.coin.gold { border-radius: 2px; background: linear-gradient(#f9d270, #b8862a); }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pack { background: #121316; border: 1px solid #1f2125; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.pack-img { aspect-ratio: 280 / 218; background: radial-gradient(circle at 50% 70%, #2a1416, #0b0b0c) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.pack-img img { width: 100%; height: 100%; object-fit: cover; }
.pack-img img.icon { width: 62%; height: 72%; object-fit: contain; }
.pack-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pack h4 { font-size: 1rem; font-weight: 600; margin: 0; }
.pack .line { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: #c9cbd0; }
.pack .price { display: inline-flex; align-items: center; gap: 6px; font-size: 1.1rem; font-weight: 600; color: var(--purple); }
.pack .price.gc { color: var(--gold); } .pack .price.gd { color: var(--blue); } .pack .price.point, .pack .price.milestone { color: #ddd; }
.pack ul { margin: 0; padding: 0 0 0 1em; font-size: .8rem; color: var(--dim); }
.pack .btn { margin-top: auto; height: 42px; }
.pack.out { opacity: .5; }

/* ───────── โปรไฟล์ ───────── */
.prof { display: flex; gap: 28px; align-items: center; position: relative; }
.prof-av { width: 112px; height: 112px; border-radius: 4px; object-fit: cover; background: #222; flex: none; }
.prof h1 { font-size: 1.45rem; font-weight: 600; margin: 0 0 6px; text-transform: uppercase; }
.prof .id-line { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: .88rem; color: #d4d5d9; }
.uid { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; background: #1a1b1f; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; color: #fff; }
.uid i { color: var(--red-hi); }
.prof .tt { margin-top: 16px; font-size: .78rem; color: var(--dim); }
.prof .tt b { display: block; font-size: 1.3rem; font-weight: 500; color: var(--green); }
.prof-act { position: absolute; top: 0; right: 0; }
.btn-ghost-red { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; font-size: .85rem; color: #f87171; background: #18191c; border: 1px solid #34363c; border-radius: 6px; }
.btn-ghost-red:hover { border-color: #6b1d22; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0 50px; }
.stat3 { padding: 22px; text-align: center; background: rgba(20, 21, 24, .92); border: 1px solid var(--line); }
.stat3 small { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .82rem; color: #d4d5d9; }
.stat3 b { display: block; font-size: 1.25rem; font-weight: 500; margin-top: 4px; }
.chars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ch { background: rgba(20, 21, 24, .94); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; text-align: center; padding: 0; color: inherit; }
.ch:hover { border-color: #5a1d21; transform: translateY(-3px); }
.ch-img { height: 150px; display: grid; place-items: end center; background: radial-gradient(circle at 50% 80%, #26282d, #121316); overflow: hidden; }
.ch-img img { height: 140px; width: auto; object-fit: contain; }
.ch-name { padding: 10px 8px 2px; font-weight: 600; font-size: .95rem; border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep { font-size: .76rem; padding-bottom: 10px; }
.rep.pos { color: var(--blue); } .rep.neg { color: var(--red-hi); }
.vit { padding: 10px 14px 14px; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.vit div { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 10px; font-size: .74rem; color: #b5b7bc; }
.vit i { font-size: .72rem; color: #9b9ea5; }
.bar-v { height: 3px; background: #2a2c31; border-radius: 2px; overflow: hidden; }
.bar-v span { display: block; height: 100%; border-radius: 2px; }
.bar-v.hp span { background: #f05252; } .bar-v.time span { background: #e5e7eb; } .bar-v.food span { background: #f6ad55; } .bar-v.water span { background: #63b3ed; }
.ch-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-left: 5px; vertical-align: middle; }
.name-rgb { background: linear-gradient(90deg, #ff4d4d, #ffb84d, #f8ff4d, #4dff88, #4dc3ff, #b44dff, #ff4d4d) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rgbslide 4s linear infinite; }
@keyframes rgbslide { to { background-position: 200% 0; } }

/* โมดัลตัวละคร */
.ch-modal-av { width: 90px; height: 90px; margin: 4px auto 10px; border-radius: 50%; border: 2px solid var(--red); overflow: hidden; display: grid; place-items: end center; background: #1b1c20; }
.ch-modal-av img { height: 86px; width: auto; }
.ch-modal-name { text-align: center; font-weight: 700; font-size: 1.25rem; margin-bottom: 18px; text-shadow: 0 0 12px currentColor; transition: color .15s; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sw { position: relative; cursor: pointer; }
.sw input { position: absolute; opacity: 0; }
.sw span { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--c); border: 2px solid #2c2e33; }
.sw .rgb-sw { background: conic-gradient(#ff4d4d, #ffb84d, #f8ff4d, #4dff88, #4dc3ff, #b44dff, #ff4d4d); }
.sw input:checked + span { outline: 3px solid #fff; outline-offset: 2px; }
.sw input:focus-visible + span { outline: 3px solid var(--red-hi); }
.pts-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .82rem; color: #cfd0d4; }

/* ───────── Transfer ───────── */
.xfer-top { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.xfer-top h1 { display: flex; align-items: center; gap: 12px; font-size: 1.7rem; margin: 0 0 8px; }
.tok { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: .82rem; font-weight: 600; background: #17181b; border: 1px solid var(--line-2); border-radius: 999px; margin-right: 6px; }
.tok.rgb { border-color: #6b1d22; }
.bal-mini { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; font-weight: 600; align-items: center; }
.bal-mini span { display: inline-flex; align-items: center; gap: 6px; }
.bal-mini small { font-weight: 400; color: var(--dim); font-size: .7rem; }
.xfer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.xfer-tabs button { height: 80px; display: grid; place-items: center; align-content: center; gap: 4px; color: #d4d5d9; background: rgba(20, 21, 24, .92); border: 1px solid var(--line); cursor: pointer; font-size: .88rem; }
.xfer-tabs button i { font-size: 1.2rem; color: #b5b7bc; }
.xfer-tabs button.on { border-color: var(--red-hi); color: #fff; }
.xfer-tabs button.on i { color: var(--red-hi); }
.fee { font-size: .85rem; font-weight: 600; color: #cfd0d4; }
.form-title { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; }

/* ───────── Redeem ───────── */
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .86rem; color: #cfd0d4; }
.info-list i { width: 22px; color: var(--red-hi); }
.info-h { display: flex; align-items: center; gap: 8px; color: var(--red-hi); font-weight: 600; margin-bottom: 12px; }

/* ───────── สรุปยอด ───────── */
.sum3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.sum3 div { padding: 22px; text-align: center; background: #121316; border: 1px solid #1f2125; border-radius: 10px; font-size: .85rem; color: #cfd0d4; }
.sum3 b { display: block; margin-top: 6px; font-size: 1.25rem; font-weight: 600; }
.filters { display: flex; gap: 12px; margin-bottom: 18px; }
.filters select { width: 130px; height: 42px; } .filters input { width: 220px; height: 42px; }

/* ───────── กิจกรรม ───────── */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gacha-box { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; }
.crate { width: 180px; height: 180px; display: grid; place-items: center; background: radial-gradient(circle, rgba(211, 47, 47, .25), transparent 70%); }
.crate img { width: 150px; }
.crate.shake img { animation: shake .18s linear infinite; }
@keyframes shake { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.odds { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 20px; font-size: .84rem; }
.odds li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #1f2125; }
.odds li.out { opacity: .4; text-decoration: line-through; }
.r3 { color: #6fb3ff; } .r4 { color: #c48bff; } .r5 { color: var(--gold); }
.loot { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.loot div { padding: 12px 8px; text-align: center; font-size: .8rem; background: #17181b; border: 1px solid #2a2c31; border-radius: 6px; animation: pop .45s backwards cubic-bezier(.2, 1.4, .4, 1); }
.loot img { height: 60px; margin: 0 auto 6px; object-fit: contain; }
.loot .r5 { border-color: var(--gold); box-shadow: 0 0 16px rgba(244, 183, 64, .35); }
.loot .r4 { border-color: var(--purple); } .loot .r3 { border-color: var(--blue); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin: 18px 0; }
.day { position: relative; min-height: 120px; padding: 12px; font-size: .8rem; background: #121316; border: 1px solid #1f2125; border-radius: 8px; }
.day b { display: block; color: var(--dim); font-weight: 500; margin-bottom: 6px; }
.day.today { border-color: var(--red-hi); box-shadow: inset 0 0 20px rgba(211, 47, 47, .15); }
.day.today b { color: var(--red-hi); }
.day.got { opacity: .55; }
.day .got-ic { position: absolute; right: 10px; bottom: 8px; font-size: 1.3rem; color: var(--green); }
.rent-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.rent-opts .btn { flex: 1; flex-direction: column; height: auto; padding: 8px; gap: 0; line-height: 1.25; }
.rent-opts small { font-size: .72rem; opacity: .85; }
.note { padding: 12px 16px; margin-bottom: 16px; font-size: .88rem; background: rgba(255, 255, 255, .03); border-left: 3px solid var(--dim); border-radius: 4px; }
.note.ok { border-color: var(--green); } .note.warn { border-color: var(--gold); }

/* ข่าว (หน้าเต็ม) */
.article img.cover { width: 100%; max-height: 420px; object-fit: cover; margin-bottom: 20px; border-radius: 6px; }
.prose { color: #d4d5d9; } .prose ul { padding-left: 1.2em; }

/* ───────── Modal / Toast ───────── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(470px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #141518; border: 1px solid #2a2c31; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.modal-body { padding: 26px 22px 22px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin: -26px -22px 20px; padding: 18px 56px 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; color: #bbb; background: none; border: 0; cursor: pointer; font-size: 1.15rem; z-index: 2; }
.confirm { text-align: center; } .confirm p { font-size: 1.02rem; margin: 6px 0 20px; }
.confirm .btn-row { justify-content: center; }
.otp-in { text-align: center; letter-spacing: .5em; font-size: 1.1rem; }
.toasts { position: fixed; z-index: 90; right: 20px; top: calc(var(--bar-h) + 16px); display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; background: #17181b; border: 1px solid var(--line-2); border-left: 4px solid var(--green); border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); animation: tin .25s ease-out; transition: opacity .4s, transform .4s; font-size: .9rem; }
.toast i { margin-top: 3px; color: var(--green); }
.toast.err { border-left-color: var(--red-hi); } .toast.err i { color: var(--red-hi); }
.toast.out { opacity: 0; transform: translateX(20px); }
@keyframes tin { from { opacity: 0; transform: translateX(20px); } }

/* ───────── ท้ายเว็บ ───────── */
.foot { padding: 30px 16px; text-align: center; font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: #8a8d94; text-transform: uppercase; }
.huge { font-size: 5rem; font-weight: 700; color: var(--red); line-height: 1; margin: 10px 0; }
.empty { padding: 40px; text-align: center; color: var(--dim); }

/* ───────── จอเล็ก ───────── */
@media (max-width: 1200px) {
  .bar { padding: 0 20px; gap: 14px; }
  .nav { margin-left: 10px; }
  .nav > a, .nav .dd > button { padding: 0 10px; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .chars { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
  :root { --bar-h: 64px; }
  .menu-toggle { display: grid; place-items: center; }
  .nav, .bar-right { display: none; }
  .bar.open { height: auto; flex-wrap: wrap; padding-bottom: 14px; }
  .bar.open .nav { display: flex; flex-direction: column; width: 100%; height: auto; margin: 0; order: 3; }
  .bar.open .nav > a, .bar.open .nav .dd > button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; margin: 0; border-radius: 6px; width: 100%; }
  .bar.open .nav > a.on::after, .bar.open .dd.on > button::after { display: none; }
  .bar.open .dd { flex-direction: column; }
  .bar.open .dd-menu { position: static; box-shadow: none; }
  .bar.open .bar-right { display: flex; width: 100%; order: 4; flex-wrap: wrap; margin: 6px 0 0; }
  .grid2, .grid-7-5, .boards, .guide, .auth { grid-template-columns: 1fr; }
  .boards { gap: 50px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .chars { grid-template-columns: repeat(3, 1fr); }
  .auth-art { min-height: 200px; }
  .days { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .bar-logo img { height: 42px; }
  .wrap { padding-top: 28px; }
  .news-grid, .shop-grid, .stats3, .sum3, .xfer-tabs { grid-template-columns: 1fr; }
  .chars { grid-template-columns: 1fr 1fr; }
  .card, .box, .tbl-card { padding: 18px; }
  .auth-form { padding: 30px 20px; }
  .prof { flex-direction: column; align-items: flex-start; }
  .prof-act { position: static; }
  .prog { grid-template-columns: 1fr auto; } .prog .size, .prog .type { display: none; }
  .gacha-box { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .days { grid-template-columns: repeat(2, 1fr); }
  .slider.shop { height: 160px; }
  .pills { display: flex; width: 100%; } .pills > * { flex: 1; justify-content: center; padding: 0 10px; }
  .online { top: auto; bottom: 16px; }
  .podium .badge { width: 100px; } .podium .first .badge { width: 122px; } .badge .nm { font-size: .58rem; }
  .filters { flex-wrap: wrap; } .filters input, .filters select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ตัวอย่างชื่อในเกม (ตอนนี้ → หลังเปลี่ยน) + ปุ่มสีแบบมีชื่อ */
.name-pv { margin: 0 0 18px; padding: 14px 16px 16px; border: 1px solid #5a1d1b; border-radius: 10px; background: radial-gradient(ellipse at 70% 0, rgba(193, 39, 45, .28), transparent 70%), #120d0e; text-align: center; }
.np-title { font-size: .66rem; letter-spacing: .3em; color: #b9a6a2; margin-bottom: 8px; }
.np-row { display: flex; align-items: flex-end; justify-content: center; gap: 14px; flex-wrap: wrap; }
.np-col { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.np-col small { font-size: .62rem; color: #8b8f97; }
.np-now { font-size: 1rem; font-weight: 600; color: #a7aab1; opacity: .75; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-new { font-size: 1.45rem; font-weight: 800; letter-spacing: .02em; color: #fff; text-shadow: 0 0 14px currentColor; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.np-new.name-rgb, .np-now.name-rgb { color: transparent; text-shadow: none; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .25)); }
.np-arrow { color: var(--red-hi); margin-bottom: 8px; }
.swatches.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sw-chip, .form .sw-chip { position: relative; display: flex; flex-direction: row; margin: 0; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #2c2e33; border-radius: 8px; background: #16171a; cursor: pointer; font-size: .82rem; transition: border-color .15s, background .15s; }
.sw-chip:hover { border-color: #4a4d55; background: #1c1d21; }
.sw-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sw-chip .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 8px var(--c); }
.sw-chip .dot.rgb-sw { background: conic-gradient(#ff4d4d, #ffb84d, #f8ff4d, #4dff88, #4dc3ff, #b44dff, #ff4d4d); box-shadow: none; }
.sw-chip .cn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-chip .cur { position: absolute; top: -8px; right: 6px; padding: 1px 6px; border-radius: 6px; background: #b98a2e; color: #1a1205; font-size: .6rem; font-style: normal; font-weight: 700; }
.sw-chip:has(input:checked) { border-color: var(--red-hi); background: #2a1415; box-shadow: 0 0 0 1px var(--red-hi) inset; }
.sw-chip:has(input:focus-visible) { outline: 2px solid var(--red-hi); outline-offset: 2px; }
@media (max-width: 520px) { .swatches.chips { grid-template-columns: repeat(2, 1fr); } }

/* แต้มสิทธิ์ในโปรไฟล์ + อีเมลเป็นหัวข้อ */
.stats3 + .stats4 { margin-top: -34px; }
.stats4 { grid-template-columns: repeat(4, 1fr); }
.stats4 .stat3 { padding: 16px; }
.stats4 .stat3 b { font-size: 1.1rem; }
.coin.rgb { background: conic-gradient(#ff4d4d, #ffb84d, #f8ff4d, #4dff88, #4dc3ff, #b44dff, #ff4d4d); }
.prof-mail { word-break: break-all; }
@media (max-width: 760px) { .stats4 { grid-template-columns: repeat(2, 1fr); } .stats3 + .stats4 { margin-top: -38px; } }

/* รายการของในแพ็ก (มีรูป + ชื่อจากเกม) + ปุ่มแสดงทั้งหมด */
.pack ul.rw { list-style: none; padding: 0; display: grid; gap: 4px; }
.pack ul.rw li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; }
.pack ul.rw img { width: 24px; height: 24px; object-fit: contain; border-radius: 3px; background: #1a1b1f; }
.pack ul.rw span { color: #c9cbd0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack ul.rw b { font-weight: 600; color: #e5e7eb; }
.rw-more summary { list-style: none; cursor: pointer; font-size: .78rem; color: var(--red-hi); padding: 2px 0; user-select: none; }
.rw-more summary::-webkit-details-marker { display: none; }
.rw-more summary:hover { text-decoration: underline; }
.rw-more .hd, .rw-more[open] .sh { display: none; }
.rw-more[open] .hd { display: inline; }
.rw-more[open] summary { order: 2; }
.rw-more[open] { display: flex; flex-direction: column; gap: 4px; }

/* GC icon from game */
.coin.gold { width: 20px; height: 16px; border-radius: 0; background: url(../img/items/GC.png) center / contain no-repeat; }

/* check-in reward icons */
.day .d-rw { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #e5e7eb; line-height: 1.3; }
.day .d-rw em { font-style: normal; color: var(--gold); font-weight: 600; white-space: nowrap; }
.rw-ic { flex: 0 0 34px; width: 34px; height: 34px; object-fit: contain; border-radius: 4px; background: #1a1b1f; }
.rw-ic.fa-ic { display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
/* premium badge (profile) */
.prem { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 6px; border-radius: 4px; border: 1px solid var(--line-2); background: #1a1b1f; color: #d4d5d9; }
.prem img { width: 22px; height: 23px; object-fit: contain; }
.prem.on { border-color: rgba(244, 183, 64, .55); background: rgba(244, 183, 64, .08); color: var(--gold); }
.prem.on b { color: #fff; font-weight: 600; }
.prem small { color: var(--dim); font-size: .75rem; }

/* ───────── Profile (glass card style) ───────── */
.pf { max-width: 1060px; }
.pf-card { position: relative; padding: 38px 42px 34px; border-radius: 26px; background: linear-gradient(160deg, rgba(30, 12, 14, .9), rgba(12, 12, 14, .94) 55%); border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04); overflow: hidden; }
.pf-card::before { content: ''; position: absolute; inset: -40% auto auto -20%; width: 60%; height: 120%; background: radial-gradient(closest-side, rgba(211, 47, 47, .18), transparent); pointer-events: none; }
.pf-top { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 34px; align-items: start; }
.pf-av { position: relative; width: 160px; height: 160px; margin-top: 6px; border-radius: 22px; padding: 4px; background: linear-gradient(135deg, #ff3b3b, #7a0d12); transform: rotate(-4deg); box-shadow: 0 0 34px rgba(239, 68, 68, .45), 0 0 0 1px rgba(255, 80, 80, .4); }
.pf-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; background: #141417; transform: rotate(4deg) scale(1.04); }
.pf-dot { position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border-radius: 50%; background: #3a3c42; border: 4px solid #141417; transform: rotate(4deg); }
.pf-dot.on { background: var(--green); box-shadow: 0 0 14px var(--green); }
.pf-name { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pf-name h1 { margin: 0; font-size: 2.1rem; font-weight: 800; font-style: italic; letter-spacing: -.5px; text-transform: none; line-height: 1.15; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.pf-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 10px 0 20px; font-size: .84rem; color: #c9cbd0; }
.pf-tt i { color: var(--red-hi); margin-right: 4px; } .pf-tt b { color: var(--green); font-weight: 600; }
.pf-st { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); }
.pf-st i, .pfc-time i { width: 8px; height: 8px; border-radius: 50%; background: var(--red-hi); box-shadow: 0 0 8px var(--red-hi); }
.pf-st.on, .pfc-time.on { color: var(--green); }
.pf-st.on i, .pfc-time.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.pf-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pf-tile { position: relative; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); overflow: hidden; }
.pf-tile small { display: block; font-size: .66rem; letter-spacing: 1.6px; color: #7d8088; font-weight: 600; }
.pf-tile b { display: block; margin-top: 4px; font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.pf-tile em { font-style: normal; font-size: .7rem; margin-left: 5px; color: #8f9299; font-weight: 600; }
.pf-tile > .coin, .pf-tile > i { position: absolute; right: 14px; top: 14px; opacity: .35; transform: scale(1.4); }
.pf-small { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.pf-mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); }
.pf-mini small { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: #9a9da4; white-space: nowrap; }
.pf-mini b { font-size: 1.1rem; font-weight: 700; }
.pf-acts { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.pf-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 86px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .07); color: #e5e7eb; font: inherit; font-size: .8rem; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.pf-act i { font-size: 1.35rem; color: var(--red-hi); }
.pf-act:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .06); }
.pf-act.out { background: rgba(127, 18, 24, .35); border-color: rgba(239, 68, 68, .25); }
.pf-act.out i { color: #fff; }
.pf-act.out:hover { background: rgba(185, 28, 28, .5); border-color: var(--red-hi); }
.pf-divider { display: flex; flex-direction: column; align-items: center; margin: 44px 0 26px; }
.pf-divider span { font-weight: 800; font-style: italic; letter-spacing: 3px; font-size: 1.05rem; color: #d4d5d9; }
.pf-divider::after { content: ''; width: 190px; height: 3px; margin-top: 10px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--red-hi), transparent); box-shadow: 0 0 12px var(--red-hi); }
.pf-chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pfc { position: relative; padding: 20px; border-radius: 20px; text-align: left; color: inherit; font: inherit; cursor: pointer; background: linear-gradient(170deg, rgba(24, 24, 28, .9), rgba(12, 12, 14, .92)); border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 14px 40px rgba(0, 0, 0, .45); transition: transform .15s, border-color .15s; }
.pfc:hover { transform: translateY(-3px); border-color: rgba(239, 68, 68, .45); }
.pfc-head { display: grid; grid-template-columns: 66px 1fr auto; gap: 14px; align-items: center; }
.pfc-av { width: 66px; height: 66px; border-radius: 14px; overflow: hidden; background: #1a1b1f; border: 1px solid rgba(255, 255, 255, .07); display: grid; place-items: end center; }
.pfc-av img { width: 100%; height: 100%; object-fit: cover; }
.pfc-id { min-width: 0; }
.pfc-name { display: block; font-size: 1.25rem; font-weight: 800; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfc-time { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .68rem; font-weight: 600; letter-spacing: .5px; color: #a3a6ad; }
.pfc-edit { color: #5f626a; font-size: .85rem; transition: color .15s; }
.pfc:hover .pfc-edit { color: var(--red-hi); }
.pfc-hp { display: flex; justify-content: space-between; margin-top: 18px; font-size: .64rem; font-weight: 700; letter-spacing: .4px; color: var(--red-hi); }
.pfc-hp span + span { color: #e5e7eb; }
.pfc-bar { height: 5px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.pfc-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #dc2626, #fb923c); box-shadow: 0 0 10px rgba(239, 68, 68, .6); }
.pfc-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.pfc-mini span { padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .05); font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfc-mini .pos i { color: var(--blue); } .pfc-mini .neg { color: var(--red-hi); }
@media (max-width: 900px) {
  .pf-card { padding: 26px 20px; }
  .pf-top { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; }
  .pf-name, .pf-sub { justify-content: center; }
  .pf-info { width: 100%; }
  .pf-small { grid-template-columns: repeat(2, 1fr); }
  .pf-chars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .pf-big { grid-template-columns: 1fr; }
  .pf-acts { grid-template-columns: repeat(2, 1fr); }
  .pf-chars { grid-template-columns: 1fr; }
  .pf-name h1 { font-size: 1.5rem; }
}

/* ───────── Floating social bar (right) ───────── */
.soc-float { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 6px; padding: 12px 8px; border-radius: 30px; background: rgba(12, 12, 14, .92); border: 2px solid rgba(220, 38, 38, .75); box-shadow: 0 0 22px rgba(220, 38, 38, .35); }
.soc-float a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #d4d5d9; font-size: 1.1rem; transition: color .15s, background .15s, transform .15s; }
.soc-float a:hover { color: #fff; background: rgba(220, 38, 38, .85); transform: scale(1.08); }
@media (max-width: 700px) { .soc-float { top: auto; bottom: 14px; right: 10px; transform: none; padding: 6px 4px; gap: 2px; } .soc-float a { width: 32px; height: 32px; font-size: .9rem; } }

/* ───────── Page loader ───────── */
.pl { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, #140b0c, #050506 60%); opacity: 1; visibility: visible; transition: opacity .38s ease, visibility 0s linear 0s; animation: plAuto .4s ease 6s forwards; }
.pl.hide { opacity: 0; visibility: hidden; transition: opacity .38s ease, visibility 0s linear .38s; }
.pl.js { animation: none; }
@keyframes plAuto { to { opacity: 0; visibility: hidden; } }
.pl-in { display: flex; flex-direction: column; align-items: center; transform: translateZ(0); transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.pl.hide .pl-in { transform: scale(.94); }
.pl-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.pl-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-track { fill: rgba(12, 12, 14, .9); stroke: rgba(255, 255, 255, .07); stroke-width: 4; }
.pl-arc { fill: none; stroke: #ef4444; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; filter: drop-shadow(0 0 6px rgba(239, 68, 68, .9)); }
.pl-ring img { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; animation: plBreath 1.6s ease-in-out infinite; will-change: transform; }
@keyframes plSpin { to { transform: rotate(360deg); } }
@keyframes plBreath { 50% { transform: scale(1.06); } }
.pl-brand { margin-top: 22px; font-size: 1.55rem; font-weight: 800; font-style: italic; letter-spacing: -.5px; color: #fff; text-shadow: 0 0 18px rgba(0, 0, 0, .8); }
.pl-brand span { color: #ef4444; }
.pl-bar { width: 200px; height: 4px; margin-top: 10px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pl-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #b91c1c, #ef4444); box-shadow: 0 0 10px #ef4444; transform-origin: left center; transform: scaleX(0); will-change: transform; }
.pl-txt { margin-top: 12px; font-size: .66rem; font-weight: 700; letter-spacing: 3.5px; color: #8f9299; }
.pl-txt b { color: #d4d5d9; font-weight: 700; }
.pl-txt i { font-style: normal; display: inline-block; min-width: 13ch; text-align: right; transition: opacity .25s; }
.pl-head { transform-origin: 60px 60px; }
.pl-head circle { fill: #fff; filter: drop-shadow(0 0 5px #ef4444) drop-shadow(0 0 10px #ef4444); }
main { animation: pgIn .45s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes pgIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .pl, .pl-in, main { transition: none; animation: none; } .pl-ring img { animation-duration: 3s; } }

/* ───────── UI effects ───────── */
#fx-embers { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.rv { opacity: 0; transform: translateY(26px) scale(.985); }
.rv.in { opacity: 1; transform: none; transition: opacity .75s cubic-bezier(.2, .8, .2, 1), transform .75s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0ms); }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .55s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .3s; will-change: transform; }
.tilt.tilting { transition: transform .1s linear, border-color .2s, box-shadow .3s; }
.tilt:hover { box-shadow: 0 18px 48px rgba(0, 0, 0, .55), 0 0 0 1px rgba(239, 68, 68, .35); }
.glare { position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s; background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 35%, transparent 60%); }
.tilt:hover .glare { opacity: 1; }
.btn, .pf-act, .btn-login { position: relative; overflow: hidden; }
.btn::before, .pf-act::before, .btn-login::before { content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-20deg) translateX(0); opacity: 0; pointer-events: none; }
.btn:hover::before, .pf-act:hover::before, .btn-login:hover::before { opacity: 1; transform: skewX(-20deg) translateX(420%); transition: transform .75s ease, opacity .2s; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .28); transform: scale(0); animation: rip .6s ease-out forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.nav > a::before, .nav .dd > button::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: -5px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #b91c1c, #ef4444 30%, #ffd0d0 50%, #ef4444 70%, #b91c1c) 0 0 / 220% 100%; box-shadow: 0 0 8px rgba(239, 68, 68, .9), 0 0 18px rgba(239, 68, 68, .5); opacity: 0; transform: scaleX(.035); transform-origin: 50% 50%; transition: transform .32s cubic-bezier(.4, 0, .2, 1), opacity .3s; will-change: transform, opacity; z-index: 1; }
.nav > a:hover::before, .nav .dd > button:hover::before { opacity: 1; transform: scaleX(1); animation: navDot .6s cubic-bezier(.2, .8, .2, 1) both, navShine 1.6s linear .6s infinite; }
@keyframes navDot { 0% { opacity: 0; transform: scaleX(.035); } 22% { opacity: 1; transform: scaleX(.035); } 100% { opacity: 1; transform: scaleX(1); } }
@keyframes navShine { from { background-position: 100% 0; } to { background-position: -120% 0; } }
.nav > a:hover, .nav .dd > button:hover { background: linear-gradient(rgba(60, 40, 90, .35), rgba(30, 22, 48, .55)); }
.nav > a:hover small, .nav .dd > button:hover small { color: #ff9b9b; }
.nav > a, .nav .dd > button { transition: background .2s, transform .2s; }
.nav > a:hover, .nav .dd > button:hover { transform: translateY(-1px); }
.pfc-bar span, .bar-v > span { transform-origin: left center; animation: barIn 1.4s .35s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes barIn { from { transform: scaleX(0); } }
.pf-av { animation: avFloat 5s ease-in-out infinite; }
@keyframes avFloat { 50% { transform: rotate(-4deg) translateY(-6px); } }
.pf-divider::after { animation: divGlow 2.4s ease-in-out infinite; }
@keyframes divGlow { 50% { opacity: .45; } }
html { scrollbar-color: #7f1d1d #0b0c0e; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { background: #0b0c0e; } ::-webkit-scrollbar-thumb { background: linear-gradient(#b91c1c, #7f1d1d); border-radius: 8px; border: 2px solid #0b0c0e; }
::selection { background: rgba(239, 68, 68, .45); color: #fff; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .tilt { transform: none; } .pf-av, .pf-divider::after, .pfc-bar span, .bar-v > span { animation: none; } }

/* ───────── Animated background (CSS particles) ───────── */
.fx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.fx-bg i, .fx-bg b { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); opacity: var(--o); will-change: transform, opacity; backface-visibility: hidden; }
.fxd { border-radius: 50%; background: radial-gradient(circle, #ff2d55 0 34%, rgba(255, 23, 68, .6) 46%, rgba(255, 23, 68, .18) 62%, transparent 72%); animation: fxDrift var(--t) ease-in-out var(--dl) infinite alternate, fxTw calc(var(--t) / 4) ease-in-out var(--dl) infinite alternate; }
.fxb { border-radius: 50%; background: radial-gradient(circle, rgba(200, 24, 48, .30), rgba(200, 24, 48, .10) 45%, transparent 70%); animation: fxDrift var(--t) ease-in-out var(--dl) infinite alternate; }
.fxq { border: 2px solid rgba(235, 35, 55, .75); border-radius: 7px; box-shadow: 0 0 10px rgba(235, 35, 55, .4); animation: fxSq var(--t) linear var(--dl) infinite; }
.fxq.w { border-color: rgba(255, 255, 255, .55); box-shadow: 0 0 10px rgba(235, 35, 55, .4); }
.fx-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 45% 40% at 100% 0%, rgba(210, 215, 235, .10), transparent 70%), radial-gradient(ellipse 60% 45% at 50% 105%, rgba(150, 10, 25, .30), transparent 70%), radial-gradient(ellipse 35% 35% at 8% 18%, rgba(170, 20, 60, .14), transparent 70%); animation: fxGlow 9s ease-in-out infinite alternate; }
@keyframes fxDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--dx), var(--dy), 0); } }
@keyframes fxTw { from { opacity: var(--o); } to { opacity: calc(var(--o) * .4); } }
@keyframes fxSq { 0% { transform: translate3d(0, 0, 0) rotate(var(--r)); } 50% { transform: translate3d(var(--dx), var(--dy), 0) rotate(calc(var(--r) + 90deg)); } 100% { transform: translate3d(0, 0, 0) rotate(calc(var(--r) + 180deg)); } }
@keyframes fxGlow { to { opacity: .55; } }
@media (max-width: 700px) { .fxd:nth-of-type(n+30), .fxb:nth-of-type(n+6), .fxq:nth-of-type(n+4) { display: none; } }
html.fx-lite .fxq, html.fx-lite .fxb { display: none; }
html.fx-lite .fxd { animation-name: fxDrift; }
.fx-bg.js i, .fx-bg.js b { animation: none !important; }



/* Sliding nav indicator: one line, JS moves it to the hovered menu (transform + width) */
.nav { position: relative; }
.nav > a::before, .nav .dd > button::before { display: none !important; }
.nav > a.on::after, .nav .dd.on > button::after { content: none; }
.nav-ink { position: absolute; left: 0; bottom: 4px; width: 0; height: 3px; border-radius: 3px; pointer-events: none; z-index: 2; opacity: 0; background: linear-gradient(90deg, #b91c1c, #ef4444 30%, #ffd6d6 50%, #ef4444 70%, #b91c1c) 0 0 / 220% 100%; box-shadow: 0 0 8px rgba(239, 68, 68, .95), 0 0 18px rgba(239, 68, 68, .55), 0 0 32px rgba(239, 68, 68, .25); will-change: transform, width, opacity; animation: navShine 1.8s linear infinite; }
.nav-ink.go { transition: transform .5s cubic-bezier(.22, 1, .36, 1), width .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease; }
.nav-ink::after { content: ""; position: absolute; left: 10%; right: 10%; top: -14px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse at 50% 100%, rgba(239, 68, 68, .45), transparent 70%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .nav-ink { animation-duration: 1.8s !important; animation-iteration-count: infinite !important; } .nav-ink.go { transition: transform .5s cubic-bezier(.22, 1, .36, 1), width .5s cubic-bezier(.22, 1, .36, 1), opacity .3s ease !important; } }
@media (max-width: 900px) { .nav-ink { display: none; } .nav > a.on::after, .nav .dd.on > button::after { content: ""; } }

/* Nav indicator: pure red, no white shine */
.nav-ink { background: linear-gradient(90deg, #c81e1e, #ef4444 50%, #c81e1e); animation: none !important; }
.nav-ink { box-shadow: 0 0 5px rgba(220, 38, 38, .7); }
.nav-ink::after { display: none; }

/* Socials: only the right floating bar, in each app's own colour */
.bar-right .soc { display: none; }
.soc-float a.soc { color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.soc-float a.soc:hover { transform: scale(1.12); filter: brightness(1.15); }
.soc-float .soc.facebook, .soc-float .soc.facebook:hover { background: #1877f2; }
.soc-float .soc.group, .soc-float .soc.group:hover { background: #1d9bf0; }
.soc-float .soc.discord, .soc-float .soc.discord:hover { background: #5865f2; }
.soc-float .soc.line, .soc-float .soc.line:hover { background: #06c755; }
.soc-float .soc.tiktok, .soc-float .soc.tiktok:hover { background: #111; box-shadow: inset 0 0 0 1px #444, 0 2px 8px rgba(0, 0, 0, .45); }
.soc-float .soc.youtube, .soc-float .soc.youtube:hover { background: #ff0000; }
.soc-float { gap: 10px; }

/* ภารกิจส่งหลักฐาน */
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.ms-card { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: transform .2s, border-color .2s, box-shadow .2s; }
.ms-card:hover { transform: translateY(-3px); border-color: rgba(220, 38, 38, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.ms-card.done, .ms-card.wait { opacity: .9; }
.ms-img { aspect-ratio: 16 / 9; background: #0d0e10; overflow: hidden; }
.ms-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 18px 20px 20px; }
.ms-body h3 { margin: 0; font-size: 1.15rem; }
.ms-desc { margin: 0; color: #c9cbd1; font-size: .9rem; line-height: 1.55; }
.ms-go { align-self: flex-start; color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); }
.ms-go:hover { border-color: var(--red-hi); }
.ms-rw { padding: 12px 14px; border-radius: 10px; background: #121316; border: 1px solid #1f2125; }
.ms-rw small { display: block; color: var(--dim); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.ms-rw .d-rw { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .9rem; }
.ms-rw .d-rw img { width: 38px; height: 38px; object-fit: contain; }
.ms-rw .d-rw em { font-style: normal; color: var(--gold); font-weight: 600; }
.ms-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--dim); }
.ms-meta i { margin-right: 3px; }
.ms-body > .btn { margin-top: auto; }
.ms-note { font-size: .82rem; padding: 8px 12px; border-radius: 8px; }
.ms-note.no { color: #fca5a5; background: rgba(220, 38, 38, .12); }
.ms-st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.ms-st.wait { color: #fbbf24; background: rgba(251, 191, 36, .12); }
.ms-st.ok { color: #4ade80; background: rgba(74, 222, 128, .12); }
.ms-st.no { color: #f87171; background: rgba(248, 113, 113, .12); }

/* กล่องเตือน OTP อยู่ในสแปม */
.otp-spam{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:linear-gradient(135deg,rgba(250,204,21,.16),rgba(220,38,38,.14));border:1px solid rgba(250,204,21,.45);color:#fde68a;text-align:left;margin:4px 0}
.otp-spam b{display:block;font-size:.98rem;color:#fef08a;line-height:1.35}
.otp-spam small{display:block;font-size:.8rem;color:#fcd34d;opacity:.9;margin-top:2px;line-height:1.4}
.otp-spam u{text-decoration-color:rgba(250,204,21,.6);text-underline-offset:2px}
.otp-emo{font-size:2.1rem;line-height:1;flex:none;display:inline-block;animation:otpShock 1.6s ease-in-out infinite;transform-origin:50% 80%}
@keyframes otpShock{0%,55%,100%{transform:rotate(0) scale(1)}60%{transform:rotate(-12deg) scale(1.15)}68%{transform:rotate(10deg) scale(1.15)}76%{transform:rotate(-6deg) scale(1.08)}84%{transform:rotate(0) scale(1)}}
@media (prefers-reduced-motion:reduce){.otp-emo{animation:none}}
