:root {
  --bg: #0c0f11;
  --panel: #151b1e;
  --panel-2: #1d262a;
  --line: #2f3c42;
  --text: #ece6f5;
  --muted: #95a0a6;
  --gold: #d9b45a;
  --danger: #d65a5a;
  --dark: #9b6cf0;
  --light: #f0d27a;
  --fire: #f07a3c;
  --water: #5cc8f0;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 16px/1.55 "Sarabun", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  background: radial-gradient(ellipse at top, #1e2d34 0%, var(--bg) 60%) fixed;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: Georgia, "Noto Serif Thai", serif; letter-spacing: .02em; margin: 0 0 .5em; }
.muted { color: var(--muted); font-weight: normal; font-size: .8em; }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 12px 24px;
  border-bottom: 1px solid var(--line); background: rgba(12, 15, 17, .8); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.brand { white-space: nowrap; font-family: Georgia, serif; font-size: 1.25rem; color: var(--gold); letter-spacing: .08em; }
.world { margin-left: auto; color: var(--muted); font-size: .9rem; }
main { max-width: 1100px; margin: 0 auto; padding: 32px 20px 64px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.auth { max-width: 420px; margin: 6vh auto 0; }
.auth h1 { color: var(--gold); font-size: 1.8rem; }
.sub { color: var(--muted); margin-top: -.3em; }

.tabs { display: flex; gap: 4px; margin: 20px 0; background: var(--panel-2); padding: 4px; border-radius: 10px; }
.tab { flex: 1; background: none; border: 0; color: var(--muted); padding: 8px; border-radius: 8px; cursor: pointer; font: inherit; }
.tab.active { background: var(--line); color: var(--text); }

label { display: block; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

button { font: inherit; cursor: pointer; }
.primary, .ghost, .danger {
  padding: 10px 20px; border-radius: 8px; border: 1px solid transparent; font-weight: 600;
}
.primary { background: linear-gradient(180deg, #e6c36b, #b8913a); color: #1b1408; width: 100%; }
.actions .primary { width: auto; }
.ghost { background: none; color: var(--text); border-color: var(--line); }
.danger { background: var(--danger); color: #fff; }
.link { white-space: nowrap; background: none; border: 0; color: var(--muted); text-decoration: underline; }
button:disabled { opacity: .55; cursor: wait; }
.error { color: var(--danger); min-height: 1.4em; margin: 4px 0 10px; font-size: .9rem; }
.actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ช่องตัวละคร */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.slot {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; min-height: 300px;
}
.slot img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; padding: 8px; }
.slot .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.slot .name { font-weight: 700; font-size: 1.05rem; word-break: break-all; }
.slot .meta { color: var(--muted); font-size: .85rem; }
.slot .row { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.slot .row .primary { padding: 8px; }
.slot .row .ghost { padding: 8px 10px; }
.slot.empty {
  align-items: center; justify-content: center; border-style: dashed; color: var(--muted);
  cursor: pointer; background: transparent; font-size: 1rem;
}
.slot.empty:hover { border-color: var(--gold); color: var(--gold); }
.slot.empty span { font-size: 2.4rem; line-height: 1; display: block; text-align: center; }

.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; width: fit-content; }
.t-dark { color: var(--dark); } .t-light { color: var(--light); } .t-fire { color: var(--fire); } .t-water { color: var(--water); }

/* เลือกหอ */
.name { max-width: 420px; }
.towers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 8px 0 16px; }
.tower {
  text-align: left; color: var(--text); background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 0; overflow: hidden; display: flex; flex-direction: column;
}
.tower img { width: 100%; height: 190px; object-fit: contain; display: block; padding: 8px 0 0; }
.tower .body { padding: 12px 14px; }
.tower h3 { margin: 0 0 4px; font-size: 1.1rem; }
.tower ul { margin: 8px 0; padding-left: 18px; font-size: .88rem; }
.tower .weak { color: var(--muted); font-size: .82rem; }
.tower .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.tower .stats b { display: block; color: var(--text); font-size: .95rem; }
.tower[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 90, .25); }

/* หน้าเกม */
.game { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.game img { width: 100%; border-radius: 10px; }
.bars { display: grid; gap: 10px; margin: 14px 0; }
.bar { font-size: .85rem; }
.bar .track { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-top: 3px; border: 1px solid var(--line); }
.bar .fill { height: 100%; }
.fill.hp { background: linear-gradient(90deg, #a83232, #e05252); }
.fill.sp { background: linear-gradient(90deg, #2f63b8, #5aa0ef); }
.fill.tu { background: linear-gradient(90deg, #8a6d22, var(--gold)); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--panel-2); border-radius: 8px; padding: 8px 12px; }
.stat small { color: var(--muted); display: block; }
.stat b { font-size: 1.1rem; }
.note { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--panel-2); border-radius: 6px; color: var(--muted); font-size: .9rem; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); max-width: 420px; width: 90%; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }

@media (max-width: 640px) {
  .game { grid-template-columns: 1fr; }
  .game img { max-width: 220px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand { font-size: 1rem; }
  .world { font-size: .8rem; text-align: right; }
}

/* ===== เฟส 2: หน้าเกม ===== */
.gpanel { padding: 20px; }
.ghead { display: grid; grid-template-columns: 120px 1fr 220px; gap: 18px; align-items: start; }
.ghead > img { width: 120px; height: 120px; object-fit: contain; border-radius: 10px; padding: 4px; }
.gname { font-size: 1.25rem; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gname .lv { color: var(--gold); }
.ghead .bars { grid-template-columns: 1fr 1fr; margin: 8px 0; gap: 6px 14px; }
.bar span { color: var(--muted); }
.fill.exp { background: linear-gradient(90deg, #4c8a3a, #8fd96a); }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--muted); }
.gside { display: grid; gap: 8px; }
.gside .primary { font-size: .9rem; }
.gtabs { display: flex; gap: 4px; margin: 18px 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.gtabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid transparent; white-space: nowrap; }
.gtabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.gbody h3 { margin-top: 18px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 12px; color: var(--text); cursor: pointer; }
.toggle input { width: auto; margin: 0; }

.maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.map { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.mapimg { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.mapbody { padding: 10px 14px 12px; display: grid; gap: 4px; flex: 1; align-content: start; }
.map.locked .mapimg { filter: grayscale(.85) brightness(.6); }
.map.sel { border-color: var(--gold); }
.map.locked { opacity: .7; }
.map .meta { color: var(--muted); font-size: .85rem; }
.map .primary { margin-top: 6px; padding: 8px; }
.lock { color: var(--muted); font-size: .85rem; margin-top: 6px; }

.battle { position: relative; margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; scroll-margin-top: 70px;
  background: linear-gradient(180deg, rgba(9, 13, 15, .15) 0, rgba(9, 13, 15, .72) 230px, rgba(9, 13, 15, .9) 100%), var(--mapbg, none) center / cover no-repeat, #0e1214; }
.battle .vs { min-height: 150px; align-items: end; text-shadow: 0 2px 6px #000; }
.battle .log { background: rgba(7, 10, 11, .55); border-radius: 8px; padding: 6px 10px; }
.bossfight { border-color: #8a2a2a; box-shadow: 0 0 0 1px #8a2a2a, 0 0 40px rgba(180, 30, 30, .25); }
.bossbanner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(120, 10, 20, .85); color: #ffd6d6; padding: 3px 14px; border-radius: 99px; font-weight: 700; letter-spacing: .12em; font-size: .8rem; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; font-weight: 600; }
.vs .bar { font-weight: normal; }
.vsx { color: var(--gold); font-family: Georgia, serif; font-size: 1.4rem; }
.log { list-style: none; margin: 12px 0 0; padding: 0 4px; max-height: 340px; overflow-y: auto; font-size: .9rem; }
.log li { padding: 3px 0; border-bottom: 1px dashed #1f282c; }
.log li.turn { color: var(--gold); border: 0; margin-top: 8px; font-size: .8rem; letter-spacing: .05em; }
.log li.me b { color: #8fc8ff; } .log li.foe b { color: #ff9a8a; }
.log li.warn { color: #e6b450; } .log li.dot { color: #ff9a5a; } .log li.summon { color: #c9a4ff; }
.log li.ult { color: #ffe08a; font-weight: 600; } .log li.muted { color: var(--muted); }
.log li.title { color: var(--text); font-weight: 600; border: 0; }
.log li.win { color: #8fd96a; font-weight: 700; } .log li.lose { color: var(--danger); font-weight: 700; } .log li.draw { color: var(--muted); font-weight: 700; }
.result { margin-top: 12px; }
.rtitle { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.rtitle.win { color: #8fd96a; } .rtitle.lose { color: var(--danger); } .rtitle.draw { color: var(--muted); }
.result .actions { justify-content: flex-start; margin-top: 10px; }
.drop { font-weight: 600; }
.drop.tier1 { color: #cfd6e0; } .drop.tier2 { color: #6fb8ff; } .drop.tier3 { color: #ffb84d; } .drop.lvup { color: #8fd96a; } .drop.lost { color: var(--danger); }

.order { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.oslot { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--text); text-align: left; display: grid; gap: 2px; min-height: 74px; font-size: .88rem; }
.oslot .tn { color: var(--muted); font-size: .75rem; }
.oslot .spc { color: #7fb0ff; font-size: .75rem; }
.oslot.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217, 180, 90, .35); }
.t-dark-bg { border-left: 3px solid var(--dark); } .t-light-bg { border-left: 3px solid var(--light); }
.t-fire-bg { border-left: 3px solid var(--fire); } .t-water-bg { border-left: 3px solid var(--water); } .t-neutral-bg { border-left: 3px solid #95a0a6; }

.stones { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.stone { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid #9aa3b0; border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; }
.stone.tier2 { border-left-color: #4d9cff; } .stone.tier3 { border-left-color: #ffb84d; }
.stone.fusing { outline: 2px solid var(--gold); } .stone.fusable { outline: 2px dashed #8fd96a; }
.sname { font-weight: 600; } .sname b { color: var(--gold); }
.sdesc { color: var(--muted); font-size: .82rem; }
.sact { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mini { padding: 5px 10px; font-size: .8rem; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: auto; }
.mini.primary { width: auto; }
.tag { font-size: .7rem; border: 1px solid #e6b450; color: #e6b450; border-radius: 4px; padding: 0 4px; }
.fuseinfo { background: #2a2310; border: 1px solid #5a4a1a; padding: 8px 12px; border-radius: 8px; }
.shopgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.panel2 { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.panel2 h3 { margin: 0 0 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 10px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.5); max-width: 90vw; }
.toast.ok { border-color: #4c8a3a; } .toast.err { border-color: var(--danger); color: #ffb3b3; }

@media (max-width: 760px) {
  .ghead { grid-template-columns: 80px 1fr; }
  .ghead > img { width: 80px; height: 80px; }
  .gside { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .ghead .bars { grid-template-columns: 1fr; }
  .order { grid-template-columns: repeat(2, 1fr); }
  .vs { grid-template-columns: 1fr; } .vsx { display: none; }
}

/* ===== World Map ===== */
.worldmap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid #333e43;
  background: #0a0d0f url('/assets/maps/world_map_bg.webp?v=b44') center / cover no-repeat; box-shadow: inset 0 0 80px rgba(0,0,0,.7); }
.routes { position: absolute; inset: 0; width: 100%; height: 100%; }
.route { fill: none; stroke: #677076; stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; opacity: .6; }
.route.open { stroke: #e6c36b; opacity: .9; filter: drop-shadow(0 0 6px rgba(230, 195, 107, .7)); }
.region { position: absolute; font-family: Georgia, "Noto Serif Thai", serif; color: rgba(230, 210, 170, .55); letter-spacing: .2em; font-size: clamp(.8rem, 1.6vw, 1.5rem); text-align: center; pointer-events: none; text-shadow: 0 2px 8px #000; }
.region small { display: block; font-size: .5em; letter-spacing: .15em; }
.r-akadia { left: 3%; bottom: 4%; }
.r-nocturnal { right: 4%; bottom: 5%; color: rgba(200, 120, 140, .55); }
.wnode { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); }
.wnode .ring { position: relative; width: clamp(46px, 7.5vw, 108px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: block;
  border: 3px solid #c9a24a; box-shadow: 0 0 0 2px #2a2016, 0 0 22px rgba(230, 190, 100, .45), 0 6px 18px rgba(0,0,0,.7); background: #181d20; transition: transform .15s; }
.wnode .ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wnode:hover .ring { transform: scale(1.08); }
.wnode.last .ring { border-color: #ffe08a; box-shadow: 0 0 0 2px #2a2016, 0 0 30px rgba(255, 224, 138, .8); }
.wnode.locked .ring { border-color: #555e64; box-shadow: 0 0 0 2px #13181a, 0 6px 18px rgba(0,0,0,.7); filter: grayscale(.9) brightness(.55); }
.wnode .lockic { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.4em; filter: none; }
.noart { display: grid; place-items: center; width: 100%; height: 100%; color: #848f94; font-size: 1.6em; background: radial-gradient(#252e33, #101517); }
.wlabel { background: rgba(9, 12, 13, .78); border: 1px solid rgba(201, 162, 74, .45); border-radius: 6px; padding: 2px 8px; text-align: center; line-height: 1.25; white-space: nowrap; font-size: clamp(.62rem, 1vw, .85rem); }
.wlabel small { display: block; color: var(--gold); }
.wnode.locked .wlabel { opacity: .7; border-color: #353f44; }
.arealist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.arow { display: flex; justify-content: space-between; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--text); text-align: left; font-size: .88rem; }
.arow.locked { opacity: .55; }

/* ===== Farming Area ===== */
.area { display: grid; gap: 14px; }
.ahero { position: relative; aspect-ratio: 16 / 9; max-height: 560px; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid #333e43;
  background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 55%, rgba(7, 10, 11,.92)), var(--areabg) center / cover no-repeat, #0d1113; }
.area.noart .ahero { background: radial-gradient(ellipse at 50% 40%, #252e33, #0a0d0f 70%); }
.aback { position: absolute; top: 12px; left: 12px; background: rgba(9, 12, 13, .7); width: auto; }
.atitle { position: absolute; left: 22px; right: 22px; bottom: 16px; text-shadow: 0 2px 10px #000; }
.atitle h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 2.2rem); color: #f3e3bd; }
.atitle p { margin: 6px 0 0; max-width: 720px; color: #ddd3c3; font-size: .95rem; }
.entrance { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; display: grid; justify-items: center; gap: 4px; }
.entrance .pulse { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(#fff6d0, #e6b84a 45%, rgba(230,184,74,0) 70%); box-shadow: 0 0 0 0 rgba(230,184,74,.7); animation: pulse 1.8s infinite; }
.entrance .etext { background: rgba(9, 12, 13, .8); border: 1px solid #c9a24a; color: #ffe9b0; border-radius: 6px; padding: 2px 8px; font-size: .8rem; white-space: nowrap; }
.entrance:disabled { opacity: .6; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(230,184,74,.7); } 70% { box-shadow: 0 0 0 22px rgba(230,184,74,0); } 100% { box-shadow: 0 0 0 0 rgba(230,184,74,0); } }
.noart-note { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); color: var(--muted); text-align: center; max-width: 80%; }
.ainfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.abox { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.abox h4 { margin: 0 0 4px; font-size: .95rem; }
.abox.boss { border-color: #6a2a2a; background: linear-gradient(#2a1418, var(--panel-2)); }
.bname { font-weight: 700; color: #ffb0a0; }
.sig { font-size: .88rem; } .sig b { color: #ffb84d; }
.kv { display: flex; justify-content: space-between; font-size: .9rem; } .kv span { color: var(--muted); }
.primary.big { padding: 12px; font-size: 1.05rem; margin-top: 4px; }
.mlist { margin: 0; padding-left: 18px; font-size: .9rem; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { font-size: .78rem; border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; background: var(--bg); }
.small { font-size: .78rem; }
@media (max-width: 760px) {
  .wlabel { display: none; }
  .region { display: none; }
  .ahero { aspect-ratio: 4 / 3; }
}

/* ---------- เฟส 3: พัฒนาหอคอย ---------- */
.ptsalert { display: block; width: 100%; margin: 14px 0 0; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--gold); background: rgba(217, 180, 90, .12); color: var(--gold); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.ptsalert:hover { background: rgba(217, 180, 90, .2); }
.badge-n { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--gold); color: #1a1408; font-size: .72rem; font-weight: 700; text-align: center; }
.pts { color: var(--gold); }
.subnav { display: flex; gap: 6px; margin-bottom: 14px; }
.subnav button { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; }
.subnav button.active { color: var(--gold); border-color: var(--gold); }
.devhead { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.bigpts { font-size: 2.2rem; line-height: 1; font-weight: 700; color: var(--gold); font-family: Georgia, serif; }
.devact { display: flex; gap: 8px; flex-wrap: wrap; }
.devact button { width: auto; }
.stlist { display: grid; gap: 8px; margin-bottom: 12px; }
.strow { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.stname small, .stval small { display: block; }
.stval { font-size: 1.25rem; font-weight: 600; }
.stval .up { color: #8fd96a; font-size: 1.05rem; }
.stval small { font-size: .75rem; font-weight: 400; }
.stctl { display: flex; gap: 5px; }
.respec { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.respec button { width: auto; }
.lvtag { color: var(--gold); font-size: .72rem; font-weight: 600; margin-left: 4px; }
.skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.skill { background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 5px; align-content: start; }
.skill.ready { border-left-color: #8fd96a; }
.skill.learned { border-left-color: var(--gold); }
.skill.maxed { border-left-color: var(--gold); background: rgba(217, 180, 90, .08); }
.skill.locked { opacity: .72; }
.skhead { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); display: block; }
.pips i.on { background: var(--gold); border-color: var(--gold); }
.small { font-size: .82rem; }
.sknow { color: #8fd96a; font-size: .85rem; }
.sknext { color: var(--muted); font-size: .82rem; }
.reqs { display: flex; flex-wrap: wrap; gap: 4px; }
.req { font-size: .72rem; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); }
.req.ok { color: #8fd96a; border-color: #3d6a2c; } .req.bad { color: #e6877f; border-color: #6a2f2a; }
.skill .mini { justify-self: start; }
.skill .mini:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) {
  .strow { grid-template-columns: 1fr; gap: 8px; }
}

.recipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; font-size: .85rem; }
.recipe > div { display: grid; gap: 2px; align-content: start; }
.pill.bossmat { border-color: var(--gold); }

/* ภาพหอคอย (พื้นโปร่งใส) วางบนพื้นหลังโทนสีประจำหอ */
.timg { background: radial-gradient(ellipse at 50% 75%, var(--tglow, #304854) 0%, #101619 70%); }
.ti-dark { --tglow: #3d1f66; } .ti-light { --tglow: #5a4a22; } .ti-fire { --tglow: #5a1f10; } .ti-water { --tglow: #163f66; }

/* เวทตำนาน (tier 4) */
.stone.tier4 { border-left-color: #ff5ad6; background: linear-gradient(135deg, rgba(120, 30, 110, .25), var(--panel-2) 60%); box-shadow: inset 0 0 0 1px rgba(255, 90, 214, .25); }
.drop.tier4 { color: #ff7ae0; text-shadow: 0 0 8px rgba(255, 90, 214, .6); }
.tag.legend { border-color: #ff5ad6; color: #ff7ae0; }
.log li.legend { color: #ff9be8; font-weight: 700; text-shadow: 0 0 8px rgba(255, 90, 214, .45); }

/* ===== ร้านสุ่มเวท / Item Mall / ไอเทมช่วยหลอม ===== */
.gacha { margin: 14px 0; border-color: #5a3a6a; background: linear-gradient(135deg, rgba(90, 40, 110, .25), var(--panel-2) 55%); }
.gachagrid { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.rates { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rates th, .rates td { text-align: left; padding: 4px 6px; border-bottom: 1px dashed var(--line); }
.rates th { color: var(--muted); font-weight: normal; }
.gresults { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pill.gres.tier3 { border-color: #ffb84d; color: #ffb84d; } .pill.gres.tier4 { border-color: #ff5ad6; color: #ff7ae0; box-shadow: 0 0 10px rgba(255, 90, 214, .5); }
.pill.gres.tier2 { border-color: #4d9cff; color: #8fc3ff; }
.mallhead { display: flex; align-items: center; gap: 14px; justify-content: space-between; }
.mallhead .pts { font-size: 1.1rem; }
.fuseopts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.fuseopts .toggle { margin: 0; }
.fuseopts .toggle.off { opacity: .5; }
@media (max-width: 760px) { .gachagrid { grid-template-columns: 1fr; } }

/* ===== อุปกรณ์สวมใส่ ===== */
.eqtop { display: grid; grid-template-columns: 1fr 260px; gap: 14px; margin-bottom: 14px; }
.eqdoll { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.eqslot { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line)); border-radius: 10px; background: var(--panel-2); }
.eqslot.empty { opacity: .6; border-style: dashed; }
.eqicon { font-size: 1.8rem; }
.eqname { color: var(--rc, inherit); font-weight: 600; }
.eqs { display: inline-block; margin: 2px 6px 2px 0; font-size: .82rem; color: #d9cfa8; }
.eqtot { line-height: 1.8; }
.eqdiff .up { color: #6fd36f; } .eqdiff .down { color: #e46a6a; }
.eqcard { border-left-color: var(--rc) !important; }
.eqcard .sname { color: var(--rc); }
.eq-common { --rc: #b8b8b8; } .eq-uncommon { --rc: #5fd35f; } .eq-rare { --rc: #4d9cff; }
.eq-epic { --rc: #b06bff; } .eq-legendary { --rc: #ffb84d; } .eq-mythic { --rc: #ff4d6d; }
.drop[class*="eq-"] { color: var(--rc); border-color: var(--rc); }
.eqslot.eq-mythic, .eqcard.eq-mythic { box-shadow: 0 0 12px rgba(255, 77, 109, .35); }
@media (max-width: 760px) { .eqtop { grid-template-columns: 1fr; } }

/* ===== ยศขุนนาง ===== */
.noble { color: var(--gold); font-size: .85em; }
.ranks { display: grid; gap: 12px; }
.rankcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); }
.rankcard.r-owned { border-color: #8a6d2b; background: linear-gradient(135deg, rgba(212, 175, 55, .12), var(--panel-2) 60%); }
.rankcard.r-open { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, .25); }
.rankcard.r-locked { opacity: .65; }
.rhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rname { font-size: 1.15rem; color: var(--gold); font-family: Georgia, serif; }
.rbody { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; margin-top: 8px; }
.rbody h4 { margin: 4px 0 6px; font-size: .9rem; color: var(--muted); font-weight: normal; }
.qrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.qrow.done { opacity: .7; }
.qcount { font-weight: 600; }
@media (max-width: 760px) { .rbody { grid-template-columns: 1fr; } }
.gtabs { flex-wrap: wrap; row-gap: 4px; }
.r-abyss { right: 3%; top: 3%; color: rgba(140, 170, 230, .55); }
.pill.ok { border-color: #5fd35f; color: #8fe38f; }

/* ===== ไอคอนเวท ===== */
.sicon { width: 56px; height: 56px; border-radius: 8px; flex: none; vertical-align: middle; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
.sicon.md { width: 40px; height: 40px; margin-right: 8px; }
.sicon.sm { width: 34px; height: 34px; border-radius: 6px; display: block; margin: 2px auto 4px; }
.sicon.xs { width: 22px; height: 22px; border-radius: 4px; margin-right: 5px; box-shadow: none; }
.shead { display: flex; gap: 10px; align-items: flex-start; }
.shead .sname { margin-bottom: 2px; }

/* ===== God Item ===== */
.godtitle { font-family: Georgia, serif; font-size: 1.6rem; text-align: center; color: var(--gold); letter-spacing: .05em; margin: 4px 0; }
.godgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.godcard { background: linear-gradient(180deg, #141a1d, #0b0e0f); border: 1px solid #323f45; border-radius: 12px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.godcard.mine { border-color: var(--gold); box-shadow: 0 0 16px rgba(212, 175, 55, .3); }
.gname2 { font-family: Georgia, serif; font-size: 1.05rem; }
.geff { color: #e6c66a; font-size: .85rem; }
.gimg { width: 140px; height: 140px; border-radius: 10px; }
.loyal { display: flex; align-items: center; gap: 6px; width: 100%; font-size: .8rem; color: var(--muted); }
.lbar { flex: 1; height: 8px; background: #252d31; border-radius: 4px; overflow: hidden; }
.lbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6d2b, #f0d27a); }
.gowner { font-weight: 600; }
.godlog { font-size: .85rem; line-height: 1.6; padding-left: 18px; }
.drop.godrop { color: #ffe69a; border-color: #ffd34d; box-shadow: 0 0 10px rgba(255, 211, 77, .4); }
.bossbanner.legend { background: linear-gradient(90deg, #5a0a2a, #b0204a, #5a0a2a); }
.bossbanner.god { background: linear-gradient(90deg, #4a3a0a, #b08a20, #4a3a0a); }
.legend-txt { color: #ff7a9a; }
.log li.hasicon { display: flex; gap: 6px; align-items: flex-start; }
.sicon.log { width: 24px; height: 24px; border-radius: 4px; margin-top: 1px; box-shadow: none; }

/* ===== แยกสายสกิล ===== */
.skpaths { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.skpath { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel-2); }
.skpath.chosen { border-color: var(--gold); box-shadow: 0 0 12px rgba(212, 175, 55, .2); }
.skpath.locked { opacity: .5; }
.skpathhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 1.05rem; }
.skgrid.one { grid-template-columns: 1fr; }
.skor { align-self: center; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) { .skpaths { grid-template-columns: 1fr; } }

/* ===== หม้อหลอมเวท ===== */
.cauldron { position: relative; margin-bottom: 18px; background: radial-gradient(ellipse at 50% 80%, rgba(60, 140, 80, .15), transparent 60%), var(--panel-2); }
.cslots { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.cslot { width: 120px; min-height: 120px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; position: relative; text-align: center; background: rgba(0, 0, 0, .3); }
.cslot.empty { border-style: dashed; }
.cslot .sicon { width: 72px; height: 72px; }
.cplus { font-size: 1.8rem; color: var(--gold); }
.clv { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .75); color: #fff; font-weight: 700; font-size: .75rem; padding: 0 5px; border-radius: 6px; }
.cslot .clv { right: 20px; top: 70px; bottom: auto; }
.gemrow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gemb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; min-width: 110px; font-size: .8rem; }
.gemb.sel { border-color: var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, .35); }
.gemi { width: 26px; height: 26px; display: inline-block; clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); background: #444; }
.gemi.big { width: 64px; height: 64px; }
.gem-small { background: linear-gradient(135deg, #9fe3ff, #3d8bd9); } .gem-medium { background: linear-gradient(135deg, #e9b3ff, #8a3dd9); }
.gem-large { background: linear-gradient(135deg, #ffe6a3, #e08a1e); box-shadow: 0 0 12px #ffb84d; } .gem-none { background: #262d31; }
.copts { display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.copts .toggle.off { opacity: .5; }
.cfoot { display: flex; align-items: center; justify-content: center; gap: 18px; }
.cpot { width: 130px; height: 130px; object-fit: contain; }
.cchance { font-size: 1.15rem; } .cchance b { color: #8fe38f; font-size: 1.4rem; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 12px; }
.cgem { position: relative; padding: 2px; border-radius: 8px; aspect-ratio: 1; }
.cgem .sicon { width: 100%; height: 100%; }
.cgem.sel { outline: 2px solid var(--gold); box-shadow: 0 0 10px rgba(212, 175, 55, .6); }
.cgem.dim { opacity: .3; }
.cresult { position: absolute; inset: 0; background: rgba(4, 6, 8, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; cursor: pointer; z-index: 5; animation: cfade .3s ease; }
.cresult .cpot { width: 220px; height: 220px; animation: cshake .5s ease; }
.crstone { position: relative; margin-top: -170px; margin-bottom: 40px; animation: crise .9s ease forwards; }
.crstone .sicon { width: 96px; height: 96px; }
.crtitle { font-size: 2rem; font-weight: 800; text-align: center; line-height: 1.1; }
.crtitle span { font-family: Georgia, serif; letter-spacing: .1em; font-size: 1.6rem; }
.cresult.ok .crtitle { color: #ffe08a; text-shadow: 0 0 18px #ffb84d; }
.cresult.bad .crtitle { color: #c7ced2; }
@keyframes cfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cshake { 0%, 100% { transform: none; } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
@keyframes crise { from { transform: translateY(40px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== Magic Library ===== */
.libhead { display: flex; justify-content: space-between; align-items: center; }
.libtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.libtabs button { min-width: 80px; }
.libtier { margin: 14px 0 6px; } .libtier.t1 { color: #e8e2d0; } .libtier.t2 { color: #8fc3ff; } .libtier.t3 { color: #ffb84d; } .libtier.t4 { color: #ff6a8a; }
.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.libcell { position: relative; padding: 2px; aspect-ratio: 1; border-radius: 8px; }
.libcell .sicon { width: 100%; height: 100%; filter: grayscale(.85) brightness(.55); }
.libcell.own .sicon { filter: none; }
.libcell.sel { outline: 2px solid var(--gold); }
.libchk { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; background: #111; border: 1px solid #666; font-size: .7rem; line-height: 14px; color: #8fe38f; }
.libdetail { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); margin-bottom: 8px; }
.libdetail .sicon { width: 72px; height: 72px; }
.libtabs button, .gemrow button { width: auto; flex: none; }

/* ===== ภาพมอนสเตอร์ ===== */
.mroster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: .82rem; padding: 6px 4px; border-radius: 10px; background: radial-gradient(ellipse at 50% 85%, rgba(0, 0, 0, .55), transparent 70%); }
.mimg { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .7)); }
.mimg.boss { width: 170px; height: 170px; }
.mimg.none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; font-size: 2rem; }
.bossimg { float: right; margin: -6px -4px 0 8px; }
.foeimg { display: flex; justify-content: center; margin-bottom: 4px; }
.foeimg .mimg { width: 140px; height: 140px; animation: foebob 2.4s ease-in-out infinite; }
.foeimg .mimg.boss { width: 200px; height: 200px; }
@keyframes foebob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.mroster { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; overflow: hidden; }
.mcard { flex: 1 1 88px; max-width: 120px; min-width: 0; }
.mcard .mimg { width: 100%; height: auto; aspect-ratio: 1; max-width: 104px; }
.mcard span { overflow-wrap: anywhere; }
.bossimg { float: none; display: flex; justify-content: center; margin: 0 0 4px; }
.bossimg .mimg.boss { width: 140px; height: 140px; }
#towerPicker .timg { width: 100%; object-fit: cover; object-position: 50% 30%; }

/* ---------- v0.6.0: ตี 10 รอบ · โจมตีหอคอย · ตีบวก · Spell Study ---------- */
.stone.tier5, .libdetail.tier5 { border-left-color: #ff3b3b; background: linear-gradient(135deg, rgba(130, 20, 20, .3), var(--panel-2) 60%); box-shadow: inset 0 0 0 1px rgba(255, 60, 60, .3); }
.drop.tier5 { color: #ff6b6b; text-shadow: 0 0 8px rgba(255, 60, 60, .6); font-weight: 700; }
.cgem.tier5, .cslot.tier5 { border-color: #ff3b3b; }
.libtier.t5 { color: #ff6b6b; }
.actions.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions.two .big { width: 100%; }
button.alt { background: linear-gradient(180deg, #8a2b2b, #5a1717); border-color: #c24a4a; }
button small { opacity: .8; font-weight: 400; }
.ultbox { display: flex; gap: 10px; align-items: flex-start; border-color: rgba(255, 60, 60, .45) !important; }
.ultbox select { margin-top: 4px; max-width: 100%; background: var(--panel); color: inherit; border: 1px solid var(--line, #333); border-radius: 6px; padding: 4px; }
.battle.batch { padding: 16px; }
.bsum { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0; font-weight: 700; }
.bsum .win { color: #7ee08a; } .bsum .lose { color: #ff7a7a; } .bsum .draw { color: #d9b45a; }
.blist { list-style: none; padding: 0; margin: 10px 0; max-height: 320px; overflow: auto; font-size: .9rem; }
.blist li { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.blist li > span:first-child { color: var(--muted); min-width: 28px; }
.blist li b { margin-left: auto; }
.blist li.win b { color: #7ee08a; } .blist li.lose b { color: #ff7a7a; } .blist li.draw b { color: #d9b45a; }
.raidhead { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.raidhead > div:first-child { flex: 1 1 420px; }
.raidact { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.rtowers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-top: 12px; }
.rtower { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .07); border-radius: 10px; border-left: 3px solid var(--gold); }
.rtower img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.rtower.t-dark { border-left-color: #a35cff; } .rtower.t-light { border-left-color: #ffe08a; } .rtower.t-fire { border-left-color: #ff7a3a; } .rtower.t-water { border-left-color: #4db3ff; }
.rtinfo { flex: 1; min-width: 0; }
.rtinfo b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtower.done { opacity: .55; } .rtower.done.win { opacity: .7; }
.rtres { font-weight: 700; white-space: nowrap; }
.tag.d-easy { border-color: #6fbf73; color: #8fdc93; } .tag.d-hard { border-color: #ff6b6b; color: #ff8f8f; }
.plus { color: #ffd166; text-shadow: 0 0 6px rgba(255, 209, 102, .5); }
.uppanel { border: 1px solid rgba(217, 180, 90, .4); margin-bottom: 14px; }
.uphead { display: flex; justify-content: space-between; align-items: center; }
.upgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.upbig { font-size: 1.6rem; font-weight: 700; }
.upchance { margin-top: 8px; font-size: 1.1rem; }
.uppanel .ok { color: #8fdc93; } .uppanel .bad { color: #ff8f8f; }
.uplast { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); font-weight: 700; }
.uplast.success { color: #8fdc93; } .uplast.broken, .uplast.down { color: #ff8f8f; } .uplast.protected, .uplast.fail { color: #d9b45a; }
.ultlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.ultrow { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, .2); }
.ultrow.own { box-shadow: inset 0 0 0 1px rgba(255, 60, 60, .45); }
.ultbox > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ultbox select { width: 100%; }
.ultbox label { display: block; margin-top: 4px; }

/* ---------- v0.8.0: ตลาด · Platinum ---------- */
.ptchip { color: #9fe8ff; text-shadow: 0 0 6px rgba(120, 220, 255, .5); }
.boost { color: #ffd166; }
.mnav { justify-content: flex-start; margin: 10px 0; }
.mfilter { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.mfilter input, .mfilter select, .mform input, .stone input { background: var(--panel); color: inherit; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; padding: 5px 8px; }
.mprice { font-weight: 700; color: var(--gold); margin: 4px 0; }
.mcard2 .sact { justify-content: space-between; align-items: center; }
.eqicon.sm { font-size: 1.4rem; margin-right: 6px; }
.mpicks { display: flex; flex-wrap: wrap; gap: 6px; }
.mpick { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; font-size: .88rem; border-left: 3px solid transparent; }
.mpick.sel { outline: 2px solid var(--gold); }
.mpick.tier2 { border-left-color: #4d9cff; } .mpick.tier3 { border-left-color: #ffb84d; } .mpick.tier4 { border-left-color: #ff5ad6; } .mpick.tier5 { border-left-color: #ff3b3b; }
.mform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; border: 1px solid rgba(217, 180, 90, .4); }
.mform input { width: 140px; }
.ptbanner { background: linear-gradient(135deg, rgba(60, 140, 200, .18), var(--panel-2) 60%); border: 1px solid rgba(120, 220, 255, .3); }
.ptpacks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ptpack { text-align: center; padding: 14px 10px; border-radius: 12px; background: linear-gradient(160deg, rgba(90, 180, 255, .15), rgba(0, 0, 0, .25)); border: 1px solid rgba(120, 220, 255, .3); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ptamt { font-size: 1.3rem; font-weight: 700; color: #bfefff; }
/* v2.0-b.28: ปุ่มราคาแพ็กเกจอยู่บรรทัดเดียวกันทุกการ์ด */
.ptpacks { align-items: stretch; }
.ptpack > button { margin-top: auto; width: 100%; min-height: 40px; }
/* v2.0-b.28: ร้าน Platinum แบบย่อ — จบในหน้าเดียว */
.ptshop { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 6px; }
.ptrow { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(40, 110, 160, .16), var(--panel-2) 70%); border: 1px solid rgba(120, 220, 255, .22); border-left: 3px solid #7fdcff; }
.ptimg { width: 46px; height: 46px; object-fit: contain; border-radius: 8px; background: rgba(0, 0, 0, .35); }
.ptemoji { display: grid; place-items: center; font-size: 1.6rem; }
.ptinfo { min-width: 0; }
.ptname { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptdesc { font-size: .76rem; color: #c6ced2; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptbuyc { display: flex; align-items: center; gap: 6px; }
.ptbuyc .qstep { width: 92px; grid-template-columns: 26px 1fr 26px; }
.ptbuyc .pchip { min-width: 88px; white-space: nowrap; }
.ptunit { font-size: .74rem; font-weight: 400; color: #9fe8ff; }
.qstep { display: grid; grid-template-columns: 30px 1fr 30px; gap: 3px; }
.qstep input { width: 100%; min-width: 0; text-align: center; padding: 3px 2px; -moz-appearance: textfield; }
.qstep input::-webkit-outer-spin-button, .qstep input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qstep .mini { padding: 3px 0; }
.ptbuyc .pchip { padding: 5px 6px; font-size: .82rem; }
@media (max-width: 560px) {
  .ptshop { grid-template-columns: 1fr; gap: 6px; }
  .ptrow { grid-template-columns: 40px 1fr 112px; gap: 8px; padding: 6px 8px; }
  .ptimg { width: 40px; height: 40px; }
  .ptdesc { -webkit-line-clamp: 1; }
  .ptbuyc { flex-direction: column; align-items: stretch; gap: 3px; }
  .ptbuyc .qstep { width: 100%; }
  .ptbuyc .pchip { min-width: 0; }
  .ptdesc { font-size: .74rem; }
}
.tag.pt { border-color: #7fdcff; color: #9fe8ff; }
.stone.ptitem { border-left-color: #7fdcff; background: linear-gradient(135deg, rgba(40, 110, 160, .22), var(--panel-2) 60%); }
#renameInput { width: 140px; margin-right: 6px; }
td.ok { color: #8fdc93; } td.bad, .bad { color: #ff8f8f; }

/* ---------- v0.9: โครงหน้าใหม่ (ซ้าย เมนู/ตัวละคร · กลาง เนื้อหา · ขวา สถานะ) ---------- */
main.wide { max-width: 1480px; padding-top: 18px; }
.gpanel:has(.glayout) { padding: 0; background: transparent; border: 0; box-shadow: none; }
.glayout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.gsideL, .gsideR { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; }
.gmain { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius, 14px); padding: 16px 18px; }
.ccard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; }
.ccard .timg { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; margin: 0 auto 6px; display: block; }
.ccard .gname { font-size: 1.15rem; font-weight: 700; margin: 2px 0 4px; }
.ccard .lv { color: var(--gold); font-weight: 700; }
.bars.v { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 10px 0 4px; text-align: left; font-size: .85rem; }
.tuinfo { margin-bottom: 8px; }
.cstats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; font-size: .82rem; background: rgba(0, 0, 0, .2); border-radius: 8px; padding: 6px; }
.cstats span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cboost { margin-top: 6px; font-size: .8rem; display: flex; flex-direction: column; gap: 2px; }
.vnav { display: flex; flex-direction: column; gap: 10px; margin: 0; border: 0; overflow: visible; }
.navgroup { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; }
.navhead { font-size: .75rem; letter-spacing: .06em; color: var(--muted); padding: 4px 8px 6px; text-transform: uppercase; }
.vnav button { text-align: left; padding: 8px 10px; border: 0; border-left: 3px solid transparent; border-radius: 6px; background: none; color: var(--text, #e8e2d0); display: flex; justify-content: space-between; align-items: center; }
.vnav button:hover { background: rgba(255, 255, 255, .05); }
.vnav button.active { color: var(--gold); border-left-color: var(--gold); background: rgba(217, 180, 90, .1); border-bottom: 0; }
button.wide { width: 100%; }
.spanel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.spanel h4 { margin: 0 0 8px; font-size: .9rem; color: var(--gold); }
.srow { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.srow span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spanel .mini { margin-top: 8px; width: 100%; }
.gmain .ptsalert { margin: 0 0 12px; }
@media (max-width: 1250px) {
  .glayout { grid-template-columns: 240px minmax(0, 1fr); }
  .gsideR { grid-column: 1 / -1; position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .gsideR .spanel { flex: 1 1 200px; }
}
@media (max-width: 860px) {
  .glayout { grid-template-columns: 1fr; }
  .gsideL { position: static; max-height: none; }
  .ccard { display: grid; grid-template-columns: 80px 1fr; text-align: left; gap: 4px 12px; }
  .ccard .timg { width: 80px; height: 80px; grid-row: span 3; margin: 0; }
  .ccard .bars, .ccard .tuinfo, .ccard .cstats, .ccard .cboost { grid-column: 1 / -1; }
  .vnav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .navgroup { flex-direction: row; flex: none; }
  .navhead { display: none; }
  .vnav button { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; }
  .vnav button.active { border-bottom-color: var(--gold); }
}
.tuup { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08); }
.big2 { font-size: 1.25rem; font-weight: 700; color: var(--gold); }

/* ---------- v0.9.1: การ์ดสินค้ามีภาพ (Item Mall / Platinum) ---------- */
.icards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.icard { position: relative; min-height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid #7fdcff;
  background: linear-gradient(135deg, #1d2236, #141a1d 70%); box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.icard::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 56%; background: var(--art) right center / contain no-repeat; pointer-events: none; }
.icard.mall { border-left-color: #ff7ae0; background: linear-gradient(135deg, #202b31, #141a1d 70%); }
.ibody { position: relative; z-index: 1; padding: 14px 16px; max-width: 62%; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.iname { font-weight: 700; font-size: 1.02rem; }
.iown { font-size: .75rem; font-weight: 400; color: var(--muted); }
.idesc { font-size: .84rem; color: #c6ced2; line-height: 1.45; text-shadow: 0 1px 2px #000; }
.iact { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: 7px 12px; font-weight: 700; color: #e8f6ff; }
.pchip.pt { color: #9fe8ff; } .pchip.bp { color: #ff9be8; } .pchip.ghostc { font-weight: 400; color: var(--muted); }
.pchip:hover:not(:disabled) { border-color: var(--gold); }
.pchip:disabled { opacity: .45; }
.bpbanner { background: linear-gradient(135deg, rgba(160, 60, 140, .2), var(--panel-2) 60%); border: 1px solid rgba(255, 120, 220, .3); }

/* ---------- v0.9.1: หน้าอุปกรณ์แบบการ์ดภาพ ---------- */
.eqtop2 { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.eqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.eqbig, .eqdetail { position: relative; overflow: hidden; min-height: 150px; border-radius: 10px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--rc, #555) 45%, #222);
  background: radial-gradient(ellipse at 85% 50%, color-mix(in srgb, var(--rc, #555) 30%, transparent), transparent 60%), linear-gradient(135deg, #1b2124, #111618); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 4px 16px rgba(0, 0, 0, .35); }
.eqbig::after, .eqdetail::after { content: ''; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 46%; height: 92%; background: var(--eart) center / contain no-repeat;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--rc, #555) 60%, transparent)); -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); pointer-events: none; }
.eqbig > *, .eqdetail > * { position: relative; z-index: 1; max-width: 64%; }
.eqbig.empty { display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--muted); border-style: dashed; }
.eqbig.empty > * { max-width: none; }
.eqlabel { font-size: .78rem; color: var(--muted); }
.eqtitle { font-weight: 700; font-size: 1.05rem; color: var(--rc, #ddd); margin: 2px 0 4px; text-shadow: 0 1px 3px #000; }
.eqstats { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .86rem; margin: 6px 0; }
.eqstats .eqs { background: none; padding: 0; color: #f0d79a; }
.eqbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.eqbag { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 8px; }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.etile { position: relative; aspect-ratio: 1; padding: 0; border-radius: 8px; border: 2px solid color-mix(in srgb, var(--rc, #444) 80%, #000); background: radial-gradient(circle, color-mix(in srgb, var(--rc, #444) 25%, #14191b), #0f1214); overflow: hidden; }
.etile.none { border: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .3); }
.etile.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.etile .eimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.eslot { position: absolute; left: 2px; top: 1px; font-size: .72rem; filter: drop-shadow(0 0 2px #000); }
.eplus { position: absolute; right: 3px; bottom: 1px; font-size: .72rem; font-weight: 700; color: #ffd166; text-shadow: 0 0 3px #000; }
@media (max-width: 1000px) { .eqtop2, .eqbag { grid-template-columns: 1fr; } }

/* ---------- v0.9.1: หน้าเควสยศ ---------- */
.ranks2 { display: flex; flex-direction: column; gap: 14px; }
.rankcard2 { border-radius: 12px; border: 1px solid rgba(217, 180, 90, .25); background: linear-gradient(160deg, #1d2529, #13181a 60%); overflow: hidden; }
.rankcard2.r-owned { border-color: rgba(120, 200, 120, .45); background: linear-gradient(160deg, #23261d, #13181a 60%); }
.rankcard2.r-open { border-color: var(--gold); box-shadow: 0 0 18px rgba(217, 180, 90, .18); }
.rankcard2.r-locked, .rankcard2.r-next { opacity: .82; }
.rhead2 { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .2); }
.rname2 { font-size: 1.15rem; font-weight: 700; color: var(--gold); }
.rstate2 { font-size: .82rem; padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .15); }
.rstate2.owned { border-color: #6fbf73; color: #8fdc93; } .rstate2.open { border-color: var(--gold); color: var(--gold); }
.rbody2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.rbody2 h5 { margin: 0 0 8px; font-size: .82rem; color: var(--muted); font-weight: 400; }
.rperks { padding: 12px 16px; border-right: 1px solid rgba(255, 255, 255, .06); }
.perkgrid { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; font-size: .86rem; color: #f0d79a; }
.perkgrid b { color: #ffe3a3; }
.rquest { padding: 12px 16px; }
.qrow2 { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.qrow2.done .qtxt b { color: #8fdc93; }
.qthumbs { display: flex; gap: 4px; }
.qthumbs img, .qthumbs .mimg { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12); background: #0c0f11; }
.qtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qtxt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 3px; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, #a07a2a, var(--gold)); }
.qrow2.done .qbar i { background: #6fbf73; }
.qnum { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.qnum small { color: var(--muted); font-weight: 400; }
.roffer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (max-width: 900px) { .rbody2 { grid-template-columns: 1fr; } .rperks { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); } }

/* =====================================================================
   v0.9.2 ธีมหินดำ + กรอบโลหะ (ตามภาพตัวอย่าง) · ภาพพื้นผิว/กรอบ: art/build_ui_theme.py
   ===================================================================== */
:root {
  --panel: #23282b; --panel-2: #2a3033; --line: #4a5155; --bg: #121517;
  --text: #ece9e2; --muted: #a3a7a6; --gold: #e2bc6a;
  --stone: url('/img/ui/theme/stone.webp');
  --fr-silver: url('/img/ui/theme/frame_silver.png');
  --fr-violet: url('/img/ui/theme/frame_violet.png');
  --fr-bronze: url('/img/ui/theme/frame_bronze.png');
  --fr-btn: url('/img/ui/theme/frame_btn.png');
  --fr-btn-gold: url('/img/ui/theme/frame_btn_gold.png');
}
html { background: #101315; }
body { background: radial-gradient(ellipse at 50% 0%, rgba(80, 90, 95, .18), transparent 60%), radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .7), transparent 60%), url('/img/ui/theme/slate.webp') #15181a; background-attachment: fixed; }
.topbar { background: linear-gradient(180deg, rgba(20, 23, 25, .96), rgba(14, 16, 18, .92)); border-bottom: 2px solid #3d4448; box-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
h1, h2, h3, h4 { color: var(--gold); text-shadow: 0 2px 3px rgba(0, 0, 0, .8); }

/* แผงหิน + กรอบโลหะ */
.panel, .gmain, .spanel, .panel2, .ccard, .navgroup, .raidhead {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .25)), var(--stone) #262b2e;
  border: 12px solid transparent; border-image: var(--fr-silver) 20 stretch; border-radius: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .55), inset 0 0 30px rgba(0, 0, 0, .55);
}
.gpanel:has(.glayout) { background: transparent; border: 0; border-image: none; box-shadow: none; padding: 0; }
.gmain { padding: 16px 18px; }
.ccard { border-image-source: var(--fr-violet); background: radial-gradient(ellipse at 50% 0%, rgba(140, 70, 220, .28), transparent 70%), linear-gradient(180deg, rgba(37, 67, 82, .35), rgba(0, 0, 0, .3)), var(--stone) #272d30;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .6), inset 0 0 26px rgba(120, 60, 200, .35); }
.navgroup { border-image-source: var(--fr-bronze); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .35)), var(--stone) #23211d; }
.spanel h4 { font-size: 1.05rem; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); padding-bottom: 6px; }
.srow { border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: .92rem; padding: 6px 0; }
.srow span { color: #c8ccca; } .srow b { color: #fff; font-size: 1rem; }
.navhead { color: #b8a27a; font-size: .8rem; }
.vnav button { color: #e6e2d8; font-size: .98rem; padding: 9px 10px; }
.vnav button.active { background: linear-gradient(90deg, rgba(226, 188, 106, .28), rgba(226, 188, 106, .06)); border-left-color: var(--gold); color: #ffe2a3; box-shadow: inset 0 0 0 1px rgba(226, 188, 106, .35); }
.badge-n { background: #f2c94c; color: #1b1408; border-radius: 10px; padding: 0 7px; font-weight: 700; }

/* ปุ่มหินกรอบโลหะ */
.mini, .ghost, .pchip, .spanel .mini, button.big:not(.primary), .mpick, .mnav button, .actions button:not(.primary) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .25)), url('/img/ui/theme/btn.webp') #3a3f42; color: #eceae4;
  border: 6px solid transparent; border-image: var(--fr-btn) 7 stretch; border-radius: 0; text-shadow: 0 1px 2px #000;
}
.primary, .mini.primary, .pchip.pt, .pchip.bp {
  background: linear-gradient(180deg, #e9c877, #a97f2e); color: #1d1406; text-shadow: none;
  border: 6px solid transparent; border-image: var(--fr-btn-gold) 7 stretch; border-radius: 0;
}
.pchip.pt { background: linear-gradient(180deg, #2b4f66, #15293a); color: #bfefff; }
.pchip.bp { background: linear-gradient(180deg, #5a2c55, #2c142a); color: #ffc2f0; }
.mini:hover:not(:disabled), .ghost:hover:not(:disabled), .pchip:hover:not(:disabled) { filter: brightness(1.18); }
.primary:hover:not(:disabled) { filter: brightness(1.1); }
button.alt { background: linear-gradient(180deg, #8a2b2b, #4a1212); color: #fff; border: 6px solid transparent; border-image: var(--fr-btn) 7 stretch; }

/* การ์ด/หลอดค่า */
.bar .track { background: #0b0d0e; border: 1px solid #000; height: 9px; border-radius: 6px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .9); }
.fill { border-radius: 6px; box-shadow: 0 0 8px currentColor; }
.fill.hp { background: linear-gradient(90deg, #b83434, #ff6a6a); color: rgba(255, 80, 80, .5); }
.fill.sp { background: linear-gradient(90deg, #2d6ad1, #6fc4ff); color: rgba(90, 170, 255, .5); }
.fill.exp { background: linear-gradient(90deg, #2c9a3a, #7ee08a); color: rgba(120, 220, 120, .4); }
.fill.tu { background: linear-gradient(90deg, #b88d22, #ffe07a); color: rgba(255, 220, 110, .45); }
.cstats { background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .06); font-size: .9rem; }
.ccard .gname { font-size: 1.3rem; text-shadow: 0 2px 4px #000; }
.stone, .icard, .eqbig, .eqdetail, .rankcard2, .rtower, .abox, .skill, .skpath, .qrow { box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.stone, .skill, .abox, .rtower { background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .3)), var(--stone) #262b2e; border-color: #3d4448; }
input, select { background: #0f1213 !important; border: 1px solid #4a5155 !important; color: var(--text); }
.toast { background: linear-gradient(180deg, #2b3134, #1b1f21); border: 2px solid #59615f; box-shadow: 0 8px 26px rgba(0, 0, 0, .7); }
.toast.ok { border-color: #6fbf73; } .toast.err { border-color: #d65a5a; }
.ptsalert { background: linear-gradient(90deg, rgba(226, 188, 106, .18), rgba(0, 0, 0, .2)); border: 1px solid rgba(226, 188, 106, .5); color: #ffe2a3; }
.gsideL, .gsideR { gap: 14px; }
.cstats { font-size: .8rem; gap: 4px 2px; padding: 6px 4px; }
.cstats span { overflow: visible; text-overflow: clip; }
.glayout { grid-template-columns: 262px minmax(0, 1fr) 236px; }

/* ---------- v1.0: World Boss ---------- */
.wbhero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: center; }
.wbart { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(200, 60, 40, .35), rgba(0, 0, 0, .85) 70%); border: 2px solid #5a2a22; box-shadow: inset 0 0 40px #000; }
.wb-hydra .wbart { background: radial-gradient(circle at 50% 45%, rgba(60, 200, 90, .35), rgba(0, 0, 0, .85) 70%); border-color: #2a5a32; }
.wb-griffin .wbart { background: radial-gradient(circle at 50% 45%, rgba(230, 200, 90, .35), rgba(0, 0, 0, .85) 70%); border-color: #6a5a22; }
.wbart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.wbicon { font-size: 6rem; filter: drop-shadow(0 0 18px rgba(255, 120, 60, .7)); }
.wbart.sm { width: 64px; height: 64px; flex: none; } .wbart.sm .wbicon { font-size: 2.2rem; }
.wbhp { position: relative; height: 26px; background: #0b0d0e; border: 1px solid #000; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; box-shadow: inset 0 2px 4px #000; }
.wbhp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8a1c1c, #ff4d3a); box-shadow: 0 0 14px rgba(255, 70, 50, .6); }
.wbhp span { position: relative; z-index: 1; display: block; text-align: center; line-height: 26px; font-weight: 700; text-shadow: 0 1px 3px #000; font-size: .9rem; }
.wbstatus { font-size: .9rem; color: #f0d79a; }
.wbgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.srow.me span, .srow.me b { color: var(--gold); }
.wbrw { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.petcard { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; margin-top: 8px; }
.petcard.on { border-color: var(--gold); box-shadow: 0 0 12px rgba(226, 188, 106, .25); }
.petcard > div { flex: 1; }
.toggle.dim { opacity: .5; }
@media (max-width: 800px) { .wbhero { grid-template-columns: 1fr; } .wbart:not(.sm) { max-width: 240px; } }

/* ---------- v1.0: หน้าทักษะแบบสมุดเวท (กระดาษเก่า · ภาพประกอบ · โซ่ล็อก) ---------- */
.skbook { margin-top: 12px; padding: 14px; border: 14px solid transparent; border-image: var(--fr-bronze) 20 stretch;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(60, 40, 20, .45)), url('/img/ui/theme/parchment.webp'); box-shadow: 0 8px 26px rgba(0, 0, 0, .6); }
.sksec { margin-bottom: 18px; }
.skbanner { display: inline-block; margin: 0 0 10px -14px; padding: 6px 28px 6px 16px; font-family: Georgia, "Noto Serif Thai", serif; font-size: 1.15rem; color: #f3e4c0;
  background: linear-gradient(90deg, rgba(40, 30, 22, .92), rgba(40, 30, 22, .65) 75%, transparent); text-shadow: 0 1px 2px #000; }
.skbanner span { font-size: .8rem; color: #cbb892; font-family: inherit; }
.skgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.skc { position: relative; overflow: hidden; min-height: 150px; border: 2px solid #8a6a36; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 220, 150, .15);
  background: linear-gradient(90deg, #1b1712 45%, rgba(27, 23, 18, .2)), #15120e; }
.skc::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 58%; background: var(--skart) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%); mask-image: linear-gradient(90deg, transparent, #000 45%); opacity: .9; pointer-events: none; }
.skc[data-own="0"]::after { background-size: 135%; filter: saturate(1.1) brightness(.9); }
.skc.locked::after { filter: grayscale(.6) brightness(.55); }
.skc-body { position: relative; z-index: 1; padding: 10px 12px; max-width: 70%; display: flex; flex-direction: column; gap: 4px; }
.skc-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.skc-head b { color: #f4ead2; font-size: 1.02rem; text-shadow: 0 1px 2px #000; }
.lvtag { color: #e2bc6a; font-size: .8rem; font-weight: 400; }
.skc .pips i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 2px; background: #2a2620; border: 1px solid #6a5a3a; }
.skc .pips i.on { background: radial-gradient(circle at 35% 35%, #fff2b0, #e2bc6a 60%, #8a6a20); border-color: #ffd97a; box-shadow: 0 0 6px rgba(255, 210, 110, .7); }
.skc-desc { font-size: .84rem; color: #d8ccb2; text-shadow: 0 1px 2px #000; }
.skc .sknow { color: #9fe39a; font-size: .86rem; } .skc .sknext { color: #e8d39a; font-size: .82rem; }
.skc .reqs { display: flex; flex-wrap: wrap; gap: 4px; }
.skc .req { font-size: .74rem; padding: 1px 6px; border-radius: 4px; border: 1px solid; background: rgba(0, 0, 0, .45); }
.skc .req.ok { color: #9fe39a; border-color: #4f8a4a; } .skc .req.bad { color: #ff9a8a; border-color: #8a3a32; }
.skc button { align-self: flex-start; margin-top: 4px; }
.skc.maxed { border-color: #c9a24a; } .skc.ready { border-color: #e2bc6a; box-shadow: 0 0 12px rgba(226, 188, 106, .35); }
.skpaths2 { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.skor2 { align-self: center; font-weight: 700; color: #3a2a18; text-shadow: 0 1px 0 rgba(255, 255, 255, .3); }
.skpath2 { position: relative; padding: 12px; border-radius: 8px; background: linear-gradient(180deg, rgba(20, 22, 18, .92), rgba(20, 18, 14, .88)); border: 2px solid #5a4a30; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.skpath2.chosen { border-color: #c8e26a; box-shadow: 0 0 0 2px rgba(200, 226, 106, .35), 0 0 22px rgba(200, 226, 106, .35); }
.skpath2 .skpathhead b { color: #f3e4c0; font-size: 1.05rem; }
.skpath2 .skpathhead .req { margin-left: 6px; font-size: .75rem; padding: 1px 6px; border-radius: 4px; border: 1px solid; }
.skpath2 .req.ok { color: #c8e26a; border-color: #8aa03a; } .skpath2 .req.bad { color: #ff9a8a; border-color: #8a3a32; }
.skbonus { color: #e8d9b5; margin: 4px 0 8px; }
.skcol { display: flex; flex-direction: column; gap: 10px; }
.skpath2.locked > *:not(.chainlock) { filter: grayscale(.7) brightness(.55); }
.chainlock { position: absolute; inset: 0; background: url('/img/ui/theme/chains.png') center / 100% 100% no-repeat; pointer-events: none; z-index: 3; opacity: .92; }
.skult { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: end; }
.skhero { width: 220px; max-height: 240px; object-fit: contain; filter: drop-shadow(0 0 22px rgba(150, 80, 230, .55)); }
.skc.ultc { border-color: #a070e0; }
@media (max-width: 900px) { .skpaths2 { grid-template-columns: 1fr; } .skor2 { text-align: center; } .skult { grid-template-columns: 1fr; } .skhero { display: none; } }
.wbgrid .srow { align-items: flex-start; }
.wbgrid .srow span { flex: 0 0 auto; max-width: 48%; white-space: normal; }
.wbgrid .srow b { text-align: right; font-size: .88rem; }

/* ---------- v1.0.1: World Boss ภาพจริง + ประกาศบนสุด ---------- */
.wbhero2 { padding: 0 !important; overflow: hidden; }
.wbbanner { position: relative; aspect-ratio: 1408 / 620; max-height: 460px; width: 100%; background: var(--wbimg) center 30% / cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; }
.wbbanner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 25%, transparent 50%, rgba(10, 8, 6, .92)); }
.wbhero2.dead .wbbanner { filter: grayscale(.75) brightness(.7); }
.wbtag { position: absolute; top: 10px; left: 14px; z-index: 1; font-size: .8rem; color: #f3e4c0; letter-spacing: .08em; text-shadow: 0 1px 3px #000; }
.wbdead { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-6deg); z-index: 1; font-size: 2.2rem; font-weight: 800; color: #ffdfd0; border: 4px solid #ffdfd0; padding: 6px 22px; border-radius: 8px; text-shadow: 0 2px 6px #000; background: rgba(60, 10, 10, .45); }
.wbtitle { position: relative; z-index: 1; padding: 14px 18px; }
.wbtitle h2 { margin: 0; font-size: 1.7rem; color: #ffe2a3; text-shadow: 0 2px 6px #000; }
.wbtitle h2 span { font-size: .9rem; color: #d8ccb2; font-family: inherit; }
.wbtitle p { margin: 4px 0 0; font-size: .9rem; color: #e8dcc2; text-shadow: 0 1px 3px #000; }
.wbhero2 .wbinfo { padding: 10px 16px 14px; }
.wbart img { object-fit: cover; }
#wbBanner { position: sticky; top: 52px; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; font-size: .95rem;
  border-bottom: 2px solid #000; box-shadow: 0 4px 16px rgba(0, 0, 0, .6); text-shadow: 0 1px 2px #000; }

#wbBanner.alive { background: linear-gradient(90deg, #3a0c08, #7a1d10 30%, #7a1d10 70%, #3a0c08); color: #ffe7d0; animation: wbpulse 2s ease-in-out infinite; }
#wbBanner.killed { background: linear-gradient(90deg, #1d1a12, #3d3420 50%, #1d1a12); color: #f3e4c0; }
#wbBanner.expired { background: linear-gradient(90deg, #15171a, #2a2e33 50%, #15171a); color: #c8ccd0; }
.wbb-t { font-weight: 800; letter-spacing: .04em; }
#wbBanner.alive .wbb-t { color: #ffd166; }
@keyframes wbpulse { 0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, .6); } 50% { box-shadow: 0 4px 26px rgba(255, 80, 40, .55); } }

/* ---------- v1.0.2: ไอคอน World Boss จากภาพของเจ้าของโปรเจกต์ ---------- */
.wbico { display: inline-block; vertical-align: middle; border-radius: 50%; object-fit: cover; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .7)); }
.wbico.nav { width: 22px; height: 22px; margin: -3px 2px 0 0; }
.wbico.h { width: 24px; height: 24px; margin-top: -3px; }
.wbico.title { width: 54px; height: 54px; margin: -8px 4px 0 0; }
.wbico.pet { width: 64px; height: 64px; flex: none; }
#wbBanner .wbico.ban { width: 38px; height: 38px; border: 0; }

/* ---------- v1.1.0: กระดานประกาศสด World Boss + ตารางรางวัลตามอันดับ ---------- */
.wblive { margin: 12px 0; }
.lvhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.lvhead h4 { margin: 0; }
.livedot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff4a3a; box-shadow: 0 0 8px #ff4a3a; animation: wbpulse2 1.2s infinite; vertical-align: middle; }
@keyframes wbpulse2 { 50% { opacity: .3; } }
.lvgrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 10px; }
.lvgrid h5 { margin: 0 0 6px; color: var(--gold); font-size: .9rem; }
.lvrow { display: grid; grid-template-columns: 28px minmax(80px, 1fr) 1.2fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .05); }
.lvrow small { grid-column: 2 / 5; font-size: .72rem; }
.lvrow.me { border-color: var(--gold); }
.lvrow.r1 { background: linear-gradient(90deg, rgba(226, 188, 106, .22), rgba(0, 0, 0, .2)); }
.lvrow.r2 { background: linear-gradient(90deg, rgba(200, 205, 215, .16), rgba(0, 0, 0, .2)); }
.lvrow.r3 { background: linear-gradient(90deg, rgba(190, 120, 70, .18), rgba(0, 0, 0, .2)); }
.lvrank { font-size: 1.1rem; text-align: center; font-weight: 800; color: #d8ccb2; }
.lvname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvbar { height: 8px; background: #1a1612; border-radius: 4px; overflow: hidden; }
.lvbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a2a1a, #e2643a); }
.lvfeedbox { max-height: 260px; overflow: auto; }
.lvfeed { padding: 4px 6px; border-bottom: 1px dashed rgba(255, 255, 255, .06); font-size: .86rem; }
.lvfeed.kill { background: rgba(140, 30, 20, .35); border-radius: 4px; }
.lvresults { margin-top: 10px; padding: 10px; border: 1px solid #6a5226; border-radius: 8px; background: rgba(40, 28, 10, .45); }
.lvresults h4 { margin: 0 0 6px; }
.lvres { padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.lvres.lh { background: linear-gradient(90deg, rgba(90, 140, 255, .18), transparent); padding: 6px 8px; border-radius: 6px; }
.lvres .drop { margin: 2px 2px 0 0; }
.tiny { font-size: .72rem; }
.lastHitBox { padding: 8px 10px; border-radius: 6px; background: linear-gradient(90deg, rgba(90, 140, 255, .18), rgba(0, 0, 0, .2)); border: 1px solid rgba(120, 160, 255, .35); margin-bottom: 8px; font-size: .88rem; }
.wbrt { width: 100%; border-collapse: collapse; font-size: .82rem; }
.wbrt th, .wbrt td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-align: center; vertical-align: top; }
.wbrt th { color: var(--gold); font-weight: 600; font-size: .76rem; }
.wbrt td:first-child { text-align: left; white-space: nowrap; font-weight: 700; }
.wbrt tr.top1 td { background: rgba(226, 188, 106, .1); }
.wbrewards { grid-column: 1 / -1; }
@media (max-width: 800px) { .lvgrid { grid-template-columns: 1fr; } .wbrt { font-size: .72rem; } }

/* ---------- v1.2: สุ่ม TU ---------- */
.tulot { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.tulot .tl { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 4px 6px; border-radius: 6px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); }
.tulot .tl small { font-size: .7rem; color: #a99; }
.tulot .tl.mid { border-color: #6a5a9a; } .tulot .tl.hi { border-color: var(--gold); box-shadow: 0 0 8px rgba(226, 188, 106, .25); }

/* ---------- v1.2: ไกด์มือใหม่ ---------- */
.guidecard { margin-bottom: 12px; padding: 10px 12px; border: 2px solid #8a6a36; border-radius: 8px; background: linear-gradient(180deg, rgba(60, 44, 18, .75), rgba(24, 18, 10, .85)); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.ghead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.gbar { flex: 1; min-width: 80px; height: 8px; background: #1a1612; border-radius: 4px; overflow: hidden; display: block; }
.gbar.wide { margin: 6px 0 12px; height: 10px; }
.gbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a20, #ffd97a); }
.gstep { display: flex; gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 8px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .07); }
.gstep.done { opacity: .62; }
.gstep.big { background: rgba(0, 0, 0, .2); border: 0; margin: 0; padding: 4px 2px; }
.gico { font-size: 1.6rem; line-height: 1; }
.gbody { flex: 1; }
.gbody b { color: #ffe2a3; }
.gtext { font-size: .9rem; color: #e1d6bd; margin: 3px 0 6px; line-height: 1.55; }
.gtext b { color: #fff0c8; }
.guidepage h3 { margin-top: 16px; }

/* ---------- v2.0-a: ป้ายหมวดเวท ---------- */
.stags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.stag { font-size: .7rem; padding: 1px 7px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); color: #cfc6b0; white-space: nowrap; }
.stag.rar.tier2 { color: #7fc8ff; border-color: #3f6f96; } .stag.rar.tier3 { color: #ffb86b; border-color: #96622f; }
.stag.rar.tier4 { color: #ff8be0; border-color: #96407f; } .stag.rar.tier5 { color: #ffe27a; border-color: #a08a2c; }
.stag.core { color: #9aa; }
.stag.path.in { color: #a6f0a0; border-color: #4c9a48; background: rgba(40, 90, 40, .35); }
.stag.path.off { color: #ff9c8c; border-color: #9a4a40; background: rgba(90, 30, 25, .35); }

/* ---------- v2.0-b: คลังเวท (ค้นหา/กรอง/เรียง) · เวท↔สกิล · Skill Tree ---------- */
.libbar { display: grid; gap: 6px; margin: 8px 0 12px; padding: 10px; border-radius: 8px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); }
.libbar input { width: 100%; padding: 7px 10px; border-radius: 6px; border: 1px solid #4a4334; background: #14110d; color: #eadfc6; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chips > .muted { min-width: 68px; }
.chip { font-size: .78rem; padding: 3px 10px; border-radius: 12px; border: 1px solid #4a4334; background: #1b1712; color: #cfc6b0; cursor: pointer; }
.chip:hover { border-color: #8a6a36; }
.chip.on { background: linear-gradient(180deg, #8a6a20, #5c4513); color: #fff3d0; border-color: #e2bc6a; }
#libCount { margin-left: auto; }
.sksyn { margin-top: 5px; font-size: .74rem; color: #b9ae96; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sklink { font-size: .72rem; padding: 1px 7px; border-radius: 10px; border: 1px dashed #5a5140; background: transparent; color: #a99f88; cursor: pointer; }
.sklink.on { border-style: solid; border-color: #4c9a48; color: #a6f0a0; background: rgba(40, 90, 40, .3); }
.sklink:hover { color: #fff; border-color: #e2bc6a; }
.sktree { overflow-x: auto; }
.sktree svg { min-width: 760px; display: block; }
.sktree .th { fill: #e2bc6a; font-size: 13px; font-weight: 700; }
.sktree .tlv { fill: #6f6756; font-size: 10px; } .sktree .tlv.ok { fill: #b9ae96; }
.sktree .tl { stroke: rgba(255, 255, 255, .05); }
.sktree .te { fill: none; stroke: #5a5140; stroke-width: 1.6; stroke-dasharray: 4 3; } .sktree .te.met { stroke: #6fbf6a; stroke-dasharray: none; }
.sktree .tn { cursor: pointer; } .sktree .tn text { font-size: 11.5px; fill: #cfc6b0; pointer-events: none; } .sktree .tn .tr { font-size: 10px; fill: #9a917c; }
.sktree .tn rect { fill: #1b1712; stroke: #4a4334; stroke-width: 1.3; }
.sktree .tn.ready rect { stroke: #e2bc6a; fill: #2c2414; } .sktree .tn.ready text { fill: #ffe2a3; }
.sktree .tn.learned rect { stroke: #4c9a48; fill: #17261a; } .sktree .tn.learned text { fill: #c6f3c2; }
.sktree .tn.maxed rect { stroke: #7fd0ff; fill: #14222c; } .sktree .tn.maxed text { fill: #cfeeff; }
.sktree .tn.branch rect { stroke: #7a3a32; fill: #1f1412; } .sktree .tn.branch text { fill: #8a6a64; }
.sktree .tn:hover rect { stroke-width: 2.4; }
.tlegend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tlegend .n { display: inline-block; width: 14px; height: 10px; border-radius: 3px; border: 1.5px solid #4a4334; background: #1b1712; margin-right: 3px; }
.tlegend .n.ready { border-color: #e2bc6a; } .tlegend .n.learned { border-color: #4c9a48; } .tlegend .n.maxed { border-color: #7fd0ff; } .tlegend .n.branch { border-color: #7a3a32; }
.skc.flash { animation: skflash 1.4s ease-out; }
@keyframes skflash { 0% { box-shadow: 0 0 0 4px #ffd97a; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- v2.0-b.1: แลกหินเวท ---------- */
.xpanel { margin: 14px 0; }
.xrow { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border-radius: 8px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .07); flex-wrap: wrap; }
.xinfo { flex: 1; min-width: 240px; }
.xodds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.xo { font-size: .72rem; padding: 1px 7px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .12); color: #cfc6b0; }
.xo.tier2 { color: #7fc8ff; } .xo.tier3 { color: #ffb86b; } .xo.tier4 { color: #ff8be0; } .xo.tier5 { color: #ffe27a; border-color: #a08a2c; }
.xres { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border-radius: 8px; border: 2px solid #e2bc6a; background: rgba(60, 44, 18, .6); }

/* ===== v2.0-b.8: มือถือ / จอแคบ ===== */
@media (max-width: 1250px) {
  .glayout { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  html, body { overflow-x: clip; }
  .glayout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .gsideL, .gsideR { position: static; max-height: none; overflow: visible; }
  .gsideL { display: contents; }
  /* ลำดับบนมือถือ: การ์ดตัวละคร → เมนู (ติดขอบบน) → เนื้อหา → แผงสถานะ */
  .gsideL > .ccard { order: 1; }
  .gsideL > .vnav { order: 2; }
  .glayout > .gmain { order: 3; }
  .gsideR { order: 4; flex-direction: row; flex-wrap: wrap; }
  .gsideR .spanel { flex: 1 1 260px; }
  .gsideL > [data-back] { order: 5; }
  .vnav { position: sticky; top: 0; z-index: 7; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px; margin: 0 -2px;
    background: rgba(16, 18, 20, .96); border-bottom: 1px solid #3d4448; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
  .vnav::-webkit-scrollbar { display: none; }
  .navgroup { flex-direction: row; flex: none; padding: 2px 4px; gap: 2px; border-image: none; border: 1px solid #4a4436; border-radius: 10px; }
  .navhead { display: none; }
  .vnav button { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; font-size: .9rem; padding: 7px 9px; }
  .vnav button.active { border-bottom-color: var(--gold); border-left-color: transparent; }
  #wbBanner { top: 0; }
  #battle { scroll-margin-top: 64px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { padding: 6px 10px; gap: 8px; flex-wrap: nowrap; }
  .brand { font-size: .92rem; white-space: nowrap; }
  .world { font-size: .68rem; flex: 1; text-align: right; line-height: 1.2; }
  #logoutBtn { font-size: .78rem; white-space: nowrap; padding: 4px 6px; }
  #wbBanner .wbb-t, #wbBanner .wbb-d { display: none; }
  #wbBanner.killed .wbb-t, #wbBanner.expired .wbb-t { display: inline; font-size: .78rem; }
  main, .app, .container { padding-left: 6px !important; padding-right: 6px !important; }
  .gpanel { padding: 8px; }
  .gmain { padding: 10px 10px; }
  /* การ์ดตัวละครแบบย่อ */
  .ccard { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 2px 10px; text-align: left; padding: 10px; border-image-width: 10px; border-image-outset: 0; }
  .ccard .timg { width: 58px; height: 58px; grid-row: span 2; margin: 0; }
  .ccard .gname { font-size: 1.05rem; }
  .ccard .bars, .ccard .tuinfo, .ccard .cstats, .ccard .cboost { grid-column: 1 / -1; }
  .ccard .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .ccard .bars * { font-size: .78rem; }
  .ccard .tuinfo { font-size: .72rem; }
  .cstats { grid-template-columns: repeat(6, auto) !important; font-size: .74rem; justify-content: space-between; padding: 4px; }
  /* World Boss แถบประกาศ */
  #wbBanner { font-size: .8rem; padding: 6px 8px; gap: 6px; }
  #wbBanner .wbico.ban { width: 26px; height: 26px; }
  #wbBanner button, #wbBanner .primary { padding: 4px 10px; font-size: .8rem; }
  /* เนื้อหา: ไม่ให้อะไรล้นจอ */
  .gmain img, .gmain svg, .gmain video { max-width: 100%; height: auto; }
  .gmain table { display: block; overflow-x: auto; white-space: nowrap; }
  .gmain pre { overflow-x: auto; }
  .gmain input, .gmain select { max-width: 100%; }
  .actions { flex-wrap: wrap; }
  .actions button, .actions .primary { flex: 1 1 auto; }
  h2 { font-size: 1.15rem; } h3 { font-size: 1.02rem; }
  .wbbanner { aspect-ratio: auto; min-height: 210px; }
  .wbbanner > *:not(.wbtitle) { font-size: .72rem; }
  .wbtitle { padding: 10px 12px; }
  .wbtag { position: relative; top: auto; left: auto; display: block; padding: 8px 12px 0; font-size: .7rem; }
  .wbbanner { justify-content: space-between; }
  .wbtitle h2 { font-size: 1.2rem; }
  .wbtitle p { font-size: .78rem; }
  .wbico.title { width: 36px; height: 36px; }
  dialog { width: 96%; max-width: 96vw; }
  /* หน้าเลือกหอคอย: การ์ดแนวนอน */
  .slot { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
  .slot > .timg { width: 96px; height: 96px; object-fit: cover; aspect-ratio: auto; }
  .slot .body { padding: 8px 8px 8px 0; }
  .slots { gap: 10px; grid-auto-rows: auto; }
  .slot { min-height: 0 !important; height: auto; }
  .slot img { padding: 4px; }
  .slot.empty { display: flex; min-height: 64px !important; padding: 12px; flex-direction: row; gap: 8px; }
}

/* ===== v2.0-b.9: แชท (หน้าหลัก) ===== */
.chatbox { display: flex; flex-direction: column; background: rgba(18, 20, 24, .92); border: 1px solid #3a3d44; border-radius: 12px; height: calc(100vh - 260px); min-height: 420px; }
.chattabs { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid #2f3238; flex-wrap: wrap; }
.chattabs button { background: transparent; border: 0; color: var(--muted); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; min-height: 40px; }
.chattabs button:hover { background: #24272d; color: var(--text); }
.chattabs button.active { background: #2b2618; color: #f3e2b0; font-weight: 600; }
.chattabs .sp { flex: 1; }
.chatlist { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chatempty { margin: auto; text-align: center; }
.cmsg { display: flex; gap: 10px; align-items: flex-start; }
.cmsg .cav { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: #111; flex: none; }
.cmsg .cbody { min-width: 0; flex: 1; }
.cmsg .chead { font-size: .85rem; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.cmsg .ctext { font-size: .98rem; line-height: 1.55; color: #e8e1d1; overflow-wrap: anywhere; white-space: pre-wrap; }
.cmsg.mine .ctext { color: #f3e7c4; }
.cmsg .cact { margin-left: auto; display: none; gap: 8px; }
.cmsg:hover .cact, .cmsg:focus-within .cact { display: inline-flex; }
.linkbtn { background: none; border: 0; padding: 0 2px; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--gold); }
.cmsg.sys { align-self: center; background: #241b10; border: 1px solid #5a4520; color: #f0d79a; font-size: .86rem; padding: 6px 14px; border-radius: 999px; gap: 8px; max-width: 92%; text-align: center; }
.cmsg.sys time { color: #a08a5c; font-size: .75rem; }
.chatform { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid #3a3424; background: #1d1a14; border-radius: 0 0 12px 12px; }
.chatform.ro { justify-content: center; }
.chatform .chatto { font-size: .82rem; color: #e3c26a; white-space: nowrap; }
.chatform input { flex: 1; min-width: 0; background: #0f1114; border: 1px solid #6a5a32; border-radius: 10px; padding: 11px 14px; color: var(--text); font: inherit; font-size: 1rem; }
.chatform input:focus { outline: 2px solid #c9a24e; outline-offset: 0; }
.chatform button { min-height: 44px; padding: 0 20px; }
.chatonline { max-height: 320px; overflow-y: auto; }
.conl { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .9rem; }
.conl span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conl .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #888; }
.t-dark-dot { background: var(--dark) !important; } .t-light-dot { background: var(--light) !important; } .t-fire-dot { background: var(--fire) !important; } .t-water-dot { background: var(--water) !important; }
.chatdock { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 14px; background: rgba(18, 20, 24, .92); border: 1px solid #3a3d44; border-radius: 12px; padding: 10px 14px; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.chatdock:hover { border-color: var(--gold); }
.chatdock b { color: var(--text); }
.chatdock .cdock-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mobileBar { display: none; }
#msheet { position: fixed; inset: 0; z-index: 60; }
#msheet .mshade { position: absolute; inset: 0; background: rgba(5, 6, 8, .62); }
#msheet .msheet { position: absolute; left: 0; right: 0; bottom: 0; background: #17191e; border-top: 1px solid #3a3424; border-radius: 18px 18px 0 0; padding: 8px 14px calc(78px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto; }
#msheet .mgrip { width: 40px; height: 4px; border-radius: 2px; background: #3a3d45; margin: 2px auto 8px; }
#msheet .mhead { display: flex; align-items: center; margin-bottom: 10px; } #msheet .mhead h3 { flex: 1; margin: 0; color: #e3c26a; }
#msheet .mtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#msheet .mtiles button { background: #1f2228; border: 1px solid #2c3038; border-radius: 12px; padding: 14px; color: var(--text); font: inherit; font-size: .98rem; text-align: left; min-height: 56px; cursor: pointer; }
#msheet .mtiles button.active { border-color: var(--gold); }
#msheet .mcard { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; } #msheet .mcard img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
@media (max-width: 860px) {
  .vnav { display: none !important; }
  .gsideL > [data-back] { display: none; }
  .glayout.is-chat .gsideR { display: none; }
  .glayout.is-chat .ccard .tuinfo, .glayout.is-chat .ccard .cstats, .glayout.is-chat .ccard .cboost { display: none; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  #mobileBar:not([hidden]) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #15171b; border-top: 1px solid #2a2d34; padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); }
  #mobileBar button { position: relative; background: none; border: 0; color: #a39c8d; font: inherit; font-size: .72rem; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0; min-height: 52px; cursor: pointer; }
  #mobileBar button .mi { font-size: 1.25rem; line-height: 1.2; filter: grayscale(.6); }
  #mobileBar button.active { color: #e3c26a; } #mobileBar button.active .mi { filter: none; }
  #mobileBar .badge-n { position: absolute; top: 2px; right: calc(50% - 22px); margin: 0; font-size: .62rem; }
  .chatbox { height: calc(100dvh - 300px); min-height: 340px; }
  .chatform .chatto { display: none; }
  .cmsg .cact { display: inline-flex; }
  .chatdock { margin-top: 10px; }
}
.chatbox .chatform input#chatInput { flex: 1 1 auto; width: auto; min-width: 0; }
.chatbox .chatform button.primary { flex: 0 0 auto; width: auto; padding: 0 22px; }
@media (max-width: 860px) {
  .glayout.is-chat .ccard { padding: 8px 10px; grid-template-columns: 44px minmax(0, 1fr); }
  .glayout.is-chat .ccard .timg { width: 44px; height: 44px; }
  .glayout.is-chat .ccard .bars > :nth-child(n+3) { display: none; }
  .glayout.is-chat .ccard .gname { font-size: .95rem; }
  .glayout.is-chat .ptsalert { display: none; }
  .glayout.is-chat .gmain { padding: 6px; }
  .chattabs { padding: 4px; } .chattabs button { padding: 6px 10px; min-height: 36px; }
  .chatbox { height: calc(100dvh - var(--chat-offset, 250px)); min-height: 160px; }
}

/* ===== v2.0-b.10: PC — ทั้งหน้าพอดีจอ ไม่ต้องเลื่อน (เลื่อนเฉพาะในกล่อง) ===== */
.gstat { display: none; }
@media (min-width: 861px) {
  body.ingame { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
  body.ingame .topbar { flex: none; position: static; padding: 8px 20px; }
  body.ingame #wbBanner { flex: none; position: static; padding: 4px 12px; font-size: .88rem; animation: none; }
  body.ingame #wbBanner .wbico.ban { width: 26px; height: 26px; }
  body.ingame #wbBanner button, body.ingame #wbBanner .primary { padding: 3px 12px; font-size: .85rem; }
  body.ingame main#app { flex: 1; min-height: 0; width: 100%; max-width: 1480px; box-sizing: border-box; padding: 8px 12px 10px; display: flex; flex-direction: column; }
  body.ingame #screen-game:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.ingame #gamePanel { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }

  /* แถวสถานะตัวละคร บรรทัดเดียว */
  body.ingame .gstat { display: flex; align-items: center; gap: 6px; flex: none; padding: 5px 8px; background: rgba(18, 20, 24, .94); border: 1px solid #3a3d44; border-radius: 10px; font-size: .85rem; overflow: hidden; white-space: nowrap; }
  .gstat .schip { display: flex; align-items: center; gap: 5px; padding: 3px 10px; background: #0f1114; border: 1px solid #33363d; border-radius: 999px; flex: none; }
  .gstat .schip.me img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; margin-left: -6px; }
  .gstat .sbar { display: flex; align-items: center; gap: 5px; flex: 1 1 110px; min-width: 80px; }
  .gstat .sbar .sl { color: var(--muted); font-size: .78rem; width: 26px; text-align: right; }
  .gstat .sbar .st { flex: 1; height: 8px; background: #22252b; border-radius: 4px; overflow: hidden; }
  .gstat .sbar .sf { height: 100%; border-radius: 4px; }
  .gstat .sf.hp { background: #d65a52; } .gstat .sf.sp { background: #4f93d6; } .gstat .sf.exp { background: #c9a24e; }
  .gstat .sbar .sv { font-size: .75rem; color: var(--muted); min-width: 34px; }

  /* สามคอลัมน์ สูงพอดีจอ */
  body.ingame .glayout { flex: 1; min-height: 0; grid-template-columns: 220px minmax(0, 1fr) 270px; gap: 10px; align-items: stretch; }
  body.ingame .gsideL, body.ingame .gsideR { position: static; max-height: none; min-height: 0; overflow-y: auto; gap: 10px; }
  body.ingame .gsideL > .ccard { display: none; }
  body.ingame .vnav button { padding: 5px 10px; min-height: 30px; font-size: .9rem; }
  body.ingame .navgroup { padding: 4px 6px; }
  body.ingame .navhead { font-size: .72rem; padding: 4px 6px 2px; }
  body.ingame .gmain { min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 12px 14px; }
  body.ingame .gmain > .guide-card, body.ingame .gmain > .ptsalert { flex: none; }
  body.ingame .gmain > .gbody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
  body.ingame .chatdock { flex: none; margin-top: 8px; }
  body.ingame .gsideR .spanel { padding: 10px 12px; }

  /* แชท: ยืดเต็มกรอบกลาง */
  body.ingame .glayout.is-chat .gmain > .gbody { overflow: hidden; display: flex; flex-direction: column; padding-right: 0; }
  body.ingame .chatbox { height: auto !important; flex: 1; min-height: 0; }

  /* หน้าที่มีการต่อสู้: ซ้ายข้อมูล/ปุ่ม · ขวาผลการต่อสู้ */
  body.ingame .gmain > .gbody:has(> .bsplit) { overflow: hidden; padding-right: 0; display: flex; }
  .bsplit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: 12px; flex: 1; min-height: 0; }
  .bsplit .bleft, .bsplit .bright { min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
  .bsplit .bright { background: rgba(10, 11, 13, .55); border: 1px solid #2f3238; border-radius: 10px; padding: 10px; }
  .bsplit #battle { margin: 0; }
  .bsplit #battle:empty { min-height: 100%; display: flex; align-items: center; justify-content: center; }
  .bsplit #battle:empty::before { content: attr(data-hint); color: var(--muted); text-align: center; padding: 20px; }
  /* หน้าพื้นที่สำรวจ: ภาพหัวเรื่องเตี้ยลง ให้ปุ่มตีอยู่ใกล้ ๆ */
  .bsplit .area .ahero { min-height: 220px; max-height: 260px; }
  .bsplit .ainfo { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-height: 760px) {
  body.ingame .topbar { padding: 4px 16px; }
  body.ingame .vnav button { min-height: 26px; padding: 3px 10px; }
}
@media (min-width: 861px) {
  /* เมนูซ้าย: กรอบบางลง ให้ครบทุกเมนูในจอเดียว */
  body.ingame .vnav { gap: 6px; }
  body.ingame .navgroup { border-image: none; border: 1px solid #5a4a2a; border-radius: 10px; padding: 3px 4px; }
  body.ingame .vnav button { border-left-width: 2px; }
  /* ไกด์มือใหม่: ย่อเป็นแถบ ไม่กินพื้นที่ */
  body.ingame .gmain > .guidecard { padding: 8px 12px; margin-bottom: 8px; font-size: .88rem; }
  body.ingame .gmain > .guidecard .gtext { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body.ingame .gmain > .guidecard .gstep { padding: 6px 8px; }
}
@media (min-width: 861px) and (max-height: 860px) {
  .bsplit .area .ahero { min-height: 150px; max-height: 170px; aspect-ratio: auto; }
  .bsplit .area .atitle p { display: none; }
  body.ingame .gmain > .guidecard .gtext { -webkit-line-clamp: 1; }
  body.ingame .gmain > .guidecard .gstep .gbody { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
  body.ingame .gmain > .guidecard .gstep .gtext { flex: 1 1 300px; }
  body.ingame .gmain > .guidecard .gact { margin: 0; }
}

/* ===================================================================
   v2.0-b.11: หน้าเว็บหลัก One-Page — ธีมปราสาทมืด ดำ · ทอง · แดง · ม่วงเข้ม
   =================================================================== */
body.onportal .topbar, body.onportal #wbBanner, body.onportal #mobileBar { display: none !important; }
body.onportal main#app { display: none; }
body.onportal { background: #08090a; }
#screen-portal { --pg: #d9b45a; --pg2: #f3dc9a; --pr: #a3202a; --pp: #182f3a; --pp2: #295064; --pink: #e8e1d1; --pmut: #a0a8ac; --pbg: #0b0e10; --pcard: #12181b; --pline: #303e45;
  color: var(--pink); font-size: 16px; line-height: 1.6; scroll-margin-top: 0; }
#screen-portal h1, #screen-portal h2, #screen-portal h3 { font-family: Georgia, "Noto Serif Thai", serif; }
.pt-loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: #a0a8ac; }
.pt-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
#screen-portal .pt-btn { border-image: none; box-shadow: none; text-shadow: none; filter: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
#screen-portal .pt-btn.gold { background: linear-gradient(180deg, #f0cf7a, #b98a32); color: #1a1206; border-color: #f5dc96; box-shadow: 0 4px 16px rgba(217, 180, 90, .25); }
#screen-portal .pt-btn.gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217, 180, 90, .4); }
#screen-portal .pt-btn.ghost { background: rgba(16, 23, 26, .7); color: var(--pink); border-color: #4e616a; }
#screen-portal .pt-btn.ghost:hover { border-color: var(--pg); color: var(--pg2); }
#screen-portal .pt-btn.big { min-height: 52px; padding: 0 28px; font-size: 1.08rem; }
#screen-portal .pt-btn:focus-visible, #screen-portal a:focus-visible { outline: 2px solid var(--pg2); outline-offset: 2px; }

/* 1. Header */
.pt-head { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 10px 24px; transition: background .25s, box-shadow .25s; background: linear-gradient(180deg, rgba(7, 10, 11, .85), rgba(7, 10, 11, 0)); }
.pt-head.solid { background: rgba(9, 12, 14, .96); box-shadow: 0 2px 0 #303e45, 0 8px 24px rgba(0, 0, 0, .6); }
.pt-logo { display: flex; align-items: center; gap: 10px; color: var(--pg); text-decoration: none; font-family: Georgia, serif; font-weight: 700; letter-spacing: .14em; font-size: 1.05rem; white-space: nowrap; }
.pt-logo img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid #6a5426; }
.pt-nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.pt-nav a { color: #cad2d6; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: .95rem; position: relative; transition: color .2s; }
.pt-nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--pg); transform: scaleX(0); transition: transform .25s; }
.pt-nav a:hover, .pt-nav a.on { color: var(--pg2); } .pt-nav a:hover::after, .pt-nav a.on::after { transform: scaleX(1); }
.pt-user { display: flex; align-items: center; gap: 8px; }
.pt-chip { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #cad2d6; padding: 4px 10px 4px 4px; border: 1px solid #404f56; border-radius: 999px; background: rgba(16, 23, 26, .7); white-space: nowrap; }
.pt-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
#screen-portal .pt-burger { border-image: none; padding: 0; display: none; width: 44px; height: 44px; border: 1px solid #404f56; border-radius: 8px; background: rgba(16, 23, 26, .8); flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.pt-burger span { width: 20px; height: 2px; background: var(--pg); border-radius: 2px; }

/* 2. Hero */
.pt-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 110px 20px 70px; }
.pt-hero-bg { position: absolute; inset: -4%; background-size: cover; background-position: center 35%; animation: ptdrift 30s ease-in-out infinite alternate; }
.pt-hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 40%, rgba(9, 14, 17, .25), rgba(7, 10, 11, .85) 70%), linear-gradient(180deg, rgba(7, 10, 11, .3) 0%, rgba(7, 10, 11, 0) 40%, #08090a 100%); }
.pt-hero-in { position: relative; z-index: 2; max-width: 880px; }
.pt-kicker { color: var(--pg); letter-spacing: .06em; font-size: .85rem; text-transform: uppercase; margin: 0 0 10px; }
.pt-hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.05; margin: 0 0 18px; color: #f8e7b8; letter-spacing: .04em; text-shadow: 0 2px 0 #6a4a14, 0 0 40px rgba(163, 32, 42, .55), 0 8px 30px rgba(0, 0, 0, .9); }
.pt-lead { font-size: clamp(1rem, 2vw, 1.2rem); color: #e2d9ec; max-width: 680px; margin: 0 auto 26px; text-shadow: 0 2px 10px #000; }
.pt-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; } .pt-cta.left { justify-content: flex-start; }
.pt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 34px auto 0; max-width: 760px; }
.pt-stats > div { background: rgba(12, 18, 21, .72); border: 1px solid #404f56; border-radius: 12px; padding: 12px 10px; backdrop-filter: blur(4px); }
.pt-stats b { display: block; font-size: 1.7rem; color: var(--pg2); font-family: Georgia, serif; line-height: 1.2; } .pt-stats span { font-size: .85rem; color: var(--pmut); }
.pt-wbbar { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(40, 10, 14, .85); border: 1px solid #7a2a24; color: #f6d9c8; text-decoration: none; font-size: .92rem; text-align: left; }
.pt-wbbar.live { box-shadow: 0 0 0 0 rgba(214, 90, 82, .6); animation: ptpulse 2.4s infinite; }
.pt-wbbar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; } .pt-wbbar b { color: #ffd27a; }

/* Section ทั่วไป */
.pt-sec { padding: 84px 0 64px; position: relative; scroll-margin-top: 64px; }
.pt-sec:nth-of-type(even) { background: linear-gradient(180deg, #0a0e10, #0d1418 50%, #0a0e10); }
.pt-sec + .pt-sec::before { content: ''; position: absolute; top: 0; left: 50%; width: min(520px, 70%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--pg), transparent); opacity: .6; }
.pt-sec-h { text-align: center; margin-bottom: 34px; }
.pt-sec-h h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); color: #f3dc9a; margin: 0 0 6px; }
.pt-sec-h h2::before, .pt-sec-h h2::after { content: '◆'; color: var(--pr); font-size: .5em; vertical-align: middle; margin: 0 14px; }
.pt-sec-h p { color: var(--pmut); margin: 0; }
.pt-h3 { color: var(--pg); font-size: 1.25rem; margin: 34px 0 14px; border-left: 3px solid var(--pr); padding-left: 10px; } .pt-h3 small { color: var(--pmut); font-size: .8rem; font-family: inherit; }
.pt-sub { color: var(--pmut); font-size: .88rem; margin: 0 0 6px; }
.pt-desc { color: #d1d8dc; font-size: .92rem; margin: 0 0 8px; }
.pt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; } .pt-tags span { font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: #1a242a; border: 1px solid #35444c; color: #d1d8dc; }
.pt-tags .el-fire { border-color: #8a3a22; color: #ffb08a; } .pt-tags .el-water { border-color: #2a5a8a; color: #9fd0ff; } .pt-tags .el-light { border-color: #8a7a2a; color: #ffe88a; } .pt-tags .el-dark { border-color: #5a2a8a; color: #d6b0ff; }
.pt-none { color: var(--pmut); text-align: center; padding: 24px; margin: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; } .reveal.in { opacity: 1; transform: none; }
.card-lift { transition: transform .2s, border-color .2s, box-shadow .2s; }

/* 3. Player */
.pt-empty { display: flex; gap: 22px; align-items: center; max-width: 760px; margin: 0 auto; background: var(--pcard); border: 1px solid var(--pline); border-radius: 16px; padding: 22px; }
.pt-empty img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; flex: none; } .pt-empty h3 { margin: 0 0 6px; color: #f3dc9a; } .pt-empty p { color: var(--pmut); margin: 0 0 14px; }
.pt-chars { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.pt-char { display: flex; flex-direction: column; background: var(--pcard); border: 1px solid var(--pline); border-radius: 16px; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.pt-char:hover { transform: translateY(-4px); border-color: var(--pg); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.pt-char-img { width: 100%; height: 170px; object-fit: cover; background: #0a0d0f; }
.pt-char-in { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; } .pt-char h3 { margin: 0; font-size: 1.25rem; color: #f3dc9a; }
.pt-xp { height: 6px; background: #1e272c; border-radius: 3px; overflow: hidden; } .pt-xp i { display: block; height: 100%; background: linear-gradient(90deg, #b98a32, #f0cf7a); }
.pt-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 6px 0 8px; } .pt-dl div { background: #182024; border-radius: 8px; padding: 6px 10px; }
.pt-dl dt { font-size: .75rem; color: var(--pmut); } .pt-dl dd { margin: 0; font-weight: 700; color: var(--pink); }

/* 4. Modes */
.pt-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pt-mode { display: flex; gap: 14px; align-items: flex-start; background: var(--pcard); border: 1px solid var(--pline); border-radius: 14px; padding: 14px; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, background .2s; }
.pt-mode:hover { transform: translateY(-3px); border-color: var(--pg); background: #161e22; }
.pt-mode img { width: 92px; height: 92px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid #404f56; }
.pt-mode h3 { margin: 0 0 4px; color: #f3dc9a; font-size: 1.12rem; } .pt-mode p { margin: 0; color: #cad2d6; font-size: .9rem; }

/* 5. Maps */
.pt-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.pt-map { background: var(--pcard); border: 1px solid var(--pline); border-radius: 14px; overflow: hidden; transition: transform .2s, border-color .2s; }
.pt-map:hover { transform: translateY(-4px); border-color: var(--pg); }
.pt-map-img { position: relative; aspect-ratio: 16 / 9; background: #0a0d0f; overflow: hidden; } .pt-map-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pt-map:hover .pt-map-img img { transform: scale(1.06); }
.pt-lv { position: absolute; top: 8px; left: 8px; background: rgba(7, 11, 13, .85); border: 1px solid #6a5426; color: var(--pg2); font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pt-map-in { padding: 12px 14px 14px; } .pt-map h3 { margin: 0; font-size: 1.1rem; color: #f3dc9a; }
.pt-map .pt-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 6. Bosses */
.pt-wbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pt-wb { position: relative; background: #0e1417; border: 1px solid #4a2430; border-radius: 16px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.pt-wb:hover { transform: translateY(-4px); box-shadow: 0 12px 34px rgba(163, 32, 42, .3); }
.pt-wb.live { border-color: #d65a52; box-shadow: 0 0 0 1px #d65a52, 0 0 30px rgba(214, 90, 82, .35); }
.pt-wb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0a0d0f; }
.pt-wb-in { padding: 12px 16px 16px; } .pt-wb h3 { margin: 0; color: #ffcf9a; }
.pt-live { color: #ff9a8a; font-weight: 700; font-size: .9rem; margin: 0 0 6px; }
.pt-mons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } .pt-mons.small { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.pt-mon { margin: 0; background: var(--pcard); border: 1px solid var(--pline); border-radius: 12px; padding: 8px; text-align: center; transition: transform .2s, border-color .2s; }
.pt-mon:hover { transform: translateY(-3px); border-color: #8a3a4a; }
.pt-mon img { width: 100%; aspect-ratio: 1; object-fit: contain; background: radial-gradient(circle, #1d2a30, #0d1316 70%); border-radius: 8px; }
.pt-mon figcaption { display: flex; flex-direction: column; margin-top: 6px; } .pt-mon b { font-size: .82rem; line-height: 1.3; color: var(--pink); } .pt-mon small { font-size: .72rem; color: var(--pmut); }

/* 7. Heroes */
.pt-towers { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.pt-tower { background: var(--pcard); border: 1px solid var(--pline); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.pt-tower:hover { transform: translateY(-4px); }
.pt-tower.t-dark:hover { border-color: #9a7bd8; } .pt-tower.t-light:hover { border-color: #e8d27a; } .pt-tower.t-fire:hover { border-color: #e2774f; } .pt-tower.t-water:hover { border-color: #5aa9e0; }
.pt-tower > img { width: 100%; height: 200px; object-fit: cover; background: #0a0d0f; }
.pt-tower-in { padding: 14px 16px 16px; } .pt-tower h3 { margin: 0; color: #f3dc9a; font-size: 1.3rem; } .pt-tower h3 small { color: var(--pmut); font-size: .8rem; font-family: inherit; }
.pt-role { color: var(--pg); margin: 2px 0 8px; font-size: .92rem; }
.pt-stat-h { font-size: .78rem; color: var(--pmut); margin: 10px 0 4px; letter-spacing: .03em; }
.pt-stat { display: grid; grid-template-columns: 34px 1fr 52px; align-items: center; gap: 8px; font-size: .82rem; margin: 3px 0; }
.pt-stat > div { height: 6px; background: #1e272c; border-radius: 3px; overflow: hidden; } .pt-stat i { display: block; height: 100%; background: linear-gradient(90deg, #36667e, #d9b45a); }
.pt-stat b { text-align: right; color: var(--pink); }
.pt-list { margin: 8px 0 0; padding-left: 18px; font-size: .86rem; color: #d1d8dc; } .pt-list li.weak { color: #ff9a8a; }
.pt-paths { display: grid; gap: 6px; } .pt-paths > div { background: #182024; border-radius: 8px; padding: 6px 10px; font-size: .85rem; } .pt-paths small { color: var(--pmut); } .pt-paths p { margin: 2px 0 0; color: #cad2d6; font-size: .8rem; }
.pt-gods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pt-god { margin: 0; background: linear-gradient(180deg, #221a10, #140f0a); border: 1px solid #6a5426; border-radius: 12px; padding: 10px; text-align: center; transition: transform .2s, box-shadow .2s; }
.pt-god:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(217, 180, 90, .2); }
.pt-god img { width: 100%; aspect-ratio: 1; object-fit: contain; } .pt-god figcaption { display: flex; flex-direction: column; } .pt-god b { color: var(--pg2); font-size: .88rem; } .pt-god small { color: var(--pmut); font-size: .75rem; }

/* 8. Ranking */
.pt-tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
#screen-portal .pt-tabs button { border-image: none; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid #404f56; background: #12181b; color: #cad2d6; font: inherit; cursor: pointer; transition: all .2s; }
#screen-portal .pt-tabs button:hover { border-color: var(--pg); } #screen-portal .pt-tabs button.on { background: linear-gradient(180deg, #f0cf7a, #b98a32); color: #1a1206; border-color: #f5dc96; font-weight: 700; }
.pt-table { max-width: 900px; margin: 0 auto; background: var(--pcard); border: 1px solid var(--pline); border-radius: 14px; overflow-x: auto; }
.pt-table table { width: 100%; border-collapse: collapse; min-width: 480px; }
.pt-table th, .pt-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #20292f; font-size: .92rem; } .pt-table th { color: var(--pmut); font-weight: 500; font-size: .82rem; background: #161d20; }
.pt-table .n { text-align: right; font-variant-numeric: tabular-nums; } .pt-table tbody tr { transition: background .15s; } .pt-table tbody tr:hover { background: #182024; }
.pt-table .rk { width: 48px; font-weight: 700; color: var(--pmut); text-align: center; }
.pt-table tr.top1 .rk { color: #ffd76a; } .pt-table tr.top2 .rk { color: #d9dde6; } .pt-table tr.top3 .rk { color: #e0a070; }
.pt-table tr.top1 { background: linear-gradient(90deg, rgba(217, 180, 90, .14), transparent); }
.pt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #888; }
.pt-dot.t-dark { background: #9a7bd8; } .pt-dot.t-light { background: #e8d27a; } .pt-dot.t-fire { background: #e2774f; } .pt-dot.t-water { background: #5aa9e0; }

/* 9. News */
.pt-news { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.pt-news-main { display: grid; gap: 12px; }
.pt-post { background: var(--pcard); border: 1px solid var(--pline); border-radius: 14px; padding: 16px 18px; transition: border-color .2s; }
.pt-post:hover { border-color: #5e717a; } .pt-post.pin { border-color: #6a5426; background: linear-gradient(180deg, #1f1810, var(--pcard)); }
.pt-post time { font-size: .8rem; color: var(--pg); } .pt-post h3 { margin: 4px 0 6px; color: #f3dc9a; font-size: 1.15rem; } .pt-post p { margin: 0; color: #d1d8dc; white-space: pre-line; }
.pt-events { background: #0e1417; border: 1px solid #4a2430; border-radius: 14px; padding: 16px 18px; } .pt-events h3 { margin: 0 0 8px; color: #ffcf9a; font-size: 1.1rem; }
.pt-events ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .pt-events li { font-size: .88rem; color: #e2d9ec; border-left: 2px solid var(--pr); padding-left: 10px; } .pt-events time { display: block; font-size: .74rem; color: var(--pmut); }

/* 10. Footer */
.pt-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 44px 20px 24px; border-top: 1px solid #232e33; color: var(--pmut); font-size: .9rem; }
.pt-foot h4 { color: var(--pg); margin: 0 0 8px; font-family: Georgia, serif; } .pt-foot a, .pt-foot span { display: block; color: #cad2d6; text-decoration: none; padding: 2px 0; } .pt-foot a:hover { color: var(--pg2); }
.pt-copy { grid-column: 1 / -1; text-align: center; border-top: 1px solid #1a2327; padding-top: 14px; margin: 8px 0 0; font-size: .8rem; }

@keyframes ptdrift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
@keyframes ptpulse { 0% { box-shadow: 0 0 0 0 rgba(214, 90, 82, .55); } 70% { box-shadow: 0 0 0 14px rgba(214, 90, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 90, 82, 0); } }
@media (prefers-reduced-motion: reduce) { .pt-hero-bg, .pt-wbbar.live { animation: none; } .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* แท็บเล็ต */
@media (max-width: 1100px) {
  #screen-portal .pt-burger { border-image: none; padding: 0; display: flex; order: 3; }
  .pt-user { margin-left: auto; }
  .pt-nav { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(9, 12, 14, .98); border-bottom: 1px solid #303e45; padding: 6px 12px 12px; transform: translateY(-120%); transition: transform .25s; max-height: calc(100vh - 64px); overflow-y: auto; }
  .pt-nav.open { transform: none; }
  .pt-nav a { padding: 12px; font-size: 1rem; border-bottom: 1px solid #1a2327; } .pt-nav a::after { display: none; }
  .pt-news { grid-template-columns: 1fr; }
}
/* มือถือ */
@media (max-width: 640px) {
  #screen-portal { font-size: 15px; }
  .pt-head { padding: 8px 12px; gap: 8px; }
  .pt-logo span { display: none; }
  .pt-chip { display: none; }
  .pt-user #screen-portal .pt-btn { min-height: 38px; padding: 0 12px; font-size: .9rem; }
  .pt-nav { top: 56px; max-height: calc(100vh - 56px); }
  .pt-hero { padding: 90px 16px 50px; min-height: 92vh; }
  .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-stats b { font-size: 1.35rem; }
  .pt-sec { padding: 60px 0 44px; scroll-margin-top: 56px; }
  .pt-wrap { padding: 0 14px; }
  .pt-empty { flex-direction: column; text-align: center; } .pt-empty .pt-cta.left { justify-content: center; } .pt-empty img { width: 96px; height: 96px; }
  .pt-mode img { width: 72px; height: 72px; }
  .pt-maps, .pt-towers, .pt-wbs, .pt-chars, .pt-modes { grid-template-columns: 1fr; }
  .pt-mons { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pt-mons.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pt-gods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-table th, .pt-table td { padding: 8px 10px; font-size: .85rem; }
  .pt-foot { grid-template-columns: 1fr; }
  .pt-wbbar { font-size: .82rem; border-radius: 14px; }
}

/* ===================================================================
   v2.0-b.12: ธีมในเกมให้เข้าชุดกับหน้าเว็บหลัก — ดำ · ทอง · แดง · ม่วงเข้ม
   (เปลี่ยนเฉพาะสี/กรอบ/ปุ่ม/เอฟเฟกต์ — การจัดวางเดิมไม่เปลี่ยน)
   =================================================================== */
:root { --gold: #d9b45a; --text: #ece4f2; --muted: #a0a8ac; --line: #303e45; --panel: #12181b; --panel-2: #182024;
  --mc-card: linear-gradient(180deg, #161d20 0%, #0f1417 100%); --mc-line: #303e45; --mc-line2: #4e616a; --mc-gold2: #f3dc9a; --mc-red: #a3202a; }
html { background: #08090a; }
body:not(.onportal) { background: linear-gradient(180deg, rgba(7, 10, 11, .88), rgba(7, 10, 11, .96)), url('/assets/site_bg.webp') center / cover no-repeat #08090a; }
@media (min-width: 861px) { body:not(.onportal) { background-attachment: fixed; } }
h1, h2, h3, h4 { color: var(--mc-gold2); }

/* แถบบน */
.topbar { background: rgba(9, 12, 14, .96); border-bottom: 1px solid var(--mc-line); box-shadow: 0 2px 0 rgba(217, 180, 90, .15), 0 8px 24px rgba(0, 0, 0, .6); backdrop-filter: none; }
.brand { color: var(--mc-gold2); font-weight: 700; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; font-size: 1.05rem; transition: color .2s; }
.brand:hover { color: #fff1c4; }
.world { color: var(--muted); }

/* แผง: เลิกใช้กรอบหินโลหะ → การ์ดม่วงดำขอบบาง มุมโค้ง */
.panel, .gmain, .spanel, .panel2, .ccard, .navgroup, .raidhead, .skbook {
  background: var(--mc-card); border: 1px solid var(--mc-line) !important; border-image: none !important; border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(217, 180, 90, .10);
}
.gpanel:has(.glayout) { background: transparent; border: 0 !important; box-shadow: none; }
.ccard { background: radial-gradient(ellipse at 50% 0%, rgba(65, 125, 155, .30), transparent 70%), var(--mc-card); }
.navgroup { background: var(--mc-card); }
.spanel h4 { border-bottom-color: rgba(217, 180, 90, .14); }
.navhead { color: #b8a27a; }
.vnav button { color: #d8dfe2; border-radius: 8px; transition: background .15s, color .15s; }
.vnav button:hover { background: rgba(217, 180, 90, .08); color: #fff1c4; }
.vnav button.active { background: linear-gradient(90deg, rgba(217, 180, 90, .26), rgba(217, 180, 90, .05)); border-left-color: var(--gold); color: #ffe7a8; }
.srow span { color: #cad2d6; }

/* ปุ่ม: แบบเดียวกับหน้าเว็บหลัก */
.mini, .ghost, .pchip, .spanel .mini, button.big:not(.primary), .mpick, .mnav button, .actions button:not(.primary) {
  background: #182024; color: #ece4f2; border: 1px solid var(--mc-line2) !important; border-image: none !important; border-radius: 8px; text-shadow: none;
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s;
}
.primary, .mini.primary, .pchip.pt, .pchip.bp {
  background: linear-gradient(180deg, #f0cf7a, #b98a32); color: #1a1206; border: 1px solid #f5dc96 !important; border-image: none !important; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(217, 180, 90, .22); transition: transform .15s, box-shadow .2s, filter .2s;
}
.pchip.pt { background: linear-gradient(180deg, #2b4f66, #15293a); color: #bfefff; border-color: #3f7aa0 !important; box-shadow: none; }
.pchip.bp { background: linear-gradient(180deg, #5a2c55, #2c142a); color: #ffc2f0; border-color: #8a4a85 !important; box-shadow: none; }
button.alt { background: linear-gradient(180deg, #a3202a, #5a0f16); color: #fff; border: 1px solid #d65a52 !important; border-image: none !important; border-radius: 8px; transition: transform .15s, box-shadow .2s; }
.mini:hover:not(:disabled), .ghost:hover:not(:disabled), .pchip:hover:not(:disabled), button.big:not(.primary):hover:not(:disabled), .actions button:not(.primary):hover:not(:disabled) { filter: none; border-color: var(--gold) !important; color: #fff1c4; transform: translateY(-1px); }
.primary:hover:not(:disabled) { filter: none; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(217, 180, 90, .38); }
button.alt:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(163, 32, 42, .4); }
button:disabled { opacity: .55; transform: none !important; box-shadow: none !important; }
.tabs { background: #182024; } .tab.active { background: linear-gradient(180deg, #f0cf7a, #b98a32); color: #1a1206; font-weight: 700; }

/* การ์ดย่อยในหน้าเกม */
.stone, .skill, .abox, .rtower, .icard, .eqbig, .eqdetail, .rankcard2, .skpath, .qrow, .slot, .godcard, .mcard {
  background: linear-gradient(180deg, #141a1d, #0f1416) !important; border-color: var(--mc-line) !important; border-radius: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.stone:hover, .rtower:hover, .icard:hover, .slot:hover, .godcard:hover { border-color: var(--mc-line2) !important; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
.slot:hover { transform: translateY(-3px); }
.fill.exp { background: linear-gradient(90deg, #b98a32, #f0cf7a); color: rgba(217, 180, 90, .45); }
.bar .track { background: #0b0f11; border-color: #000; }
.cstats { background: rgba(7, 11, 13, .6); border-color: rgba(217, 180, 90, .12); }
input, select, textarea { background: #0c1012 !important; border: 1px solid #404f56 !important; color: var(--text); border-radius: 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(217, 180, 90, .6); outline-offset: 0; }
.toast { background: linear-gradient(180deg, #1c252a, #11171a); border: 1px solid var(--mc-line2); border-radius: 12px; }
.ptsalert { background: linear-gradient(90deg, rgba(217, 180, 90, .16), rgba(24, 47, 58, .3)); border: 1px solid rgba(217, 180, 90, .45); border-radius: 10px; }
.guidecard { background: linear-gradient(180deg, #221a10, #11171a) !important; border-color: #6a5426 !important; border-radius: 12px; }
::selection { background: rgba(217, 180, 90, .35); }

/* แชท + แถบสถานะ (v2.0-b.9/b.10) */
.chatbox { background: rgba(11, 16, 18, .92); border-color: var(--mc-line); border-radius: 14px; }
.chattabs { border-bottom-color: #232e33; }
.chattabs button.active { background: linear-gradient(180deg, #f0cf7a, #b98a32); color: #1a1206; }
.chatform { background: #1a1410; border-top-color: #4a3a22; }
.chatdock { background: rgba(11, 16, 18, .92); border-color: var(--mc-line); border-radius: 12px; transition: border-color .2s; }
.cmsg.sys { background: #241712; border-color: #6a4a26; }
body.ingame .gstat { background: rgba(11, 16, 18, .94); border-color: var(--mc-line); }
.gstat .schip { background: #0c1012; border-color: var(--mc-line); }
.gstat .sf.exp { background: linear-gradient(90deg, #b98a32, #f0cf7a); }
.bsplit .bright { background: rgba(8, 11, 13, .6); border-color: #232e33; }
#mobileBar:not([hidden]) { background: rgba(10, 14, 16, .98); border-top-color: var(--mc-line); }
#msheet .msheet { background: #12181b; border-top-color: #4a3a22; }
#msheet .mtiles button { background: #182024; border-color: var(--mc-line); transition: border-color .2s; }
#msheet .mtiles button:hover, #msheet .mtiles button.active { border-color: var(--gold); }
@media (max-width: 860px) {
  .vnav { background: rgba(10, 14, 16, .96); }
  .navgroup { border-color: #4a3a26 !important; }
}
@media (prefers-reduced-motion: reduce) { .slot:hover, .primary:hover, .mini:hover, .ghost:hover { transform: none !important; } }
@media (max-width: 640px) {
  .brand { letter-spacing: .06em; font-size: .86rem; }
  .world { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ===== v2.0-b.13 ===== */
/* 1) ผลการต่อสู้: แยกหมวด เรียงแนวตั้ง */
.rwbox { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; text-align: left; }
.rwsum { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.rwk { background: #0c1012; border: 1px solid #303e45; border-radius: 8px; padding: 5px 9px; display: flex; flex-direction: column; }
.rwk span { font-size: .74rem; color: var(--muted); } .rwk b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.rwk b.good { color: #8fdc9a; } .rwk b.bad { color: #ff8f86; }
.rwsec { background: rgba(11, 16, 18, .7); border: 1px solid #28353c; border-radius: 10px; padding: 6px 10px; }
.rwsec h5 { margin: 0 0 4px; font-size: .82rem; color: var(--mc-gold2, #f3dc9a); font-family: inherit; letter-spacing: .02em; }
.rwsec h5 small { color: var(--muted); font-weight: 400; }
.rwsec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rwsec li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: .88rem; line-height: 1.4; }
.rwsec li:last-child { border-bottom: 0; }
.rwsec li > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rwsec li small { color: var(--muted); }
.rwn { background: #2b2618; color: #f3dc9a; border-radius: 999px; padding: 0 8px; font-size: .78rem; flex: none; }
.rwsec li.tier1 > span { color: #e8e1d1; } .rwsec li.tier2 > span { color: #8fd0ff; } .rwsec li.tier3 > span { color: #c79bff; } .rwsec li.tier4 > span { color: #ffcf6a; } .rwsec li.tier5 > span { color: #ff8a7a; }
.rwsec li.lost > span { color: #ff8f86; } .rwsec li.lvup > span { color: #8fdc9a; font-weight: 700; }
.rwnote { border-color: #4a3a22; }

/* 3) เตาหลอม: ปุ่มผลึกอ่านออก + หินแสดงเป็นกอง (ชนิด/เลเวล/จำนวน) */
.gemb { background: #182024; color: #ece4f2; border: 1px solid #303e45; border-radius: 10px; transition: border-color .2s, transform .15s; }
.gemb b { color: #f3dc9a; } .gemb span:not(.gemi) { color: #cad2d6; }
.gemb:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.gemb.sel { background: #2b2618; border-color: var(--gold); }
.cgrid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.cgem { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; padding: 6px 4px 5px; background: #14191c; border: 1px solid #303e45; }
.cgem .sicon { width: 54px; height: 54px; }
.cgem .clv { right: auto; left: 4px; top: 4px; bottom: auto; font-size: .68rem; }
.cgem .ccnt { position: absolute; right: 4px; top: 4px; background: #c9a24e; color: #1a1206; font-weight: 700; font-size: .7rem; border-radius: 999px; padding: 0 6px; }
.cgem .cname { font-size: .7rem; color: #d8dfe2; line-height: 1.25; margin-top: 3px; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 5) ร้านค้า: 3 คอลัมน์ · ร้านหินแบบแถว + เลือกจำนวน */
.shop3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.shcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.shcol > .panel2 { margin: 0; }
.splist { display: flex; flex-direction: column; gap: 6px; }
.sprow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 10px; align-items: center; background: #14191c; border: 1px solid #303e45; border-radius: 10px; padding: 8px; }
.sprow .sicon { width: 40px; height: 40px; }
.spinfo b { color: #f3dc9a; } .spdesc { font-size: .76rem; color: #cad2d6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spbuy { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: space-between; }
.qtybox { display: flex; align-items: center; gap: 3px; }
.qtybox .mini { min-width: 30px; padding: 3px 7px; }
.qtybox .qty { width: 52px; text-align: center; padding: 4px; }
.spbuy .primary { width: auto; padding: 5px 12px; }
@media (max-width: 1250px) { .shop3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .shop3 { grid-template-columns: 1fr; } }

@media (min-width: 861px) {
  /* 2) God Item: จบในจอเดียว */
  body.ingame .tab-god .godtitle { font-size: 1.25rem; margin: 0 0 2px; }
  body.ingame .tab-god .godtitle + p { font-size: .78rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  body.ingame .tab-god .godgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
  body.ingame .tab-god .godcard { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img name" "img eff" "img loyal" "img owner" "btn btn"; text-align: left; align-items: center; gap: 1px 10px; padding: 8px 10px; }
  body.ingame .tab-god .godcard .gname2 { grid-area: name; font-size: .95rem; }
  body.ingame .tab-god .godcard .geff { grid-area: eff; font-size: .78rem; }
  body.ingame .tab-god .godcard .gimg { grid-area: img; width: 72px; height: 72px; }
  body.ingame .tab-god .godcard .loyal { grid-area: loyal; font-size: .74rem; }
  body.ingame .tab-god .godcard .gowner { grid-area: owner; font-size: .78rem; }
  body.ingame .tab-god .godcard > button { grid-area: btn; margin-top: 6px; padding: 4px 10px; min-height: 0; font-size: .82rem; }
  body.ingame .tab-god .gmain h4 { margin: 4px 0; font-size: .9rem; }
  body.ingame .tab-god .godlog { max-height: 96px; overflow-y: auto; margin: 0; font-size: .78rem; }

  /* 4) อุปกรณ์: จบในจอเดียว รูปเล็กลง */
  body.ingame .tab-equip .gmain > .gbody { overflow: hidden; display: flex; flex-direction: column; padding-right: 0; }
  body.ingame .tab-equip .eqtop2 { grid-template-columns: minmax(0, 1fr) 190px; gap: 8px; flex: none; }
  body.ingame .tab-equip .eqgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  body.ingame .tab-equip .eqbig { min-height: 0; padding: 6px 8px; font-size: .8rem; }
  body.ingame .tab-equip .eqbig::after { width: 36%; }
  body.ingame .tab-equip .eqbig > * { max-width: 70%; }
  body.ingame .tab-equip .eqbig .eqtitle { font-size: .86rem; line-height: 1.3; }
  body.ingame .tab-equip .eqbig .eqstats { gap: 0 6px; font-size: .74rem; }
  body.ingame .tab-equip .eqbtns .mini { padding: 2px 8px; font-size: .74rem; min-height: 0; }
  body.ingame .tab-equip .eqsum { padding: 8px 10px; font-size: .82rem; }
  body.ingame .tab-equip .eqsum h3 { font-size: .95rem; margin: 0 0 4px; }
  body.ingame .tab-equip .eqsum .eqtot { line-height: 1.55; }
  body.ingame .tab-equip .eqsum p { display: none; }
  body.ingame .tab-equip .gbody > h3 { margin: 8px 0 4px; font-size: 1rem; flex: none; }
  body.ingame .tab-equip .gbody > .actions { flex: none; gap: 4px; margin: 0 0 6px; }
  body.ingame .tab-equip .gbody > .actions .mini { padding: 3px 8px; font-size: .78rem; min-height: 0; }
  body.ingame .tab-equip .eqbag { flex: 1; min-height: 0; grid-template-columns: 250px minmax(0, 1fr); margin: 0; align-items: stretch; }
  body.ingame .tab-equip .eqdetail { min-height: 0; padding: 8px 10px; font-size: .82rem; overflow-y: auto; }
  body.ingame .tab-equip .egrid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); align-content: start; overflow-y: auto; min-height: 0; gap: 5px; }
  body.ingame .tab-equip .etile.none { display: none; }
  body.ingame .tab-equip .uppanel { flex: none; max-height: 45%; overflow-y: auto; }

  /* 5) ร้านค้า: แต่ละคอลัมน์เลื่อนในตัวเอง หน้าไม่ต้องเลื่อน */
  body.ingame .tab-shop .gmain > .gbody { overflow: hidden; display: flex; padding-right: 0; }
  body.ingame .tab-shop .shop3 { flex: 1; min-height: 0; align-items: stretch; }
  body.ingame .tab-shop .shcol { min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
  body.ingame .tab-shop .panel2 { padding: 10px 12px; }
  body.ingame .tab-shop .panel2 h3 { font-size: 1rem; margin: 0 0 4px; }
  body.ingame .tab-shop .panel2 p { font-size: .76rem; margin: 0 0 6px; }
  body.ingame .tab-shop .tulot { gap: 4px; } body.ingame .tab-shop .tulot .tl { padding: 3px 6px; }
  body.ingame .tab-shop .stones { grid-template-columns: 1fr; gap: 6px; }
  body.ingame .tab-shop .stone { padding: 8px; }
}
/* v2.0-b.14 */
.tag.boxgift { background: #2b2618; color: #f3dc9a; border: 1px solid #6a5426; margin-top: 4px; }
.boxclaim { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-color: #6a5426 !important; background: linear-gradient(90deg, #2a2010, #12181b) !important; margin-bottom: 10px; }
.boxclaim .primary { width: auto; }
.gstat .sboost { display: flex; gap: 4px; flex: none; } .gstat .sboost .boost { font-size: .74rem; padding: 2px 8px; }

/* v2.0-b.17 วิวัฒนาการหอ */
.evosec .skbanner { background: linear-gradient(90deg, #4a2a10, #1c2c34 60%, #0f1417); border-color: #b8862e; }
.evowrap { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 14px; align-items: start; }
.evoart { display: flex; align-items: center; gap: 8px; }
.evoart figure { margin: 0; text-align: center; flex: 1 1 0; }
.evoart figure.big { flex: 1.7 1 0; }
.evoart img { width: 100%; border-radius: 10px; border: 1px solid #303e45; display: block; }
.evoart figure.big img { border-color: #c9a24a; box-shadow: 0 0 18px rgba(232, 190, 90, .35), 0 0 42px rgba(150, 90, 220, .25); }
.evoart figcaption { font-size: .78rem; color: #cbb98a; margin-top: 4px; }
.evoarrow { color: #e6c46a; font-size: 1.3rem; text-shadow: 0 0 8px #b8862e; }
.evoquest h5 { margin: 0 0 6px; color: #f3dc9a; }
.evoreq { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.evoreq li { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: center; padding: 5px 8px; border-radius: 6px; background: #141a1d; border: 1px solid #253035; font-size: .86rem; }
.evoreq li.ok span { color: #7fd48a; } .evoreq li.bad span { color: #e07070; }
.evoreq li em { font-style: normal; color: #b0bfc7; font-size: .8rem; }
.evoquest > button { width: auto; margin-bottom: 8px; }
.evodone { padding: 8px 10px; border-radius: 8px; background: linear-gradient(90deg, #3a2a10, #161d20); border: 1px solid #b8862e; color: #f3dc9a; margin-bottom: 6px; }
.evodone.warn { border-color: #6a4a5a; color: #e0b8c8; }
.evoskills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 8px; }
.evoskills.preview { opacity: .7; }
.evosk { border: 1px solid #303e45; border-radius: 8px; padding: 8px; background: #161d20; display: grid; gap: 5px; }
.evosk.maxed { border-color: #c9a24a; }
.evosk-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.evosk .pips i.step { outline: 1px solid #e6c46a; }
.evosk button { width: auto; justify-self: start; }
.ultrow.foreign { opacity: .55; }
@media (max-width: 860px) { .evowrap { grid-template-columns: 1fr; } }
/* v2.0-b.18 ตีบวกหินเวท */
.pluspanel .plusrow { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pluspanel .pstone { position: relative; width: 84px; height: 84px; border-radius: 12px; border: 1px solid #6a5426; background: radial-gradient(circle, #222c32, #0f1417); display: grid; place-items: center; }
.pluspanel .pbig { position: absolute; right: -6px; bottom: -6px; background: linear-gradient(#f3dc9a, #b8862e); color: #1a1208; font-weight: 800; border-radius: 8px; padding: 1px 7px; font-size: .95rem; }
.pluspanel .pinfo { flex: 1; min-width: 260px; display: grid; gap: 6px; }
.pluspanel .psel { max-width: 360px; }
.pluspanel .pinfo > button { width: auto; justify-self: start; }
.pres { padding: 6px 10px; border-radius: 8px; border: 1px solid #303e45; }
.pres.ok { border-color: #7fd48a; color: #b9f0c2; } .pres.bad { border-color: #e07070; color: #f3b0b0; } .pres.warn { border-color: #c9a24a; color: #f3dc9a; }
.plusb { color: #f3dc9a; }
.wbhere { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: linear-gradient(90deg, #4a1010, #161d20); border: 1px solid #c94a4a; color: #ffd0c0; display: inline-flex; gap: 6px; align-items: center; }
.wbhere .wbico { width: 22px; height: 22px; }
/* v2.0-b.19 หม้อหลอม: เลือกกองเดียว = 2 ก้อน */
.cslot.pair { position: relative; }
.cslot .cx2 { position: absolute; left: 6px; top: 6px; background: linear-gradient(#f3dc9a, #b8862e); color: #1a1208; font-weight: 800; border-radius: 8px; padding: 0 6px; font-size: .85rem; }
.cgem:disabled { cursor: not-allowed; }

/* v2.0-b.20 หน้าเวท & ลำดับ: ลำดับเวทติดอยู่กับที่ · คลังหินเลื่อนในกล่องตัวเอง */
.spl .oslot { min-height: 0; padding: 6px 8px; gap: 1px; font-size: .82rem; }
.spl .oslot .sicon { width: 28px; height: 28px; }
.spl .splorder { position: sticky; top: var(--wbh, 0px); z-index: 3; background: var(--bg, #0c1113); padding-bottom: 8px; }
.spl .splorder h3 { margin: 0 0 4px; } .spl .splorder > p { margin: 0 0 6px; font-size: .82rem; }
@media (min-width: 861px) {
  body.ingame .tab-spells .gmain > .gbody { overflow: hidden; display: flex; padding-right: 0; }
  body.ingame .tab-spells .spl { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; }
  body.ingame .tab-spells .oslot { min-width: 0; overflow: hidden; } body.ingame .tab-spells .oslot > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.ingame .tab-spells .splorder { position: static; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
  body.ingame .tab-spells .splorder .order { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  body.ingame .tab-spells .spllib { overflow-y: auto; min-height: 0; scrollbar-width: thin; padding-right: 4px; }
  body.ingame .tab-spells .spllib h3 { margin-top: 0; }
}
@media (max-width: 860px) {
  .spl .splorder .order { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .spl .oslot { padding: 4px; font-size: .7rem; text-align: center; justify-items: center; }
  .spl .oslot .spc { display: none; }
  .spl .oslot small { display: block; }
}
/* v2.0-b.22 ตำนานประจำพื้นที่ */
.astory p { margin: 0 0 8px; line-height: 1.7; font-size: .9rem; color: #d9cfe6; text-indent: 1.5em; }
.abox.astory p:last-child { margin-bottom: 0; }
.abox.astory h4 { color: #f3dc9a; }

/* v2.0-b.27 เควสรายวัน */
.dqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dq { border: 1px solid #303e45; border-radius: 10px; padding: 10px 12px; background: linear-gradient(#161d20, #0f1417); display: grid; gap: 7px; }
.dq.d2 { border-color: #506874; } .dq.d3 { border-color: #8a6a2a; }
.dq.done { box-shadow: 0 0 0 1px #c9a24a inset, 0 0 14px rgba(201, 162, 74, .25); }
.dq.claimed { opacity: .6; }
.dq .dstar { color: #e6c46a; letter-spacing: 1px; }
.dq .dqt { font-weight: 600; color: #f0e6ff; }
.dqbar { position: relative; height: 18px; border-radius: 9px; background: #0b0f11; border: 1px solid #253035; overflow: hidden; }
.dqbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #487f9a, #c9a24a); }
.dqbar span { position: relative; display: block; text-align: center; font-size: .75rem; line-height: 16px; }
.dqr { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .8rem; color: #d9cfe6; }
.dq > button { width: auto; justify-self: start; }
/* โปรไฟล์หอคอยในแชท */
.cavbtn { padding: 0; border: 0; background: none; cursor: pointer; width: auto; }
.chead .cname { font-weight: 700; padding: 0; text-decoration: none; }
.chead .cname:hover { text-decoration: underline; }
.profdlg { max-width: 460px; }
.profhead { display: flex; gap: 12px; align-items: center; position: relative; }
.profhead img { width: 88px; height: 88px; object-fit: contain; border-radius: 10px; border: 1px solid #303e45; background: #0f1417; }
.profhead h3 { margin: 0 0 4px; }
.profstats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: .88rem; }
.profx { position: absolute; right: 0; top: 0; font-size: 1.1rem; }
.profmaps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 3px; max-height: 50vh; overflow: auto; }
.profmaps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; padding: 4px 8px; border-radius: 6px; background: #141a1d; font-size: .85rem; color: #848f94; }
.profmaps li.ok { color: #e6dcf2; } .profmaps li.ok span { color: #7fd48a; }
.profmaps li em { font-style: normal; font-size: .76rem; color: #a2b1b8; }

/* ---------- v2.0-b.29 Accordion แนว Fallen Sword: ส่วนที่ข้อมูลเยอะย่อ/กางได้ หัวข้อเห็นสรุปเสมอ ---------- */
details.acc { background: var(--mc-card, var(--panel-2)); border: 1px solid var(--mc-line, var(--line)); border-radius: 10px; padding: 0; overflow: hidden; }
details.acc + details.acc { margin-top: 8px; }
details.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 40px; user-select: none;
  background: linear-gradient(180deg, rgba(217, 180, 90, .07), rgba(0, 0, 0, 0)); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary:hover { background: rgba(217, 180, 90, .1); }
details.acc > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
details.acc .chev { display: inline-block; width: 12px; color: var(--gold); font-weight: 700; transition: transform .15s; }
details.acc[open] > summary .chev { transform: rotate(90deg); }
details.acc[open] > summary { border-bottom: 1px solid rgba(217, 180, 90, .14); }
details.acc .acct { font-weight: 700; color: #f1e6c8; font-size: .95rem; min-width: 0; }
details.acc .accm { margin-left: auto; font-size: .78rem; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
details.acc .accm .ok, details.acc .accm .up { color: #8fdc93; }
details.acc > .accb { padding: 10px 12px; display: grid; gap: 6px; }
details.acc details.acc { background: rgba(0, 0, 0, .2); }
.accall { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin: 4px 0 8px; }
.accall > span { margin-right: auto; }
.accall .mini { padding: 3px 10px; font-size: .78rem; }
/* พื้นที่สำรวจ: กล่องข้อมูลเรียงเต็มแถว */
.ainfo > details.acc, .ainfo > .accall { grid-column: 1 / -1; margin: 0; }
.ainfo > details.acc + details.acc { margin-top: 0; }
details.acc.abox { display: block; }
details.acc .boss .bossimg { max-width: 220px; }
/* แผงขวา */
.gsideR details.acc.spanel { padding: 0; border-radius: 12px; }
.gsideR details.acc.spanel + details.acc.spanel { margin-top: 0; }
.gsideR details.acc.spanel > summary { padding: 8px 10px; min-height: 36px; }
.gsideR details.acc.spanel .acct { font-size: .9rem; color: var(--gold); display: flex; align-items: center; gap: 6px; }
.gsideR details.acc.spanel > .accb { padding: 8px 10px; gap: 2px; }
.gsideR details.acc.spanel .mini { margin-top: 6px; width: 100%; }
.gsideR details.acc.wbalive { border-color: #7a2a24 !important; background: linear-gradient(180deg, #2a1216, #111619) !important; }
.gsideR .accall.right { margin: 0 0 2px; }
.wbbar { height: 7px; border-radius: 4px; background: #3a1a1a; overflow: hidden; margin: 4px 0; }
.wbbar i { display: block; height: 100%; background: linear-gradient(90deg, #c94a4a, #e5735f); }
.spanel.nightp { padding: 8px 10px; }
/* แต้มสถานะ: แถวในหมวด */
.stlist details.acc > .accb { padding: 6px; }
.stlist details.acc .strow { margin: 0; }
/* ยศขุนนาง */
details.acc.rankacc > .accb { padding: 0; }
details.acc.rankacc .rankcard2 { border: 0 !important; box-shadow: none !important; border-radius: 0; margin: 0; }
details.acc.rankacc.r-owned { opacity: .92; }
details.acc.rankacc.r-open { border-color: #c9a24e !important; }
details.acc.rankacc + details.acc.rankacc { margin-top: 8px; }
/* ร้านค้า/ไอเทม */
.shcol > details.acc + details.acc, .shcol > details.acc + .panel2, .shcol > .panel2 + details.acc { margin-top: 12px; }
details.acc.panel2 > summary .acct { font-size: 1.02rem; }
.icard.small { min-height: 118px; }
/* บันทึกการต่อสู้ */
.battle details.blogacc { margin-top: 10px; background: rgba(0, 0, 0, .35); }
.battle details.blogacc > .accb, .battle details.blogacc > ol { margin: 0; }
.stlist > details.acc + details.acc, .ranks2 > details.acc + details.acc { margin-top: 0; }
.wbgrid { align-items: start; } .wbgrid > details.acc + details.acc { margin-top: 0; }
details.acc > table { margin: 8px 12px 12px; width: calc(100% - 24px); }
details.acc.panel2 { padding: 0 !important; }
details.acc > summary { flex-wrap: wrap; row-gap: 2px; }
details.acc .accm { max-width: 100%; }
body.ingame .tab-shop .gmain > .gbody { flex-direction: column; }
body.ingame .tab-shop .accall { margin: 0 0 6px; flex: none; }
.shcol details.acc > .accb p { font-size: .78rem; }
.shcol > details.acc, .shcol > * { flex: none; }
details.acc .acct { flex: 1 1 0; min-width: 7em; }
details.acc .accm { flex: 0 1 auto; }
details.acc .chev { flex: none; }

/* ---------- v2.0-b.30 คลังหินเวท: 1 การ์ดต่อ 1 ชนิด · กล่องเลเวลพร้อมจำนวน ---------- */
.libsticky { position: sticky; top: 0; z-index: 4; background: linear-gradient(180deg, #11171a 85%, rgba(17, 23, 26, 0)); padding-bottom: 6px; }
.libtop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.libtop h3 { margin: 0; flex: 1; }
.fuseallbtn { white-space: nowrap; }
.stcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; align-items: start; }
.stcard { background: var(--mc-card, var(--panel-2)); border: 1px solid var(--mc-line, var(--line)); border-left: 3px solid #6c7a8a; border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }
.stcard.tier2 { border-left-color: #6fbf73; } .stcard.tier3 { border-left-color: #5aa0ff; } .stcard.tier4 { border-left-color: #c77dff; } .stcard.tier5 { border-left-color: #ffb347; }
.sthead { display: flex; align-items: center; gap: 8px; }
.sthead .stn { flex: 1; min-width: 0; line-height: 1.25; }
.sthead .stn small { display: block; }
.sttotal { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.sttotal b { color: var(--gold); font-size: .95rem; }
.lvchips { display: flex; flex-wrap: wrap; gap: 4px; }
.lvchip { display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 8px; min-height: 30px; border-radius: 7px; background: #0c1113; border: 1px solid var(--mc-line, var(--line)); color: #d9cfe6; font-size: .8rem; }
.lvchip b { color: #f3dc9a; font-size: .85rem; }
.lvchip i { font-style: normal; font-size: .7rem; color: #9fd3f5; }
.lvchip:hover { border-color: var(--gold); }
.lvchip.on { border-color: var(--gold); background: #2a2012; }
.stact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; background: rgba(0, 0, 0, .3); border-radius: 8px; }
.stact > span { flex: 1; min-width: 120px; }
.stcard details.acc > summary { min-height: 30px; padding: 4px 8px; }
.stcard details.acc .acct { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stcard details.acc > .accb { padding: 6px 8px; font-size: .82rem; }
/* หน้าต่างหลอมเวททั้งหมด */
.fadlg { width: min(640px, 94vw); max-height: 88vh; overflow-y: auto; }
.fahead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fahead h3 { margin: 0; }
.facap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 2px; }
.fasum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; }
.fasum > div { background: #0c1113; border: 1px solid var(--mc-line, var(--line)); border-radius: 8px; padding: 6px 8px; display: grid; }
.fasum span { font-size: .72rem; color: var(--muted); } .fasum b { font-size: 1rem; }
.fatable { width: 100%; border-collapse: collapse; font-size: .84rem; }
.fatable td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); white-space: nowrap; }
.fatable td:first-child { white-space: normal; width: 45%; }
.fadlg details.acc + details.acc { margin-top: 6px; }
@media (max-width: 560px) { .fasum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stcards { grid-template-columns: 1fr; } }
/* b.30 ระดับอุปกรณ์ */
.eqg-common { --rc: #9aa3ad; } .eqg-uncommon { --rc: #6fcf73; } .eqg-rare { --rc: #4da3ff; } .eqg-epic { --rc: #b06bff; } .eqg-legendary { --rc: #ffb84d; } .eqg-mythic { --rc: #ff4d6d; }
.tag[class*="eqg-"], .eqgrades .mini[class*="eqg-"] { border-color: var(--rc) !important; color: var(--rc); }
.eqgrades { gap: 4px; margin-top: 4px; }
/* b.30 สำรวจ: กล่องปุ่มตี (จุดสำรวจ) ล็อกด้านบนเมื่อเลื่อนดูข้อมูลพื้นที่ */
.ainfo > .abox:first-child { position: sticky; top: 0; z-index: 5; box-shadow: 0 6px 16px rgba(0, 0, 0, .55); }
/* b.30 Battle Report: บันทึกทีละเทิร์นขยายตามเนื้อหา ไม่มี scrollbar ซ้อน */
.battle details.blogacc .log { max-height: none; overflow: visible; margin-top: 0; }
.libsticky { background: #101518; box-shadow: 0 8px 10px -6px rgba(0, 0, 0, .7); padding-top: 2px; }
.libtop .fuseallbtn { width: auto !important; flex: none; margin-left: auto; padding: 8px 16px; min-height: 40px; }
.libtop h3 { flex: 1 1 auto; }
@media (max-width: 860px) { .libsticky { position: static; box-shadow: none; } }

/* ---------- v2.0-b.31 หน้าสำรวจ (PC): หัวพื้นที่ + กล่องปุ่มตี ล็อกนิ่ง · เลื่อนเฉพาะข้อมูลพื้นที่ด้านล่าง ---------- */
.actbox { gap: 8px; padding: 10px 12px; }
.actbox .akv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 16px; }
.actbox .kv { font-size: .82rem; align-items: baseline; gap: 8px; white-space: nowrap; }
.actbox .kv b { overflow: hidden; text-overflow: ellipsis; }
.actbox .actrow { display: flex; gap: 8px; align-items: center; }
.actbox .actrow .primary { flex: 1; min-height: 38px; padding: 6px 10px; font-size: .95rem; margin: 0; }
.actbox .actrow .toggle { margin: 0; font-size: .78rem; white-space: nowrap; gap: 5px; }
.ainfo-more { display: grid; gap: 8px; }
.ainfo-more > details.acc + details.acc { margin-top: 0; }
.ainfo { display: flex; flex-direction: column; gap: 8px; }
.ainfo > .abox:first-child { position: static; box-shadow: none; }
@media (max-width: 560px) { .actbox .actrow { flex-wrap: wrap; } .actbox .actrow .toggle { flex-basis: 100%; } }
@media (min-width: 861px) {
  .bsplit .bleft:has(> .area) { display: flex; flex-direction: column; overflow: hidden; padding-right: 0; }
  .bsplit .bleft > .area { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .bsplit .bleft > .area > .ahero { flex: none; }
  .bsplit .bleft > .area > .ainfo { flex: 1; min-height: 0; margin-top: 8px; }
  .bsplit .bleft > .area > .ainfo > .actbox { flex: none; }
  .bsplit .bleft > .area .ainfo-more { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; align-content: start; }
  /* Battle Report: ไม่มี scrollbar ด้านนอก — รายการรอบเลื่อนในตัวเองเต็มความสูงที่เหลือ */
  .bsplit .bright { scrollbar-width: none; }
  .bsplit .bright::-webkit-scrollbar { display: none; }
  .bsplit .bright > #battle:not(:empty) { height: 100%; }
  .bsplit .battle.batch { height: 100%; display: flex; flex-direction: column; box-sizing: border-box; }
  .bsplit .battle.batch > * { flex: none; }
  .bsplit .battle.batch .blist { flex: 1 1 auto; min-height: 140px; max-height: none; margin-bottom: 0; }
  /* ปุ่มตีซ้ำมีอยู่แล้วที่ฝั่งซ้าย → ไม่ต้องแสดงซ้ำใน Battle Report */
  .bsplit .bright .bagain { display: none; }
}
.ainfo-more { display: flex; flex-direction: column; gap: 8px; }
.ainfo-more > * { flex: none; }
@media (min-width: 861px) {
  .bsplit .bright > #battle > .battle { margin: 0; }
  .bsplit .bright { box-sizing: border-box; }
}

/* ---------- v2.0-b.32 God Item: การ์ดกระชับ 2×2 พอดีจอ · กติกาและประวัติอยู่ใน Accordion ---------- */
.godhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.godhead .godtitle { margin: 0; }
.godcard .gsrc { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.godcard .gsrc span { opacity: .8; }
body.ingame .tab-god .godgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
body.ingame .tab-god .godcard { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "img name" "img eff" "img src" "img loyal" "img owner" "btn btn"; text-align: left; align-items: center; gap: 1px 10px; padding: 8px 10px; }
body.ingame .tab-god .godcard .gname2 { grid-area: name; font-size: .95rem; line-height: 1.2; }
body.ingame .tab-god .godcard .geff { grid-area: eff; font-size: .76rem; line-height: 1.25; }
body.ingame .tab-god .godcard .gsrc { grid-area: src; }
body.ingame .tab-god .godcard .gimg { grid-area: img; width: 64px; height: 64px; align-self: start; }
body.ingame .tab-god .godcard .loyal { grid-area: loyal; font-size: .72rem; }
body.ingame .tab-god .godcard .gowner { grid-area: owner; font-size: .74rem; }
body.ingame .tab-god .godcard > button { grid-area: btn; margin-top: 4px; padding: 4px 10px; min-height: 32px; font-size: .82rem; }
body.ingame .tab-god .godtitle + p { display: none; }
body.ingame .tab-god .godlog { max-height: none; overflow: visible; }
@media (max-width: 480px) { body.ingame .tab-god .godgrid { grid-template-columns: 1fr; } }
/* God Item ในหน้าแบ่ง 2 ฝั่ง: การ์ดเป็นแถวเตี้ย 4 แถว พอดีจอไม่ต้องเลื่อน */
body.ingame .tab-god .bsplit .godgrid { grid-template-columns: 1fr; gap: 6px; }
body.ingame .tab-god .bsplit .godcard { grid-template-columns: 52px minmax(0, 1fr) 118px; grid-template-areas: "img name loyal" "img eff owner" "img src btn"; gap: 0 10px; padding: 6px 10px; }
body.ingame .tab-god .bsplit .godcard .gimg { width: 52px; height: 52px; align-self: center; }
body.ingame .tab-god .bsplit .godcard .gname2 { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ingame .tab-god .bsplit .godcard .geff { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ingame .tab-god .bsplit .godcard .loyal { font-size: .7rem; gap: 4px; }
body.ingame .tab-god .bsplit .godcard .gowner { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
body.ingame .tab-god .bsplit .godcard > button { margin: 2px 0 0; min-height: 28px; padding: 2px 6px; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ingame .tab-god .godhead { margin: 0 0 4px; gap: 6px 10px; }
body.ingame .tab-god .godhead .godtitle { font-size: 1.15rem; }
body.ingame .tab-god .bsplit .godcard { padding: 4px 8px; grid-template-columns: 46px minmax(0, 1fr) 112px; }
body.ingame .tab-god .bsplit .godcard .gimg { width: 46px; height: 46px; }
body.ingame .tab-god .bsplit .godcard .geff, body.ingame .tab-god .bsplit .godcard .gsrc { font-size: .7rem; }
body.ingame .tab-god .bsplit .godcard > button { min-height: 24px; margin-top: 1px; }
body.ingame .tab-god .bsplit .godgrid { gap: 5px; margin: 6px 0; }
body.ingame .tab-god details.acc > summary { min-height: 34px; padding: 5px 10px; }
body.ingame .tab-god .godhead { flex-wrap: nowrap; white-space: nowrap; }
body.ingame .tab-god .godhead > span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1250px) {
  body.ingame .tab-god .bsplit .godcard { grid-template-columns: 46px minmax(0, 1fr); grid-template-areas: "img name" "img eff" "img loyal" "img owner" "btn btn"; }
  body.ingame .tab-god .bsplit .godcard .gsrc { display: none; }
  body.ingame .tab-god .bsplit .godcard .gowner { text-align: left; }
}

/* ---------- v2.0-b.33 ลำดับเวท 10 เทิร์น: แถวกะทัดรัด อยู่ในหน้าเดียว ไม่มี scrollbar ---------- */
.spl .oslot.orow { display: grid; grid-template-columns: 18px 26px minmax(0, 1fr) auto; align-items: center; gap: 0 8px; padding: 4px 8px; min-height: 36px; text-align: left; justify-items: stretch; }
.spl .oslot.orow .otn { color: var(--gold); font-weight: 700; font-size: .8rem; text-align: center; }
.spl .oslot.orow .sicon { width: 26px; height: 26px; }
.spl .oslot.orow .oico0 { width: 26px; text-align: center; color: var(--muted); }
.spl .oslot.orow .oname { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spl .oslot.orow .ometa { font-size: .72rem; color: #7fb0ff; white-space: nowrap; }
.spl .oslot.orow.empty { opacity: .75; }
@media (min-width: 861px) {
  body.ingame .tab-spells .splorder .order { grid-template-columns: 1fr; gap: 3px; }
  body.ingame .tab-spells .splorder { scrollbar-width: none; }
  body.ingame .tab-spells .splorder::-webkit-scrollbar { display: none; }
  body.ingame .tab-spells .splorder > p { font-size: .76rem; line-height: 1.4; }
}
@media (max-width: 860px) {
  .spl .oslot.orow { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1px; padding: 4px 2px; }
  .spl .oslot.orow .oname { font-size: .68rem; max-width: 100%; }
  .spl .oslot.orow .ometa { font-size: .62rem; }
}
@media (min-width: 861px) {
  body.ingame .tab-spells .spl .oslot.orow { height: 32px; min-height: 0; padding: 0 8px; }
  body.ingame .tab-spells .spl .oslot.orow .sicon { width: 24px; height: 24px; }
  body.ingame .tab-spells .splorder h3 { margin: 0 0 2px; }
  body.ingame .tab-spells .splorder > p { font-size: .72rem; line-height: 1.35; margin: 0 0 6px; }
}

/* ---------- v2.0-b.34 ร้านค้า: กล่องสุ่มเวท จัดใหม่ให้อยู่ในกรอบ (ตารางบน · คำอธิบาย + ปุ่มล่าง) ---------- */
.gacha .gachagrid { grid-template-columns: 1fr; gap: 8px; }
.gacha .gachagrid .rates { width: 100%; font-size: .82rem; }
.gacha .gachagrid .rates th, .gacha .gachagrid .rates td { padding: 3px 6px; }
.gacha .gachagrid p { font-size: .76rem; margin: 0 0 6px; }
.gacha .gbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gacha .gbtns button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 42px; padding: 4px 6px; font-size: .86rem; line-height: 1.2; margin: 0; min-width: 0; }
.gacha .gbtns button small { font-size: .72rem; font-weight: 600; opacity: .85; }
.gacha .gresults { font-size: .78rem; }

/* ---------- v2.0-b.35 คำอธิบายวิธีติดตั้งหินเวท (ใต้ลำดับเวท 10 เทิร์น · เฉพาะ PC) ---------- */
.orderhelp { display: none; }
@media (min-width: 861px) {
  body.ingame .tab-spells .orderhelp { display: block; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--mc-line, var(--line)); border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: .76rem; line-height: 1.5; color: #d9cfe6; }
  body.ingame .tab-spells .orderhelp h4 { margin: 0 0 4px; font-size: .84rem; color: var(--gold); }
  body.ingame .tab-spells .orderhelp ol { margin: 0 0 6px; padding-left: 18px; display: grid; gap: 3px; }
  body.ingame .tab-spells .orderhelp b { color: #f3dc9a; font-weight: 600; }
  body.ingame .tab-spells .orderhelp .ohchip { display: inline-block; padding: 0 5px; border: 1px solid var(--mc-line, var(--line)); border-radius: 5px; background: #0c1113; font-size: .72rem; color: #f3dc9a; }
  body.ingame .tab-spells .orderhelp .ohnote { color: var(--muted); font-size: .72rem; line-height: 1.55; }
}
@media (min-width: 861px) {
  body.ingame .tab-spells .orderhelp { margin-top: 6px; padding: 6px 9px; line-height: 1.4; font-size: .74rem; }
  body.ingame .tab-spells .orderhelp ol { gap: 1px; margin-bottom: 4px; }
}
@media (min-width: 861px) and (max-height: 800px) { body.ingame .tab-spells .orderhelp { display: none; } }

/* ---------- v2.0-b.36 หลอมเวททั้งหมด: เลือกผลึกช่วยหลอม ---------- */
.fagem { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); align-items: stretch; }
.fagem > span { align-self: center; }
.fagem .gemopt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; min-height: 64px; border-radius: 10px; background: #11171a; border: 1px solid var(--mc-line, var(--line)); color: #e8e1d1; font-size: .78rem; text-align: center; }
.fagem .gemopt .gemi { width: 20px; height: 20px; }
.fagem .gemopt b { font-size: .8rem; color: #f3dc9a; font-weight: 600; }
.fagem .gemopt small { font-size: .7rem; color: var(--muted); }
.fagem .gemopt:hover { border-color: var(--gold); }
.fagem .gemopt.on { border-color: var(--gold); background: #2a2012; box-shadow: 0 0 0 1px rgba(217, 180, 90, .35); }
@media (max-width: 560px) { .fagem { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fagem > span { grid-column: 1 / -1; } }
/* v2.0-b.71: ไอเทมช่วยหลอมในหน้าหลอมทั้งหมด (ใบกันแตก / น้ำยาเสริมโชค) */
.fagem.faitems { grid-template-columns: auto repeat(2, minmax(0, 1fr)); }
.fasum > .fause { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.fagem.faitems .gemopt > span { font-size: 1.1rem; line-height: 1; }
.fagem.faitems .gemopt:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .fagem.faitems { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- v2.0-b.37 เมนูหลักแบบ Accordion (PC) ---------- */
.navacc > .navhead { display: flex; align-items: center; gap: 6px; width: 100%; background: transparent; border: 0; cursor: pointer; text-align: left; font: inherit; min-height: 28px; border-radius: 6px; }
.navacc > .navhead:hover { background: rgba(217, 180, 90, .08); color: #e6c46a; }
.navacc > .navhead .nchev { display: inline-block; width: 10px; color: var(--gold); font-weight: 700; transition: transform .15s; transform: rotate(90deg); }
.navacc.collapsed > .navhead .nchev { transform: rotate(0deg); }
.navacc > .navhead .ntitle { flex: 1; }
.navacc > .navhead .nsum { display: none; }
.navacc.collapsed > .navhead .nsum { display: inline-block; }
.navacc.collapsed.hasactive > .navhead { color: #f3dc9a; }
.navacc > .navitems { display: flex; flex-direction: column; }
.navacc.collapsed > .navitems { display: none; }
@media (max-width: 860px) {
  .navacc > .navitems, .navacc.collapsed > .navitems { display: flex; flex-direction: row; }
}
/* ---------- v2.0-b.37 คลังสมบัติ ---------- */
.vault { display: grid; gap: 10px; }
.vaulthead h3 { margin: 0 0 4px; }
.vstats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
.vbox { background: var(--mc-card, var(--panel-2)); border: 1px solid var(--mc-line, var(--line)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.vbox > span { font-size: .8rem; color: var(--muted); }
.vbox > b { font-size: 1.5rem; color: #f3dc9a; font-variant-numeric: tabular-nums; }
.vbox.vmain { border-color: #6a5426; background: linear-gradient(135deg, rgba(217, 180, 90, .12), rgba(0, 0, 0, .3)); }
.vbar { height: 8px; border-radius: 4px; background: #241e10; overflow: hidden; }
.vbar i { display: block; height: 100%; background: linear-gradient(90deg, #b8862e, #f3dc9a); }
.vforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vform { display: grid; gap: 8px; align-content: start; }
.vform h4 { margin: 0; }
.vform .vin input { width: 100%; box-sizing: border-box; font-size: 1.05rem; padding: 8px 10px; }
.vform .vquick { display: flex; gap: 6px; }
.vform .vquick .mini { flex: 1; }
.vform > .primary { min-height: 40px; margin: 0; }
@media (max-width: 640px) { .vstats, .vforms { grid-template-columns: 1fr; } }
.vnav .navacc > .navhead { justify-content: flex-start; padding: 4px 8px 6px; border-left: 0; color: #b8a27a; font-size: .8rem; letter-spacing: .06em; }
@media (max-width: 860px) { .vnav .navacc > .navhead { display: none; } }

/* ---------- v2.0-b.38 ผลการตี 10 รอบ: ส่วนสรุปเตี้ยลง ~30% (ข้อมูลครบเหมือนเดิม) ---------- */
.battle.batch { padding: 12px 14px; }
.battle.batch > .rtitle { font-size: 1.1rem; margin: 0 0 2px; line-height: 1.3; }
.battle.batch > .bsum { margin: 2px 0 6px; gap: 4px 12px; font-size: .86rem; }
.battle.batch .rwbox { gap: 6px; margin-top: 2px; }
.battle.batch .rwsum { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.battle.batch .rwk { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 6px; padding: 4px 8px; }
.battle.batch .rwk span { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle.batch .rwk b { font-size: .92rem; white-space: nowrap; }
.battle.batch .rwsec { padding: 4px 8px; }
.battle.batch .rwsec h5 { margin: 0 0 2px; font-size: .78rem; }
.battle.batch .rwsec li { padding: 1px 0; font-size: .82rem; line-height: 1.35; }
@media (max-width: 420px) { .battle.batch .rwsum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.battle.batch > .result { margin: 0; padding: 0; }
.battle.batch .rwsum { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.battle.batch .rwk span { overflow: visible; text-overflow: clip; flex: none; }
.battle.batch .rwk b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.battle.batch .rwsec.rwnote li { font-size: .8rem; }
.battle.batch .rwsec:not(.rwnote) ul { flex-direction: row; flex-wrap: wrap; gap: 2px 12px; }
.battle.batch .rwsec:not(.rwnote) li { border-bottom: 0; justify-content: flex-start; gap: 4px; }
.battle.batch .rwsec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.battle.batch .rwsec h5 { margin: 0; white-space: nowrap; }
.battle.batch .rwsec ul { flex: 1 1 160px; min-width: 0; }

/* ---------- v2.0-b.39 วิดีโอเปิดตัวในหน้าแรก ---------- */
.pt-video { margin: 22px auto 6px; max-width: 760px; border: 2px solid rgba(217, 180, 90, .7); border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 40px rgba(217, 180, 90, .25), 0 18px 40px rgba(0, 0, 0, .7); aspect-ratio: 16 / 9; }
.pt-video video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- v2.0-b.40 ลำดับเวท โจมตี / ป้องกัน ---------- */
.omode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0 6px; }
.omode button { padding: 5px 6px; min-height: 32px; border-radius: 8px; background: #11171a; border: 1px solid var(--mc-line, var(--line)); color: #cad2d6; font-size: .82rem; font-weight: 600; margin: 0; }
.omode button.on { background: #2a2012; border-color: var(--gold); color: #f3dc9a; }
.omode button[data-omode="defense"].on { background: #10202e; border-color: #5aa0ff; color: #bfe0ff; }
.odef { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 8px; margin-bottom: 6px; border-radius: 8px; font-size: .74rem; background: rgba(255, 170, 60, .08); border: 1px solid rgba(255, 170, 60, .35); color: #f0d79a; }
.odef.on { background: rgba(90, 160, 255, .08); border-color: rgba(90, 160, 255, .4); color: #bfe0ff; }
.odef > span:first-child { flex: 1 1 160px; }
.odefb { display: flex; gap: 4px; }
.odefb .mini { padding: 2px 8px; font-size: .72rem; }
.splorder.defmode .oslot.sel { border-color: #5aa0ff; box-shadow: 0 0 0 1px #5aa0ff inset; }
@media (min-width: 861px) {
  body.ingame .tab-spells .splorder > p.idlehint { display: none; } /* คำอธิบายอยู่ในกล่องวิธีติดตั้งแล้ว */
  body.ingame .tab-spells .splorder.defmode .orderhelp { display: none; } /* โหมดป้องกันมีแถบอธิบายของตัวเอง */
}

/* ---------- v2.0-b.40 ไกด์ตามช่วงเกม (หน้าเว็บหลัก + ในเกม) ---------- */
.pt-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.pt-gcard { background: var(--pcard); border: 1px solid var(--pline); border-top: 3px solid var(--pg); border-radius: 14px; padding: 16px 18px; }
.pt-gcard.g-early { border-top-color: #6fcf73; } .pt-gcard.g-mid { border-top-color: #5aa0ff; } .pt-gcard.g-late { border-top-color: #f0cf7a; }
.pt-gh { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pt-gi { font-size: 1.8rem; }
.pt-gh h3 { margin: 0; color: #f3dc9a; font-size: 1.2rem; }
.pt-glv { font-size: .82rem; color: var(--pmut); }
.pt-ggoal { margin: 0 0 8px; font-weight: 600; color: #ece6d6; }
.pt-gcard ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: #d1dadf; font-size: .9rem; line-height: 1.5; }
.phaseh { margin: 16px 0 8px; color: var(--gold); }
.phaselist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .86rem; line-height: 1.5; }

/* ---------- v2.0-b.45 Battle Report: หน้าต่างลอย (ลาก/ปรับขนาด/ปิดได้) · ประวัติโจมตี/ป้องกัน · Replay ---------- */
.fwin { position: fixed; z-index: 900; display: flex; flex-direction: column; background: #0c1012; border: 1px solid #5a4528; border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.78), 0 0 0 1px rgba(0,0,0,.6); overflow: hidden; resize: both; min-width: 300px; min-height: 260px; max-width: 100vw; max-height: 100vh; }
.fwin[hidden] { display: none; }
.fwin { container-type: inline-size; }
@container (max-width: 470px) { .fwtt { display: none; } }
.fwhead { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: linear-gradient(180deg, #2b2015, #17110c); border-bottom: 1px solid #5a4528;
  cursor: move; user-select: none; touch-action: none; flex: none; }
.fwtitle { font-weight: 700; color: #e8c987; white-space: nowrap; font-size: .9rem; }
.fwtabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fwtabs::-webkit-scrollbar { display: none; }
.fwtabs button, .fwbtn { width: auto; padding: 4px 9px; font-size: .78rem; border-radius: 6px; border: 1px solid #404c52; background: #181d20; color: var(--text); white-space: nowrap; cursor: pointer; }
.fwtabs button.active { background: linear-gradient(180deg, #e2c071, #b88c3a); color: #1a1208; border-color: #e8c987; font-weight: 700; }
.fwbtn[hidden] { display: none; }
.fwx { margin-left: 2px; }
.fwbody { flex: 1; min-height: 0; position: relative; }
.fwin .fwlive { display: block; height: 100%; }
.fwin .fwlive[hidden], .fwin .fwpane[hidden] { display: none; }
.fwin .fwlive > .bright { height: 100%; box-sizing: border-box; overflow-y: auto; border: 0; border-radius: 0; padding: 10px; background: transparent; scrollbar-width: thin; }
.fwin .fwlive > .bright > #battle { margin: 0; }
.fwin #battle:empty::before { content: 'ยังไม่มีผลการต่อสู้ — กดต่อสู้ หรือเปิดประวัติจากแท็บด้านบน'; display: block; color: var(--muted); text-align: center; padding: 34px 12px; }
.fwpane { height: 100%; overflow-y: auto; padding: 10px; box-sizing: border-box; scrollbar-width: thin; }
/* ช่องในหน้าเดิม (หน้าต่างวางทับตรงนี้) */
.bslot { display: flex; align-items: center; justify-content: center; }
.bslothint { color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 20px; }
.bslothint button, .bslotm button { width: auto; }
.bslotm { margin: 10px 0; text-align: center; }
/* รายการประวัติ */
.brhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.brhead > span:first-child { flex: 1; min-width: 160px; }
.brlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.brrow { display: flex; align-items: center; gap: 6px; background: #141a1d; border: 1px solid #2b353a; border-left: 3px solid #555; border-radius: 8px; padding: 4px 6px 4px 4px; }
.brrow.win { border-left-color: #58c27a; } .brrow.lose { border-left-color: #d65a5a; } .brrow.draw { border-left-color: #c9a64a; }
.brmain { flex: 1; min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; background: none; border: 0; color: var(--text); text-align: left; padding: 4px; cursor: pointer; width: auto; }
.brmain:hover { background: rgba(255,255,255,.04); border-radius: 6px; }
.brres { font-weight: 700; font-size: .82rem; white-space: nowrap; }
.brres.win { color: #6fd38f; } .brres.lose { color: #ef7a7a; } .brres.draw { color: #e0c066; }
.brwho { display: flex; flex-direction: column; min-width: 0; }
.brwho b, .brwho small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brdmg { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; gap: 1px; white-space: nowrap; }
.brno { max-width: 140px; text-align: right; line-height: 1.25; }
.brempty { text-align: center; padding: 24px 8px; }
.brconfirm { background: #1f1414; border: 1px solid #7a3a3a; border-radius: 10px; padding: 10px; margin: 0 0 10px; }
.brtarget { display: flex; gap: 10px; align-items: center; margin: 6px 0; }
.brtarget .mimg { width: 48px; height: 48px; object-fit: contain; }
/* Replay */
.brtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.brtop > span { flex: 1; min-width: 140px; }
.brcards { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: stretch; }
.brcards .vsx { align-self: center; font-weight: 800; color: var(--gold); }
.brcard { background: #141a1d; border: 1px solid #2b353a; border-radius: 8px; padding: 6px 8px; min-width: 0; }
.brcard.me { border-color: #2f5a7a; } .brcard.foe { border-color: #6a2f3a; }
.brcn { font-size: .75rem; color: var(--muted); }
.brfirst { color: #1a1208; background: var(--gold); border-radius: 4px; padding: 0 4px; font-size: .7rem; font-weight: 700; }
.brstat { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--muted); margin-top: 2px; }
.brsum { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 8px 0; font-size: .85rem; }
.brnav { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.brtcs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.brtc { width: auto; min-width: 30px; padding: 3px 6px; font-size: .78rem; border-radius: 6px; border: 1px solid #343f45; background: #181d20; color: var(--text); cursor: pointer; }
.brtc.on { background: var(--gold); color: #1a1208; border-color: var(--gold); font-weight: 700; }
.brturn { background: rgba(9, 12, 13, .6); border: 1px solid #273136; border-radius: 10px; padding: 8px; }
.brth { font-weight: 700; color: #e8c987; }
.brlegend { display: flex; gap: 12px; margin: 2px 0 6px; } .brlegend .me { color: #7cc0f0; } .brlegend .foe { color: #f08a8a; }
.bracts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.bract { display: flex; gap: 6px; align-items: flex-start; padding: 5px 7px; border-radius: 8px; background: #13181b; border: 1px solid #252d31; max-width: 92%; }
.bract.me { align-self: flex-start; border-left: 3px solid #4b9be0; }
.bract.foe { align-self: flex-end; border-right: 3px solid #e05a5a; background: #1c1216; }
.bract.sys { align-self: center; max-width: 100%; background: transparent; border-style: dashed; }
.bract.win, .bract.lose, .bract.draw { align-self: stretch; max-width: 100%; font-weight: 700; }
.brn { flex: none; min-width: 18px; height: 18px; border-radius: 50%; background: #252d31; color: var(--muted); font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.bract .sicon.log { width: 22px; height: 22px; flex: none; }
.brtx { min-width: 0; font-size: .84rem; line-height: 1.35; }
.brfx { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.brafter { margin-top: 1px; }
.brend { margin-top: 8px; border-top: 1px dashed #343f45; padding-top: 6px; }
.brbars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) {
  .brmain { grid-template-columns: 54px minmax(0, 1fr); }
  .brdmg { grid-column: 2; flex-direction: row; gap: 8px; align-items: center; }
  .brrow { flex-wrap: wrap; }
  .bract { max-width: 100%; }
}

/* ---------- v2.0-b.46 อุปกรณ์: ช่องสวมใส่ย่อลง ~50% · ปุ่มขายทั้งระดับเห็นชัดขึ้น ---------- */
.eqtot { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.eqtot > span { white-space: nowrap; }
body.ingame .tab-equip .eqtop2 { grid-template-columns: minmax(0, 1fr) 236px; gap: 6px; }
body.ingame .tab-equip .eqgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
body.ingame .tab-equip .eqbig { min-height: 0; padding: 3px 7px 4px; font-size: .72rem; border-radius: 8px; }
body.ingame .tab-equip .eqbig.empty { min-height: 50px; flex-direction: row; gap: 6px; }
body.ingame .tab-equip .eqbig::after { width: 22%; height: 86%; right: 2px; }
body.ingame .tab-equip .eqbig > * { max-width: 80%; }
body.ingame .tab-equip .eqbig .eqlabel { font-size: .64rem; line-height: 1.3; padding-right: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ingame .tab-equip .eqbig .eqtitle { font-size: .76rem; line-height: 1.25; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ingame .tab-equip .eqbig .eqstats { gap: 0 6px; font-size: .66rem; margin: 1px 0 0; line-height: 1.3; }
body.ingame .tab-equip .eqbig .eqbtns { position: absolute; top: 3px; right: 4px; margin: 0; gap: 3px; z-index: 2; max-width: none; flex-wrap: nowrap; }
body.ingame .tab-equip .eqbig .eqbtns .mini { padding: 0 5px; font-size: .62rem; line-height: 1.45; min-height: 0; border-radius: 4px; }
body.ingame .tab-equip .eqsum { padding: 6px 9px; font-size: .72rem; }
body.ingame .tab-equip .eqsum h3 { font-size: .82rem; margin: 0 0 3px; }
body.ingame .tab-equip .eqsum .eqtot { line-height: 1.4; }
/* ขายทั้งระดับ: หัว accordion เด่นขึ้น + ปุ่มขายสีตามระดับ (ขนาดเท่าเดิม) */
.acc.sellacc > summary { background: linear-gradient(90deg, rgba(217, 180, 90, .2), rgba(217, 180, 90, .05)); border: 1px solid rgba(217, 180, 90, .55); border-radius: 8px; color: #f3d98e; }
.acc.sellacc > summary .acct { font-weight: 700; }
.acc.sellacc > summary .acct small { font-weight: 400; color: #cdb98a; margin-left: 6px; font-size: .74rem; }
.acc.sellacc[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sellbtn { border: 1px solid var(--rc, var(--gold)); color: #fff; background: color-mix(in srgb, var(--rc, #d9b45a) 28%, #151b1e); font-weight: 600; white-space: nowrap; }
.sellbtn b { color: #ffe08a; }
.sellbtn:hover:not(:disabled) { background: color-mix(in srgb, var(--rc, #d9b45a) 45%, #151b1e); }
.sellbtn:disabled { opacity: .45; }
.sellacc .srow { align-items: center; }

/* ---------- v2.0-b.46 Unified Vector Skill Tree ---------- */
.ust { display: flex; flex-direction: column; gap: 6px; }
.ustbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ustbar .mini { padding: 3px 9px; }
.ustsearch { position: relative; flex: 1 1 180px; max-width: 280px; }
.ustsearch input { width: 100%; padding: 4px 10px; font-size: .82rem; border-radius: 6px; background: #101517; border: 1px solid #343f45; color: var(--text); box-sizing: border-box; }
.ustres { position: absolute; z-index: 30; top: calc(100% + 3px); left: 0; right: 0; background: #141a1d; border: 1px solid #414f56; border-radius: 8px; padding: 4px; box-shadow: 0 10px 28px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 2px; min-width: 240px; }
.ustres[hidden] { display: none; }
.ustres button { display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; color: var(--text); padding: 4px 6px; border-radius: 6px; cursor: pointer; width: 100%; font-size: .82rem; }
.ustres button:hover { background: rgba(217, 180, 90, .14); }
.ustres img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
.ustcnt { flex-basis: 100%; }
.ustvp { position: relative; height: clamp(440px, calc(100vh - 330px), 860px); border-radius: 12px; overflow: hidden; border: 1px solid #323f45;
  background: radial-gradient(ellipse at 50% 40%, rgba(120, 80, 170, .16), transparent 60%), radial-gradient(circle at 50% 50%, #12181b, #090c0d 80%); touch-action: none; cursor: grab; overscroll-behavior: contain; }
.ustvp.dragging { cursor: grabbing; }
.ustvp::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 26px 26px; }
#ustsvg { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; }
/* กรอบหมวด */
.ug rect { fill: rgba(255, 255, 255, .025); stroke: rgba(255, 255, 255, .12); stroke-width: 1.2; stroke-dasharray: 6 5; }
.ugt { fill: #cdbfe0; font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.ugs { fill: #8a979d; font-size: 11px; font-weight: 400; }
.ug-ult rect { stroke: rgba(240, 190, 90, .45); fill: rgba(240, 190, 90, .05); } .ug-ult .ugt { fill: #f0cf7a; }
.ug-noble rect { stroke: rgba(217, 180, 90, .32); } .ug-noble .ugt { fill: #e6c879; }
.ug-path rect { stroke: rgba(120, 190, 255, .3); } .ug-rank rect { stroke: rgba(200, 130, 255, .28); }
/* เส้น */
.ue { fill: none; stroke: #455055; stroke-width: 2.4; stroke-dasharray: 5 5; }
.ue.met { stroke: #d9b45a; stroke-dasharray: none; filter: drop-shadow(0 0 3px rgba(217, 180, 90, .6)); }
.ue.trunk { stroke-width: 3.2; }
.ue.trunk.met { stroke: #a98fd6; filter: drop-shadow(0 0 4px rgba(169, 143, 214, .6)); }
.ue.fork { stroke-width: 3; }
.ue.fork.open { stroke: #6fb4ff; stroke-dasharray: 8 5; }
.ue.fork.chosen { stroke: #6fd38f; stroke-dasharray: none; filter: drop-shadow(0 0 4px rgba(111, 211, 143, .7)); }
.ue.fork.dead { stroke: #343c40; opacity: .55; }
.uel { fill: #95a0a6; font-size: 11px; paint-order: stroke; stroke: #0a0d0e; stroke-width: 3px; }
/* จุดเริ่ม (หอคอย) + จุดเลือกสาย */
.urg { fill: none; stroke: rgba(169, 143, 214, .5); stroke-width: 2; stroke-dasharray: 3 5; animation: ustspin 18s linear infinite; transform-box: fill-box; transform-origin: center; }
.urc { fill: #192125; stroke: #a98fd6; stroke-width: 2.5; filter: url(#ustglow); }
.urt { fill: #f3e6ff; font-size: 13px; font-weight: 700; paint-order: stroke; stroke: #0a0d0e; stroke-width: 3px; }
.urs { fill: #a3b1b8; font-size: 11px; paint-order: stroke; stroke: #0a0d0e; stroke-width: 3px; }
.uj rect { fill: #181d20; stroke: #535f65; stroke-width: 2; }
.uj text { fill: #b4bfc5; font-size: 12px; font-weight: 700; }
.uj.open rect { stroke: #6fb4ff; filter: url(#ustglow); } .uj.open text { fill: #cfe6ff; }
.uj.done rect { stroke: #6fd38f; } .uj.done text { fill: #bff0cc; }
/* Node */
.un { cursor: pointer; }
.un .ub { fill: #171d20; stroke: #384246; stroke-width: 1.6; }
.un .uir { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 1; }
.un image { opacity: .9; }
.unm { fill: #ece6f5; font-size: 13px; font-weight: 700; }
.urk { fill: #d9c690; font-size: 11px; font-weight: 700; }
.ulv { fill: #8a979d; font-weight: 400; }
.up { fill: #353f44; } .up.on { fill: #e2c071; }
.ulk { fill: #95a0a6; font-size: 11px; font-weight: 700; } .ulk.mx { fill: #ffd977; font-size: 14px; }
.urd { fill: #6fd38f; filter: url(#ustglow); animation: ustpulse 1.4s ease-in-out infinite; }
.un.locked .ub, .un.branch .ub { fill: #14181a; stroke: #2a3134; }
.un.locked image, .un.branch image { filter: grayscale(1) brightness(.55); }
.un.locked .unm, .un.branch .unm { fill: #868e92; } .un.locked .urk, .un.branch .urk { fill: #697479; }
.un.branch { opacity: .55; }
.un.learned .ub { stroke: #b48cff; fill: #1c252a; filter: drop-shadow(0 0 6px rgba(180, 140, 255, .45)); }
.un.ready .ub { stroke: #6fd38f; stroke-width: 2.2; fill: #172119; animation: ustready 1.6s ease-in-out infinite; }
.un.maxed .ub { stroke: url(#ustgold); stroke-width: 2.6; fill: #241d12; }
.un.maxed .umx { fill: none; stroke: rgba(255, 215, 120, .55); stroke-width: 1.5; stroke-dasharray: 4 4; animation: ustdash 6s linear infinite; filter: url(#ustglow); }
.un.c-ult .ub { stroke-width: 2.4; }
.un.c-ult:not(.locked) .ub { stroke: #f0b85a; filter: drop-shadow(0 0 10px rgba(240, 184, 90, .55)); }
.un.lv60 .ub { stroke-dasharray: 5 4; }
.un.sel .ub { stroke: #fff2bf; stroke-width: 3; filter: drop-shadow(0 0 10px rgba(255, 230, 150, .9)); }
.un.flash .ub { animation: ustflash .45s ease-in-out 3; }
.un:hover .ub { stroke-width: 2.6; }
@keyframes ustpulse { 50% { opacity: .35; } }
@keyframes ustready { 50% { filter: drop-shadow(0 0 9px rgba(111, 211, 143, .75)); } }
@keyframes ustdash { to { stroke-dashoffset: -48; } }
@keyframes ustspin { to { transform: rotate(360deg); } }
@keyframes ustflash { 50% { stroke: #fff; filter: drop-shadow(0 0 16px #fff); } }
/* Tooltip */
.usttip { position: absolute; z-index: 20; background: rgba(14, 19, 21, .97); border: 1px solid #4f636d; border-radius: 10px; padding: 9px 10px; box-shadow: 0 14px 34px rgba(0,0,0,.7); font-size: .82rem; max-height: calc(100% - 16px); overflow-y: auto; scrollbar-width: thin; cursor: auto; }
.usttip[hidden] { display: none; }
.utt-h { display: flex; gap: 8px; align-items: center; }
.utt-h img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid #414f56; }
.utt-h > div { flex: 1; min-width: 0; }
.utx { padding: 0 6px; }
.utt-d { margin: 6px 0 4px; color: #d8d0e6; }
.utt-r { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.utt-r li.ok { color: #7fd99a; } .utt-r li.bad { color: #ef8a8a; }
.utt-f { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; border-top: 1px solid #293236; padding-top: 6px; }
.utt-f > span:first-child { flex-basis: 100%; }
.ustlegend { position: absolute; left: 8px; bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; background: rgba(9, 12, 13, .72); padding: 3px 8px; border-radius: 8px; pointer-events: none; color: #a3b1b8; }
.lg.maxed { color: #ffd977; } .lg.learned { color: #c8a8ff; } .lg.ready { color: #6fd38f; } .lg.locked { color: #868e92; } .lg.branch { color: #697479; } .lg.lv60 { color: #9ab8d8; }
.ustwrap > .accb { padding-top: 6px; }

/* ---------- v2.0-b.48 จดหมาย ---------- */
.mailhead h3 { margin: 0 0 4px; }
.maillist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mailrow { background: #141a1d; border: 1px solid #2b353a; border-left: 3px solid #4f636d; border-radius: 9px; padding: 8px 10px; }
.mailrow.new { border-color: #6a5a2a; border-left-color: var(--gold); background: #1d1810; }
.mailrow.k-market_sold { border-left-color: #6fd38f; } .mailrow.k-gate { border-left-color: #a98fd6; }
.mailh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mailh b { flex: 1 1 260px; min-width: 0; }
.mailh .mini { padding: 0 7px; }
.mailnew { color: #1a1208 !important; background: var(--gold); border-color: var(--gold) !important; font-weight: 700; }
.mailb { margin-top: 4px; white-space: pre-line; color: #cad2d6; font-size: .86rem; line-height: 1.45; }
.mnote { margin: 0 0 8px; } .mnote .mini { padding: 1px 8px; }
/* ---------- v2.0-b.48 Gate Break: แถบเตือน + ป๊อปอัป ---------- */
#gateBar { position: sticky; top: 52px; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 7px 14px; font-size: .93rem; border-bottom: 1px solid rgba(0,0,0,.5); }
#gateBar[hidden] { display: none; }
#gateBar.warn { background: linear-gradient(90deg, #0c161c, #3a1660 30%, #3a1660 70%, #0c161c); color: #ead9ff; animation: gatepulse 1.6s ease-in-out infinite; }
#gateBar.active { background: linear-gradient(90deg, #080f12, #4a0d3a 30%, #5a1030 70%, #080f12); color: #ffe0f0; animation: gatepulse 1s ease-in-out infinite; }
#gateBar.ended { background: linear-gradient(90deg, #10121a, #23263a 50%, #10121a); color: #d6dcf0; }
#gateBar .gtt { font-weight: 800; letter-spacing: .4px; color: #d9b4ff; }
#gateBar.active .gtt { color: #ff8fcf; }
#gateBar .gtc { font-variant-numeric: tabular-nums; color: #fff; }
#gateBar .gtic { font-size: 1.2rem; filter: drop-shadow(0 0 6px #a050ff); }
.gpips { display: inline-flex; gap: 3px; vertical-align: middle; }
.gp { width: 12px; height: 12px; border-radius: 50%; background: #273136; border: 1px solid #4f636d; display: inline-block; }
.gp.boss { border-radius: 3px; transform: rotate(45deg); }
.gp.run { background: #b06bff; animation: gatepulse .8s infinite; }
.gp.win { background: #58c27a; border-color: #8fe0a8; } .gp.lose { background: #d65a5a; border-color: #f09a9a; }
@keyframes gatepulse { 50% { filter: brightness(1.25); } }
#gatePop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(5, 2, 10, .55); backdrop-filter: blur(2px); animation: gatefade .25s ease-out; }
.gpbox { width: min(440px, calc(100vw - 24px)); text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(150, 80, 255, .35), transparent 60%), #0f1619; border: 1px solid #7a4ac0; border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 40px rgba(140, 70, 255, .35); }
.gpbox h3 { margin: 4px 0 6px; color: #e2c8ff; font-size: 1.25rem; }
.gpbox .gpico { font-size: 2.6rem; filter: drop-shadow(0 0 14px #a050ff); animation: gatepulse 1.2s infinite; }
.gpbox .gtc { font-size: 1.15rem; color: #fff; }
.gpbox .actions { justify-content: center; margin-top: 10px; }
@keyframes gatefade { from { opacity: 0; transform: scale(.97); } }
@media (max-width: 860px) { #gateBar { position: relative; top: 0; font-size: .82rem; } #gateBar .gtd { display: none; } }

/* ---------- v2.0-b.49 ประกาศจากแอดมิน · GAME UPDATE ---------- */
#annBar { position: sticky; top: 52px; z-index: 7; display: flex; align-items: center; gap: 8px; padding: 5px 12px; font-size: .88rem; border-bottom: 1px solid rgba(0,0,0,.5); }
#annBar[hidden] { display: none; }
#annBar.lv-normal { background: linear-gradient(90deg, #0f1a2a, #1a2f4a 50%, #0f1a2a); color: #d8e8ff; }
#annBar.lv-important { background: linear-gradient(90deg, #22180a, #4a3410 50%, #22180a); color: #ffeac0; }
#annBar.lv-urgent { background: linear-gradient(90deg, #2a0a0a, #5a1414 50%, #2a0a0a); color: #ffe0e0; animation: gatepulse 1.6s ease-in-out infinite; }
.annmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; padding: 2px 0; width: auto; }
.annmain b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.anns { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.annlv { flex: none; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: rgba(255,255,255,.12); white-space: nowrap; }
.annnav { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; white-space: nowrap; }
.annnav .mini, .annx { padding: 0 6px; }
#annPop { position: fixed; inset: 0; z-index: 1001; display: flex; align-items: center; justify-content: center; background: rgba(4, 7, 9, .5); animation: gatefade .2s ease-out; }
.apbox { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #12181b; border: 1px solid #414f56; border-radius: 14px; padding: 14px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.75); }
#annPop.lv-important .apbox { border-color: #9a7420; } #annPop.lv-urgent .apbox { border-color: #b03030; box-shadow: 0 20px 60px rgba(0,0,0,.75), 0 0 30px rgba(200, 40, 40, .35); }
.aph { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.apbox h3 { margin: 8px 0 6px; }
.aps { color: #d8d0e6; margin: 0 0 6px; }
.apbody { white-space: pre-line; color: #dfe6e9; line-height: 1.55; margin: 4px 0 8px; }
.apbox .actions { justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.verpop .apbox { border-color: #c9a64a; background: radial-gradient(ellipse at 50% 0%, rgba(217, 180, 90, .22), transparent 55%), #12181b; }
.vhead { text-align: center; }
.vtag { display: inline-block; font-weight: 800; letter-spacing: 2px; color: #1a1208; background: linear-gradient(180deg, #ffe08a, #c9962e); padding: 2px 12px; border-radius: 6px; font-size: .82rem; }
.vnum { font-size: 1.5rem; font-weight: 800; color: #ffe08a; margin: 4px 0 0; text-shadow: 0 0 12px rgba(255, 210, 110, .4); }
.vtitle { text-align: center; margin: 6px 0 8px; }
.vsec h4 { margin: 8px 0 3px; font-size: .9rem; color: #e8c987; }
.vsec ul { margin: 0; padding-left: 20px; } .vsec li { margin: 2px 0; }
.vdet { white-space: pre-line; color: #cad2d6; margin-top: 8px; border-top: 1px dashed #343f45; padding-top: 6px; }
.newsq { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: #101517; border: 1px solid #343f45; color: var(--text); }
.newslist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.newsrow { border: 1px solid #2b353a; border-left: 3px solid #4a6fa0; border-radius: 9px; background: #141a1d; }
.newsrow.lv-important { border-left-color: #c9962e; } .newsrow.lv-urgent { border-left-color: #d04040; }
.newsrow.unread { background: #181e21; border-color: #414f56; }
.newsmain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%; background: none; border: 0; color: var(--text); text-align: left; padding: 8px 10px; cursor: pointer; }
.newsmain .anns { flex-basis: 100%; white-space: normal; color: #b8c2c7; font-size: .85rem; }
.vacc { margin-top: 8px; }
@media (max-width: 860px) { #annBar { position: relative; top: 0; font-size: .8rem; } .annmain b { max-width: 55%; } .annmain .anns { display: none; } }

/* ---------- v2.0-b.57 Redeem Code + ของแนบในจดหมาย ---------- */
.redeem { display: flex; flex-direction: column; gap: 14px; }
.rdhero { position: relative; overflow: hidden; text-align: center; padding: 26px 18px 22px; border-radius: 14px; border: 1px solid #6a5a2a;
  background: radial-gradient(ellipse at 50% -10%, rgba(217,180,90,.22), transparent 60%), radial-gradient(circle at 15% 110%, rgba(140,90,220,.25), transparent 55%), linear-gradient(160deg, #18262d, #10171a 70%);
  box-shadow: inset 0 0 0 1px rgba(217,180,90,.08), 0 10px 30px rgba(0,0,0,.35); }
.rdhero::before, .rdhero::after { content: '✧'; position: absolute; top: 14px; color: rgba(217,180,90,.35); font-size: 1.4rem; }
.rdhero::before { left: 18px; } .rdhero::after { right: 18px; }
.rdsig { font-size: 1.6rem; color: var(--gold); text-shadow: 0 0 14px rgba(217,180,90,.7); }
.rdhero h2 { margin: 2px 0 6px; font-family: Georgia, serif; letter-spacing: .28em; color: var(--gold); font-size: 1.55rem; text-shadow: 0 2px 0 #000, 0 0 18px rgba(217,180,90,.35); }
.rdhero p { margin: 0 auto 14px; max-width: 520px; color: #cad3d8; font-size: .9rem; }
.rdform { display: flex; gap: 8px; justify-content: center; max-width: 520px; margin: 0 auto; }
.rdform input { flex: 1; min-width: 0; text-align: center; letter-spacing: .18em; text-transform: uppercase; font-size: 1.1rem; font-weight: 700; padding: 10px 12px;
  background: #0b1013; border: 1px solid #8a7340; border-radius: 10px; color: #f3e7c4; }
.rdform button { padding: 10px 22px; font-weight: 800; letter-spacing: .14em; border-radius: 10px; border: 1px solid #f0d58a; color: #1b1406; cursor: pointer;
  background: linear-gradient(180deg, #f3d98d, #c9963c); box-shadow: 0 0 14px rgba(217,180,90,.35); }
.rdform button:disabled { opacity: .6; cursor: wait; }
.rdmsg { margin: 12px auto 0; max-width: 560px; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.rdmsg.ok { background: rgba(70,150,90,.18); border: 1px solid #4fae6a; color: #a6e8b6; } .rdmsg.err { background: rgba(170,60,60,.18); border: 1px solid #b34a4a; color: #ffb0b0; }
.rdlast { margin: 12px auto 0; max-width: 620px; text-align: left; background: rgba(0,0,0,.25); border: 1px dashed #6a5a2a; border-radius: 10px; padding: 10px 12px; }
.rdlast p { margin: 4px 0 8px; text-align: left; }
.rdhist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rdhist li { background: #141a1d; border: 1px solid #2b353a; border-left: 3px solid var(--gold); border-radius: 8px; padding: 7px 10px; }
.rdcode { color: var(--gold); letter-spacing: .1em; }
.mailrow.k-redeem { border-left-color: var(--gold); }
.tag.mailgift { border-color: #f0d58a; color: #1b1406; background: #e6c46e; margin-left: 4px; }
.mailatt { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #333f45; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.attlist { display: flex; flex-wrap: wrap; gap: 6px; }
.attchip { display: inline-flex; align-items: center; gap: 5px; background: #1d272c; border: 1px solid #37464e; border-radius: 999px; padding: 2px 9px 2px 3px; font-size: .82rem; }
.attchip .sicon, .attimg { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.attemo { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.mailclaim { padding: 6px 14px; font-weight: 800; border-radius: 8px; border: 1px solid #f0d58a; color: #1b1406; background: linear-gradient(180deg, #f3d98d, #c9963c); cursor: pointer; }
@media (max-width: 640px) { .rdhero h2 { font-size: 1.2rem; letter-spacing: .18em; } .rdform { flex-direction: column; } }

/* ---------- v2.0-b.58 ทัวร์แนะนำการเล่น ---------- */
#tourRing { position: fixed; z-index: 9000; pointer-events: none; border: 2px solid #f0d58a; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(5, 9, 11,.52), 0 0 22px rgba(240,213,138,.55); transition: all .25s ease; display: none; }
.tourpulse { position: relative; outline: 2px solid #f0d58a !important; outline-offset: 2px; animation: tourpulse 1.4s ease-in-out infinite; z-index: 1; }
@keyframes tourpulse { 50% { outline-color: rgba(240,213,138,.25); box-shadow: 0 0 14px rgba(240,213,138,.6); } }
.tourcard { position: fixed; z-index: 9100; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto;
  background: linear-gradient(170deg, #1e2d34, #11191d 75%); border: 1px solid #8a7340; border-radius: 14px; padding: 12px 14px; color: #ece6d6;
  box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(240,213,138,.08) inset; font-size: .9rem; }
.tourcard.left { right: auto; left: 18px; }
.tourcard.min { width: auto; padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
.tourcard .tmin { padding: 8px 14px; border-radius: 999px; border: 1px solid #f0d58a; background: #1e2d34; color: #f3e7c4; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.tourcard .thead { display: flex; gap: 10px; align-items: flex-start; }
.tourcard .thead > div { flex: 1; min-width: 0; } .tourcard .thead b { color: var(--gold); font-size: 1.02rem; }
.tourcard .tico { font-size: 1.6rem; line-height: 1; }
.tourcard .tstep { font-size: .72rem; color: #a5b1b7; letter-spacing: .03em; }
.tourcard .tx { background: none; border: 0; color: #a5b1b7; cursor: pointer; font-size: 1rem; padding: 0 4px; }
.tourcard .tbar { height: 4px; background: #28353c; border-radius: 4px; margin: 8px 0; } .tourcard .tbar i { display: block; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #c9963c, #f3d98d); }
.tourcard .ttext { line-height: 1.6; } .tourcard .ttext b { color: #f3e7c4; }
.tourcard .tact { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(240,213,138,.1); border: 1px dashed #8a7340; font-weight: 600; }
.tourcard .tact.ok { background: rgba(70,150,90,.18); border: 1px solid #4fae6a; color: #a6e8b6; }
.tourcard .tbtns, #tourOffer .tbtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.tourcard .tclaim { width: 100%; margin-top: 8px; }
.tourcard .tmissing { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; font-size: .82rem; }
#tourOffer { position: fixed; inset: 0; z-index: 9200; display: grid; place-items: center; }
#tourOffer .tourshade { position: absolute; inset: 0; background: rgba(5, 9, 11,.7); }
.tourmodal { position: relative; width: min(460px, calc(100vw - 28px)); text-align: center; padding: 22px 20px 18px; border-radius: 16px; border: 1px solid #8a7340;
  background: radial-gradient(ellipse at 50% -10%, rgba(217,180,90,.25), transparent 60%), linear-gradient(165deg, #1e2d34, #10171a 75%); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.tourmodal .tsig { font-size: 2.2rem; } .tourmodal h3 { margin: 4px 0 8px; color: var(--gold); font-family: Georgia, serif; letter-spacing: .08em; }
.tourmodal .treward { margin: 10px 0; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px dashed #8a7340; line-height: 1.7; }
.tourmodal .tbtns { justify-content: center; }
.tourpanel { background: #161e22; border: 1px solid #6a5a2a; border-radius: 12px; padding: 12px; margin: 10px 0 14px; }
.tourpanel .tphead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .tourpanel .tphead .gbar { flex: 1; min-width: 80px; }
.tpsteps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 8px 0; }
.tpstep { text-align: left; background: #1d272c; border: 1px solid #37464e; border-radius: 8px; padding: 6px 8px; color: inherit; cursor: pointer; font: inherit; font-size: .85rem; }
.tpstep.done { border-color: #3d6a48; background: #172219; color: #b9e6c4; } .tpstep:hover { border-color: #f0d58a; }
.gtourcta { margin-top: 8px; padding: 6px 10px; border-radius: 8px; border: 1px dashed #8a7340; background: rgba(240,213,138,.07); font-size: .86rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 760px) { .tourcard { right: 8px; left: 8px; width: auto; bottom: calc(70px + env(safe-area-inset-bottom)); max-height: 46vh; } .tourcard.left { left: 8px; } .tourcard.min { left: auto; } }

/* ---------- v2.0-b.59 ใช้ไอเทมทีละหลายชิ้น (− / + / สูงสุด) ---------- */
.iact { align-items: center; }
.iact .usestep { width: 104px; }
.iact .usestep input { height: 30px; box-sizing: border-box; }

/* ---------- v2.0-b.59 Premium Packages — หน้าเดียวไม่ต้องเลื่อน · ชี้การ์ดเพื่อดูของแถม ---------- */
.pmwrap { display: flex; flex-direction: column; gap: 10px; }
.pmhead { display: flex; align-items: center; gap: 10px; }
.pmhead h2 { white-space: nowrap; }
.pmsub { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmhead > button { white-space: nowrap; }
.pmhead h2 { margin: 0; font-size: 1.25rem; letter-spacing: .08em; color: #f3d98d; }
.pmsp { flex: 1; }
.pmbal { padding: 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: #131a1d; font-weight: 700; color: #e6f6ff; }
.pmnote { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid #e2a04f; background: rgba(226, 160, 79, .13); color: #ffe6bf; font-size: .92rem; line-height: 1.5; }
.pmnote svg { width: 20px; height: 20px; flex-shrink: 0; color: #ffcf8a; }
.pmnote b { color: #ffcf8a; }
.pmlock { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; color: #ffcf8a; }
.pmmain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; height: 440px; }
.pmhero { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; overflow: hidden; border: 1px solid #e2774f; background: #151c20; }
.pmart { position: relative; height: 168px; flex-shrink: 0; background: var(--art) center 28% / cover no-repeat; }
.pmart::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21, 28, 32, 0) 40%, rgba(21, 28, 32, .97) 100%); }
.pmbest { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 2px 10px; border-radius: 999px; background: #e2774f; color: #1b1406; font-weight: 700; font-size: .72rem; }
.pmtitle { position: absolute; z-index: 1; left: 14px; bottom: 8px; display: flex; flex-direction: column; }
.pmtitle small { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: #ffb79a; }
.pmtitle h3 { margin: 0; font-size: 1.45rem; color: #fbf3dc; }
.pmart .pmprice { position: absolute; z-index: 1; right: 14px; bottom: 10px; font-size: 1.7rem; }
.pmprice { font-weight: 800; color: #f3d98d; }
.pmbody { flex: 1; min-height: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pmline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.pmline b { color: #e6f6ff; }
.pmwait { padding: 0 8px; border-radius: 999px; border: 1px solid rgba(226, 160, 79, .6); color: #ffcf8a; font-size: .78rem; }
.pmgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pmit { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 3px 6px; border-radius: 8px; background: #1e2a30; border: 1px solid #384a53; min-width: 0; }
.pmit .pmnm { flex: 1; min-width: 0; font-size: .74rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pmit b, .pmprow b { color: #f3d98d; font-size: .82rem; }
.pmico { width: 28px; height: 28px; flex-shrink: 0; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #0f161a; }
.pmico img { width: 100%; height: 100%; object-fit: cover; }
.pmemo { font-size: 1rem; }
.pmfoot { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.pmfoot .pmlock { flex: 1; }
.pmbtn { min-width: 120px; height: 34px; border-radius: 8px; font-weight: 700; font-size: .85rem; cursor: pointer; border: 1px solid #f0d58a; background: linear-gradient(180deg, #f3d98d, #c9963c); color: #1b1406; }
.pmbtn.big { min-width: 170px; height: 40px; font-size: .95rem; }
.pmbtn.proc { border-color: #e2a04f; background: rgba(226, 160, 79, .14); color: #ffcf8a; }
.pmbtn.done { border-color: #4fae6a; background: rgba(79, 174, 106, .12); color: #9fe0b2; cursor: default; }
.pmbtn.wait { border-color: #51636c; background: #1d2a30; color: #a5b1b7; cursor: not-allowed; }
.pmlist { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pmcard { position: relative; flex: 1; min-height: 0; display: flex; gap: 12px; padding: 9px; border-radius: 12px; background: #161f24; border: 1px solid var(--line); outline: none; cursor: default; }
.pmcard:nth-child(1) { box-shadow: inset 3px 0 0 #5ec8b8; } .pmcard:nth-child(2) { box-shadow: inset 3px 0 0 #9a7bd8; } .pmcard:nth-child(3) { box-shadow: inset 3px 0 0 #e8c86a; }
.pmcard:hover, .pmcard:focus-visible, .pmcard.open { border-color: #8a7340; }
.pmthumb { width: 132px; flex-shrink: 0; height: 100%; object-fit: cover; border-radius: 8px; }
.pminfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pmrow1 { display: flex; align-items: baseline; justify-content: space-between; }
.pmtier { font-size: .68rem; letter-spacing: .18em; color: var(--muted); }
.pmcard .pmprice { font-size: 1.2rem; }
.pminfo h4 { margin: 0; font-size: 1.05rem; color: #fbf3dc; }
.pmhint { font-size: .74rem; color: #b2c1c9; }
.pmpop { position: absolute; z-index: 20; right: calc(100% + 12px); width: 340px; padding: 10px 12px; border-radius: 12px; background: #1d2a30; border: 1px solid #8a7340; box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .14s ease, visibility .14s; }
.pmpop.pos0 { top: 0; } .pmpop.pos1 { top: 50%; transform: translateY(-50%); } .pmpop.pos2 { bottom: 0; }
.pmcard:hover .pmpop, .pmcard:focus-within .pmpop, .pmcard.open .pmpop { opacity: 1; visibility: visible; }
.pmpoph { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 4px; }
.pmprow { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-top: 1px solid #2a3941; font-size: .84rem; }
.pmprow .pmnm { flex: 1; min-width: 0; }
.pmprow small { width: 86px; text-align: right; color: var(--muted); font-size: .7rem; }
.pmpopf { padding-top: 6px; border-top: 1px solid #2a3941; }
.pmmodal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .62); }
.pmbox { position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px 22px; border-radius: 16px; background: linear-gradient(165deg, #1e2d34, #11191d); border: 1px solid #8a7340; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.pmbox.wide { width: min(860px, 100%); }
.pmbox h3 { margin: 0; color: #f3d98d; }
.pmx { position: absolute; top: 10px; right: 10px; }
.pmkv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .92rem; }
.pmkv > span { color: var(--muted); } .pmkv .gold { color: #f3d98d; }
.pmack { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #19262d; cursor: pointer; }
.pmack input { width: 18px; height: 18px; accent-color: #f3d98d; }
.pmacts { display: flex; justify-content: flex-end; gap: 10px; }
.pmacts > button { flex: 0 0 auto; width: auto; min-width: 110px; height: 42px; padding: 0 18px; white-space: nowrap; }
.pmhist { max-height: 60vh; overflow: auto; }
.attbound { margin: 4px 0; font-size: .8rem; font-weight: 700; color: #ffcf8a; }
@media (max-width: 860px) {
  .pmmain { grid-template-columns: 1fr; height: auto; }
  .pmcard { flex: none; min-height: 128px; flex-wrap: wrap; }
  .pmthumb { width: 104px; height: 110px; }
  .pmpop { position: static; width: 100%; display: none; opacity: 1; visibility: visible; pointer-events: auto; transform: none !important; box-shadow: none; }
  .pmcard.open .pmpop { display: flex; }
  .pmhint::before { content: '👆 แตะ'; } .pmhint { font-size: 0; } .pmhint::before { font-size: .74rem; }
  .pmhint::after { content: 'เพื่อดูรายการของแถม'; font-size: .74rem; margin-left: 4px; }
  .pmkv { grid-template-columns: 110px 1fr; }
  .pmhead { flex-wrap: wrap; } .pmsub { flex-basis: 100%; order: 3; white-space: normal; }
}

/* ===================================================================
   v2.0-b.60: ธีม Arcane — หินชนวน · กรอบบรอนซ์ · อักษรรูนเรืองแสงเทอร์คอยส์ · ทอง
   (ตามภาพคอนเซปต์หม้อหลอมเวท) — เปลี่ยนเฉพาะสี/กรอบ/แสง/ฟอนต์หัวเรื่อง
   ไม่เปลี่ยนขนาด ระยะ หรือการจัดวางเดิม (ใช้ box-shadow แทนการเพิ่มความหนาเส้นขอบ)
   =================================================================== */
:root {
  --arc-teal: #4fe6d8; --arc-teal2: #8af8ef; --arc-tealdim: #2a8a83; --arc-bronze: #857250; --arc-bronze2: #c4a66b;
  --arc-stone: #2a333a; --arc-edge: #3b464e; --arc-gold: #f2dba0; --arc-violet: #a983ff;
  --text: #e4ebed; --muted: #9eb0b6; --mc-gold2: #f2dba0;
  --mc-card: linear-gradient(180deg, rgba(26, 34, 40, .96) 0%, rgba(13, 19, 23, .97) 100%);
  --mc-line: #36424a; --mc-line2: #56626a;
  --arc-frame: inset 0 0 0 1px rgba(133, 114, 80, .38), 0 8px 24px rgba(0, 0, 0, .5);
}
html { background: #070b0e; }
body:not(.onportal) { background: linear-gradient(180deg, rgba(7, 11, 14, .86), rgba(7, 11, 14, .95)), url('/assets/site_bg_arcane.webp') center / cover no-repeat #070b0e; }
body.onportal { background: #070b0e; }
h1, h2, h3, h4 { color: var(--arc-gold); }
::selection { background: rgba(79, 230, 216, .3); }

/* แถบบน: หินชนวน + เส้นบรอนซ์ + โลโก้ Cinzel */
.topbar { background: linear-gradient(180deg, #121b21, #0a1014); border-bottom-color: #3a454c; box-shadow: 0 2px 0 rgba(133, 114, 80, .55), 0 3px 12px rgba(79, 230, 216, .08), 0 8px 24px rgba(0, 0, 0, .6); }
.brand { font-family: "Cinzel", Georgia, serif; color: var(--arc-gold); text-shadow: 0 0 14px rgba(242, 219, 160, .3); }
.brand:hover { color: #fff3cf; text-shadow: 0 0 16px rgba(79, 230, 216, .45); }

/* แผงหลัก: กรอบหินขอบบรอนซ์ด้านใน */
.panel, .gmain, .spanel, .panel2, .ccard, .navgroup, .raidhead, .skbook {
  background: var(--mc-card); border-color: var(--mc-line) !important; box-shadow: var(--arc-frame), inset 0 1px 0 rgba(242, 219, 160, .06);
}
.gmain { box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .45), inset 0 0 0 4px rgba(7, 11, 14, .55), inset 0 0 0 5px rgba(79, 230, 216, .12), inset 0 0 50px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .55); }
.gpanel:has(.glayout) { background: transparent; box-shadow: none; }
.ccard { background: radial-gradient(ellipse at 50% 0%, rgba(79, 230, 216, .16), transparent 70%), var(--mc-card); }
.timg { background: radial-gradient(ellipse at 50% 75%, var(--tglow, #1e3a3c) 0%, #0b1216 72%); }
.ccard .timg { box-shadow: inset 0 0 0 1px rgba(79, 230, 216, .35), 0 0 16px rgba(79, 230, 216, .14); }

/* เมนูซ้าย: หัวหมวดบรอนซ์ · รายการที่เลือกเรืองเทอร์คอยส์ */
.navhead { color: var(--arc-bronze2); }
.vnav button { color: #dbe4e7; }
.vnav button:hover { background: rgba(79, 230, 216, .08); color: #fff3cf; }
.vnav button.active { background: linear-gradient(90deg, rgba(79, 230, 216, .2), rgba(79, 230, 216, .03)); border-left-color: var(--arc-teal); color: var(--arc-gold); box-shadow: inset 0 0 0 1px rgba(42, 138, 131, .55); }
.navgroup.hasactive { box-shadow: var(--arc-frame), 0 0 14px rgba(79, 230, 216, .08); }

/* ปุ่ม: หิน · รูน (ทองบนเทอร์คอยส์เข้ม) · ทอง */
.mini, .ghost, .pchip, .spanel .mini, button.big:not(.primary), .mpick, .mnav button, .actions button:not(.primary) {
  background: linear-gradient(180deg, #2c363d, #182025); color: var(--text); border-color: var(--mc-line2) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.mini:hover:not(:disabled), .ghost:hover:not(:disabled), .pchip:hover:not(:disabled), button.big:not(.primary):hover:not(:disabled), .actions button:not(.primary):hover:not(:disabled) {
  border-color: var(--arc-tealdim) !important; color: #fff3cf; box-shadow: 0 0 12px rgba(79, 230, 216, .22), inset 0 0 10px rgba(79, 230, 216, .1);
}
.primary, .mini.primary { background: linear-gradient(180deg, #f6e1a6, #c9953a); color: #1d1405; border-color: #f4dc98 !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .4), 0 0 14px rgba(230, 189, 95, .22); }
.primary:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(0, 0, 0, .45), 0 0 20px rgba(230, 189, 95, .38); }
.pchip.pt { background: linear-gradient(180deg, #1d3d40, #0f2224); color: var(--arc-teal2); border-color: var(--arc-tealdim) !important; }
.tabs { background: #111a1f; box-shadow: inset 0 0 0 1px #2f3a41; }
.tab.active, .chattabs button.active { background: linear-gradient(180deg, #1d3d40, #0f2224); color: var(--arc-gold); box-shadow: inset 0 0 0 1px var(--arc-tealdim), 0 0 12px rgba(79, 230, 216, .25); }

/* การ์ดย่อย / ช่อง / กล่องพับ */
.stone, .skill, .abox, .rtower, .icard, .eqbig, .eqdetail, .rankcard2, .skpath, .qrow, .slot, .godcard, .mcard {
  background: linear-gradient(180deg, rgba(29, 38, 45, .94), rgba(14, 20, 24, .96)) !important; border-color: #39444b !important;
  box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .22);
}
.stone:hover, .rtower:hover, .icard:hover, .slot:hover, .godcard:hover { border-color: var(--arc-tealdim) !important; box-shadow: inset 0 0 0 1px rgba(79, 230, 216, .25), 0 8px 22px rgba(0, 0, 0, .5), 0 0 16px rgba(79, 230, 216, .12); }
details.acc { box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .2); }
details.acc > summary:hover { background: rgba(79, 230, 216, .07); }
details.acc[open] > summary { box-shadow: inset 0 -1px 0 rgba(133, 114, 80, .3); }
.spanel h4 { border-bottom-color: rgba(133, 114, 80, .35); }

/* ช่องกรอก / แถบค่า / ข้อความแจ้ง */
input, select, textarea { background: #0b1216 !important; border-color: #3e4a52 !important; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .5); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(79, 230, 216, .55); }
.bar .track { background: #081014; border-color: #29343a; }
.cstats { background: rgba(8, 13, 16, .6); border-color: rgba(133, 114, 80, .25); }
.toast { background: linear-gradient(180deg, #1a242a, #0f161a); border-color: var(--arc-tealdim); box-shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 16px rgba(79, 230, 216, .15); }
.ptsalert { background: linear-gradient(90deg, rgba(230, 189, 95, .14), rgba(79, 230, 216, .06)); border-color: rgba(133, 114, 80, .6); }
.guidecard { background: linear-gradient(180deg, #1c2620, #10171a) !important; border-color: #6a5a36 !important; }

/* แชท / แถบสถานะ / แถบล่าง */
.chatbox, .chatdock { background: rgba(10, 16, 19, .93); border-color: var(--mc-line); box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .22); }
.chatform { background: #0f171b; border-top-color: #3a454c; }
.cmsg.sys { background: #13221f; border-color: #2a6a63; }
body.ingame .gstat { background: linear-gradient(180deg, rgba(18, 27, 33, .96), rgba(10, 16, 20, .96)); border-color: var(--mc-line); box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .3); }
.gstat .schip { background: #0d1418; border-color: #33404a; }
#mobileBar:not([hidden]) { background: rgba(10, 16, 20, .98); border-top-color: #3a454c; }
#msheet .msheet { background: #111920; border-top-color: var(--arc-bronze); }
#msheet .mtiles button { background: linear-gradient(180deg, #2c363d, #182025); border-color: var(--mc-line); }
#msheet .mtiles button:hover, #msheet .mtiles button.active { border-color: var(--arc-teal); }
@media (max-width: 860px) { .vnav { background: rgba(10, 16, 20, .97); } .navgroup { border-color: #4a4430 !important; } }

/* หน้าต่างลอย / ป๊อปอัป */
dialog, .bwin, .apbox, .pmbox, .tourcard { border-color: #5a5f55; box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .4), 0 20px 60px rgba(0, 0, 0, .7), 0 0 24px rgba(79, 230, 216, .1); }

/* หน้าเว็บหลัก (Portal): โลโก้ Cinzel · ปุ่มรอง/เส้นแบ่งเทอร์คอยส์ · หัวข้อมีประกายรูน */
.pt-logo { font-family: "Cinzel", Georgia, serif; color: var(--arc-gold); }
.pt-hero h1 { color: #fbe9bd; text-shadow: 0 2px 0 #6a4a14, 0 0 40px rgba(79, 230, 216, .35), 0 8px 30px rgba(0, 0, 0, .9); }
.pt-hero::before { background: radial-gradient(ellipse at 50% 40%, rgba(9, 18, 21, .2), rgba(7, 11, 14, .85) 70%), linear-gradient(180deg, rgba(7, 11, 14, .3) 0%, rgba(7, 11, 14, 0) 40%, #070b0e 100%); }
.pt-kicker { color: var(--arc-teal); text-shadow: 0 0 10px rgba(79, 230, 216, .55); }
.pt-sec-h h2::before, .pt-sec-h h2::after { color: var(--arc-teal); text-shadow: 0 0 8px rgba(79, 230, 216, .8); }
.pt-h3 { border-left-color: var(--arc-teal); }
.pt-sec + .pt-sec::before { background: linear-gradient(90deg, transparent, var(--arc-bronze2), var(--arc-teal), var(--arc-bronze2), transparent); }
#screen-portal .pt-btn.ghost { background: linear-gradient(180deg, rgba(29, 61, 64, .85), rgba(15, 34, 36, .9)); color: var(--arc-gold); border-color: var(--arc-tealdim); box-shadow: 0 0 14px rgba(79, 230, 216, .2); }
#screen-portal .pt-btn.ghost:hover { border-color: var(--arc-teal); color: #fff3cf; box-shadow: 0 0 20px rgba(79, 230, 216, .35); }
#screen-portal .pt-btn.gold { background: linear-gradient(180deg, #f6e1a6, #c9953a); border-color: #f4dc98; }
.pt-stats > div, .pt-empty { box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .3); }
.pt-stats b { color: var(--arc-gold); text-shadow: 0 0 14px rgba(242, 219, 160, .35); }
.pt-nav a::after { background: var(--arc-teal); box-shadow: 0 0 8px rgba(79, 230, 216, .7); }
.pt-head.solid { box-shadow: 0 2px 0 rgba(133, 114, 80, .55), 0 8px 24px rgba(0, 0, 0, .6); }
.pt-logo img { border-color: var(--arc-bronze); }
@media (prefers-reduced-motion: reduce) { .vnav button.active, .tab.active { box-shadow: none; } }
/* b.60: ภาพหอคอยชุดใหม่พื้นโปร่งใส — แสดงทั้งหอ (ไม่ครอปยอด) บนพื้นเรืองแสงประจำธาตุ */
.pt-tower > img, .pt-char-img { object-fit: contain; padding: 6px 0; background: radial-gradient(ellipse at 50% 70%, var(--tglow, #1e3a3c) 0%, #0a0f12 72%); }
.pt-tower.t-dark > img, .pt-char.t-dark .pt-char-img { --tglow: #3d1f66; } .pt-tower.t-light > img, .pt-char.t-light .pt-char-img { --tglow: #5a4a22; }
.pt-tower.t-fire > img, .pt-char.t-fire .pt-char-img { --tglow: #5a1f10; } .pt-tower.t-water > img, .pt-char.t-water .pt-char-img { --tglow: #163f66; }
/* b.60: แผงขวา — แถวข้อมูลไม่ล้นขอบการ์ด (ชื่อยาวตัดด้วย … ตัวเลขชิดขวาในกรอบ) */
.gsideR .accb > .srow { min-width: 0; } .gsideR .srow > b { flex: none; }
/* b.60: แผนที่โลก — ชื่อแผนที่ยาวขึ้นบรรทัดใหม่ได้ ไม่ล้นขอบแผนที่บนจอแคบ */
.wlabel { white-space: normal; max-width: 12.5em; }
.wlabel b { display: block; }
/* b.60 หน้าเว็บหลัก: ป้ายอัปเดตใหม่ · ส่วนแพตช์ล่าสุด · ร่างวิวัฒนาการในการ์ดหอคอย */
.pt-patchbar { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 6px 16px 6px 6px; border-radius: 999px; background: linear-gradient(90deg, rgba(29, 61, 64, .9), rgba(12, 20, 24, .85)); border: 1px solid var(--arc-tealdim); color: #dbe9ea; text-decoration: none; font-size: .92rem; box-shadow: 0 0 18px rgba(79, 230, 216, .2); }
.pt-patchbar b { padding: 3px 10px; border-radius: 999px; background: linear-gradient(180deg, #f6e1a6, #c9953a); color: #1d1405; font-size: .82rem; }
.pt-patchbar:hover { border-color: var(--arc-teal); color: #fff3cf; }
.pt-patches { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.pt-patch { display: flex; gap: 14px; align-items: flex-start; background: var(--pcard); border: 1px solid var(--pline); border-radius: 14px; padding: 14px; box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .25); }
.pt-patch.now { border-color: var(--arc-tealdim); box-shadow: inset 0 0 0 1px rgba(79, 230, 216, .3), 0 0 22px rgba(79, 230, 216, .12); }
.pt-patch img { width: 84px; height: 84px; object-fit: contain; flex: none; border-radius: 10px; background: radial-gradient(ellipse at 50% 70%, #1e3a3c, #0a0f12 72%); border: 1px solid #404f56; }
.pt-patch h3 { margin: 0 0 6px; color: #f3dc9a; font-size: 1.1rem; }
.pt-pv { margin: 0 0 2px; color: var(--arc-teal); font-size: .8rem; letter-spacing: .06em; }
.pt-patch ul { margin: 0; padding-left: 18px; color: #cad2d6; font-size: .9rem; } .pt-patch li + li { margin-top: 3px; }
.pt-evo { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(29, 61, 64, .45), rgba(12, 18, 22, .6)); border: 1px solid #2f4a4c; }
.pt-evo img { width: 84px; height: 84px; object-fit: contain; flex: none; border-radius: 10px; background: radial-gradient(ellipse at 50% 70%, var(--tglow, #1e3a3c), #0a0f12 72%); }
.pt-tower.t-dark .pt-evo img { --tglow: #3d1f66; } .pt-tower.t-light .pt-evo img { --tglow: #5a4a22; } .pt-tower.t-fire .pt-evo img { --tglow: #5a1f10; } .pt-tower.t-water .pt-evo img { --tglow: #163f66; }
.pt-evo small { display: block; color: var(--arc-teal); font-size: .76rem; letter-spacing: .04em; }
.pt-evo b { display: block; color: #f3dc9a; font-family: Georgia, "Noto Serif Thai", serif; }
.pt-evo span { display: block; color: var(--pmut); font-size: .8rem; }
@media (max-width: 640px) { .pt-patches { grid-template-columns: 1fr; } .pt-patch img, .pt-evo img { width: 64px; height: 64px; } .pt-patchbar { font-size: .82rem; } }
/* ---------- v2.0-b.61 ไอคอนมงกุฎยศขุนนาง ---------- */
img.crown { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -0.32em; margin-right: 3px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
img.crown.h { width: 1.85em; height: 1.85em; vertical-align: -0.55em; }
img.crown.s { width: 1.2em; height: 1.2em; margin-right: 2px; }
.ccard .noble img.crown { width: 1.6em; height: 1.6em; vertical-align: -0.45em; }
.slotrank { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 8px 1px 4px; border-radius: 999px; font-size: .78rem; color: var(--arc-gold, #f2dba0); border: 1px solid rgba(230, 189, 95, .45); background: rgba(230, 189, 95, .08); white-space: nowrap; vertical-align: middle; }
.slotrank img.crown { margin-right: 0; }
.pt-crown { width: 1.45em; height: 1.45em; object-fit: contain; vertical-align: -0.38em; margin-right: 4px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.pt-norank { color: var(--pmut); }
/* b.61: กันกฎ .slot img (ภาพหอคอยเต็มการ์ด) ไปโดนมงกุฎในหน้าเลือกหอคอย */
.slot .slotrank { align-self: flex-start; margin-left: 0; width: fit-content; }
.slot .slotrank img.crown { width: 1.35em; height: 1.35em; padding: 0; aspect-ratio: auto; display: inline-block; }

/* ---------- v2.0-b.62 หม้อหลอมเวท: กะทัดรัด (สูงลด ~35%) · ซ้าย = เวท+ผลึก · ขวา = หม้อ+โอกาส+ปุ่มหลอม ---------- */
@media (min-width: 761px) {
  .cauldron { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "top top" "slots foot" "gems foot" "opts opts" "grid grid";
    column-gap: 16px; row-gap: 8px; align-items: center; padding: 12px 16px; margin-bottom: 12px; }
  .cauldron > .libtop { grid-area: top; }
  .cauldron > .cslots { grid-area: slots; margin: 0; gap: 8px; align-self: end; }
  .cauldron > .gemrow { grid-area: gems; gap: 6px; align-self: start; }
  .cauldron > .copts { grid-area: opts; margin: 0; padding-top: 8px; border-top: 1px solid rgba(133, 114, 80, .3); gap: 4px 18px; font-size: .86rem; }
  .cauldron > .cfoot { grid-area: foot; justify-content: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: radial-gradient(ellipse at 30% 60%, rgba(90, 255, 180, .1), transparent 65%), rgba(8, 13, 16, .45); box-shadow: inset 0 0 0 1px rgba(133, 114, 80, .25); }
  .cauldron > .cgrid { grid-area: grid; margin-top: 4px; }
  .cauldron > .cresult { grid-column: 1 / -1; }
  .cauldron .cslot { width: 116px; min-height: 100px; padding: 6px 4px; }
  .cauldron .cslot .sicon { width: 56px; height: 56px; }
  .cauldron .cslot .gemi.big { width: 48px; height: 48px; }
  .cauldron .cslot .clv { top: 44px; right: 24px; }
  .cauldron .cslot .small { font-size: .74rem; line-height: 1.35; max-width: 100%; overflow-wrap: anywhere; }
  .cauldron .gemb { min-width: 0; flex: 1 1 0; max-width: 132px; padding: 5px 6px; font-size: .74rem; }
  .cauldron .gemb .gemi { width: 20px; height: 20px; }
  .cauldron .cfoot .cpot { width: 104px; height: 104px; flex: none; }
  .cauldron .cfoot > div { min-width: 0; }
  .cauldron .cchance { font-size: 1rem; } .cauldron .cchance b { font-size: 1.25rem; }
  .cauldron .cfoot .primary.big { width: 100%; max-width: 200px; min-height: 42px; margin-top: 6px; padding: 6px 14px; }
}

/* ---------- v2.0-b.63 Premium: เต็มพื้นที่แผงกลางพอดี (ไม่เหลือที่ว่างด้านล่าง · ไม่ล้น) · ปุ่มซื้ออยู่ในกรอบการ์ดเสมอ ---------- */
@media (min-width: 861px) {
  .glayout.tab-premium .gbody { display: flex; flex-direction: column; }
  .glayout.tab-premium .pmwrap { flex: 1 1 auto; min-height: 0; }
  .glayout.tab-premium .pmmain { height: auto; flex: 1 1 0; min-height: 300px; }
  .glayout.tab-premium .pmhero .pmart { height: auto; flex: 1 1 150px; min-height: 64px; max-height: 480px; }
  .glayout.tab-premium .pmhero .pmbody { flex: 0 0 auto; gap: 8px; }
  .glayout.tab-premium .pmhero .pmgrid { grid-auto-rows: minmax(38px, auto); }
  .glayout.tab-premium .pmlist { min-height: 0; }
  .glayout.tab-premium .pmcard { flex: 1 1 0; min-height: 0; align-items: stretch; padding: 8px 12px 8px 8px; }
  .glayout.tab-premium .pmthumb { height: auto; align-self: stretch; min-height: 0; }
  .glayout.tab-premium .pminfo { gap: 2px; min-height: 0; }
  .glayout.tab-premium .pminfo .pmfoot { margin-top: auto; padding-top: 4px; }
  .glayout.tab-premium .pmcard .pmbtn { height: 32px; min-width: 104px; flex: none; }
  .glayout.tab-premium .pmlock { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
@media (min-width: 861px) and (max-height: 860px) {
  .glayout.tab-premium .pmwrap { gap: 6px; }
  .glayout.tab-premium .pmhead h2 { font-size: 1.1rem; }
  .glayout.tab-premium .pmnote { padding: 4px 10px; font-size: .8rem; line-height: 1.35; }
  .glayout.tab-premium .pmtitle h3 { font-size: 1.2rem; } .glayout.tab-premium .pmart .pmprice { font-size: 1.4rem; }
  .glayout.tab-premium .pmhero .pmbody { gap: 5px; padding: 6px 10px 8px; }
  .glayout.tab-premium .pmhero .pmgrid { grid-auto-rows: minmax(32px, auto); }
  .glayout.tab-premium .pmit { min-height: 32px; padding: 2px 6px; } .glayout.tab-premium .pmico { width: 24px; height: 24px; }
  .glayout.tab-premium .pmlist { gap: 6px; }
  .glayout.tab-premium .pmcard { padding: 6px 10px 6px 6px; gap: 10px; }
  .glayout.tab-premium .pmthumb { width: 96px; }
  .glayout.tab-premium .pminfo { gap: 0; } .glayout.tab-premium .pminfo h4 { font-size: .96rem; line-height: 1.25; } .glayout.tab-premium .pmcard .pmprice { font-size: 1.06rem; }
  .glayout.tab-premium .pmhint { display: none; }
  .glayout.tab-premium .pmcard .pmbtn { height: 28px; min-width: 92px; font-size: .8rem; }
  .glayout.tab-premium .pmlock { font-size: .72rem; }
}
@media (min-width: 861px) and (max-height: 760px) {
  .glayout.tab-premium .pmcard { padding: 4px 10px 4px 5px; }
  .glayout.tab-premium .pmtier { font-size: .62rem; }
  .glayout.tab-premium .pminfo h4 { font-size: .9rem; line-height: 1.15; }
  .glayout.tab-premium .pmcard .pmline { font-size: .78rem; }
  .glayout.tab-premium .pminfo .pmfoot { padding-top: 2px; }
  .glayout.tab-premium .pmcard .pmbtn { height: 26px; }
}
@media (min-width: 861px) and (max-width: 1360px) {
  .glayout.tab-premium .pmhero .pmit { gap: 4px; padding: 2px 4px; }
  .glayout.tab-premium .pmhero .pmico { width: 20px; height: 20px; }
  .glayout.tab-premium .pmhero .pmit b { font-size: .74rem; }
  .glayout.tab-premium .pmhero .pmnm { font-size: .7rem; }
  .glayout.tab-premium .pmbtn.big { min-width: 128px; }
}

/* ===================== v2.0-b.65: World Boss เคลื่อนไหว (ภาพเดิม + CSS ล้วน) =====================
   ① หายใจ/ลอยเบาๆ ② ออร่า + อนุภาคประจำบอส + ฟ้าแลบ ③ สั่น + กะพริบแดงตอนโดนตี ④ สลายตอนบอสตาย
   ชั้นภาพ .wbx อยู่ใต้เงาไล่สี (::before) และข้อความเดิมของแบนเนอร์ทั้งหมด */
@property --wbxd { syntax: '<percentage>'; inherits: true; initial-value: -15%; }
.wbbanner { overflow: hidden; isolation: isolate; }
.wbbanner::before { z-index: 1; }
.wbx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wbx img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.wbx-img { transform-origin: 50% 72%; transform: scale(1.05); animation: wbx-breathe var(--wbx-br, 4.6s) ease-in-out infinite alternate; will-change: transform; z-index: 1; }
@keyframes wbx-breathe { 0% { transform: scale(1.05) translateY(0); } 100% { transform: scale(1.085) translateY(-1.1%); } }
.wbx-ghost { z-index: 0; opacity: 0; transform: scale(1.05); filter: grayscale(1) brightness(.4) blur(1px); }
.wbx-aura { position: absolute; inset: 0; z-index: 2; mix-blend-mode: screen; opacity: .25;
  background: radial-gradient(38% 52% at var(--wbx-ax, 50%) var(--wbx-ay, 45%), var(--wbx-aura) 0%, transparent 70%);
  animation: wbx-aura var(--wbx-br, 4.6s) ease-in-out infinite alternate; }
@keyframes wbx-aura { 0% { opacity: .25; } 100% { opacity: .7; } }
.wbx-fx { position: absolute; inset: 0; z-index: 3; }
.wbx-fx i { position: absolute; bottom: var(--b); left: var(--l); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: var(--c); box-shadow: 0 0 calc(var(--s) * 2.2) var(--c); animation: wbx-rise var(--t) linear var(--dl) infinite; }
@keyframes wbx-rise { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 15% { opacity: var(--o, .9); } 100% { transform: translate(var(--dx), calc(var(--up) * -1)) scale(.4); opacity: 0; } }
.wb-griffin .wbx-fx i { border-radius: 40% 60% 50% 50%; box-shadow: none; animation-name: wbx-wind; }
@keyframes wbx-wind { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 12% { opacity: var(--o, .8); } 100% { transform: translate(var(--dx), calc(var(--up) * -1)) rotate(260deg); opacity: 0; } }
.wbx-flash { position: absolute; inset: 0; z-index: 4; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(30% 40% at var(--wbx-fx, 75%) var(--wbx-fy, 12%), rgba(210, 220, 255, .95), transparent 70%);
  animation: wbx-flash var(--wbx-fl, 9s) linear var(--wbx-fd, 0s) infinite; }
@keyframes wbx-flash { 0%, 91% { opacity: 0; } 92% { opacity: .8; } 93% { opacity: .1; } 94.5% { opacity: .6; } 97%, 100% { opacity: 0; } }
.wbx-hitfx { position: absolute; inset: 0; z-index: 5; opacity: 0; mix-blend-mode: hard-light;
  background: radial-gradient(60% 70% at 50% 50%, rgba(255, 40, 40, .55), rgba(140, 0, 0, .35) 70%, rgba(80, 0, 0, .5)); }
.wbx-edge { position: absolute; left: -5%; right: -5%; height: 16%; z-index: 5; opacity: 0; bottom: calc(var(--wbxd) - 8%);
  background: linear-gradient(to top, transparent, var(--wbx-edge) 50%, transparent); mix-blend-mode: screen; filter: blur(5px); }
.wbx-frame { position: absolute; inset: 0; z-index: 6; box-shadow: inset 0 0 70px -12px var(--wbx-aura);
  animation: wbx-aura var(--wbx-br, 4.6s) ease-in-out infinite alternate; }
/* ③ โดนตี */
.wbbanner.wbx-hit { animation: wbx-shake .38s cubic-bezier(.36, .07, .19, .97); }
.wbbanner.wbx-crit { animation: wbx-shake-big .5s cubic-bezier(.36, .07, .19, .97); }
.wbbanner.wbx-hit .wbx-hitfx { animation: wbx-red .38s ease-out; }
.wbbanner.wbx-crit .wbx-hitfx { animation: wbx-red .5s ease-out; }
.wbbanner.wbx-hit .wbx-img { filter: brightness(1.35) contrast(1.1); }
.wbbanner.wbx-crit .wbx-img { filter: brightness(1.6) contrast(1.15); }
@keyframes wbx-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-6px, 2px); } 40%, 60% { transform: translate(6px, -1px); } }
@keyframes wbx-shake-big { 10%, 90% { transform: translate(-3px, 2px) rotate(-.3deg); } 20%, 80% { transform: translate(8px, -3px) rotate(.4deg); } 30%, 50%, 70% { transform: translate(-11px, 4px) rotate(-.5deg); } 40%, 60% { transform: translate(11px, -2px) rotate(.4deg); } }
@keyframes wbx-red { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.wbx-dmg { position: absolute; z-index: 7; font-weight: 800; font-size: clamp(18px, 2.4vw, 28px); color: #fff; white-space: nowrap;
  text-shadow: 0 2px 0 #7a0000, 0 0 12px rgba(255, 60, 60, .9); animation: wbx-pop 1.1s ease-out forwards; }
.wbx-dmg.crit { color: #ffd76a; font-size: clamp(22px, 3.2vw, 38px); text-shadow: 0 2px 0 #7a4a00, 0 0 16px rgba(255, 190, 60, .95); }
@keyframes wbx-pop { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -14px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -80px) scale(1); opacity: 0; } }
/* ④ ตาย — เดิม: ภาพเทาหยุดนิ่ง · ตายต่อหน้า (dying): ละลายจากล่างขึ้นบน ขอบไฟวิ่งตาม เถ้าลอย แล้วเหลือเงาจางๆ */
.wbhero2.dead .wbx-img, .wbhero2.dead .wbx-aura, .wbhero2.dead .wbx-frame, .wbhero2.dead .wbx-flash, .wbhero2.dead .wbx-fx i:not(.ash) { animation: none; }
.wbhero2.dead .wbx-aura, .wbhero2.dead .wbx-frame, .wbhero2.dead .wbx-flash, .wbhero2.dead .wbx-fx i:not(.ash) { opacity: 0; }
.wbhero2.predie .wbdead { visibility: hidden; }
.wbhero2.dying .wbbanner { filter: none; animation: wbx-dissolve 2.4s ease-in forwards; }
.wbhero2.dying .wbx-img { -webkit-mask-image: linear-gradient(to top, transparent var(--wbxd), #000 calc(var(--wbxd) + 12%)); mask-image: linear-gradient(to top, transparent var(--wbxd), #000 calc(var(--wbxd) + 12%)); filter: saturate(.5) brightness(.9); }
.wbhero2.dying .wbx-edge { opacity: 1; }
.wbhero2.dying .wbx-ghost { opacity: 1; transition: opacity 1.2s ease 1.4s; }
.wbhero2.dying .wbdead { opacity: 0; animation: wbx-in .5s ease 2.1s forwards; }
@keyframes wbx-dissolve { from { --wbxd: -15%; } to { --wbxd: 110%; } }
@keyframes wbx-in { to { opacity: 1; } }
.wbx-fx i.ash { --c: #9a958c; box-shadow: none; animation: wbx-ash var(--t) ease-out var(--dl) forwards; animation-play-state: running; opacity: 0; }
@keyframes wbx-ash { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: .85; } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--up) * -1)); } }
/* ธีมรายบอส */
.wb-hydra   { --wbx-aura: rgba(110, 255, 120, .55); --wbx-ax: 48%; --wbx-ay: 38%; --wbx-br: 5s;   --wbx-edge: rgba(140, 255, 110, .85); --wbx-fx: 74%; --wbx-fy: 10%; --wbx-fl: 8s;  --wbx-fd: -2s; }
.wb-griffin { --wbx-aura: rgba(255, 215, 120, .5);  --wbx-ax: 50%; --wbx-ay: 40%; --wbx-br: 3.4s; --wbx-edge: rgba(255, 220, 140, .9);  --wbx-fx: 70%; --wbx-fy: 12%; --wbx-fl: 10s; --wbx-fd: -6s; }
.wb-dragon  { --wbx-aura: rgba(200, 90, 255, .5);   --wbx-ax: 55%; --wbx-ay: 42%; --wbx-br: 6s;   --wbx-edge: rgba(255, 120, 60, .9);   --wbx-fx: 92%; --wbx-fy: 40%; --wbx-fl: 7s;  --wbx-fd: -4s; }
@media (prefers-reduced-motion: reduce) {
  .wbx-img, .wbx-aura, .wbx-frame, .wbx-fx i, .wbx-flash { animation: none !important; }
  .wbbanner.wbx-hit, .wbbanner.wbx-crit { animation: none; }
}

/* v2.0-b.68: รายชื่อออนไลน์ — เห็นพร้อมกัน 15 รายชื่อ เกินนั้นเลื่อน (scroll) ได้ */
.chatonline { --conl-h: 26px; max-height: calc(15 * var(--conl-h)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.chatonline .conl { height: var(--conl-h); padding: 0; box-sizing: border-box; }
.gsideR > * { flex-shrink: 0; } /* b.68: แผงด้านขวาไม่ถูกบีบจนข้อความทับกัน — ยาวเกินจอให้แถบขวาเลื่อนแทน */

/* ===================== v2.0-b.69: ปุ่มตั้งค่าเสียง ===================== */
.topbar .sndbtn { font-size: 1.1rem; line-height: 1; padding: 4px 8px; margin-right: 6px; text-decoration: none; }
.sndpop { position: fixed; z-index: 1000; width: 270px; padding: 12px 14px; display: grid; gap: 10px;
  background: linear-gradient(180deg, #1d2129, #13161c); border: 1px solid #6a5426; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); color: #efe6d2; }
.sndpop .sndrow { display: grid; gap: 6px; }
.sndpop label { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.sndpop input[type=checkbox] { accent-color: #e3b75a; width: 16px; height: 16px; }
.sndpop input[type=range] { accent-color: #e3b75a; width: 100%; }

/* ---------- v2.0-b.72: Lord (ชื่อนำหน้า · หอวิวัฒนาการเรืองแสงกะพริบ) · การ์ดจุติ · ล็อกการขายอุปกรณ์ ---------- */
.lordtag { display: inline-block; padding: 0 .4em; border-radius: 6px; background: linear-gradient(180deg, #3a2a12, #22180a); border: 1px solid #e0bd63; color: #f3d68a; font-weight: 700; font-size: .78em; letter-spacing: .04em; vertical-align: .08em; }
.lordglow { animation: lordGlow 2.4s ease-in-out infinite; }
/* b.74: ออร่า Lord — เรืองแสงทองเป็นจังหวะ + กะพริบวาบ (ใช้กับรูปหอทุกร่างของ Lord) */
@keyframes lordGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 214, 120, .6)) drop-shadow(0 0 12px rgba(224, 189, 99, .3)) brightness(1); }
  18% { filter: drop-shadow(0 0 14px rgba(255, 224, 140, .95)) drop-shadow(0 0 26px rgba(224, 122, 95, .5)) brightness(1.2); }
  22% { filter: drop-shadow(0 0 6px rgba(255, 214, 120, .6)) drop-shadow(0 0 12px rgba(224, 189, 99, .3)) brightness(1.02); }
  26% { filter: drop-shadow(0 0 16px rgba(255, 236, 170, 1)) drop-shadow(0 0 32px rgba(224, 122, 95, .55)) brightness(1.25); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 214, 120, .95)) drop-shadow(0 0 38px rgba(224, 122, 95, .5)) brightness(1.15); }
}
.lordbox { display: grid; gap: 10px; }
.lordbox .lordhead { display: flex; gap: 14px; align-items: center; }
.lordbox .lordhead img { width: 96px; height: 96px; object-fit: contain; }
.lordbox .lordhead h4 { margin: 0 0 2px; }
.lordbonus { margin: 0; padding-left: 20px; display: grid; gap: 2px; font-size: .9rem; }
.lordgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lordgrid h5 { margin: 4px 0 6px; }
@media (max-width: 720px) { .lordgrid { grid-template-columns: 1fr; } }
.elock { position: absolute; left: 3px; bottom: 1px; font-size: .72rem; text-shadow: 0 0 3px #000; }
.eqlockbtn.on { border-color: #e0bd63; color: #f3d68a; background: #2a2212; }
.crown[src$=".svg?v=b72"], .pt-crown[src$=".svg?v=b72"] { padding: 1px; }
@media (prefers-reduced-motion: reduce) { .lordglow { animation: none; filter: drop-shadow(0 0 10px rgba(255, 214, 120, .8)); } }
.pt-lord { display: inline-block; padding: 0 .35em; border-radius: 5px; border: 1px solid #e0bd63; color: #f3d68a; font-size: .8em; font-weight: 700; }

/* ---------- v2.0-b.73: แผงแอดมิน — เครื่องมือทดสอบ ---------- */
.admh { margin: 18px 0 8px; }
.admspell, .admonline { margin-top: 12px; display: grid; gap: 10px; }
.admspell h4 { margin: 0; }
.admrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.admrow label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.admrow label.grow { flex: 1 1 220px; min-width: 0; }
.admrow select, .admrow input[type="search"] { width: 100%; min-height: 36px; }
.admonline { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.admonline .seg { display: flex; gap: 6px; }
@media (max-width: 560px) { .admonline { grid-template-columns: 1fr; } }

/* ---------- v2.0-b.74: ยศหน้าชื่อผู้เล่นทุกช่องทาง ---------- */
.pname { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.pname .rnk { display: inline-flex; align-items: center; gap: 2px; color: #e0bd63; font-size: .82em; font-weight: 600; white-space: nowrap; }
.pname .rnk .crown { width: 1.25em; height: 1.25em; }
.pname .pn { min-width: 0; overflow-wrap: anywhere; }
.gname .pname { justify-content: center; }

/* ---------- v2.0-b.75: หน้าแต้มสถานะแบบใหม่ (ซ้าย: ลงแต้ม · ขวา: การ์ดหอคอย) ---------- */
.stwrap { container-type: inline-size; }
.stpage { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); grid-template-areas: "head card" "reset card" "rows card"; grid-template-rows: auto auto 1fr; gap: 14px 22px; align-items: start; }
.stpage .sthead { grid-area: head; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.stpage .sthead h2 { margin: 0; color: var(--gold); font-size: 1.5rem; }
.stact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stact button { width: auto; }
.stleft { padding: 3px 9px; border-radius: 999px; background: #2a2212; border: 1px solid #5c4a22; color: #f3d68a; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.stleft.big { padding: 6px 12px; font-size: .95rem; }
.strows { grid-area: rows; display: grid; gap: 16px; min-width: 0; }
.stfoot { grid-area: foot; }
/* b.77: แถบล้างแต้มสถานะด้านบน (ใช้ Platinum) */
.streset { grid-area: reset; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, #12232a 0%, var(--panel) 70%); border: 1px solid #2b5560; min-width: 0; }
.stri { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #10262b; display: flex; align-items: center; justify-content: center; }
.strt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.strt > b { font-size: .95rem; color: var(--text); }
.strt > span { font-size: .8rem; color: var(--muted); }
.strt > span b { color: #bfeef6; }
.streset .strs { display: none; }
.strbtn { flex: none; width: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid #2b6f7c; background: #10262b; color: #bfeef6; font-weight: 700; }
.strbtn:not(:disabled):hover { border-color: #6fd6e8; }
.strbtn .strs { display: none; }
.stgrp { display: grid; gap: 8px; }
.stgh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px; }
.stgh h3 { margin: 0; font-size: 1.05rem; color: #b9a7ff; } /* b.77: หัวกลุ่มสีม่วง · ไม่มีสรุปท้ายหัวกลุ่ม (ตามแบบ) */
.stgh span { display: none; }
.strow2 { display: grid; grid-template-columns: 38px minmax(0, 1.1fr) minmax(0, .9fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.sticon { width: 38px; height: 38px; border-radius: 10px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.stpage .stn { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.stpage .stn b { color: #f3d68a; font-size: 1.05rem; }
.stpage .stn small { color: var(--muted); font-size: .8rem; }
.stpage .stn .stlv { display: none; }
.stv { display: flex; flex-direction: column; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stv b { font-size: 1.35rem; color: var(--text); }
.stv small { color: var(--muted); font-size: .8rem; }
.strow2 .up, .stsum .up, .stv .up { color: #7cc4a4; font-weight: 600; font-size: .85rem; }
.stb { display: flex; gap: 6px; }
.stb button { min-width: 44px; min-height: 40px; width: auto; }
.sttcard { grid-area: card; position: sticky; top: 8px; display: grid; gap: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 28%, #23302f 0%, var(--panel) 62%); }
.sttcard.lord { border-color: #7a6531; }
.sttop { display: grid; gap: 10px; justify-items: center; text-align: center; }
.stimg { position: relative; width: 260px; max-width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.stimg img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.sthalo { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 215, 120, .45) 0%, rgba(217, 180, 90, .14) 45%, rgba(217, 180, 90, 0) 70%); animation: stHalo 2.4s ease-in-out infinite; }
@keyframes stHalo { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.06); } }
.stwho { display: grid; gap: 4px; justify-items: center; min-width: 0; }
.stnm { font-size: 1.2rem; font-weight: 700; }
.stnm .pname { justify-content: center; }
.sttw { color: var(--muted); font-size: .9rem; }
.stchips { display: none; gap: 6px; flex-wrap: wrap; }
.stchips span:not(.stleft) { padding: 3px 8px; border-radius: 8px; background: var(--panel-2); color: var(--muted); font-size: .8rem; }
.stsums { display: grid; gap: 6px; }
.stsum { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); }
.stsum .stsl { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .88rem; margin-right: auto; }
.stsum b { font-variant-numeric: tabular-nums; }
.stsum .stprec { color: var(--muted); font-weight: 400; font-size: .78rem; }
.stlord { text-align: center; color: #f3d68a; font-size: .82rem; }
/* มือถือ / พื้นที่แคบ: การ์ดหอบนสุด · ค่าพลังย่อ 3×2 · แถวลงแต้มย่อต่อใต้การ์ด */
@container (max-width: 700px) {
  .stpage { grid-template-columns: 1fr; grid-template-areas: "head" "reset" "card" "rows"; grid-template-rows: none; gap: 0; }
  .streset { gap: 8px; padding: 5px 5px 5px 10px; border-radius: 10px; margin-bottom: 10px; }
  .stri { display: none; }
  .strt > b { font-size: .8rem; }
  .strt > span { font-size: .68rem; }
  .streset .strl { display: none; }
  .streset .strs, .strbtn .strs { display: inline; }
  .strbtn { min-height: 36px; padding: 0 10px; font-size: .8rem; gap: 5px; }
  .stpage .sthead { margin-bottom: 10px; flex-wrap: nowrap; }
  .stpage .sthead h2 { font-size: 1.15rem; white-space: nowrap; }
  .stact { flex-wrap: nowrap; gap: 6px; }
  .stact button { min-height: 36px; padding: 0 10px; font-size: .85rem; white-space: nowrap; }
  .stpage .sthead .muted, .stact .stleft.big { display: none; }
  .sttcard { position: static; padding: 12px; gap: 10px; border-radius: 14px 14px 0 0; border-bottom: 0; background: radial-gradient(circle at 18% 30%, #23302f 0%, var(--panel) 65%); }
  .sttop { grid-template-columns: 98px minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; gap: 12px; }
  .stimg { width: 98px; }
  .stwho { justify-items: start; }
  .stnm { font-size: 1.05rem; }
  .stnm .pname { justify-content: flex-start; }
  .sttw { font-size: .8rem; }
  .stchips { display: flex; }
  /* b.76: ค่าพลังย่อตามที่ปรับใน canvas — ช่องเตี้ย 2 บรรทัด (ชื่อ 9px · ค่า 10px · ส่วนเพิ่มต่อท้ายค่า) */
  .stsums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stsum { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "l l" "v g"; align-items: baseline; column-gap: 4px; row-gap: 0; padding: 5px 8px; min-width: 0; line-height: 1.3; }
  .stsum .stsl { grid-area: l; font-size: 9px; margin: 0; gap: 4px; }
  .stsum .stsl .sti { width: 12px; height: 12px; }
  .stsum b { grid-area: v; font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }
  .stsum .stprec { display: none; }
  .stsum .up { grid-area: g; font-size: 9px; }
  .strows { gap: 5px; padding: 0 12px 10px; margin-bottom: 12px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: var(--panel); }
  .sttcard.lord + .strows { border-color: #7a6531; }
  .stgrp { display: contents; }
  .stgh { display: none; }
  .strow2 { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 4px 5px 4px 8px; border-radius: 10px; background: var(--bg); }
  .sticon { width: 26px; height: 26px; background: none; }
  .sticon .sti { width: 18px; height: 18px; }
  .stpage .stn b { font-size: .92rem; }
  .stpage .stn .stlv { display: inline; font-size: .75rem; }
  .stpage .stn .stper { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stv, .stb .stall { display: none; }
  .stb { gap: 4px; }
  .stb button { min-width: 40px; min-height: 36px; padding: 0 6px; }
  .sttcard { gap: 8px; }
  .stlord { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .sthalo { animation: none; } }

/* ===== b.78: หน้าสำรวจ — เหลือแค่แผนที่ · ภาพแผนที่ใหม่ (ตามแบบใน canvas) ===== */
.wmhead { display: none; }
.wmscroll { width: 100%; }
.worldmap { container-type: inline-size; aspect-ratio: 1663 / 945; border-radius: 14px; border: 1px solid #3a3424; box-shadow: 0 10px 30px rgba(0,0,0,.6);
  background: #0a0d0f url('/assets/maps/world_map_castles.webp?v=b78') center / cover no-repeat; }
.worldmap::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 55%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%); }
.route { stroke: #8a949a; stroke-width: 3.5; stroke-dasharray: 2 18; opacity: .55; }
.route.open { stroke: #e6c36b; stroke-width: 4.5; opacity: .95; }
.region { font-family: "Noto Serif Thai", Georgia, serif; letter-spacing: .18em; font-size: clamp(.8rem, 1.87cqw, 1.5rem); }
.region small { letter-spacing: .14em; }
.r-akadia { left: 2%; right: auto; top: auto; bottom: 1.8%; color: rgba(246, 175, 34, .62); }
.r-nocturnal { right: 3%; left: auto; top: auto; bottom: 3%; color: rgba(197, 3, 161, .55); }
.r-abyss { left: 44.2%; right: auto; top: 1.5%; bottom: auto; transform: translateX(-50%); color: rgba(2, 247, 255, .62); }
.wmhint { position: absolute; left: 14px; top: 12px; z-index: 1; max-width: 30%; padding: 5px 10px; border-radius: 8px; background: rgba(9, 12, 13, .72); border: 1px solid rgba(201, 162, 74, .35); font-size: clamp(10px, 1.22cqw, 13px); line-height: 1.4; color: #a3adb3; pointer-events: none; }
.wnode { z-index: 2; gap: 3px; }
.worldmap .wnode .ring { width: clamp(40px, 7.3cqw, 100px); }
.wlabel { background: rgba(9, 12, 13, .8); border-color: rgba(201, 162, 74, .55); padding: 1px 7px; font-size: clamp(10px, 1.17cqw, 14px); }
.wlabel small { font-size: .88em; }
.wmdots, .wmnight, .wmlast { display: none; }
@media (max-width: 760px) {
  .wmhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; }
  .wmhead h2 { margin: 0; font-family: "Noto Serif Thai", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--gold); }
  .wmhead .muted { font-size: .75rem; }
  .wmscroll { contain: inline-size; width: 100%; max-width: 100%; height: 320px; overflow-x: auto; overflow-y: hidden; border-radius: 12px; border: 1px solid #3a3424; box-shadow: 0 8px 24px rgba(0,0,0,.6);
    scrollbar-width: thin; scrollbar-color: #5c4a22 transparent; -webkit-overflow-scrolling: touch; }
  .wmscroll .worldmap { width: 563px; height: 320px; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
  .wmscroll .region, .wmscroll .wmhint { display: none; }
  .wmscroll .wnode { gap: 3px; }
  .wmscroll .wnode .ring { width: 46px; border-width: 2px; }
  .wmscroll .wnode .lockic { font-size: 1em; }
  .wmscroll .wlabel { display: block; font-size: 10px; padding: 1px 6px; max-width: 11em; }
  .wmscroll .wlabel small { font-size: 9px; }
  .wmdots { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
  .wmdots span { width: 18px; height: 4px; border-radius: 2px; background: #3a4246; }
  .wmdots span.on { background: var(--gold); }
  .wmnight { display: block; margin: 0 0 10px; font-size: .8rem; text-align: center; }
  .wmlast { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #151b1e; border: 1px solid #2f3c42; }
  .wmlast > img, .wmlast > .noart { width: 54px; height: 54px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid #ffe08a; }
  .wmlast-t { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
  .wmlast-t .muted { font-size: .7rem; }
  .wmlast-t b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wmlast-t small { font-size: .75rem; color: var(--gold); }
  .wmlast .primary { width: auto; margin: 0 0 0 auto; flex: none; min-height: 40px; padding: 0 14px; }
}

/* ===== b.78: หน้าเว็บไซต์ — พื้นหลังภาพแผนที่ใหม่ทั้งหน้า ===== */
body.onportal { background: linear-gradient(180deg, rgba(7, 11, 14, .80), rgba(7, 11, 14, .93)), url('/assets/maps/world_map_castles.webp?v=b78') center 35% / cover no-repeat #070b0e; }
@media (min-width: 861px) { body.onportal { background-attachment: fixed; } }
.pt-hero::before { background: radial-gradient(ellipse at 50% 38%, rgba(9, 14, 17, .15) 0%, rgba(7, 10, 11, .78) 72%), linear-gradient(180deg, rgba(7, 10, 11, .55) 0%, rgba(7, 10, 11, 0) 18%, rgba(7, 10, 11, 0) 52%, rgba(7, 11, 14, .85) 100%); }
.pt-sec:nth-of-type(even) { background: rgba(10, 14, 16, .55); }

/* ===== b.79: Premium — บัตร VIP ในแพ็ก · มือถือแพ็ก 99/199/499 ย่อ/ขยาย ===== */
.pmmain { height: 476px; }
.pmart { height: 150px; }
.pmnew { flex: none; padding: 0 7px; border-radius: 999px; background: #c49438; color: #1b1408; font-size: .66rem; font-weight: 800; line-height: 1.6; }
.pmvipit { grid-column: 1 / -1; background: linear-gradient(90deg, rgba(240, 200, 110, .2), rgba(240, 200, 110, .04)); border-color: rgba(240, 200, 110, .6); }
.pmvipit .pmnm, .pmviprow .pmnm { display: flex; flex-direction: column; line-height: 1.2; white-space: normal; }
.pmvipit .pmnm b, .pmviprow .pmnm b { color: #f6dc8c; font-size: .84rem; }
.pmvipit .pmnm small, .pmviprow .pmnm small { color: #e9d7a8; font-size: .7rem; }
.pmvipit > b, .pmviprow > b { color: #f6dc8c; }
.pmviprow { margin: 2px 0; padding: 5px 8px; border-radius: 9px; border: 1px solid rgba(240, 200, 110, .55) !important; background: linear-gradient(90deg, rgba(240, 200, 110, .18), rgba(240, 200, 110, .04)); }
.pmico img { width: 100%; height: 100%; object-fit: cover; }
.pmvipline { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 2px 0; padding: 2px 9px; border-radius: 8px; border: 1px solid rgba(240, 200, 110, .55);
  background: linear-gradient(90deg, rgba(240, 200, 110, .22), rgba(240, 200, 110, .05)); color: #f6dc8c; font-size: .8rem; }
.pmaccs { display: none; }
@media (max-width: 860px) {
  .pmlist { display: none; }
  .pmaccs { display: flex; flex-direction: column; gap: 10px; }
  .pmaccs > p { margin: 0; }
  .pmmain { height: auto; }
  .pmart { height: 150px; }
  .pmgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pmacc { border-radius: 14px; background: #161f24; border: 1px solid var(--line); overflow: hidden; }
  .pmacc:nth-child(2) { box-shadow: inset 3px 0 0 #5ec8b8; } .pmacc:nth-child(3) { box-shadow: inset 3px 0 0 #9a7bd8; } .pmacc:nth-child(4) { box-shadow: inset 3px 0 0 #e8c86a; }
  .pmacc.open { border-color: #8a7340; }
  .pmacch { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: transparent; border: 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
  .pmacch > img { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; }
  .pmacct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .pmacct small { font-size: .66rem; letter-spacing: .12em; color: var(--muted); }
  .pmacct b { font-size: 1rem; }
  .pmaccv { font-size: .76rem; color: #f6dc8c; }
  .pmacch .pmprice { font-size: 1.05rem; }
  .pmchev { color: var(--muted); font-size: 1.2rem; transition: transform .15s; }
  .pmacc.open .pmchev { transform: rotate(180deg); }
  .pmaccb { display: flex; flex-direction: column; gap: 4px; padding: 6px 12px 12px; border-top: 1px solid #222b2f; }
  .pmaccb .pmfoot { margin-top: 6px; padding-top: 8px; border-top: 1px solid #222b2f; justify-content: space-between; }
}

/* ===== b.79: VIP ===== */
.vipchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; border: 1px dashed #5b6469; background: rgba(9, 12, 13, .6); color: var(--muted); font: inherit; font-size: .78rem; white-space: nowrap; cursor: pointer; line-height: 1.5; }
.vipchip:hover { border-color: var(--gold); color: var(--gold); }
.vipchip.on { border: 0; background: linear-gradient(180deg, #f6dc8c, #c49438); color: #2a1c05; font-weight: 700; box-shadow: 0 0 12px rgba(240, 200, 110, .4); cursor: default; }
.gstat > .vipchip { align-self: center; }
.vipt { color: #f0c86e; font-weight: 800; letter-spacing: .04em; }
.vipcard { border-color: #a8823a !important; background: linear-gradient(180deg, rgba(74, 56, 18, .55), rgba(24, 20, 10, .55)) !important; }
.vipperk span { color: #8d979c; } .vipperk.on span { color: #e9d7a8; }
.vipexp { color: #e9d7a8; margin-top: 4px; }
.tustat { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 7px; border: 1px solid #4a555b; background: rgba(120, 128, 134, .12); color: #c3cace; font-size: .8rem; }
.tustat.on { border-color: rgba(90, 200, 140, .45); background: rgba(60, 160, 110, .14); color: #8fe3b5; }
.big2.tuoff { color: #7d878c; text-decoration: line-through; text-decoration-thickness: 1px; }
.tunote { margin-top: 8px; padding: 8px 10px; border-radius: 9px; border: 1px dashed rgba(217, 180, 90, .4); background: rgba(217, 180, 90, .07); font-size: .84rem; line-height: 1.5; }
.vipgold { color: #f0c86e; }
.vipbar { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; border: 1px dashed #5b6469; color: var(--muted); font-size: .88rem; }
.vipbar.on { border: 1px solid #a8823a; background: linear-gradient(90deg, rgba(74, 56, 18, .6), rgba(24, 20, 10, .3)); color: #f6dc8c; }
.vipcardi { border-color: rgba(240, 200, 110, .55) !important; }

/* ===== b.79: พื้นหลังหน้าในเกมใช้ภาพแผนที่ใหม่ ===== */
body:not(.onportal) { background: linear-gradient(180deg, rgba(7, 11, 14, .80), rgba(7, 11, 14, .90)), url('/assets/maps/world_map_castles.webp?v=b78') center 35% / cover no-repeat #070b0e; }
@media (min-width: 861px) { body:not(.onportal) { background-attachment: fixed; } }
.pmcard .pmvipline + .pmhint { display: none; } /* b.79: แถบบัตร VIP แทนบรรทัดคำแนะนำ — การ์ดไม่ล้นความสูงเดิม */
.pmcard .pmvipline { margin: 3px 0 0; }
.pmvipit .pmnm, .pmviprow .pmnm { text-align: left; align-items: flex-start; }

/* ===== b.81: กระดานหอคอย (หอระบบมียศ/ร่าง) · ค้นหาผู้เล่น · หน้าประวัติผู้เล่น ===== */
.tag.evo { background: rgba(163, 92, 255, .18); border-color: rgba(163, 92, 255, .55); color: #d4b8ff; }
.rtmeta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.psearch { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; border-color: #8a6d2c !important; }
.psform { display: flex; gap: 8px; align-items: center; }
.psform > b { color: #f3d68a; white-space: nowrap; }
.psform input { flex: 1; min-width: 0; min-height: 38px; }
.psres { border-radius: 10px; background: #10171a; border: 1px solid var(--line); }
.pshead { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 4px 10px; }
.psrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid #263035; }
.psrow > img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.psinfo { flex: 1; min-width: 0; }
.psact { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.onl { color: #8fe3b5; }
.evotxt { color: #d4b8ff; }
@media (max-width: 760px) {
  .rtowers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .rtower { flex-direction: column; align-items: stretch; gap: 4px; padding: 7px; border-left-width: 1px; border-top: 3px solid var(--gold); position: relative; }
  .rtower.t-dark { border-top-color: #a35cff; } .rtower.t-light { border-top-color: #ffe08a; } .rtower.t-fire { border-top-color: #ff7a3a; } .rtower.t-water { border-top-color: #4db3ff; }
  .rtower > img { width: 38px; height: 38px; position: absolute; top: 8px; left: 7px; }
  .rtower .rtinfo { padding-left: 44px; min-height: 38px; font-size: .8rem; }
  .rtower .rtinfo > b .pname { font-size: .78rem; }
  .rtower .rtinfo > b .rnk { font-size: .68rem; }
  .rtower .rtmeta { font-size: .66rem; gap: 3px; }
  .rtower .rtmeta .badge, .rtower .rtmeta .tag { font-size: .62rem; padding: 0 5px; }
  .rtower .rtrew { display: none; }
  .rtower > button, .rtower .rtres { align-self: flex-end; min-height: 30px; padding: 0 12px; font-size: .78rem; }
  .raidhead { gap: 8px; }
  .raidhead p.muted { display: none; }
  .psform > b { display: none; }
  .psearch > .muted.small { font-size: .68rem; }
  .psrow { flex-wrap: wrap; }
  .psact { width: 100%; justify-content: flex-end; }
}
.pfgrid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 14px; align-items: start; }
.pfmain { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pfcard { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pfcard.vip { border-color: #a8823a !important; }
.pftower { width: 150px; height: 150px; object-fit: contain; border-radius: 14px; background: radial-gradient(ellipse at 50% 70%, #2a2440, #0a0f12 72%); }
.pfname { font-size: 1.1rem; font-weight: 700; }
.pfchips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.pfrows { width: 100%; text-align: left; }
.pfrows .srow { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid #222b2f; font-size: .88rem; }
.pfrows .srow span { color: var(--muted); }
.pfhidden { margin: 4px 0; padding: 8px 10px; border-radius: 9px; border: 1px dashed #4a555b; color: var(--muted); font-size: .86rem; }
.pfpower { margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: rgba(9, 12, 13, .55); border: 1px solid var(--line); }
.pfpower.on { border-color: #8a6d2c; }
.pfpowh { display: flex; align-items: center; gap: 10px; }
.pfpowh > span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.pfpowh small { color: var(--muted); font-size: .72rem; }
.pfswitch { flex: none; position: relative; width: 46px; height: 26px; padding: 0; border-radius: 999px; border: 1px solid #4a555b; background: #1a2226; cursor: pointer; }
.pfswitch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #8d979c; transition: left .15s; }
.pfswitch.on { border-color: #8a6d2c; background: linear-gradient(180deg, #e9c66e, #b98f35); }
.pfswitch.on i { left: 22px; background: #1b1408; }
.pfh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pfh h3 { margin: 0; color: var(--gold); font-size: 1.05rem; }
.pfbio textarea { width: 100%; box-sizing: border-box; resize: none; padding: 10px 12px; border-radius: 10px; border: 1px solid #8a6d2c; font: inherit; line-height: 1.5; }
.pfbio p { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.6; }
.pff { display: flex; justify-content: space-between; margin-top: 4px; }
.pfstones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pfstone { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; text-align: center; }
.pfstone .pfsimg { position: relative; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; border: 2px solid #8d979c; display: block; background: #10171a; }
.pfstone.big .pfsimg { width: 80px; height: 80px; }
.pfstone .sicon { width: 100%; height: 100%; object-fit: cover; display: block; }
.pfstone em { position: absolute; right: 3px; bottom: 2px; padding: 0 5px; border-radius: 6px; background: rgba(0, 0, 0, .75); font-style: normal; font-size: .68rem; font-weight: 700; color: #fff; }
.pfstone b { font-size: .72rem; line-height: 1.2; }
.pfstone small { font-size: .64rem; color: var(--muted); }
.pfstone.tc2 .pfsimg { border-color: #7fd18b; } .pfstone.tc3 .pfsimg { border-color: #5ab4f0; box-shadow: 0 0 12px rgba(90, 180, 240, .35); }
.pfstone.tc4 .pfsimg { border-color: #f0a14a; box-shadow: 0 0 14px rgba(240, 161, 74, .4); } .pfstone.tc5 .pfsimg { border-color: #ff5f8a; box-shadow: 0 0 16px rgba(255, 95, 138, .45); }
.pfstone.tc2 small { color: #7fd18b; } .pfstone.tc3 small { color: #5ab4f0; } .pfstone.tc4 small { color: #f0a14a; } .pfstone.tc5 small { color: #ff8aa8; }
.pfslot { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }
.pfslot.empty { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; }
.pfslot.empty span { width: 68px; height: 68px; border-radius: 12px; border: 2px dashed #4a555b; display: grid; place-items: center; font-size: 1.6rem; color: var(--muted); }
.pfslot.empty small { color: var(--muted); font-size: .7rem; }
.pfpicker { margin-top: 10px; border-top: 1px solid #222b2f; padding-top: 8px; }
.pfpicker summary { cursor: pointer; color: var(--gold); font-size: .9rem; }
.pfpicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin-top: 8px; max-height: 260px; overflow: auto; }
.pfpick { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line); background: #10171a; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.pfpick .sicon { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; }
.pfpick span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .pfpick b { font-size: .78rem; } .pfpick small { font-size: .68rem; color: var(--muted); }
.pfpick.on { border-color: #f3d68a; background: rgba(243, 214, 138, .1); }
.pfpick:disabled { opacity: .4; cursor: default; }
.pfsave { display: flex; align-items: center; gap: 10px; }
.pfatk { display: flex; align-items: center; gap: 12px; border-color: #8a6d2c !important; }
.pfatk > div { flex: 1; }
.pfback { margin-bottom: 8px; }
@media (max-width: 760px) {
  .pfgrid { grid-template-columns: 1fr; }
  .pfcard { flex-direction: row; flex-wrap: wrap; text-align: left; align-items: center; }
  .pftower { width: 84px; height: 84px; }
  .pfcard > .pfname, .pfcard > .pfsub, .pfcard > .pfchips { flex: 1 1 calc(100% - 100px); }
  .pfchips { justify-content: flex-start; }
  .pfstones { justify-content: space-between; gap: 4px; }
  .pfstone, .pfslot.empty { width: 62px; }
  .pfstone .pfsimg, .pfstone.big .pfsimg, .pfslot.empty span { width: 52px; height: 52px; }
  .pfstone b { font-size: .62rem; }
  .pfatk { flex-direction: column; align-items: stretch; }
}
.psform input { flex: 1 1 auto; width: auto; min-width: 120px; }
.psform button { flex: none; width: auto; min-width: 84px; padding: 0 16px; min-height: 38px; }
@media (max-width: 760px) { /* b.81: มือถือ — กระดานกะทัดรัด 2 คอลัมน์ (ซ้าย 5 · ขวา 5) */
  .raidhead { padding: 10px !important; }
  .raidhead h3 { margin: 0 0 2px; font-size: 1rem; }
  .raidhead .muted.small { font-size: .7rem; }
  .raidact { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
  .raidact > button { width: 100%; min-height: 38px; padding: 0 6px; font-size: .82rem; margin: 0; }
  .raidact > button small { display: none; }
  .psearch { padding: 8px 10px !important; gap: 4px; }
  .rtowers { grid-auto-flow: row; }
  .rtower { min-height: 0; padding: 6px 6px 6px 6px; gap: 2px; }
  .rtower > img { width: 32px; height: 32px; top: 6px; left: 6px; }
  .rtower .rtinfo { padding-left: 38px; min-height: 32px; }
  .rtower .rtmeta { padding-right: 52px; margin-top: 1px; }
  .rtower > button, .rtower .rtres { position: absolute; right: 6px; bottom: 6px; min-height: 26px; padding: 0 8px; font-size: .72rem; }
}
@media (max-width: 760px) { .rtower .rtmeta .badge { display: none; } .rtower .rtmeta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; } }
@media (max-width: 760px) {
  .rtower .rtinfo { padding-right: 56px; min-width: 0; }
  .rtower .rtinfo > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rtower .rtinfo > b .pname { flex-wrap: nowrap; }
  .rtower .rtmeta { padding-right: 0; }
  .rtower > button, .rtower .rtres { top: 50%; bottom: auto; transform: translateY(-50%); }
}
@media (max-width: 760px) {
  .rtower .rnk { font-size: 0; margin-right: 2px; } .rtower .rnk .crown { width: 14px; height: 14px; }
  .rtower .lordtag { font-size: .58rem; padding: 0 3px; }
  .rtower > button { padding: 0 7px; }
  .rtower .rtinfo { padding-right: 60px; }
}
@media (max-width: 760px) { .rtower .rtinfo > b .rnk { font-size: 0; margin-right: 3px; } .rtower .rtinfo > b .rnk .crown { width: 15px; height: 15px; } }
@media (max-width: 760px) { .rtower .rtinfo > b .rnk img.crown { width: 15px !important; height: 15px !important; min-width: 15px; vertical-align: -2px; } }
@media (max-width: 760px) {
  .rtower > button[data-raid] { font-size: 0; padding: 0 9px; }
  .rtower > button[data-raid]::after { content: '⚔️ ตี'; font-size: .74rem; }
  .rtower .rtinfo { padding-right: 46px; }
}
.pfatk > button { width: auto; flex: none; padding: 0 18px; min-height: 42px; }
.pfsave > button { width: auto; flex: none; padding: 0 18px; }
@media (max-width: 760px) { .pfatk > button { width: 100%; } }

/* ===== b.83: แถบผลการต่อสู้ล่าสุด (World Boss / โจมตีหอคอย / God Item บน PC — แทนช่องผลด้านขวา) ===== */
.fstrip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid #6c7a8a; }
.fstrip.empty { border-left-color: var(--line); padding: 6px 12px; }
.fstrip.win { border-left-color: #4fd18b; } .fstrip.lose { border-left-color: #e0605a; } .fstrip.draw { border-left-color: #e0bd63; }
.fstrip .fres { font-size: 1rem; }
.fstrip.win .fres { color: #8fe3b5; } .fstrip.lose .fres { color: #f0a0a0; } .fstrip.draw .fres { color: #f3d68a; }
.fstrip .fgain { color: #e6e0d2; font-size: .9rem; }
.fstrip .fbtns { margin-left: auto; display: flex; gap: 6px; }

/* ===================================================================
   b.84 หน้าพื้นที่สำรวจ (PC): ฝั่งขวา = ตำนาน · มอนสเตอร์ · บอส แสดงเต็ม แทนช่อง Battle Report
   ใช้กับทุกแผนที่ (รวมแผนที่ที่เพิ่มในอนาคต) · มือถือยังเป็น Accordion เหมือนเดิม
   =================================================================== */
@media (min-width: 861px) {
  body.ingame .gmain > .gbody:has(> .area.apc) { overflow: hidden; padding-right: 0; display: flex; }
  .area.apc { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); gap: 12px; align-items: stretch; }
  .apc .apcl { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
  .apc .ahero { flex: none; aspect-ratio: auto; width: 100%; height: clamp(150px, 27vh, 300px); min-height: 0; max-height: none; }
  .apc .atitle { left: 16px; right: 16px; bottom: 12px; }
  .apc .atitle h2 { font-size: clamp(1.25rem, 2.2vw, 1.9rem); }
  .apc .atitle p { font-size: .84rem; line-height: 1.45; margin-top: 4px; }
  .apc .ainfo { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; margin: 0; }
  .apc .ainfo > .actbox, .apc .ainfo > .fstrip { flex: none; margin: 0; }
  .apc .actbox .actrow .primary small { white-space: nowrap; }
  .apc .ainfo-more { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }

  .axside { min-height: 0; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 8px;
    background: rgba(12, 15, 17, .88); border: 1px solid #3a3424; border-radius: 12px; padding: 12px 14px; box-sizing: border-box; }
  .axsec h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; font-size: .98rem; line-height: 1.3; color: #e6c878; font-family: "Noto Serif Thai", Georgia, serif; }
  .axsec h3 svg { flex: none; width: 16px; height: 16px; }
  .axsec h3 .axm { margin-left: auto; font: 400 .76rem "Sarabun", system-ui, sans-serif; color: var(--muted); }
  .axstory { border-left: 2px solid #5a4a2a; padding-left: 12px; }
  .axstory p { margin: 0 0 5px; font-size: .86rem; line-height: 1.55; color: #e3ddcf; text-indent: 1.4em; }
  .axstory p:last-child { margin: 0; }
  .axmons { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
  .axmon { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; background: linear-gradient(180deg, #1d262a, #141a1d); border: 1px solid var(--line); border-radius: 10px; padding: 6px 5px 7px; text-align: center; }
  .axside .axmon .mimg { width: 100%; max-width: 70px; height: auto; aspect-ratio: 1; }
  .axmon b { font-size: .8rem; line-height: 1.25; }
  .axmon span { font-size: .68rem; line-height: 1.25; color: var(--muted); font-family: Cinzel, Georgia, serif; }
  .axboss { display: flex; flex-direction: column; gap: 7px; background: linear-gradient(135deg, rgba(60, 42, 18, .55), rgba(20, 24, 27, .9) 60%); border: 1px solid #6b5426; border-radius: 12px; padding: 8px 12px; }
  .axbtop { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: center; }
  .axbimg { width: 100px; height: 100px; border-radius: 10px; background: radial-gradient(circle at 50% 55%, rgba(217, 180, 90, .25), transparent 65%); display: flex; align-items: center; justify-content: center; }
  .axside .axbimg .mimg.boss { width: 98px; height: 98px; }
  .axbinfo { min-width: 0; }
  .axbname { font: 700 1.05rem/1.25 "Noto Serif Thai", Georgia, serif; color: #f3e3b5; }
  .axbname small { display: block; font: 600 .72rem Cinzel, Georgia, serif; color: #c9b88a; letter-spacing: .03em; }
  .axchips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
  .axchip { font-size: .74rem; line-height: 1.4; background: #1d262a; border: 1px solid #3a464c; border-radius: 20px; padding: 2px 9px; }
  .axchip.g { border-color: #7a6230; color: #f3d68a; }
  .axchip.el-fire { color: #ffb08a; } .axchip.el-water { color: #9fd0ff; } .axchip.el-light { color: #ffe88a; } .axchip.el-dark { color: #d6b0ff; }
  .axside .ultbox { background: rgba(10, 12, 14, .6); border: 1px solid #3a3424; border-radius: 10px; padding: 6px 9px; font-size: .78rem; line-height: 1.45; margin: 0; gap: 8px; }
  .axside .ultbox .sdesc { font-size: .76rem; }
  .axside .ultbox label { font-size: .74rem; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  .axside .ultbox select { width: auto; flex: 1 1 180px; margin: 0; padding: 2px 4px; font-size: .76rem; }
  .axside .sig { margin: 0; font-size: .8rem; }
  .axleg { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 9px; border-radius: 10px; background: linear-gradient(90deg, rgba(120, 30, 40, .45), rgba(20, 24, 27, .2)); border: 1px solid #7a2e38; font-size: .78rem; line-height: 1.4; }
  .axside .axleg .mimg { width: 34px; height: 34px; flex: none; }
  .axleg b { color: #ff9a8a; }
}
/* b.84: ย่อทีละขั้นเมื่อข้อมูลยาวเกินพื้นที่ (fitAreaSide) */
@media (min-width: 861px) {
  .axside.fit1 { gap: 6px; }
  .axside.fit1 .axsec h3 { font-size: .92rem; margin-bottom: 3px; }
  .axside.fit1 .axstory p { font-size: .82rem; line-height: 1.5; margin-bottom: 4px; }
  .axside.fit1 .axmon .mimg { max-width: 58px; }
  .axside.fit1 .ultbox .sdesc { font-size: .72rem; }
  .axside.fit2 .axstory p { font-size: .78rem; line-height: 1.45; margin-bottom: 3px; }
  .axside.fit2 .axmon .mimg { max-width: 48px; }
  .axside.fit2 .axbtop { grid-template-columns: 76px minmax(0, 1fr); }
  .axside.fit2 .axbimg { width: 76px; height: 76px; }
  .axside.fit2 .axbimg .mimg.boss { width: 74px; height: 74px; }
  .axside.fit2 .ultbox { font-size: .74rem; line-height: 1.4; }
  .axside.fit3 .axstory p { font-size: .74rem; line-height: 1.4; }
  .axside.fit3 .axmon .mimg { max-width: 40px; }
  .axside.fit3 .axmon span { display: none; }
  .axside.fit4 { padding: 8px 10px; gap: 4px; }
  .axside.fit4 .axsec h3 { font-size: .86rem; }
  .axside.fit4 .axstory p { font-size: .72rem; line-height: 1.38; margin-bottom: 2px; }
  .axside.fit4 .axmon { padding: 3px 4px; }
  .axside.fit4 .axmon .mimg { max-width: 32px; }
  .axside.fit4 .axmon b { font-size: .72rem; }
  .axside.fit4 .axboss { padding: 6px 10px; gap: 5px; }
  .axside.fit4 .axchips { margin: 3px 0; }
  .axside.fit4 .ultbox > div > .muted.small { display: none; }
  .axside.fit4 .ultbox { font-size: .7rem; padding: 4px 8px; }
  .axside.fit4 .ultbox .sdesc { font-size: .68rem; }
}
@media (min-width: 861px) and (max-height: 860px) {
  .apc .atitle p { display: none; }
  .apc .ahero { height: clamp(140px, 22vh, 220px); }
}
/* b.84: เตาหลอม — ของที่ต้องใช้แลก ย่อ/กางได้ในการ์ด */
.stone details.acc.rcpacc { margin: 6px 0 0; background: rgba(0, 0, 0, .22); }
.stone details.acc.rcpacc > summary { min-height: 34px; padding: 6px 10px; }
.stone details.acc.rcpacc .acct { font-size: .85rem; }
.stone details.acc.rcpacc .accm { font-size: .78rem; }
.stone details.acc.rcpacc > .accb { padding: 8px 10px; }
.stone:has(> details.rcpacc) { align-content: start; }

/* ===== b.86: หน้าแต้มสถานะ (PC) — กระชับให้พอดีจอ ไม่ต้องเลื่อน ===== */
@container (min-width: 701px) {
  .stpage { gap: 8px 18px; }
  .stpage .sthead { gap: 6px 10px; }
  .stpage .sthead > div:first-child { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .stpage .sthead h2 { font-size: 1.25rem; }
  .stact { gap: 6px; }
  .stact button { min-height: 34px; padding: 0 14px; font-size: .9rem; }
  .stleft.big { padding: 4px 11px; font-size: .88rem; }
  .streset { padding: 6px 8px 6px 10px; gap: 10px; }
  .stri { width: 28px; height: 28px; }
  .strt > b { font-size: .88rem; }
  .strt > span { font-size: .74rem; line-height: 1.3; }
  .strbtn { min-height: 34px; padding: 0 12px; font-size: .88rem; }
  .strows { gap: 6px; }
  .stgrp { gap: 5px; }
  .stgh h3 { font-size: .92rem; line-height: 1.3; }
  .strow2 { grid-template-columns: 30px minmax(0, 1.1fr) minmax(0, .9fr) auto; gap: 10px; padding: 5px 10px; border-radius: 10px; }
  .sticon { width: 30px; height: 30px; border-radius: 8px; }
  .stpage .stn b { font-size: .95rem; }
  .stpage .stn small { font-size: .74rem; line-height: 1.3; }
  .stv b { font-size: 1.12rem; }
  .stv small { font-size: .72rem; }
  .stb { gap: 5px; }
  .stb button { min-width: 40px; min-height: 34px; }
  .sttcard { padding: 12px 14px; gap: 8px; }
  .sttop { gap: 6px; }
  .stimg { width: min(220px, 24vh); }
  .stnm { font-size: 1.08rem; }
  .sttw { font-size: .84rem; }
  .stsums { gap: 5px; }
  .stsum { padding: 6px 12px; }
}
@media (min-width: 861px) and (max-height: 820px) {
  @container (min-width: 701px) {
    .stpage { gap: 6px 16px; }
    .stpage .sthead .muted { display: none; }
    .stpage .sthead { flex-wrap: nowrap; }
    .streset { padding: 4px 6px 4px 10px; }
    .stri { display: none; }
    .streset .strl { display: none; }
    .streset .strs, .strbtn .strs { display: inline; }
    .strows { gap: 4px; }
    .stgrp { gap: 4px; }
    .strow2 { padding: 3px 10px; }
    .stpage .stn .stper { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stv { flex-direction: row; align-items: baseline; gap: 6px; }
    .stv small { display: none; }
    .stpage .stn .stlv { display: inline; font-size: .72rem; }
    .stb button { min-height: 32px; }
    .stimg { width: min(160px, 18vh); }
    .stsum { padding: 4px 12px; }
  }
}
/* b.87: หลอมเวททั้งหมด — เลือกเวทที่จะหลอม */
.fapick { margin: 8px 0 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .2); }
.fapickh { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fapickh > span { margin-right: auto; }
.fapickh .mini { padding: 3px 10px; font-size: .76rem; width: auto; }
.fapickl { display: flex; flex-wrap: wrap; gap: 5px; max-height: 132px; overflow-y: auto; scrollbar-width: thin; }
.fakind { width: auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; min-height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .8rem; opacity: .6; }
.fakind small { color: var(--muted); font-size: .72rem; }
.fakind.on { opacity: 1; color: var(--text); border-color: #b8913c; background: rgba(217, 180, 90, .14); }
.fakind.on small { color: #f3d68a; }
.fakind:hover { border-color: var(--gold); }

/* ===== b.90: Battle Report ปรับขนาดอัตโนมัติตามข้อมูล (Auto / Compact / Expanded / Full-screen) ===== */
.fwin { transition: top .22s ease, height .22s ease, left .22s ease, width .22s ease; background: rgba(12, 16, 18, .94); }
.fwin.dragging { transition: none; }
.fwin.full { background: rgba(12, 16, 18, .55); backdrop-filter: blur(2px); } /* เต็มจอ: ไม่ทึบ — ยังเห็นฉากเกมด้านหลัง */
.fwsize { display: flex; gap: 2px; flex: none; padding: 1px; border-radius: 7px; background: rgba(0, 0, 0, .3); }
.fwsize .fwbtn { padding: 3px 7px; min-width: 26px; font-size: .78rem; line-height: 1.2; }
.fwsize .fwbtn.active { background: linear-gradient(180deg, #e2c071, #b88c3a); color: #1a1208; border-color: #e8c987; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fwin { transition: none; } }
/* b.90: ในหน้าต่าง ผลการต่อสู้สูงตามเนื้อหาจริง (ไม่ยืดเต็มกรอบ) เพื่อให้วัดขนาดที่ต้องใช้ได้ถูกต้อง */
.fwin .bsplit .bright > #battle:not(:empty) { height: auto; }
.fwin .bsplit .battle.batch { height: auto; }
.fwin .bsplit .battle.batch .blist { flex: none; }
/* b.90: Compact — ข้อมูลรอบนี้น้อย: ภาพมอนสเตอร์/ช่องไฟเล็กลง หน้าต่างเตี้ย คืนพื้นที่ให้ฉากเกม */
.fwin.cmp .battle { padding: 10px; }
.fwin.cmp .battle .vs { gap: 10px; }
.fwin.cmp .foeimg .mimg { width: 76px; height: 76px; animation: none; }
.fwin.cmp .foeimg .mimg.boss { width: 96px; height: 96px; }
.fwin.cmp .battle .bossbanner { position: static; transform: none; display: inline-block; margin: 0 0 6px; font-size: .72rem; }
.fwin.cmp .battle details.blogacc { margin-top: 6px; }
.fwin.cmp .battle .log { font-size: .86rem; }

/* b.93: ข้อความแจ้งเตือนอยู่เหนือหน้าต่าง Battle Log · ไอคอนสกิลมอนสเตอร์/บอส */
.toast { z-index: 1000; }
.micon { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: radial-gradient(circle at 35% 30%, var(--mb), var(--ma) 75%); border: 1px solid rgba(0, 0, 0, .85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 1px 3px rgba(0, 0, 0, .6); }
.micon svg { width: 15px; height: 15px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)); }

/* b.95: ภาพสกิลมอนสเตอร์/บอส */
.micon.mimg { display: inline-block; object-fit: cover; background: #000; padding: 0; }

/* =====================================================================
   b.96 Battle Log แบบ MF + โจมตีออโต้ (ตามแบบใน canvas ที่ยืนยันแล้ว) — คลาสขึ้นต้น bl- ทั้งหมด
   ===================================================================== */
.bl { position: fixed; inset: 0; z-index: 950; font-family: "Sarabun", "Noto Sans Thai", system-ui, sans-serif; color: #f4efe6; }
.bl[hidden], .bl-pill[hidden], .bl-fold[hidden], .bl-ft[hidden] { display: none; }
.bl-blur { position: absolute; inset: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(0, 0, 0, .12); }
.bl-pnl { position: absolute; left: 50%; transform: translateX(-50%); width: min(800px, calc(100vw - 24px)); top: 56px; bottom: 20px; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid rgba(230, 200, 120, .45); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); background: rgba(10, 12, 14, .78); }
.bl-hd { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: linear-gradient(180deg, rgba(40, 30, 16, .95), rgba(20, 15, 9, .95)); border-bottom: 1px solid rgba(230, 200, 120, .35); }
.bl-tt { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.bl-tt b { font-family: Cinzel, serif; letter-spacing: .14em; color: #ffd98a; font-size: 15px; }
.bl-tt span { font-size: 12px; color: #e8dcc4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-hb { flex: none; width: auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; font: 700 14px "Sarabun", sans-serif; cursor: pointer; color: #fff; }
.bl-hb.x { background: linear-gradient(180deg, #b8352d, #7c1d18); border: 1px solid #ff9a8a; }
.bl-hb.fold { background: linear-gradient(180deg, #3a4a5a, #202a34); border: 1px solid #8fb8dc; }
.bl-lock { flex: none; font-size: 12px; color: #ffd98a; border: 1px dashed rgba(255, 217, 138, .5); border-radius: 6px; padding: 4px 8px; }
.bl-scene { position: relative; flex: none; height: 300px; background: #111 center / cover no-repeat; }
.bl-scene.nobg { background: radial-gradient(ellipse at 50% 80%, #2a2418, #0c0d0f 70%); }
.bl-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .35)); pointer-events: none; }
.bl-sfoe { position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: 8px 14px; display: grid; gap: 3px; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.bl-fn { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bl-fn b { font-size: 18px; color: #fff3d0; } .bl-fn span { font-size: 13px; color: #e8dcc4; } .bl-fn .lv { color: #ffe08a; font-weight: 700; }
.bl-fn .ty { font-size: 11px; font-weight: 700; letter-spacing: .08em; border: 1px solid #b4bec488; border-radius: 5px; padding: 0 6px; background: rgba(0, 0, 0, .45); }
.bl-fn .ty.boss { color: #ffcf5a; border-color: #ffcf5a99; }
.bl-fb { display: grid; grid-template-columns: 26px minmax(0, 1fr) 130px; gap: 8px; align-items: center; font-size: 12px; }
.bl-fb .k { color: #e8dcc4; font-weight: 700; } .bl-fb .v { text-align: right; font-variant-numeric: tabular-nums; }
.blbar { display: block; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, .65); border: 1px solid rgba(0, 0, 0, .85); overflow: hidden; }
.blbar i { display: block; height: 100%; transition: width .25s ease; }
.blbar.hp i { background: linear-gradient(90deg, #b8622a, #ffb347); } .blbar.sp i, .blbar.psp i { background: linear-gradient(90deg, #2b6fd6, #6cb8ff); } .blbar.php i { background: linear-gradient(90deg, #b8322f, #ff6b5e); }
.bl-mon { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 1; height: 72%; max-width: 70%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .85)); }
.bl-mon.tw { height: 66%; }
.bl-pme { flex: none; display: grid; grid-template-columns: auto auto 24px minmax(0, 1fr) 110px 24px minmax(0, .6fr) 90px; gap: 8px; align-items: center; padding: 7px 14px; background: rgba(8, 10, 12, .9); border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.bl-pme b { color: #fff3d0; white-space: nowrap; } .bl-pme .lv { color: #ffe08a; font-weight: 700; } .bl-pme .k { color: #e8dcc4; font-weight: 700; text-align: right; } .bl-pme .v { font-variant-numeric: tabular-nums; color: #f4efe6; }
.bl-auto { flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 14px; background: linear-gradient(90deg, rgba(40, 90, 60, .55), rgba(10, 12, 14, .3)); border-bottom: 1px solid rgba(120, 220, 160, .3); font-size: 13px; }
.bl-auto .dot, .bl-fold .dot { width: 10px; height: 10px; border-radius: 50%; background: #5fe08d; box-shadow: 0 0 8px #5fe08d; }
.bl-auto.off { background: linear-gradient(90deg, rgba(70, 60, 50, .5), rgba(10, 12, 14, .3)); border-bottom-color: rgba(255, 255, 255, .12); }
.bl-auto.off .dot, .bl-fold.off .dot { background: #9aa4aa; box-shadow: none; }
.bl-auto b { color: #fff; } .bl-auto .w, .bl-fold .w { color: #8ff0ad; } .bl-auto .l { color: #ff8f86; } .bl-auto .x, .bl-fold .x { color: #ffe066; } .bl-auto .g { color: #ffd98a; } .bl-auto .it { color: #d9b8ff; }
.bl-auto small { flex-basis: 100%; color: #cfe8d8; font-size: 12px; }
.bl-lg { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.bl-wait { padding: 18px 14px; color: #e8dcc4; }
.blrw { display: grid; grid-template-columns: 74px 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 5px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 15px; line-height: 1.4; }
.blrw.foe, .blrw.sys { background: rgba(0, 0, 0, .28); } .blrw.me { background: rgba(60, 45, 10, .22); }
.blrw .tn { font-weight: 700; font-size: 15px; }
.blrw.foe .tn, .blrw.foe .tx, .blrw.sys .tn, .blrw.sys .tx { color: #f2eee6; } .blrw.me .tn, .blrw.me .tx { color: #ffd76a; }
.blrw .tx b.sp { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.blrw .tx b.n { font-size: 16px; } .blrw.foe .tx b.n { color: #ff9a8a; } .blrw.me .tx b.n { color: #9ff0b8; }
.blrw .tx b.cr { color: #ffb547; } .blrw .tx i { color: #c9e9d8; font-style: normal; }
.blic { position: relative; width: 40px; height: 40px; border-radius: 7px; display: inline-flex; box-shadow: 0 0 0 1px rgba(0, 0, 0, .9), 0 0 0 2px rgba(255, 255, 255, .12); }
.blic img, .blic .micon { width: 40px; height: 40px; border-radius: 7px; margin: 0; }
.blic .micon svg { width: 24px; height: 24px; }
.blic b { position: absolute; right: -4px; bottom: -4px; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 4px; background: #111; border: 1px solid #888; color: #fff; font-size: 11px; line-height: 14px; text-align: center; }
.blic.none { box-shadow: none; }
.blrw.res { background: rgba(0, 0, 0, .35); } .blrw.res .tx { color: #f2eee6; }
.blrw.res.win .tx b { color: #8ff0ad; } .blrw.res.lose .tx b { color: #ff8f86; } .blrw.res.draw .tx b { color: #ffd98a; }
.blrw.rwd .tx b.x { color: #ffe066; } .blrw.rwd .tx b.g { color: #ffd98a; } .blrw.rwd .tx b.it { color: #d9b8ff; }
.bl-ft { flex: none; display: flex; gap: 12px; justify-content: center; padding: 10px 14px; background: rgba(10, 8, 6, .92); border-top: 1px solid rgba(230, 200, 120, .3); }
.bl-bt { width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border-radius: 12px; font: 700 17px "Sarabun", sans-serif; cursor: pointer; }
.bl-bt small { font-size: 12px; font-weight: 600; opacity: .75; }
.bl-bt.atk { background: linear-gradient(180deg, #f0cf78, #b68a35); color: #1a1205; border: 1px solid #f3d68a; } .bl-bt:disabled { filter: grayscale(.5) brightness(.8); cursor: default; }
.bl-bt.aut { background: linear-gradient(180deg, #3fa86a, #1e6a3e); color: #eafff2; border: 1px solid #8ff0ad; }
.bl-bt.stop { background: linear-gradient(180deg, #c43a32, #7c1d18); color: #fff; border: 1px solid #ff9a8a; min-width: 260px; }
.bl-pill { position: fixed; right: 18px; top: 64px; z-index: 951; width: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(14, 10, 6, .82); border: 1px solid rgba(230, 200, 120, .6); color: #ffe9b8; font: 700 14px "Sarabun", sans-serif; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); cursor: pointer; }
.bl-pill small { color: #e8dcc4; font-weight: 600; }
.bl-fold { position: fixed; right: 18px; top: 64px; z-index: 951; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 12px; background: rgba(14, 18, 16, .92); border: 1px solid rgba(120, 220, 160, .55); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); font: 13px "Sarabun", sans-serif; color: #eafff2; }
.bl-fold.off { border-color: rgba(255, 255, 255, .25); }
.bl-fold b { color: #fff; } .bl-fold .pl { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-fold .bs { display: flex; gap: 6px; }
.bl-fold button { width: auto; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 7px; font: 700 13px "Sarabun", sans-serif; cursor: pointer; }
.bl-fold .o { background: #2a3a30; border: 1px solid #8ff0ad; color: #eafff2; } .bl-fold .s { background: #7c1d18; border: 1px solid #ff9a8a; color: #fff; }
@media (max-width: 860px) {
  .bl-pnl { left: 6px; right: 6px; top: 6px; bottom: 6px; width: auto; transform: none; }
  .bl-scene { height: 210px; }
  .bl-fb { grid-template-columns: 22px minmax(0, 1fr) 100px; }
  .bl-pme { grid-template-columns: auto 22px minmax(0, 1fr) 22px minmax(0, .7fr); font-size: 11px; padding: 6px 8px; gap: 5px; }
  .bl-pme .v, .bl-pme .lv { display: none; }
  .bl-auto { gap: 8px; font-size: 12px; padding: 6px 8px; }
  .blrw { grid-template-columns: 52px 36px minmax(0, 1fr); gap: 8px; padding: 4px 8px; font-size: 13px; } .blrw .tn { font-size: 12px; }
  .blic, .blic img, .blic .micon { width: 34px; height: 34px; } .blic .micon svg { width: 20px; height: 20px; }
  .bl-ft { padding: 8px; gap: 8px; } .bl-bt { min-height: 46px; padding: 0 14px; font-size: 15px; flex: 1; } .bl-bt.stop { min-width: 0; }
  .bl-pill { top: 54px; right: 8px; padding: 7px 12px; font-size: 13px; }
  .bl-tt b { white-space: nowrap; font-size: 14px; } .bl-lock { max-width: 52%; font-size: 11px; line-height: 1.3; padding: 3px 6px; } .bl-hb { padding: 0 10px; }
  .bl-fold { left: 8px; right: 8px; top: 56px; flex-wrap: wrap; gap: 8px; } .bl-fold .pl { display: none; } .bl-fold .bs { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .blbar i { transition: none; } }

/* b.97 แจ้งปัญหาไอเทม */
.support { display: grid; gap: 14px; max-width: 900px; }
.rrform { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 10px 0; }
.rrform label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.rrform label.wide { grid-column: 1 / -1; }
.rrform input, .rrform select, .rrform textarea { width: 100%; box-sizing: border-box; }
.rrlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rrq { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(0, 0, 0, .18); display: grid; gap: 4px; }
.rrh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .rrid { font-family: ui-monospace, monospace; }
.rrst { font-size: .78rem; padding: 1px 8px; border-radius: 10px; background: #3a3a3a; }
.rrq.st-pending .rrst { background: #5a4a1a; } .rrq.st-review .rrst { background: #1e4a5a; } .rrq.st-approved .rrst { background: #2a3f6a; } .rrq.st-completed .rrst { background: #244a2c; } .rrq.st-rejected .rrst { background: #4a2424; }
.rrnote { color: #cfe8d8; }

/* v2.0-b.98 แถบประกาศ/ปิดปรับปรุง/อีเวนต์ (จาก Control Center) · โบนัสล็อกอินรายวัน */
.sitebanner { position: sticky; top: 0; z-index: 60; padding: 7px 14px; text-align: center; font-size: .9rem; color: #fff6dd; background: linear-gradient(90deg, #2a3a55, #1d2a40); border-bottom: 1px solid rgba(255, 255, 255, .12); line-height: 1.45; }
.sitebanner.lv-important { background: linear-gradient(90deg, #6a4a10, #4a3208); }
.sitebanner.lv-urgent { background: linear-gradient(90deg, #7a1c1c, #4a0f0f); }
.lbgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 10px 0; }
.lbday { border: 1px solid rgba(212, 175, 55, .35); border-radius: 10px; padding: 10px; background: rgba(20, 16, 24, .7); display: flex; flex-direction: column; gap: 6px; min-height: 130px; }
.lbday.ready { border-color: #e6c35a; box-shadow: 0 0 0 2px rgba(230, 195, 90, .35), 0 0 18px rgba(230, 195, 90, .25); }
.lbday.claimed { opacity: .6; }
.lbday.locked { opacity: .85; }
.lbn { font-weight: 700; color: #f2d98a; }
.lbr { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; flex: 1; }
.lbr span { display: flex; align-items: center; gap: 5px; }
.lbimg { width: 22px; height: 22px; object-fit: contain; }
.lbs { text-align: center; }

/* ---------- b.99 หินกระโดด (หม้อหลอม) · รางวัลพิธีเลื่อนยศ · การ์ด Lord ล็อก ---------- */
.cmode { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .1); margin-left: auto; }
.cmode button { width: auto; min-height: 34px; padding: 4px 10px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #cfc5b2; font-weight: 700; font-size: .84rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.cmode button.on { background: rgba(212, 175, 55, .14); border-color: rgba(212, 175, 55, .6); color: var(--gold); }
.cmode button.on.jump { background: linear-gradient(180deg, #1f3a52, #132634); border-color: #6fc3ff; color: #e6f6ff; box-shadow: 0 0 14px rgba(111, 195, 255, .25); }
.cmode img { width: 22px; height: 22px; object-fit: contain; }
.cmode .cmn { font-size: .72rem; background: rgba(111, 195, 255, .22); color: #cfeaff; border-radius: 999px; padding: 0 6px; }
.jumpmode .cslot.jslot { border-color: #6fc3ff; background: radial-gradient(circle, rgba(111, 195, 255, .18), transparent 70%), rgba(9, 18, 26, .7); }
.jumpmode .cslot.jslot.empty { border-style: dashed; opacity: .7; }
.jumpmode .jicon { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(111, 195, 255, .45)); }
.jumpmode .cchance b.jc { color: #9ad8ff; }
.jumpmode .jumpbtn { background: linear-gradient(180deg, #8fd3ff, #3a87bd); color: #04121c; border-color: #b7e4ff; }
.jumpmode .jumpbtn:disabled { filter: grayscale(.6); opacity: .6; }
.jinfo { display: grid; gap: 6px; justify-items: center; }
.jtab { border-collapse: collapse; font-size: .8rem; width: 100%; max-width: 420px; }
.jtab th { font-weight: 600; color: var(--muted, #a9a08c); text-align: left; padding: 3px 6px; border-bottom: 1px solid rgba(133, 114, 80, .35); }
.jtab td { padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
.jtab tr.no td { color: #8a8172; }
.jtab tr.best td b { color: #9ad8ff; }
.jtab tr.cur td { background: rgba(111, 195, 255, .1); }
.jrec { display: inline-block; font-size: .66rem; font-weight: 800; color: #04121c; background: #8fd3ff; border-radius: 5px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
@media (min-width: 761px) { .cauldron.jumpmode > .jinfo { grid-area: gems; align-self: start; } }
.rrewards { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: linear-gradient(180deg, rgba(212, 175, 55, .12), rgba(212, 175, 55, .03)); border: 1px solid rgba(212, 175, 55, .4); display: grid; gap: 8px; }
.rrewards.done { opacity: .72; }
.rrh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rrh b { color: #f6e6b8; }
.rrst { margin-left: auto; font-size: .78rem; color: #e6d7b5; }
.rrst.ok { color: #8fdc93; }
.rrl { display: flex; flex-wrap: wrap; gap: 6px; }
.rrw { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; color: #f2ead6; }
.rrw .sicon { width: 22px; height: 22px; }
.lordbox.locked { opacity: .9; }
.lordbox.locked .lordglow.dim { animation: none; filter: grayscale(.7) brightness(.7); }
.rstate2.locked { border-color: rgba(255, 255, 255, .25); color: #cfc5b2; }
/* b.100 ไอคอนใบกันแตก / น้ำยาเสริมโชค ในหน้าหลอม = 30px */
.aidico { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; flex: none; }
.gemopt .aidico { display: block; }
/* b.100 การ์ดไอเทมที่ใช้ไอคอนเหรียญกลม (หินกระโดด · ใบกันแตก · น้ำยาเสริมโชค): ไอคอนอยู่กรอบขวา ไม่ทับข้อความ */
.icard.roundart::after { width: 34%; right: 10px; top: 10px; bottom: 10px; background-position: center; background-size: contain; }
.icard.roundart .ibody { max-width: 64%; }
.icard.small.roundart::after { width: 30%; }

/* ---------- b.101 หลอมเวททั้งหมดแบบใหม่: คอลัมน์ตามเกรด · แถวตามระดับ · ไม่ต้องเลื่อน ---------- */
.fadlg.fa2 { width: min(1320px, 96vw); max-width: 96vw; max-height: 94vh; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.fadlg.fa2:not([open]) { display: none; }
.fa2 .fatop { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid rgba(201, 162, 79, .2); flex-wrap: wrap; }
.fa2 .fatop h3 { margin: 0; font-size: 1.1rem; white-space: nowrap; }
.fa2 .fagrp { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fa2 .fagrp .l { font-size: .75rem; color: var(--muted, #a9a08c); margin-right: 2px; }
.fa2 .chip { width: auto; height: 30px; min-height: 0; padding: 0 10px; font-size: .78rem; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fa2 .chip small { color: var(--muted, #a9a08c); font-weight: 400; }
.fa2 .chip .aidico { width: 26px; height: 26px; margin-left: -6px; }
.fa2 .chip .gemi { width: 14px; height: 14px; }
.fa2 .chip:disabled { opacity: .4; }
.fa2 .sp { flex: 1; }
.fa2 .x { width: 30px; height: 30px; min-height: 0; padding: 0; flex: none; }
.fa2 .facols { display: grid; grid-template-columns: repeat(var(--gcols), minmax(0, 1fr)); gap: 10px; padding: 10px 12px; align-items: start; overflow-y: auto; min-height: 0; }
.fagc { --gc: #a8b3ba; display: flex; flex-direction: column; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .08); border-top: 3px solid var(--gc); background: rgba(255, 255, 255, .02); min-width: 0; }
.fagc.t2, .fatab.t2 { --gc: #4fb3ff; } .fagc.t3, .fatab.t3 { --gc: #b57bff; } .fagc.t4, .fatab.t4 { --gc: #ffb347; }
.fagh { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: linear-gradient(90deg, color-mix(in srgb, var(--gc) 16%, transparent), transparent); }
.faga { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 6px; border: 1px solid var(--gc); background: transparent; color: #fff; font-weight: 700; font-size: .75rem; flex: none; }
.faga.on { background: color-mix(in srgb, var(--gc) 30%, transparent); }
.fagh b { font-size: .9rem; color: var(--gc); white-space: nowrap; }
.fagh .gm { margin-left: auto; font-size: .72rem; color: #cfc5b2; white-space: nowrap; }
.fagb { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 8px; }
.falvh { display: flex; align-items: baseline; gap: 6px; padding: 2px 2px 3px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: .72rem; color: var(--muted, #a9a08c); flex-wrap: wrap; }
.falvh b { font-size: .8rem; color: #f4e3b2; }
.falvh .c { font-weight: 700; color: #9fe3a8; }
.falv.warn .falvh .c { color: #f2c46b; } .falv.danger .falvh .c { color: #ff9d8a; }
.falvh .m { margin-left: auto; }
.falv.lock .falvh { opacity: .75; border-bottom: none; }
.falv.lock .falvh .m { margin-left: 0; }
.falink { width: auto; min-height: 0; padding: 0; border: 0; background: none; color: #f2c46b; text-decoration: underline; font-size: .72rem; }
.fascs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding-top: 4px; }
.fasc { width: auto; min-height: 0; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 3px; border-radius: 7px; border: 1px solid #303e45; background: #12181b; color: #e8e1d1; min-width: 0; font-weight: 400; }
.fasc .sicon { width: 28px; height: 28px; flex: none; }
.fasc .nm { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; text-align: left; min-width: 0; }
.fasc .pr { font-size: .75rem; font-weight: 700; color: #f4dc98; white-space: nowrap; }
.fasc .pr i { font-style: normal; font-weight: 400; color: #8f8676; margin-left: 2px; font-size: .66rem; }
.fasc .ck { width: 16px; height: 16px; border-radius: 50%; background: #d9b25c; color: #1a1206; font-weight: 800; font-size: .62rem; display: flex; align-items: center; justify-content: center; flex: none; }
.fasc.on { border-color: rgba(217, 178, 92, .75); background: linear-gradient(90deg, rgba(217, 178, 92, .13), rgba(217, 178, 92, .02)); }
.fasc.off { opacity: .42; filter: grayscale(.7); }
.fasc.off .ck { background: transparent; border: 1px solid rgba(255, 255, 255, .35); }
.fahelp { margin: auto 12px 10px; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgba(201, 162, 79, .35); background: rgba(0, 0, 0, .25); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 18px; font-size: .74rem; color: #b9ad93; line-height: 1.45; }
.fahelp b { color: #f4e3b2; font-weight: 600; }
.fahelp .k { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; margin-right: 4px; font-weight: 700; font-size: .68rem; vertical-align: 1px; }
.fahelp .k.ok { background: #d9b25c; color: #1a1206; } .fahelp .k.pt { border: 1px solid #d9b25c; color: #f4dc98; } .fahelp .k.g { color: #9fe3a8; border: 1px solid #6fbf73; }
.fahelp .k.o { color: #f2c46b; border: 1px solid #e2a64a; } .fahelp .k.r { color: #ff9d8a; border: 1px solid #e0614c; } .fahelp .k.ex { color: #8f8676; border: 1px solid #555; }
.faft { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-top: 1px solid rgba(201, 162, 79, .25); background: rgba(0, 0, 0, .35); flex-wrap: wrap; }
.faft .st { display: flex; align-items: baseline; gap: 5px; font-size: .75rem; color: var(--muted, #a9a08c); white-space: nowrap; }
.faft .st b { font-size: 1rem; color: #fff; }
.faft .st.bad { color: #ff9d8a; cursor: help; }
.faft .mini { width: auto; }
.fabtns { display: flex; gap: 8px; }
.fabtns .fago { width: auto; min-height: 42px; padding: 0 22px; }
.fabtns .facancel { width: auto; min-height: 42px; }
.fatabs { display: none; }
@media (max-width: 760px) {
  .fadlg.fa2 { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .fa2 .fatop { gap: 8px; padding: 10px 10px 8px; }
  .fa2 .fatop .sp { display: none; }
  .fa2 .fatop h3 { flex: 1; order: 0; }
  .fa2 .fatop .x { order: 1; }
  .fa2 .fagrp { order: 2; }
  .fatabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4px; padding: 8px 10px 0; }
  .fatab { --gc: #a8b3ba; width: auto; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border-radius: 8px 8px 0 0; border: 1px solid rgba(255, 255, 255, .1); border-bottom: none; background: rgba(255, 255, 255, .03); color: #cfc5b2; }
  .fatab b { font-size: .72rem; color: var(--gc); white-space: nowrap; } .fatab small { font-size: .66rem; }
  .fatab.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 18%, transparent); box-shadow: inset 0 3px 0 var(--gc); }
  .fa2 .facols { grid-template-columns: 1fr; padding: 8px 10px; flex: 1; }
  .fagc:not(.cur) { display: none; }
  .fahelp { display: none; }
  .faft { gap: 10px; padding: 9px 10px 12px; }
  .fabtns { width: 100%; } .fabtns .fago { flex: 1; }
}

/* ---------- b.103 โจมตีหอคอย (PC): หัวแถวเดียว · ค้นหาแถวเดียว · การ์ดเตี้ย 2 คอลัมน์ · ไม่ต้องเลื่อน ---------- */
.rpc { display: flex; flex-direction: column; gap: 8px; }
.rpc .panel2 { margin: 0; }
.rpchd { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px !important; flex-wrap: nowrap; min-width: 0; }
.rpchd h3 { margin: 0; font-size: 1.05rem; white-space: nowrap; }
.rpcinfo { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #cfc5b2; font-weight: 700; font-size: .75rem; flex: none; }
.rpcinfo.on { border-color: var(--gold, #d9b25c); color: var(--gold, #d9b25c); }
.rpcq { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: #f4dc98; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(217, 178, 92, .45); background: rgba(217, 178, 92, .08); white-space: nowrap; }
.rpcq.ok { color: #9fe3a8; border-color: #6fbf73; }
.rpcq i { display: block; width: 60px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.rpcq i b { display: block; height: 100%; background: linear-gradient(90deg, #b68a35, #f0cf78); }
.rpcmt { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: .75rem; color: var(--muted, #a9a08c); white-space: nowrap; }
.rpcmt b { color: var(--text, #ece5d5); }
.rpc .sp { flex: 1; }
.rpcauto { width: auto; min-height: 38px; padding: 0 14px; white-space: nowrap; font-size: .9rem; flex: none; }
.rpcauto small { font-weight: 400; opacity: .8; }
.rpcref { width: auto; min-height: 38px; padding: 0 10px; white-space: nowrap; font-size: .85rem; flex: none; }
.rpctip { position: absolute; left: 40px; top: calc(100% - 4px); z-index: 5; width: min(460px, 80%); padding: 10px 12px; border-radius: 10px; background: #1b2226; border: 1px solid rgba(201, 162, 79, .5); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); font-size: .75rem; line-height: 1.55; color: #d8ccb4; }
.rpctip b { color: #f4e3b2; }
.rpcsr { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px !important; }
.rpcsr .psform { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.rpcsr .psform b { font-size: .82rem; white-space: nowrap; }
.rpcsr .psform input { flex: 1; min-width: 0; height: 34px; margin: 0; }
.rpcsr .psform button { width: auto; min-height: 34px; padding: 0 14px; }
.rpcbr { width: auto; min-height: 34px; padding: 0 12px; white-space: nowrap; }
.rpc .psres { margin: 0; }
.rpcgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rtc { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 10px 0 6px; border-radius: 10px; background: var(--panel-2, #12181b); border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--gold, #d9b25c); min-width: 0; }
.rtc.t-dark { border-left-color: #a35cff; } .rtc.t-light { border-left-color: #ffe08a; } .rtc.t-fire { border-left-color: #ff7a3a; } .rtc.t-water { border-left-color: #4db3ff; }
.rtc.done { opacity: .55; } .rtc.done.win { opacity: .7; }
.rtc > img { width: 42px; height: 54px; object-fit: contain; flex: none; }
.rtci { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rtcn { font-size: .9rem; font-weight: 700; color: #f4e3b2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtcm { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: #cfc5b2; white-space: nowrap; overflow: hidden; }
.rtcm .badge, .rtcm .tag { font-size: .68rem; padding: 0 6px; line-height: 17px; }
.rtcm .tag.d-normal { border-color: #e2a64a; color: #f2c46b; }
.rtcr { color: var(--muted, #a9a08c); overflow: hidden; text-overflow: ellipsis; }
.rtatk { width: auto; min-height: 34px; padding: 0 12px; flex: none; white-space: nowrap; }
.rtc .rtres { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.rtc .rtres.win { color: #9fe3a8; } .rtc .rtres.lose { color: #ff9d8a; }
.rpc .fstrip { margin: 0; }

/* ---------- b.104 แต้มสกิล: หัวแถวเดียว · ผังเต็มพื้นที่ · กด Node = ผังเต็มจอ + แผงรายละเอียดด้านขวา ---------- */
.skpage { display: flex; flex-direction: column; gap: 8px; }
.skpage .panel2 { margin: 0; }
.skhd { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 14px !important; flex-wrap: wrap; position: relative; z-index: 6; }
.skpts { font: 700 1.75rem Georgia, "Noto Serif Thai", serif; color: #f4dc98; line-height: 1; }
.skptl { display: flex; flex-direction: column; font-size: .72rem; color: var(--muted, #a9a08c); line-height: 1.35; }
.skptl b { color: var(--text, #ece5d5); font-size: .82rem; }
.skhd .sp { flex: 1; }
.skhd .mini { width: auto; }
.skpop { position: relative; }
.skpop > summary { list-style: none; cursor: pointer; }
.skpop > summary::-webkit-details-marker { display: none; }
.skbon { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(63, 214, 160, .4); background: rgba(63, 214, 160, .07); color: #bfeedd; font-size: .78rem; white-space: nowrap; }
.skpop > summary.mini { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); font-size: .78rem; white-space: nowrap; }
.skpopb { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: min(420px, 80vw); padding: 10px 12px; border-radius: 10px; background: #1b2226; border: 1px solid rgba(201, 162, 79, .5); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); line-height: 1.55; }
.skpop.right .skpopb { left: auto; right: 0; }
.skpage .ust { position: relative; gap: 6px; }
.skpage .ustbar .mini { white-space: nowrap; flex: none; width: auto; }
.skpage .ustbar .ustsearch { flex: 0 1 220px; }
@media (min-width: 861px) { .skpage .ust { gap: 0; } .skpage .ustbar { position: absolute; z-index: 5; left: 8px; right: 8px; top: 8px; pointer-events: none; flex-wrap: nowrap; }
.skpage .ustbar > * { pointer-events: auto; }
.skpage .ustbar .ustcnt { flex-basis: auto; margin-left: auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-shadow: 0 1px 2px #000; } }
.ustfsx, .ustfst { display: none; }
@media (min-width: 861px) {
  .skpage .ustvp { height: calc(100vh - var(--skvp-off, 346px)); min-height: 380px; max-height: none; }
}
/* เต็มจอ */
body.ustfs-open { overflow: hidden; }
.ust.fs { position: fixed; inset: 0; z-index: 900; background: #06080b; gap: 0; }
.ust.fs .ustbar { position: static; height: 58px; padding: 0 16px; gap: 8px; flex-wrap: nowrap; border-bottom: 1px solid rgba(201, 162, 79, .3); background: linear-gradient(180deg, #141a1e, #0c1013); pointer-events: auto; }
.ust.fs .ustfst { display: inline-block; order: -1; margin-right: 8px; font-size: 1rem; color: #f4e3b2; white-space: nowrap; }
.ust.fs .ustfst b { font: 700 1.2rem Georgia, serif; color: #f4dc98; }
.ust.fs .ustcnt { display: none; }
.ust.fs .ustfsx { display: inline-flex; align-items: center; gap: 8px; order: 99; margin-left: auto; width: auto; height: 42px; min-height: 0; padding: 0 16px 0 12px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .45); background: #1c2328; color: #fff; font-weight: 700; font-size: .95rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); cursor: pointer; }
.ust.fs .ustfsx span { width: 26px; height: 26px; border-radius: 50%; background: #e0614c; display: inline-flex; align-items: center; justify-content: center; }
.ust.fs .ustvp { height: calc(100vh - 58px) !important; min-height: 0; border-radius: 0; border: 0; margin-right: 380px; }
.ust.fs .usttip { position: fixed !important; right: 0; top: 58px; bottom: 0; left: auto !important; width: 380px !important; max-height: none; border-radius: 0; border: 0; border-left: 1px solid rgba(201, 162, 79, .35); background: linear-gradient(180deg, #151b1f, #0d1114); padding: 18px; font-size: .9rem; box-shadow: none; }
.ust.fs .usttip[hidden] { display: block; }
.ust.fs .usttip[hidden]::before { content: 'กด Node ในผังเพื่อดูรายละเอียดและอัปเกรด'; display: block; color: var(--muted, #a9a08c); text-align: center; margin-top: 40%; }
.ust.fs .usttip[hidden] > * { display: none; }
.ust.fs .usttip .utt-h img { width: 64px; height: 64px; }
.ust.fs .usttip .utt-h b { font-size: 1.2rem; }
.ust.fs .usttip .utt-f { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 10px; }
.ust.fs .usttip .utt-f button { min-height: 48px; font-size: 1rem; }
.ust.fs .ustlegend { left: 14px; bottom: 12px; }
@media (max-width: 860px) {
  .ust.fs .ustbar { overflow-x: auto; padding-right: 108px; }
  .ust.fs .ustfsx { position: fixed; right: 10px; top: 8px; z-index: 5; }
  .ust.fs .ustfst { font-size: .9rem; }
  .ust.fs .ustvp { margin-right: 0; height: calc(55vh - 58px) !important; }
  .ust.fs .usttip { top: auto; left: 0 !important; width: auto !important; height: 45vh; border-left: 0; border-top: 1px solid rgba(201, 162, 79, .35); }
}
/* เมนูวิวัฒนาการหอ */
.evotab .evosec { margin: 0; }

/* ---------- b.112: หอ Lord วิวัฒน์ขยับได้ (รูปใหญ่) · รูปเล็กออร่าเบา · ลดการเคลื่อนไหว = ภาพนิ่ง ---------- */
.lfxw { position: relative; display: inline-block; line-height: 0; isolation: isolate; vertical-align: middle; flex: none; }
.lfxw > img.lfx { position: relative; z-index: 2; animation: lfxFloat 4.2s ease-in-out infinite, lfxGlow 2.4s ease-in-out infinite; will-change: transform; }
.lfx-fire { --lgl: rgba(255, 120, 40, .5); --lfxf: url(#lfx-heat); }
.lfx-water { --lgl: rgba(90, 210, 255, .45); --lfxf: url(#lfx-ripple); }
.lfx-light { --lgl: rgba(255, 224, 120, .55); --lfxf: url(#lfx-shine); }
.lfx-dark { --lgl: rgba(170, 90, 255, .5); --lfxf: url(#lfx-haze); }
.lfx-back, .lfx-front { position: absolute; inset: 0; pointer-events: none; }
.lfx-back { z-index: 1; } .lfx-front { z-index: 3; }
.lfx-glow { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, var(--lgl), transparent 66%); animation: lfxPulse 3.2s ease-in-out infinite; }
.lfx-sh { position: absolute; left: 22%; right: 22%; bottom: 3%; height: 8%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, .6), transparent 70%); animation: lfxShadow 4.2s ease-in-out infinite; }
.lfx-rays { position: absolute; inset: -8%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 230, 140, .22) 0deg 6deg, transparent 6deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 64%); mask: radial-gradient(circle, #000 18%, transparent 64%); animation: lfxSpin 18s linear infinite; }
.lfx-fog { position: absolute; border-radius: 50%; filter: blur(12px); background: rgba(140, 60, 230, .42); animation: lfxOrbit linear infinite; }
.lfx-fog.f1 { width: 45%; height: 22%; left: 14%; top: 58%; animation-duration: 9s; }
.lfx-fog.f2 { width: 34%; height: 18%; left: 54%; top: 38%; animation-duration: 12s; animation-direction: reverse; }
.lfx-fog.f3 { width: 52%; height: 18%; left: 26%; top: 74%; animation-duration: 15s; background: rgba(90, 30, 170, .48); }
.lfx-front i { position: absolute; left: var(--l); bottom: var(--b); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  animation: lfxRise var(--t) linear var(--dl) infinite; }
.lfx-front i.ember { background: radial-gradient(circle, #fff3c0, #ff9a3a 45%, rgba(255, 80, 20, 0) 70%); box-shadow: 0 0 6px #ff7a2a; }
.lfx-front i.bub { border: 1.5px solid rgba(170, 235, 255, .8); background: rgba(170, 235, 255, .12); }
.lfx-front i.drop { background: #bdf0ff; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation-name: lfxFall; }
.lfx-front i.mote { background: radial-gradient(circle, #e3b8ff, #8a3dff 55%, rgba(80, 0, 160, 0) 72%); box-shadow: 0 0 5px #a35bff; animation-name: lfxSwirl; }
.lfx-front i.spark { border-radius: 0; background: #fff6c8; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 3px #ffd75a); animation-name: lfxTwinkle; animation-timing-function: ease-in-out; }
@keyframes lfxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.2%); } }
@keyframes lfxShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.86); opacity: .6; } }
@keyframes lfxPulse { 0%, 100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes lfxSpin { to { transform: rotate(360deg); } }
@keyframes lfxOrbit { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(18%, -12%); } 50% { transform: translate(5%, -26%); } 75% { transform: translate(-16%, -9%); } }
@keyframes lfxRise { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--rise) * -1)) scale(.35); opacity: 0; } }
@keyframes lfxFall { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(calc(var(--rise) * .6)); opacity: 0; } }
@keyframes lfxSwirl { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 20% { opacity: .95; } 100% { transform: translate(var(--dx), calc(var(--rise) * -.75)) rotate(200deg); opacity: 0; } }
@keyframes lfxTwinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
/* ออร่า Lord กะพริบแบบเดิม + ภาพบิดตามธาตุในฟิลเตอร์เดียวกัน */
@keyframes lfxGlow {
  0%, 100% { filter: var(--lfxf) drop-shadow(0 0 5px rgba(255, 214, 120, .6)) drop-shadow(0 0 12px rgba(224, 189, 99, .3)) brightness(1); }
  18% { filter: var(--lfxf) drop-shadow(0 0 14px rgba(255, 224, 140, .95)) drop-shadow(0 0 26px rgba(224, 122, 95, .5)) brightness(1.2); }
  22% { filter: var(--lfxf) drop-shadow(0 0 6px rgba(255, 214, 120, .6)) drop-shadow(0 0 12px rgba(224, 189, 99, .3)) brightness(1.02); }
  26% { filter: var(--lfxf) drop-shadow(0 0 16px rgba(255, 236, 170, 1)) drop-shadow(0 0 32px rgba(224, 122, 95, .55)) brightness(1.25); }
  50% { filter: var(--lfxf) drop-shadow(0 0 20px rgba(255, 214, 120, .95)) drop-shadow(0 0 38px rgba(224, 122, 95, .5)) brightness(1.15); }
}
/* ตำแหน่งที่ใช้ — ห่อแล้วยังได้ขนาด/ตำแหน่งเดิม */
.stimg > .lfxw { position: relative; width: 100%; height: 100%; }
.stimg > .lfxw > img { width: 100%; height: 100%; object-fit: contain; }
.evoart figure.big .lfxw { display: block; }
.evoart figure.big .lfxw > img { width: 100%; }
.ccard > .lfxw { display: block; width: 110px; height: 110px; margin: 0 auto 6px; }
.ccard > .lfxw > .timg { width: 100%; height: 100%; margin: 0; }
@media (max-width: 860px) {
  .ccard > .lfxw { width: 80px; height: 80px; grid-row: span 3; margin: 0; }
  /* มือถือ/แชท: แบบเบา — ไม่ใช้ภาพบิด ไม่มีลำแสง/หมอก อนุภาคไม่เกิน 4 */
  .ccard .lfxw { --lfxf: brightness(1); }
  .ccard .lfx-rays, .ccard .lfx-fog { display: none; }
  .ccard .lfx-front i:nth-child(n+5) { display: none; }
  .glayout.is-chat .ccard > .lfxw { width: 44px; height: 44px; }
}
@media (max-width: 640px) { .ccard > .lfxw { width: 58px; height: 58px; grid-row: span 2; } }
/* รูปเล็ก: ออร่าทองเต้นช้า ๆ อย่างเดียว */
.lordsoft { animation: lordSoft 3s ease-in-out infinite; }
@keyframes lordSoft { 0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 214, 120, .45)); } 50% { filter: drop-shadow(0 0 9px rgba(255, 214, 120, .85)); } }
@media (prefers-reduced-motion: reduce) {
  .lfxw > img.lfx { animation: none; filter: drop-shadow(0 0 10px rgba(255, 214, 120, .8)); }
  .lfx-front, .lfx-rays, .lfx-fog, .lfx-sh { display: none; }
  .lfx-glow { animation: none; }
  .lordsoft { animation: none; filter: drop-shadow(0 0 6px rgba(255, 214, 120, .7)); }
}
