﻿/* ═════════════════════════════════════════════════════════════════════════════
   TS Unlocked — เว็บไซต์
   โครง/ผัง = `D:\_design\web_v4.html` (แถบบนลอย · ภาพเปิด · ข่าว 2 คอลัมน์ +
   แถบข้าง · แถวขุนพล · ฟุตเตอร์ 4 คอลัมน์) แต่ **พลิกเป็นพื้นขาว** ตามที่ user สั่ง
   ชุดสีสว่างยกจาก `web_v3.html` (paper #f4f8fc · ทอง #f0a015 · ink #16283c)
   ⛔ ห้ามใส่พื้นหลังดำ · ไม่มีตัวหนังสือวิบวับ/ป้ายกะพริบ (กฎเดิมจากแบบร่าง)
   ───────────────────────────────────────────────────────────────────────────── */
/*  🔤 ฟอนต์: ประกาศ @font-face อยู่ที่ `css/fonts-noto.css` (โหลดก่อนแผ่นนี้)
    Kanit ยังเก็บไว้เป็นตัวสำรอง — ไฟล์ยังอยู่ใน /fonts เผื่ออยากย้อนกลับ */
@font-face{font-family:Kanit;src:url('/fonts/Kanit-Regular.ttf');font-weight:400;font-display:swap}
@font-face{font-family:Kanit;src:url('/fonts/Kanit-SemiBold.ttf');font-weight:600;font-display:swap}
@font-face{font-family:Kanit;src:url('/fonts/Kanit-Bold.ttf');font-weight:800;font-display:swap}

:root{
  --paper:#f4f8fc; --card:#ffffff; --line:#e2ebf3; --line2:#eef4f9;
  --ink:#16283c; --ink2:#4a6076; --mute:#8299ad;
  --gold:#f0a015; --gold2:#ffcb4f; --gold-dk:#b9760a;
  --red:#ee5253; --green:#10ac84; --blue:#3b82f6;
  --nav-h:72px;
  /*  🔤 ชุดฟอนต์ (user เคาะ 2026-09-07) — แก้ 2 บรรทัดนี้ = เปลี่ยนฟอนต์ทั้งเว็บ
      เนื้อความเป็น Sans อ่านยาว ๆ สบาย · หัวเรื่องเป็น Serif ให้กลิ่นคลาสสิก
      ⛔ อย่าเอา Serif ไปใช้กับเนื้อความ — อ่านย่อหน้ายาวแล้วล้าตา */
  --font-body:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
  --font-head:"Noto Serif Thai","Noto Sans Thai",serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
/*  🔤 หัวเรื่องเป็น Serif เฉพาะ**หน้าที่ผู้เล่นเห็น**
    `main:not(.adm-main)` = กันไม่ให้ไปโดนหลังบ้าน (หน้าทำงาน อ่านตารางยาว ๆ Sans ชัดกว่า) */
main:not(.adm-main) h1,
main:not(.adm-main) h2,
main:not(.adm-main) h3,
.phd-title{font-family:var(--font-head)}

body{font-family:var(--font-body);background:var(--paper);color:var(--ink);
  overflow-x:hidden;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;min-height:100vh}
img{-webkit-user-drag:none}
a{text-decoration:none;color:inherit}
/* 📐 กว้างขึ้นจาก 1280/92vw (user 2026-09-07: เนื้อหาแคบ เหลือพื้นที่ว่างเยอะเกิน) */
.wrap{width:min(1420px,95vw);margin:0 auto}
main{flex:1;padding-top:var(--nav-h)}

/* ── แถบบน (ลอยค้าง) ─────────────────────────────────────────────────────── */
.nav{position:fixed;inset:0 0 auto 0;height:var(--nav-h);z-index:100;display:flex;align-items:center;
  gap:26px;padding:0 max(4vw,20px);background:rgba(255,255,255,.92);backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px}
.brand img{height:44px}
.brand span{font-weight:800;font-size:14px;letter-spacing:.1em;line-height:1.25}
.brand b{color:var(--gold-dk)}
.nav menu{display:flex;gap:26px;list-style:none;margin-left:14px}
.nav menu a{font-size:14.5px;font-weight:700;color:var(--ink2);padding:8px 0;position:relative;display:block}
.nav menu a::after{content:"";position:absolute;left:0;right:100%;bottom:0;height:2px;
  background:var(--gold);transition:right .22s}
.nav menu a:hover{color:var(--ink)} .nav menu a:hover::after{right:0}
.nav menu a.on{color:var(--ink)} .nav menu a.on::after{right:0}
.nav .right{margin-left:auto;display:flex;gap:11px;align-items:center}

/* ── ปุ่ม ────────────────────────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;
  font-family:inherit;font-weight:800;border:0;transition:transform .16s, box-shadow .16s, background .2s}
.btn:hover{transform:translateY(-2px)}
/* 🔧 user 2026-09-30: ปุ่ม "ยกเลิก" (เป็น <label>) ไอคอนตกลงมาอยู่คนละบรรทัดกับตัวหนังสือ
   ⇒ ห้าม flex ขึ้นบรรทัดใหม่ และห้ามตัดคำในปุ่ม */
.btn{flex-wrap:nowrap;white-space:nowrap}
.btn-line{padding:9px 20px;border-radius:8px;border:1.5px solid #cfdded;background:#fff;
  color:var(--ink);font-size:14px}
.btn-line:hover{border-color:var(--gold);color:var(--gold-dk)}
.btn-gold{padding:10px 22px;border-radius:8px;font-size:14px;color:#4a2f00;
  background:linear-gradient(180deg,var(--gold2),var(--gold));
  box-shadow:0 4px 0 var(--gold-dk),0 8px 20px rgba(240,160,20,.3)}
.btn-gold:active{transform:translateY(3px);box-shadow:0 1px 0 var(--gold-dk)}
.btn-xl{padding:16px 34px;font-size:18px;border-radius:10px;letter-spacing:.04em}
.btn[disabled]{opacity:.5;cursor:not-allowed;transform:none;box-shadow:none}

/* ── ภาพเปิด ─────────────────────────────────────────────────────────────── */
/* ยกผังจาก v4: ภาพเต็มความกว้าง · ตัวละครยืนขวา · ตัวหนังสือชิดซ้ายตามขอบจอ
   ต่างที่ **ไล่เฉดเป็นสีขาว** ไม่ใช่น้ำเงินเข้ม ⇒ ตัวหนังสือสีเข้มอ่านออกบนภาพสว่าง */
.hero{position:relative;height:78vh;min-height:560px;max-height:820px;display:flex;align-items:center;
  overflow:hidden;margin-top:calc(var(--nav-h) * -1);padding-top:var(--nav-h);background:#dfeaf4}
.hero-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 56%}
.hero::after{content:"";position:absolute;inset:0;pointer-events:none;background:
  linear-gradient(92deg,rgba(255,255,255,.95) 0%,rgba(255,255,255,.82) 28%,rgba(255,255,255,.3) 56%,transparent 76%),
  linear-gradient(0deg,var(--paper) 0%,rgba(244,248,252,.5) 18%,transparent 44%),
  radial-gradient(130% 100% at 50% 45%,transparent 58%,rgba(24,52,84,.14) 100%)}
.hero-mascot{position:absolute;right:4%;bottom:-14px;height:86%;max-height:620px;width:auto;z-index:3;
  filter:drop-shadow(-18px 18px 30px rgba(20,45,80,.3))}
.hero-in{position:relative;z-index:5;max-width:600px;margin-left:max(6vw,28px);margin-right:auto;width:100%}
.tagpill{display:inline-flex;align-items:center;gap:9px;padding:7px 16px;border-radius:30px;
  background:#fff;border:1px solid #ffdca6;color:var(--gold-dk);
  font-size:12.5px;font-weight:800;letter-spacing:.06em;box-shadow:0 4px 14px rgba(240,160,20,.18)}
.tagpill i{width:7px;height:7px;border-radius:50%;background:var(--red)}
.hero h1{font-size:clamp(34px,5vw,56px);font-weight:800;line-height:1.14;margin:20px 0 14px}
.hero h1 b{color:var(--gold-dk)}
.hero p{font-size:16px;color:var(--ink2);line-height:1.85;max-width:560px;margin-bottom:32px}
.hero .cta{display:flex;gap:14px;flex-wrap:wrap}

/* ── ตัวหลัก: ข่าว + แถบข้าง ──────────────────────────────────────────────── */
.main{background:linear-gradient(180deg,#ffffff 0%,var(--paper) 100%);padding:62px 0 78px}
.cols{display:grid;grid-template-columns:1fr 340px;gap:32px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:12px;
  box-shadow:0 8px 24px rgba(30,70,110,.07)}
.phead{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;
  padding:22px 26px;border-bottom:1px solid var(--line)}
.phead h2{font-size:21px;font-weight:800}
.tabs{display:flex;gap:7px}
.tabs button{padding:6px 15px;border-radius:16px;border:1px solid var(--line);background:#f7fafd;
  color:var(--ink2);font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:all .2s}
.tabs button:hover,.tabs button.on{background:var(--gold);border-color:var(--gold);color:#4a2f00}

.newslist{padding:18px 20px 22px;display:flex;flex-direction:column;gap:14px}
.ni{display:flex;gap:18px;padding:14px;border-radius:10px;border:1px solid var(--line2);
  background:#fbfdff;transition:all .25s}
.ni:hover{background:#fff;border-color:#f6dfae;transform:translateX(4px);
  box-shadow:0 8px 20px rgba(30,70,110,.08)}
.ni .th{width:120px;height:120px;border-radius:8px;overflow:hidden;position:relative;flex:none;background:#eef3f8}
.ni .th img{width:100%;height:100%;object-fit:cover;transition:transform .35s}
.ni:hover .th img{transform:scale(1.06)}
.ni .tg{position:absolute;top:7px;left:7px;padding:3px 9px;border-radius:9px;font-size:10.5px;
  font-weight:800;color:#fff;box-shadow:0 2px 6px rgba(20,45,80,.3)}
.tg-new{background:var(--red)} .tg-ev{background:var(--gold);color:#4a2f00} .tg-up{background:var(--green)}
.ni .info{display:flex;flex-direction:column;justify-content:center;flex:1;min-width:0}
.ni .dt{font-size:12px;color:var(--mute);font-weight:600;margin-bottom:5px}
.ni h3{font-size:16.5px;font-weight:800;line-height:1.45;margin-bottom:7px}
.ni:hover h3{color:var(--gold-dk)}
.ni p{font-size:13px;color:var(--ink2);line-height:1.65}

.side{display:flex;flex-direction:column;gap:18px}
.stretch-side{height:100%}
.stretch-side > .panel{flex:1;display:flex;flex-direction:column}
.stretch-side > .panel .quick{flex:1}
.quick{display:flex;flex-direction:column;gap:12px;padding:18px 20px 22px}
.qb{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 20px;
  font-size:16px;font-weight:800;cursor:pointer;color:var(--ink);
  transition:all .25s cubic-bezier(.34,1.56,.64,1);display:flex;flex-direction:row;
  align-items:center;gap:16px;box-shadow:0 4px 14px rgba(30,70,110,.06);text-align:left}
.qb:hover{border-color:var(--gold);color:var(--gold-dk);transform:translateY(-3px)}
.qb img{width:68px;height:68px;object-fit:contain;
  image-rendering:pixelated;filter:drop-shadow(0 4px 8px rgba(30,70,110,.12))}

/* ── เมนูบริการผู้เล่น: ตกแต่งด้วยเฉดสีธาตุตามสีขุนพล (Elemental Soft Gradient) ── */
.qb.color-water {
  background: linear-gradient(135deg, #e6f0fa 0%, #ffffff 100%);
  border: 1.5px solid #bcd8f1;
}
.qb.color-water:hover {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #d3e5f7 0%, #ffffff 100%);
}

.qb.color-earth {
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%);
  border: 1.5px solid #f6dfae;
}
.qb.color-earth:hover {
  border-color: #f0a015;
  background: linear-gradient(135deg, #ffedd0 0%, #ffffff 100%);
}

.qb.color-fire {
  background: linear-gradient(135deg, #fdf2f2 0%, #ffffff 100%);
  border: 1.5px solid #fbd5d5;
}
.qb.color-fire:hover {
  border-color: #ee5253;
  background: linear-gradient(135deg, #fce8e8 0%, #ffffff 100%);
}

.qb.color-wood {
  background: linear-gradient(135deg, #edfbf4 0%, #ffffff 100%);
  border: 1.5px solid #c2eed7;
}
.qb.color-wood:hover {
  border-color: #10ac84;
  background: linear-gradient(135deg, #dbf8e8 0%, #ffffff 100%);
}

.qb.color-wind {
  background: linear-gradient(135deg, #ebf3fc 0%, #ffffff 100%);
  border: 1.5px solid #cce0f5;
}
.qb.color-wind:hover {
  border-color: #2185d0;
  background: linear-gradient(135deg, #dbebfa 0%, #ffffff 100%);
}

.cityhead{padding:20px 22px 14px;border-bottom:1px solid var(--line)}
.cityhead h3{font-size:18px;font-weight:800}
.cityhead div{font-size:12px;color:var(--gold-dk);font-weight:700;margin-top:3px}
.city{padding:14px 16px 18px;display:flex;flex-direction:column;gap:9px}
.crow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;
  border-radius:8px;background:#f7fafd;border:1px solid var(--line2);transition:all .22s}
.crow:hover{background:#fff;transform:translateX(3px)}
.crow.own{background:#fff8ea;border-color:#f6dfae}
.crow .nm{font-size:14.5px;font-weight:700}
.own-badge{padding:4px 13px;border-radius:11px;font-size:12.5px;font-weight:800;color:#fff;
  background:linear-gradient(135deg,var(--gold),var(--red))}
.free-badge{padding:4px 11px;border-radius:11px;font-size:12px;font-weight:600;color:var(--mute);
  background:#fff;border:1px solid var(--line)}

/* ── ขุนพล ───────────────────────────────────────────────────────────────── */
.pets{padding:72px 0;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.shead{text-align:center;margin-bottom:14px}
.shead .eye{font-size:11.5px;font-weight:800;letter-spacing:.24em;color:var(--gold-dk)}
.shead h2{font-size:clamp(24px,3vw,33px);font-weight:800;margin-top:9px}
.shead p{font-size:14.5px;color:var(--ink2);margin-top:11px;max-width:64ch;margin-inline:auto}
.patoline{display:flex;gap:54px;justify-content:center;align-items:flex-end;margin:40px 0 34px;flex-wrap:wrap}
.patoline figure{display:flex;flex-direction:column;align-items:center;gap:14px}
.patoline img{height:168px;width:auto;image-rendering:pixelated;
  filter:drop-shadow(0 12px 16px rgba(30,70,110,.28));transition:transform .22s}
.patoline figure:hover img{transform:translateY(-10px) scale(1.05)}
.patoline figcaption{text-align:center;font-size:16px;font-weight:800;line-height:1.4}
.patoline figcaption span{display:block;font-size:11.5px;font-weight:800;color:var(--gold-dk);
  letter-spacing:.12em;margin-top:3px}
.pmore{text-align:center;margin-top:26px}
.sprites{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;padding:4px 0 0}
.sprites img{height:70px;width:auto;image-rendering:pixelated;
  filter:drop-shadow(0 6px 8px rgba(30,70,110,.18));transition:transform .18s}
.sprites img:hover{transform:translateY(-6px) scale(1.08)}

/* ── หน้าใน (เหรียญ/ร้าน/ไอดี) ─────────────────────────────────────────────── */
section.band{padding:52px 0}
section.band h2{font-size:clamp(21px,2.6vw,30px);font-weight:800;margin:8px 0 6px}
section.band p.sub{color:var(--ink2);font-size:15px;margin-bottom:26px}
.eyebrow{font-size:11.5px;font-weight:800;letter-spacing:.22em;color:var(--gold-dk);text-transform:uppercase}
.grid{display:grid;gap:18px}
.grid.c3{grid-template-columns:repeat(auto-fit,minmax(270px,1fr))}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px;
  box-shadow:0 1px 2px rgba(22,40,60,.04)}
.card h3{font-size:17px;font-weight:800;margin-bottom:8px}
.card p{color:var(--ink2);font-size:14.5px;line-height:1.7}
.balance{display:flex;align-items:center;gap:18px;background:var(--card);border:1px solid var(--line);
  border-radius:18px;padding:26px 28px;flex-wrap:wrap}
.balance .num{font-size:40px;font-weight:800;line-height:1;color:var(--gold-dk)}
.balance .lbl{font-size:13.5px;color:var(--ink2)}
.coin-chip{display:inline-flex;align-items:center;gap:7px;font-weight:800;font-size:13.5px;
  background:#fff8e8;border:1px solid #f6dfae;color:var(--gold-dk);border-radius:999px;padding:6px 13px}
table.tbl{width:100%;border-collapse:collapse;background:var(--card);border:1px solid var(--line);
  border-radius:14px;overflow:hidden;font-size:14.5px}
table.tbl th{text-align:left;background:#eff5fa;color:var(--ink2);font-weight:700;padding:12px 14px;
  border-bottom:1px solid var(--line);font-size:13px}
table.tbl td{padding:12px 14px;border-bottom:1px solid var(--line2)}
table.tbl tr:last-child td{border-bottom:0}
table.tbl tr:hover td{background:#fbfdff}
.right{text-align:right}
.note{border-radius:14px;padding:15px 18px;font-size:14.5px;line-height:1.7;border:1px solid}
.note.warn{background:#fff8ea;border-color:#f6dfae;color:#7a5200}
.note.info{background:#eff6ff;border-color:#cfe0f8;color:#1c4a86}
.note.err{background:#fff1f1;border-color:#f6cccc;color:#96262a}

/* ── ฟุตเตอร์ ─────────────────────────────────────────────────────────────── */
footer{background:#fff;border-top:1px solid var(--line);padding:48px 0 26px;color:var(--ink2);font-size:13.5px}
footer .cols4{display:flex;gap:64px;flex-wrap:wrap}
footer h4{color:var(--ink);font-size:14px;font-weight:800;margin-bottom:13px}
footer a{display:block;padding:5px 0;color:var(--ink2)}
footer a:hover{color:var(--gold-dk)}
footer .about{max-width:290px;line-height:2}
footer .bottom{margin-top:30px;padding-top:20px;border-top:1px solid var(--line);font-size:12px;
  color:var(--mute);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}

@media(max-width:980px){
  .cols{grid-template-columns:1fr}
  .nav menu{display:none}
  /* 🔑 .hero เป็น flex ⇒ พอมาสคอตเป็น position:relative มันจะไปยืนข้างตัวหนังสือ
     ต้องสั่ง flex-direction:column + order ใหม่ (มาสคอตเขียนไว้ก่อน .hero-in ในโค้ด) */
  .hero{height:auto;min-height:0;max-height:none;flex-direction:column;justify-content:center;
    text-align:center;padding:calc(var(--nav-h) + 26px) 0 0}
  .hero-in{order:1;max-width:100%;margin:0 auto;padding:0 22px}
  .hero .cta{justify-content:center} .hero p{margin-inline:auto}
  .hero-mascot{order:2;position:relative;right:auto;bottom:auto;height:auto;width:min(320px,66vw);
    margin:24px auto -8px;display:block}
  .hero::after{background:linear-gradient(0deg,var(--paper) 4%,rgba(244,248,252,.5) 38%,rgba(255,255,255,.35) 100%)}
}
@media(max-width:620px){
  .ni{flex-direction:column} .ni .th{width:100%;height:190px}
  .nav{height:64px;gap:10px} :root{--nav-h:64px}
  .brand img{height:36px} .brand span{font-size:12px}
  .btn-line,.btn-gold{padding:8px 14px;font-size:13px}
  .hero h1{font-size:32px} .hero p{font-size:14.5px}
  .btn-xl{padding:14px 26px;font-size:16.5px}
  .patoline{gap:30px} .patoline img{height:128px}
}

/* ── คลาสช่วยจัดระยะ/ความกว้าง (แทน style= ในหน้า) ────────────────────────────
   🔴 CSP ของเรา = `style-src 'self'` **ไม่มี unsafe-inline** ⇒ เขียน style="..."
   ในหน้าเว็บเบราว์เซอร์จะ **บล็อกทิ้งเงียบ ๆ** (เห็นแค่ error ใน console)
   ⇒ ทุกอย่างที่เคยเป็น inline ย้ายมาเป็นคลาสที่นี่ทั้งหมด */
.mt-sm{margin-top:10px} .mt-md{margin-top:20px} .mt-lg{margin-top:30px}
.mb-sm{margin-bottom:10px} .mb-md{margin-bottom:22px} .mb-lg{margin-bottom:32px}
.w-full{width:100%}
.narrow{max-width:560px} .mid{max-width:820px} .wide{max-width:1040px}
.muted{color:var(--mute)} .dim{color:var(--ink2)}
.small{font-size:13px} .tiny{font-size:12px}
.center{text-align:center}
.row-gap{display:flex;gap:12px;flex-wrap:wrap;align-items:center}

/* ช่องว่างในตาราง ("ยังไม่มีข้อมูล") */
.empty{color:var(--mute);padding:26px 14px;text-align:center}

/* ── โครงหน้าใน: หัวหน้า + สารบัญ + ขั้นตอน + คำถามที่พบบ่อย ─────────────────── */
.pagehead{padding:44px 0 8px}
.pagehead h1{font-size:clamp(24px,3.2vw,36px);font-weight:800;margin:8px 0 8px}
.pagehead p{color:var(--ink2);font-size:15px;line-height:1.8;max-width:70ch}
.crumb{font-size:12.5px;color:var(--mute);font-weight:600}
.crumb a:hover{color:var(--gold-dk)}

.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
.filters input,.filters select{font-family:inherit;font-size:14px;color:var(--ink);
  background:#fff;border:1px solid var(--line);border-radius:8px;padding:9px 12px}
.filters input:focus,.filters select:focus{outline:2px solid var(--gold2);outline-offset:1px}
.filters input[type=text]{min-width:220px}

.pager{display:flex;gap:7px;justify-content:center;margin-top:24px}
.pager a,.pager span{min-width:36px;height:36px;display:inline-flex;align-items:center;
  justify-content:center;border-radius:8px;border:1px solid var(--line);background:#fff;
  font-size:14px;font-weight:700;color:var(--ink2)}
.pager .on{background:var(--gold);border-color:var(--gold);color:#4a2f00}
.pager .off{opacity:.45}

.steps{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));counter-reset:st}
.steps .card{position:relative;padding-top:26px}
.steps .card::before{counter-increment:st;content:counter(st);position:absolute;top:-14px;left:20px;
  width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:16px;color:#4a2f00;background:linear-gradient(180deg,var(--gold2),var(--gold));
  box-shadow:0 3px 0 var(--gold-dk)}

.faq{display:flex;flex-direction:column;gap:12px}
.faq details{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px 18px}
.faq summary{font-weight:800;font-size:15.5px;cursor:pointer;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:"＋";color:var(--gold-dk);font-weight:800;margin-right:9px}
.faq details[open] summary::before{content:"－"}
.faq details p{color:var(--ink2);font-size:14.5px;line-height:1.8;margin-top:11px}

/* สารบัญด้านข้าง (คู่มือ/กฎ) */
.toc{position:sticky;top:calc(var(--nav-h) + 18px);background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:16px 18px}
.toc h4{font-size:13px;font-weight:800;color:var(--ink2);letter-spacing:.06em;margin-bottom:10px}
.toc a{display:block;padding:6px 0;font-size:14px;color:var(--ink2);border-bottom:1px solid var(--line2)}
.toc a:last-child{border-bottom:0}
.toc a:hover{color:var(--gold-dk)}
.docs{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:22px;align-items:start}
/* 🔑 ต้องคลุม h2 ด้วย — เนื้อหาหน้ากฎ/คู่มือมาจากหลังบ้านเป็น Markdown แล้ว `## หัวข้อ` แปลงเป็น <h2>
   (ถ้าคลุมแค่ h3 หัวข้อจะกลายเป็นตัวใหญ่ไม่เข้าพวก และ scroll-margin หายไป = ลิงก์สารบัญพาไปแล้วหัวข้อ
   ถูกแถบเมนูด้านบนทับ) */
.docs article h2,
.docs article h3{font-size:19px;font-weight:800;margin:26px 0 10px;scroll-margin-top:calc(var(--nav-h) + 16px)}
.docs article h2:first-child,
.docs article h3:first-child{margin-top:0}
.docs article p,.docs article li{color:var(--ink2);font-size:14.8px;line-height:1.9}
.docs article ul,.docs article ol{margin:8px 0 8px 22px}

/* ป้ายสถานะเล็ก ๆ (โครง/เปิดแล้ว/ปิด) */
.pill{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:999px;
  font-size:12px;font-weight:800;border:1px solid}
.pill-soon{background:#fff8ea;border-color:#f6dfae;color:#7a5200}
.pill-live{background:#eafaf4;border-color:#bfe9d9;color:#0a7a5c}
.pill-off{background:#f5f8fb;border-color:var(--line);color:var(--mute)}

/* แถวรายการกว้างเต็ม (ประมูล/อันดับ) */
.rankname{font-weight:700}
.rank1{color:var(--gold-dk);font-weight:800}

@media(max-width:980px){ .docs{grid-template-columns:1fr} .toc{position:static} }

/* ฟอร์มเล็กในหน้าเหรียญ (เคยเป็น inline style) */
.inline-form{display:flex;gap:10px;align-items:center;margin-bottom:22px;flex-wrap:wrap}
.inline-form input{font-family:inherit;font-size:15px;padding:11px 14px;border:1.5px solid #cfdded;
  border-radius:12px;width:220px;color:var(--ink);background:#fff}
.inline-form input:focus{outline:2px solid var(--gold2);outline-offset:1px}
.push-right{margin-left:auto;display:flex;gap:10px;flex-wrap:wrap}

/* ── ตารางหลายคอลัมน์บนจอแคบ ────────────────────────────────────────────────
   🔴 `body{overflow-x:hidden}` ทำให้ตารางที่กว้างเกินจอถูก **ตัดหายไปเลย** (ไม่ใช่แค่เลื่อนไม่ได้)
   ⇒ ตารางที่มี 5-6 คอลัมน์ต้องอยู่ในกล่องที่เลื่อนซ้าย-ขวาได้เอง */
.tblwrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px}
.tblwrap>table.tbl{min-width:640px}

/* ── หน้าใน 2 คอลัมน์ (เนื้อหา + แถบข้าง) ─────────────────────────────────────
   user 2026-08-25: "ด้านข้างมันดูโล้นไป" ⇒ หน้าในทุกหน้าใช้ผังเดียวกับหน้าแรก
   (.cols = 1fr + 340px) แล้วเอา partial `_Side` ไปวางคอลัมน์ขวา */
.colmain{min-width:0}
.colmain>h2:first-child,.colmain>.eyebrow:first-child{margin-top:0}
.docside{display:flex;flex-direction:column;gap:18px;min-width:0}
/* 📐 ให้เท่ากับ .pgwrap ของหน้าอื่น (user ทัก 2026-09-07: หน้ากฎกว้างไม่เท่าเพื่อน)
   🔴 ของเดิมตั้งไว้ 300px + gap 28 ⇒ เนื้อหาแคบกว่าหน้าอื่น 88px */
.docs{grid-template-columns:minmax(0,1fr) 268px;gap:22px}
@media(max-width:980px){ .docs{grid-template-columns:1fr} }

/* ── CRITICAL MOBILE RESPONSIVE OVERRIDES ─────────────────────────────────── */
@media (max-width: 980px) {
  .nav {
    padding: 0 16px !important;
    justify-content: space-between !important;
    height: 64px !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
  }
  :root {
    --nav-h: 64px !important;
  }
  .navbtn {
    display: flex !important;
    margin-left: auto !important;
    z-index: 1002 !important;
  }
  .nav .right {
    display: none !important;
  }
  .nav menu {
    display: none !important;
    position: absolute !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    flex-direction: column !important;
    padding: 16px 24px 24px !important;
    gap: 12px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(226, 235, 243, 0.9) !important;
    box-shadow: 0 12px 30px rgba(22, 28, 45, 0.12) !important;
    z-index: 1001 !important;
  }
  .navtoggle:checked ~ menu {
    display: flex !important;
  }
  .nav menu a {
    font-size: 15.5px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(226, 235, 243, 0.6) !important;
  }
  .navbtn span {
    background: #16283c !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(2) {
    opacity: 0 !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }
}

@media (max-width: 768px) {
  .hero-section, .hero {
    height: auto !important;
    min-height: auto !important;
    padding: 24px 0 36px !important;
    overflow: hidden !important;
  }
  .hero-bg-overlay {
    background-position: 82% top !important;
    opacity: 0.4 !important;
  }
  .hero-bg-gradient {
    background: linear-gradient(180deg, rgba(244, 246, 249, 0.96) 0%, rgba(244, 246, 249, 0.88) 50%, rgba(244, 246, 249, 0.98) 100%) !important;
  }
  .hero-content, .hero-in {
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .hero-left {
    max-width: 100% !important;
    width: 100% !important;
  }
  .hero-title-area h1, .hero h1 {
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.15 !important;
    margin-bottom: 12px !important;
  }
  .hero-left .glass-panel {
    padding: 18px 16px !important;
  }
  .hero-left .panel-title {
    font-size: 15px !important;
  }
  .hero-left .panel-desc {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
  }

  /* 🔴 FORCE 1-COLUMN VERTICAL STACK ON MOBILE CARDS 🔴 */
  .features-section {
    padding: 24px 0 36px !important;
  }
  .features-section .wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 0 16px !important;
  }
  .feature-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    height: 128px !important;
    padding: 16px 18px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(22, 28, 45, 0.04) !important;
  }
  .feature-card .feat-content {
    max-width: 65% !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .feature-card .feat-label {
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
  }
  .feature-card .feat-title {
    font-size: 17.5px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
  }
  .feature-card .feat-art {
    width: 100px !important;
    height: 112% !important;
    right: 8px !important;
    bottom: -4px !important;
  }
  .feature-card .feat-art img {
    height: 96% !important;
  }

  footer .cols4 {
    grid-template-columns: 1fr !important;
  }
}

/* Fix Navbar Action Buttons No-Wrap & Responsive Drawer Breakpoint (<= 1140px) */
.nav .right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
.nav .right .btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
}

@media (max-width: 1140px) {
  .nav {
    padding: 0 16px !important;
    justify-content: space-between !important;
    height: 64px !important;
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 100 !important;
  }
  :root {
    --nav-h: 64px;
  }
  .navbtn {
    display: flex !important;
    margin-left: auto !important;
  }
  .nav .right {
    display: none !important;
  }
  .nav menu {
    display: none !important;
    position: absolute !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    flex-direction: column !important;
    padding: 16px 24px 24px !important;
    gap: 12px !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(226, 235, 243, 0.9) !important;
    box-shadow: 0 12px 30px rgba(22, 28, 45, 0.12) !important;
    z-index: 99 !important;
  }
  .navtoggle:checked ~ menu {
    display: flex !important;
  }
  .nav menu a {
    font-size: 15.5px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(226, 235, 243, 0.6) !important;
  }
  .navbtn span {
    background: var(--text-main) !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(2) {
    opacity: 0 !important;
  }
  .navtoggle:checked ~ .navbtn span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }
}

/* ── Fresh AAA Official Game News Portal Styling ──────────────────────────── */
.news-page-container {
  width: min(1420px, 95vw);
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* 🌄 Ethereal Pure Landscape Scenery Wallpaper System
   ℹ️ 2026-09-14 เคยย้ายไปเป็นชั้นลอย `html::before` ตอนไล่หาสาเหตุ "หน้าเว็บค้าง"
      แล้ว**คืนกลับมาแบบเดิม** เพราะพิสูจน์ได้ว่าอาการค้างเป็นที่เครื่อง/Edge ไม่ใช่ CSS
      (ไฟล์ HTML เปล่าในเครื่องก็ค้าง · Chrome ไม่ค้าง · หายหลังอัปเดตวินโดวส์)
   📌 ถ้าวันหลังเจอเครื่องที่วาดไม่ไหวจริง ๆ ท่าชั้นลอยอยู่ในประวัติ เอากลับมาใช้ได้ */
body {
  background-color: #f4f6f9 !important;
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.35) 0%, rgba(244, 246, 249, 0.82) 55%, rgba(235, 240, 246, 0.94) 100%),
    url('/img/bg_site.jpg') !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: cover !important;
  background-attachment: fixed !important;
}

/* News Header (Crumb on Right) */
.news-header-compact {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-left: 5px solid var(--gold-dark);
  border-radius: 12px;
  padding: 14px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(22, 28, 45, 0.03);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.news-header-compact h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}
.news-header-compact .crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: auto !important;
  margin-bottom: 0 !important;
}
.news-header-compact .crumb a {
  color: var(--gold-dark);
}

/* ── Footer Styling ──────────────────────────────────────────────────────── */
footer {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-top: 1px solid rgba(226, 235, 243, 0.95) !important;
  padding: 22px 0 20px !important;
  margin-top: 40px !important;
}

.footer-compact-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

.footer-brand-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.footer-brand-side p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.footer-links-side {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links-side a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  transition: color 0.2s ease;
  text-decoration: none;
}
.footer-links-side a:hover {
  color: var(--gold-dark);
}

@media (max-width: 768px) {
  footer {
    padding: 20px 0 24px !important;
  }
  .footer-compact-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .footer-links-side {
    gap: 14px 18px !important;
  }
}

/* ── Redesigned AAA Official Item Shop Styling (Pages/ItemShop.cshtml) ─────── */
.shop-page-container {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 40px 0 110px !important;
}

/* Header Compact matching News.cshtml */
.events-header-compact {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-left: 5px solid var(--gold-dark);
  border-radius: 12px;
  padding: 14px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(22, 28, 45, 0.03);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.events-header-compact h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}
.events-header-compact .crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: auto !important;
  margin-bottom: 0 !important;
}
.events-header-compact .crumb a {
  color: var(--gold-dark);
}

.ev-card-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(226, 235, 243, 0.8);
}

/* Info Grid Table */
.ev-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
  background: #f8fafc;
  border: 1px solid rgba(226, 235, 243, 0.8);
  border-radius: 10px;
  padding: 18px 20px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.info-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-val {
  font-size: 13.5px;
  color: var(--text-main);
}

/* Rewards Section */
.ev-rewards-section h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 14px;
}
.rewards-items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.reward-box {
  background: #ffffff;
  border: 1px solid rgba(226, 235, 243, 0.9);
  border-radius: 10px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.22s ease;
}
.reward-box:hover {
  transform: translateY(-3px);
  border-color: var(--gold-dark);
  box-shadow: 0 6px 16px rgba(22, 28, 45, 0.06);
}
.reward-img {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.reward-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.reward-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.reward-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Time Notice */
.ev-time-notice {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ev-time-notice p {
  font-size: 13px;
  color: #b45309;
  margin: 0;
}

/* Sidebar / TOC */
.events-toc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.toc-box {
  background: #ffffff;
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(22, 28, 45, 0.04);
}
.toc-head {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 10px;
  border-bottom: 1.5px solid rgba(226, 235, 243, 0.8);
  margin-bottom: 12px;
}
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid rgba(226, 235, 243, 0.7);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.2s ease;
}
.toc-item:hover, .toc-item.active {
  background: #ffffff;
  border-color: var(--gold-dark);
  color: var(--gold-dark);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(22, 28, 45, 0.04);
}
.toc-item.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.live-dot { background: #10b981; }
.soon-dot { background: #94a3b8; }

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(226, 235, 243, 0.9);
  margin-bottom: 16px;
}
.diff-medium { background: #dbeafe; color: #1d4ed8; }
.diff-hard { background: #fef3c7; color: #b45309; }
.diff-boss { background: #fee2e2; color: #dc2626; }

/* Single Unified White Main Panel */
.news-panel {
  background: #ffffff;
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 10px 35px rgba(22, 28, 45, 0.05);
}

/* Top Hero Block (Banner + Pinned List) */
.news-hero-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.featured-banner-card {
  position: relative;
  aspect-ratio: 16 / 9;   /* 🖼️ มาตรฐานรูปข่าว 16:9 (เดิมสูงตายตัว 320px ⇒ รูปโดนตัดไม่เท่ากันทุกใบ) */
  border-radius: 12px;
  overflow: hidden;
  display: block;
  box-shadow: 0 6px 20px rgba(22, 28, 45, 0.08);
}
.featured-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured-banner-card:hover img {
  transform: scale(1.04);
}
.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.88) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
}
/* 🔖 ป้ายหมวดในแบนเนอร์ข่าวใหญ่ — ต้องกว้างเท่าตัวหนังสือ
   🔴 `.featured-overlay` เป็น flex คอลัมน์ ⇒ ลูกทุกตัวถูก**ยืดเต็มความกว้าง**เอง
      (ใส่ `display:inline-block` ที่ `.tag-badge` ไม่ช่วย — flex item ไม่สนใจค่านั้น)
      ⇒ ป้าย "ประกาศปักหมุด" พาดยาวทั้งแบนเนอร์ · user ทัก 2026-09-08 */
.featured-overlay .tag-badge {
  align-self: flex-start;
}
.featured-overlay h2 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 8px 0 6px;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.featured-overlay .date-str {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* Right Pinned List */
.news-pinned-list {
  background: #f8fafc;
  border: 1px solid rgba(226, 235, 243, 0.9);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pinned-head {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 8px;
  border-bottom: 1.5px solid rgba(226, 235, 243, 0.8);
}
.pinned-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(226, 235, 243, 0.7);
  transition: all 0.22s ease;
}
.pinned-item:hover {
  border-color: var(--gold-dark);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(22, 28, 45, 0.05);
}
/* รูปเล็กของ "ประกาศสำคัญ" — **16:9 เหมือนกรอบอื่นทั้งเว็บ** (user 2026-09-22)
   เดิมเป็นจัตุรัส 56×56 ⇒ รูปใบเดียวกันโดนตัดคนละแบบกับหน้าข่าว */
.pinned-thumb {
  flex-shrink: 0;
  width: 96px;
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f6;
  border: 1px solid rgba(226, 235, 243, 0.9);
}
.pinned-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}
.pinned-item:hover .pinned-thumb img {
  transform: scale(1.06);
}
.pinned-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.pinned-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  /* 🔴 ต้องมี max-width ด้วย ไม่ใช่แค่ ellipsis
     พ่อเป็น flex คอลัมน์ + `align-items:flex-start` ⇒ ลูกกว้างเท่าเนื้อหา และ `nowrap` ทำให้
     ความกว้างต่ำสุด = ความยาวหัวข้อทั้งบรรทัด ⇒ **หัวข้อยาวทะลุการ์ดออกไป** (จอ 375px ล้น 3px)
     ใส่ 100% แล้ว ellipsis จึงได้ทำงานจริง · เจอตอนไล่ 375px 2026-09-08 */
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.pinned-item:hover .pinned-info h4 {
  color: var(--gold-dark);
}

/* Tag Badges */
.tag-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}
.tag-red { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.tag-gold { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.tag-green { background: #d1fae5; color: #047857; border: 1px solid #a7f3d0; }
.tag-blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Filter Tabs Row */
.news-filter-row {
  margin-bottom: 20px;
  border-bottom: 1.5px solid rgba(226, 235, 243, 0.8);
  padding-bottom: 12px;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  /* 🔴 ต้องยอมขึ้นบรรทัดใหม่ — ป้าย 5 อันเรียงแถวเดียวกว้าง 478px
     บนจอ 375px แถวนี้ดัน**ทั้งหน้า**ให้เลื่อนซ้ายขวาได้ (แถบหัวเว็บยืดตามไป 478 ด้วย)
     · เจอตอนไล่ 375px รอบ 2026-09-08 (ตอนแรกมีป้าย 4 อันจึงยังไม่ล้น) */
  flex-wrap: wrap;
  row-gap: 8px;
}
.ftab {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid rgba(226, 235, 243, 0.9);
  background: #f8fafc;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ftab:hover, .ftab.active {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #ffffff;
}

/* News Table List */
.news-table-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(226, 235, 243, 0.9);
  border-radius: 12px;
  overflow: hidden;
}
.news-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: #ffffff;
  border-bottom: 1px solid rgba(226, 235, 243, 0.7);
  transition: all 0.22s ease;
}
.news-row:last-child {
  border-bottom: 0;
}
.news-row:hover {
  background: #f8fafc;
  transform: translateX(4px);
}
/* 🖼️ รูปประกอบทุกหัวข้อข่าว (user 2026-09-07 "ให้เห็นรูปทุกหัวข้อเลย") ──────────
   ⚠️ กฎชุดหน้าข่าว **มีสำเนาอยู่ใน `modern.css` ด้วย** แต่ของในนั้น **ตายทั้งก้อน**
      (บล็อก `footer .bottom` ไม่มีปีกกาปิด บรรทัด ~1155 → ตัวแปลง CSS กลืนที่เหลือทิ้ง)
      ⇒ **แผ่นที่ทำงานจริงคือไฟล์นี้** · แก้ที่นี่เท่านั้น ไม่งั้นแก้แล้วไม่เห็นผล
   .row-badge คงไว้เผื่อหน้าอื่นเรียกใช้ (หน้าข่าวย้ายป้ายเข้าไปใน .row-title แล้ว) */
.row-badge {
  flex-shrink: 0;
  width: 75px;
}
.row-thumb {
  flex-shrink: 0;
  width: 144px;
  height: 81px;   /* 16:9 พอดี (เดิม 132×80 = 16:9.7) */
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f6;
  border: 1px solid rgba(226, 235, 243, 0.9);
}
.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}
.news-row:hover .row-thumb img {
  transform: scale(1.06);
}
.row-title {
  flex: 1;
  min-width: 0;
}
.row-title .tag-badge {
  margin-bottom: 6px;
}
.row-title h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}
.news-row:hover .row-title h3 {
  color: var(--gold-dark);
}
.row-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-date {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.row-arrow {
  flex-shrink: 0;
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.news-row:hover .row-arrow {
  color: var(--gold-dark);
  transform: translateX(3px);
}

/* Pagination */
.news-pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}
.pbtn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(226, 235, 243, 0.9);
  background: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.pbtn:hover, .pbtn.active {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #ffffff;
}
.pbtn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 980px) {
  .news-panel {
    padding: 20px 18px !important;
  }
  .news-hero-block {
    grid-template-columns: 1fr !important;
  }
  .featured-banner-card {
    aspect-ratio: 16 / 9 !important;   /* สูงตามความกว้างจอ ไม่ล็อก 220px */
  }
  .featured-overlay h2 {
    font-size: 17px !important;
  }
  .news-row {
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }
  /* จอแคบ: รูปเล็กลงแต่ยังอยู่ครบทุกแถว · ซ่อนวันที่แทน (พื้นที่ไม่พอ) */
  .row-thumb {
    width: 96px !important;
    height: 54px !important;
  }
  .row-title h3 {
    white-space: normal !important;
  }
  .row-title p {
    white-space: normal !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .row-date {
    display: none !important;
  }
  .row-arrow {
    display: none !important;
  }
}

/* ── Ultra AAA Item Shop Styling (Pages/ItemShop.cshtml) ─────────────────── */
.shop-page-container {
  width: min(1280px, 92vw);
  margin: 0 auto;
  padding: 40px 0 80px;
}

/* Header Compact matching News & Events */
.shop-header-compact {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-left: 5px solid var(--gold-dark);
  border-radius: 12px;
  padding: 14px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 18px rgba(22, 28, 45, 0.03);
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.shop-header-compact h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}
.shop-header-compact .crumb {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: auto !important;
  margin-bottom: 0 !important;
}
.shop-header-compact .crumb a {
  color: var(--gold-dark);
}

.header-right-group {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin-left: auto !important;
}

.btn-header-topup {
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 12px rgba(185, 118, 10, 0.25) !important;
  white-space: nowrap !important;
}

/* Main Shop Panel */
.shop-panel {
  width: 100%;
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 32px 36px !important;
  box-shadow: 0 10px 35px rgba(22, 28, 45, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 28px !important;
}

/* 🌟 Spotlight Hero Banner */
.shop-spotlight-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-radius: 16px !important;
  padding: 32px 40px !important;
  display: grid !important;
  grid-template-columns: 1fr 220px !important;
  gap: 32px !important;
  align-items: center !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.spotlight-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  z-index: 2 !important;
}
.spotlight-badge {
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  width: fit-content !important;
}
.spotlight-left h2 {
  font-size: clamp(22px, 3vw, 30px) !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.25 !important;
}
.spotlight-left p {
  font-size: 14px !important;
  color: #94a3b8 !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}
.spotlight-price-row {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  margin-top: 10px !important;
}
.spotlight-price {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}
.spotlight-price .num {
  font-size: 32px !important;
  font-weight: 900 !important;
  color: #f59e0b !important;
}
.spotlight-price .unit {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #cbd5e1 !important;
}

.spotlight-right {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
}
.spotlight-img-wrap {
  width: 140px !important;
  height: 140px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 2px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.25) !important;
}
.spotlight-img-wrap img {
  max-width: 96px !important;
  max-height: 96px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4)) !important;
}

/* User Points Bar v2 */
.user-points-bar-v2 {
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.9) !important;
  border-left: 4px solid var(--gold-dark) !important;
  border-radius: 12px !important;
  padding: 16px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
}
.pts-box {
  display: flex !important;
  align-items: baseline !important;
  gap: 12px !important;
}
.pts-box .pts-label {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
}
.pts-box .pts-val {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--gold-dark) !important;
}
.pts-action {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}
.pts-hint {
  font-size: 13px !important;
  color: var(--text-muted) !important;
}

/* Controls Bar */
.shop-controls-bar {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  padding-bottom: 12px !important;
  border-bottom: 1.5px solid rgba(226, 235, 243, 0.9) !important;
}
.shop-tabs-nav {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}

/* 🌟 Top-Up Tab Button in Front of 'ทั้งหมด' */
.shop-tab-topup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 9px 20px !important;
  border-radius: 20px !important;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff !important;
  border: 1px solid #34d399 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.28) !important;
  transition: all 0.22s ease !important;
  cursor: pointer !important;
}
.shop-tab-topup:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
  color: #ffffff !important;
}

.tab-topup-icon {
  flex-shrink: 0 !important;
}
.shop-tab {
  padding: 9px 20px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  background: #f8fafc !important;
  color: var(--text-muted) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.shop-tab:hover, .shop-tab.active {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  color: #ffffff !important;
}

.shop-search-row {
  display: flex !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}
.search-field {
  flex: 1 !important;
  min-width: 220px !important;
}
.search-field input {
  width: 100% !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  font-size: 13.5px !important;
  color: var(--text-main) !important;
  outline: none !important;
}
.select-field {
  padding: 9px 14px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  outline: none !important;
  cursor: pointer !important;
}

/* 🌟 Grid & Rarity Item Cards AAA */
.shop-grid-aaa {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
}

.item-card-aaa {
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 20px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  position: relative !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 14px rgba(22, 28, 45, 0.02) !important;
  overflow: hidden !important;
}
.item-card-aaa:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 30px rgba(22, 28, 45, 0.08) !important;
}

/* Rarity Styling */
.rarity-legendary {
  border-color: #fde68a !important;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 40%) !important;
}
.rarity-legendary:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.18) !important;
}
.rarity-legendary .rarity-badge { background: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.rarity-legendary .item-icon-frame { border-color: #fde68a !important; background: #fffdf5 !important; }

.rarity-epic {
  border-color: #e9d5ff !important;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 40%) !important;
}
.rarity-epic:hover {
  border-color: #a855f7 !important;
  box-shadow: 0 12px 30px rgba(168, 85, 247, 0.15) !important;
}
.rarity-epic .rarity-badge { background: #f3e8ff !important; color: #7e22ce !important; border: 1px solid #e9d5ff !important; }
.rarity-epic .item-icon-frame { border-color: #e9d5ff !important; background: #fcf9ff !important; }

.rarity-rare {
  border-color: #bfdbfe !important;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 40%) !important;
}
.rarity-rare:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15) !important;
}
.rarity-rare .rarity-badge { background: #dbeafe !important; color: #1d4ed8 !important; border: 1px solid #bfdbfe !important; }
.rarity-rare .item-icon-frame { border-color: #bfdbfe !important; background: #f8fafc !important; }

.rarity-normal .rarity-badge { background: #f1f5f9 !important; color: #64748b !important; border: 1px solid #e2e8f0 !important; }
.rarity-normal .item-icon-frame { border-color: #e2e8f0 !important; background: #f8fafc !important; }

.card-top-tag {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-start !important;
  margin-bottom: 12px !important;
}
.rarity-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  padding: 3px 9px !important;
  border-radius: 4px !important;
}

.item-icon-frame {
  width: 80px !important;
  height: 80px !important;
  border-radius: 16px !important;
  border: 1.5px solid !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 14px !important;
  transition: transform 0.25s ease !important;
}
.item-card-aaa:hover .item-icon-frame {
  transform: scale(1.08) !important;
}
.item-icon-frame img {
  max-width: 56px !important;
  max-height: 56px !important;
  object-fit: contain !important;
}

.item-info-box h3 {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 0 4px !important;
}
.item-info-box p {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  line-height: 1.45 !important;
  margin: 0 0 16px !important;
  min-height: 35px !important;
}

.item-buy-area {
  width: 100% !important;
  margin-top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.item-price {
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 4px !important;
}
.item-price .p-num {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--gold-dark) !important;
}
.item-price .p-unit {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--text-muted) !important;
}

/* Responsive Grid */
@media (max-width: 1024px) {
  .shop-grid-aaa {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .shop-spotlight-hero {
    grid-template-columns: 1fr !important;
    padding: 24px 28px !important;
  }
  .spotlight-right {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .shop-grid-aaa {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .user-points-bar-v2 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}
/* 🌟 Full Edge-to-Edge Product Banner Card Grid */
.shop-grid-edge {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
}

@media (max-width: 1080px) {
  .shop-grid-edge {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}
@media (max-width: 640px) {
  .shop-grid-edge {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .shop-panel {
    padding: 16px 14px !important;
  }
  .product-cover-frame {
    height: 180px !important;
  }
}

.card-edge-to-edge {
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 16px rgba(22, 28, 45, 0.03) !important;
}

/* 🐞 กฎนี้เคย "หัวหาย" (ไม่มีชื่อ selector) มาก่อน ⇒ เบราว์เซอร์ทิ้งทั้งก้อนเงียบ ๆ
   คืนชื่อให้ตรงกับตัวที่กฎ .rarity-* ข้างล่างอ้างถึง */
.card-single-img-wrap {
  border-bottom: 1px solid rgba(226, 235, 243, 0.9) !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

.big-product-img {
  max-width: 90px !important;
  max-height: 90px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12)) !important;
  transition: transform 0.3s ease !important;
}
.card-single-item:hover .big-product-img {
  transform: scale(1.15) !important;
}

/* Rarity Accents for Big Single Image Header */
.rarity-legendary .card-single-img-wrap {
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%) !important;
  border-bottom-color: #fde68a !important;
}
.rarity-epic .card-single-img-wrap {
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%) !important;
  border-bottom-color: #e9d5ff !important;
}
.rarity-rare .card-single-img-wrap {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%) !important;
  border-bottom-color: #bfdbfe !important;
}
.rarity-normal .card-single-img-wrap {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border-bottom-color: #e2e8f0 !important;
}

/* Floating Badges */
.rarity-badge-floating {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 4 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  padding: 3px 10px !important;
  border-radius: 4px !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

.price-badge-floating {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 4 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em !important;
  padding: 3px 10px !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  background: rgba(185, 118, 10, 0.9) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 215, 0, 0.5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.card-content-body {
  padding: 20px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 !important;
  background: #ffffff !important;
}
.card-content-body h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
}
.card-content-body p {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  line-height: 1.5 !important;
  margin: 0 0 10px !important;
  min-height: 38px !important;
}

.prominent-price-box {
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  display: flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-bottom: 12px !important;
}
.price-label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
}
.price-amount {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--gold-dark) !important;
}
.price-currency {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: var(--gold-dark) !important;
}

/* 🛒 Floating Sticky Points & Shopping Cart Bar Styling */
.floating-cart-bar {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  z-index: 999 !important;
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 50px !important;
  padding: 12px 24px !important;
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.35) !important;
  color: #ffffff !important;
}

.f-cart-pts {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.f-cart-pts .lbl {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}
.f-cart-pts .val {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #f59e0b !important;
}

.f-pts-val-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.pts-plus-icon {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: #f59e0b !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4) !important;
}
.pts-plus-icon:hover {
  transform: scale(1.15) !important;
  background: #ffffff !important;
  color: #b45309 !important;
}

.f-cart-divider {
  width: 1px !important;
  height: 32px !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.f-cart-summary {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.cart-ico {
  font-size: 22px !important;
  line-height: 1 !important;
}
.cart-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.cart-count {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}
.cart-total {
  font-size: 12px !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}

.btn-checkout {
  padding: 10px 22px !important;
  border-radius: 30px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  /* 🟡 ปุ่มสั่งซื้อ — ทองแบนตัวเดียวกับปุ่มหลักทั้งเว็บ (เดิมเป็นไล่เฉดส้ม-น้ำตาล) */
  background: #d3a53c !important;
  color: #3a2600 !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
}

.btn-checkout[disabled], .btn-gold[disabled] {
  background: #cbd5e1 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: none !important;
  opacity: 0.7 !important;
}

@media (max-width: 768px) {
  .floating-cart-bar {
    bottom: 16px !important;
    right: 16px !important;
    left: 16px !important;
    border-radius: 20px !important;
    padding: 12px 18px !important;
    justify-content: space-between !important;
  }
}

/* 🌟 Redesigned Centered AAA Pagination Bar */
.shop-pagination, .news-pager, .pager {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 32px !important;
  width: 100% !important;
}

.p-btn, .pbtn, .pager span, .pager a {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(22, 28, 45, 0.03) !important;
  transition: all 0.22s ease !important;
  cursor: pointer !important;
}

.p-btn:hover, .pbtn:hover, .pager a:hover {
  background: #f8fafc !important;
  border-color: var(--gold-dark) !important;
  color: var(--gold-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(22, 28, 45, 0.08) !important;
}

.p-btn.active, .pbtn.active, .pager span.on {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(185, 118, 10, 0.35) !important;
}

.p-btn.disabled, .pbtn.disabled, .pager span.off {
  opacity: 0.35 !important;
  pointer-events: none !important;
  background: #f8fafc !important;
  border-color: rgba(226, 235, 243, 0.8) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
}

/* ── Redesigned Single Viewport AAA TopUp Page Styling (Pages/TopUp.cshtml) ─────── */
/*  📐 ขยายเท่า `.wrap` ของหน้าอื่น (2026-09-08) ตอนเพิ่มแถบข้างสมาชิกให้หน้านี้
    เดิม 1180px ⇒ พอหักแถบข้าง 268 + gap 22 เนื้อหาจะเหลือ 890px แคบกว่าเดิมเยอะ
    ⇒ ใช้ความกว้างชุดเดียวกับหน้าสมาชิกอื่น เนื้อหาเลยเหลือ ~1130px (แคบกว่าเดิมแค่ 50px) */
.topup-single-container {
  width: min(1420px, 95vw);
  margin: 0 auto;
  padding: 28px 0 50px;
}

.topup-header-compact {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 24px !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  box-shadow: 0 4px 16px rgba(22, 28, 45, 0.03) !important;
  margin-bottom: 20px !important;
  position: relative !important;
}
.topup-header-compact::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 14px !important;
  bottom: 14px !important;
  width: 5px !important;
  background: var(--gold-dark) !important;
  border-radius: 0 4px 4px 0 !important;
}
.topup-header-compact h1 {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 0 0 10px !important;
}
.topup-header-compact .crumb {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}
.topup-header-compact .crumb a {
  color: var(--gold-dark) !important;
}

.topup-panel-single {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 36px 44px !important;
  box-shadow: 0 10px 35px rgba(22, 28, 45, 0.05) !important;
}

.topup-card-grid-single {
  display: grid !important;
  grid-template-columns: 300px 1fr !important;
  gap: 28px !important;
  /* 🔴 เดิม `center` ⇒ กล่อง QR (เตี้ย) ถูกจับกึ่งกลางเทียบคอลัมน์ขวา (สูงมาก)
     ⇒ เกิดช่องว่างใหญ่ทั้งบนและล่างของกล่องซ้าย (user ทัก 2026-09-21 "ช่องว่างเยอะเกิน") */
  align-items: start !important;
}

.qr-code-box-single {
  background: #f8fafc !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 24px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.qr-rate-header-tag {
  font-size: 13.5px !important;
  font-weight: 900 !important;
  color: #b45309 !important;
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  margin-bottom: 18px !important;
  letter-spacing: 0.02em !important;
}

.qr-image-frame-single {
  width: 240px !important;
  height: 240px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
  padding: 10px !important;
}

.qr-sub-text-single {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}

.bank-info-grid {
  display: grid !important;
  /* 🔑 ปรับตามจำนวนช่องที่มีจริง — ตอนนี้รับโอนพร้อมเพย์ช่องเดียว
     ถ้าใช้ `1fr 1fr` ตายตัว ช่องขวาจะว่างเป็นรูโบ๋ครึ่งแถว */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 20px !important;
}

.info-cell {
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.info-cell.full-width {
  grid-column: span 2 !important;
}

.info-lbl {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
}

.info-val-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.btn-copy-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
  flex-shrink: 0 !important;
}

.btn-copy-icon:hover {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(185, 118, 10, 0.25) !important;
}
/* ✅ คัดลอกติดแล้ว — บอกที่ตัวปุ่มเองด้วย (คนที่ปิดกล่องแจ้งเตือนก็ยังเห็นว่าติด)
   คลาสนี้ใส่/ถอดโดย wwwroot/js/copy-btn.js */
.btn-copy-icon.is-copied {
  background: #1f9254 !important;
  border-color: #1f9254 !important;
  color: #ffffff !important;
}

.info-val {
  font-size: 15.5px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
}
.info-val.highlight {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #059669 !important;
}
.info-val.gold {
  color: var(--gold-dark) !important;
  font-weight: 800 !important;
}

.slip-form-single {
  border-top: 1px solid rgba(226, 235, 243, 0.9) !important;
  padding-top: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.form-row-compact {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}

.form-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  /* 🔴 เดิมไม่มีระยะใต้ช่อง ⇒ คำอธิบายใต้ช่องหนึ่งไปชนป้ายของช่องถัดไป
     (user ทัก 2026-09-21 "ปรับระยะห่างหน่อย") */
  margin-bottom: 16px !important;
}
.form-field:last-child { margin-bottom: 0 !important; }
/* คำอธิบายใต้ช่อง — ห่างจากช่องนิดหน่อย แต่ยังเกาะกลุ่มกับช่องของตัวเอง ไม่ใช่ลอยไปหาช่องล่าง */
.form-field .hint { margin-top: 2px !important; line-height: 1.6 !important; }
.form-field label {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
}

.form-field input[type="text"],
.form-field input[type="number"] {
  width: 100% !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  font-size: 14px !important;
  outline: none !important;
}

.file-input-compact {
  font-size: 13px !important;
  padding: 8px !important;
  border: 1px dashed rgba(226, 235, 243, 0.95) !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
}

.btn-submit-single {
  padding: 12px !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  border-radius: 8px !important;
}

@media (max-width: 768px) {
  .topup-card-grid-single {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .bank-info-grid, .form-row-compact {
    grid-template-columns: 1fr !important;
  }
  .info-cell.full-width {
    grid-column: span 1 !important;
  }
  .topup-panel-single {
    padding: 20px 16px !important;
  }
}

/* ── Redesigned AAA Official Download Hub Styling (Pages/Download.cshtml) ─────── */
.dl-page-container {
  width: min(1420px, 95vw);
  margin: 0 auto;
  padding: 40px 0 80px;
}

.dl-header-compact {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 24px !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  box-shadow: 0 4px 16px rgba(22, 28, 45, 0.03) !important;
  margin-bottom: 20px !important;
  position: relative !important;
}
.dl-header-compact::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 14px !important;
  bottom: 14px !important;
  width: 5px !important;
  background: var(--gold-dark) !important;
  border-radius: 0 4px 4px 0 !important;
}
.dl-header-compact h1 {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 0 0 10px !important;
}
.dl-header-compact .crumb {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
}
.dl-header-compact .crumb a {
  color: var(--gold-dark) !important;
}

.dl-panel {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 36px 40px !important;
  box-shadow: 0 10px 35px rgba(22, 28, 45, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 36px !important;
}

/* 🌟 Full-Width Horizontal Download Rows */
.dl-rows-section h2 {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 0 20px !important;
}

.dl-rows-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.dl-row-card {
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 16px !important;
  padding: 24px 28px !important;
  display: grid !important;
  /* 🔴 คอลัมน์ปุ่มเคยกว้างตายตัว 240px ⇒ ป้ายยาว "(Google Drive)" ล้นออกนอกปุ่ม (user เจอ 2026-09-21)
     พอปล่อยให้ตัดบรรทัดก็กลายเป็น 2 บรรทัดซึ่งดูแย่กว่าเดิม
     ✅ ให้คอลัมน์ **กว้างตามปุ่มที่ยาวที่สุด** (max-content) ⇒ ปุ่มอยู่บรรทัดเดียวเสมอไม่ว่าป้ายยาวแค่ไหน
        คอลัมน์แรก (1fr) เป็นตัวยืดหยุ่นรับส่วนที่เหลือเอง */
  grid-template-columns: 1fr 180px minmax(240px, max-content) !important;
  gap: 28px !important;
  align-items: center !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 16px rgba(22, 28, 45, 0.03) !important;
}
.dl-row-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 30px rgba(22, 28, 45, 0.08) !important;
  border-color: var(--gold-dark) !important;
}

.row-left-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.row-title-badge {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.row-title-badge h3 {
  font-size: 18px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
}

.row-left-info p {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.badge-tag {
  align-self: flex-start !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
}
.badge-tag.tag-gold {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}
.badge-tag.tag-green {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
.badge-tag.tag-blue {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.row-middle-meta {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
}

.meta-sub {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
.meta-sub .lbl {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
}
.meta-sub .val {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
}

.row-right-btns {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.btn-row-dl {
  padding: 10px 16px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  text-align: center !important;
  /* บรรทัดเดียวเสมอ — คอลัมน์ขยายตามปุ่มให้แล้ว (ดู .dl-row-card) */
  white-space: nowrap !important;
  line-height: 1.35 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  /* 🟡 ปุ่มดาวน์โหลดเคยเป็นสีฟ้า — เปลี่ยนเป็นทองให้ตรงกับปุ่มหลักทั้งเว็บ (user เคาะ 2026-09-07)
     🔴 กฎนี้มี !important ทุกบรรทัด ⇒ ทับ .btn-gold ของ modern.css ได้ ต้องมาแก้ที่นี่ด้วย
        ไม่ใช่แก้ .btn-gold ที่เดียวแล้วคิดว่าครบ */
  background: #d3a53c !important;
  color: #3a2600 !important;
  border: 1px solid #b8871f !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.btn-row-dl:hover {
  background: #dcb04a !important;
  border-color: #c8921f !important;
  color: #3a2600 !important;
  transform: translateY(-1px) !important;
  box-shadow: none !important;
}

@media (max-width: 960px) {
  .dl-row-card {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Installation Steps Section */
.install-steps-section h2,
.sys-req-section h2,
.dl-faq-section h2 {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 0 20px !important;
}

.steps-grid-aaa {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

.step-card-aaa {
  background: #f8fafc !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 14px !important;
  padding: 24px 20px !important;
  position: relative !important;
}

.step-num {
  font-size: 24px !important;
  font-weight: 900 !important;
  color: var(--gold-dark) !important;
  margin-bottom: 8px !important;
}
.step-card-aaa h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 0 8px !important;
}
.step-card-aaa p {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* System Requirements Table */
.sys-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 14px !important;
}

.sys-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
  text-align: left !important;
}

.sys-table th, .sys-table td {
  padding: 14px 20px !important;
  font-size: 13.5px !important;
  border-bottom: 1px solid rgba(226, 235, 243, 0.8) !important;
}
.sys-table th {
  background: #f8fafc !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
}
.sys-table td {
  color: var(--text-muted) !important;
}
.sys-table td b {
  color: var(--text-main) !important;
}

/* FAQ Section */
.faq-list-aaa {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

.faq-card-item {
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 12px !important;
  padding: 18px 22px !important;
}
.faq-card-item h4 {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 0 6px !important;
}
.faq-card-item p {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* Responsive Grid for Download */
@media (max-width: 900px) {
  .steps-grid-aaa {
    grid-template-columns: 1fr !important;
  }
  .dl-panel {
    padding: 20px 16px !important;
  }
  .dl-hero-card {
    padding: 24px 20px !important;
  }
}

/* ── Redesigned Pure Google-Only Login Portal (Pages/Login.cshtml) ─────── */
.login-google-container {
  min-height: calc(82vh - var(--nav-h));
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 40px 16px 80px !important;
}

.login-google-card {
  width: 100% !important;
  max-width: 460px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 20px !important;
  padding: 40px 36px !important;
  box-shadow: 0 16px 45px rgba(22, 28, 45, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.google-icon-bubble {
  width: 72px !important;
  height: 72px !important;
  background: #f8fafc !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 18px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

.google-card-head h2 {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--text-main) !important;
  margin: 0 0 8px !important;
}
.google-card-head p {
  font-size: 13.5px !important;
  color: var(--text-muted) !important;
  line-height: 1.55 !important;
  margin: 0 0 28px !important;
}

.google-action-box {
  width: 100% !important;
  margin-bottom: 28px !important;
}

.btn-google-login-main {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 14px 24px !important;
  border-radius: 12px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  background: #ffffff !important;
  color: var(--text-main) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.22s ease !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}
.btn-google-login-main:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09) !important;
}

.google-sec-features {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  border-top: 1px solid rgba(226, 235, 243, 0.9) !important;
  padding-top: 24px !important;
  margin-bottom: 24px !important;
  text-align: left !important;
}

.sec-feat-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(226, 235, 243, 0.95) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
}
.sec-feat-icon {
  color: #10b981 !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
}
.sec-feat-text h4 {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text-main) !important;
  margin: 0 0 2px !important;
}
.sec-feat-text p {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
  line-height: 1.45 !important;
}

.google-card-foot {
  font-size: 13px !important;
  color: var(--text-muted) !important;
}
.google-card-foot a {
  color: var(--gold-dark) !important;
}

/* Fix Navbar Download Game Top-Right Button (No Red) */
.nav .right .btn-gold {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border: 1px solid #3b82f6 !important;
  box-shadow: none !important;
}
.nav .right .btn-gold:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
}

/* ── หน้าจัดการไอดี (Redesigned Ids Page) ────────────────────────────────────────── */
.acc-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 20px !important;
  margin-top: 20px !important;
}

.acc-card {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 4px 12px rgba(30, 70, 110, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: all 0.22s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.acc-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 24px rgba(30, 70, 110, 0.1) !important;
  border-color: var(--gold) !important;
}

.acc-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--gold), var(--gold2)) !important;
  opacity: 0 !important;
  transition: opacity 0.22s ease !important;
}

.acc-card:hover::before {
  opacity: 1 !important;
}

.acc-card-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid var(--line2) !important;
  padding-bottom: 10px !important;
}

.acc-id-badge {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  background: var(--line2) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
}

.acc-level-badge {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #fff !important;
  background: var(--gold-dk) !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
}

.acc-card-body {
  flex-grow: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
}

.char-info {
  text-align: center !important;
  margin-bottom: 16px !important;
}

.char-name {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  display: block !important;
}

.char-none {
  font-size: 14px !important;
  color: var(--mute) !important;
  font-style: italic !important;
  display: block !important;
}

.balances-row {
  display: flex !important;
  gap: 10px !important;
  justify-content: stretch !important;
}

.bal-item {
  flex: 1 !important;
  background: #f7fafd !important;
  border: 1px solid var(--line2) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.bal-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--mute) !important;
  text-transform: uppercase !important;
}

.bal-val {
  font-size: 15px !important;
  font-weight: 800 !important;
}

.coin-text {
  color: var(--gold-dk) !important;
}

.point-text {
  color: var(--blue) !important;
}

.acc-card-actions {
  display: flex !important;
  gap: 8px !important;
}

.acc-card-actions .btn {
  flex: 1 !important;
  padding: 8px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}

/* UI สำหรับ Title Bar & Empty State */
.page-title-bar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  border-bottom: 1.5px solid var(--line) !important;
  padding-bottom: 20px !important;
  margin-bottom: 24px !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}

.page-title-bar p.sub {
  margin-bottom: 0 !important;
}

.empty-state {
  text-align: center !important;
  padding: 48px 24px !important;
  background: var(--card) !important;
  border: 1px dashed var(--line) !important;
  border-radius: 16px !important;
  color: var(--ink2) !important;
}

/* 🖼️ รูป "ยังไม่มีอะไรที่นี่" — ใช้ **ไฟล์เดียวกันทุกหน้า** (`/img/empty_state.png`)
   เปลี่ยนรูปที่ไฟล์นั้นที่เดียว = เปลี่ยนพร้อมกันทั้ง /cart /itemShop /orders /promotion
   🔴 รูปชุดใหม่ (2026-09-08) เป็น **วงกลมบนพื้นโปร่งใส** ⇒ **ถอดมุมโค้ง + เงากล่องออก**
      ของเดิมเป็นภาพสี่เหลี่ยมทึบจึงต้องมีกรอบ — ใส่กับรูปโปร่งใสแล้วได้เงาสี่เหลี่ยมลอยรอบวงกลม
   📐 ไฟล์เป็น 220×220 พอดีกับ `max-width` ⇒ ไม่ถูกยืดและไม่ถูกย่อ */
.empty-state-img {
  width: 100% !important;
  max-width: 220px !important;
  height: auto !important;
  margin-bottom: 14px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.empty-state h3 {
  font-size: 19px !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

.empty-state p {
  font-size: 14.5px !important;
  color: var(--mute) !important;
  margin-bottom: 16px !important;
}

.sample-ids {
  display: flex !important;
  gap: 8px !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
}

.sample-btn {
  background: #f7fafd !important;
  border: 1px solid var(--line) !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--ink2) !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
}

.sample-btn:hover {
  background: var(--gold2) !important;
  border-color: var(--gold) !important;
  color: #4a2f00 !important;
}

/* ── หน้าจัดการไอดี (6-Column Grid Layout) ────────────────────────────────────── */
.acc-grid-6 {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 14px !important;
  margin-top: 20px !important;
}

.acc-card-mini {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 2px 8px rgba(30, 70, 110, 0.04) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

.acc-card-mini:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 16px rgba(30, 70, 110, 0.08) !important;
  border-color: var(--gold) !important;
}

.char-sprite-wrap {
  width: 90px !important;
  height: 90px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--line2) !important;
  border-radius: 50% !important;
  margin-bottom: 10px !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
}

.char-sprite-wrap img {
  width: 70px !important;
  height: 70px !important;
  object-fit: contain !important;
  image-rendering: pixelated !important;
  filter: drop-shadow(0 4px 6px rgba(30, 70, 110, 0.15)) !important;
}

.mini-name {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100% !important;
  margin-bottom: 2px !important;
}

.mini-level {
  font-size: 11px !important;
  font-weight: 800 !important;
  background: var(--gold-dk) !important;
  color: #fff !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  display: inline-block !important;
  margin-bottom: 6px !important;
}

.mini-id {
  font-size: 11.5px !important;
  color: var(--mute) !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
}

.mini-bals {
  width: 100% !important;
  border-top: 1px solid var(--line2) !important;
  padding-top: 8px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  font-size: 12px !important;
  text-align: left !important;
}

.mini-bal-row {
  display: flex !important;
  justify-content: space-between !important;
  font-weight: 700 !important;
}

.mini-actions {
  display: flex !important;
  gap: 4px !important;
  width: 100% !important;
}

.mini-actions .btn {
  flex: 1 !important;
  padding: 6px 4px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

@media(max-width: 980px) {
  .acc-grid-6 {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media(max-width: 768px) {
  .acc-grid-6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media(max-width: 480px) {
  .acc-grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Elemental Card Styles (OG Elements) ────────────────────────────────────── */
.acc-card-mini.element-water {
  background: linear-gradient(135deg, #e6f0fa 0%, #ffffff 100%) !important;
  border-color: #bcd8f1 !important;
}
.acc-card-mini.element-water:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.12) !important;
}
.acc-card-mini.element-water .mini-level {
  background: #3b82f6 !important;
}

.acc-card-mini.element-earth {
  background: linear-gradient(135deg, #fff7e6 0%, #ffffff 100%) !important;
  border-color: #f6dfae !important;
}
.acc-card-mini.element-earth:hover {
  border-color: #f0a015 !important;
  box-shadow: 0 8px 16px rgba(240, 160, 21, 0.12) !important;
}
.acc-card-mini.element-earth .mini-level {
  background: var(--gold-dk) !important;
}

.acc-card-mini.element-fire {
  background: linear-gradient(135deg, #fdf2f2 0%, #ffffff 100%) !important;
  border-color: #fbd5d5 !important;
}
.acc-card-mini.element-fire:hover {
  border-color: #ee5253 !important;
  box-shadow: 0 8px 16px rgba(238, 82, 83, 0.12) !important;
}
.acc-card-mini.element-fire .mini-level {
  background: #ee5253 !important;
}

.acc-card-mini.element-wood {
  background: linear-gradient(135deg, #edfbf4 0%, #ffffff 100%) !important;
  border-color: #c2eed7 !important;
}
.acc-card-mini.element-wood:hover {
  border-color: #10ac84 !important;
  box-shadow: 0 8px 16px rgba(16, 172, 132, 0.12) !important;
}
.acc-card-mini.element-wood .mini-level {
  background: #10ac84 !important;
}

.modal-foot label.btn {
  text-align: center !important;
  cursor: pointer !important;
}

/* ── Form Inputs & Layout inside Modals ──────────────────────────────────── */
.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  text-align: left !important;
}

.form-label {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--ink2) !important;
}

.input-field {
  padding: 10px 12px !important;
  border: 1.5px solid var(--line2) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  background: #fff !important;
  color: var(--ink) !important;
  transition: border-color 0.16s ease !important;
}

.input-field:focus {
  border-color: var(--gold) !important;
  outline: none !important;
}

.modal-foot-row {
  display: flex !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.modal-foot-row .btn,
.modal-foot-row label.btn {
  flex: 1 !important;
  padding: 10px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  text-align: center !important;
  cursor: pointer !important;
}

/* ── Scrollable Success Accounts List ────────────────────────────────────── */
.modal-info-scroll {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  background: #f8fafc !important;
  border: 1px solid var(--line2) !important;
  border-radius: 10px !important;
  padding: 12px !important;
  text-align: left !important;
}

.modal-info-row-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid var(--line2) !important;
  padding-bottom: 8px !important;
}

.modal-info-row-item:last-child {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.modal-info-row-item .left-part {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.modal-info-row-item .left-part img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  background: #f1f5f9 !important;
  border-radius: 50% !important;
  padding: 4px !important;
  flex-shrink: 0 !important;
}

.modal-info-row-item .left-part img.grayscale-avatar {
  filter: grayscale(100%) opacity(60%) !important;
  background: #e2e8f0 !important;
}

.modal-info-row-item .left-part .acc-desc {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.modal-info-row-item .left-part .acc-desc .acc-id {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--gold-dk) !important;
  line-height: 1.2 !important;
}

.modal-info-row-item .left-part .acc-desc .acc-char {
  font-size: 11.5px !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.modal-info-row-item .right-part {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
  font-size: 11px !important;
  color: var(--mute) !important;
}

.modal-info-row-item .right-part .acc-bal {
  font-weight: 700 !important;
}


/* ── Redesigned AAA Official Ids Hub Styling (Pages/Ids.cshtml) ─────────────────── */
.ids-page-container {
  width: min(1280px, 92vw) !important;
  margin: 0 auto !important;
  padding: 40px 0 80px !important;
}

.ids-header-compact {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 24px !important;
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  box-shadow: 0 4px 16px rgba(22, 28, 45, 0.03) !important;
  margin-bottom: 20px !important;
  position: relative !important;
}

.ids-header-compact::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 14px !important;
  bottom: 14px !important;
  width: 5px !important;
  background: var(--gold-dk) !important;
  border-radius: 0 4px 4px 0 !important;
}

.ids-header-compact h1 {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: var(--ink) !important;
  margin: 0 !important;
}

.ids-header-compact .crumb {
  font-size: 12.5px !important;
  color: var(--mute) !important;
  font-weight: 600 !important;
}

.ids-header-compact .crumb a {
  color: var(--gold-dk) !important;
}

/* ── CSS-Only Success Modal Popup ────────────────────────────────────────── */
.modal-toggle-chk {
  display: none !important;
}

.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(4px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000 !important;
  opacity: 1 !important;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
  visibility: visible !important;
}

.modal-toggle-chk:not(:checked) ~ .modal-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1.5px solid rgba(226, 235, 243, 0.95) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  width: min(440px, 90vw) !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-head h3 {
  font-size: 18px !important;
  font-weight: 800 !important;
  margin: 0 !important;
  color: var(--ink) !important;
  text-align: center !important;
}

.modal-head p {
  text-align: center !important;
  margin-top: 4px !important;
  font-size: 12.5px !important;
  color: var(--mute) !important;
  margin-bottom: 0 !important;
}

.modal-pet-avatar {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 8px !important;
}

.modal-pet-avatar img {
  width: 96px !important;
  height: 96px !important;
  object-fit: contain !important;
  background: #f1f5f9 !important;
  border-radius: 50% !important;
  border: 2px solid var(--line2) !important;
  padding: 8px !important;
}

.modal-pet-avatar img.grayscale-avatar {
  filter: grayscale(100%) opacity(60%) !important;
  background: #e2e8f0 !important;
}

.modal-info-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid var(--line2) !important;
  border-radius: 10px !important;
  padding: 14px !important;
}

.modal-info-item {
  display: flex !important;
  justify-content: space-between !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
}

.modal-info-item .label {
  color: var(--mute) !important;
  font-weight: 600 !important;
}

.modal-info-item .val {
  color: var(--ink) !important;
  font-weight: 800 !important;
}

.modal-info-item .val.highlight {
  color: var(--gold-dk) !important;
  font-size: 15px !important;
}

.modal-foot label.btn {
  text-align: center !important;
  cursor: pointer !important;
}

/* Restored: Inactive/Uncreated Character Card (Grayscale) */
.acc-card-mini.element-inactive {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  opacity: 0.65 !important;
}
.acc-card-mini.element-inactive:hover {
  border-color: #94a3b8 !important;
  opacity: 0.95 !important;
  box-shadow: 0 8px 16px rgba(100, 116, 139, 0.12) !important;
}
.acc-card-mini.element-inactive .char-sprite-wrap {
  background: #e2e8f0 !important;
}
.acc-card-mini.element-inactive .char-sprite-wrap img {
  filter: grayscale(100%) opacity(50%) !important;
}
.acc-card-mini.element-inactive .mini-level {
  background: #64748b !important;
}
.acc-card-mini.element-inactive .coin-text,
.acc-card-mini.element-inactive .point-text {
  color: #64748b !important;
}

/* ── Form Inputs & Layout inside Modals ──────────────────────────────────── */
.form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  text-align: left !important;
}

.form-label {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: var(--ink2) !important;
}

.input-field {
  padding: 10px 12px !important;
  border: 1.5px solid var(--line2) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  background: #fff !important;
  color: var(--ink) !important;
  transition: border-color 0.16s ease !important;
}

.input-field:focus {
  border-color: var(--gold) !important;
  outline: none !important;
}

.modal-foot-row {
  display: flex !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 8px !important;
}

.modal-foot-row .btn,
.modal-foot-row label.btn {
  flex: 1 !important;
  padding: 10px !important;
  font-size: 13.5px !important;
  border-radius: 8px !important;
  text-align: center !important;
  cursor: pointer !important;
}

/* ── Scrollable Success Accounts List ────────────────────────────────────── */
.modal-info-scroll {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  background: #f8fafc !important;
  border: 1px solid var(--line2) !important;
  border-radius: 10px !important;
  padding: 12px !important;
  text-align: left !important;
}

.modal-info-row-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-bottom: 1px solid var(--line2) !important;
  padding-bottom: 8px !important;
}

.modal-info-row-item:last-child {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.modal-info-row-item .left-part {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.modal-info-row-item .left-part img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  background: #f1f5f9 !important;
  border-radius: 50% !important;
  padding: 4px !important;
  flex-shrink: 0 !important;
}

.modal-info-row-item .left-part img.grayscale-avatar {
  filter: grayscale(100%) opacity(60%) !important;
  background: #e2e8f0 !important;
}

.modal-info-row-item .left-part .acc-desc {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.modal-info-row-item .left-part .acc-desc .acc-id {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--gold-dk) !important;
  line-height: 1.2 !important;
}

.modal-info-row-item .left-part .acc-desc .acc-char {
  font-size: 11.5px !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.modal-info-row-item .right-part {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 2px !important;
  font-size: 11px !important;
  color: var(--mute) !important;
}

.modal-info-row-item .right-part .acc-bal {
  font-weight: 700 !important;
}


/* ═════════════════════════════════════════════════════════════════════════════
   📰 ระบบข่าว — ป้ายกรองหมวด + หน้าอ่านข่าวเต็ม `/News/{slug}`
   เขียนที่ไฟล์นี้เพราะ **site.css คือแผ่นที่ทำงานจริง**
   (`modern.css` ตายตั้งแต่บรรทัด 1155 — บล็อก `footer .bottom` ไม่มีปีกกาปิด)
   ⛔ ห้าม inline style ในหน้า Razor — CSP `style-src 'self'` บล็อกเงียบ
   ───────────────────────────────────────────────────────────────────────────── */

/* ป้ายกรองเปลี่ยนจาก <button> เป็น <a> (ไม่มีสคริปต์ในเว็บนี้ CSP ปิด inline script) */
.ftab{display:inline-block;text-decoration:none;color:var(--ink2);background:#f8fafc}
.ftab:hover,.ftab.active{background:var(--gold-dk);border-color:var(--gold-dk);color:#fff}

/* ── หน้าอ่านข่าว ─────────────────────────────────────────────────────────── */
.art{padding:4px 2px 8px}
.art-head{border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:20px}
.art-title{font-size:26px;line-height:1.4;font-weight:800;margin:10px 0 8px;color:var(--ink)}
.art-meta{font-size:13px;color:var(--mute);display:flex;gap:6px;flex-wrap:wrap}
/* 🖼️ รูปหัวข่าว — **ล็อกสัดส่วน 16:9** (user เคาะ 2026-09-21)
   🔑 ก่อนหน้านี้ใช้ `max-height` ⇒ รูปแต่ละใบสูงไม่เท่ากัน หน้าเว็บกระโดดไปมา
      ตอนนี้กรอบเป็น 16:9 เสมอ · รูปที่ไม่ใช่ 16:9 จะถูก `cover` ตัดขอบให้พอดี
   ⚠️ ขนาดที่ควรอัป: **1600 × 900 px** (ต่ำสุด 1280 × 720) · อย่าวางตัวหนังสือชิดริมภาพ */
/* 📖 **คอลัมน์อ่านข่าว** (user 2026-09-22 "แบบนี้ดีหรือยัง") — หน้าอ่านข่าวไม่มีแถบข้าง
   ⇒ แผงกว้างเต็ม ~1340px แต่ตัวหนังสืออ่านได้แค่ ~80 ตัวอักษร = **ที่ว่างด้านขวาเป็นแถบใหญ่**
   ✅ บีบทั้งคอลัมน์ (หัวข่าว · รูป · เนื้อ · ปุ่มก่อน/ถัดไป · รายการข่าวอื่น) ให้กว้างเท่ากันแล้ววางกลาง
   🔑 `.art ~ ...` = จับเฉพาะของที่อยู่หลัง `<article class="art">` ⇒ **ไม่โดนหน้ารายการข่าว** (ที่นั่นไม่มี .art)
   🎚️ ปรับความกว้างทั้งหน้าที่ตัวแปรตัวเดียว */
:root{--art-col:1000px}   /* user เคาะ 2026-09-22: 820 ดูแคบไปในการ์ดกว้าง ⇒ ขยายเป็น 1000 (รูป 1000×563) */
.art,
.art ~ .news-filter-row,
.art ~ .news-table-list{max-width:var(--art-col);margin-left:auto;margin-right:auto}

/* 🔴 **ต้องมีเพดานความกว้าง** (user 2026-09-22 "ยังสูงไป" — ดูของจริงที่ play.tsunlocked.com/news/cbt)
   แผงข่าวกว้าง ~1340px ⇒ 16:9 = สูง ~754px = **กินเต็มจอ** ต้องเลื่อนผ่านรูปก่อนถึงจะเห็นเนื้อข่าว
   ✅ ล็อกกว้างสุด 820px (= สูง ~461px) และชิดซ้ายเสมอกับคอลัมน์ตัวหนังสือ (.art-body)
   ⛔ อย่าแก้ด้วย max-height — `object-fit:cover` จะ**ตัดหัว-ท้ายรูปทิ้ง** = รูป 16:9 ใบเดียวใช้ไม่ได้ทุกที่ */
.art-cover{width:100%;max-width:var(--art-col);aspect-ratio:16/9;object-fit:cover;border-radius:12px;
  border:1px solid var(--line);margin-bottom:22px;display:block;background:#eef2f6}

/* เนื้อข่าว — แท็กในนี้มาจากตัวแปลง MiniMarkdown เท่านั้น */
.art-body{font-size:15.5px;line-height:1.9;color:var(--ink2);max-width:78ch}
.art-body h2{font-size:20px;font-weight:800;color:var(--ink);margin:26px 0 10px;
  padding-left:11px;border-left:4px solid var(--gold)}
.art-body h3{font-size:17px;font-weight:700;color:var(--ink);margin:20px 0 8px}
.art-body p{margin:0 0 14px}
.art-body ul,.art-body ol{margin:0 0 16px;padding-left:24px}
.art-body li{margin-bottom:7px}
.art-body strong{color:var(--ink);font-weight:700}
.art-body a{color:var(--gold-dk);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.art-body code{background:var(--line2);border:1px solid var(--line);border-radius:5px;
  padding:1px 6px;font-family:Consolas,monospace;font-size:13.5px;color:var(--ink)}
.art-body blockquote{margin:0 0 16px;padding:12px 16px;background:#fbfdff;
  border-left:4px solid var(--gold2);border-radius:0 8px 8px 0;color:var(--ink2)}
.art-body hr{border:0;border-top:1px solid var(--line);margin:24px 0}
.art-figure{margin:0 0 18px}
/* รูปที่ใช้อยู่ ในหน้าเขียนข่าวหลังบ้าน — **กรอบ 16:9 เหมือนหน้าเว็บจริง**
   เดิมปล่อยสัดส่วนอิสระ ⇒ แอดมินเห็นรูป 4:3 เต็มใบ แล้วไปโดนตัดตอนขึ้นหน้าเว็บ = เซอร์ไพรส์ทีหลัง */
.art-img{width:100%;max-width:420px;aspect-ratio:16/9;object-fit:cover;
  border-radius:10px;border:1px solid var(--line);display:block;background:#eef2f6}
.art-figure figcaption{font-size:12.5px;color:var(--mute);text-align:center;margin-top:7px}

/* ข่าวก่อน/ถัดไป */
.art-nav{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:28px;
  border-top:1px solid var(--line);padding-top:18px}
.art-nav-side{display:flex;flex-direction:column;gap:4px;padding:12px 14px;background:#f8fafc;
  border:1px solid var(--line);border-radius:10px;font-size:13.5px;transition:background .2s}
.art-nav-side b{color:var(--ink);font-weight:700;line-height:1.5}
.art-nav-side:hover{background:#fff}
.art-nav-right{text-align:right;align-items:flex-end}
.art-nav-off{opacity:.5}
.art-nav-off:hover{background:#f8fafc}

@media (max-width:700px){
  .art-title{font-size:21px}
  .art-nav{grid-template-columns:1fr}
  .art-nav-right{text-align:left;align-items:flex-start}
}

/* ── ระบบแจ้งปัญหา (2026-09-07) ────────────────────────────────────────────── */
.note.ok{background:#eefaf5;border-color:#b6e6d4;color:#0b6b4f}

/* 🪤 ช่องล่อบอท — คนต้องมองไม่เห็น แต่ **ห้ามใช้ display:none**
   บอทรุ่นใหม่ข้ามช่องที่ display:none/hidden ⇒ ดันออกนอกจอแทน มันจะยังกรอกให้เราจับได้ */
.hp{position:absolute!important;left:-9999px!important;top:auto!important;
  width:1px!important;height:1px!important;overflow:hidden!important}

/* กล่องข้อความในฟอร์มแจ้งปัญหา — ใช้หน้าตาเดียวกับช่องกรอกอื่น */
textarea.input-field{min-height:170px;line-height:1.8;resize:vertical;font-family:inherit}

/* ── 🚧 หน้าบอกสถานะผิดพลาด (404 · 403 · 429 · 5xx) ───────────────────────── */
.st-box{background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:42px 30px 34px;text-align:center;max-width:680px;margin:0 auto}
.st-code{font-size:74px;font-weight:800;line-height:1;color:var(--gold-dk);letter-spacing:.02em}
.st-box h1{font-size:24px;font-weight:800;color:var(--ink);margin:10px 0 12px}
.st-detail{font-size:15.5px;color:var(--ink2);line-height:1.8}
.st-hint{font-size:13.5px;color:var(--mute);margin-top:6px;line-height:1.8}
.st-actions{justify-content:center;margin-top:22px;flex-wrap:wrap}

.st-news{max-width:900px;margin:28px auto 0}
.st-news-head{font-size:14px;font-weight:800;color:var(--ink2);margin-bottom:10px;
  padding-left:10px;border-left:4px solid var(--gold)}

@media (max-width:600px){
  .st-code{font-size:56px}
  .st-box{padding:30px 18px 26px}
  .st-box h1{font-size:20px}
}

/* 🔒 ป้ายบนการ์ดหน้าแรกที่ guest ต้องเข้าสู่ระบบก่อน (2026-09-07)
   ⚠️ แก้ที่ไฟล์นี้เท่านั้น — `modern.css` ตายตั้งแต่บรรทัด 1155 (บล็อกไม่มีปีกกาปิด) */
.feat-lock{
  margin-top:6px;
  font-size:12px;
  letter-spacing:.02em;
  opacity:.72;
}

/* 🚪 ปุ่มออกจากระบบบนแถบบนเป็น **ฟอร์ม POST** (ลิงก์ GET ไม่ปลอดภัย — ดู Pages/Logout.cshtml)
   ⇒ ต้องบังคับให้ฟอร์มไม่กินบรรทัด ไม่งั้นปุ่มจะตกลงมาใต้แถบ */
.nav .right form.navlogout{
  display:inline-flex;
  margin:0;
  padding:0;
}

/* ── 👤 เมนูผู้ใช้บนแถบบน (2026-09-07) ─────────────────────────────────────────
   user สั่ง: แถบบนเกะกะ ⇒ ถอดปุ่ม "ดาวน์โหลดเกม"/"ออกจากระบบ" ออก
   แล้วยุบไปอยู่ในเมนูที่กด**อีเมล**แล้วค่อยกางออก
   🔑 ทำด้วย <details>/<summary> ⇒ ไม่ต้องมีสคริปต์เลย (CSP ห้าม inline script)
   ⚠️ แก้ที่ site.css เท่านั้น — modern.css ตายตั้งแต่บรรทัด 1155 */
.nav .right .usermenu{
  position:relative;
  display:inline-block;
}
.nav .right .usermenu>summary{
  list-style:none;
  cursor:pointer;
  max-width:230px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  user-select:none;
}
/* ซ่อนสามเหลี่ยมประจำตัวของ <summary> ทั้งใน Chrome/Edge และ Safari */
.nav .right .usermenu>summary::-webkit-details-marker{display:none}
.nav .right .usermenu>summary::marker{content:""}
.nav .right .usermenu>summary::after{
  content:"⌄";
  margin-left:8px;
  opacity:.7;
}
.nav .right .usermenu[open]>summary::after{content:"⌃"}

.usermenu-pop{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:70;
  min-width:214px;
  padding:8px;
  border-radius:12px;
  background:#12182b;
  border:1px solid rgba(198,160,74,.34);
  box-shadow:0 18px 44px rgba(0,0,0,.46);
}
.usermenu-pop a,
.usermenu-pop .usermenu-out{
  display:block;
  width:100%;
  padding:9px 12px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#e8ebf5;
  font:inherit;
  font-size:14px;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}
.usermenu-pop a:hover,
.usermenu-pop .usermenu-out:hover{
  background:rgba(198,160,74,.16);
  color:#fff;
}
.usermenu-pop .usermenu-out{color:#ffb4b4}
.usermenu-pop form{margin:0}
.usermenu-sep{
  height:1px;
  margin:6px 4px;
  background:rgba(255,255,255,.10);
}

/* จอแคบ: แถบบนยุบเป็นเมนูแฮมเบอร์เกอร์ ⇒ ให้เมนูผู้ใช้กางเต็มความกว้าง ไม่ลอยออกนอกจอ */
@media (max-width:900px){
  .nav .right .usermenu>summary{max-width:160px}
  .usermenu-pop{right:auto;left:0;min-width:200px}
}

/* ── 🎫 การ์ดสรุปตัวเลข + ฟอร์มหน้าสมาชิก (2026-09-07) ─────────────────────────
   ตั้งชื่อ .qcard เอง ไม่ใช้ .acc-card ที่มีอยู่แล้ว — ตัวนั้นเป็นคนละคอมโพเนนต์
   (มี .acc-card-header/body/actions ของตัวเอง) เอามาใช้ซ้ำแล้วกล่องจะเพี้ยน */
.qcards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(248px,1fr));
  gap:16px;
}
.qcard{
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
}
.qcard .lbl{font-size:13px;opacity:.72;margin-bottom:4px}
.qcard .num{font-size:34px;font-weight:700;line-height:1.15}
.qcard .num .muted{font-size:18px;font-weight:500}
.qcard .sub2{font-size:13px;opacity:.72;margin:6px 0 12px}
.qcard .btn{margin-top:2px}

/* ปุ่มหลายอันเรียงกัน — เดิมมีแต่ `.hero-left .btn-group` ใน modern.css เท่านั้น
   (และ modern.css ตายตั้งแต่บรรทัด 1155) ⇒ ประกาศตัวทั่วไปไว้ที่นี่ */
.btn-group{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ฟอร์มแนวตั้ง — ป้ายอยู่บน ช่องกรอกอยู่ล่าง */
.stack-form{display:grid;gap:14px;max-width:420px}
.stack-form label{display:grid;gap:6px}
.stack-form label>span{font-size:14px;font-weight:600}
.stack-form input{
  font-family:inherit;font-size:15px;padding:11px 14px;
  border:1.5px solid #cfdded;border-radius:9px;background:#fff;color:#16223a;
}
.stack-form input:focus{outline:2px solid var(--gold2);outline-offset:1px}

/* ฟอร์มเปลี่ยนชื่อในตาราง — บีบให้พอดีช่อง ไม่ดันแถวสูง */
.tbl .inline-form{margin-bottom:0;gap:6px;flex-wrap:nowrap}
.tbl .inline-form input{padding:7px 10px;font-size:14px;min-width:0;width:100%}
.btn-sm{padding:7px 12px;font-size:13px;white-space:nowrap}

/* แถวที่เพิ่งสร้าง — เน้นไว้ให้หาเจอทันทีหลังกดขอไอดี */
.row-new>td{background:rgba(198,160,74,.16)}

.bullets{margin:0;padding-left:20px;line-height:1.85}
.bullets li{margin-bottom:2px}

/* ── 🏬 การ์ดสินค้าในร้านไอเทม: ไอคอนไอเทมจริงบนพื้นไล่สีตามระดับ (2026-09-07) ─────
   เดิมใช้แบนเนอร์ข่าวเป็นรูปสินค้า ⇒ มีคำว่า "TS ONLINE" ของเจ้าเดิม + news4.jpg ไม่มีไฟล์
   ตอนนี้ชี้ `img/items/<เลขไอเทม>.png` ⇒ เพิ่มสินค้าใหม่แล้วรูปมาเอง ไม่ต้องทำแบนเนอร์
   ⚠️ แก้ที่ site.css เท่านั้น — modern.css ตายตั้งแต่บรรทัด 1155 */
.product-cover-frame{
  position:relative;
  height:210px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  /* พื้นกลาง — แต่ละระดับความหายากทับด้านล่าง */
  background:linear-gradient(160deg,#eef3f8 0%,#dde6f0 100%);
}
.shop-item-icon{
  width:112px;
  height:112px;
  /* 🔑 ไอคอนต้นฉบับ 64px เป็นพิกเซลอาร์ต — ขยายแบบปกติจะเบลอ
     pixelated = ขยายแบบไม่เกลี่ยสี ได้ขอบคมเหมือนในเกม */
  image-rendering:pixelated;
  filter:drop-shadow(0 6px 12px rgba(12,20,40,.28));
}
.card-edge-to-edge:hover .shop-item-icon{transform:scale(1.06)}
.shop-item-icon{transition:transform .18s ease}

/* วงแสงหลังไอคอน ให้ของชิ้นเล็กไม่ลอยกลางกรอบเปล่า */
.product-cover-frame::before{
  content:"";
  position:absolute;
  width:190px;height:190px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.92) 0%,rgba(255,255,255,0) 68%);
}

.rarity-legendary .product-cover-frame{background:linear-gradient(160deg,#fff5da 0%,#f6dfa1 100%)}
.rarity-epic      .product-cover-frame{background:linear-gradient(160deg,#f6ecff 0%,#e2ccf7 100%)}
.rarity-rare      .product-cover-frame{background:linear-gradient(160deg,#eaf3ff 0%,#c9dcf6 100%)}
.rarity-normal    .product-cover-frame{background:linear-gradient(160deg,#f2f6fa 0%,#dfe7ef 100%)}

@media (max-width:640px){
  .product-cover-frame{height:170px}
  .shop-item-icon{width:92px;height:92px}
  .product-cover-frame::before{width:150px;height:150px}
}

/* ── 🪟 กล่อง modal ที่เปิด/ปิดด้วย checkbox — **ไม่ใช้สคริปต์เลย** (2026-09-07) ───
   CSP ของเราห้าม inline script ⇒ ใช้ท่า checkbox + label เหมือนปุ่มเมนูบนแถบบน
   ⚠️ ตัว checkbox ต้องเป็นพี่น้องที่อยู่ **ก่อน** .modal-wrap (ตัวเลือก ~ มองไปข้างหน้าเท่านั้น)
   ⚠️ ปิดด้วยปุ่ม Esc ไม่ได้ (ต้องมีสคริปต์) — มีปุ่ม ✕ · ปุ่มยกเลิก · กดพื้นหลัง ให้แล้ว */
/* 🔴 checkbox ต้อง **fixed มุมซ้ายบนของจอ** ไม่ใช่ absolute ตามตำแหน่งในหน้า
   เพราะกด `<label for>` = เบราว์เซอร์ย้ายโฟกัสไปที่ checkbox แล้ว **เลื่อนหน้าไปหามัน**
   ⇒ อาการที่ user เจอ 2026-09-10 "กดแล้วหน้ามัน scroll ลงไปเอง" (ตัวการ์ดอยู่กลางหน้า)
   fixed = อยู่ในจอเสมอ ⇒ เลื่อนไปหาแล้วไม่ขยับ · ขนาด 0 + opacity 0 เหมือนเดิม มองไม่เห็น */
.modal-toggle{position:fixed;top:0;left:0;opacity:0;width:0;height:0;pointer-events:none;margin:0}
.modal-wrap{display:none}
/* 🔒 เปิดกล่องแล้ว **ล็อกไม่ให้ฉากหลังเลื่อน** — ไม่ต้องใช้สคริปต์ (`:has()` พอ)
   เบราว์เซอร์เก่าที่ไม่รู้จัก `:has()` จะข้ามกฎนี้ไปเฉย ๆ กล่องยังเปิดได้ปกติ */
body:has(.modal-toggle:checked){overflow:hidden}
.modal-toggle:checked ~ .modal-wrap{
  display:flex;
  position:fixed;
  inset:0;
  z-index:200;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  /* user 2026-09-30: "ปิดพื้นหลัง popup ทึบ / ไม่ใช่พื้นหลังมืด" — เลิกทำจอมืด
     ⛔ ห้ามใส่สีเข้มกลับมา · ยังคลิกพื้นหลังเพื่อปิดได้เหมือนเดิม (โปร่งแต่ยังรับคลิก) */
  background:transparent;
  cursor:pointer;
}
.modal-box{
  position:relative;
  width:100%;
  /* user 2026-09-30: "ขยายหน่อยก็ได้ข้อความจะได้ไม่ตก" — 640 -> 760 กันบรรทัดในกล่องตกบ่อย */
  max-width:760px;
  max-height:88vh;
  overflow-y:auto;
  padding:22px 24px 24px;
  border-radius:16px;
  /* user 2026-09-30 "ให้ปิดพื้นหลัง popup เฉพาะ card": ตัวกล่องต้อง **ทึบ**
     🔑 เดิมใช้ var(--card) ซึ่ง modern.css ตั้งเป็น rgba(255,255,255,.76) (การ์ดกระจกทั้งเว็บ)
        ⇒ popup เลยมองทะลุเห็นข้อความข้างหลัง · ใส่สีตรง ๆ เฉพาะกล่องนี้ ไม่แตะ --card ของที่อื่น */
  background:#fff;
  border:1px solid var(--line,#e2ebf3);
  box-shadow:0 26px 70px rgba(0,0,0,.42);
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.modal-head h3{margin:0;font-size:20px}
.modal-x{
  cursor:pointer;
  padding:2px 10px;
  border-radius:8px;
  font-size:18px;
  line-height:1.6;
  opacity:.6;
  user-select:none;
}
.modal-x:hover{opacity:1;background:rgba(0,0,0,.06)}

/* ── 🎫 ฟอร์มขอไอดีใหม่ (2026-09-07) ──────────────────────────────────────────── */
.newid-cta{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.newid-lead{margin:0 0 18px}

.newid-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px 20px;
  align-items:start;
}
.newid-form label{display:grid;gap:6px;min-width:0}
/* 🔧 user 2026-09-30 "ปุ่มยังเพี้ยน": ปุ่ม "ยกเลิก" เป็น <label> อยู่ในฟอร์มเดียวกัน
   ⇒ โดนกฎบรรทัดบน (display:grid) ทับ .btn ⇒ ไอคอนกับตัวหนังสือแยกคนละแถว
   ⇒ ดึงกลับเป็น inline-flex เฉพาะ label ที่เป็นปุ่ม */
.newid-form label.btn{display:inline-flex;gap:9px}
.newid-form label>span{font-size:14px;font-weight:600}
.newid-form .span2{grid-column:1 / -1}
.newid-form input{
  font-family:inherit;font-size:15px;padding:11px 14px;width:100%;
  border:1.5px solid #cfdded;border-radius:9px;background:#fff;color:#16223a;
}
.newid-form input:focus{outline:2px solid var(--gold2);outline-offset:1px}

.newid-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:2px}

@media (max-width:620px){
  .newid-form{grid-template-columns:1fr}
}

/* ── 🛒 ตะกร้า · ใบสั่ง · โค้ด (2026-09-07) ─────────────────────────────────────
   ⚠️ แก้ที่ site.css เท่านั้น — modern.css ตายตั้งแต่บรรทัด 1155 */
.mono{font-family:Consolas,"Courier New",monospace;letter-spacing:.04em}

/*  📐 **คอลัมน์เดียว** (2026-09-08) — สรุปรายการไหลลงมาอยู่ใต้รายการของ
    🔴 เดิมเป็น `minmax(0,1fr) 340px` ⇒ พอเพิ่มแถบข้างสมาชิกเข้ามา หน้านี้กลายเป็น
       **3 คอลัมน์** (รายการ | สรุป | เมนู) อึดอัดและไม่เข้าชุดกับหน้าสมาชิกอื่น
    ⇒ ลำดับใน DOM เป็น รายการ → สรุป อยู่แล้ว ⇒ เปลี่ยนแค่กริดก็เรียงลงล่างเอง */
.cart-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:16px;
  align-items:start;
}

.cart-line{
  display:grid;
  grid-template-columns:64px minmax(0,1fr) auto auto auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  margin-bottom:12px;
  border:1px solid var(--line);
  border-left:4px solid #cbd5e1;
  border-radius:12px;
  background:var(--card);
}
.cart-line.rarity-legendary{border-left-color:#c6a04a}
.cart-line.rarity-epic{border-left-color:#9d5cd0}
.cart-line.rarity-rare{border-left-color:#3b82f6}
.cart-line-icon{
  width:56px;height:56px;object-fit:contain;
  image-rendering:pixelated;             /* ไอคอนเป็นพิกเซลอาร์ต */
}
.cart-line-name{font-weight:700;margin-bottom:2px}
.cart-line-price{text-align:right;display:grid;gap:2px;white-space:nowrap}
.cart-line-price b{font-size:17px}
.cart-line-x{
  border:0;background:transparent;cursor:pointer;
  font-size:16px;opacity:.5;padding:6px 8px;border-radius:8px;
}
.cart-line-x:hover{opacity:1;background:rgba(0,0,0,.06)}
.cart-qty-form{display:flex;gap:6px;align-items:center;margin:0}
.cart-qty-form input{
  width:72px;padding:8px 10px;font-family:inherit;font-size:14px;
  border:1.5px solid #cfdded;border-radius:8px;background:#fff;color:#16223a;
}
.warn-inline{margin-top:4px;font-size:12.5px;color:#a12626;font-weight:600}

@media (max-width:640px){
  .cart-line{grid-template-columns:48px minmax(0,1fr) auto;row-gap:10px}
  .cart-line-icon{width:44px;height:44px}
  .cart-qty-form{grid-column:2}
  .cart-line-price{grid-column:3;grid-row:2}
}

/*  🧾 **แถบสรุปปิดท้าย** — เต็มความกว้าง อยู่ใต้รายการของ (2026-09-08)
    ⛔ เลิก `position:sticky` — ของที่กว้างเต็มคอลัมน์แล้วยังเกาะจอ = ทับเนื้อหา
       (ตะกร้าร้านนี้ของไม่กี่รายการ ⇒ เลื่อนลงมากดไม่ลำบาก) */
.cart-summary{
  padding:14px 20px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
}
/* ยอดอยู่ซ้าย · ปุ่มอยู่ขวา — จอแคบยุบเป็นบนล่างเอง */
.cart-sum-bar{
  display:flex;align-items:center;justify-content:space-between;
  gap:20px;flex-wrap:wrap;
}
.cart-sum-act{flex:0 0 auto;min-width:min(320px,100%)}
.cart-sum-act .btn{width:100%;justify-content:center}
.cart-sum-note{margin:8px 0 0}
/* ทางไปต่อ — คั่นด้วยเส้นบน ไม่แย่งสายตากับปุ่มสั่งซื้อ */
.cart-sum-links{
  margin-top:14px;padding-top:14px;border-top:1px solid var(--line2);
}
@media (max-width:640px){
  .cart-sum-bar{gap:12px}
  .cart-sum-act{min-width:100%}
}
/* หัวข้อเป็น h2 เท่าแผงอื่นทั้งเว็บแล้ว (2026-09-08) — เดิมเป็น h3 ตัวเดียวในหน้าสมาชิก */
.cart-summary h2{margin:0 0 10px}
.cart-sum-row{
  display:flex;justify-content:space-between;gap:12px;
  padding:8px 0;font-size:14.5px;
}
/*  💰 เหลือแถวเดียว = "ยอดที่ต้องจ่าย" ⇒ ไม่ต้องมีเส้นคั่นเหนือมันอีก
    (เส้นนั้นเคยแบ่ง "ยอดรวม/ยอดคงเหลือ" ออกจาก "เหลือหลังสั่ง" ซึ่งถอดออกไปแล้ว) */
.cart-sum-row.total{
  margin-top:0;padding-top:4px;font-size:17px;
}
.cart-summary select{
  width:100%;padding:11px 14px;font-family:inherit;font-size:15px;
  border:1.5px solid #cfdded;border-radius:9px;background:#fff;color:#16223a;
}

/* (ชุด .order-card เดิมถอดออกแล้ว — หน้า Orders จัดใหม่เป็น .ord ท้ายไฟล์) */

.card-meta-row{
  display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:6px 0 10px;
}

/* แถบตะกร้าลอยล่างทับปุ่มของการ์ดแถวสุดท้าย ⇒ เว้นที่ให้ */
.shop-page-container{padding-bottom:96px}

/* การ์ดสินค้าสูงไม่เท่ากันเวลาบางใบไม่มีบรรทัด "ได้รับ/เหลือ"
   ⇒ ให้เนื้อการ์ดยืดเต็ม แล้วดันปุ่มไปชิดล่าง ปุ่มทุกใบจะอยู่แนวเดียวกัน */
.card-edge-to-edge .card-content-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
}
.card-edge-to-edge .card-content-body>form,
.card-edge-to-edge .card-content-body>button{
  margin-top:auto;
}
.card-edge-to-edge .card-content-body h3{margin-bottom:4px}
.card-edge-to-edge .card-content-body>p{margin-top:0}

/* ══ 🧾 หน้าประวัติการสั่งซื้อ ══
   ⚠️ แก้ที่ site.css เท่านั้น — modern.css ตายตั้งแต่บรรทัด 1173
   📐 เคยมี `.wrap-wide{max-width:1320px}` ครอบหน้านี้กับหน้าบัญชี — **ถอดออก 2026-09-08**
      เพราะมันแคบกว่าหน้าข่าว/กิจกรรม (1420px) อยู่ 100px ⇒ ทั้งสองหน้าใช้ `.wrap` เปล่า ๆ แล้ว */

/* 📌 เหลือไว้เพราะ **หน้า /promotion ใช้อยู่** (กล่องโค้ดของรางวัลโปร)
   ชุด `.ord-*` ของการ์ดใบสั่งเดิมถอดออกทั้งยวง ตอนรื้อหน้า /orders ใหม่ 2026-09-11
   ⇒ หน้า /orders ใช้ชุด `.odr-*` (รายการสั้นบรรทัดเดียว + กางดู) ที่ท้ายไฟล์ */
.ord-k{font-size:11.5px;font-weight:700;letter-spacing:.04em;opacity:.6;text-transform:uppercase}
.ord-code{
  margin-top:8px;padding:10px 14px 11px;
  border:1px solid #dcc189;border-radius:12px;
  background:linear-gradient(180deg,#fffdf4 0%,#fff8e6 100%);
}
.ord-code-head{font-size:13.5px;margin-bottom:6px}
.ord-code-pair{display:flex;gap:28px;flex-wrap:wrap;margin-bottom:5px}
.ord-code-pair>div{display:grid;gap:2px}
.ord-code-v{
  font-size:20px;letter-spacing:.09em;
  /* เลือกทั้งก้อนได้ด้วยดับเบิลคลิก — ผู้เล่นต้องพิมพ์ต่อในเกม อ่านผิดตัวเดียวใช้ไม่ได้ */
  user-select:all;
}

/* ═════════════════════════════════════════════════════════════════════════════
   🧱 หน้า /orders อยู่ในแผงขาวใบเดียว (`.acc-panel ord-panel`) — 2026-09-08
      user: "องค์รวมหน้านี้ มันยังแปลก ๆ" ⇒ เดิมมี **3 หน้าตาในคอลัมน์เดียว**
      (การ์ดใบสั่งลอยบนพื้นหลัง · แผงสมุดพอยต์มีขอบ · แผงคำอธิบายมีขอบ)
   ⛔ ของข้างในต้องเลิกเป็นการ์ดของตัวเอง ไม่งั้นกรอบซ้อนกรอบ
      (กฎเดียวกับ `.promo-panel` · `.cart-panel` — ทำมาแล้ว 2 หน้า)
   ───────────────────────────────────────────────────────────────────────────── */
.ord-panel{padding:8px 22px 20px}
.ord-panel>h2{margin:14px 0 10px}

/*  ⛔ กฎจัดการ์ดใบสั่งเดิมในแผง (`.ord-panel .ord*`) ถอดออกแล้ว — 2026-09-11
    หน้า /orders เลิกใช้การ์ดต่อใบ เปลี่ยนเป็นรายการสั้น `.odr-*` ที่ท้ายไฟล์ */

/* กล่อง "ยังไม่เคยสั่งของ" ในแผง — ถอดพื้นซ้อนออก */
.ord-panel .empty-state{background:transparent;border:0;box-shadow:none;padding:10px 0 6px}

/* 📒 สมุดความเคลื่อนไหวของพอยต์ · 📖 คำอธิบาย — เป็นส่วนถัดไปในแผงเดียวกัน คั่นด้วยเส้นบน */
.ord-panel .ord-ledger{
  border:0;border-radius:0;background:transparent;box-shadow:none;
  border-top:1px solid var(--line2);
  padding:16px 0 0;margin:14px 0 0;
}
.ord-ledger h2{margin:0 0 2px}
.ord-ledger p{margin:0 0 10px}


/* ═════════════════════════════════════════════════════════════════════════════
   🃏 การ์ดสินค้าเต็มใบ (2026-09-07) — รูปที่แอดมินอัปเป็นตัวการ์ดเอง
   user สั่ง: "ใช้วิธีการอัพโหลดภาพ แบบเต็มการ์ด ไม่เอาระดับสี ไม่มีจำกัดการขาย"
   ⇒ ไม่มีสีกรอบตามระดับ · ไม่มีป้ายของหมด · ชื่อ/คำอธิบายอยู่บนรูป
   ใช้ทั้งหน้าร้าน (`pcard-shop`) และตัวอย่างในหน้าหลังบ้าน (การ์ดเดียวกันเป๊ะ)
   ───────────────────────────────────────────────────────────────────────────── */
.pcard{
  background:#fff;
  border:1px solid rgba(226,235,243,.95);
  border-radius:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .22s ease, box-shadow .22s ease;
  box-shadow:0 4px 16px rgba(22,28,45,.04);
}
.pcard-shop:hover{transform:translateY(-4px);box-shadow:0 16px 34px rgba(22,28,45,.12)}

/* กรอบรูป: สัดส่วนคงที่ 3:4 ⇒ การ์ดทุกใบสูงเท่ากันแม้รูปที่อัปมาไม่เท่ากัน
   🔴 ต้องล็อกสัดส่วน ไม่ใช่ปล่อยตามรูป — ไม่งั้นแถวการ์ดเหลื่อมกันทั้งกริด */
.pcard-art-wrap{
  position:relative;
  aspect-ratio:3/4;
  background:linear-gradient(160deg,#eef3f8 0%,#dde5ee 100%);
  overflow:hidden;
}
.pcard-art{
  width:100%;height:100%;
  object-fit:cover;object-position:center;
  display:block;
  transition:transform .35s ease;
}
.pcard-shop:hover .pcard-art{transform:scale(1.05)}

/* 🔀 **เลิกใช้ไอคอนไอเทมในเกมเป็นรูปสำรอง** (user สั่ง 2026-09-08: จะทำรูปเอง)
   ยังไม่อัปรูป ⇒ กล่องเปล่าบอกขนาดที่ต้องทำ · ⛔ อย่าเอาไอคอน 32px กลับมายืดเต็มใบ
   📐 **ขนาดรูปที่ควรทำ: 900 × 1200 px (3:4)** — กรอบจริงกว้างสุด ~452px (แท็บเล็ต 2 คอลัมน์) */
.pcard-art-empty{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  color:var(--mute);font-size:13px;font-weight:700;
}
.pcard-art-empty-mark{font-size:30px;line-height:1}
.pcard-art-empty-size{font-size:11.5px;font-weight:800;letter-spacing:.04em;color:#a8b8c6}

/* ตัวอย่างในหน้าหลังบ้านต้องคง <img> ไว้ (js ตั้ง src ตอนเลือกไฟล์) ⇒ ซ่อนด้วยความจาง */
.pcard-art-blank{opacity:0;transform:none!important}

/* เงาไล่ระดับใต้ภาพ — ให้ตัวหนังสือขาวอ่านออกบนรูปสีอะไรก็ได้
   (ถ้าไม่มีชั้นนี้ ชื่อของจะจมหายบนรูปสว่าง) */
.pcard-shade{
  position:absolute;inset:auto 0 0 0;height:62%;
  background:linear-gradient(180deg,rgba(9,14,24,0) 0%,rgba(9,14,24,.78) 62%,rgba(9,14,24,.92) 100%);
  pointer-events:none;
}
.pcard-caption{position:absolute;left:0;right:0;bottom:0;padding:14px 14px 13px}
.pcard-name{
  color:#fff;font-size:15.5px;font-weight:800;line-height:1.35;
  text-shadow:0 1px 10px rgba(0,0,0,.45);
}
.pcard-note{
  color:rgba(255,255,255,.82);font-size:12px;line-height:1.5;margin-top:3px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.pcard-kind{
  position:absolute;top:11px;left:11px;
  font-size:10.5px;font-weight:800;letter-spacing:.06em;
  padding:3px 9px;border-radius:999px;
  color:#fff;background:rgba(15,23,42,.66);
  backdrop-filter:blur(6px);
}

.pcard-foot{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:12px 14px;background:#fff;
}
.pcard-foot form{margin:0}
.pcard-price{display:flex;align-items:baseline;gap:4px;white-space:nowrap}
.pcard-price b{font-size:19px;font-weight:900;color:var(--gold-dk,#a9761a)}
.pcard-price span{font-size:11.5px;font-weight:800;color:var(--mute,#7c8a99)}
.pcard-btn{
  display:inline-block;cursor:pointer;
  padding:8px 14px;border:0;border-radius:9px;
  background:linear-gradient(180deg,#d8a83c 0%,#b8871f 100%);
  color:#fff;font-family:inherit;font-size:12.5px;font-weight:800;white-space:nowrap;
}
.pcard-btn:hover{filter:brightness(1.07)}

@media (max-width:640px){
  .pcard-name{font-size:14.5px}
  .pcard-price b{font-size:17px}
}

/* รูปในตะกร้า: ของที่มีรูปอัปเองให้ครอบเต็มช่อง ส่วนไอคอนไอเทมยังเป็นพิกเซลอาร์ต */
.cart-line-art{object-fit:cover!important;image-rendering:auto!important;border-radius:10px}

/* ═════════════════════════════════════════════════════════════════════════════
   🛒 ตะกร้าบนแถบเมนู + กล่องแจ้งผลมุมจอ + เก็บงานหน้าร้านให้ทันสมัย (2026-09-07)
   user: "ตอนใส่ตะกร้าไม่ชอบเลย มันเด้งไปข้างบนใหม่ทุกที · ใส่ icon ตะกร้า จำนวน ไว้ที่ navbar
          · ทำให้ทันสมัยหน่อย"
   🔴 กฎเหล็กของแผ่นนี้: `modern.css` **ตายตั้งแต่บรรทัด ~1155** (คอมเมนต์ไม่ปิด กลืนที่เหลือทั้งไฟล์)
      ⇒ อย่าไปเพิ่มกฎในไฟล์นั้น มันไม่มีผล · ของใหม่ต่อท้ายไฟล์นี้
   ───────────────────────────────────────────────────────────────────────────── */

/* ── ไอคอนตะกร้าบนแถบเมนู ──────────────────────────────────────────────── */
.navcart{
  position:relative;
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;flex:0 0 auto;
  border:1px solid rgba(226,235,243,.9);border-radius:11px;
  background:#fff;color:#334155;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.navcart:hover{border-color:#d8c089;color:#0f172a;box-shadow:0 6px 16px -8px rgba(15,23,42,.35)}
.navcart:active{transform:scale(.94)}
.navcart.on{border-color:#c8921f;color:#a2740f;background:#fdf8ec}

/* ตัวเลข — ตำแหน่งมุมขวาบนของไอคอน ไม่ดันความกว้างแถบเมนู */
.navcart-n{
  position:absolute;top:-5px;right:-5px;
  min-width:18px;height:18px;padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;
  background:linear-gradient(180deg,#e2b445 0%,#b8871f 100%);
  color:#fff;font-size:10.5px;font-weight:900;line-height:1;
  box-shadow:0 2px 6px rgba(184,135,31,.45);
  border:1.5px solid #fff;
}
.navcart-n.is-zero{display:none}
/* ท่าเด้งตอนเลขเปลี่ยน — บอกว่า "ของเข้าตะกร้าแล้ว" โดยไม่ต้องเลื่อนหน้าไปดู */
.navcart-n.bump{animation:cartbump .42s cubic-bezier(.2,1.5,.4,1)}
@keyframes cartbump{
  0%{transform:scale(1)}
  38%{transform:scale(1.42)}
  100%{transform:scale(1)}
}

/* ── กล่องแจ้งผลมุมจอ ─────────────────────────────────────────────────── */
/* 📍 วางไว้ **ใต้ navbar ชิดขวา** (user เลือก 2026-09-07)
   เหตุผล: โผล่ตรงเดียวกับไอคอนตะกร้าที่เลขเพิ่งเด้ง ⇒ สายตาไปที่เดียวจบ
   และไม่ไปชนแถบพอยต์ลอยมุมล่างขวาเหมือนตำแหน่งเดิม
   🔑 `--nav-h` = ความสูงแถบเมนู (navbar เป็น position:fixed) ⇒ ต้องบวกเผื่อ ไม่ใช่ top:0 */
.toastwrap{
  position:fixed;z-index:1200;
  right:22px;top:calc(var(--nav-h) + 14px);
  display:flex;flex-direction:column;gap:9px;align-items:flex-end;
  pointer-events:none;
}
.toast{
  display:flex;align-items:center;gap:10px;
  max-width:min(84vw,360px);
  padding:11px 15px 11px 13px;
  border-radius:13px;
  background:rgba(13,20,34,.93);
  border:1px solid rgba(255,255,255,.1);
  backdrop-filter:blur(10px);
  color:#f1f5f9;font-size:13.5px;font-weight:600;line-height:1.5;
  box-shadow:0 18px 40px -16px rgba(2,6,23,.7);
  animation:toastin .28s cubic-bezier(.2,1.2,.3,1);
}
.toast-i{
  width:20px;height:20px;flex:0 0 auto;border-radius:50%;
  background:#10b981;position:relative;
}
/* เครื่องหมายถูกวาดด้วยขอบ 2 ด้าน — ไม่ต้องพึ่งฟอนต์ไอคอนหรือรูป */
.toast-i::after{
  content:"";position:absolute;left:6px;top:4px;
  width:5px;height:9px;border:2px solid #fff;border-top:0;border-left:0;
  transform:rotate(42deg);
}
.toast-bad .toast-i{background:#ef4444}
.toast-bad .toast-i::after{
  left:9px;top:4px;width:0;height:11px;
  border:0;border-left:2px solid #fff;transform:none;
}
.toast.out{animation:toastout .26s ease forwards}
@keyframes toastin{from{opacity:0;transform:translateY(-14px) scale(.96)}to{opacity:1;transform:none}}
@keyframes toastout{to{opacity:0;transform:translateY(-8px) scale(.97)}}

/* ปุ่มใส่ตะกร้าตอนกำลังส่ง / ส่งสำเร็จ */
.pcard-btn.is-busy{opacity:.6;cursor:progress}
.pcard-btn.is-done{background:linear-gradient(180deg,#34d399 0%,#0f9d69 100%)}
.pcard-btn{transition:filter .15s ease, background .2s ease, transform .12s ease}
.pcard-btn:active{transform:scale(.96)}

/* ── เก็บงานหน้าร้านให้ทันสมัยขึ้น ─────────────────────────────────────── */
/* 📐 กว้างเท่ากับหน้าข่าว/กิจกรรม/ดาวน์โหลด (user 2026-09-08: "content ดูแคบไป")
   🔴 มีกฎ .shop-page-container อยู่ 3 ที่ในแผ่นนี้ (บรรทัด ~727 · ~1503 · ที่นี่)
      **ตัวนี้อยู่ท้ายสุด = ตัวที่มีผลจริง** แก้ 2 ตัวบนไม่พอ */
.shop-page-container{width:min(1420px,95vw);margin:0 auto;padding:26px 0 90px}
.shop-header-compact h1{
  font-size:27px;font-weight:800;letter-spacing:-.015em;color:#0f172a;
}
.shop-header-compact .crumb{font-size:12.5px;color:#8695a6;margin-top:5px}
.shop-header-compact .crumb a{color:#8695a6}
.shop-header-compact .crumb a:hover{color:#a2740f}

/* 🔴 เคยมี `margin-top:18px` ที่นี่ — **ถอดออก 2026-09-08** (user: "หน้าไอเทมไม่เท่าเพื่อนเลย")
   มันบวกทับระยะ 40px ของคอนเทนเนอร์ ⇒ /ItemShop ห่างจากหัวเพจ **58px** ขณะที่หน้าอื่น 40px
   และทำให้หัวแผงกับหัวแถบข้างใน `.pgwrap` เหลื่อมกัน 18px
   🔑 มันเป็นของเหลือจากยุคที่หน้านี้มีหัวเพจของตัวเอง (`.shop-header-compact`) วางอยู่ข้างบน
      ตอนนี้ใช้ `_PageHead` ร่วมกับทุกหน้าแล้ว ไม่มีอะไรให้เว้นระยะจาก */
.shop-panel{
  background:#fff;border:1px solid rgba(226,235,243,.9);
  border-radius:18px;padding:22px;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 20px 44px -30px rgba(15,23,42,.28);
}

/* แถบตัวกรอง: ติดขอบบนตอนเลื่อน ⇒ เปลี่ยนหมวด/ค้นหาได้จากทุกจุดของหน้า
   (ก่อนหน้านี้ต้องเลื่อนกลับขึ้นไปบนสุดก่อน ซึ่งเป็นอาการที่ user บ่นเรื่องเดียวกัน) */
.shop-controls-bar{
  position:sticky;top:var(--nav-h);z-index:20;
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;flex-wrap:wrap;
  margin:-22px -22px 20px;padding:16px 22px;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(226,235,243,.9);
  border-radius:18px 18px 0 0;
}
.shop-tabs-nav{display:flex;gap:7px;flex-wrap:wrap}
.shop-tab{
  padding:8px 15px;border-radius:999px;
  border:1px solid rgba(226,235,243,.95);background:#fff;
  font-size:13px;font-weight:700;color:#475569;text-decoration:none;
  transition:all .16s ease;
}
.shop-tab:hover{border-color:#d8c089;background:#fdfaf3;color:#0f172a}
.shop-tab.active{
  background:linear-gradient(180deg,#1e293b 0%,#0f172a 100%);
  border-color:#0f172a;color:#fff;
  box-shadow:0 6px 16px -8px rgba(15,23,42,.6);
}

.shop-search-row{display:flex;gap:8px;align-items:center;margin:0}
.shop-search-row .search-field{position:relative}
.shop-search-row input[type=text]{
  padding:9px 14px;min-width:250px;
  border:1px solid rgba(226,235,243,.95);border-radius:999px;
  background:#f8fafc;font-family:inherit;font-size:13.5px;color:#0f172a;
}
.shop-search-row input[type=text]:focus{
  outline:none;border-color:#c8921f;background:#fff;
  box-shadow:0 0 0 3px rgba(200,146,31,.14);
}

/* แถบพอยต์/ตะกร้าลอยมุมจอ — บางลงและเป็นกระจก ให้ไม่ทับการ์ดจนอ่านไม่ออก */
.floating-cart-bar{
  gap:16px!important;padding:11px 18px!important;
  border-radius:999px!important;
  background:rgba(13,20,34,.9)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 20px 44px -20px rgba(2,6,23,.75)!important;
}
.floating-cart-bar .lbl{font-size:10.5px;letter-spacing:.06em;opacity:.62}
.floating-cart-bar .val{font-size:15px;font-weight:800}

@media (max-width:640px){
  .toastwrap{right:12px;left:12px;top:calc(var(--nav-h) + 10px);align-items:stretch}
  .toast{max-width:none}
  .shop-search-row input[type=text]{min-width:0;width:100%}
  .shop-search-row{width:100%}
  .shop-controls-bar{margin:-16px -15px 16px;padding:13px 15px}
  .shop-panel{padding:16px 15px;border-radius:14px}
}

/* เคารพคนที่ปิดแอนิเมชันในระบบ — ท่าเด้ง/สไลด์ตัดทิ้งให้หมด */
@media (prefers-reduced-motion:reduce){
  .navcart-n.bump{animation:none}
  .toast,.toast.out{animation:none}
  .pcard-shop:hover{transform:none}
  .pcard-shop:hover .pcard-art{transform:none}
}

/* ── 🛒 หน้าตะกร้า: ปุ่มเพิ่ม/ลดจำนวน + ท่าตอนตัวเลขขยับ (2026-09-07) ─────── */
.cart-qty-form{display:flex;align-items:center;gap:6px}
.qty-step{
  width:28px;height:28px;flex:0 0 auto;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(226,235,243,.95);border-radius:8px;
  background:#fff;color:#334155;font-family:inherit;font-size:15px;font-weight:800;line-height:1;
  transition:border-color .15s ease,background .15s ease,transform .1s ease;
}
.qty-step:hover{border-color:#d8c089;background:#fdfaf3;color:#0f172a}
.qty-step:active{transform:scale(.9)}
.cart-qty-form input[type=number]{
  width:52px;text-align:center;
  padding:6px 4px;border:1px solid rgba(226,235,243,.95);border-radius:8px;
  font-family:inherit;font-size:13.5px;font-weight:700;color:#0f172a;background:#f8fafc;
}
.cart-qty-form input[type=number]:focus{
  outline:none;border-color:#c8921f;background:#fff;box-shadow:0 0 0 3px rgba(200,146,31,.14);
}
/* สคริปต์ทำงาน = ไม่ต้องมีปุ่ม "แก้" (เปลี่ยนจำนวนแล้วบันทึกเอง)
   ไม่มีสคริปต์ = ปุ่มนี้โผล่ตามปกติ ⇒ ยังแก้จำนวนได้ */
html.js .cart-qty-apply{display:none}

/* กำลังส่ง — กันกดซ้ำและบอกว่ากำลังทำงาน */
form.is-busy{opacity:.55;pointer-events:none}

/* ไฮไลต์บรรทัดที่ตัวเลขเพิ่งเปลี่ยน (จาง ๆ) — บอกว่าบันทึกแล้วโดยไม่ต้องมีข้อความ */
.cart-line.just-changed{animation:cartflash .9s ease}
@keyframes cartflash{
  0%{background:rgba(200,146,31,.14)}
  100%{background:transparent}
}
/* กำลังถูกเอาออก — ยุบหายไปแทนที่จะกระตุกหาย */
.cart-line.going{
  opacity:0;transform:translateX(14px);
  transition:opacity .2s ease, transform .2s ease;
}

@media (prefers-reduced-motion:reduce){
  .cart-line.just-changed{animation:none}
  .cart-line.going{transition:none}
}

/* ═════════════════════════════════════════════════════════════════════════════
   📱 จอมือถือ — user สั่ง 2026-09-07
      · หน้าร้าน: การ์ด **แถวละ 2 ใบ** (ของเดิมเหลือใบเดียวต่อแถว เลื่อนยาวมาก)
      · หน้าตะกร้า: ปุ่ม ✕ ต้องอยู่ **แถวเดียวกับชื่อของ** (ของเดิมหลุดไปอยู่แถวล่างสุด)
   🔴 ต้องใส่ !important — กฎเดิมในไฟล์นี้ (ชุด "AAA" ที่เขียนไว้ก่อน) ใส่ !important ไว้แล้ว
      โหลดทีหลังอย่างเดียวไม่ชนะ
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width:640px){
  .shop-grid-edge{grid-template-columns:repeat(2,1fr)!important;gap:12px!important}

  /* การ์ดแคบลงครึ่ง ⇒ ย่อตัวหนังสือกับระยะให้พอดี ไม่ให้ชื่อของล้นเป็น 4 บรรทัด */
  .pcard-caption{padding:11px 10px 10px}
  .pcard-name{font-size:13px;line-height:1.3}
  .pcard-note{font-size:11px;-webkit-line-clamp:2}
  .pcard-kind{font-size:9.5px;padding:2px 7px;top:8px;left:8px}
  .pcard-foot{padding:10px}
  .pcard-price b{font-size:16px}
  .pcard-price span{font-size:10.5px}
}

/* การ์ดแคบมาก: ราคากับปุ่มอยู่แถวเดียวกันไม่พอ ⇒ ให้ปุ่มลงมาเต็มความกว้าง */
@media (max-width:430px){
  .pcard-foot{flex-direction:column;align-items:stretch;gap:8px}
  .pcard-price{justify-content:center}
  .pcard-btn{width:100%;padding:9px 10px}
}

/* ── ตะกร้าบนมือถือ: วางเป็นตาราง 2 แถวชัด ๆ ────────────────────────────────
   แถวบน  = รูป | ชื่อของ | ✕
   แถวล่าง = รูป | ปุ่มจำนวน | ราคา
   (ของเดิมปล่อยให้ grid หาที่ให้ ✕ เอง มันเลยไปโผล่แถวล่างสุดคนละที่กับชื่อ) */
@media (max-width:640px){
  .cart-line{
    grid-template-columns:44px minmax(0,1fr) auto!important;
    grid-template-areas:
      "icon name  x"
      "icon qty   price"!important;
    column-gap:12px;row-gap:10px;
    align-items:center;
  }
  .cart-line-icon{grid-area:icon;align-self:start}
  .cart-line-main{grid-area:name;min-width:0}
  .cart-line .cart-qty-form{grid-area:qty;grid-column:auto!important}
  .cart-line-price{grid-area:price;grid-column:auto!important;grid-row:auto!important}
  .cart-line form[data-cart-op=remove]{grid-area:x;justify-self:end}
  .cart-line-x{padding:4px 6px;font-size:15px}
  .cart-line-name{font-size:14.5px}
}

/* ── 🐞 /News ล้นจอ 22px บนมือถือ (เจอตอนไล่ responsive 2026-09-07) ───────────
   สาเหตุ: กริดฮีโรตั้ง `grid-template-columns:1fr` — `1fr` มีพื้นล่างเป็น **min-content**
   ⇒ ถ้าลูกในกริดกว้างกว่าช่อง (รูปแบนเนอร์ + กล่องประกาศ) ช่องจะถ่างตามลูก ดันหน้าทั้งหน้าล้น
   🔑 แก้ด้วย `minmax(0,1fr)` = ยอมให้ช่องเล็กกว่าเนื้อในได้ แล้วลูกค่อยหดตาม
      (กับดักคลาสสิกของ CSS grid — จำไว้ใช้ทุกที่ที่ใส่ 1fr แล้วมีรูป/ตารางอยู่ข้างใน) */
@media (max-width:980px){
  .news-hero-block{grid-template-columns:minmax(0,1fr)!important}
  .featured-banner-card,
  .news-pinned-list{min-width:0!important;max-width:100%!important}
}

/* ── การ์ดสรุปในหน้าบัญชี: ปุ่มหลายอันในการ์ดเดียว ────────────────────────────
   user สั่ง 2026-09-07: ย้ายปุ่ม "ขอไอดีใหม่" มาอยู่คู่กับ "ไปที่ร้าน"
   ⇒ ปุ่มอยู่ติดกับตัวเลขโควตาที่มันใช้ ไม่ต้องเลื่อนหาหัวข้อกลางหน้า */
.qcard-acts{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:2px}
.qcard-acts .btn{margin-top:0}
/* จอแคบ: ปุ่มยืดเต็มความกว้างเรียงลงมา กดง่ายกว่าปุ่มเล็ก 2 อันเบียดกัน */
@media (max-width:520px){
  .qcard-acts{flex-direction:column;align-items:stretch}
  .qcard-acts .btn{width:100%;text-align:center;justify-content:center}
}

/* ── ⚖️ การ์ดสรุปในหน้าบัญชี: ปุ่มของทุกการ์ดต้องอยู่ "แนวเดียวกัน" ──────────
   user ทัก 2026-09-07 ว่าไม่สมมาตร — เพราะการ์ดซ้ายมีปุ่ม 1 อัน การ์ดขวามี 2 อัน
   เนื้อในสูงไม่เท่ากัน ปุ่มจึงลอยอยู่คนละระดับ
   🔑 ทำการ์ดเป็นคอลัมน์ยืดเต็มความสูง แล้วดันแถวปุ่มด้วย margin-top:auto
      ⇒ ปุ่มทุกการ์ดชิดล่างเท่ากันเสมอ ไม่ว่าเนื้อในจะยาวไม่เท่ากันแค่ไหน */
.qcards{align-items:stretch}
.qcard{display:flex;flex-direction:column}
.qcard .sub2{margin-bottom:14px}
.qcard-acts{margin-top:auto}

/* ═════════════════════════════════════════════════════════════════════════════
   🧱 หน้าบัญชีของฉัน — **แผงเดียว** ไม่ใช่การ์ดลอยหลายใบ (user ทัก 2026-09-07)
   หลักที่ใช้: กรอบนอกมีชั้นเดียว · ข้างในแบ่งส่วนด้วย**เส้นบาง**
   ⛔ อย่าเอากรอบ/เงา กลับไปใส่ให้ของข้างในอีก — กรอบซ้อนกรอบคือต้นเหตุที่ดู "ลอย ๆ"
   ───────────────────────────────────────────────────────────────────────────── */
.acc-panel{
  background:#fff;
  border:1px solid rgba(226,235,243,.9);
  border-radius:18px;
  padding:6px 24px 22px;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 20px 44px -30px rgba(15,23,42,.26);
}

/* แถบตัวเลข 2 ช่อง — คั่นด้วยเส้นตั้งเส้นเดียว ไม่มีกรอบรายช่อง */
.acc-stats{
  /* 🔢 3 ใบ: พอยต์ · ไอดี · ยอดเติมสะสม (ใบที่ 3 เพิ่ม 2026-09-08 ตามที่ user สั่ง)
     🔴 `minmax(0,1fr)` ไม่ใช่ `1fr` — ตัวเลขยาว ๆ ในใบใดใบหนึ่งจะถ่างช่องจนแผงล้นจอ */
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  border-bottom:1px solid var(--line2);
}
/* 📐 จอกลาง — 3 ใบเรียงกันแคบเกินไป ยุบเป็น 1 คอลัมน์ก่อนถึงจุดที่แถบข้างยุบ */
@media (max-width:1280px){
  .acc-stats{grid-template-columns:minmax(0,1fr)}
  .acc-stats .qcard+.qcard{
    border-left:0!important;border-top:1px solid var(--line2)!important;
  }
}
.acc-stats .qcard{
  border:0!important;border-radius:0!important;background:transparent!important;
  padding:20px 22px 22px;
}
.acc-stats .qcard+.qcard{border-left:1px solid var(--line2)!important}

/* หัวข้อในแผง — เส้นทองสั้น ๆ นำหน้า ให้รู้ว่าขึ้นส่วนใหม่โดยไม่ต้องมีกล่องใหม่ */
.acc-h{
  display:flex;align-items:center;gap:9px;
  margin:24px 0 12px;padding-top:2px;
  font-size:17px;font-weight:800;color:var(--ink);
}
.acc-h::before{
  content:"";width:4px;height:17px;border-radius:2px;background:#d9b25f;flex:0 0 auto;
}

/* ตารางในแผง: ไม่ต้องมีกรอบของตัวเองแล้ว (แผงเป็นกรอบให้อยู่) */
.acc-panel .tblwrap{border:0;border-radius:0;background:transparent;overflow-x:auto}
.acc-panel .tbl{width:100%}

.acc-foot{
  display:flex;gap:9px;flex-wrap:wrap;
  margin-top:22px;padding-top:18px;border-top:1px solid var(--line2);
}

@media (max-width:720px){
  .acc-panel{padding:4px 15px 18px;border-radius:14px}
  /* จอแคบ: 2 ช่องเรียงลงมา ⇒ เส้นคั่นต้องเปลี่ยนจากเส้นตั้งเป็นเส้นนอน */
  .acc-stats{grid-template-columns:1fr}
  .acc-stats .qcard+.qcard{
    border-left:0!important;border-top:1px solid var(--line2)!important;
  }
  .acc-stats .qcard{padding:16px 4px 18px}
  .acc-h{margin:20px 0 10px}
}

/* ═════════════════════════════════════════════════════════════════════════════
   🧭 เนื้อหา + แถบข้าง — News · Events · Download · Rules (user สั่ง 2026-09-07)
      "เนื้อหาแคบไป เหลือพื้นที่เยอะเกิน" ⇒ เอาพื้นที่ข้างขวาเป็นทางไปหน้าพี่น้อง
   ───────────────────────────────────────────────────────────────────────────── */
.pgwrap{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:22px;align-items:start}

/* ── ตัวแถบข้าง (ดีไซน์ที่ 2 · 2026-09-07) ────────────────────────────────────
   user: "ยังไม่ชอบดีไซน์ sidebar" — ของเดิมการ์ด 2 ใบ + คำอธิบายห้อยทุกลิงก์ = รก/หนัก
   ของใหม่: การ์ดใบเดียว · ลิงก์บรรทัดเดียว 42px · ไอคอนเส้นบาง · เกาะจอตอนเลื่อน
   ⛔ อย่าเอาคำอธิบายห้อยใต้ลิงก์กลับมา — นั่นคือต้นเหตุที่มันดูรก
   ───────────────────────────────────────────────────────────────────────────── */
.pgnav{min-width:0;position:sticky;top:calc(var(--nav-h) + 16px)}
.pgnav-card{
  background:#fff;border:1px solid rgba(226,235,243,.9);border-radius:14px;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 14px 30px -24px rgba(15,23,42,.22);
}
/* หัวข้อของแถบข้าง — ตัวเล็ก ตัวหนา เว้นระยะตัวอักษร ⇒ อ่านเป็น "ป้ายหมวด" ไม่ใช่ลิงก์
   ⛔ อย่าทำให้ใหญ่หรือเข้มกว่าชื่อลิงก์ ไม่งั้นสายตาไปตกที่ป้ายแทนที่จะไปที่เมนู */
.pgnav-title{
  padding:12px 14px 9px;
  font-size:11px;font-weight:800;letter-spacing:.12em;color:#9aa7b5;
  border-bottom:1px solid var(--line2);background:#fcfdfe;
}
.pgnav-title-sub{
  padding:0 0 8px;border-bottom:0;background:transparent;
}

.pgnav-link{
  display:flex;align-items:center;gap:11px;
  height:44px;padding:0 14px;
  font-size:13.5px;font-weight:700;color:#46556a;text-decoration:none;
  border-left:3px solid transparent;
  border-bottom:1px solid var(--line2);
}
.pgnav-link:last-of-type{border-bottom:0}
.pgnav-link:hover{background:#f9fbfd;color:#1b2233}
.pgnav-link .pgnav-i{width:18px;height:18px;flex:0 0 auto;opacity:.55}
.pgnav-link:hover .pgnav-i{opacity:.8}
/* หน้าที่กำลังเปิด — พื้นทองอ่อน + ขีดทองซ้าย (ตัวเดียวกับหัวข้อในหน้าบัญชี) */
.pgnav-link.on{
  background:#fffbf0;border-left-color:#d9b25f;color:#8a6416;
}
.pgnav-link.on .pgnav-i{opacity:1;color:#c8921f}

.pgnav-foot{padding:12px 14px 14px;border-top:1px solid var(--line2);background:#fcfdfe}
.pgnav-btn{width:100%;justify-content:center}
.pgnav-note{display:block;font-size:11.5px;color:#8b98a8;line-height:1.6;margin-top:9px}
.pgnav-sub{
  display:block;padding:7px 0;font-size:13px;font-weight:700;
  color:#46556a;text-decoration:none;
}
.pgnav-sub:hover{color:#a2740f}

/* ═════════════════════════════════════════════════════════════════════════════
   💰 การ์ด "พอยต์คงเหลือ" แบบลอย (2026-09-08 · user สั่ง)
      "ทำพอยต์คงเหลือ เป็นการ์ดลอยหน่อย · ตอน responsive ต้องอยู่ข้างบนก่อน"
   ⛔ ของเดิมอยู่ท้ายการ์ดเมนู (`.pgnav-foot`/`.pgnav-pts`) — **ถอดออกแล้ว**
      เพราะฝังในแถบข้าง ⇒ จอแคบมันไหลลงล่างไปทั้งก้อน สั่งให้ขึ้นบนด้วย CSS ไม่ได้
   ───────────────────────────────────────────────────────────────────────────── */
.ptcard{
  display:block;
  background:#fff;border:1px solid rgba(226,235,243,.9);border-radius:14px;
  padding:13px 15px 12px;
  /* เงาลอยกว่าการ์ดเมนูหนึ่งขั้น ⇒ อ่านเป็น "ของชิ้นสำคัญ" ไม่ใช่ส่วนหนึ่งของเมนู */
  box-shadow:0 1px 2px rgba(15,23,42,.04), 0 18px 34px -22px rgba(15,23,42,.30);
}
.ptcard-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ptcard-main{min-width:0}
.ptcard-lbl{font-size:11px;font-weight:800;letter-spacing:.12em;color:#9aa7b5}
/* ตัวเลขต้องเด่นสุดในการ์ด แต่ยังเบากว่าปุ่มทองข้าง ๆ */
.ptcard-num{font-size:26px;font-weight:800;color:var(--ink);line-height:1.15;margin-top:2px}
.ptcard-btn{flex:0 0 auto}
.ptcard-note{font-size:11.5px;color:#8b98a8;line-height:1.6;margin-top:8px}

/* 📐 ตำแหน่งในหน้าที่มีแถบข้าง — `.pgwrap-pts` = `.pgwrap` ที่มีการ์ดพอยต์ด้วย
   🔴 ต้องใช้คลาสแยก **ห้ามแก้ `.pgwrap` เปล่า ๆ** — หน้า /News /Download /Rules ใช้ตัวนั้นอยู่
      และไม่มีการ์ดพอยต์ ⇒ ถ้าไปสั่ง grid-row ให้มันด้วย จะเกิดแถวว่าง 22px คาหัวแถบข้าง */
/*  🔴🔴 **`grid-template-rows:auto 1fr` คือหัวใจ ห้ามตัดออก**
    ปัญหาที่เจอจริง (user: "ห่างไรขนาดนั้น"): `.colmain` คร่อม 2 แถว ⇒ ถ้าไม่กำหนดขนาดแถว
    ความสูงของเนื้อหาจะถูก**เกลี่ยลงทั้ง 2 แถว** ⇒ แถว 1 พองตามเนื้อหา
    แล้วการ์ดเมนู (แถว 2) ถูกดันลงไปห่างจากการ์ดพอยต์เป็นร้อย px
    ✅ ใส่ `1fr` ที่แถว 2: ตามสเปกกริด ของที่คร่อมแถวจะ**ไม่ถูกเกลี่ยลงแถวที่ขนาดยืดหยุ่น**
       ⇒ แถว 1 สูงเท่าการ์ดพอยต์พอดี · ส่วนเกินไปลงแถว 2 ทั้งหมด */
.pgwrap-pts{grid-template-rows:auto 1fr}
/*  📌 **`.pgside` = กล่องแถบข้างขวา (การ์ดยอด + เมนู)** — เพิ่ม 2026-09-16 ตามที่ user สั่ง
    *"ตอนสกอลงมาให้มันลอยติดหน่อย"*
    🔑 ทำไมต้องมีกล่องครอบ: `position:sticky` ของช่องในตะแกรงเลื่อนได้แค่ใน**ช่องของตัวเอง**
       การ์ดยอดเดิมอยู่แถว 1 ซึ่งสูงเท่าตัวการ์ดพอดี ⇒ สั่ง sticky ไปก็ไม่ขยับสักพิกเซล
       ⇒ ครอบทั้งสองใบไว้ในช่องเดียวที่กินสองแถว แล้วให้ **กล่องนอกเป็นตัวเกาะจอ** */
.pgwrap-pts>.pgside{
  grid-column:2;grid-row:1 / span 2;min-width:0;
  display:flex;flex-direction:column;gap:16px;
  align-self:start;position:sticky;top:calc(var(--nav-h) + 16px);
}
/* เมนูไม่ต้องเกาะจอเองแล้ว — กล่องนอกพาไปทั้งก้อน (ซ้อน sticky ในกล่องที่ sticky = ไม่ขยับ) */
.pgside>.pgnav{position:static;top:auto}
/*  🔴 **จับ "ก้อนเนื้อหา" แบบไม่ผูกชื่อคลาส** — แต่ละหน้าตั้งชื่อไม่เหมือนกัน
    `/Orders` `/Promotion` = `.colmain` · `/ItemShop` = `<main class="shop-panel">`
    เดิมเขียนเจาะ `.colmain` ⇒ **`/itemShop` ไม่เข้ากฎ ช่องว่างยังอยู่** (user จับได้)
    ⇒ เขียนเป็น "ลูกทุกตัวที่ไม่ใช่การ์ดพอยต์และไม่ใช่แถบข้าง" ⇒ หน้าใหม่ก็ใช้ได้เองไม่ต้องจำ */
.pgwrap-pts>:not(.pgside):not(.ptcard):not(.pgnav){grid-column:1;grid-row:1 / span 2}

/*  ⛔ `.ptcard-wide` = การ์ดพอยต์เต็มความกว้างวางบนสุดของหน้า — **ไม่มีหน้าไหนใช้แล้ว**
    (2026-09-08 user สั่งเพิ่มแถบข้างให้ `/TopUp` `/Cart` ⇒ การ์ดย้ายไปอยู่บนสุดของแถบข้าง)
    เก็บกฎไว้เผื่อวันหลังมีหน้าฝั่งสมาชิกที่ไม่มีแถบข้าง — ใช้ได้ทันทีโดยไม่ต้องเขียนใหม่ */
.ptcard-wide{margin-bottom:16px}
.ptcard-wide .ptcard-num{font-size:28px}

/* 📄 บทความที่เคยเป็นตัวหนังสือลอยบนฉากหลัง — ใส่แผงขาวให้ (หน้ากฎ/คู่มือ) */
.pnl-doc{
  background:#fff;border:1px solid rgba(226,235,243,.9);border-radius:18px;
  padding:24px 28px 28px;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 20px 44px -30px rgba(15,23,42,.26);
}

@media (max-width:1080px){
  /* แถบข้างลงไปอยู่ล่างเนื้อหา — ยังลิงก์หากันได้ แค่ไม่กินความกว้าง */
  .pgwrap{grid-template-columns:minmax(0,1fr)}
  .pgnav{margin-top:4px}

  /*  💰 **การ์ดพอยต์ต้องขึ้นไปอยู่บนสุด เหนือเนื้อหา** (user ย้ำ 2026-09-08)
      🔑 ทำได้เพราะการ์ดเป็นลูกตรงของ `.pgwrap` ⇒ สลับแถวมันเองได้
         (ถ้ามันอยู่ใน `_MemberNav` จะติดไปกับแถบข้างที่ไหลลงล่าง แก้ไม่ได้เลย)
      ⚠️ เลิก sticky ตอนจอแคบ — การ์ดที่เกาะจอบนมือถือกินพื้นที่อ่านไปเปล่า ๆ */
  /* 🔑 คืนขนาดแถวเป็นอัตโนมัติ — จอแคบเป็นคอลัมน์เดียว ไม่มีของคร่อมแถวแล้ว */
  .pgwrap-pts{grid-template-rows:auto}
  /*  🔑 `display:contents` = ยุบกล่องแถบข้างทิ้ง ⇒ การ์ดกับเมนูกลับไปเป็น**ช่องของตะแกรงเอง**
      สั่งแถวแยกกันได้เหมือนก่อนมี `.pgside` (เลิกเกาะจอด้วย — บนมือถือกินที่อ่านเปล่า ๆ) */
  .pgwrap-pts>.pgside{display:contents}
  .pgwrap-pts .ptcard{grid-column:1;grid-row:1;position:static;margin-bottom:2px}
  .pgwrap-pts>:not(.pgside):not(.ptcard):not(.pgnav){grid-column:1;grid-row:2}
  .pgwrap-pts .pgnav{grid-column:1;grid-row:3;position:static;top:auto}
}
@media (max-width:720px){
  .pnl-doc{padding:18px 16px 20px;border-radius:14px}
}

/* แผงแคบสำหรับหน้าแจ้งผลสั้น ๆ (ออกจากระบบ ฯลฯ) — เนื้อหาน้อยแต่ยังต้องมีที่ยืน */
.pnl-narrow{max-width:520px;margin:0 auto}
.pnl-narrow>p:first-of-type{margin:0 0 4px;font-size:15.5px;color:var(--ink2)}/* ══ 📐 ระยะจาก "หัวเพจ" ถึงเนื้อหา — ค่าเดียวทุกหน้า (user สั่ง 2026-09-08) ══════
   วัดของเดิมในเบราว์เซอร์แล้วไม่เท่ากัน 3 กลุ่ม:
     · 40px — /News /NewsArticle /Events /Download   (ดีไซน์รอบใหม่)
     · 52px — ทุกหน้าที่ใช้ `section.band` (/Rules /Guide /Orders /Account /Cart /Support …)
     · 26px — /ItemShop   ·  28px — /TopUp
   ⇒ ยึด **40px** ตามกลุ่มดีไซน์รอบใหม่

   🔑 เกาะที่ `.phd + …` (พี่น้องที่อยู่ถัดจากหัวเพจ) ไม่ใช่แก้ `.band` ตรง ๆ
      เพราะ `.band` ยังใช้เป็น "ท่อนกลางหน้า" ที่หน้าแรกด้วย — แก้ตรงนั้นจังหวะหน้าแรกจะเพี้ยนไปหมด
   🔑 ตัวเลือกนี้เจาะจงกว่ากฎคลาสเดียว (0,1,2 vs 0,1,0) ⇒ ชนะได้โดยไม่ต้องใส่ !important
   ⛔ หน้าที่ **ไม่มีหัวเพจ** (หน้าแรก · เข้าสู่ระบบ · หน้าแจ้งสถานะ) ไม่โดนกฎนี้ — ของพวกนั้น
      วัดระยะจากแถบเมนูโดยตรง ไม่ใช่จากหัวเพจ */
.phd + section.band,
.phd + .news-page-container,
.phd + .dl-page-container,
.phd + .shop-page-container,
.phd + .topup-single-container{
  padding-top:40px;
}

/* ══════════════════════════════════════════════════════════════════════════
   💳 เติมพอยต์: กล่อง QR "แตะเพื่อขยาย" + ตารางใบแจ้งโอน  (เพิ่ม 2026-09-08)
   🔑 ทำด้วย checkbox + label ล้วน ๆ **ไม่มีสคริปต์** — CSP `script-src 'self'`
      บล็อก onclick/<script> ในหน้า และเราไม่อยากเพิ่มไฟล์ js เพื่อของชิ้นเดียว
   ══════════════════════════════════════════════════════════════════════════ */

/* กล่องรูปเล็กที่กดได้ (แทนกรอบ QR เดิมที่โชว์รูปใหญ่ค้างไว้) */
.qr-tap-box {
  width: 240px;
  max-width: 100%;
  background: #ffffff;
  border: 1.5px solid rgba(226, 235, 243, 0.95);
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.qr-tap-box:hover {
  border-color: var(--gold-dk);
  box-shadow: 0 8px 22px rgba(185, 118, 10, 0.16);
  transform: translateY(-1px);
}
.qr-tap-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}
.qr-tap-hint {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-dk);
  line-height: 1.4;
}
/* ยังไม่ได้อัปรูป QR — กล่องเปล่าที่ยังบอกทางต่อให้ผู้เล่น (ไม่ใช่ช่องว่างเงียบ ๆ) */
.qr-tap-empty {
  cursor: default;
  background: #f8fafc;
  min-height: 200px;
  justify-content: center;
}
.qr-tap-empty:hover {
  border-color: rgba(226, 235, 243, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transform: none;
}
.qr-tap-empty .qr-tap-hint { color: var(--ink2); font-weight: 700; }
.qr-empty-mark {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.5);
}

/* ฉากขยาย — ซ่อนไว้ก่อน โผล่เมื่อ checkbox ถูกติ๊ก (แตะที่ไหนก็ปิดเพราะทั้งฉากเป็น label) */
.qr-zoom-sheet { display: none; }
.qr-zoom-chk:checked ~ .qr-zoom-sheet {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(9, 14, 26, 0.86);
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
.qr-zoom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.qr-zoom-inner img {
  width: min(420px, 82vw);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
}
.qr-zoom-close {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

/* ฟอร์มแจ้งโอน + ประวัติ */
.slip-head {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}
.slip-help {
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 12px;
}
.slip-help p { margin: 0 0 6px; }
.topup-history {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line2);
}

/* ป้ายสถานะใบแจ้งโอน — ชุดสีเดียวกับป้ายในหน้าใบสั่งซื้อ (`.ord-badge`) */
.badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: #eef2f7;
  color: #41536b;
  white-space: nowrap;
}
.badge.ok    { background: #e5f8ee; color: #0b6b4f; }
.badge.warn  { background: #fff4d9; color: #8a6416; }
.badge.bad   { background: #fdecea; color: #9b2c1f; }
.badge.muted { background: #eef2f7; color: #6b7b91; }

/* ══════════════════════════════════════════════════════════════════════════
   🪪 หน้ารายละเอียดไอดี (user สั่ง 2026-09-08)
   ทุกค่าบนหน้านั้นอ่านของจริงจากฝั่งเกม — ที่นี่มีแต่หน้าตา
   ══════════════════════════════════════════════════════════════════════════ */
.idd-top { margin-bottom: 14px; }
.idd-card {
  background: #fff;
  border: 1px solid rgba(226, 235, 243, 0.9);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 20px 44px -30px rgba(15, 23, 42, .26);
}
.idd-h { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 12px; }

/* ส่วนหัว = รูป + ชื่อ + ป้าย */
.idd-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.idd-portrait {
  width: 116px; height: 116px; flex: 0 0 auto;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(226, 235, 243, .95);
  background: #f4f7fb;
}
/* รูปหน้าจากเกมเป็นพิกเซลอาร์ต ~95×107 ⇒ `contain` + `pixelated` ให้คมและไม่โดนครอปหัว */
.idd-portrait img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: pixelated; }
/* มีรูปหน้าจริงแล้ว = ไม่ต้องมีพื้น/กรอบ ปล่อยรูปลอยบนการ์ด (user 2026-09-10) */
.idd-portrait.plain { background: none; border: 0; border-radius: 0; overflow: visible; }
/* 🔮 ลูกแก้วธาตุในป้าย — รูป 24×24 ของไคลเอนต์ (ส่งออกมาแบบ 2 เท่า) วางชิดซ้ายของข้อความ */
/* 🔮 ลูกแก้วธาตุ — ยืนเดี่ยวข้างป้ายอื่น (ในรูปมีคำว่าธาตุอยู่แล้ว) */
.elem-orb { width: 28px; height: 28px; image-rendering: pixelated; display: block; }
/* 🔮 ลูกแก้ว **บนหัวตัวละคร** — คอลัมน์รูป: ลูกแก้วอยู่แถวบน รูปอยู่แถวล่าง (user 2026-09-10) */
.idd-portcol { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; align-self: flex-start; }
/* 🔮 ลูกแก้วบนหัว — **มีกรอบเหมือนช่องรูปขุนพล** (`.idd-pet-pic`) + ดันขึ้นไปชิดขอบบนของการ์ด
   (user 2026-09-10 "ขยับขึ้นไปข้างบนอีกเล็กน้อยหรือทำกรอบเหมือนขุนพลก็ได้") */
.elem-orb.above { width: 30px; height: 30px; }
.elem-orb-box {
  width: 46px; height: 46px; border-radius: 12px; background: #fff;
  border: 1px solid rgba(226, 235, 243, .9);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
/* ไม่มีรูปจากเกม ⇒ วาดอักษรแรกของชื่อบนพื้นสีธาตุ (ไม่โชว์รูปแตก) */
.idd-initial { font-size: 46px; font-weight: 900; color: #fff; opacity: .92; }
.idd-headinfo { min-width: 0; flex: 1 1 260px; }
.idd-headinfo h2 { font-size: 24px; font-weight: 900; margin: 2px 0 10px; color: var(--ink); }
.idd-nameline .idd-bars.stack { margin-bottom: 2px; }
.idd-badges { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.idd-nums { margin-top: 18px; }
/* 📊 ตัวเลขติดตัวเมื่ออยู่ **ในหัวการ์ด** (คอลัมน์ขวา) — 2×2 · กล่องเตี้ยลงให้พอดีความสูงหัว
   (user 2026-09-10) · `.idd-head` มี flex-wrap อยู่แล้ว ⇒ จอแคบตกลงมาเป็นแถวล่างเต็มความกว้างเอง */
.idd-head > .idd-nums {
  flex: 1 1 340px; margin-top: 0; align-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px;
}
.idd-head > .idd-nums .qcard { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.idd-head > .idd-nums .qcard .num { font-size: 27px; }
/* 🏁 การ์ดที่กดเปิดกล่องได้ — เป็น `<label>` จึงต้องบอกให้เป็นบล็อกเองและมีมือชี้ */
.qcard-click { cursor: pointer; box-sizing: border-box; transition: border-color .12s, background .12s; }
.qcard-click:hover { border-color: #c9d6e5; background: #fbfdff; }
.qcard-hint { font-size: 11.5px; font-weight: 700; color: var(--ink2); opacity: .8; margin-top: 2px; }
/* 🏁 รายชื่อเควสในกล่อง — ยาวได้ เลื่อนในกล่องเอง ไม่ดันกล่องทะลุจอ */
.qdone-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 60vh; overflow-y: auto; display: grid; gap: 6px; }
.qdone-list li {
  display: flex; align-items: baseline; gap: 8px;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 10px; padding: 8px 12px;
}
.qdone-list .nm { font-weight: 700; color: var(--ink); min-width: 0; }
@media (max-width: 560px) { .idd-head > .idd-nums { grid-template-columns: minmax(0, 1fr); } }

/* สีตามธาตุ — ใช้ทั้งกรอบรูปและป้าย */
.elem-earth  { background: #a3762f; border-color: #a3762f; }
.elem-water  { background: #2f6fa3; border-color: #2f6fa3; }
.elem-fire   { background: #b04a2f; border-color: #b04a2f; }
.elem-wind   { background: #3f8f6a; border-color: #3f8f6a; }
.elem-spirit { background: #6b4bb7; border-color: #6b4bb7; }
.elem-none   { background: #7b8899; border-color: #7b8899; }
.badge.elem-earth, .badge.elem-water, .badge.elem-fire,
.badge.elem-wind, .badge.elem-spirit, .badge.elem-none { color: #fff; }

/* (ชุดกฎ .idd-slot ชุดเก่าถูกแทนด้วย .idd-cell ด้านล่าง — 2026-09-10) */


/* ══ 🎒 ตะแกรงช่องของ — ช่องคงที่ · แต่ละกระเป๋าเป็นแผงของตัวเอง (user 2026-09-10) ══════════
   🔴 บทเรียน 3 ข้อจากรอบนี้ (อย่าถอดออก):
   ① ล็อกแค่ `grid-template-columns` **ไม่พอ** — ค่าปริยาย `grid-auto-rows: auto` + `align-items: stretch`
      ทำให้ช่องว่างในแถวถูกยืดตามช่องที่มีของ ⇒ ต้องล็อก `grid-auto-rows` + `align-items: start` ด้วย
   ② ตัวช่องต้อง `align-self: start` + `box-sizing: border-box` กันโดนกฎรวมของเว็บยืด
   ③ แผงอยู่ใน flex ⇒ ตัวกริดห้ามหด (`.idd-bag` กว้างคงที่) แต่ **ตัวแผงยืดได้** เพื่อไม่ให้เหลือที่ว่างด้านขวา
   🔑 ชื่อของอยู่ใน `title` (tooltip) — `title` ไม่ติด CSP (ที่ห้ามคือ `style="…"` ในแท็ก) */

/* แผงของแต่ละกระเป๋า — มีพื้นหลังของตัวเอง แยกสายตาออกจากกันชัด ๆ */
.idd-boxes { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.idd-box {
  flex: 1 1 300px;                  /* ยืดเต็มที่ว่างที่เหลือ แต่แคบกว่า 300px เมื่อไหร่ก็ตกบรรทัดใหม่ */
  box-sizing: border-box;
  background: #fafbfd;
  border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 14px;
  padding: 12px 14px 14px;
}
.idd-box-h { font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.idd-box-h .dim { font-weight: 600; }

.idd-bag {
  display: grid;
  /* แถวละ 5 ช่องตายตัวเหมือนจอในเกม ⇒ นับตำแหน่งเทียบกันได้ทีละช่อง */
  grid-template-columns: repeat(5, 48px);
  grid-auto-rows: 48px;
  gap: 5px;
  justify-content: center;          /* กริดกว้างคงที่ ⇒ จัดกลางแผงแทนการยืดช่อง */
  align-items: start;
  justify-items: start;
}
.idd-cell {
  position: relative;
  box-sizing: border-box;
  align-self: start; justify-self: start;
  flex: none;
  width: 48px; height: 48px; min-width: 48px; min-height: 48px;
  padding: 0; margin: 0;
  border: 1px solid rgba(226, 235, 243, .95);
  border-radius: 10px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
/* 🔴 ห้ามใช้ชื่อคลาสกลาง ๆ อย่าง `.empty` / `.locked` เป็นตัวขยายของช่อง —
   เว็บนี้มี `.empty{padding:26px 14px}` เป็นคลาสรวมอยู่แล้ว (บรรทัด ~295)
   ⇒ ช่องว่างสูงเกินจริง 54px ทั้งที่สั่ง 48px (user ทัก 3 รอบ "ช่องมันยืด" 2026-09-10)
   ⇒ ใช้ชื่อขึ้นต้น `is-` เฉพาะของหน้านี้ + ตอก `padding: 0` ที่ตัวช่องกันซ้ำ */
.idd-cell.is-blank { background: #f7f9fc; border-style: dashed; }
/* 🔒 ช่องที่ยังไม่เปิด (เป้ +10 จากเยาพัสดุ · คลังที่ยังไม่ได้ขยาย) — วาดไว้เสมอ ผังจะได้เหมือนกันหมด */
.idd-cell.is-locked { background: #eef2f7; border-style: dashed; border-color: rgba(203, 213, 225, .9); }
.idd-cell.is-locked .idd-cell-slot { color: #c3ccd8; }
.idd-cell-lock { width: 10px; height: 8px; border-radius: 2px; background: #b8c4d2; position: relative; }
.idd-cell-lock::before {
  content: ""; position: absolute; left: 2px; top: -5px;
  width: 6px; height: 6px; border: 1.5px solid #b8c4d2; border-bottom: 0; border-radius: 3px 3px 0 0;
}
.idd-cell img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.idd-cell-no { font-size: 10px; font-weight: 800; color: #8f9cad; }
/* เลขช่อง — จาง ๆ มุมซ้ายบน อ่านได้แต่ไม่แย่งสายตากับรูปของ */
.idd-cell-slot {
  position: absolute; left: 4px; top: 2px;
  font-size: 9.5px; font-weight: 700; color: #aab6c6; line-height: 1;
}
.idd-cell-qty {
  position: absolute; right: 2px; bottom: 1px;
  font-size: 10.5px; font-weight: 900; color: #fff;
  background: rgba(15, 23, 42, .78);
  border-radius: 5px; padding: 0 4px;
}
/* ของที่สึกหนัก (>=200 = บกพร่อง/เสีย) — จุดแดงมุมขวาบน */
.idd-cell-wear { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: #d8493a; }

/* ══ 💪 สเตตัส + 🐉 ขุนพล (user 2026-09-10) ══════════════════════════════════════════════ */
.idd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; }
.idd-stat {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 10px; padding: 8px 12px;
}
.idd-stat .k { font-size: 12.5px; color: var(--ink2); }
.idd-stat .v { font-size: 16px; font-weight: 900; color: var(--ink); }
/* สเตตัสย่อ — **แถวละ 3 ช่อง** (user 2026-09-10) ⇒ ATK INT DEF / HPX SPX AGI / FAI */
.idd-stats.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 10px; }
.idd-stats.mini .idd-stat { padding: 4px 8px; border-radius: 8px; }
.idd-stats.mini .k { font-size: 11px; }
.idd-stats.mini .v { font-size: 13.5px; }

/* แท่งพลัง — 🔴 ห้ามใช้ style="width:x%" (CSP บล็อก inline style)
   ⇒ ปัดเป็นขั้นละ 5% แล้วเลือกความยาวด้วย [data-pct] ที่ประกาศไว้ล่วงหน้า */
.idd-bars { margin-top: 12px; display: grid; gap: 8px; }
.idd-bar-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); margin-bottom: 3px; }
.idd-bar-t { height: 9px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.idd-bar-f { display: block; height: 100%; border-radius: 999px; }
/* 🔴 ห้ามตั้งชื่อ `.hp` — เว็บนี้มี `.hp{position:absolute!important;left:-9999px!important}`
   เป็นช่องล่อบอท (honeypot) อยู่แล้ว ⇒ หลอด HP หายไปจากจอเงียบ ๆ (user ทัก 2026-09-10)
   บทเรียนเดียวกับ `.empty` ที่ทำช่องของยืด ⇒ ตัวขยายทุกตัวใช้ `is-` นำหน้า */
.idd-bar-f.is-hp { background: linear-gradient(90deg, #e05b4a, #f08a6a); }
.idd-bar-f.is-sp { background: linear-gradient(90deg, #3b7fd4, #6aa8ea); }
.idd-bar-f.is-fai { background: linear-gradient(90deg, #b98b2c, #e0b957); }
.idd-bar-f[data-pct="0"] { width: 0%; }
.idd-bar-f[data-pct="5"] { width: 5%; }
.idd-bar-f[data-pct="10"] { width: 10%; }
.idd-bar-f[data-pct="15"] { width: 15%; }
.idd-bar-f[data-pct="20"] { width: 20%; }
.idd-bar-f[data-pct="25"] { width: 25%; }
.idd-bar-f[data-pct="30"] { width: 30%; }
.idd-bar-f[data-pct="35"] { width: 35%; }
.idd-bar-f[data-pct="40"] { width: 40%; }
.idd-bar-f[data-pct="45"] { width: 45%; }
.idd-bar-f[data-pct="50"] { width: 50%; }
.idd-bar-f[data-pct="55"] { width: 55%; }
.idd-bar-f[data-pct="60"] { width: 60%; }
.idd-bar-f[data-pct="65"] { width: 65%; }
.idd-bar-f[data-pct="70"] { width: 70%; }
.idd-bar-f[data-pct="75"] { width: 75%; }
.idd-bar-f[data-pct="80"] { width: 80%; }
.idd-bar-f[data-pct="85"] { width: 85%; }
.idd-bar-f[data-pct="90"] { width: 90%; }
.idd-bar-f[data-pct="95"] { width: 95%; }
.idd-bar-f[data-pct="100"] { width: 100%; }

.idd-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

/* หลอดแบบสั้น — วางคู่กันในแถวเดียว ไม่ลากยาวเต็มการ์ด (user 2026-09-10 "หลอดเล็ก ๆ พอ") */
.idd-bars.short { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.idd-bars.short .idd-bar { flex: 0 0 200px; }
/* หลอดคู่ HP/SP ที่วางไว้ **ข้างชื่อ** — ซ้อนกัน 2 แถวเล็ก ๆ กว้างคงที่ (user วาดผังมาให้ 2026-09-10) */
.idd-bars.stack { display: grid; gap: 3px; margin: 0; width: 190px; flex: 0 0 auto; }
.idd-bars.stack .idd-bar-h { font-size: 10.5px; margin-bottom: 1px; }
.idd-bars.stack .idd-bar-t { height: 8px; }

/* ชื่อ + หลอด อยู่บรรทัดเดียวกัน */
.idd-nameline { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 2px 0 10px; }
.idd-nameline h2 { margin: 0; }
.idd-head-stats { margin-top: 12px; max-width: 560px; }

/* 🏨 ขุนพลโรงเตี๊ยม — แถวสั้น ๆ (สเตตัสเต็มอยู่ใน tooltip) */
.idd-petlist { display: flex; flex-wrap: wrap; gap: 8px; }
.idd-petmini {
  display: flex; align-items: center; gap: 7px;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 999px; padding: 5px 12px 5px 6px;
}
.idd-petmini .nm { font-size: 13px; font-weight: 700; color: var(--ink); }
.elem-orb.sm { width: 20px; height: 20px; }

/* 🐉 ช่องขุนพล — **4 คอลัมน์ตายตัว** ⇒ ทีม 4 ช่องอยู่ **แถวเดียว** (user 2026-09-10)
   แลกกับการ์ดสูงขึ้น: รูป+ชื่อบรรทัดบน · หลอด HP/SP เต็มความกว้าง · สเตตัส 2 คอลัมน์
   (user สั่ง "ยุบช่องสเตตัสลงหน่อย ยาวขึ้นไม่เป็นไร")
   จอ < 1200px ลดเป็น 2 คอลัมน์ · < 700px เหลือคอลัมน์เดียว */
.idd-pets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 1200px) { .idd-pets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .idd-pets { grid-template-columns: minmax(0, 1fr); } }
.idd-pet {
  /* 4 ใบต่อแถว ⇒ ใบละ ~320px · รูป+ชื่อบรรทัดบน แล้วหลอดลงบรรทัดใหม่เต็มความกว้าง */
  position: relative; box-sizing: border-box; min-width: 0;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 14px; padding: 24px 11px 12px;
}
.idd-pet.is-blank {
  border-style: dashed; background: #fbfcfe; min-height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.idd-pet-slot { position: absolute; left: 12px; top: 8px; font-size: 11px; font-weight: 700; color: #aab6c6; }
.idd-pet.is-blank .idd-pet-slot { position: static; margin-right: 8px; }
.idd-pet-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.idd-pet-id { min-width: 0; flex: 1 1 auto; }
.idd-pet-id .idd-pet-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* หลอดขึ้นบรรทัดใหม่เต็มความกว้างการ์ด (การ์ดแคบเกินกว่าจะยืนข้างชื่อได้) */
.idd-pet-top .idd-bars.stack { width: 100%; flex: 1 1 100%; margin-top: 6px; }
/* สเตตัส 2 คอลัมน์ — เฉพาะการ์ดขุนพล ⛔ ห้ามแตะ `.idd-head-stats` ที่ยืม `.mini` ไปใช้ (ยัง 3 คอลัมน์)
   🔑 `grid-auto-flow: column` + ล็อก 4 แถว ⇒ **ไล่ลงมาจนครบคอลัมน์แล้วค่อยขึ้นคอลัมน์ใหม่**
      (user 2026-09-10 "เรียงลงมาค่อยขึ้นแถวใหม่ดีกว่า") ⇒ ATK·DEF·SPX·FAI | INT·HPX·AGI
      ของ 7 ใบลงพอดี ไม่มีใบโดดเดี่ยวท้ายแถวเหมือนตอนไล่ซ้าย-ขวา */
.idd-pet .idd-stats.mini {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 4px; margin-top: 8px;
}
.idd-pet .idd-stats.mini .idd-stat { padding: 3px 7px; }

/* ═══ 🛡️ ของที่สวมอยู่ + 💊 ยาถาวร (หน้า /iddetail · user 2026-09-10) ═════════ */
/* ค่าฐานตัวเล็กใต้เลขที่รวมของแล้ว — วางเป็นบรรทัดที่สองในช่องเดิม */
.idd-stat { flex-wrap: wrap; }
.gearsub { flex: 1 1 100%; font-size: 10.5px; color: var(--ink2); opacity: .75; text-align: right; }
/* 💪 ส่วนที่ "ของ" บวกให้ — ต่อท้ายเลขฐานแบบจอในเกม (`0+44`) */
.statplus { font-size: 12px; font-weight: 800; color: var(--gold-dk, #8a6a1f); margin-left: 1px; }

/* 🛡️ ผังของที่สวม — 6 ช่องตามในเกม · ช่องว่างก็วาดให้เห็น */
.gearrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .gearrow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gearrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gearslot {
  min-width: 0; text-align: center; padding: 10px 8px;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9); border-radius: 12px;
}
.gearslot.is-blank { border-style: dashed; background: #fbfcfe; }
.gearslot .ps { display: block; font-size: 11px; font-weight: 700; color: #aab6c6; margin-bottom: 6px; }
.gearslot .gi {
  width: 44px; height: 44px; margin: 0 auto 6px; border-radius: 10px; background: #fff;
  border: 1px solid rgba(226, 235, 243, .9);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gearslot .gi img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.gearslot .gn { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.25; word-break: break-word; }

/* 💊 ยาถาวรของตัวละคร — ไอคอน + ชื่อ + ใช้ไป/เพดาน */
.pillrow { display: flex; flex-wrap: wrap; gap: 10px; }
.pillbox {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: #fafbfd; border: 1px solid rgba(226, 235, 243, .9);
  border-radius: 12px; padding: 8px 14px 8px 10px;
}
.pillbox .pi {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: #fff;
  border: 1px solid rgba(226, 235, 243, .9);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pillbox .pi img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.pillbox .pn { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pillbox .pu { font-size: 14px; font-weight: 900; color: var(--ink); }

/* 🐉 ของ/ยา ในการ์ดขุนพล — แถวไอคอนเล็ก การ์ดแคบ 4 ใบต่อแถวจึงต้องประหยัดที่ */
.petgear, .petpills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pgi, .ppi {
  display: flex; align-items: center; gap: 4px;
  width: 30px; height: 30px; justify-content: center;
  background: #fff; border: 1px solid rgba(226, 235, 243, .9); border-radius: 8px;
}
.pgi img, .ppi img { max-width: 24px; max-height: 24px; image-rendering: pixelated; }
.ppi { width: auto; padding: 0 6px 0 4px; }
.ppi .n { font-size: 11px; font-weight: 800; color: var(--ink); }
/* 🎯 ลูกศรยาหยั่งรู้ + สรุปช่องที่เล็งไปแล้ว */
.petaim {
  margin-top: 8px; font-size: 11.5px; color: var(--gold-dk, #8a6a1f);
  background: #fff8e8; border: 1px solid #f0dfb4; border-radius: 8px; padding: 3px 9px;
  display: inline-block;
}
.ppbreak { font-size: 10.5px; font-weight: 700; color: var(--ink2); align-self: center; }
.idd-pet-pic {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; background: #fff;
  border: 1px solid rgba(226, 235, 243, .9);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.idd-pet-pic img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: pixelated; }
.idd-pet-name { font-size: 14px; font-weight: 800; color: var(--ink); }

/* 🔀 ตัวสลับไอดีบนหัวหน้า — เลื่อนแนวนอนได้เมื่อไอดีเยอะ */
.idd-switch-card { padding: 12px 16px; }
.idd-switch { display: flex; align-items: center; gap: 10px; min-width: 0; }
.idd-switch-lbl { font-size: 12.5px; font-weight: 700; color: var(--ink2); flex: 0 0 auto; }
.idd-switch-strip {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; min-width: 0;
  scrollbar-width: thin;
}
.idd-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(226, 235, 243, .95);
  background: #fff; color: var(--ink2);
  border-radius: 999px; padding: 5px 12px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  display: flex; align-items: baseline; gap: 6px;
}
.idd-chip:hover { border-color: #c9d6e5; }
.idd-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.idd-chip-sub { font-size: 11px; font-weight: 600; opacity: .75; }

/* 🔮 ลูกแก้วธาตุ — ยืนเดี่ยวข้างป้ายอื่น (ในรูปมีคำว่าธาตุอยู่แล้ว) */
.elem-orb { width: 28px; height: 28px; image-rendering: pixelated; display: block; }
/* 🔮 ลูกแก้ว **บนหัวตัวละคร** — คอลัมน์รูป: ลูกแก้วอยู่แถวบน รูปอยู่แถวล่าง (user 2026-09-10) */
.idd-portcol { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.elem-orb.above { width: 36px; height: 36px; }

/* จอเล็ก — ต้องประกาศไว้ท้ายสุดของกลุ่มนี้ ไม่งั้นโดนกฎด้านบนทับ */
@media (max-width: 560px) {
  .idd-card { padding: 18px 16px; border-radius: 14px; }
  .idd-portrait { width: 88px; height: 88px; }
  .idd-headinfo h2 { font-size: 20px; }
  .idd-bag { grid-template-columns: repeat(5, 42px); grid-auto-rows: 42px; gap: 4px; }
  .idd-cell { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
  .idd-cell img { width: 32px; height: 32px; }
  .idd-box { padding: 10px; }
}

/* 🪪 ตัวเลือกไอดี (เปิดหน้ารายละเอียดตรง ๆ) — ปุ่มเรียงเป็นแถว
   แต่ละใบเป็นฟอร์ม POST เพราะเลขไอดีห้ามอยู่ใน URL */
.idd-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.idd-pick form { margin: 0; }


/* ═══ 🎉 โปรโมชันเติมเงิน (หน้า /promotion) ════════════════════════════════════
   คลาสขึ้นต้น `promo-` ทั้งชุด ⇒ ไม่ชนกับกฎที่ยังทำงานอยู่ใน modern.css
   ⚠️ ห้ามพึ่ง inline style — CSP `style-src 'self'` บล็อกเงียบ
      ⇒ แถบความก้าวหน้าใช้ `.promo-fill-<0..100 ทีละ 5>` แทน style="width:%"     */

/* 🚀 ป้ายช่วงคูณพอยต์ */
.promo-boosts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));
  gap:14px;margin:14px 0}
.promo-boost{display:flex;gap:14px;align-items:center;background:var(--card);
  border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:14px;padding:14px 16px}
.promo-boost-mult{flex:0 0 auto;min-width:70px;text-align:center;font-family:var(--font-head);
  font-size:30px;font-weight:800;line-height:1;color:var(--gold-dk)}
.promo-boost-body{min-width:0}
.promo-boost-name{font-weight:700;color:var(--ink);margin-bottom:2px}

/* 🏆 การ์ดกิจกรรมสะสม */
.promo-round{background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:18px 18px 20px;margin:0 0 18px}
.promo-round-top{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;
  align-items:flex-start}
.promo-round-name{margin:0 0 2px;font-size:20px}
.promo-round-tags{display:flex;flex-wrap:wrap;gap:6px}
.promo-tag{display:inline-block;padding:4px 10px;border-radius:999px;font-size:12.5px;
  font-weight:700;background:#eff5fa;color:var(--ink2);border:1px solid var(--line)}
.promo-tag-soon{background:#fff6e5;color:var(--gold-dk);border-color:#f5dca6}
.promo-tag-end{background:#f3f5f7;color:var(--mute)}
.promo-tag-ready{background:#e6f7f2;color:#0b7a5e;border-color:#b7e6d8}

/* 📊 แถบความก้าวหน้า */
.promo-prog{margin:14px 0 16px}
.promo-prog-num{font-size:14.5px;color:var(--ink);margin-bottom:7px}
.promo-bar{height:12px;border-radius:999px;background:#e9eff5;overflow:hidden}
.promo-bar-fill{height:100%;border-radius:999px;
  background:linear-gradient(90deg,var(--gold-dk),var(--gold),var(--gold2))}
.promo-fill-0{width:0%}
.promo-fill-5{width:5%}
.promo-fill-10{width:10%}
.promo-fill-15{width:15%}
.promo-fill-20{width:20%}
.promo-fill-25{width:25%}
.promo-fill-30{width:30%}
.promo-fill-35{width:35%}
.promo-fill-40{width:40%}
.promo-fill-45{width:45%}
.promo-fill-50{width:50%}
.promo-fill-55{width:55%}
.promo-fill-60{width:60%}
.promo-fill-65{width:65%}
.promo-fill-70{width:70%}
.promo-fill-75{width:75%}
.promo-fill-80{width:80%}
.promo-fill-85{width:85%}
.promo-fill-90{width:90%}
.promo-fill-95{width:95%}
.promo-fill-100{width:100%}

/* 🎁 การ์ดของรางวัลแต่ละขั้น */
.promo-tiers{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,192px),1fr));
  gap:12px}
.promo-tier{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;
  background:#fbfdff;border:1px solid var(--line);border-radius:14px;padding:14px 12px 16px;
  min-width:0}
.promo-tier-need{font-family:var(--font-head);font-weight:800;font-size:17px;color:var(--ink)}
.promo-tier-img{width:56px;height:56px;object-fit:contain;margin:4px 0 2px}
.promo-tier-name{font-weight:700;color:var(--ink);line-height:1.35}
.promo-tier-state{margin-top:auto;padding-top:8px;font-size:13px;font-weight:700;color:var(--mute)}
.promo-claim{margin:8px 0 0;width:100%;display:flex;flex-direction:column;gap:6px}
.promo-tier-lbl{font-size:12.5px;color:var(--ink2);text-align:left}
.promo-tier-sel{width:100%;padding:8px 10px;font-size:14px}
.promo-tier-btn{width:100%;justify-content:center}

/* 🎨 3 สถานะของการ์ด — ต่างกันที่ขอบกับพื้น ไม่ใช้แสงเรือง (user สั่ง 2026-09-07) */
.promo-tier.is-ready{border-color:var(--gold);background:#fffaf0}
.promo-tier.is-ready .promo-tier-need{color:var(--gold-dk)}
.promo-tier.is-done{border-color:#b7e6d8;background:#f4fbf8}
.promo-tier.is-done .promo-tier-state{color:#0b7a5e}
.promo-tier.is-lock{opacity:.72}
.promo-tier.is-lock .promo-tier-img{filter:grayscale(1)}

/* 📱 จอแคบ — การ์ด 2 คอลัมน์ยังอ่านออก แต่ป้ายตัวคูณต้องไม่ดันบรรทัดล้น */
@media (max-width:520px){
  .promo-tiers{grid-template-columns:repeat(auto-fill,minmax(min(100%,148px),1fr))}
  .promo-boost-mult{font-size:24px;min-width:56px}
  .promo-round{padding:14px 13px 16px}
}


/* ═══ 💳 ตารางประวัติใบแจ้งโอน (หน้า /topUp) — รื้อ 2026-09-08 ═══════════════
   user ทัก: "ช่องสถานะซ้อนกันแปลก ๆ · รูปกดดูได้ไม่ต้องกดโหลด"                */

.tu-tbl{min-width:960px}                    /* 7 คอลัมน์ — แคบกว่านี้ตัวหนังสือเบียด
                                               (`.tblwrap` เลื่อนซ้าย-ขวาได้อยู่แล้วถ้าจอแคบ) */

/* ✍️ ช่องหมายเหตุ — ใช้ทั้ง "ของผู้เล่น" และ "ของทีมงาน" (คนละคอลัมน์ หัวตารางบอกเอง)
   🔑 บีบความกว้างไว้ ไม่งั้นข้อความยาว ๆ ใบเดียวจะถ่างตารางจนคอลัมน์อื่นแบน */
.tu-said{max-width:220px;font-size:13.5px;color:var(--ink);line-height:1.6}
.tu-tbl td{vertical-align:top}              /* 🔴 ต้นเหตุ "ซ้อนกันแปลก ๆ": เดิมจัดกลางแนวตั้ง
                                               แถวที่มีหมายเหตุ 2-3 บรรทัดจึงดันป้ายสถานะลอยกลางช่อง */
.tu-no{font-weight:800;color:var(--ink)}
.tu-amt{font-weight:800;color:var(--ink);white-space:nowrap}
.tu-pts{font-size:13.5px;color:var(--ink2);white-space:nowrap}
.tu-bonus{color:var(--gold-dk);font-weight:700;white-space:nowrap}

/* ป้ายสถานะ + เหตุผลของทีมงาน — เรียงลงล่างเป็นคอลัมน์ ไม่ใช่ลอยทับกัน */
.tu-status{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.tu-status .badge{margin:0}

/* 🖼️ รูปย่อสลิป — กดแล้วเปิดฉากขยาย (ไม่ต้องเปิดแท็บใหม่/โหลดไฟล์) */
.tu-thumb{display:block;width:52px;height:52px;border-radius:10px;overflow:hidden;
  border:1px solid var(--line);background:#fff;cursor:zoom-in;padding:0}
.tu-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tu-thumb:hover{border-color:var(--gold)}

/* 🔴 ฉากขยายชุดเดิมถูกออกแบบมาให้ QR (บังคับ 1:1 กว้างสุด 420px)
      สลิปเป็นรูป**แนวสูง** ⇒ ต้องปลดสัดส่วนออก ไม่งั้นสลิปถูกบีบจนอ่านตัวเลขไม่ได้ */
.tu-zoom .qr-zoom-inner img{
  width:auto;max-width:min(560px,92vw);max-height:82vh;aspect-ratio:auto;padding:8px;
}

@media (max-width:520px){
  .tu-thumb{width:44px;height:44px}
}

/* 💰 กล่อง "ยอดเติมสะสม" ที่หน้า /promotion — **เปิดเสมอ** อยู่เหนือส่วนกิจกรรม
   🔴 ต้องเด่นกว่าการ์ดกิจกรรม เพราะเป็นเลขที่ผู้เล่นมาดูบ่อยสุด และเป็นของที่ไม่มีวันหาย */
.promo-accum{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;
  align-items:flex-end;background:var(--card);border:1px solid var(--line);
  border-top:3px solid var(--gold);border-radius:16px;padding:18px 20px;margin:0 0 20px}
.promo-accum-main{min-width:0;flex:1 1 260px}
.promo-accum-lbl{font-size:13px;font-weight:700;color:var(--ink2);
  letter-spacing:.02em;margin-bottom:2px}
.promo-accum-num{font-family:var(--font-head);font-size:38px;font-weight:800;line-height:1.1;
  color:var(--ink)}
.promo-accum-num span{font-size:17px;font-weight:700;color:var(--mute)}
.promo-accum-side{display:flex;flex-direction:column;align-items:flex-start;gap:7px;
  flex:0 0 auto}

@media (max-width:520px){
  .promo-accum{padding:15px 14px}
  .promo-accum-num{font-size:30px}
}

/* 🧱 หน้า /promotion อยู่ในแผงขาวใบเดียว (`.acc-panel promo-panel`)
   ⇒ ของข้างในต้องเลิกเป็นการ์ดของตัวเอง ไม่งั้นกลายเป็นกรอบซ้อนกรอบ
      (บทเรียนเดิมจากหน้าบัญชี: การ์ดลอย ๆ 4 ก้อนดูไม่เป็นฟอร์มเดียวกัน)      */

/* กล่องยอดสะสม — เหลือแค่แถบบนของแผง + เส้นคั่นใต้ ไม่มีขอบรอบ */
.promo-panel .promo-accum{
  border:0;border-top:0;border-radius:0;background:transparent;
  border-bottom:1px solid var(--line2);
  padding:16px 0 18px;margin:0 0 4px;
}
/* แถบทองบาง ๆ นำหน้าตัวเลข แทนขอบบนที่ถอดออกไป */
.promo-panel .promo-accum-lbl{
  display:flex;align-items:center;gap:8px;
}
.promo-panel .promo-accum-lbl::before{
  content:"";width:3px;height:14px;border-radius:2px;background:var(--gold);flex:0 0 auto;
}

/* การ์ดกิจกรรม — เป็น "ส่วน" ในแผง คั่นด้วยเส้นบน */
.promo-panel .promo-round{
  border:0;border-radius:0;background:transparent;
  padding:18px 0 4px;margin:0;
}
.promo-panel .promo-round + .promo-round{border-top:1px solid var(--line2)}

/* ป้ายโบนัสกับตะแกรงขั้น ยังมีขอบของตัวเองได้ (เป็นของหลายชิ้นเรียงกัน ไม่ใช่กรอบซ้อนกรอบ) */
.promo-panel .promo-boosts{margin:14px 0 4px}

/* กล่อง "ยังไม่มีกิจกรรม" ในแผง — ถอดพื้นซ้อนออก */
.promo-panel .empty-state{background:transparent;border:0;box-shadow:none;padding:18px 0 8px}

/* 🛒 หน้าตะกร้า: รายการอยู่ในแผงขาวใบเดียว (`.acc-panel cart-panel`)
   ⇒ แต่ละบรรทัดเลิกเป็นการ์ด กันกรอบซ้อนกรอบ — แบ่งด้วยเส้นบางแทน                */
.cart-panel{padding:8px 20px 18px}
.cart-panel .cart-line{
  border:0;border-left:0;border-radius:0;background:transparent;box-shadow:none;
  border-bottom:1px solid var(--line2);
  padding:14px 0;margin:0;
}
.cart-panel .cart-line:last-of-type{border-bottom:0}
/* ปุ่มล้างตะกร้า — อยู่ในแผง คั่นด้วยเส้นบนเหมือนท้ายฟอร์ม */
.cart-panel .cart-lines > form[data-cart-op="clear"]{
  margin:0;padding-top:14px;border-top:1px solid var(--line2);
}

/* ══════════════════════════════════════════════════════════════════════════
   🖼️ รูปของรางวัล **เต็มความกว้างการ์ด** (user สั่ง 2026-09-08 ดึกมาก)
   ทับกฎ `.promo-tier-img` เดิม (56×56) — เขียนท้ายไฟล์ ⇒ ตัวนี้ชนะ

   🔑 กินขอบซ้าย-ขวาของการ์ดด้วย `calc(100% + 24px)` + `margin-inline:-12px`
      (การ์ดมี `padding:14px 12px 16px` ⇒ 12+12 = 24) ⇒ รูปเสมอเส้นขอบการ์ดพอดี
   🔑 `aspect-ratio:1/1` + `object-fit:cover` ⇒ รูปไม่บิด · ส่งรูป**จัตุรัส**มาก็ไม่ถูกครอบตัด
   🔴 ไอคอนไอเทมในคลังเป็น **32×32** ⇒ ถูกขยาย ~6 เท่า **จะเห็นเป็นบล็อก**
      รูปที่ทำใหม่ควรเป็น **400×400 PNG** (พื้นหลังโปร่งใสหรือทึบก็ได้)
   ══════════════════════════════════════════════════════════════════════════ */
.promo-tier-img{
  width:calc(100% + 24px);height:auto;aspect-ratio:1/1;
  margin:8px -12px 8px;object-fit:cover;border-radius:0;
}
/* กรอบประตอนยังไม่มีรูป — ใช้ที่ว่างเท่ากันเป๊ะ เพื่อไม่ให้การ์ดสูงไม่เท่ากัน */
.promo-tier-img-none{
  border-radius:0;border-left:0;border-right:0;font-size:34px;
}
/* จอแคบการ์ดแคบลง (padding เท่าเดิม) ⇒ สูตรกินขอบยังใช้ค่าเดิมได้ */

/* 🎨 ขั้นที่ยังไม่ถึงยอด — **เลิกทำรูปเป็นขาวดำ** (2026-09-09)
   🔴 `filter:grayscale(1)` เดิมออกแบบไว้ตอนรูปเป็นไอคอน 56×56 · พอรูปกินเต็มการ์ด
      มันกลายเป็นแผ่นเทาใหญ่ ๆ ดูเหมือนรูปเสียมากกว่า "ยังไม่ปลดล็อก"
   🔑 ตัวบอกว่ายังไม่ถึงมีพออยู่แล้ว: `.is-lock{opacity:.72}` + บรรทัด "อีก N บาท" + ขอบ/พื้นของ
      `.is-ready` (ทอง) กับ `.is-done` (เขียว) ที่ต่างกันชัด */
.promo-tier.is-lock .promo-tier-img{filter:none}


/* 🎫 สถานะโค้ดเป็น **ป้าย** ไม่ใช่คำต่อท้ายประโยค — ไม่งั้นอ่านรวมกับรหัสเป็นก้อนเดียว */
.ord-key-new{
  padding:2px 9px;border-radius:999px;background:#e5f8ee;color:#0b6b4f;
  font-size:11.5px;font-weight:700;
}
.ord-key-used{
  padding:2px 9px;border-radius:999px;background:#eef2f7;color:#5d6b7d;
  font-size:11.5px;font-weight:700;
}

/* ═══ 🐉 สายจุติขุนพล (/petChains) ═══════════════════════════════════════════
   หน้าตาเลียนแบบ **หน้าต่างขุนพลในเกม** ตามรูปที่ user ส่งมา 2026-09-10:
   แผงกรมท่าเข้ม · ขอบฟ้า 2 ชั้น · ชื่อมุมซ้ายบน · ป้าย LV · ลูกแก้วธาตุมุมขวา ·
   รูปในกรอบจม · หลอด HP/SP ในกรอบจม · ตารางสเตตัสป้ายม่วงอ่อน + เลขขาว
   ⛔ ห้ามพึ่ง inline style (CSP `style-src 'self'` บล็อกเงียบ)
   🔴 แผงนี้ **บังคับสีเอง ไม่ใช้ตัวแปรธีมของเว็บ** — ต้องมืดเสมอเหมือนในเกม
      ไม่ว่าเว็บจะเป็นธีมสว่างหรือมืด (ถ้าใช้ var(--card) แล้วธีมสว่างจะกลายเป็นแผงขาว = ไม่เหมือนเกม) */

.pw-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pw-search input[type="search"] {
  flex: 1 1 320px; min-width: 0; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}

/* แถวหนึ่งสาย: ต้นร่าง ▶ จุติ1 ▶ จุติ2 ▶ จุติ3 — เลื่อนแนวนอนได้เมื่อสายยาว */
.pw-chain { overflow: hidden; }
/* 🔴 เดิม `overflow-x:auto` = ร่างที่ 4 ต้องเลื่อนไปดู (user 2026-09-11 "ข้อมูลโดนกินพื้นที่")
      ⇒ ให้ **ตกบรรทัด** แทน เห็นครบทุกร่างโดยไม่ต้องเลื่อนอะไรเลย */
.pw-line {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; padding-bottom: 2px;
}

/* ── แผงขุนพล ── */
/* 🤍 แผงพื้นขาว (user 2026-09-11 "ขอ card พื้นหลังขาว") — คงผัง/กรอบแบบหน้าต่างในเกมไว้
   แต่เปลี่ยนเป็นโทนสว่างให้เข้ากับการ์ดอื่นของเว็บ · ต้นสายยังเป็นขอบทอง */
.pw {
  flex: 0 0 auto; width: 208px; box-sizing: border-box; position: relative;
  background: #fff;
  border: 2px solid #cfe2f5; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(18, 32, 60, .07);
  padding: 8px 9px 10px; color: var(--ink);
}
.pw.is-root { border-color: #e8c96f; box-shadow: 0 2px 10px rgba(120, 90, 20, .12); }

.pw-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 26px; }
.pw-name {
  font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.2;
  word-break: break-word;
}
.pw-orb { width: 26px; height: 26px; flex: 0 0 auto; image-rendering: pixelated; }

/* ป้าย LV — ในเกมเป็นตัวเลขฟ้าเรืองข้างคำว่า LV */
.pw-lv { font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: .5px; margin: 2px 0 6px; }
.pw-lv b { font-size: 15px; color: var(--ink); margin-left: 4px; }

/* กรอบรูป — ในเกมเป็นพื้นเขียว (สีคีย์ใส) ⇒ เว็บใช้พื้นเข้มแทน ดูสะอาดกว่าและไม่แสบตา */
.pw-pic {
  height: 118px; margin: 0 0 8px; border-radius: 8px;
  background: #f6f9fd; border: 1px solid #e3ecf6;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pw-pic img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: pixelated; }
.pw-nopic { font-size: 11px; color: var(--mute); text-align: center; line-height: 1.4; }

/* หลอด HP/SP — กรอบจมสีเข้ม + แถบไล่สี + ตัวเลขทับกลาง (เหมือนในเกม) */
.pw-bar {
  position: relative; height: 18px; margin-bottom: 5px; border-radius: 5px;
  border: 1px solid #e3ecf6; background: #f1f5fa; overflow: hidden;
  display: flex; align-items: center;
}
.pw-bar::after {
  content: ""; position: absolute; inset: 2px 2px 2px 30px; border-radius: 2px;
}
.pw-bar.is-hp::after { background: linear-gradient(180deg, #ff6b57, #b02516); }
.pw-bar.is-sp::after { background: linear-gradient(180deg, #5aa8ff, #1c4fa8); }
.pw-bar-k {
  position: relative; z-index: 2; width: 30px; flex: 0 0 auto; text-align: center;
  font-size: 10px; font-weight: 800; color: var(--ink2);
}
.pw-bar-v {
  position: relative; z-index: 2; flex: 1 1 auto; text-align: center;
  font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .8);
}

/* ช่องสกิล — ในเกมเป็นไอคอน 3 ช่อง เว็บยังไม่มีรูปสกิล ⇒ ใช้ชื่อสกิลเป็นป้ายแทน */
.pw-skills { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.pw-skill {
  font-size: 10.5px; font-weight: 700; color: #d8ecff;
  background: #16264f; border: 1px solid #2c4a86; border-radius: 4px; padding: 2px 6px;
}

/* ตารางสเตตัส — ป้ายม่วงอ่อน เลขขาวชิดขวา เส้นตารางบาง */
.pw-stats { width: 100%; border-collapse: collapse; margin-top: 6px; }
.pw-stats th, .pw-stats td {
  border: 1px solid #e6eef7; padding: 2px 6px; font-size: 11.5px; line-height: 1.5;
}
.pw-stats th { width: 46%; text-align: left; color: #6f66c9; background: #f5f4ff; font-weight: 800; }
.pw-stats td { text-align: right; color: var(--ink); font-weight: 800; background: #fff; }
.pw-id { margin-top: 6px; font-size: 10px; color: var(--mute); text-align: right; }

/* ── ลูกศรระหว่างร่าง = ไอเทมจุติ + เงื่อนไข ── */
/* ▶ ตัวคั่นระหว่างร่าง — เหลือแค่หัวลูกศร (ของจุติย้ายเข้าการ์ดแล้ว) */
.pw-arrow {
  flex: 0 0 auto; width: 16px; align-self: center; text-align: center;
  font-size: 16px; color: #c9d6e5; line-height: 1;
}
.pw-arrow-head { font-size: 11.5px; font-weight: 800; color: var(--gold-dk, #8a6a1f); }
.pw-arrow-item {
  display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%;
  background: #fff8e8; border: 1px solid #f0dfb4; border-radius: 8px; padding: 4px 8px;
}
.pw-arrow-item img { width: 24px; height: 24px; flex: 0 0 auto; image-rendering: pixelated; }
.pw-arrow-item span { font-size: 11px; font-weight: 700; color: var(--ink); text-align: left; line-height: 1.25; }
.pw-arrow-need { font-size: 10.5px; color: var(--ink2); }
.pw-arrow-mark { font-size: 16px; color: #c9d6e5; line-height: 1; }

/* ── ตัวแบ่งหน้า ── */
.pw-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 20px; }
.pw-pg {
  min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink2);
  font-weight: 800; font-size: 13px; text-decoration: none;
}
.pw-pg:hover { border-color: #c9d6e5; }
.pw-pg.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pw-gap { color: var(--mute); padding: 0 2px; }

/* 📱 จอแคบ — เรียงร่างเป็น **แนวตั้งเต็มความกว้าง** (user 2026-09-11 "responsive มันมั่ว")
   เดิมการ์ดกว้างคงที่ 184px เรียงชิดซ้าย ⇒ เหลือที่ว่างขวาเป็นแถบ ๆ
   แล้วหัวลูกศร ▶ ตกไปนอนอยู่บรรทัดของตัวเองระหว่างการ์ด ดูไม่รู้เรื่อง */
@media (max-width: 640px) {
  .pw-line { flex-direction: column; align-items: stretch; }
  .pw { width: 100%; }
  /* ลูกศรต้องชี้ **ลง** เพราะทิศการไหลเปลี่ยนเป็นแนวตั้ง
     🔴 ใช้ `::before` แทน `transform:rotate()` — หมุนกล่องกว้างเต็มแถวแล้วขอบมันล้น */
  .pw-arrow { width: 100%; align-self: stretch; font-size: 0; }
  .pw-arrow::before { content: "▼"; font-size: 15px; }
}

/* 🧠 ช่องสกิล 4 ช่องตายตัว (ช่อง 4 = สกิลจิต) · ช่องที่ไม่มี = โบ๋ ไม่ยุบ */
.pw-skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
.pw-skill {
  min-height: 22px; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.15;
  background: #f4f8fd; border: 1px solid #e3ecf6; border-radius: 6px; padding: 2px 4px;
}
.pw-skill.is-empty { background: #fbfcfe; border-style: dashed; border-color: #dde7f2; }
.pw-skill.is-spirit { border-color: #9bd0ef; background: #f2fbff; }

/* 🧠 แถบปลุกสกิลจิต — ใบจิตขุนพล + คัมภีร์ธาตุ */
.pw-spirit {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px;
  background: #f4f9ff; border: 1px solid #cfe2f5; border-radius: 10px; padding: 8px 12px;
}
.pw-spirit-h { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.pw-spirit-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px;
}
.pw-spirit-item img { width: 22px; height: 22px; image-rendering: pixelated; }
.pw-spirit-plus { font-weight: 900; color: var(--ink2); }
.pw-spirit-need { font-size: 11.5px; color: var(--ink2); }


/* 🔮 หัวข้อกลุ่มธาตุ (หน้า /petChains) */
.pw-elem-h {
  display: flex; align-items: center; gap: 10px; margin: 26px 0 10px;
  font-size: 20px; font-weight: 800; color: var(--ink);
}
.pw-elem-h img { width: 26px; height: 26px; image-rendering: pixelated; }
.pw-elem-h .dim { font-size: 14px; font-weight: 600; }

/* 🎲 ตัวจำลองสเตตัสในแผงขุนพล (/petChains) */
.pw-simbtn {
  width: 100%; margin-top: 8px; padding: 5px 8px; cursor: pointer;
  font-size: 11.5px; font-weight: 800; color: var(--ink2);
  background: #f4f8fd; border: 1px solid #dde7f2; border-radius: 8px;
}
.pw-simbtn:hover { border-color: #c9d6e5; color: var(--ink); }
.pw-sim { display: none; margin-top: 8px; }
.pw.sim-open .pw-sim { display: block; }
.pw-sim label { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--ink2); margin-bottom: 4px; }
.pw-sim input { width: 64px; padding: 3px 6px; font-size: 12px; font-weight: 700; text-align: right;
  border: 1px solid #dde7f2; border-radius: 6px; background: #fff; color: var(--ink); }
.pw-sim-acts { display: flex; gap: 5px; margin-top: 4px; }
.pw-sim-acts button { flex: 1 1 0; padding: 5px 4px; cursor: pointer; font-size: 11.5px; font-weight: 800; border-radius: 7px; }
.pw-simgo { color: #6b4e05; background: #ffe9a8; border: 1px solid #efd07f; }
.pw-simreset { color: var(--ink2); background: #fff; border: 1px solid #dde7f2; }
.pw-sim-note { font-size: 10px; color: var(--mute); margin-top: 5px; line-height: 1.35; }
/* ระหว่างโชว์ผลจำลอง ทำให้เห็นชัดว่าไม่ใช่ค่าจริงของ NPC */
.pw.is-sim { border-color: #efd07f; }
.pw.is-sim .pw-stats td { color: #8a6a1f; }

/* 🔮 เมนูเลือกธาตุ /petChains — **แผงลอยชิดขอบขวา** (user 2026-09-11)
   🔴 เดิมเป็นแถบนอนเกาะบนสุด ⇒ เวลาเลื่อน มัน **ทับหัวข้อชื่อสายที่อยู่ข้างใต้**
      (user ส่งรูปมา: แถบธาตุคร่อมคำว่า "หม่าเซียง (2 ขั้น …)")
   ⇒ ย้ายมาลอยข้างขวากลางจอ · แคบ ๆ แค่ลูกแก้ว + ชื่อธาตุสั้น + จำนวน ⇒ กินพื้นที่เนื้อหาน้อยที่สุด
   📱 จอแคบกว่า 1100px กลับไปเป็นแถบนอนบนสุดตามเดิม (แต่ไม่เกาะ — กันทับหัวข้ออีก) */
.pw-jump {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 8px; margin: 0; border-bottom: 1px solid var(--line);
}
.pw-jump-lbl { font-size: 11px; font-weight: 800; color: var(--mute); padding: 0 2px 2px; }
.pw-jump-x {
  display: flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px 4px 5px;
}
.pw-jump-x:hover { border-color: #c9d6e5; background: #fbfdff; }
.pw-jump-x img { width: 20px; height: 20px; flex: 0 0 auto; image-rendering: pixelated; }
.pw-jump-x b { margin-left: auto; font-size: 11px; color: var(--ink2); font-weight: 800; }

@media (max-width: 900px) {
  .pw-jump { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .pw-jump-x b { margin-left: 0; }
}
/* หัวข้อธาตุ — เว้นที่ให้แถบเกาะบนไม่บังตอนกระโดด */
.pw-elem-h { scroll-margin-top: calc(var(--nav-h) + 16px); }
.pw-elem-top { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink2); text-decoration: none; }
.pw-elem-top:hover { color: var(--ink); }

/* 🔮 ธาตุอยู่บรรทัดเดียวกับ LV (ประหยัดพื้นที่ — user 2026-09-11) */
.pw-lv { display: flex; align-items: center; gap: 6px; }
.pw-lv-el { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--ink2); }
.pw-lv-el img { width: 18px; height: 18px; image-rendering: pixelated; }
/* แท็บธาตุที่กำลังดูอยู่ */
.pw-jump-x.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pw-jump-x.on b { color: #fff; opacity: .8; }
/* 🖼️ ไอคอนในช่องสกิล */
.pw-skill { gap: 4px; justify-content: flex-start; }
.pw-skill img { width: 20px; height: 20px; flex: 0 0 auto; image-rendering: pixelated; }
.pw-skill .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-skill.is-empty { min-height: 26px; }
/* 🧠 แถวใบจิตในแผง */
.pw-spiritrow {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  background: #f2fbff; border: 1px solid #cbe8f7; border-radius: 8px; padding: 4px 8px;
  font-size: 11px; font-weight: 700; color: var(--ink);
}
.pw-spiritrow img { width: 20px; height: 20px; flex: 0 0 auto; image-rendering: pixelated; }
.pw-spiritrow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ ปรับแผงขุนพลให้กระชับ (user 2026-09-11) ═══════════════════════════════ */
/* 🔮 LV + ธาตุ ทับมุมซ้ายบนของกรอบรูป — ประหยัดบรรทัด */
.pw-pic { position: relative; }
.pw-pic-badge {
  position: absolute; left: 4px; top: 4px; z-index: 2;
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .86); border: 1px solid #e3ecf6; border-radius: 7px;
  padding: 1px 5px; backdrop-filter: blur(1px);
}
.pw-pic-badge b { font-size: 11px; font-weight: 800; color: var(--ink); letter-spacing: .2px; }
.pw-pic-badge img { width: 16px; height: 16px; image-rendering: pixelated; display: block; }
/* บรรทัด LV เดิมไม่ใช้แล้ว */
.pw-lv, .pw-lv-el { display: none; }

/* 🖼️ ช่องสกิล = ไอคอนล้วน (ชื่อขึ้นตอนเมาส์ชี้) ⇒ จัดกึ่งกลางและเตี้ยลง */
.pw-skill { justify-content: center; min-height: 30px; padding: 3px; }
.pw-skill img { width: 26px; height: 26px; }
.pw-skill .nm { font-size: 10px; }

/* 🧠 ใบจิตอยู่ชั้นเดียวกับ ดาว/ตรา ในลูกศร */
.pw-arrow-item.is-spirit { background: #f2fbff; border-color: #cbe8f7; }

/* 🔮 ป้ายบนรูป: ลูกแก้วนำหน้า + ใหญ่ขึ้น · ตัวเลเวลเล็กลงนิด (user 2026-09-11) */
.pw-pic-badge { gap: 5px; padding: 1px 6px 1px 3px; background: rgba(255, 255, 255, .8); }
.pw-pic-badge img { width: 24px; height: 24px; }
.pw-pic-badge b { font-size: 10px; letter-spacing: 0; color: var(--ink2); }
/* 🖼️ สกิล 4 ช่อง **แถวเดียว** */
.pw-skills { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.pw-skill { padding: 2px; min-height: 32px; }
.pw-skill img { width: 26px; height: 26px; }
.pw-skill .nm { font-size: 8.5px; line-height: 1.1; overflow: hidden; }

/* 🖤 ช่องสกิล: ชิดกันและพื้นดำ (user 2026-09-11) — ไอคอนในเกมวาดมาบนพื้นเข้มอยู่แล้ว
   ⇒ พื้นดำทำให้ขอบไอคอนกลืนเป็นแถบเดียวกันเหมือนจอในเกม */
.pw-skills { gap: 2px; }
.pw-skill {
  background: #14161c; border-color: #2b3038; border-radius: 5px; padding: 1px;
  color: #dfe6f0;
}
.pw-skill.is-empty { background: #0e1014; border-style: dashed; border-color: #2b3038; }
.pw-skill.is-spirit { border-color: #6fb6d8; background: #101a22; }
.pw-skill .nm { color: #cfd9e6; }

/* 🖤 ช่องสกิลให้ "พอดีไอคอน" ไม่ยืดเต็มความกว้างแผง (user 2026-09-11 "พื้นหลังกว้างไป")
   เดิมเป็น grid 4 คอลัมน์เท่ากัน ⇒ ช่องละ ~44px แต่ไอคอน 26px = มีพื้นดำเหลือรอบข้าง
   ⇒ เปลี่ยนเป็น flex ช่องกว้างเท่าไอคอน */
.pw-skills { display: flex; flex-wrap: nowrap; gap: 2px; justify-content: flex-start; }
.pw-skill { width: 30px; height: 30px; min-height: 0; flex: 0 0 auto; padding: 1px; }
.pw-skill img { width: 26px; height: 26px; }

/* 🖤 แถบสกิลจัดกึ่งกลางแผง (user 2026-09-11) */
.pw-skills { justify-content: center; }

/* ═══ 🔎 กล่องค้นหา + แท็บธาตุ + หัวข้อธาตุ (จัดใหม่ 2026-09-11) ═══════════ */
.pw-searchcard { padding: 14px 16px; }
.pw-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pw-search-h { font-size: 15px; font-weight: 800; color: var(--ink); flex: 0 0 auto; }
.pw-search-h .dim { font-size: 12.5px; font-weight: 600; }
.pw-search input[type="search"] { flex: 1 1 260px; }

/* 🔝 แท็บธาตุ — ลอยติดใต้แถบเมนูเว็บ (แถบบนเป็น position:fixed สูง --nav-h)
   🔴 sticky ต้องชดเชยความสูงแถบบน ไม่งั้นมันไปซ่อนอยู่ใต้แถบ */
.pw-jump {
  top: calc(var(--nav-h, 64px) + 6px);
  box-shadow: 0 6px 18px rgba(18, 32, 60, .10);
}

/* 🔮 หัวข้อธาตุในเนื้อหา — พื้นอ่อน + แถบสีธาตุด้านซ้าย ตัวหนังสือเข้มอ่านชัด */
.pw-elem-h {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0 12px; padding: 10px 16px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid #c9d6e5; border-radius: 12px;
  font-size: 19px; font-weight: 800; color: var(--ink);
  scroll-margin-top: calc(var(--nav-h, 64px) + 64px);
}
.pw-elem-h[data-el="earth"]  { border-left-color: #a3762f; background: #fbf7ef; }
.pw-elem-h[data-el="water"]  { border-left-color: #2f6fa3; background: #eff5fb; }
.pw-elem-h[data-el="fire"]   { border-left-color: #b04a2f; background: #fdf3f0; }
.pw-elem-h[data-el="wind"]   { border-left-color: #3f8f6a; background: #f0f8f4; }
.pw-elem-h[data-el="spirit"] { border-left-color: #7a52b3; background: #f6f2fc; }
.pw-elem-h[data-el="none"]   { border-left-color: #9aa7b8; background: #f7f9fb; }
.pw-elem-h .dim { font-size: 13.5px; font-weight: 600; color: var(--ink2); }
.pw-elem-top { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink2); }

/* 🔎 กล่องค้นหา: เว้นจากแถบเมนูด้านบน + หมายเหตุใต้กล่อง (user 2026-09-11) */
.pw-searchcard { margin-top: 18px; }
.pw-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink2); line-height: 1.5; }
.pw-note b { color: var(--ink); }

/* ═══ 🧾 หน้า /orders — ทำให้ใช้งานง่ายขึ้น (user 2026-09-11) ════════════════
   ที่เจอตอนตรวจ: โค้ด/รหัสเป็นข้อความเฉย ๆ (ต้องลากเมาส์เลือกเอง) · ป้ายสถานะเล็กจาง
   · หลายใบแล้วหาไม่เจอ ⇒ เพิ่มปุ่มคัดลอก · ป้ายสถานะใหญ่ขึ้น · ตัวกรองสถานะ */

/* 🔎 ตัวกรองสถานะ — CSS ล้วน ไม่ใช้สคริปต์ (radio ซ่อน + `:has()` ที่แผงแม่) */
.ord-filter { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 14px; }
.ord-filter input { position: fixed; top: 0; left: 0; opacity: 0; width: 0; height: 0; pointer-events: none; }
.ord-filter label {
  cursor: pointer; padding: 5px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; color: var(--ink2);
  background: #fff; border: 1px solid var(--line);
}
.ord-filter label:hover { border-color: #c9d6e5; color: var(--ink); }
.ord-filter input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }
/* สถานะ: 0 = รอตรวจ · 1 = ส่งของแล้ว · 2/3 = ยกเลิก/คืนพอยต์ */
.ord-panel:has(#ordf-wait:checked)   .odr:not(.status-0) { display: none; }
.ord-panel:has(#ordf-done:checked)   .odr:not(.status-1) { display: none; }
.ord-panel:has(#ordf-cancel:checked) .odr.status-0,
.ord-panel:has(#ordf-cancel:checked) .odr.status-1 { display: none; }

/* ═══ 📑 สารบัญรายชื่อขุนพล + ด่านตัวอย่าง (/petChains · user 2026-09-11) ═══════
   สารบัญแปะข้างซ้าย เกาะจอไว้เวลาเลื่อน · คลิกชื่อแล้วกระโดดไปการ์ดสายนั้น
   ⛔ ไม่มีสคริปต์เลย — ลิงก์ `#c-<เลข NPC>` ล้วน (CSP `script-src 'self'` ก็ไม่เกี่ยว แต่เบากว่า)
   🔴 คอลัมน์เนื้อหาต้องเป็น `minmax(0,1fr)` ไม่ใช่ `1fr` — การ์ดสายมีแถบเลื่อนแนวนอนอยู่ข้างใน
      ถ้าใช้ `1fr` คอลัมน์จะโดนดันกว้างตามเนื้อในจนหน้าเลื่อนซ้ายขวาทั้งหน้า */
.pw-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 16px; align-items: start; }
.pw-main { min-width: 0; }

/* 🔴 แถบหัวเว็บเป็น `position:fixed` สูง `--nav-h` ⇒ sticky ต้องเริ่มใต้หัวเว็บ
      ใช้ `top:12px` เฉย ๆ = หัวข้อ "สารบัญ" มุดหายเข้าไปใต้หัวเว็บตอนเลื่อนลง (user ทัก 2026-09-11) */
.pw-toc {
  position: sticky; top: calc(var(--nav-h) + 12px); max-height: calc(100vh - var(--nav-h) - 24px);
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.pw-toc-h {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pw-toc-h .dim { font-size: 11.5px; font-weight: 700; color: var(--mute); }
.pw-toc-list { overflow-y: auto; scrollbar-width: thin; padding: 6px; }
.pw-toc-x {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 4px 7px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 600;
}
.pw-toc-x:hover { background: #f1f6fc; }
.pw-toc-x img, .pw-toc-nopic { width: 28px; height: 28px; flex: 0 0 auto; image-rendering: pixelated; object-fit: contain; }
.pw-toc-nopic { border: 1px dashed var(--line); border-radius: 6px; }
.pw-toc-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-toc-x b { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--mute); }
/* กระโดดมาแล้วต้องไม่โดนหัวเว็บ + แถบธาตุที่เกาะบนบัง */
.pw-chain { scroll-margin-top: calc(var(--nav-h) + 16px); }


/* 📱 จอแคบ — สารบัญเลิกเกาะ ไปกองอยู่ด้านบนแทน (เตี้ย ๆ เลื่อนในตัวเอง) */
@media (max-width: 900px) {
  .pw-layout { grid-template-columns: minmax(0, 1fr); }
  .pw-toc { position: static; max-height: 190px; }
}

/* 🚪 แถบบอกว่าเป็นตัวอย่าง (บนสุด) — บอกสถานะอย่างเดียว ไม่มีปุ่ม
   🔴 ต้องมี `margin-top` เอง — แถบหัวหน้า (`.phd`) จบพอดีที่ขอบบนของแถบนี้ (ห่าง 0px)
      ปล่อยไว้ = แปะติดหัวเว็บจนดูอึดอัด (user ทัก 2026-09-11) */
/* 🔴 เดิมมีแต่ `margin-top` ⇒ ระยะใต้ = 0 ของถัดไปมาติดสนิท (user จับได้ 2026-09-14)
   ใช้ทั้ง /monsters และ /petChains ⇒ แก้ที่นี่ที่เดียวได้ทั้งสองหน้า */
.pw-guest-top { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; }

/* 🚪 กล่องชวนเข้าสู่ระบบ **ท้ายตัวอย่าง** — จุดที่คนดูจบแล้วอยากดูต่อ
   จัดกลางและมีเส้นประรอบ ให้อ่านออกทันทีว่า "หมดแค่นี้ ถ้าอยากดูต่อกดตรงนี้" */
.pw-more {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  margin: 18px 0 6px; padding: 26px 20px;
  background: var(--card); border: 2px dashed var(--line); border-radius: 14px;
}
/* 🔴 ต้องเป็นลูกตรง (`>`) — ไม่งั้นไปทับสีตัวอักษรใน <span> ที่อยู่ในปุ่มทองด้วย
      ⇒ ตัวหนังสือบนปุ่มกลายเป็นเทาอมฟ้า จมหายไปกับพื้นทอง (user ทัก 2026-09-11) */
.pw-more > span { font-size: 14.5px; color: var(--ink2); max-width: 520px; }
.pw-more-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }


/* ⬅️ พับแถบข้างเก็บ — checkbox ซ่อน + `:has` (ไม่มีสคริปต์) */
.pw-tocchk { display: none; }
.pw-toc-hide, .pw-toc-show {
  cursor: pointer; user-select: none; font-weight: 800; color: var(--ink2);
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.pw-toc-hide { margin-left: 6px; padding: 0 7px; font-size: 13px; line-height: 20px; }
.pw-toc-hide:hover, .pw-toc-show:hover { border-color: #c9d6e5; color: var(--ink); }
.pw-toc-show { display: none; padding: 6px 12px; font-size: 12.5px; margin-bottom: 12px; }
.pw-layout:has(.pw-tocchk:checked) { grid-template-columns: minmax(0, 1fr); }
.pw-layout:has(.pw-tocchk:checked) .pw-toc { display: none; }
.pw-layout:has(.pw-tocchk:checked) .pw-toc-show { display: inline-flex; align-items: center; }


/* 🎁 แถบ "จุติมาด้วยอะไร" **ในการ์ด ใต้ช่องสกิล** (user 2026-09-11)
   ย้ายมาจากช่องลูกศรระหว่างการ์ด (กว้าง 104px/ช่อง) ⇒ คืนความกว้างให้เนื้อหา ~264px ต่อสาย
   ร่างตั้งต้นไม่มีแถบนี้ เพราะไม่ได้จุติมาจากอะไร */
.pw-via {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  background: #fffdf6; border: 1px solid #f0e2bd; border-radius: 8px;
  padding: 4px 5px; margin: 0 0 6px;
}
.pw-via-h {
  font-size: 10px; font-weight: 800; color: #8a6a1f;
  background: #fff2d0; border-radius: 5px; padding: 1px 5px;
}
.pw-via-need { font-size: 10px; font-weight: 700; color: var(--ink2); margin-left: auto; }
.pw-via-item {
  flex: 1 1 100%; min-width: 0; display: flex; align-items: center; gap: 5px;
  background: #fff; border: 1px solid #f0dfb4; border-radius: 6px; padding: 2px 5px;
}
.pw-via-item.is-spirit { background: #f7fdff; border-color: #cbe8f7; }
.pw-via-item img { width: 18px; height: 18px; flex: 0 0 auto; image-rendering: pixelated; }
.pw-via-item > span {
  min-width: 0; font-size: 10.5px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* ═══ 🧾 หน้า /orders — **รื้อใหม่หมด 2026-09-11** (user: "ผมไม่ชอบเลย") ═══════
   เคาะกับ user: **1 ใบ = 1 บรรทัด เรียงตรงคอลัมน์ · กดกางดูรายละเอียด**
   🔴 ของเดิมกางทุกใบพร้อมกัน ⇒ 80 ใบ = หน้ายาวมาก หาใบไม่เจอ และแต่ละใบมีตัวหนังสือ
      หลายน้ำหนักปนกันจนไม่มีลำดับสายตา (ไล่แก้มา 3 รอบแล้วยังไม่จบ ⇒ เปลี่ยนผังเลย)
   🔑 กางด้วย `<details>` ⇒ ไม่มีสคริปต์ · คลิกที่ไหนบนแถวก็กางได้ (ทั้งแถวเป็น `<summary>`)
   ⛔ คำอธิบายสถานะ/วิธีใช้โค้ด **ตัดออกทั้งชุด** (user เคาะ) */

/* คอลัมน์ของแถว — หัวตารางกับตัวแถวต้องใช้ชุดเดียวกัน ไม่งั้นไม่ตรงกัน
   🔴 คอลัมน์ "รายการ" ต้อง `minmax(0,1fr)` ไม่ใช่ `1fr` — ชื่อของยาว ๆ จะดันแถวล้นออกข้าง */
/* คอลัมน์: เลขที่ · วันที่ · รายการ · ไอดี · พอยต์ · สถานะ · ลูกศร
   🔴 คอลัมน์เลขที่ต้องกว้างพอให้ `260911-756T5` อยู่บรรทัดเดียว — แคบไปแล้วมันตัดเป็น 2 บรรทัด
      ดันแถวสูงขึ้นทั้งแถว (user ทัก 2026-09-11) */
.odr-head, .odr-row {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 118px 108px minmax(0, 1fr) 96px 80px 108px 18px;
}
.odr-head {
  padding: 0 10px 6px; font-size: 11.5px; font-weight: 800; color: var(--mute);
  border-bottom: 1px solid var(--line2);
}
.odr-head .right { text-align: right; }

.odr-list { margin-top: 2px; }
.odr { border-bottom: 1px solid var(--line2); }
.odr:last-child { border-bottom: 0; }

/* แถบสีซ้ายบอกสถานะ — มองผ่าน ๆ ก็รู้ว่าใบไหนจบแล้ว/ยกเลิก
   ใช้ `box-shadow` แทน `border-left` ⇒ ไม่กินความกว้างคอลัมน์ และไม่ต้องระวังสีถูกทับ */
.odr-row {
  cursor: pointer; list-style: none; padding: 10px; border-radius: 8px;
  box-shadow: inset 3px 0 0 #cbd5e1;
}
.odr-row::-webkit-details-marker { display: none; }
.odr-row:hover { background: #f7fafd; }
.odr.status-0 > .odr-row { box-shadow: inset 3px 0 0 #e0a419; }
.odr.status-1 > .odr-row { box-shadow: inset 3px 0 0 #16a34a; }

.odr-id { font-size: 13.5px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.odr-sep { color: var(--line); margin: 0 2px; }
.odr-acc-col { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.odr-when { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.odr-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.odr-what b { font-weight: 700; }
.odr-what .dim { margin-left: 5px; }
.odr-tag-code {
  margin-left: 7px; padding: 1px 7px; border-radius: 999px;
  background: #fff5dc; color: #8a6416; font-size: 11px; font-weight: 800;
}
.odr-pts { text-align: right; font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.odr-st {
  justify-self: start; padding: 3px 11px; border-radius: 999px; white-space: nowrap;
  background: #eef2f7; color: #5d6b7d; font-size: 12px; font-weight: 800;
}
.odr.status-0 .odr-st { background: #fff4d9; color: #8a6416; }
.odr.status-1 .odr-st { background: #e5f8ee; color: #0b6b4f; }

/* ลูกศรกาง — ทำจาก ::before ⇒ หน้าตาเหมือนกันทุกเบราว์เซอร์ (marker ของแต่ละเจ้าไม่เหมือนกัน) */
.odr-caret { justify-self: end; width: 0; height: 0; }
.odr-caret::before {
  content: ""; display: block; border: 5px solid transparent; border-left-color: #9aa7b5;
  transform: translate(-4px, -5px); transition: transform .16s ease;
}
.odr[open] .odr-caret::before { transform: translate(-6px, -3px) rotate(90deg); }
.odr[open] > .odr-row { background: #f4f8fc; }

/* ── ส่วนที่กางออกมา ──
   🔴 **จำกัดความกว้าง** (user 2026-09-11 "ข้างในยังสับสน มันดูยาก")
      เนื้อหาในนี้กว้างตามคอลัมน์ (~990px) ⇒ ชื่อของอยู่ซ้ายสุด ยอดพอยต์อยู่ขวาสุด
      ห่างกันเกือบเมตร ตาต้องกวาดยาวเพื่อจับคู่ว่าเลขไหนของชิ้นไหน */
.odr-detail { padding: 4px 10px 14px 13px; max-width: 660px; }

.odr-acc {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font-size: 12.5px; color: var(--ink2); margin: 2px 0 8px;
}
.odr-acc-k { font-size: 11px; font-weight: 800; color: var(--mute); }
.odr-acc b { color: var(--ink); }
.odr-acc > * + *::before { content: "·"; margin-right: 7px; opacity: .4; }
.odr-acc-t { margin-left: auto; }

.odr-items-h {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 0 0 5px; margin-top: 2px; border-bottom: 1px solid var(--line2);
  font-size: 11.5px; font-weight: 800; color: var(--mute);
}
.odr-items { list-style: none; margin: 8px 0 0; padding: 0; }
.odr-item + .odr-item { border-top: 1px dashed var(--line2); margin-top: 9px; padding-top: 9px; }
.odr-item-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.odr-item-nm { min-width: 0; font-size: 13.5px; }
.odr-item-n { margin-left: auto; font-weight: 800; white-space: nowrap; font-size: 13px; }

/* 🎫 โค้ด+รหัส = ของที่ต้องเด่นที่สุดในใบ ⇒ มีพื้นของตัวเอง
   🔴 เดิมเรียง **แถวเดียว 6 ก้อน** (ป้าย·ค่า·ปุ่ม ×2 + ป้ายสถานะ) ⇒ ตาจับคู่ไม่ได้ว่า
      ค่าไหนคู่กับป้ายไหน (user 2026-09-11 "ข้างในยังสับสน")
   ✅ เป็น **ตาราง 2 บรรทัด** ป้าย/ค่า/ปุ่ม ตรงคอลัมน์กัน — ตรงกับที่ในเกมกรอก 2 ช่องแยกกัน
      คอลัมน์ 4 มีแค่บรรทัดแรก (ป้ายสถานะ) บรรทัดล่างเว้นว่าง */
.odr-code {
  margin-top: 7px;
  background: #fffdf5; border: 1px solid #f0e2bd; border-radius: 9px; padding: 8px 11px;
}
/* 3 คอลัมน์: ป้าย · ตัวโค้ด · ปุ่มคัดลอก
   (ป้ายสถานะการใช้ย้ายออกไปอยู่บรรทัดชื่อของแล้ว — user 2026-09-11) */
.odr-code-r {
  display: grid; align-items: center; gap: 4px 10px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
}
/* ป้ายสถานะของ **ใบเก่า** ที่ไม่มีบรรทัดชื่อของให้เกาะ */
.odr-code-st { margin-top: 7px; padding-top: 6px; border-top: 1px dashed #f0e2bd; }
.odr-code-r + .odr-code-r { margin-top: 6px; border-top: 1px dashed #f0e2bd; padding-top: 6px; }
.odr-code-k { font-size: 11px; font-weight: 800; color: var(--mute); }
/* ตัวโค้ดต้องอ่านทีละตัวได้ — ผู้เล่นพิมพ์ต่อในเกม อ่านผิดตัวเดียวใช้ไม่ได้ */
.odr-code-v {
  font-size: 15.5px; font-weight: 800; letter-spacing: .06em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  user-select: all;
}

/* 📱 จอแคบ — ป้ายสถานะบนบรรทัดชื่อของ ตกลงไปบรรทัดใหม่เอง (`.odr-item-top` wrap) */
.odr-copy {
  padding: 2px 9px; cursor: pointer; font: inherit;
  font-size: 11.5px; font-weight: 800; color: var(--ink2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.odr-copy:hover { border-color: #c9d6e5; color: var(--ink); background: #fbfdff; }
.odr-plain { margin-top: 6px; font-size: 12px; color: var(--mute); }
.odr-old { margin-top: 10px; }

.odr-note {
  margin-top: 9px; padding: 7px 11px; border-radius: 9px; font-size: 12.5px;
  background: #f7f9fc; border: 1px solid var(--line2); color: var(--ink2);
}
.odr-note.is-team { background: #eef6ff; border-color: #cfe2f7; }
.odr-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 11px; }

/* 📱 จอแคบ — แถวพับเป็น 2 บรรทัด (เลขใบ+สถานะบน · รายการ+ยอดล่าง) หัวคอลัมน์ซ่อน */
@media (max-width: 760px) {
  .odr-head { display: none; }
  .odr-row {
    grid-template-columns: auto minmax(0, 1fr) auto 18px;
    grid-template-areas: "id when st caret" "what what pts pts" "acc acc acc acc";
    row-gap: 4px;
  }
  .odr-acc-col { grid-area: acc; }
  .odr-id { grid-area: id; }
  .odr-when { grid-area: when; }
  .odr-st { grid-area: st; justify-self: end; }
  .odr-caret { grid-area: caret; }
  .odr-what { grid-area: what; white-space: normal; }
  .odr-pts { grid-area: pts; }
  .odr-acc-t { margin-left: 0; }
}


/* ═══ 📒 ความเคลื่อนไหวของพอยต์ (/orders) — รื้อใหม่ 2026-09-11 ════════════════
   เดิมเป็นตาราง 4 คอลัมน์ (เวลา · รายการ · พอยต์ · คงเหลือ)
   🔴 เวลาเป็นข้อมูลรองสุดแต่กินคอลัมน์แรก · จอแคบต้องเลื่อนตาราง · เลข +/- กับคงเหลือ
      หน้าตาเหมือนกันเป๊ะอยู่ติดกัน ⇒ อ่านสลับกันเอง
   ✅ รายการแถวละ 3 ส่วน: ป้าย +/− · เรื่อง+เวลา · ตัวเลขที่เปลี่ยน+คงเหลือ */
.plg { list-style: none; margin: 4px 0 0; padding: 0; }
.plg-r {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  padding: 9px 2px; border-bottom: 1px solid var(--line2);
}
.plg-r:last-child { border-bottom: 0; }

/* ป้ายกลม +/− บอกทิศทางแบบไม่ต้องอ่านเลข */
.plg-ic {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; line-height: 1;
}
.plg-r.is-in  .plg-ic { background: #e5f8ee; color: #0b6b4f; }
.plg-r.is-out .plg-ic { background: #fdeceb; color: #a8342a; }

.plg-tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plg-tx b {
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plg-tx time { font-size: 11.5px; color: var(--mute); }

/* เลขที่เปลี่ยนตัวโต มีสี · คงเหลือตัวเล็กสีจาง ⇒ แยกกันได้ด้วยขนาดไม่ต้องพึ่งหัวตาราง */
.plg-n { text-align: right; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.plg-n b { font-size: 15px; font-weight: 800; }
.plg-r.is-in  .plg-n b { color: #0b6b4f; }
.plg-r.is-out .plg-n b { color: #a8342a; }
.plg-n span { font-size: 11.5px; color: var(--mute); }


/* ═══ 🐗 ข้อมูลมอนสเตอร์ (/monsters) — user สั่ง 2026-09-11 ════════════════════
   ตาราง 5 คอลัมน์: ชื่อ · เลเวล · ธาตุ · สถานที่ · ของที่ดรอป
   🔴 ตารางนี้ต้องอยู่ใน `.tblwrap` เสมอ (จอแคบจะได้เลื่อนในกรอบ ไม่ดันทั้งหน้า) */
/* 📌 แถบตัวกรอง — เกาะขอบบนตอนเลื่อน (user สั่ง 2026-09-11)
   หน้านี้ยาว 831 แถว ไม่แบ่งหน้า ⇒ ไม่เกาะไว้ต้องเลื่อนกลับขึ้นสุดทุกครั้งที่จะเปลี่ยนตัวกรอง
   ท่าเดียวกับ `.shop-controls-bar` · `top` = ความสูงแถบเมนูบน ไม่งั้นจะมุดกัน */
.mon-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin: 0 0 14px;
  position: sticky; top: var(--nav-h); z-index: 20;
  box-shadow: 0 6px 16px rgba(18, 38, 63, .07);
}
.mon-bar-k { font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.mon-bar-s { margin-left: 10px; }
.mon-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.mon-chip:hover { border-color: #c9d6e5; background: #fbfdff; }
.mon-chip b { font-size: 11px; color: var(--ink2); font-weight: 800; }
.mon-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mon-chip.on b { color: #fff; opacity: .8; }
/* 😇 ปุ่มกรอง "ศักดิ์สิทธิ์" — ใช้โทนทองเดียวกับป้ายในตาราง จะได้โยงกันติด */
.mon-chip-holy { border-color: #e6d29a; background: #fffaef; color: #8a6416; }
.mon-chip-holy:hover { border-color: #d9bf77; background: #fff6e2; }
.mon-chip-holy.on { background: #8a6416; border-color: #8a6416; color: #fff; }

/* ⛏️ ปุ่มกรอง "ก้อนแร่" — โทนหินเทาอมฟ้า แยกให้ขาดจากทองของศักดิ์สิทธิ์ */
.mon-chip-ore { border-color: #b9c6d4; background: #f4f8fc; color: #3d5a75; }
.mon-chip-ore:hover { border-color: #9db0c4; background: #eaf1f8; }
.mon-chip-ore.on { background: #3d5a75; border-color: #3d5a75; color: #fff; }

/* ⛏️ ป้ายหน้าชื่อ — ก้อนแร่ (ต้องใส่จอบ · ไม่ให้ exp · จับไม่ได้) */
.mon-ore {
  display: inline-block; margin-top: 3px;
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  color: #3d5a75; background: #eef4fa; border: 1px solid #c3d2e0;
  border-radius: 999px; padding: 1px 8px;
}

/* 😇 ป้ายหน้าชื่อมอน — บุคคลศักดิ์สิทธิ์ (จับไม่ได้ · วีรบุรุษได้ exp เต็ม) */
.mon-holy {
  display: inline-block; margin-top: 3px;
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  color: #8a6416; background: #fff5da; border: 1px solid #ecd79c;
  border-radius: 999px; padding: 1px 8px;
}

.mon-tbl td { vertical-align: top; }
.mon-nm { display: block; font-size: 13.5px; }
.mon-id { display: block; font-size: 11px; color: var(--mute); }
/* 🎨 ป้ายธาตุ — **สีของตัวเอง ห้ามยืมคลาส `elem-*`**
   ชุดนั้นเป็นพื้นสีทึบไว้ใส่ตัวหนังสือขาว ยืมมาใส่ตัวหนังสือสีเข้ม = จมหายไปกับพื้น */
.mon-el {
  display: inline-block; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #eef2f7; color: #5d6b7d; border: 1px solid transparent;
}
.mon-el.is-earth  { background: #f6efe2; color: #7a5720; border-color: #e8d8b9; }
.mon-el.is-water  { background: #e8f1f9; color: #23577f; border-color: #c9dcee; }
.mon-el.is-fire   { background: #fbebe6; color: #8c3823; border-color: #f0cdc1; }
.mon-el.is-wind   { background: #e7f4ee; color: #2c6e51; border-color: #c4e3d4; }
.mon-el.is-spirit { background: #f0ecfa; color: #543a91; border-color: #d8cdf0; }
.mon-el.is-none   { background: #eef2f7; color: #5d6b7d; border-color: #dde5ee; }

/* จุดสีธาตุหน้าปุ่มกรอง */
.mon-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.mon-dot.is-earth { background: #a3762f; }
.mon-dot.is-water { background: #2f6fa3; }
.mon-dot.is-fire { background: #b04a2f; }
.mon-dot.is-wind { background: #3f8f6a; }
.mon-dot.is-spirit { background: #6b4bb7; }
.mon-dot.is-none { background: #7b8899; }

.mon-places, .mon-drops { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mon-place {
  font-size: 11.5px; font-weight: 700; color: var(--ink2);
  background: #f2f6fb; border: 1px solid var(--line2); border-radius: 6px; padding: 1px 7px;
}
.mon-drop {
  font-size: 11.5px; font-weight: 700; color: #8a6416;
  background: #fff8e6; border: 1px solid #f0e2bd; border-radius: 6px; padding: 1px 7px;
}
/* 📜 หัวข้อธาตุ — คั่นตารางยาว ๆ ให้หาที่ต้องการเจอ (เลิกแบ่งหน้าแล้ว)
   🔴 ตัวหนังสือลอยบนภาพพื้นหลังของหน้า = อ่านไม่ออก (user ทัก 2026-09-11)
   ⇒ ใส่พื้นทึบเป็น "ป้าย" ให้หัวข้อ ไม่ใช่ตัวหนังสือลอยเฉย ๆ */
.mon-elem-h {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 17px; margin: 22px 0 10px; scroll-margin-top: calc(var(--nav-h) + 86px);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 16px; box-shadow: 0 2px 8px rgba(18, 38, 63, .06);
  max-width: 100%;
}
.mon-elem-h .dim { font-size: 13px; font-weight: 600; color: var(--ink2); }

/* 🔢 บรรทัด "แสดง N ตัว" — ก็ลอยบนภาพพื้นหลังเหมือนกัน ⇒ ใส่ป้ายด้วย */
.mon-count {
  /*  🔴 ต้องเป็น **บล็อกของตัวเอง** (`display: table` = บล็อกที่กว้างเท่าเนื้อหา)
      ของเดิมเป็น `inline-block` ⇒ ไปอยู่บรรทัดเดียวกับหัวข้อธาตุ `.mon-elem-h`
      ที่ตามมา แล้ว **ซ้อนทับกัน** เพราะหัวข้อธาตุมี `margin-top` ติดลบเชิงผล
      (user เห็นเป็น "แสดง 692 ตัว" ทับกับ "ธาตุดิน 178 ตัว") */
  display: table; margin: 0 0 12px;
  font-size: 12.5px; font-weight: 700; color: var(--ink2);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px;
}
.mon-count b { color: var(--ink); }
.mon-elem-h .mon-dot { width: 12px; height: 12px; }
.mon-top { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink2); text-decoration: none; }
.mon-top:hover { color: var(--ink); }

/* 📱 จอแคบ — คอลัมน์สถานที่/ของดรอปยาวสุด ให้ตารางเลื่อนในกรอบตัวเอง */
@media (max-width: 760px) {
  .mon-tbl { min-width: 720px; }
  .mon-bar-s { margin-left: 0; }
}

/* ── 🪪 การ์ดไอดีในหน้าบัญชี — ส่วนที่เพิ่ม 2026-09-11 (ภาพรวมโค้ด + ระยะบรรทัด) ───────
   🔴 ไฟล์นี้ถูก modern.css ทับได้ในช่วงต้นไฟล์ ⇒ ใช้ !important แบบเดียวกับบล็อก .acc-card เดิม
   ⛔ ห้ามย้ายกฎพวกนี้ไป modern.css (ไฟล์นั้นตายจากบรรทัด 1173) */
.acc-card-meta {
  margin-bottom: 12px !important;
}

.acc-codes {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-top: 12px !important;
}

.acc-code-chip {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  background: #f7fafd !important;
  border: 1px solid var(--line2) !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  /* โค้ดเป็นตัวอักษรสุ่ม — ตัวพิมพ์ใหญ่/เล็กต่างกันมีความหมาย ⇒ ฟอนต์ความกว้างเท่ากันอ่านง่ายกว่า */
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
}

.acc-code-more {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--mute) !important;
  align-self: center !important;
}

/* ไอดีที่เพิ่งขอรอบนี้ — เดิมมีแต่ `.row-new>td` ซึ่งใช้ได้เฉพาะตาราง ⇒ การ์ดต้องมีกฎของตัวเอง */
.acc-card.row-new {
  border-color: var(--gold) !important;
  background: rgba(198, 160, 74, 0.08) !important;
}
.acc-card.row-new::before {
  opacity: 1 !important;
}

/* 📏 ตาราง "ไอดีเกมของฉัน" — แถวเตี้ยลงเล็กน้อย (user สั่ง 2026-09-11)
   modern.css ตั้ง td/th ไว้ 16px 20px ⇒ ต้อง !important ถึงจะทับได้
   ปุ่มในแถวสุดท้ายก็บีบลงด้วย ไม่งั้นความสูงแถวยังถูกปุ่มดันไว้เท่าเดิม */
table.tbl.tbl-ids th,
table.tbl.tbl-ids td {
  padding: 10px 20px !important;
}
table.tbl.tbl-ids .btn-sm {
  padding: 6px 12px !important;
}


/* 🔮 ช่องรูปขุนพลหน้า /idDetail โชว์ **ลูกแก้วธาตุ** แทนรูปขุนพล (user เคาะ 2026-09-11)
   `.elem-orb` ปกติกว้าง 28px ⇒ เล็กเกินสำหรับช่องขุนพล ขยายให้เต็มช่องพอดี
   🔴 ต้องอยู่ท้ายไฟล์ — มีกฎ .elem-orb ซ้ำอีกชุดกลางไฟล์ที่ทับกันเอง */
.idd-pet-pic .elem-orb.pet {
  width: 34px;
  height: 34px;
}

/* ══════════════════════════════════════════════════════════════════════════
   🪙 ร้านแลกของด้วยเหรียญ (/CoinShop)
   🔑 ใช้โครงเดียวกับ /ItemShop (`.shop-page-container` · `.pgwrap-pts` · `.pcard`)
      ⇒ การ์ดกระเป๋าเหรียญต้องติดคลาส **`.ptcard` ด้วย** ถึงจะไปอยู่บนสุดของแถบขวา
      (กฎวางตำแหน่งเขียนเจาะชื่อ `.ptcard`/`.pgnav` ไว้ — ลูกตัวอื่นถูกโยนไปคอลัมน์ 1)
   ⚠️ ห้ามใส่ style ในแท็ก (CSP) ⇒ ทุกอย่างต้องอยู่ที่นี่
   ══════════════════════════════════════════════════════════════════════════ */

/* 🪙 การ์ดกระเป๋าเหรียญ — หน้าตาเดียวกับการ์ดพอยต์ แต่เลขเป็นสีทองให้แยกออกว่าคนละกระเป๋า */
/*  🎨 กระชับขึ้น (user ทัก 2026-09-16: ป้ายตกบรรทัด · ลิงก์ "ไปแลกของ" แตกเป็น 2 บรรทัด)
    · ป้ายยาว ๆ ให้ยุบตัวได้ (`min-width:0`) แต่ **ลิงก์ห้ามตกบรรทัดเด็ดขาด** (`nowrap`)
    · ลด letter-spacing/ระยะห่าง ⇒ การ์ดเตี้ยลง ~10px โดยยังอ่านง่ายเท่าเดิม */
.cshop-wallet-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.cshop-wallet-head .lbl{
  font-size:10.5px;font-weight:800;letter-spacing:.06em;color:#9aa7b5;
  line-height:1.35;min-width:0;
}
.cshop-wallet-link{
  font-size:12px;color:var(--gold-dk,#b9760a);font-weight:700;
  flex:0 0 auto;white-space:nowrap;
}
.cshop-wallet-num{font-size:26px;font-weight:900;color:var(--gold-dk,#b9760a);line-height:1.1;margin-top:1px}
.cshop-wallet-note{font-size:11.5px;color:#8b98a8;line-height:1.5;margin-top:4px}

/* รายไอดี — ยอดจริงเก็บแยกรายไอดี โชว์ให้เห็นว่ามาจากไหนบ้าง แต่ใช้จ่ายรวมก้อนเดียว */
.cshop-wallet-ids{list-style:none;margin:10px 0 0;padding:9px 0 0;border-top:1px solid var(--line,#e2ebf3)}
.cshop-wallet-ids li{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;padding:3px 0}
.cshop-wallet-ids .id{color:#7c8a99}
.cshop-wallet-ids .n{font-weight:800;color:var(--ink)}
.cshop-wallet-pending{margin-top:10px;font-size:11.5px;color:var(--gold-dk,#b9760a);font-weight:700}

/* 🏷️ ป้ายมุมการ์ด — โทนทอง แยกจากป้ายหมวดของร้านไอเทม */


/* 🧾 ท้ายการ์ด: ราคา + ไอดีรับของ + จำนวน + ปุ่ม ⇒ ต้องเรียงลงมา ไม่ใช่แถวเดียวแบบร้านไอเทม */

.cshop-limit{display:block;font-size:11px;color:#8b98a8;font-weight:600}



/* ══ 🏪 รายการของในร้านเหรียญ — **แนวร้านค้า การ์ดเตี้ย** (user สั่ง 2026-09-14) ══════
   ⛔ ไม่ใช้การ์ดสูง 3:4 แบบ /ItemShop: ร้านนี้ของน้อยและเป็นของใช้ในเกม
      รูปใหญ่ไม่ช่วยตัดสินใจ มีแต่ทำให้ต้องเลื่อนจอ ⇒ จอเดียวเห็นหลายชิ้น เทียบราคาได้ทันที */
.cshop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}
/* 📐 การ์ด = 2 แถว · แถวบน [รูป | ชื่อ+คำอธิบาย] · แถวล่าง [ราคา | จำนวน+ปุ่ม]
   🔴 ห้ามยัดทุกอย่างแถวเดียว — ชื่อของจะเหลือที่ไม่ถึง 100px แล้วซ้อนบรรทัดกัน */
.cshop-item{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 13px;
  background:var(--card,#fff);border:1px solid var(--line,#e2ebf3);border-radius:14px;
  padding:13px 15px;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 12px 26px -22px rgba(15,23,42,.30);
}
.cshop-thumb{
  grid-row:1;width:64px;height:64px;border-radius:11px;
  background:var(--line2,#eef4f9);border:1px solid var(--line,#e2ebf3);
  display:flex;align-items:center;justify-content:center;overflow:hidden;color:#b3c2d1;
}
.cshop-thumb img{width:100%;height:100%;object-fit:cover}
.cshop-body{grid-row:1;min-width:0;align-self:center}
.cshop-name{font-size:14.5px;font-weight:800;color:var(--ink);line-height:1.35}
.cshop-note{font-size:12.5px;color:#7c8a99;line-height:1.55;margin-top:3px}
.cshop-limit{display:inline-block;margin-top:5px;font-size:11px;font-weight:700;color:#9aa7b5}

/* แถวล่าง — คร่อมทั้ง 2 คอลัมน์ ⇒ ชื่อของด้านบนได้ความกว้างเต็ม */
.cshop-foot{
  grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;
  gap:10px;flex-wrap:wrap;
  border-top:1px solid var(--line2,#eef4f9);padding-top:11px;
}
.cshop-price{display:flex;align-items:baseline;gap:4px;white-space:nowrap}
.cshop-price b{font-size:19px;font-weight:900;color:var(--gold-dk,#b9760a)}
.cshop-price span{font-size:11.5px;font-weight:800;color:var(--mute,#7c8a99)}
.cshop-buy{display:flex;align-items:center;gap:7px}
.cshop-qty{
  width:56px;text-align:center;
  background:#fff;border:1px solid var(--line,#e2ebf3);border-radius:8px;
  color:var(--ink);font-family:inherit;font-size:13px;padding:6px 4px;
}
.cshop-btn{
  display:inline-block;cursor:pointer;border:0;border-radius:9px;
  padding:9px 18px;white-space:nowrap;
  background:linear-gradient(180deg,#d8a83c 0%,#b8871f 100%);
  color:#fff;font-family:inherit;font-size:12.5px;font-weight:800;
}
.cshop-btn:hover{filter:brightness(1.06)}
/* เหรียญไม่พอ = ยังกดได้ (เผื่อยอดขยับระหว่างเปิดหน้าค้างไว้ — ตัวตัดสินจริงคือเซิร์ฟเกม) */
.cshop-btn-off{opacity:.5}

/* จอแคบ: ราคา+ปุ่มลงมาอยู่ใต้ชื่อ ไม่บีบชื่อของจนอ่านไม่ออก */
@media (max-width:520px){
  .cshop-grid{grid-template-columns:1fr}
  .cshop-item{flex-wrap:wrap}
  .cshop-thumb{width:56px;height:56px}
  .cshop-act{flex-direction:row;align-items:center;justify-content:space-between;
             gap:10px;width:100%;padding-top:2px}
}

/* 🎫 โค้ดที่ระบบเกมออกให้ — ตัวพิมพ์กว้างเท่ากันจะได้อ่าน/คัดลอกไม่ผิดตัว */
.cshop-code{font-family:ui-monospace,"Consolas",monospace;font-weight:800;
  letter-spacing:.06em;color:var(--gold-dk,#b9760a)}
.cshop-fail{color:#c0392b;font-weight:700}

/* ── 🪙 หน้า "เหรียญของฉัน" (/Coin) ────────────────────────────────────────
   ใช้โครงหน้าฝั่งสมาชิกเหมือน /CoinShop (การ์ดกระเป๋า + `_MemberNav`) */

/* แถบยอดใหญ่บนสุดของเนื้อหา — เลขเดียวที่คนเปิดหน้านี้มาหา */
.coin-hero{
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  background:linear-gradient(135deg,#fffdf6 0%,#fff7e4 100%);
  border:1px solid rgba(240,160,21,.28);border-radius:16px;
  padding:18px 22px;margin:18px 0 22px;
}
.coin-hero-main{min-width:0}
.coin-hero-lbl{font-size:11.5px;font-weight:800;letter-spacing:.12em;color:#a98436}
.coin-hero-num{font-size:40px;font-weight:900;line-height:1.1;color:var(--gold-dk,#b9760a)}
.coin-hero-sub{font-size:13px;color:#7c8a99;margin-top:2px}

/* 3 ขั้นตอน "เหรียญมาจากไหน ไปไหนต่อ" — ผู้เล่นใหม่เดาเองไม่ได้ */
.coin-how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:8px}
.coin-how-item{
  display:flex;gap:11px;align-items:flex-start;
  background:var(--card,#fff);border:1px solid var(--line,#e2ebf3);border-radius:12px;padding:13px 14px;
}
/* 🔴 ต้องเจาะจงกว่า `.coin-how-item span` (คลาส+อิลิเมนต์ ชนะคลาสเดี่ยว) ไม่งั้น `color:#fff`
      ข้างล่างแพ้ แล้วเลขในวงกลมกลายเป็น**สีเทาบนพื้นทอง** = อ่านไม่ออก (user ทัก 2026-09-16) */
.coin-how-item span.coin-how-n{
  flex:0 0 auto;width:22px;height:22px;border-radius:50%;
  /* 🎨 ทองอ่อน + ตัวหนังสือขาว = อ่านไม่ออก (user ทัก 2026-09-16) ⇒ ไล่สีเข้มลงให้ตัวเลขเด้ง */
  background:linear-gradient(180deg,#9c6e16,#7d550c);color:#fff;   /* ขาวบนสองปลายไล่สี = 4.5:1 ขึ้นไป */
  font-size:12px;font-weight:900;display:flex;align-items:center;justify-content:center;
}
.coin-how-item b{display:block;font-size:13.5px;margin-bottom:2px}
.coin-how-item span{font-size:12.5px;color:#5a6875;line-height:1.65}
/* คำ/ตัวเลขที่เน้นในคำอธิบาย — ของเดิมรับสีเทาจาก span มาทั้งดุ้น เลยจมหายไปกับข้อความรอบ ๆ */
.coin-how-item span b{display:inline;font-size:inherit;margin:0;color:var(--ink,#1f2a37);font-weight:800}

/* ช่องยอดในตาราง + แถบเทียบสายตา (ไอดีไหนก้อนใหญ่สุดในบัญชี = เต็มแถบ) */
.coin-cell{display:inline-flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:78px}
.coin-bar{display:block;width:100%;height:4px;border-radius:3px;background:var(--line2,#eef4f9);position:relative}
.coin-bar::after{
  content:"";position:absolute;left:0;top:0;bottom:0;border-radius:3px;
  background:linear-gradient(90deg,#e8bd57,#b9760a);
}
/* 🔴 CSP บล็อก `style="width:..%"` ⇒ ความกว้างต้องมาเป็นคลาสขั้นละ 10% */
.coin-bar-0::after{width:0}
.coin-bar-1::after{width:10%}
.coin-bar-2::after{width:20%}
.coin-bar-3::after{width:30%}
.coin-bar-4::after{width:40%}
.coin-bar-5::after{width:50%}
.coin-bar-6::after{width:60%}
.coin-bar-7::after{width:70%}
.coin-bar-8::after{width:80%}
.coin-bar-9::after{width:90%}
.coin-bar-10::after{width:100%}

@media (max-width:860px){
  .coin-how{grid-template-columns:1fr}
  .coin-hero{padding:16px 18px}
  .coin-hero-num{font-size:34px}
}

/* ⛔ ปุ่มสลับหน้าชุดข้อมูลมอน (`.mon-kinds` / `.mon-kind`) **ถูกถอดออกแล้ว** (user สั่ง 2026-09-14)
   ทางไป /monsters · /monsters/holy · /monsters/ore อยู่ที่เมนู "ข้อมูล NPC" บนแถบหัวเว็บ
   ⇒ อย่าเอากลับมาใส่ในหน้าอีกโดยไม่ถาม */
}

/* 🎫 สถานะโค้ดในตารางประวัติร้านเหรียญ */
.cshop-used{font-weight:800;color:#2e7d5b}
.cshop-unused{font-weight:700;color:var(--gold-dk,#b9760a)}

/* ── 💬 กล่องแจ้ง/ยืนยัน (SweetAlert2) ให้ใช้ฟอนต์เดียวกับเว็บ ──────────────────
   🔴 ปุ่มกับช่องกรอกใน HTML **ไม่สืบทอดฟอนต์เองโดยปริยาย** — มันใช้ฟอนต์ของเบราว์เซอร์
      ไลบรารีไม่ได้ประกาศ `font-family` ที่ปุ่มไว้ ⇒ ตัวหนังสือไทยบนปุ่มเป็นคนละแบบกับทั้งเว็บ
      (user เห็นที่ปุ่ม "เข้าใจแล้ว" 2026-09-14)
   ✅ ตัวกล่อง `.swal2-popup` สืบทอดจาก body อยู่แล้ว ⇒ สั่งลูก ๆ ให้ `inherit` ต่อก็พอ */
.swal2-popup,
.swal2-popup .swal2-title,
.swal2-popup .swal2-html-container,
.swal2-popup button.swal2-styled,
.swal2-popup .swal2-input,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-select { font-family: inherit; }
/* ปุ่มของกล่องนี้ให้น้ำหนัก/ขนาดเข้าชุดกับปุ่มในเว็บ */
.swal2-popup button.swal2-styled { font-weight: 800; font-size: 14px; }

/* 📄 แถบแบ่งหน้าของตารางประวัติร้านเหรียญ */
.cshop-pager{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:12px}
.cshop-page{
  padding:7px 14px;border-radius:9px;
  border:1px solid var(--line,#e2ebf3);background:var(--card,#fff);
  font-size:13px;font-weight:700;color:var(--ink2,#475569);
}
.cshop-page:hover{border-color:#cfe0ef;color:var(--ink)}
.cshop-page-now{font-size:12.5px;font-weight:700;color:#7c8a99}

/* ⛔ `.pcard-price-baht` (แบบ "50฿") ถูกถอดออกแล้ว — สัญลักษณ์ ฿ ในฟอนต์ Kanit ไม่สวย
   ใช้คำว่า "บาท" แทน ซึ่งเข้าชุดกับหน้าอื่นทั้งเว็บ (user เคาะ 2026-09-14) */

/* ═══ 🎉 ป๊อปอัป "ช่วงคูณพอยต์" (2026-09-21) ═══════════════════════════════════
   เด้งที่ /itemShop และ /topUp เมื่อมีช่วงคูณพอยต์กำลังจัดอยู่
   ⛔ ห้ามใส่ style ในแท็ก (CSP) · เปิด/ปิดทำที่ js/promo-popup.js */
body.has-promo-pop{overflow:hidden}
.promo-pop{
  position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;
  padding:22px;background:rgba(14,20,33,.55);backdrop-filter:blur(3px);
}
.promo-pop[hidden]{display:none}
.promo-pop-card{
  position:relative;width:min(430px,100%);background:var(--card,#fff);
  border:1px solid var(--line,#e2ebf3);border-radius:18px;padding:30px 28px 24px;
  text-align:center;box-shadow:0 26px 70px rgba(14,20,33,.30);
}
.promo-pop-mult{
  display:inline-block;margin-bottom:12px;padding:6px 20px;border-radius:999px;
  font-family:var(--font-head);font-size:30px;font-weight:800;line-height:1.1;color:#3a2600;
  background:linear-gradient(180deg,#ffd76a 0%,#e0ab2c 100%);
  box-shadow:0 8px 20px -8px rgba(201,162,39,.85);
}
.promo-pop-card h2{font-family:var(--font-head);font-size:20px;font-weight:800;color:var(--ink);margin:0 0 6px}
.promo-pop-when{font-size:13px;color:var(--mute);margin:0 0 14px}
.promo-pop-cond{font-size:14.5px;color:var(--ink2);line-height:1.8;margin:0 0 6px}
.promo-pop-note{font-size:12.5px;color:var(--mute);line-height:1.7;margin:0 0 4px}
.promo-pop-acts{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;align-items:center;margin-top:18px}
.promo-pop-more{flex:1 0 100%;font-size:12.5px;color:var(--gold-dk);margin-top:2px}
.promo-pop-x{
  position:absolute;top:10px;right:10px;width:32px;height:32px;display:flex;
  align-items:center;justify-content:center;border:0;border-radius:9px;cursor:pointer;
  background:transparent;color:var(--mute);
}
.promo-pop-x:hover{background:var(--line2,#eef4f9);color:var(--ink)}
@media (max-width:430px){
  .promo-pop-card{padding:26px 18px 20px}
  .promo-pop-acts .btn{flex:1 0 100%}
}

/* 🎉 บรรทัด "กิจกรรม พอยต์ xN" ใต้ป้ายอัตราในหน้าเติมพอยต์ (2026-09-21)
   ขึ้นเฉพาะตอนมีช่วงคูณพอยต์กำลังจัดจริง — ดู Pages/TopUp.cshtml (liveBoost) */
.qr-boost-tag{
  display:inline-flex;align-items:center;gap:6px;
  margin:-10px 0 18px;padding:6px 16px;border-radius:20px;
  font-size:12.5px;font-weight:800;letter-spacing:.02em;
  color:#0f6b46;background:#e7f9f0;border:1.5px solid #b6e7d0;
}
.qr-boost-tag b{font-size:14px}

/* ═══ 🎁 หน้าเติมเงินสะสม — แยกแต่ละหมวดเป็น "การ์ด" (user 2026-09-21: "มันยาวเป็นพรืด") ═══
   เดิมทุกหมวดไหลต่อกันในแผงขาวใบเดียว ⇒ กวาดตาแล้วไม่รู้ว่าเรื่องไหนจบตรงไหน */
.promo-sec{
  background:var(--card,#fff);
  border:1px solid var(--line,#e2ebf3);
  border-radius:16px;
  padding:20px 22px;
  margin:0 0 18px;
  box-shadow:0 1px 2px rgba(15,23,42,.03), 0 14px 30px -26px rgba(15,23,42,.35);
}
.promo-sec:last-of-type{margin-bottom:0}
.promo-sec-head{
  font-family:var(--font-head);font-size:18px;font-weight:800;color:var(--ink);
  display:flex;align-items:center;gap:8px;
  margin:0 0 4px;padding-bottom:12px;border-bottom:1px solid var(--line2,#eef4f9);
}
.promo-sec-head + p.dim{margin-top:10px}
/* กติกา = ข้อความล้วน ให้พื้นต่างนิดหน่อย อ่านแล้วรู้ว่าเป็น "ที่อ่าน" ไม่ใช่ "ที่กด" */
.promo-sec-rules{background:#fbfdff}
@media (max-width:620px){ .promo-sec{padding:16px 14px;border-radius:14px} }

/* 🛒 ช่วงปิดขาย (`Web:ShopEnabled=false`) — ปุ่มใส่ตะกร้าเปลี่ยนเป็นป้ายบอกสถานะ ไม่ใช่ปุ่มกดได้ */
.pcard-btn-off{
  display:inline-flex;align-items:center;justify-content:center;
  background:#eef2f7;color:#8b97a6;border:1px solid #dde5ee;
  cursor:default;pointer-events:none;font-weight:700;
}

/* ═══ 📖 คู่มือสกิล (/skills) — user สั่ง 2026-09-25 ═════════════════════════
   แท็บธาตุ (ลูกแก้ว) + กลุ่ม ชั้นต้น/จุติ 1/จุติ 2 + ตะแกรงสกิล 2 คอลัมน์ (จอแคบ = 1)
   🔑 ใช้ minmax(0,1fr) ไม่ใช่ 1fr — ชื่อสกิลยาวจะได้ไม่ถ่างช่องจนหน้าล้น */
.skg-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.skg-tab {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 14px; font-weight: 800; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 16px 4px 5px;
}
.skg-tab img { width: 36px; height: 36px; display: block; }
.skg-tab:hover { border-color: #c9d6e5; background: #fbfdff; }
.skg-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.skg-group { font-size: 18px; font-weight: 800; color: var(--ink); margin: 22px 0 10px; }
.skg-group .dim { font-size: 13px; font-weight: 600; margin-left: 6px; }
.skg-group img { width: 28px; height: 28px; image-rendering: pixelated; vertical-align: -6px; margin-right: 8px; }
.skg-tab img[src*="/job/"] { image-rendering: pixelated; }
.skg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.skg-item {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.skg-item img { width: 40px; height: 40px; flex: none; image-rendering: pixelated; border-radius: 4px; }
.skg-tx { display: flex; flex-direction: column; min-width: 0; }
.skg-tx b { font-size: 15px; color: var(--ink); }
.skg-tx span { font-size: 13.5px; color: var(--ink2); overflow-wrap: anywhere; }
.skg-foot { margin-top: 22px; }
@media (max-width: 640px) {
  .skg-grid { grid-template-columns: minmax(0, 1fr); }
  .skg-tab { padding-right: 12px; font-size: 13px; }
}
