/* World of NPCs Portal — โทนเกมมืด ม่วง-ทอง
   แอนิเมชัน: ไฟส่องตามเมาส์, เกรนฟิล์ม, วงโคจร, โหลดเปอร์เซ็นต์, การ์ดสั่น, Dock พลิก */
:root {
  --bg: #0d0704;
  --card: rgba(30, 14, 7, .74);
  --card-solid: #1a0e07;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(253, 186, 116, .2);
  --text: #fff7ed;
  --muted: #c9b2a2;
  --purple: #f97316;
  --purple-2: #c2410c;
  --purple-soft: rgba(249, 115, 22, .22);
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --green: #4ade80;
  --red: #f87171;
  --radius: 22px;
  --shadow-card: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05) inset;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(194, 65, 12, .28), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(245, 158, 11, .08), transparent 60%),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .title, .brand, .stat-num, .loading-percent, .tile .face { font-family: 'Kanit', 'IBM Plex Sans Thai', sans-serif; }
.gold { color: var(--gold); }
.warn { color: #fca5a5; }
.muted { color: var(--muted); }
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------- ไฟส่องตามเมาส์ + เกรน ---------- */
.pointer-light {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(249, 115, 22, .16), transparent 60%);
  transition: background .08s linear;
}
.noise {
  position: fixed; inset: -50%; pointer-events: none; z-index: 1; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- การ์ดกลางจอ (login / setup) ---------- */
.stage { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.card {
  position: relative; width: 100%; max-width: 420px; padding: 36px 30px 28px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  animation: cardIn .7s var(--ease-out) both;
}
.card.wide { max-width: 460px; }
.card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(249, 115, 22, .55), transparent 35%, transparent 65%, rgba(251, 191, 36, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.card.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); }
}
.card.success { animation: pop .6s var(--ease-spring) both; }
@keyframes pop { 50% { transform: scale(1.03); } }

.title { margin: 6px 0 6px; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .2px; }
.subtitle { margin: 0 0 22px; text-align: center; color: var(--muted); line-height: 1.6; font-size: 14.5px; }
.hint { margin: 20px 0 0; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- ตราและวงโคจร ---------- */
.emblem-wrap { position: relative; width: 112px; height: 112px; margin: 0 auto 10px; display: grid; place-items: center; }
.emblem-wrap.small { width: 96px; height: 96px; }
.emblem {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--purple), var(--purple-2));
  box-shadow: 0 10px 30px rgba(194, 65, 12, .55), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-4px); } }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(251, 146, 60, .35); animation: orbit 9s linear infinite; }
.orbit.spin-fast { animation-duration: 2.2s; }
.sat { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.sat.s1 { top: -4px; left: calc(50% - 4px); }
.sat.s2 { bottom: 12%; right: 4%; width: 6px; height: 6px; background: #fdba74; box-shadow: 0 0 10px #fb923c; }
.sat.s3 { bottom: 12%; left: 4%; width: 5px; height: 5px; background: #fde68a; box-shadow: 0 0 8px #fbbf24; }
@keyframes orbit { to { transform: rotate(360deg); } }

/* ---------- ช่องกรอก (pill) ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { position: relative; display: block; }
.input-pill {
  width: 100%; height: 56px; padding: 20px 52px 6px 18px; border-radius: 16px;
  border: 1px solid var(--line-strong); background: rgba(5, 4, 12, .6); color: var(--text);
  font: inherit; font-size: 16px; outline: none;
  transition: border-color .2s, box-shadow .25s, background .2s, transform .2s var(--ease-spring);
}
.input-pill:focus { border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft), 0 8px 24px -8px rgba(249, 115, 22, .6); background: rgba(10, 8, 22, .85); }
.input-pill.bad { border-color: var(--red); box-shadow: 0 0 0 4px rgba(248, 113, 113, .18); }
.field > span {
  position: absolute; left: 18px; top: 18px; color: var(--muted); font-size: 15px; pointer-events: none;
  transition: transform .2s var(--ease-out), color .2s, font-size .2s;
  transform-origin: left top;
}
.input-pill:focus + span, .input-pill:not(:placeholder-shown) + span { transform: translateY(-11px); font-size: 12px; color: #fdba74; }
.eye {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.eye:hover, .eye.on { color: #fff; background: rgba(255, 255, 255, .06); }
.form-error { min-height: 20px; margin: 0; color: #fecaca; font-size: 14px; text-align: center; }

.btn-main {
  position: relative; overflow: hidden; height: 52px; border: 0; border-radius: 16px; cursor: pointer;
  color: #fff; font-weight: 600; font-size: 16px; padding: 0 22px;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 12px 28px -10px rgba(249, 115, 22, .8);
  transition: transform .2s var(--ease-spring), box-shadow .2s, filter .2s;
}
.btn-main::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(249, 115, 22, .9); }
.btn-main:hover::after { animation: shine .9s ease; }
.btn-main:active { transform: translateY(0) scale(.98); }
.btn-main:disabled { cursor: not-allowed; filter: grayscale(.8) brightness(.7); transform: none; box-shadow: none; }
@keyframes shine { to { transform: translateX(120%); } }

.checklist { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.checklist li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.checklist li::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #4b4663; flex: 0 0 16px;
  transition: all .25s var(--ease-spring);
}
.checklist li.ok { color: #bbf7d0; }
.checklist li.ok::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, .6); transform: scale(1.1); }

/* ---------- โหลดแบบเปอร์เซ็นต์ ---------- */
.loading-wrap { position: relative; display: grid; place-items: center; gap: 6px; padding: 10px 0 4px; animation: cardIn .4s var(--ease-out) both; }
.ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.loading-wrap .ring { grid-area: 1 / 1; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .25s linear; filter: drop-shadow(0 0 6px rgba(251, 191, 36, .7)); }
.loading-percent { grid-area: 1 / 1; font-size: 26px; font-weight: 700; }
.loading-text { color: var(--muted); font-size: 14px; }

/* ---------- หน้าหลัก ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, calc((100vw - 1080px) / 2)); background: rgba(7, 6, 13, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.brand { font-size: 19px; font-weight: 800; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7280; }
.status-dot.on { background: var(--green); box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: ping 2s infinite; }
.status-dot.off { background: var(--red); }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.home { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 28px 16px 140px; display: flex; flex-direction: column; gap: 22px; }
.reveal { animation: cardIn .7s var(--ease-out) backwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .19s; } .d4 { animation-delay: .26s; } .d5 { animation-delay: .33s; }
.hero .eyebrow { margin: 0; color: #fdba74; font-weight: 600; letter-spacing: .5px; }
.hero-title { margin: 2px 0 6px; font-size: clamp(30px, 5vw, 44px); font-weight: 800; background: linear-gradient(90deg, #fff, #ffedd5 60%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; font-size: 14px; }

.wallet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat {
  position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 6px;
  transition: transform .3s var(--ease-spring), border-color .3s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.stat::after { content: ''; position: absolute; width: 160px; height: 160px; right: -60px; top: -60px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(249, 115, 22, .25)), transparent 70%); }
.stat:nth-child(1) { --glow: rgba(251, 191, 36, .22); } .stat:nth-child(3) { --glow: rgba(74, 222, 128, .18); }
.stat-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.stat-ico.coin { background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: #1c1203; }
.stat-ico.gacha { background: linear-gradient(145deg, var(--purple), var(--purple-2)); }
.stat-ico.lucky { background: linear-gradient(145deg, #22c55e, #15803d); }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 6px; }
.stat-num { font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-num.bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.12); color: var(--gold); } }

.block { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head h2 { margin: 0 0 4px; font-size: 22px; }
.block-head p { margin: 0; font-size: 14px; }
.offline-note { padding: 8px 12px; border-radius: 10px; background: rgba(248, 113, 113, .12); color: #fecaca; font-size: 13.5px; }

.ex-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ex-card { padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: rgba(5, 4, 12, .45); display: flex; flex-direction: column; gap: 16px; transition: border-color .3s, transform .3s var(--ease-spring); }
.ex-card:hover { border-color: rgba(249, 115, 22, .45); }
.ex-card.lucky:hover { border-color: rgba(74, 222, 128, .45); }
.ex-top { display: flex; gap: 12px; align-items: center; }
.ex-top h3 { margin: 0; font-size: 18px; }
.ex-top p { margin: 2px 0 0; font-size: 13.5px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.step { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: #fff; font-size: 20px; cursor: pointer; transition: background .2s, transform .15s; }
.step:hover { background: rgba(255, 255, 255, .06); }
.step:active { transform: scale(.92); }
.qty { width: 72px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 4, 12, .6); color: #fff; text-align: center; font: inherit; font-size: 18px; font-weight: 600; -moz-appearance: textfield; }
.qty::-webkit-inner-spin-button, .qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.cost { margin-left: auto; color: var(--muted); font-size: 14px; }
.cost b { color: var(--gold); font-size: 18px; }
.ex-card.lucky .btn-main { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 12px 28px -10px rgba(34, 197, 94, .7); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.history li:last-child { border-bottom: 0; }
.history .t { color: var(--muted); min-width: 92px; font-size: 13px; }
.history .what { flex: 1; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.DONE { background: rgba(74, 222, 128, .14); color: #bbf7d0; }
.badge.FAILED { background: rgba(248, 113, 113, .14); color: #fecaca; }
.badge.PENDING, .badge.TAKEN { background: rgba(251, 191, 36, .14); color: #fde68a; }

/* ---------- Dock พลิก P O R T A L ---------- */
.dock-wrap { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 30; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.dock {
  pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 22px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 50px -15px rgba(0, 0, 0, .8);
  animation: dockIn .8s var(--ease-spring) .4s both;
}
@keyframes dockIn { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.tile { position: relative; width: 52px; height: 52px; padding: 0; border: 0; background: transparent; cursor: pointer; color: #fff; }
.face {
  position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; color: #c9c3e0;
  background: linear-gradient(180deg, #2a1c14, #1a110b); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08) inset;
  transition: transform .35s var(--ease-spring), color .2s, box-shadow .25s, border-color .25s;
}
.face svg { transition: transform .35s var(--ease-spring); }
.tile:hover .face, .tile:focus-visible .face { color: var(--gold); transform: scale(1.08); box-shadow: 0 0 22px rgba(251, 191, 36, .4), 0 0 0 1px rgba(251, 191, 36, .5) inset; }
.tile:hover .face svg { transform: rotate(-8deg) scale(1.08); }
.tile.active .face { color: #1c1203; background: linear-gradient(145deg, var(--gold), var(--gold-2)); border-color: transparent; box-shadow: 0 0 22px rgba(251, 191, 36, .45); }
.tile[data-act="logout"] .face { color: #fca5a5; }
.tile[data-act="logout"]:hover .face { box-shadow: 0 0 22px rgba(248, 113, 113, .45), 0 0 0 1px rgba(248, 113, 113, .5) inset; }
.tile:hover { z-index: 2; }
.tile:focus-visible { outline: none; }
.dock-sep { width: 60%; height: 1px; background: rgba(255, 255, 255, .12); margin: 2px auto; align-self: center; }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translate(-50%, 6px) scale(.9); opacity: 0;
  white-space: nowrap; background: #fff; color: #111; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 10px;
  pointer-events: none; transition: opacity .2s, transform .25s var(--ease-spring);
}
.tip::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
.tile:hover .tip, .tile:focus-visible .tip, .tile.show-tip .tip { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- overlay ประมวลผล ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(3, 2, 8, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } }
.proc { text-align: center; }
.proc .emblem-wrap { width: 140px; height: 140px; }
.proc .ring { position: absolute; inset: 10px; width: 120px; height: 120px; }
.proc .loading-percent { position: absolute; inset: 0; display: grid; place-items: center; }
.proc.ok .ring-fg { stroke: var(--green); filter: drop-shadow(0 0 8px rgba(74, 222, 128, .8)); }
.proc.fail .ring-fg { stroke: var(--red); filter: drop-shadow(0 0 8px rgba(248, 113, 113, .8)); }
.proc #procClose { width: 100%; margin-top: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px; background: #2a160c; border: 1px solid rgba(249, 115, 22, .6);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); font-weight: 600; font-size: 14.5px; text-align: center;
  transition: opacity .25s, transform .35s var(--ease-spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(248, 113, 113, .7); }

@media (max-width: 760px) {
  .wallet { grid-template-columns: minmax(0, 1fr); }
  .ex-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-num { font-size: 28px; }
  .tile { width: 44px; height: 44px; }

  .dock { gap: 4px; padding: 10px; }
  .card { padding: 30px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .noise { display: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== โลโก้หน้า Login ===== */
.logo-wrap { position: relative; width: 300px; max-width: 90%; margin: -110px auto 4px; display: grid; place-items: center; }
.logo { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(194, 65, 12, .55)); animation: logoIn .9s var(--ease-spring) both, float 4.5s ease-in-out 1s infinite; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-20px) scale(.85) rotate(-3deg); } }
.orbit.big { inset: 8% 12%; border-color: rgba(251, 146, 60, .22); animation-duration: 14s; }
.stage:has(.logo-wrap) { padding-top: 120px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-ico { width: 40px; height: auto; filter: drop-shadow(0 4px 10px rgba(249, 115, 22, .6)); }

/* ===== หน้าต้อนรับหลังล็อกอิน ===== */
.welcome { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(194, 65, 12, .45), transparent 60%), var(--bg); animation: fade .3s ease both; }
.welcome-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; }
.welcome img { width: 220px; max-width: 60vw; height: auto; animation: logoIn .7s var(--ease-spring) both; filter: drop-shadow(0 18px 30px rgba(194, 65, 12, .6)); }
.welcome .hi { margin: 8px 0 0; color: #fdba74; font-size: 18px; font-weight: 600; letter-spacing: 1px; animation: cardIn .5s var(--ease-out) .15s both; }
.welcome .name { margin: 0; font-family: 'Kanit', sans-serif; font-size: clamp(34px, 7vw, 56px); font-weight: 800; background: linear-gradient(90deg, #fff, #ffedd5 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: cardIn .6s var(--ease-spring) .25s both; }
.welcome .bar { width: 160px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 14px; }
.welcome .bar::after { content: ''; display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--purple), var(--gold)); transform-origin: left; animation: fillBar 1.2s linear both; }
@keyframes fillBar { from { transform: scaleX(0); } }

/* ===== Dock ด้านข้าง (จอใหญ่) / ด้านบน (มือถือ) ===== */
@media (min-width: 900px) {
  .dock-wrap { top: 50%; bottom: auto; left: 18px; right: auto; transform: translateY(-50%); padding: 0; }
  .dock { flex-direction: column; animation-name: dockInSide; }
  .tip { left: calc(100% + 14px); bottom: auto; top: 50%; transform: translate(6px, -50%) scale(.9); }
  .tip::after { left: auto; right: 100%; top: 50%; margin: -6px 0 0; border-top-color: transparent; border-right-color: #fff; }
  .tile:hover .tip, .tile:focus-visible .tip, .tile.show-tip .tip { transform: translate(0, -50%) scale(1); }
  .home { padding-left: max(16px, min(110px, calc(110px - (100vw - 1300px) / 2))); padding-bottom: 60px; }
}
@keyframes dockInSide { from { opacity: 0; transform: translateX(-40px) scale(.9); } }
@media (max-width: 899px) {
  .dock-wrap { position: sticky; top: 64px; bottom: auto; padding: 10px 12px 4px; z-index: 19; }
  .tip { bottom: auto; top: calc(100% + 12px); transform: translate(-50%, -6px) scale(.9); }
  .tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #fff; }
  .tile:hover .tip, .tile:focus-visible .tip, .tile.show-tip .tip { transform: translate(-50%, 0) scale(1); }
  .dock-sep { width: 1px; height: 28px; margin: 0 2px; }
  .home { padding-bottom: 40px; }
  .toast { bottom: 24px; }
  .logo-wrap { width: 240px; margin-top: -90px; }
  .stage:has(.logo-wrap) { padding-top: 100px; }
}

/* ===== ระดับความหายาก ===== */
.r-common { --rc: #9ca3af; --rbg: rgba(156, 163, 175, .12); }
.r-uncommon { --rc: #4ade80; --rbg: rgba(74, 222, 128, .12); }
.r-rare { --rc: #60a5fa; --rbg: rgba(96, 165, 250, .14); }
.r-epic { --rc: #c084fc; --rbg: rgba(192, 132, 252, .16); }
.r-legendary { --rc: #fbbf24; --rbg: rgba(251, 191, 36, .16); }
.rarity-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--rc, #ccc); background: var(--rbg, rgba(255,255,255,.08)); border: 1px solid color-mix(in srgb, var(--rc, #ccc) 45%, transparent); }

/* ===== ชิปตั๋วบนแถบบน ===== */
.chip-mini { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: rgba(249, 115, 22, .16); color: #fed7aa; font-size: 13px; font-weight: 600; }
.chip-mini.lucky { background: rgba(74, 222, 128, .14); color: #bbf7d0; }
.chip-mini b { font-variant-numeric: tabular-nums; }
a.brand { color: inherit; text-decoration: none; }
a.tile { display: block; color: #fff; text-decoration: none; }

@media (max-width: 560px) { .who-name { display: none; } }

/* ===== ปุ่มเพิ่มเติม ===== */
.gold-btn { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1c1203; box-shadow: 0 12px 28px -10px rgba(245, 158, 11, .8); }
.ghost-btn { background: transparent; border: 1px solid var(--line-strong); box-shadow: none; color: var(--text); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ghost-btn:hover { background: rgba(255, 255, 255, .05); box-shadow: none; }

/* ===== วงล้อกาชา ===== */
.reelwin { position: relative; height: 236px; overflow: hidden; border-radius: 18px; background: rgba(4, 3, 10, .7); border: 1px solid var(--line); }
.reelwin::before, .reelwin::after { content: ''; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 2; pointer-events: none; }
.reelwin::before { left: 0; background: linear-gradient(90deg, #06050c, transparent); }
.reelwin::after { right: 0; background: linear-gradient(270deg, #06050c, transparent); }
.reel-line { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 3px; margin-left: -1.5px; z-index: 3; border-radius: 2px; background: linear-gradient(180deg, transparent, var(--gold) 20%, #fff 50%, var(--gold) 80%, transparent); box-shadow: 0 0 16px var(--gold); }
.track { position: absolute; left: 50%; top: 20px; display: flex; gap: 12px; will-change: transform; }
.track.looping { animation: reelLoop .55s linear infinite; }
@keyframes reelLoop { from { transform: translateX(var(--loop-from)); } to { transform: translateX(var(--loop-to)); } }
.rcard { width: 150px; height: 196px; flex: 0 0 150px; border-radius: 14px; border: 2px solid var(--rc); background: linear-gradient(180deg, var(--rbg), rgba(8, 7, 18, .95) 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; text-align: center; color: var(--rc); box-shadow: 0 0 18px -6px var(--rc); }
.rcard .nm { color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.35; }
.rcard.win { animation: winPulse 1s ease-in-out infinite; }
@keyframes winPulse { 50% { box-shadow: 0 0 34px 2px var(--rc); transform: scale(1.04); } }
.spin-bar { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.spin-bar .btn-main { min-width: 260px; font-size: 17px; }
.spin-status { min-height: 20px; }

.rates { display: grid; gap: 10px; margin-bottom: 18px; }
.rate-row { display: grid; grid-template-columns: 96px 1fr 60px; gap: 12px; align-items: center; font-size: 14px; }
.rate-row .bar-bg { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.rate-row .bar-fill { height: 100%; border-radius: 5px; background: var(--rc); box-shadow: 0 0 12px var(--rc); transform-origin: left; animation: fillBar 1.1s var(--ease-out) both; }
.rate-row .pct { text-align: right; font-weight: 600; color: var(--rc); }
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pool-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); background: var(--rbg); font-size: 13.5px; }
.pool-item svg { color: var(--rc); flex: 0 0 auto; }

/* ===== ผลลัพธ์ ===== */
.result-card { text-align: center; overflow: hidden; }
.result-card .title { margin-top: 4px; }
.result-ico { width: 110px; height: 110px; margin: 6px auto 4px; border-radius: 28px; display: grid; place-items: center; color: var(--rc); background: var(--rbg); border: 2px solid var(--rc); box-shadow: 0 0 40px -6px var(--rc); animation: pop .7s var(--ease-spring) both; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
.result-actions > * { flex: 1 1 0; }
.burst { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 8%, var(--rbg) 8% 12%, transparent 12% 20%, var(--rbg) 20% 24%, transparent 24% 33%, var(--rbg) 33% 37%, transparent 37% 45%, var(--rbg) 45% 49%, transparent 49% 58%, var(--rbg) 58% 62%, transparent 62% 70%, var(--rbg) 70% 74%, transparent 74% 83%, var(--rbg) 83% 87%, transparent 87%); animation: orbit 12s linear infinite; pointer-events: none; opacity: .9; }
.result-card > *:not(.burst) { position: relative; }
.result-card.r-legendary { border-color: rgba(251, 191, 36, .6); box-shadow: 0 0 80px -10px rgba(251, 191, 36, .6), var(--shadow-card); }

/* ===== Lucky Number ===== */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg.free { background: #1d1a2c; border: 1px solid var(--line-strong); }
.lg.taken { background: #2a2733; }
.lg.mine { background: #15803d; }
.lgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.num { position: relative; aspect-ratio: 1 / .78; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #1d1a2c, #13111d); color: #fff; font: 700 17px 'Kanit', sans-serif; cursor: pointer; transition: transform .2s var(--ease-spring), border-color .2s, box-shadow .2s; }
.num:not(.taken):hover:not(:disabled) { transform: translateY(-3px) scale(1.06); border-color: var(--gold); box-shadow: 0 8px 20px -8px rgba(251, 191, 36, .7); }
.num:disabled { cursor: default; }
.num.taken { background: #1a1822; color: #5d5870; border-color: transparent; }
.num.taken::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; height: 2px; background: color-mix(in srgb, var(--rc, #555) 70%, transparent); border-radius: 1px; }
.num.mine { background: linear-gradient(180deg, #166534, #14532d); color: #dcfce7; border-color: #22c55e; }
.num.mine::after { display: none; }
.num.jp { color: var(--gold); }
.num.appear { animation: cardIn .45s var(--ease-out) both; }
.flip { width: 140px; height: 160px; margin: 4px auto 10px; perspective: 800px; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease-spring); }
.flip.shaking .flip-inner { animation: wobble .5s ease-in-out infinite; }
@keyframes wobble { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.flip.flipped .flip-inner { transform: rotateY(180deg); animation: none; }
.flip-front, .flip-back { position: absolute; inset: 0; border-radius: 22px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { background: linear-gradient(145deg, var(--purple), var(--purple-2)); font: 800 56px 'Kanit', sans-serif; box-shadow: 0 16px 40px -10px rgba(194, 65, 12, .8); }
.flip-back { transform: rotateY(180deg); background: var(--card-solid); }
.flip-back .result-ico { margin: 0; }
.confirm-card { text-align: center; }

/* ===== กระเป๋า ===== */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; min-height: 40px; }
.filter b { margin-left: 4px; color: var(--text); }
.filter.on { background: rgba(249, 115, 22, .18); border-color: rgba(249, 115, 22, .5); color: #fff; }
.claim-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.claim-actions .btn-main { height: 44px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.inv-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5, 4, 12, .5); overflow: hidden; transition: border-color .2s, transform .2s var(--ease-spring); animation: cardIn .4s var(--ease-out) backwards; }
.inv-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc); box-shadow: 0 0 12px var(--rc); }
.inv-card.selectable { cursor: pointer; }
.inv-card { transition: border-color .25s, transform .3s var(--ease-spring), box-shadow .3s; }
.inv-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--rc) 60%, transparent); box-shadow: 0 18px 34px -16px color-mix(in srgb, var(--rc) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--rc) 25%, transparent) inset; }
.inv-card.sel:hover { box-shadow: 0 0 0 1px var(--gold) inset, 0 18px 34px -14px rgba(251, 191, 36, .7); }
.inv-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.inv-top .rarity-badge { font-size: 11px; padding: 2px 10px; }
.inv-top .nm { width: 100%; line-height: 1.35; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: normal; }
.inv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-card.still { animation: none; }
/* การ์ดกระเป๋าเป็นสีตามระดับไอเทมทั้งใบ */
.inv-card { border-color: color-mix(in srgb, var(--rc) 38%, transparent); background:
  radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 60%),
  linear-gradient(160deg, color-mix(in srgb, var(--rc) 13%, rgba(10, 6, 4, .9)), rgba(10, 6, 4, .82) 75%); }
.inv-card .inv-ico { background: color-mix(in srgb, var(--rc) 20%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); }
.inv-card .inv-body .meta, .inv-card .inv-id { color: color-mix(in srgb, var(--rc) 35%, #c9b2a2); }
/* แสงเรืองรอบการ์ด + แสงวิ่งผ่าน: ยิ่งเทียร์สูง ยิ่งสว่างและถี่ */
.r-common    { --glow: 10px; --glow2: 16px; --ga: 22%; --pulse: 6s;   --shine: 12s; --sh: .05; }
.r-uncommon  { --glow: 12px; --glow2: 20px; --ga: 32%; --pulse: 5s;   --shine: 9s;  --sh: .07; }
.r-rare      { --glow: 14px; --glow2: 26px; --ga: 42%; --pulse: 4s;   --shine: 7s;  --sh: .09; }
.r-epic      { --glow: 16px; --glow2: 32px; --ga: 55%; --pulse: 3s;   --shine: 5s;  --sh: .12; }
.r-legendary { --glow: 20px; --glow2: 44px; --ga: 75%; --pulse: 2.2s; --shine: 3.2s; --sh: .2; }
.inv-card { animation: cardIn .4s var(--ease-out) backwards, invGlow var(--pulse, 5s) ease-in-out infinite; }
.inv-card.still { animation: invGlow var(--pulse, 5s) ease-in-out infinite; }
@keyframes invGlow {
  0%, 100% { box-shadow: 0 0 var(--glow) -6px color-mix(in srgb, var(--rc) var(--ga), transparent); }
  50% { box-shadow: 0 0 var(--glow2) -4px color-mix(in srgb, var(--rc) var(--ga), transparent), 0 0 0 1px color-mix(in srgb, var(--rc) calc(var(--ga) * .6), transparent) inset; }
}
.inv-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, var(--sh, .06)) 48%, transparent 60%); background-size: 250% 100%;
  animation: invShine var(--shine, 9s) ease-in-out infinite; }
.inv-card:nth-child(3n+2)::after { animation-delay: -1.3s; } .inv-card:nth-child(3n)::after { animation-delay: -2.6s; }
.inv-card:nth-child(4n+1) { animation-delay: 0s, -.7s; } .inv-card:nth-child(4n+3) { animation-delay: 0s, -1.4s; }
@keyframes invShine { 0%, 45% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
/* Legendary: การ์ดทองสว่างกว่าระดับอื่นชัด ๆ */
.inv-card.r-legendary { border-color: color-mix(in srgb, var(--rc) 70%, transparent); background:
  radial-gradient(130% 100% at 0% 0%, rgba(251, 191, 36, .38), transparent 62%),
  radial-gradient(90% 80% at 100% 100%, rgba(245, 158, 11, .18), transparent 60%),
  linear-gradient(160deg, rgba(120, 72, 8, .55), rgba(30, 16, 4, .88) 78%); }
.inv-card.r-legendary .nm { color: #fff3c4; text-shadow: 0 0 12px rgba(251, 191, 36, .45); }
.inv-card.r-legendary .inv-ico { background: rgba(251, 191, 36, .28); border-color: rgba(251, 191, 36, .6); box-shadow: 0 0 16px -4px rgba(251, 191, 36, .7); }
.inv-card.r-legendary::after { background: linear-gradient(115deg, transparent 32%, rgba(255, 240, 180, .22) 46%, rgba(255, 255, 255, .28) 50%, transparent 62%); background-size: 250% 100%; }
.inv-card.sel { animation: none; }
@media (prefers-reduced-motion: reduce) { .inv-card, .inv-card.still, .inv-card::after { animation: none !important; } }
.inv-id { margin-top: 2px; font-size: 11px; color: color-mix(in srgb, var(--muted) 70%, transparent); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .inv-card:hover { transform: none; } }
.inv-card.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 10px 24px -12px rgba(251, 191, 36, .6); }
.inv-ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: grid; place-items: center; color: var(--rc); background: var(--rbg); }
.inv-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.inv-body .nm { font-weight: 600; }
.inv-body .meta { font-size: 12.5px; color: var(--muted); }
.inv-body .note { font-size: 12.5px; color: #fde68a; }
.inv-check { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; border: 2px solid #4b4663; display: grid; place-items: center; transition: all .2s var(--ease-spring); }
.inv-card.sel .inv-check { background: var(--gold); border-color: var(--gold); }
.inv-card.sel .inv-check::after { content: ''; width: 6px; height: 11px; border: solid #1c1203; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.st { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; align-self: flex-start; }
.st.UNCLAIMED { background: rgba(255, 255, 255, .08); color: #e5e7eb; }
.st.FAILED { background: rgba(248, 113, 113, .18); color: #fecaca; border: 1px solid rgba(248, 113, 113, .45); }
.st.QUEUED, .st.PROCESSING { background: rgba(251, 191, 36, .16); color: #fde68a; }
.st.PROCESSING { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.st.DELIVERED { background: rgba(74, 222, 128, .14); color: #bbf7d0; }
.st.UNKNOWN { background: rgba(248, 113, 113, .2); color: #fca5a5; }
.empty { text-align: center; padding: 24px 0; }

@media (max-width: 760px) {
  .lgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rate-row { grid-template-columns: 80px 1fr 50px; }
  .rcard { width: 130px; flex-basis: 130px; height: 180px; }
  .spin-bar .btn-main { min-width: 0; width: 100%; }
}
button.inv-card { font: inherit; color: inherit; text-align: left; width: 100%; }
@media (max-width: 480px) { .brand { font-size: 15px; white-space: nowrap; gap: 6px; } .brand-ico { width: 32px; } .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; } }

/* ===== หน้าแลกตั๋ว: 4 การ์ด + สวิตช์วิธีจ่าย ===== */
.wallet.wallet-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-ico.promo { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.stat-ico.bank { background: linear-gradient(145deg, #34d399, #047857); }
.stat-ico.fame { background: linear-gradient(145deg, #f472b6, #be185d); }
.stat-ico.time { background: linear-gradient(145deg, #fb923c, #4c1d95); }
.stat-ico.red { background: linear-gradient(145deg, #f87171, #b91c1c); }
.stat-ico.green { background: linear-gradient(145deg, #4ade80, #15803d); }
.stat-ico.blue { background: linear-gradient(145deg, #38bdf8, #0369a1); }
.stat-ico.gold-ico { background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: #1c1203; }
.pay-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 5px; margin-bottom: 18px; border-radius: 16px; background: rgba(5, 4, 12, .6); border: 1px solid var(--line-strong); }
.pay-opt { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; transition: color .25s; }
.pay-opt.on { color: #fff; }
.pay-glider { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px; background: linear-gradient(135deg, var(--gold-2), #b45309); box-shadow: 0 8px 22px -8px rgba(245, 158, 11, .8); transition: transform .45s var(--ease-spring), background .3s; }
.pay-switch.promo .pay-glider { transform: translateX(100%); background: linear-gradient(135deg, #0ea5e9, #0369a1); box-shadow: 0 8px 22px -8px rgba(14, 165, 233, .8); }
.ex-card.swap { animation: swapIn .45s var(--ease-spring); }
@keyframes swapIn { 30% { transform: scale(.98); opacity: .7; } }
.unit-price { color: var(--gold); font-weight: 600; }

/* ===== หน้าโปรไฟล์ ===== */
.hero-profile { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-main { flex: 1; min-width: 0; }
.avatar { position: relative; width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font: 800 36px 'Kanit', sans-serif; color: #fff; background: linear-gradient(145deg, var(--purple), var(--purple-2)); box-shadow: 0 16px 40px -12px rgba(194, 65, 12, .9); }
.avatar::before { content: ''; position: absolute; inset: -4px; border-radius: 30px; padding: 2px; background: conic-gradient(from 0deg, var(--gold), transparent 30%, var(--purple) 60%, transparent 85%, var(--gold)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(249, 115, 22, .16); color: #fed7aa; }
.tag[hidden] { display: none; }
.tag.alive { background: rgba(74, 222, 128, .14); color: #bbf7d0; }
.tag.dead { background: rgba(248, 113, 113, .14); color: #fecaca; }
.muted-tag { background: rgba(255, 255, 255, .06); color: var(--muted); }
.rank-badge { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 20px; background: linear-gradient(135deg, rgba(251, 191, 36, .16), rgba(249, 115, 22, .12)); border: 1px solid rgba(251, 191, 36, .35); box-shadow: 0 16px 40px -18px rgba(251, 191, 36, .6); }
.rank-badge[hidden] { display: none; }
.rank-ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: #1c1203; background: linear-gradient(145deg, var(--gold), var(--gold-2)); animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-4px) rotate(-4deg); } }
.rank-label { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; }
.rank-num { display: block; font: 800 30px 'Kanit', sans-serif; line-height: 1.1; color: var(--gold); }
.rank-of { color: var(--muted); font-size: 13px; }
.empty-note { margin: 0; color: #fde68a; border-color: rgba(251, 191, 36, .3); }
.empty-note[hidden] { display: none; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpis .stat-num { font-size: 30px; }
.stat-rank { font-size: 12.5px; color: var(--gold); min-height: 1em; }
.stat-link { font-size: 13px; color: #fdba74; text-decoration: none; font-weight: 600; }
.stat-link:hover { color: #fff; }
.stat-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { transition: transform .3s var(--ease-spring), border-color .3s; }
.panel:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head .stat-ico { width: 36px; height: 36px; border-radius: 11px; }
.rows { display: grid; grid-template-columns: 1fr auto; margin: 0; }
.rows dt, .rows dd { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.rows dt:nth-last-of-type(1), .rows dd:last-of-type { border-bottom: 0; }
.rk { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; color: #1c1203; background: var(--gold); font-weight: 700; }
.kd { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(5, 4, 12, .5); text-align: center; }
.kd b { display: block; font: 700 24px 'Kanit', sans-serif; font-variant-numeric: tabular-nums; }
.kd span { color: var(--muted); font-size: 12.5px; }
.kd-ratio { padding: 8px 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(248, 113, 113, .2), rgba(249, 115, 22, .2)); }
.kd-ratio b { color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; background: rgba(74, 222, 128, .1); color: #bbf7d0; border: 1px solid rgba(74, 222, 128, .2); }
.small { font-size: 13px; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.skill { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; padding: 12px; border-radius: 14px; background: rgba(5, 4, 12, .45); border: 1px solid var(--line); }
.sk-name { font-size: 14px; }
.sk-lv { color: var(--gold); font-size: 13px; }
.sk-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sk-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--purple), var(--gold)); transform-origin: left; animation: growX 1s var(--ease-out) both; }
@keyframes growX { from { transform: scaleX(0); } }
.my-ranks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.my-rank { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: rgba(5, 4, 12, .45); border: 1px solid var(--line); transition: transform .3s var(--ease-spring); }
.my-rank:hover { transform: translateY(-3px); }
.my-rank b { font: 800 24px 'Kanit', sans-serif; }
.my-rank span { font-size: 13.5px; }
.my-rank small { color: var(--muted); font-size: 12px; }
.my-rank.top1 { border-color: rgba(251, 191, 36, .6); background: linear-gradient(145deg, rgba(251, 191, 36, .18), rgba(5, 4, 12, .45)); }
.my-rank.top1 b { color: var(--gold); }
.my-rank.top2 b { color: #e5e7eb; } .my-rank.top3 b { color: #f59e0b; }
.lb-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.lb-tab { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.lb-tab:hover { color: #fff; border-color: rgba(249, 115, 22, .6); }
.lb-tab.on { color: #1c1203; background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; animation: cardIn .45s var(--ease-out) backwards; transition: transform .25s var(--ease-spring), background .2s; }
.lb-row:nth-child(odd) { background: rgba(255, 255, 255, .025); }
.lb-row.me { background: rgba(249, 115, 22, .2); outline: 1px solid rgba(249, 115, 22, .55); }
.lb-pos { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; background: rgba(255, 255, 255, .06); }
.lb-row.top1 .lb-pos { background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: #1c1203; box-shadow: 0 0 18px rgba(251, 191, 36, .5); }
.lb-row.top2 .lb-pos { background: linear-gradient(145deg, #e5e7eb, #9ca3af); color: #111; }
.lb-row.top3 .lb-pos { background: linear-gradient(145deg, #f59e0b, #92400e); color: #fff; }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.lb-val { font-variant-numeric: tabular-nums; color: var(--gold); }
.sync-note { text-align: center; font-size: 13px; margin: 0; }

@media (max-width: 899px) {
  .wallet.wallet-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .kpis .stat-num, .wallet.wallet-4 .stat-num { font-size: 24px; }
  .kpis, .wallet.wallet-4 { gap: 10px; }
  .kpis .stat, .wallet.wallet-4 .stat { padding: 14px; }
  .rank-badge { width: 100%; }
  .pay-switch { display: grid; width: 100%; }
  .pay-opt { padding: 11px 8px; font-size: 14px; }
  .avatar { width: 64px; height: 64px; font-size: 28px; border-radius: 20px; }
}
@media (max-width: 560px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .skill { padding: 10px; }
  .sk-name { font-size: 12.5px; }
  .my-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   หน้า Login ใหม่: ฉากภูเขาม่วง + ละอองแสง + โลโก้ลอย + การ์ดกระจกเรืองแสง
   ===================================================================== */
body[data-page="login"] { background: radial-gradient(1200px 700px at 50% 0%, #3a1a0a 0%, #1a0c05 45%, #05030d 100%); }
.login-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora { position: absolute; inset: -20% -10% 30%; background:
  radial-gradient(40% 35% at 25% 35%, rgba(249, 115, 22, .35), transparent 70%),
  radial-gradient(35% 30% at 78% 25%, rgba(236, 72, 153, .22), transparent 70%),
  radial-gradient(50% 40% at 50% 60%, rgba(194, 65, 12, .25), transparent 70%);
  filter: blur(20px); animation: auroraMove 18s ease-in-out infinite alternate; }
@keyframes auroraMove { to { transform: translate3d(3%, 4%, 0) scale(1.08); } }
.ridges { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46vh; }
.ridges .r1 { opacity: .9; } .ridges .r2 { opacity: .95; }
.crystals circle { animation: crystal 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.crystals circle:nth-child(2) { animation-delay: 1.2s; } .crystals circle:nth-child(3) { animation-delay: 2.1s; }
@keyframes crystal { 50% { opacity: .45; transform: scale(.8); } }
.fog { position: absolute; left: -10%; right: -10%; bottom: 8%; height: 30vh; background: radial-gradient(50% 50% at 50% 50%, rgba(251, 146, 60, .16), transparent 70%); filter: blur(30px); animation: fogDrift 14s ease-in-out infinite alternate; }
@keyframes fogDrift { to { transform: translateX(6%); } }
.particles { position: absolute; inset: 0; }
.particles i { position: absolute; bottom: -10px; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%;
  background: var(--c, #fed7aa); box-shadow: 0 0 10px var(--c, #fed7aa), 0 0 2px #fff; opacity: 0;
  animation: rise var(--d, 12s) linear var(--delay, 0s) infinite; }
.particles i.ember { --c: #fbbf24; }
.particles i.shard { width: 10px; height: 3px; border-radius: 2px; --c: #fb923c; }
@keyframes rise {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; }
  10% { opacity: .9; } 85% { opacity: .7; }
  100% { transform: translate3d(var(--dx, 40px), -105vh, 0) rotate(540deg); opacity: 0; }
}

.login-stage { position: relative; z-index: 2; padding: 32px 16px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.login-card {
  max-width: 470px; padding: 34px 34px 30px; border-radius: 30px;
  background: linear-gradient(180deg, rgba(36, 18, 70, .62), rgba(14, 8, 30, .82));
  border: 1px solid rgba(251, 146, 60, .45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 40px rgba(249, 115, 22, .35), 0 40px 80px -30px rgba(0, 0, 0, .9);
  backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
.login-card::before { background: linear-gradient(160deg, rgba(240, 171, 252, .9), rgba(249, 115, 22, .25) 30%, transparent 55%, rgba(251, 146, 60, .55) 85%, rgba(255, 255, 255, .7)); padding: 1.5px; }
.login-card::after { content: ''; position: absolute; top: -2px; right: 26px; width: 120px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff, transparent); box-shadow: 0 0 14px #ffedd5; animation: glint 4.5s ease-in-out infinite; }
@keyframes glint { 0%, 100% { opacity: .2; transform: translateX(0); } 50% { opacity: 1; transform: translateX(-180px); } }
.login-logo { position: relative; width: min(400px, 88vw); margin: 0 auto 6px; pointer-events: none; }
.logo-float { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(194, 65, 12, .65)) drop-shadow(0 0 22px rgba(234, 88, 12, .35)); animation: logoIn .9s var(--ease-spring) both, logoFloat 4.2s ease-in-out .9s infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-.8deg); } }
.spark { position: absolute; width: 10px; height: 10px; background: #fde68a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #fbbf24); animation: twinkle 2.4s ease-in-out infinite; }
.spark.s1 { top: 12%; left: 4%; } .spark.s2 { top: 6%; right: 8%; width: 14px; height: 14px; animation-delay: .8s; } .spark.s3 { bottom: 10%; right: 2%; animation-delay: 1.6s; }
@keyframes twinkle { 50% { transform: scale(.3) rotate(45deg); opacity: .3; } }
.login-title { margin: 0 0 6px; text-align: center; font-size: clamp(28px, 6vw, 36px); font-weight: 800; letter-spacing: .3px; color: #fff; text-shadow: 0 0 24px rgba(251, 146, 60, .55); }
.login-title .gold { color: var(--gold); text-shadow: 0 0 18px rgba(251, 191, 36, .55); }
.login-title { margin-bottom: 22px; }
.login-card .form { gap: 18px; }
.login-card .input-pill { height: 62px; border-radius: 20px; border-color: rgba(251, 146, 60, .45); background: rgba(10, 6, 24, .55);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 18px rgba(249, 115, 22, .18); }
.login-card .input-pill:focus { border-color: #fdba74; box-shadow: 0 0 0 4px rgba(249, 115, 22, .25), 0 0 26px rgba(251, 146, 60, .45); }
.field.has-ico .input-pill { padding-left: 58px; }
.field.has-ico > span:not(.f-ico) { left: 58px; top: 21px; }
.field > .f-ico { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #fdba74; display: grid; place-items: center; pointer-events: none; }
.login-card .eye { top: 11px; right: 10px; }
.login-btn { height: 60px; border-radius: 20px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(100deg, #c2410c, #f97316 55%, #fbbf24); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 14px 34px -10px rgba(249, 115, 22, .9), 0 0 24px rgba(234, 88, 12, .35); }
.login-btn svg { transition: transform .3s var(--ease-spring); }
.login-btn:hover svg { transform: translateX(5px); }
.login-btn:hover { filter: brightness(1.08); }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; color: #fdba74; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(251, 146, 60, .6)); }
.divider::after { background: linear-gradient(90deg, rgba(251, 146, 60, .6), transparent); }
.divider svg { flex: none; width: 18px; height: 18px; filter: drop-shadow(0 0 6px #fb923c); animation: twinkle 3s ease-in-out infinite; }
.login-card .hint { border-top: 0; padding-top: 12px; margin-top: 4px; color: #c9bfe0; }
.login-loading { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; }
.login-loading[hidden] { display: none; }
.spin-wrap { position: relative; width: 140px; height: 140px; }
.spin-wrap .ring { position: absolute; inset: 10px; width: 120px; height: 120px; }
.spin-wrap .loading-percent { position: absolute; inset: 0; display: grid; place-items: center; }
.slow-spin { position: absolute; inset: 0; width: 140px; height: 140px; animation: orbit 3s linear infinite; filter: drop-shadow(0 0 8px rgba(240, 171, 252, .8)); }
@media (max-width: 560px) {
  .login-stage { padding-top: 20px; }
  .login-card { padding: 26px 20px 24px; border-radius: 26px; }
  .login-logo { width: min(300px, 82vw); }
}

/* ===== แถบบน: โลโก้ใหม่ ===== */
.brand-ico { object-fit: contain; filter: drop-shadow(0 4px 10px rgba(249, 115, 22, .5)); }

/* ===== กล่องยืนยัน (ออกจากระบบ / ไม่ได้ใช้งาน) ===== */
.modal-ov[hidden] { display: none; }
.modal { max-width: 380px; text-align: center; padding: 30px 26px 24px; animation: cardIn .4s var(--ease-spring) both; }
.modal h2 { margin: 10px 0 6px; font-size: 22px; }
.modal p { margin: 0 0 20px; line-height: 1.6; }
.modal-ico { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; color: #fecaca; background: rgba(248, 113, 113, .14); border: 1px solid rgba(248, 113, 113, .35); }
.modal-ico.warn { color: #fde68a; background: rgba(251, 191, 36, .14); border-color: rgba(251, 191, 36, .35); animation: floaty 2s ease-in-out infinite; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-ghost { height: 52px; border-radius: 16px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; transition: background .2s; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-main.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 12px 28px -10px rgba(239, 68, 68, .7); }
#idleCount { color: var(--gold); font-size: 18px; }

/* ===== โปรไฟล์: เงิน / เวลาอัปเดต / สถิติ+อันดับรวมกัน ===== */
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar { overflow: visible; }
.avatar img + span { display: none; }
.avatar img[hidden] + span { display: inline; }
.money-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.money { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; font-size: 13.5px; color: var(--muted); background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .22); text-decoration: none; }
.money b { color: #a7f3d0; font-variant-numeric: tabular-nums; }
.money.gold-m { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .25); } .money.gold-m b { color: #fde68a; }
.money.coin-m { background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .3); } .money.coin-m b { color: #fed7aa; }
.money.promo-m { background: rgba(56, 189, 248, .08); border-color: rgba(56, 189, 248, .28); } .money.promo-m b { color: #bae6fd; }
a.money:hover { filter: brightness(1.2); }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; }
.sync-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: #fdba74; background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .3); white-space: nowrap; }
.sync-chip[hidden] { display: none; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.sec-tab { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.sec-tab:hover { color: #fff; border-color: rgba(249, 115, 22, .6); }
.sec-tab.on { color: #1c1203; background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sc { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border-radius: 16px; background: rgba(5, 4, 12, .5); border: 1px solid var(--line); animation: cardIn .45s var(--ease-out) backwards; transition: transform .3s var(--ease-spring), border-color .25s, box-shadow .3s; }
.sc:hover { transform: translateY(-6px) scale(1.02); border-color: rgba(251, 146, 60, .6); box-shadow: 0 16px 30px -12px rgba(249, 115, 22, .55); z-index: 1; }
.sc-label { font-size: 13px; color: var(--muted); line-height: 1.35; }
.sc-val { font: 700 22px 'Kanit', sans-serif; font-variant-numeric: tabular-nums; }
.sc-val small { font: 500 12.5px 'IBM Plex Sans Thai', sans-serif; color: var(--muted); margin-left: 4px; }
.sc-rank { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.sc-rank b { color: var(--gold); font-size: 14px; }
.sc-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 2px; }
.sc-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--gold)); transform-origin: left; animation: growX .9s var(--ease-out) both; }
.sc.top1 { border-color: rgba(251, 191, 36, .65); background: linear-gradient(150deg, rgba(251, 191, 36, .2), rgba(5, 4, 12, .5) 60%); }
.sc.top2 { border-color: rgba(229, 231, 235, .45); background: linear-gradient(150deg, rgba(229, 231, 235, .12), rgba(5, 4, 12, .5) 60%); }
.sc.top3 { border-color: rgba(245, 158, 11, .45); background: linear-gradient(150deg, rgba(180, 83, 9, .2), rgba(5, 4, 12, .5) 60%); }
.sc .medal { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #1c1203; background: var(--gold); box-shadow: 0 0 14px rgba(251, 191, 36, .6); }
.sc.top2 .medal { background: #e5e7eb; box-shadow: none; } .sc.top3 .medal { background: #f59e0b; color: #fff; box-shadow: none; }
.sc.none .sc-rank { opacity: .7; }
.sec-title { grid-column: 1 / -1; margin: 10px 0 0; font-size: 15px; color: #fdba74; }
.sec-title:first-child { margin-top: 0; }

/* ===== หน้าอันดับ ===== */
.lb-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.lb-cats { position: sticky; top: 84px; padding: 14px; max-height: calc(100vh - 110px); display: flex; flex-direction: column; gap: 10px; }
.lb-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(5, 4, 12, .6); color: var(--muted); }
.lb-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; outline: none; }
#lbCats { overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.lb-group { margin: 10px 0 4px; font-size: 12.5px; color: #fdba74; letter-spacing: .3px; }
.lb-group:first-child { margin-top: 0; }
.lb-cat { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; margin: 2px 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background .15s; }
.lb-cat:hover { background: rgba(255, 255, 255, .05); }
.lb-cat.on { background: linear-gradient(135deg, rgba(251, 191, 36, .2), rgba(249, 115, 22, .15)); color: #fff; box-shadow: 0 0 0 1px rgba(251, 191, 36, .4) inset; }
.lb-cat small { color: var(--gold); font-weight: 700; font-size: 12px; }
.lb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lb-head h2 { margin: 2px 0 0; font-size: 24px; }
.lb-sec { font-size: 13px; color: #fdba74; }
.lb-mine { padding: 8px 14px; border-radius: 12px; background: rgba(249, 115, 22, .16); border: 1px solid rgba(249, 115, 22, .4); font-size: 14px; }
.lb-mine b { color: var(--gold); }
.lb-mine[hidden] { display: none; }
.lb-name .sq { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
@media (max-width: 899px) {
  .lb-layout { grid-template-columns: minmax(0, 1fr); }
  .lb-cats { position: static; max-height: 300px; }
  .hero-side { align-items: flex-start; margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sc { padding: 12px 10px 10px; }
  .sc-val { font-size: 18px; }
  .sc-label { font-size: 12px; }
  .lb-head h2 { font-size: 20px; }
}

/* ยกการ์ดขึ้นเมื่อชี้เมาส์ */
.lb-row:hover { transform: translateX(4px); background: rgba(249, 115, 22, .1); }
.skill { transition: transform .3s var(--ease-spring), border-color .25s, box-shadow .3s; }
.skill:hover { transform: translateY(-5px); border-color: rgba(251, 146, 60, .55); box-shadow: 0 14px 26px -12px rgba(249, 115, 22, .5); }
.money { transition: transform .25s var(--ease-spring); }
.money:hover { transform: translateY(-3px); }
.stat:hover { transform: translateY(-6px); box-shadow: 0 18px 34px -14px rgba(249, 115, 22, .55); }
@media (hover: none) { .sc:hover, .skill:hover, .stat:hover { transform: none; } }
/* หน้า Login: ไฟส่องตามเมาส์อยู่เหนือฉากหลัง และสว่างขึ้นนิดหน่อย */
body[data-page="login"] .pointer-light { z-index: 1; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(251, 146, 60, .22), rgba(249, 115, 22, .08) 40%, transparent 65%); }

/* =====================================================================
   หน้า Login โทนไฟ (ภาพสนามรบเป็นพื้นหลัง) + การ์ดแนวนอน
   ===================================================================== */
body[data-page="login"] { background: #120a06; }
.login-bg.fire .aurora { display: none; }
.bg-photo { position: absolute; inset: -3%; background: url("login-bg.webp") center / cover no-repeat; animation: bgDrift 40s ease-in-out infinite alternate; }
@media (max-width: 760px) { .bg-photo { background-image: url("login-bg-sm.webp"); } }
@keyframes bgDrift { to { transform: scale(1.06) translate3d(-1%, -1%, 0); } }
.bg-shade { position: absolute; inset: 0; background:
  radial-gradient(75% 65% at 50% 50%, rgba(20, 8, 2, .15), rgba(10, 4, 2, .62) 100%),
  linear-gradient(180deg, rgba(10, 4, 2, .1), rgba(10, 4, 2, .45)); }
.fire .particles i { --c: #fb923c; box-shadow: 0 0 10px var(--c), 0 0 3px #fff7ed; }
.fire .particles i.ember { --c: #fde047; }
.fire .particles i.shard { --c: #f97316; }
body[data-page="login"] .pointer-light { background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(251, 146, 60, .22), rgba(234, 88, 12, .08) 40%, transparent 65%); }

.login-card.wide-login {
  max-width: 1040px; width: 100%; padding: 40px 48px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center;
  background: linear-gradient(135deg, rgba(40, 18, 8, .6), rgba(18, 8, 4, .74));
  border: 1px solid rgba(251, 146, 60, .5);
  box-shadow: 0 0 0 1px rgba(255, 237, 213, .05) inset, 0 0 46px rgba(234, 88, 12, .35), 0 40px 90px -30px rgba(0, 0, 0, .95);
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
.login-card.wide-login::before { background: linear-gradient(135deg, rgba(254, 215, 170, .95), rgba(249, 115, 22, .35) 30%, transparent 55%, rgba(251, 146, 60, .55) 85%, rgba(255, 247, 237, .8)); }
.login-card.wide-login::after { background: linear-gradient(90deg, transparent, #fff7ed, transparent); box-shadow: 0 0 14px #fdba74; }
.login-left { display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-left .login-logo { width: min(440px, 100%); margin: 0 0 4px; }
.wide-login .logo-float { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6)) drop-shadow(0 0 20px rgba(251, 146, 60, .35)); }
.wide-login .login-title { margin: 0; font-size: clamp(28px, 3.4vw, 40px); text-shadow: 0 0 22px rgba(251, 146, 60, .55); }
.wide-login .login-title .gold { color: #fbbf24; text-shadow: 0 0 18px rgba(245, 158, 11, .7); }
.wide-login .divider { width: 70%; color: #fdba74; margin: 16px 0 0; }
.wide-login .divider::before { background: linear-gradient(90deg, transparent, rgba(251, 146, 60, .7)); }
.wide-login .divider::after { background: linear-gradient(90deg, rgba(251, 146, 60, .7), transparent); }
.wide-login .divider svg { filter: drop-shadow(0 0 6px #fb923c); }
.wide-login .divider.small { width: 100%; margin: 20px 0 0; }
.login-right { display: flex; flex-direction: column; }
.wide-login .input-pill { border-color: rgba(251, 146, 60, .45); background: rgba(20, 8, 3, .6); box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 18px rgba(234, 88, 12, .16); }
.wide-login .input-pill:focus { border-color: #fdba74; box-shadow: 0 0 0 4px rgba(249, 115, 22, .22), 0 0 26px rgba(251, 146, 60, .45); background: rgba(28, 12, 4, .8); }
.wide-login .input-pill:focus + span, .wide-login .input-pill:not(:placeholder-shown) + span { color: #fdba74; }
.wide-login .f-ico { color: #fdba74; }
.wide-login .login-btn { background: linear-gradient(100deg, #c2410c, #f97316 55%, #fbbf24); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 14px 34px -10px rgba(249, 115, 22, .9), 0 0 26px rgba(251, 146, 60, .4); }
.wide-login .hint { color: #e7d3c4; text-align: center; }
.wide-login .ring-fg { stroke: #fb923c; filter: drop-shadow(0 0 6px rgba(251, 146, 60, .8)); }
.wide-login .slow-spin { filter: drop-shadow(0 0 8px rgba(253, 186, 116, .8)); }
.wide-login .spark { background: #fed7aa; filter: drop-shadow(0 0 6px #fb923c); }
@media (max-width: 860px) {
  .login-card.wide-login { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 28px 22px 24px; max-width: 480px; }
  .login-left .login-logo { width: min(320px, 80vw); }
  .wide-login .divider:not(.small) { display: none; }
}

/* =====================================================================
   หน้าอันดับผู้เล่น (ใหม่): แท็บหมวด + ปุ่มสถิติ + แท่นรางวัล Top 3 + ตาราง
   ===================================================================== */
.lb2 .lb-nav { padding: 16px; }
.lb-nav-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lb-secs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.lb-secs::-webkit-scrollbar { display: none; }
.lb-sec-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }
.lb-sec-tab:hover { color: #fff; background: rgba(249, 115, 22, .14); transform: translateY(-2px); }
.lb-sec-tab.on { color: #1c1203; background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 8px 20px -8px rgba(245, 158, 11, .8); }
.lb2 .lb-search { width: 260px; flex: none; }
.lb-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.lb-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; transition: all .2s var(--ease-spring); }
.lb-pill:hover { border-color: rgba(251, 146, 60, .7); background: rgba(249, 115, 22, .12); transform: translateY(-2px); }
.lb-pill.on { background: linear-gradient(135deg, var(--purple), var(--purple-2)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -8px rgba(249, 115, 22, .9); }
.lb-pill small { padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .1); color: #ffedd5; }
.lb-pill small.top { background: var(--gold); color: #1c1203; }
.lb-pill.on small { background: rgba(255, 255, 255, .22); color: #fff; }

.lb-stage { padding: 22px; }
.lb-stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.lb-stage-head h2 { margin: 2px 0; font-size: clamp(22px, 3vw, 30px); }
.me-card { display: flex; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border-radius: 18px; background: linear-gradient(135deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .06)); border: 1px solid rgba(249, 115, 22, .45); }
.me-card.gold { background: linear-gradient(135deg, rgba(251, 191, 36, .22), rgba(249, 115, 22, .08)); border-color: rgba(251, 191, 36, .55); }
.me-rank { display: grid; place-items: center; min-width: 76px; padding: 6px 10px; border-radius: 12px; background: rgba(5, 4, 12, .55); }
.me-rank span { font-size: 11px; color: var(--muted); }
.me-rank b { font: 800 24px 'Kanit', sans-serif; color: var(--gold); }
.me-info { display: flex; flex-direction: column; }
.me-info b { font-size: 17px; font-variant-numeric: tabular-nums; }
.me-info span { font-size: 12.5px; color: #fdba74; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 14px; margin: 26px auto 18px; max-width: 760px; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; animation: podUp .7s var(--ease-spring) backwards; }
.pod.p1 { animation-delay: .15s; } .pod.p2 { animation-delay: .3s; } .pod.p3 { animation-delay: .45s; }
@keyframes podUp { from { opacity: 0; transform: translateY(30px); } }
.pod-av { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 26px 'Kanit', sans-serif; color: #fff; background: linear-gradient(145deg, var(--purple), var(--purple-2)); border: 3px solid var(--pc, #9ca3af); box-shadow: 0 0 24px -4px var(--pc, transparent); margin-bottom: 8px; transition: transform .3s var(--ease-spring); }
.pod:hover .pod-av { transform: translateY(-6px) scale(1.06); }
.pod.p1 .pod-av { width: 82px; height: 82px; font-size: 32px; }
.pod-medal { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 13px 'Kanit', sans-serif; color: #1c1203; background: var(--pc); border: 2px solid #0b0916; }
.pod.p1 { --pc: #fbbf24; } .pod.p2 { --pc: #e5e7eb; } .pod.p3 { --pc: #f59e0b; }
.crown { color: var(--gold); filter: drop-shadow(0 0 10px rgba(251, 191, 36, .8)); animation: floaty 2.6s ease-in-out infinite; margin-bottom: 2px; }
.crown svg { width: 26px; height: 26px; }
.pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.pod-sq { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.pod-val { margin-top: 2px; font: 700 18px 'Kanit', sans-serif; color: var(--pc); font-variant-numeric: tabular-nums; }
.pod-base { width: 100%; margin-top: 10px; display: grid; place-items: center; border-radius: 16px 16px 6px 6px; font: 800 30px 'Kanit', sans-serif; color: rgba(255, 255, 255, .85);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 45%, transparent), rgba(5, 4, 12, .3)); border: 1px solid color-mix(in srgb, var(--pc) 55%, transparent); border-bottom: 0; }
.pod.p1 .pod-base { height: 120px; box-shadow: 0 0 40px -10px rgba(251, 191, 36, .6); }
.pod.p2 .pod-base { height: 88px; } .pod.p3 .pod-base { height: 66px; }
.pod.me .pod-name { color: #ffedd5; } .pod.me .pod-name::after { content: ' (คุณ)'; font-size: 12px; color: var(--gold); }

.lb-rows { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: 6px; }
.lbr { display: grid; grid-template-columns: 38px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; animation: cardIn .45s var(--ease-out) backwards; transition: transform .25s var(--ease-spring), background .2s, border-color .2s; }
.lbr:hover { transform: translateX(5px); background: rgba(249, 115, 22, .1); border-color: rgba(249, 115, 22, .3); }
.lbr.me { background: rgba(249, 115, 22, .2); border-color: rgba(251, 146, 60, .6); box-shadow: 0 0 22px -8px rgba(249, 115, 22, .8); }
.lbr-pos { font: 700 17px 'Kanit', sans-serif; color: var(--muted); text-align: center; }
.lbr-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: rgba(249, 115, 22, .25); color: #ffedd5; }
.lbr-name { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.lbr-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lbr-name span { font-size: 12.5px; color: var(--muted); }
.lbr-bar { flex-basis: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 4px; }
.lbr-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--purple), var(--gold)); transform-origin: left; animation: growX .9s var(--ease-out) backwards; }
.lbr-val { font-variant-numeric: tabular-nums; color: var(--gold); white-space: nowrap; }
.lbr-gap { text-align: center; color: var(--muted); letter-spacing: 6px; padding: 2px 0; }
.lb-empty { text-align: center; padding: 30px 0; }
@media (max-width: 899px) { .lb2 .lb-search { width: 100%; } }
@media (max-width: 560px) {
  .podium { gap: 8px; margin-top: 18px; }
  .pod-av { width: 50px; height: 50px; font-size: 20px; } .pod.p1 .pod-av { width: 62px; height: 62px; font-size: 24px; }
  .pod-name { font-size: 13.5px; } .pod-val { font-size: 14.5px; } .pod-sq { font-size: 11px; }
  .pod.p1 .pod-base { height: 90px; } .pod.p2 .pod-base { height: 66px; } .pod.p3 .pod-base { height: 50px; }
  .pod-base { font-size: 22px; }
  .lbr { grid-template-columns: 28px 32px minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; }
  .lbr-av { width: 30px; height: 30px; }
  .me-card { width: 100%; }
}

/* =====================================================================
   หน้าอันดับ: โทนไฟส้ม (เหมือนหน้า Login) + ไม่มีรูปผู้เล่น
   ===================================================================== */
body:not([data-page="login"]) {
  --purple: #f97316; --purple-2: #c2410c; --purple-soft: rgba(249, 115, 22, .22);
  --card: rgba(30, 14, 7, .72); --line: rgba(255, 237, 213, .09); --line-strong: rgba(253, 186, 116, .22);
  --muted: #c9b2a2;
  background: #120a06;
}
body:not([data-page="login"]) .pointer-light { z-index: 1; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(251, 146, 60, .16), transparent 62%); }
.page-fire .bg-shade { background: radial-gradient(80% 70% at 50% 40%, rgba(18, 8, 3, .72), rgba(10, 4, 2, .9) 100%); }
.page-fire .bg-photo { filter: saturate(1.1); }
body:not([data-page="login"]) .topbar { background: rgba(18, 8, 4, .72); }
body:not([data-page="login"]) .hero .eyebrow { color: #fdba74; }
body:not([data-page="login"]) .hero-title { background: linear-gradient(90deg, #fff7ed, #fed7aa 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; }
body:not([data-page="login"]) .block { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: rgba(251, 146, 60, .22); }
body:not([data-page="login"]) .sync-chip { color: #fed7aa; background: rgba(249, 115, 22, .14); border-color: rgba(251, 146, 60, .35); }

/* แท็บหมวด: แสดงครบทุกหมวด (ตัดบรรทัดได้) ช่องค้นหาอยู่แถวถัดไป */
.lb-secs { flex-wrap: wrap; overflow: visible; }
.lb2 .lb-search { width: 100%; margin-top: 12px; }
.lb2 .lb-search { border-color: var(--line-strong); background: rgba(14, 6, 3, .6); }
.lb-sec-tab:hover { background: rgba(249, 115, 22, .14); }
.lb-pill:hover { border-color: rgba(253, 186, 116, .7); background: rgba(249, 115, 22, .12); }
.lb-pill.on { box-shadow: 0 8px 20px -8px rgba(249, 115, 22, .9); }
.lb-pill small { color: #fed7aa; }
.me-card { background: linear-gradient(135deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .05)); border-color: rgba(251, 146, 60, .45); }
.me-rank { background: rgba(14, 6, 3, .6); }
.me-info span { color: #fdba74; }

/* แท่นรางวัล: เหรียญอันดับแทนรูปผู้เล่น */
.pod-medal-big { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  font: 800 26px 'Kanit', sans-serif; color: #1c1203;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--pc) 38%, color-mix(in srgb, var(--pc) 70%, #000) 100%);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 26px -2px var(--pc); transition: transform .35s var(--ease-spring); }
.pod-medal-big::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 2px dashed rgba(0, 0, 0, .25); }
.pod.p1 .pod-medal-big { width: 78px; height: 78px; font-size: 34px; }
.pod:hover .pod-medal-big { transform: translateY(-6px) rotate(-8deg) scale(1.06); }
.pod-base { font: 700 15px 'Kanit', sans-serif; letter-spacing: .5px; color: rgba(255, 247, 237, .9); }
.pod.me .pod-name { color: #fed7aa; }

/* ตาราง 4-10 ไม่มีรูป */
.lbr { grid-template-columns: 44px minmax(0, 1fr) auto; background: rgba(255, 237, 213, .035); }
.lbr:hover { background: rgba(249, 115, 22, .1); border-color: rgba(251, 146, 60, .3); }
.lbr.me { background: rgba(249, 115, 22, .18); border-color: rgba(253, 186, 116, .6); box-shadow: 0 0 22px -8px rgba(249, 115, 22, .8); }
.lbr-bar i { background: linear-gradient(90deg, #ea580c, var(--gold)); }
@media (max-width: 560px) { .lbr { grid-template-columns: 30px minmax(0, 1fr) auto; } .pod-medal-big { width: 46px; height: 46px; font-size: 20px; } .pod.p1 .pod-medal-big { width: 58px; height: 58px; font-size: 26px; } }

/* ===== แถบบน: ยอดทั้งหมดพร้อมชื่อกำกับ ===== */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.who { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.chips-top { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.chip-mini { gap: 6px; padding: 5px 11px; border: 1px solid transparent; text-decoration: none; transition: transform .2s var(--ease-spring), filter .2s; }
.chip-mini .cl { font-weight: 500; opacity: .85; }
a.chip-mini:hover { transform: translateY(-2px); filter: brightness(1.2); }
.chip-mini.bank { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .25); color: #a7f3d0; }
.chip-mini.goldc { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); color: #fde68a; }
.chip-mini.coinc { background: rgba(249, 115, 22, .14); border-color: rgba(251, 146, 60, .35); color: #fed7aa; }
.chip-mini.promoc { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .3); color: #bae6fd; }
.chip-mini.gachac { background: rgba(234, 88, 12, .16); border-color: rgba(251, 146, 60, .35); color: #ffedd5; }
.chip-mini.lucky { border-color: rgba(74, 222, 128, .3); }
.who-id { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1100px) {
  .topbar { justify-content: center; }
  .who { width: 100%; justify-content: center; }
  .chips-top { justify-content: center; }
}
@media (max-width: 560px) {
  .chip-mini { font-size: 12px; padding: 4px 9px; }
  .chip-mini svg { width: 13px; height: 13px; }
  .who-id { display: none; }
}

/* ===== แท็บหมวดสถิติ: ไม่เลื่อนซ้ายขวา ล้นแล้วขึ้นบรรทัดใหม่ ===== */
.sec-tabs { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
.skill-sc.maxed { border-color: rgba(251, 191, 36, .45); }
.skill-sc .sc-val { font-size: 20px; }
@media (max-width: 899px) {
  .topbar { position: relative; }
  .dock-wrap { top: 0; }
}

/* ===== แท่นรางวัล: ถ้วยใหญ่ที่ 1 + ขนาดชื่อ ที่3 ปกติ / ที่2 ×1.5 / ที่1 ×2 ===== */
.crown { position: relative; margin-bottom: 6px; filter: drop-shadow(0 0 18px rgba(251, 191, 36, .85)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.crown svg { width: 76px; height: 76px; stroke-width: 1.6; color: #fde047; }
.crown::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 10%, rgba(253, 224, 71, .45) 12%, transparent 16% 35%, rgba(253, 224, 71, .35) 37%, transparent 41% 60%, rgba(253, 224, 71, .4) 62%, transparent 66% 85%, rgba(253, 224, 71, .35) 87%, transparent 91%);
  -webkit-mask: radial-gradient(circle, transparent 28%, #000 30%, transparent 72%); mask: radial-gradient(circle, transparent 28%, #000 30%, transparent 72%);
  animation: orbit 9s linear infinite; }
.pod.p1 .pod-medal-big { display: none; } /* ที่ 1 ใช้ถ้วยใหญ่แทนเหรียญ */
.pod-name { font-size: 16px; line-height: 1.25; }
.pod.p2 .pod-name { font-size: 24px; }
.pod.p1 .pod-name { font: 800 32px/1.15 'Kanit', sans-serif; letter-spacing: .3px; white-space: normal; overflow-wrap: anywhere;
  background: linear-gradient(100deg, #fff7ed 0%, #fde047 30%, #fbbf24 50%, #fff 58%, #f59e0b 75%, #fde047 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, .55)); animation: goldShine 3.5s linear infinite; }
@keyframes goldShine { to { background-position: -220% 0; } }
.pod.p2 .pod-val { font-size: 21px; }
.pod.p1 .pod-val { font-size: 26px; }
.pod.p1 .pod-sq { font-size: 13.5px; }
.pod.me.p1 .pod-name::after { -webkit-text-fill-color: var(--gold); }
@media (max-width: 560px) {
  .crown svg { width: 52px; height: 52px; }
  .pod-name { font-size: 12px; }
  .pod.p2 .pod-name { font-size: 18px; }
  .pod.p1 .pod-name { font-size: 24px; }
  .pod.p1 .pod-val { font-size: 18px; } .pod.p2 .pod-val { font-size: 15px; }
}
.crown svg { width: 96px; height: 96px; animation: trophyFloat 3.2s ease-in-out infinite; }
@keyframes trophyFloat { 50% { transform: translateY(-6px) rotate(-3deg); } }
.crown::after { content: ''; position: absolute; left: 50%; top: 18%; width: 10px; height: 10px; margin-left: 14px; background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #fff); animation: twinkle 1.8s ease-in-out infinite; }
@media (max-width: 560px) {
  .crown svg { width: 64px; height: 64px; }
  .pod-name { font-size: 11.5px; }
  .pod.p2 .pod-name { font-size: 15px; }
  .pod.p1 .pod-name { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; max-width: 100%; }
}
.podium { margin-top: 44px; }

/* =====================================================================
   หน้ากาชา (ใหม่): เรทซ้าย · วงล้อกลาง + Legendary Zone · รางวัลขวา
   ===================================================================== */
.gacha2 { max-width: 1340px; }
.hist-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 46px; align-self: center; }
.g-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.g-side { display: flex; flex-direction: column; gap: 16px; }
.g-title { margin: 0 0 12px; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; color: #fdba74; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.g-note { margin: 10px 0 0; }

.drop-list { display: flex; flex-direction: column; gap: 10px; }
.drop-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 4px 10px; font-size: 13.5px; }
.drop-row .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.drop-row .dn { color: var(--rc); font-weight: 700; letter-spacing: .4px; }
.drop-row b { font-variant-numeric: tabular-nums; }
.drop-bar { grid-column: 2 / -1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.drop-bar i { display: block; height: 100%; background: var(--rc); transform-origin: left; animation: growX 1s var(--ease-out) backwards; }

.g-meter { text-align: center; }
.g-meter[hidden] { display: none; }
.meter-wrap { position: relative; width: 140px; height: 140px; margin: 0 auto 8px; }
.meter-ring { width: 140px; height: 140px; transform: rotate(-90deg); }
.m-bg { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 9; }
.m-fg { fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease-out); filter: drop-shadow(0 0 8px rgba(251, 191, 36, .7)); }
.meter-num { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1; }
.meter-num b { font: 800 36px 'Kanit', sans-serif; color: var(--gold); }
.meter-num span { font-size: 14px; color: var(--muted); }
.meter-text { margin: 0; font-size: 13.5px; line-height: 1.6; }
.g-meter.hot .meter-wrap { animation: meterHot 1.4s ease-in-out infinite; }
@keyframes meterHot { 50% { filter: drop-shadow(0 0 16px rgba(251, 191, 36, .8)); transform: scale(1.04); } }

.g-ticket { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; }
.tk-ico { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #1c1203; background: linear-gradient(145deg, var(--gold), var(--gold-2)); }
.tk-num { display: block; font: 800 28px 'Kanit', sans-serif; }
.tk-link { grid-column: 2; font-size: 13px; color: #fdba74; text-decoration: none; font-weight: 600; }

/* วงล้อหลัก */
.g-center { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.g-main { padding: 18px; }
.main-reel { height: 246px; background: radial-gradient(120% 90% at 50% 0%, rgba(249, 115, 22, .12), rgba(8, 4, 2, .8)); }
.main-reel::before { background: linear-gradient(90deg, #120804, transparent); } .main-reel::after { background: linear-gradient(270deg, #120804, transparent); }
.g-main .spin-bar { justify-content: space-between; }
.open-btn { min-width: 280px; height: 58px; font-size: 18px; letter-spacing: .5px; background: linear-gradient(100deg, #c2410c, #f97316 55%, #fbbf24); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 14px 34px -10px rgba(249, 115, 22, .9), 0 0 26px rgba(251, 146, 60, .35); }
.open-btn:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-2px); }
.rcard { position: relative; overflow: hidden; }
.rcard .item-img { width: 96px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.rcard::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--rc); box-shadow: 0 0 14px var(--rc); }
.rcard.win { animation: winPop .9s var(--ease-spring) both, winPulse 1.2s ease-in-out .9s infinite; z-index: 2; }
@keyframes winPop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1.06); } }
.zone-card { background: radial-gradient(circle at 50% 35%, rgba(251, 191, 36, .45), rgba(40, 20, 4, .95) 70%) !important; border-color: #fbbf24 !important; }
.zone-card-ico { font-size: 46px; color: #fde047; text-shadow: 0 0 18px rgba(251, 191, 36, .9); line-height: 1; }
.zone-card .nm { color: #fde68a; letter-spacing: 1px; font-weight: 800; }

/* Legendary Zone */
.g-zone { position: relative; overflow: hidden; padding: 20px 18px 18px; text-align: center; border-color: rgba(251, 191, 36, .35) !important;
  background: linear-gradient(180deg, rgba(60, 34, 6, .75), rgba(22, 12, 4, .85)) !important; transition: filter .6s, box-shadow .6s; }
.zone-glow { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 10%, rgba(253, 224, 71, .18) 12%, transparent 18% 40%, rgba(253, 224, 71, .14) 44%, transparent 50% 70%, rgba(253, 224, 71, .16) 74%, transparent 80%); opacity: 0; transition: opacity .8s; animation: orbit 14s linear infinite; pointer-events: none; }
.g-zone > *:not(.zone-glow) { position: relative; }
.zone-title { margin: 0; font: 800 clamp(22px, 3vw, 32px) 'Kanit', sans-serif; letter-spacing: 2px;
  background: linear-gradient(100deg, #fde68a, #fbbf24 40%, #fff7ed 50%, #f59e0b 65%, #fde68a); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldShine 4s linear infinite; }
.crown-s { -webkit-text-fill-color: #fbbf24; }
.zone-sub { margin: 4px 0 14px; font-size: 13.5px; color: #fde68a; }
.zone-reel { height: 230px; background: rgba(10, 6, 2, .65); border-color: rgba(251, 191, 36, .25); }
.zone-reel::before { background: linear-gradient(90deg, #1a0e04, transparent); } .zone-reel::after { background: linear-gradient(270deg, #1a0e04, transparent); }
.reel-line.gold { background: linear-gradient(180deg, transparent, #fde047 20%, #fff 50%, #fde047 80%, transparent); box-shadow: 0 0 18px #fde047; }
.zone-lock { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 6px; color: #fde68a; font: 800 15px 'Kanit', sans-serif; letter-spacing: 4px;
  background: rgba(12, 6, 2, .62); backdrop-filter: blur(3px) grayscale(.6); -webkit-backdrop-filter: blur(3px) grayscale(.6); transition: opacity .6s, transform .6s var(--ease-spring); }
.zone-bar { margin-top: 14px; }
.zone-state { display: inline-block; min-width: 280px; padding: 14px 24px; border-radius: 16px; font: 800 17px 'Kanit', sans-serif; letter-spacing: 1.5px; color: rgba(255, 247, 237, .55);
  background: linear-gradient(180deg, rgba(120, 100, 80, .35), rgba(60, 50, 40, .35)); border: 1px solid rgba(255, 255, 255, .1); transition: all .5s; }
.g-zone.locked .zone-reel .track { filter: grayscale(.85) brightness(.6); }
.g-zone.unlocking { animation: zoneShake .5s ease-in-out 2; }
.g-zone.unlocking .zone-lock { transform: scale(1.4); opacity: 0; }
@keyframes zoneShake { 25% { transform: translateX(-4px) rotate(-.4deg); } 75% { transform: translateX(4px) rotate(.4deg); } }
.g-zone.open, .g-zone.unlocking { box-shadow: 0 0 60px -6px rgba(251, 191, 36, .65), var(--shadow-card); filter: brightness(1.08); }
.g-zone.open .zone-glow, .g-zone.unlocking .zone-glow { opacity: 1; }
.g-zone.open .zone-lock { opacity: 0; pointer-events: none; }
.g-zone.open .zone-state, .g-zone.unlocking .zone-state { color: #1c1203; background: linear-gradient(100deg, #f59e0b, #fde047, #f59e0b); background-size: 200% 100%; animation: goldShine 2s linear infinite; box-shadow: 0 0 30px rgba(251, 191, 36, .6); }
.g-zone.won .zone-state::after { content: ' ✓'; }

/* แผงขวา */
.g-access { text-align: center; background: radial-gradient(120% 80% at 50% 0%, rgba(251, 191, 36, .2), transparent 60%), var(--card) !important; }
.access-ico { width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 24px; display: grid; place-items: center; color: #1c1203; background: linear-gradient(145deg, #fde047, #f59e0b); box-shadow: 0 0 40px -6px rgba(251, 191, 36, .8); animation: floaty 3s ease-in-out infinite; }
.g-access h2 { margin: 0 0 6px; font: 800 22px 'Kanit', sans-serif; color: var(--gold); letter-spacing: 1px; }
.g-access p { margin: 0; font-size: 13.5px; line-height: 1.6; }
.prize-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.prize-tab { padding: 9px 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; }
.prize-tab.on { color: #1c1203; background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.prize-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.prize { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: linear-gradient(90deg, var(--rbg), rgba(10, 5, 2, .5)); border: 1px solid color-mix(in srgb, var(--rc) 30%, transparent); animation: cardIn .4s var(--ease-out) backwards; transition: transform .25s var(--ease-spring), border-color .2s; }
.prize:hover { transform: translateX(-4px); border-color: var(--rc); }
.prize-art { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: var(--rc); background: rgba(0, 0, 0, .35); }
.prize-art .item-img { width: 46px; height: 46px; object-fit: contain; }
.prize-tx { min-width: 0; display: flex; flex-direction: column; }
.prize-tx b { font-size: 14px; color: var(--rc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prize-tx span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prize .rarity-badge { font-size: 10.5px; padding: 3px 8px; }

/* ผลรางวัล */
.result-card { max-width: 420px; }
.rays { position: absolute; inset: -60%; pointer-events: none; opacity: .8; animation: orbit 14s linear infinite;
  background: conic-gradient(from 0deg, transparent 0 6%, var(--rbg) 6% 10%, transparent 10% 18%, var(--rbg) 18% 22%, transparent 22% 31%, var(--rbg) 31% 35%, transparent 35% 44%, var(--rbg) 44% 48%, transparent 48% 57%, var(--rbg) 57% 61%, transparent 61% 70%, var(--rbg) 70% 74%, transparent 74% 83%, var(--rbg) 83% 87%, transparent 87%); }
.result-card > *:not(.rays):not(.confetti) { position: relative; }
.result-kicker { margin: 0; font-weight: 700; color: var(--muted); letter-spacing: 1px; }
.zone-win .result-kicker { color: var(--gold); font: 800 18px 'Kanit', sans-serif; letter-spacing: 2px; animation: pop .7s var(--ease-spring) both; }
.result-art { width: 130px; height: 130px; margin: 10px auto 6px; border-radius: 32px; display: grid; place-items: center; color: var(--rc); background: radial-gradient(circle, var(--rbg), rgba(0, 0, 0, .3)); border: 2px solid var(--rc); box-shadow: 0 0 50px -6px var(--rc); animation: artIn .9s var(--ease-spring) both; }
.result-art .item-img { width: 110px; height: 110px; object-fit: contain; }
@keyframes artIn { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 60% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.zone-win { border-color: rgba(251, 191, 36, .7) !important; box-shadow: 0 0 120px -10px rgba(251, 191, 36, .75), var(--shadow-card) !important; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation: confettiFall var(--d) cubic-bezier(.2, .6, .4, 1) var(--delay) forwards; }
@keyframes confettiFall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), 560px) rotate(var(--rot)); } }

/* ประวัติการหมุน */
.hist-modal { max-width: 560px; width: 100%; text-align: left; max-height: 86vh; display: flex; flex-direction: column; }
.hist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hist-head h2 { margin: 0; font-size: 22px; }
.x-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; font-size: 16px; }
.x-btn:hover { background: rgba(255, 255, 255, .06); }
.hist-list { list-style: none; margin: 10px 0; padding: 0 4px 0 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.hist-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 237, 213, .04); border-left: 3px solid var(--rc, #555); animation: cardIn .35s var(--ease-out) backwards; }
.hist-art { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--rc); background: rgba(0, 0, 0, .3); }
.hist-art .item-img { width: 38px; height: 38px; object-fit: contain; }
.hist-tx { min-width: 0; display: flex; flex-direction: column; }
.hist-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-tx span { font-size: 12px; color: var(--muted); }
.hist-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.zone-tag { padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #1c1203; background: linear-gradient(135deg, #fde047, #f59e0b); }
#histMore { height: 44px; }

@media (max-width: 1180px) {
  .g-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .g-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 2fr; }
}
@media (max-width: 899px) {
  .g-layout { grid-template-columns: minmax(0, 1fr); }
  .g-center { order: -1; }
  .g-left { display: grid; grid-template-columns: 1fr 1fr; }
  .g-left .g-ticket { grid-column: 1 / -1; }
  .g-right { grid-template-columns: minmax(0, 1fr); }
  .open-btn, .zone-state { min-width: 0; width: 100%; }
  .g-main .spin-bar { flex-direction: column-reverse; }
}
@media (max-width: 560px) {
  .g-left { grid-template-columns: minmax(0, 1fr); }
  .main-reel { height: 226px; } .zone-reel { height: 214px; }
  .hist-btn { width: 100%; justify-content: center; }
}
@media (min-width: 900px) { .home.gacha2 { max-width: 1440px; padding-left: 124px; padding-right: 24px; } }
.zone-win .rays { opacity: 1; background: conic-gradient(from 0deg, transparent 0 6%, rgba(253, 224, 71, .22) 6% 10%, transparent 10% 18%, rgba(253, 224, 71, .22) 18% 22%, transparent 22% 31%, rgba(253, 224, 71, .22) 31% 35%, transparent 35% 44%, rgba(253, 224, 71, .22) 44% 48%, transparent 48% 57%, rgba(253, 224, 71, .22) 57% 61%, transparent 61% 70%, rgba(253, 224, 71, .22) 70% 74%, transparent 74% 83%, rgba(253, 224, 71, .22) 83% 87%, transparent 87%); }
/* ปุ่มประวัติการหมุน: พื้นเข้ม ขอบส้ม เห็นชัด */
.hist-btn { background: linear-gradient(180deg, #2a1408, #120804); color: #fed7aa; border: 1px solid rgba(251, 146, 60, .7); font-weight: 700;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4) inset, 0 8px 22px -8px rgba(0, 0, 0, .9), 0 0 18px -6px rgba(249, 115, 22, .7); transition: transform .2s var(--ease-spring), box-shadow .2s, color .2s; }
.hist-btn svg { color: #fb923c; }
.hist-btn:hover { background: linear-gradient(180deg, #3a1c0a, #1a0b05); color: #fff7ed; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4) inset, 0 10px 24px -8px rgba(0, 0, 0, .9), 0 0 24px -4px rgba(249, 115, 22, .9); }

/* ===== หน้า Lucky Number: ภาพแบนเนอร์ + พื้นหลัง ===== */
body[data-page="lucky"] .bg-photo { background-image: url("lucky-bg.webp"); background-position: center 30%; }
@media (max-width: 760px) { body[data-page="lucky"] .bg-photo { background-image: url("lucky-bg-sm.webp"); } }
.lucky-banner { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid rgba(251, 191, 36, .45);
  box-shadow: 0 0 50px -12px rgba(251, 146, 60, .7), var(--shadow-card); aspect-ratio: 1672 / 600; }
.lucky-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transform: scale(1.02); animation: bannerZoom 18s ease-in-out infinite alternate; }
@keyframes bannerZoom { to { transform: scale(1.08) translateY(-1%); } }
.lucky-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(18, 8, 3, .75)); pointer-events: none; }
.lb-shine { position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 247, 237, .22), transparent); animation: bannerShine 6s ease-in-out 1.2s infinite; }
@keyframes bannerShine { 0% { left: -40%; } 35%, 100% { left: 120%; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
@media (max-width: 560px) { .lucky-banner { aspect-ratio: 16 / 9; } }
.lucky-banner { aspect-ratio: 1672 / 760; }
@media (max-width: 560px) { .lucky-banner { aspect-ratio: 16 / 9; } }


/* ===== หน้ากาชา: สีตามระดับ + แสงเรือง (ยิ่งเทียร์สูงยิ่งสว่าง/ถี่) ===== */
.prize { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--rc) 40%, transparent);
  background: radial-gradient(120% 120% at 0% 50%, color-mix(in srgb, var(--rc) 24%, transparent), transparent 65%),
  linear-gradient(90deg, color-mix(in srgb, var(--rc) 12%, rgba(10, 6, 4, .9)), rgba(10, 6, 4, .78));
  animation: cardIn .4s var(--ease-out) backwards, invGlow var(--pulse, 5s) ease-in-out infinite; }
.prize::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, var(--sh, .06)) 48%, transparent 60%); background-size: 250% 100%;
  animation: invShine var(--shine, 9s) ease-in-out infinite; }
.prize:nth-child(3n+2)::after { animation-delay: -1.3s; } .prize:nth-child(3n)::after { animation-delay: -2.6s; }
.prize-art { background: color-mix(in srgb, var(--rc) 18%, rgba(0, 0, 0, .35)); border: 1px solid color-mix(in srgb, var(--rc) 30%, transparent); }
.prize.r-legendary { border-color: color-mix(in srgb, var(--rc) 70%, transparent);
  background: radial-gradient(130% 120% at 0% 50%, rgba(251, 191, 36, .4), transparent 62%), linear-gradient(90deg, rgba(120, 72, 8, .55), rgba(30, 16, 4, .85)); }
.prize.r-legendary .prize-tx b { color: #fff3c4; text-shadow: 0 0 10px rgba(251, 191, 36, .5); }
.prize.r-legendary .prize-art { background: rgba(251, 191, 36, .26); box-shadow: 0 0 14px -4px rgba(251, 191, 36, .7); }
.prize.r-legendary::after { background: linear-gradient(115deg, transparent 32%, rgba(255, 240, 180, .22) 46%, rgba(255, 255, 255, .28) 50%, transparent 62%); background-size: 250% 100%; }

/* การ์ดในวงล้อ: พื้นสีตามระดับ + เรืองแสงนิ่ง ๆ (ไม่กระพริบ ให้หมุนลื่น) */
.rcard { background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 65%),
  linear-gradient(180deg, color-mix(in srgb, var(--rc) 16%, rgba(10, 6, 4, .92)), rgba(8, 5, 3, .95) 75%);
  box-shadow: 0 0 var(--glow, 12px) -4px color-mix(in srgb, var(--rc) var(--ga, 30%), transparent), 0 0 0 1px color-mix(in srgb, var(--rc) 20%, transparent) inset; }
.rcard::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, var(--sh, .06)) 48%, transparent 60%); background-size: 250% 100%;
  animation: invShine var(--shine, 9s) ease-in-out infinite; }
.rcard.r-legendary { background: radial-gradient(120% 90% at 50% 0%, rgba(251, 191, 36, .5), transparent 65%), linear-gradient(180deg, rgba(130, 80, 10, .7), rgba(30, 16, 4, .95) 80%);
  box-shadow: 0 0 26px -2px rgba(251, 191, 36, .65), 0 0 0 1px rgba(253, 224, 71, .35) inset; }
.rcard.r-legendary .nm { color: #fff3c4; text-shadow: 0 0 10px rgba(251, 191, 36, .55); }
.rcard.r-legendary::before { background: linear-gradient(115deg, transparent 32%, rgba(255, 240, 180, .25) 46%, rgba(255, 255, 255, .3) 50%, transparent 62%); background-size: 250% 100%; }
@media (prefers-reduced-motion: reduce) { .prize, .prize::after, .rcard::before { animation: none !important; } }

/* ===== กรอบทุกกล่อง (.block) มีแสงเรืองรอบ ติดตลอด ไม่จาง ===== */
.block { --fg: rgba(249, 115, 22, .55); border-color: rgba(251, 146, 60, .38);
  box-shadow: 0 0 26px -4px var(--fg), 0 0 0 1px rgba(251, 146, 60, .14) inset, var(--shadow-card); }
/* Legendary Zone / Access เป็นทองเข้มตลอด · ปลดล็อกแล้วสว่างจัดและเต้น */
.g-zone, .g-zone.locked, .g-access { --fg: rgba(251, 191, 36, .75); border-color: rgba(251, 191, 36, .6) !important; }
.g-zone, .g-access { box-shadow: 0 0 38px -2px var(--fg), 0 0 0 1px rgba(253, 224, 71, .22) inset, var(--shadow-card); }
.g-zone.open, .g-zone.unlocking { --fg: rgba(253, 224, 71, .95); animation: zoneGlow 1.6s ease-in-out infinite; }
.g-zone.unlocking { animation: zoneShake .5s ease-in-out 2, zoneGlow 1.6s ease-in-out infinite; }
@keyframes zoneGlow {
  0%, 100% { box-shadow: 0 0 30px -4px rgba(251, 191, 36, .8), 0 0 0 1px rgba(253, 224, 71, .25) inset, var(--shadow-card); }
  50% { box-shadow: 0 0 60px 0 rgba(253, 224, 71, 1), 0 0 0 1px rgba(253, 224, 71, .45) inset, var(--shadow-card); }
}


/* ===== หน้าล็อกอินแอดมิน ===== */
.welcome .role { margin: 4px 0 0; font: 700 13px/1 'Kanit', sans-serif; letter-spacing: .3em; color: #fde68a; animation: cardIn .5s var(--ease-out) .35s both; }
/* ---- ป้าย OWNER BACKEND ตัวใหญ่ + แสงไฟวิ่ง ---- */
.owner-chip { position: relative; overflow: hidden; margin-top: 14px; padding: 12px 26px; border-radius: 16px;
  font: 800 clamp(22px, 2.6vw, 32px)/1 'Kanit', sans-serif; letter-spacing: .14em;
  color: transparent; background: linear-gradient(90deg, #fde68a, #fbbf24 30%, #fff7ed 50%, #fbbf24 70%, #f97316) 0 0/250% 100%;
  -webkit-background-clip: text; background-clip: text; animation: ownerText 3.2s linear infinite;
  border: 2px solid rgba(251, 191, 36, .55); box-shadow: 0 0 28px -4px rgba(249, 115, 22, .75), 0 0 0 1px rgba(253, 224, 71, .25) inset; }
.owner-chip::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, #fde68a 80%, #fff 85%, #f97316 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ownerRun 2.4s linear infinite; }
.owner-chip::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 48%, transparent 62%) 0 0/250% 100%; animation: ownerShine 2.6s ease-in-out infinite; mix-blend-mode: screen; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ownerRun { to { --a: 360deg; } }
@keyframes ownerText { to { background-position: -250% 0; } }
@keyframes ownerShine { 0%, 30% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .owner-chip, .owner-chip::before, .owner-chip::after { animation: none; } }

.adm-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 10px 0 6px; }
.adm-ring { color: var(--gold); animation: admSpin 1.1s linear infinite; filter: drop-shadow(0 0 14px rgba(251, 191, 36, .7)); }
@keyframes admSpin { to { transform: rotate(360deg); } }
.adm-wait-title { margin: 6px 0 0; font-family: 'Kanit', sans-serif; font-size: 24px; }
.adm-wait-text { margin: 0; color: var(--muted); }
.adm-wait-time { margin: 0 0 8px; color: #fdba74; } .adm-wait-time b { font-variant-numeric: tabular-nums; }

/* ชื่อเซิร์ฟ: SCUM World of = ทองแสงไฟวิ่ง · NPCs = ม่วงแสงไฟวิ่ง */
.login-title.srv-title, .wide-login .login-title.srv-title { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .28em; row-gap: 0; line-height: 1.15; text-shadow: none; }
.srv-title .srv-g, .srv-title .srv-npcs { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; background-size: 200% 100%; animation: srvRun 3.4s linear infinite; }
.srv-title .srv-g {
  background-image: linear-gradient(100deg, #f59e0b 0%, #fbbf24 18%, #fde68a 30%, #fffbeb 36%, #fde68a 42%, #fbbf24 56%, #f59e0b 78%, #f59e0b 100%);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, .55)) drop-shadow(0 0 18px rgba(245, 158, 11, .35));
}
.srv-title .srv-npcs {
  font-weight: 900; letter-spacing: .02em;
  background-image: linear-gradient(100deg, #7e22ce 0%, #a855f7 16%, #e879f9 30%, #fdf4ff 36%, #e879f9 42%, #a855f7 56%, #9333ea 75%, #7e22ce 100%);
  filter: drop-shadow(0 0 6px rgba(217, 70, 239, .7)) drop-shadow(0 0 20px rgba(168, 85, 247, .5));
  animation: srvRun 3.4s linear infinite, srvPulse 2.4s ease-in-out infinite;
}
.srv-title .srv-scum { font-weight: 900; letter-spacing: .08em; }
@keyframes srvRun { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes srvPulse { 50% { filter: drop-shadow(0 0 9px rgba(232, 121, 249, .95)) drop-shadow(0 0 28px rgba(168, 85, 247, .75)); } }
@media (prefers-reduced-motion: reduce) { .srv-title .srv-g, .srv-title .srv-npcs { animation: none; background-position: 60% 0; } }

/* ---------- แอดมิน: กรอกรหัสจาก DM ---------- */
.adm-dm { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 24px; color: #fde68a;
  background: radial-gradient(circle at 50% 35%, rgba(251, 191, 36, .25), rgba(88, 101, 242, .18) 70%); border: 1px solid rgba(251, 191, 36, .55);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, .08), 0 0 34px rgba(251, 146, 60, .45); animation: dmPop .5s var(--ease-spring) both, dmGlow 2.2s ease-in-out .5s infinite; }
@keyframes dmPop { from { transform: scale(.6); opacity: 0; } }
@keyframes dmGlow { 50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, .12), 0 0 48px rgba(251, 146, 60, .7); } }
.otp-form { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 6px; animation: cardIn .45s var(--ease-out) both; }
.otp-boxes { display: flex; gap: 10px; justify-content: center; }
.otp-cell { width: 52px; height: 62px; border-radius: 14px; text-align: center; font: 700 28px/1 'Kanit', sans-serif; color: #fff7ed; caret-color: #fbbf24;
  background: rgba(10, 5, 2, .7); border: 1px solid rgba(251, 146, 60, .45); outline: none; transition: border-color .15s, box-shadow .15s, transform .15s; font-variant-numeric: tabular-nums; }
.otp-cell:focus { border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .25), 0 0 22px rgba(251, 191, 36, .45); transform: translateY(-2px); }
.otp-boxes.shake { animation: shake .45s; }
.otp-form .login-btn { width: 100%; margin-top: 4px; }
@media (max-width: 420px) { .otp-boxes { gap: 6px; } .otp-cell { width: 42px; height: 54px; font-size: 24px; } }

/* ---------- แอดมิน: หน้าโหลดหลังผ่าน 3 ชั้น ---------- */
.adm-load { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 42%, rgba(194, 65, 12, .45), transparent 62%), rgba(8, 4, 2, .96); animation: fade .35s ease both; transition: opacity .9s ease; }
.adm-load.leaving { opacity: 0; }
.al-box { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; transition: opacity .45s ease, transform .45s ease; }
.al-box.out { opacity: 0; transform: scale(.94); }
.al-logo { width: 200px; max-width: 56vw; height: auto; filter: drop-shadow(0 16px 30px rgba(194, 65, 12, .6)); animation: logoIn .7s var(--ease-spring) both; }
.al-title { margin: 6px 0 0; font: 700 22px 'Kanit', sans-serif; color: #fff7ed; letter-spacing: .5px; }
.al-title::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: alDots 1.2s steps(4) infinite; }
@keyframes alDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.al-bar { position: relative; width: 100%; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(251, 146, 60, .35); overflow: hidden; box-shadow: 0 0 18px rgba(234, 88, 12, .25) inset; }
.al-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #c2410c, #f97316 45%, #fbbf24); box-shadow: 0 0 16px rgba(251, 191, 36, .8); }
.al-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 45%, transparent 65%) 0 0/200% 100%; animation: srvRun 1.4s linear infinite; }
.al-pct { margin: 0; font: 800 34px/1 'Kanit', sans-serif; color: #fbbf24; text-shadow: 0 0 18px rgba(251, 191, 36, .6); font-variant-numeric: tabular-nums; }
.al-step { margin: 0; color: #fdba74; font-size: 14px; min-height: 1.4em; }
.al-hello { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; animation: alHelloIn .7s var(--ease-spring) both; transition: transform .95s cubic-bezier(.65, 0, .35, 1), opacity .95s ease, filter .95s ease; }
.al-hello .hi { margin: 0; color: #fdba74; font-size: clamp(18px, 3vw, 24px); font-weight: 600; letter-spacing: 1px; }
.al-hello .name { margin: 0; font: 800 clamp(48px, 10vw, 96px)/1.1 'Kanit', sans-serif; background: linear-gradient(100deg, #b45309, #f59e0b 20%, #fffbeb 36%, #f59e0b 52%, #d97706 80%, #b45309) 0 0/200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 22px rgba(251, 191, 36, .55)); animation: srvRun 2.6s linear infinite; padding: 0 .1em; }
.al-hello .role { margin: 4px 0 0; font: 700 14px/1 'Kanit', sans-serif; letter-spacing: .4em; color: #fde68a; }
.al-hello.shrink { transform: scale(.25); opacity: 0; filter: blur(4px); }
@keyframes alHelloIn { from { transform: scale(1.25); opacity: 0; filter: blur(6px); } }
@media (prefers-reduced-motion: reduce) { .adm-load, .al-box, .al-hello, .al-hello .name, .al-bar i::after, .adm-dm { animation: none !important; transition: opacity .2s !important; } }

/* ล็อกเว็บต้นซีซั่น (ยังไม่ผ่านเควสกุญแจ) */
.gate-banner { position: relative; z-index: 5; display: flex; align-items: center; gap: 10px; max-width: 1180px; margin: 12px auto 0; padding: 12px 16px; border-radius: 14px;
  color: #e0f2fe; font-size: 14px; line-height: 1.55; background: linear-gradient(135deg, rgba(14, 165, 233, .22), rgba(3, 105, 161, .18)); border: 1px solid rgba(56, 189, 248, .55);
  box-shadow: 0 0 22px -4px rgba(14, 165, 233, .55); }
.gate-banner svg { flex: none; color: #7dd3fc; }
.gate-banner b { color: #fff; } .gate-banner b.gold { color: #fde68a; }
@media (max-width: 760px) { .gate-banner { margin: 10px 12px 0; font-size: 13px; } }

/* กระเป๋า: รูปไอเทมที่ลงไว้ในกาชา */
.inv-ico.has-img { overflow: hidden; }
.inv-ico .item-img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }

/* ===== กาชา: หีบทอง Legendary ===== */
.zone-chest { width: 132px; height: 88px; object-fit: cover; -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 52%, #000 45%, transparent 100%); mask-image: radial-gradient(ellipse 58% 62% at 50% 52%, #000 45%, transparent 100%); filter: drop-shadow(0 0 14px rgba(251, 191, 36, .75)) saturate(1.1); animation: chestGlow 2.6s ease-in-out infinite; }
.zone-card { gap: 6px !important; }
.zone-card .nm { font-size: 13px; }
@keyframes chestGlow { 50% { filter: drop-shadow(0 0 22px rgba(253, 224, 71, .95)) saturate(1.25) brightness(1.08); } }
.access-chest { position: relative; width: min(100%, 250px); aspect-ratio: 3 / 2; margin: -4px auto 6px; animation: chestFloat 3.2s ease-in-out infinite; }
@keyframes chestFloat { 50% { transform: translateY(-6px); } }
.access-chest::before { content: ''; position: absolute; inset: 12% 10%; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .55), transparent 70%); filter: blur(18px); z-index: 0; }
.access-chest img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 52%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 60% 62% at 50% 52%, #000 58%, transparent 100%); }
@media (prefers-reduced-motion: reduce) { .zone-chest, .access-chest { animation: none; } }
.result-actions { flex-wrap: wrap; }
.result-actions > * { min-width: 96px; }

/* ===== กาชา: ตัวหนังสือวิ่ง 5 คนล่าสุด (มุมขวาล่าง) ===== */
.g-feed { position: fixed; right: 18px; bottom: 18px; z-index: 25; width: min(520px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(40, 22, 6, .92), rgba(16, 10, 24, .92)); border: 1px solid rgba(251, 191, 36, .45);
  box-shadow: 0 0 24px -6px rgba(251, 191, 36, .55), 0 14px 34px -14px rgba(0, 0, 0, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: feedIn .6s var(--ease-spring) both; }
.g-feed[hidden] { display: none; }
@keyframes feedIn { from { opacity: 0; transform: translateY(24px); } }
.g-feed-tag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 700 12px 'Kanit', sans-serif; color: #1c1203; background: linear-gradient(135deg, #fde047, #f59e0b); box-shadow: 0 0 12px rgba(251, 191, 36, .6); }
.g-feed-dot { width: 7px; height: 7px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 0 rgba(220, 38, 38, .7); animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.g-feed-win { flex: 1 1 auto; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.g-feed-track { display: flex; width: max-content; animation: feedRun var(--dur, 20s) linear infinite; }
.g-feed:hover .g-feed-track { animation-play-state: paused; }
.g-feed-run { display: flex; flex: 0 0 auto; }
@keyframes feedRun { to { transform: translateX(-50%); } }
.g-feed-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 22px 0 4px; white-space: nowrap; font-size: 13.5px; color: var(--muted); position: relative; }
.g-feed-item::after { content: '✦'; position: absolute; right: 6px; color: rgba(251, 191, 36, .55); font-size: 10px; }
.g-feed-item b { color: #fff; font-weight: 700; }
.g-feed-item em { font-style: normal; font-weight: 700; color: var(--rc); text-shadow: 0 0 10px color-mix(in srgb, var(--rc) 55%, transparent); }
.g-feed-item .rarity-badge { font-size: 10.5px; padding: 2px 7px; }
@media (prefers-reduced-motion: reduce) { .g-feed-track { animation: none; } .g-feed-run + .g-feed-run { display: none; } }
@media (max-width: 899px) { .g-feed { right: 16px; bottom: 12px; } .gacha2 { padding-bottom: 80px; } }
.result-actions > * { white-space: nowrap; padding-left: 12px; padding-right: 12px; }

/* ===== Lucky Number: เลขยังไม่เปิด (ทองหม่นวิบวับ) ===== */
.lgrid .num { overflow: hidden; isolation: isolate; font-size: 19px; letter-spacing: .5px; }
.lgrid .num:not(.taken) { color: #fff4d6; border: 1px solid rgba(251, 191, 36, .42);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 38%), radial-gradient(90% 70% at 50% 115%, rgba(168, 85, 247, .45), transparent 70%), linear-gradient(160deg, #432c62, #22163a 55%, #150d26);
  box-shadow: inset 0 1px 0 rgba(253, 224, 71, .45), inset 0 -3px 0 rgba(0, 0, 0, .45), 0 6px 14px -8px rgba(168, 85, 247, .7);
  text-shadow: 0 0 12px rgba(251, 191, 36, .55), 0 2px 0 rgba(0, 0, 0, .55); }
.lgrid .num:not(.taken)::after { content: ''; position: absolute; inset: -40% -60%; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(253, 224, 71, .35) 50%, transparent 60%); transform: translateX(-60%);
  animation: numShine 7s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes numShine { 0%, 70% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }
.lgrid .num:not(.taken):hover:not(:disabled) { border-color: #fbbf24; color: #fde68a; background: radial-gradient(120% 100% at 50% 0%, rgba(251, 191, 36, .45), transparent 65%), linear-gradient(160deg, #5a3a80, #2a1a45);
  box-shadow: 0 0 0 1px rgba(253, 224, 71, .35) inset, 0 10px 24px -8px rgba(251, 191, 36, .8); }
.lgrid .num:disabled:not(.taken) { filter: saturate(.7) brightness(.85); }

/* ===== เลขที่เปิดแล้ว: แสงวิ่งรอบกรอบตามสีระดับไอเทม ===== */
.lgrid .num.taken { color: var(--rc); border-color: color-mix(in srgb, var(--rc) 35%, transparent);
  background: radial-gradient(100% 100% at 50% 50%, color-mix(in srgb, var(--rc) 20%, transparent), transparent 75%), linear-gradient(180deg, #110e17, #09070d);
  text-shadow: 0 0 10px color-mix(in srgb, var(--rc) 70%, transparent); box-shadow: 0 0 14px -6px var(--rc); }
.lgrid .num.taken::after { content: none; }
.lgrid .num.taken::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--a, 0deg), transparent 0 62%, color-mix(in srgb, var(--rc) 60%, transparent) 74%, var(--rc) 84%, #fff 88%, var(--rc) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ownerRun var(--pulse, 4s) linear infinite; animation-delay: calc(var(--i, 0) * -170ms); }
.lgrid .num.taken.mine { background: radial-gradient(100% 100% at 50% 50%, rgba(34, 197, 94, .35), transparent 75%), linear-gradient(180deg, #14532d, #0d2b19); border-color: rgba(34, 197, 94, .6); }
.lgrid .num.taken.mine::after { content: '✓'; position: absolute; top: 3px; right: 6px; font-size: 10px; color: #bbf7d0; text-shadow: none; }
.lgrid .num.taken.jp { color: #fde047; border-color: #fbbf24; background: radial-gradient(100% 100% at 50% 40%, rgba(251, 191, 36, .45), transparent 75%), linear-gradient(180deg, #3b2506, #1a0f02);
  box-shadow: 0 0 22px -2px rgba(251, 191, 36, .85); animation: jpPulse 1.8s ease-in-out infinite; }
.lgrid .num.taken.jp::after { content: '♛'; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #fde047; }
.lgrid .num.taken.jp::before { animation-duration: 1.6s; }
@keyframes jpPulse { 50% { box-shadow: 0 0 34px 2px rgba(251, 191, 36, .95); } }
@media (prefers-reduced-motion: reduce) { .lgrid .num::after, .lgrid .num.taken::before, .lgrid .num.taken.jp { animation: none !important; } }

/* แจ็คพอตเหลือกี่เลข */
.jp-left { display: inline-flex; margin: 10px 0 0; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #fde68a;
  background: linear-gradient(90deg, rgba(251, 191, 36, .18), rgba(249, 115, 22, .1)); border: 1px solid rgba(251, 191, 36, .45); box-shadow: 0 0 16px -6px rgba(251, 191, 36, .7); }
.jp-left[hidden] { display: none; }

/* ===== ผลล่าสุด: แถวแจ็คพอต ตัวใหญ่ไฮไลต์ ===== */
.history li.jp-row { position: relative; overflow: hidden; margin: 6px 0; padding: 16px 16px; border: 1px solid rgba(251, 191, 36, .65); border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(251, 191, 36, .32), transparent 60%), linear-gradient(90deg, rgba(120, 53, 15, .55), rgba(30, 14, 4, .6));
  box-shadow: 0 0 30px -8px rgba(251, 191, 36, .8), 0 0 0 1px rgba(253, 224, 71, .2) inset; }
.history li.jp-row::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 247, 200, .22) 50%, transparent 65%) 0 0/250% 100%; animation: ownerShine 3s ease-in-out infinite; }
.history li.jp-row .t { color: #fcd34d; font-weight: 700; }
.history li.jp-row .what { font: 600 19px/1.35 'Kanit', sans-serif; color: #fff7ed; display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.history li.jp-row .what b { color: #fff; font-weight: 800; }
.history li.jp-row .what em { font-style: normal; font-weight: 800; color: transparent; background: linear-gradient(90deg, #fde68a, #fbbf24 40%, #fff7ed 55%, #f97316) 0 0/220% 100%; -webkit-background-clip: text; background-clip: text; animation: ownerText 3s linear infinite; font-size: 22px; }
.history li.jp-row .jp-crown { font-size: 24px; color: #fde047; text-shadow: 0 0 14px rgba(251, 191, 36, .9); margin-right: 4px; }
.history li.jp-row .rarity-badge { font-size: 14px; padding: 6px 14px; color: #1c1203; background: linear-gradient(135deg, #fde047, #f59e0b); border-color: transparent; box-shadow: 0 0 14px rgba(251, 191, 36, .7); }
@media (max-width: 560px) { .history li.jp-row { flex-wrap: wrap; } .history li.jp-row .what { font-size: 16px; } .history li.jp-row .what em { font-size: 18px; } }

.lg.free { background: linear-gradient(160deg, #432c62, #150d26); border: 1px solid rgba(251, 191, 36, .5); }
.lg.taken { background: #0d0a12; border: 1px solid #60a5fa; box-shadow: 0 0 6px -1px #60a5fa; }

/* ===== กาชา: การ์ด LEGENDARY ZONE รูปหีบทองเป็นพื้นทั้งใบ ===== */
.rcard.zone-card { justify-content: flex-end !important; gap: 6px !important; padding: 10px 10px 14px !important;
  background: url("zone-card-art.webp") center top / cover no-repeat, #1a0d03 !important; border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 0 1px rgba(253, 224, 71, .35) inset, 0 0 22px rgba(251, 191, 36, .75), 0 0 46px -6px rgba(245, 158, 11, .7) !important; animation: zoneCardGlow 2.4s ease-in-out infinite; }
.rcard.zone-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 190, .28) 50%, transparent 65%) 0 0/260% 100%; animation: ownerShine 3.4s ease-in-out infinite; }
.zone-art-space { flex: 1 1 auto; }
.rcard.zone-card .nm { color: #fff7d6; font-weight: 800; letter-spacing: 1px; text-shadow: 0 0 10px rgba(251, 191, 36, .9), 0 2px 2px rgba(0, 0, 0, .8); position: relative; z-index: 1; }
.rcard.zone-card .rarity-badge { position: relative; z-index: 1; color: #1c1203; background: linear-gradient(135deg, #fde047, #f59e0b); border-color: transparent; box-shadow: 0 0 12px rgba(251, 191, 36, .8); }
@keyframes zoneCardGlow { 50% { box-shadow: 0 0 0 1px rgba(253, 224, 71, .5) inset, 0 0 30px rgba(251, 191, 36, .95), 0 0 60px -4px rgba(245, 158, 11, .85); } }
.access-chest { width: 100% !important; max-width: 300px; margin: -10px auto 2px !important; }
.access-chest::before { inset: 18% 14% !important; }
.access-chest img { -webkit-mask-image: none !important; mask-image: none !important; object-fit: contain !important; filter: drop-shadow(0 0 18px rgba(251, 191, 36, .45)); }
@media (prefers-reduced-motion: reduce) { .rcard.zone-card, .rcard.zone-card::after { animation: none; } }

/* ===== ปุ่มเรืองแสงหลากสี (แบบปุ่มเมนูแอดมิน) ===== */
.btn-glow { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  font: 800 16px 'Kanit', sans-serif; letter-spacing: .2px; text-decoration: none; color: #fff; white-space: nowrap; transition: transform .15s, box-shadow .15s, filter .15s; }
.btn-glow::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 48%, transparent 62%) 0 0/250% 100%; animation: glowShine 2.8s ease-in-out infinite; }
.btn-glow span { position: relative; z-index: 1; }
.btn-glow:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-glow:active { transform: translateY(0); }
.btn-glow:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-glow.g-teal { background: linear-gradient(135deg, #5eead4, #14b8a6 45%, #0f766e 80%, #2dd4bf); text-shadow: 0 1px 2px rgba(4, 47, 46, .6);
  box-shadow: 0 0 0 1px rgba(153, 246, 228, .7), 0 0 16px rgba(20, 184, 166, .6), 0 0 34px rgba(15, 118, 110, .4); }
.btn-glow.g-teal:hover { box-shadow: 0 0 0 1px #ccfbf1, 0 0 22px rgba(20, 184, 166, .9), 0 0 44px rgba(15, 118, 110, .55); }
.btn-glow.g-purple { background: linear-gradient(135deg, #c084fc, #9333ea 45%, #6b21a8 80%, #a855f7); text-shadow: 0 1px 2px rgba(59, 7, 100, .6);
  box-shadow: 0 0 0 1px rgba(216, 180, 254, .7), 0 0 16px rgba(168, 85, 247, .65), 0 0 34px rgba(126, 34, 206, .4); }
.btn-glow.g-purple::after { animation-delay: .9s; }
.btn-glow.g-purple:hover { box-shadow: 0 0 0 1px #e9d5ff, 0 0 22px rgba(168, 85, 247, .9), 0 0 44px rgba(126, 34, 206, .55); }
.btn-glow.g-gold { color: #1c1203; background: linear-gradient(135deg, #fff3b0, #fbbf24 40%, #f59e0b 75%, #fcd34d);
  box-shadow: 0 0 0 1px rgba(253, 230, 138, .75), 0 0 16px rgba(251, 191, 36, .65), 0 0 34px rgba(245, 158, 11, .35); }
.btn-glow.g-gold::after { animation-delay: 1.8s; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .75) 48%, transparent 62%) 0 0/250% 100%; }
.btn-glow.g-gold:hover { box-shadow: 0 0 0 1px #fde68a, 0 0 22px rgba(251, 191, 36, .9), 0 0 44px rgba(245, 158, 11, .5); }
.btn-glow:disabled { filter: grayscale(.6) brightness(.7); cursor: not-allowed; }
@keyframes glowShine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .btn-glow::after { animation: none; } }

/* ===== ตัวหนังสือวิ่ง: ย้ายขึ้นบนสุด เต็มความกว้าง ===== */
.g-feed { position: relative !important; right: auto !important; bottom: auto !important; width: 100% !important; margin: 0 0 18px; z-index: 1; border-radius: 16px; padding: 10px 12px 10px 10px; }
.gacha2 { padding-bottom: 60px; }
.g-feed-item { font-size: 14.5px; }

/* ===== Lucky: แจ็คพอตล่าสุด แถบยาวเท่ากระดาน ===== */
.last-jp { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; margin: 18px 0; padding: 18px 22px; border-radius: var(--radius);
  background: radial-gradient(60% 160% at 0% 50%, rgba(251, 191, 36, .38), transparent 60%), radial-gradient(50% 140% at 100% 50%, rgba(249, 115, 22, .22), transparent 60%), linear-gradient(135deg, rgba(66, 34, 6, .96), rgba(22, 12, 28, .96));
  border: 1px solid rgba(251, 191, 36, .65); box-shadow: 0 0 36px -8px rgba(251, 191, 36, .75), var(--shadow-card); }
.last-jp[hidden] { display: none; }
.last-jp::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 72%, #fde68a 82%, #fff 86%, #f97316 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ownerRun 4s linear infinite; }
.last-jp::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 240, 190, .16) 50%, transparent 65%) 0 0/250% 100%; animation: ownerShine 4s ease-in-out infinite; }
.last-jp-crown { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 36px; color: #1c1203; background: linear-gradient(145deg, #fde047, #f59e0b); box-shadow: 0 0 24px rgba(251, 191, 36, .85); animation: chestFloat 3s ease-in-out infinite; }
.last-jp-tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; position: relative; z-index: 1; }
.last-jp-k { font-size: 13px; font-weight: 700; letter-spacing: .5px; color: #fcd34d; }
.last-jp-msg { margin: 0; font: 700 20px 'Kanit', sans-serif; color: #fff7ed; }
.last-jp-name { font-size: 26px; font-weight: 800; color: transparent; background: linear-gradient(90deg, #fde68a, #fbbf24 40%, #fff7ed 55%, #f97316) 0 0/220% 100%; -webkit-background-clip: text; background-clip: text; animation: ownerText 3s linear infinite; }
.last-jp-item { font-size: 14.5px; color: #fde68a; }
.last-jp-item b { color: #fff; font-weight: 800; }
.last-jp-spark { flex: 0 0 auto; font-size: 22px; letter-spacing: 6px; color: #fde047; text-shadow: 0 0 14px rgba(251, 191, 36, .9); animation: sparkTw 1.6s ease-in-out infinite; }
@keyframes sparkTw { 50% { opacity: .35; transform: scale(.92); } }
@media (max-width: 560px) { .last-jp { gap: 12px; padding: 14px; } .last-jp-crown { width: 48px; height: 48px; font-size: 26px; } .last-jp-msg { font-size: 16px; } .last-jp-name { font-size: 20px; } .last-jp-spark { display: none; } }
@media (prefers-reduced-motion: reduce) { .last-jp::before, .last-jp::after, .last-jp-crown, .last-jp-name, .last-jp-spark { animation: none; } }

/* Lucky: ข้อความรอบ/วิธีเล่น ย้ายมาอยู่ช่องผลล่าสุด */
.lucky-info { margin: -4px 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.lucky-info .eyebrow { margin: 0 0 4px; }
.lucky-info .muted { margin: 0; font-size: 13.5px; }
.lucky-info .jp-left { margin-top: 10px; }
.btn-glow[hidden] { display: none; }

/* ===== LEGENDARY ACCESS: รูปหีบทองเป็นพื้นการ์ดทั้งใบ (ภาพนิ่ง ไม่ขยับ) ===== */
.g-access { position: relative; overflow: hidden; padding-top: 12px !important; background: url("legendary-access-card.webp") center top / 100% auto no-repeat, #1e0f04 !important;
  border-color: rgba(251, 191, 36, .75) !important; box-shadow: 0 0 0 1px rgba(253, 224, 71, .3) inset, 0 0 34px -2px rgba(251, 191, 36, .8), 0 0 70px -10px rgba(245, 158, 11, .6), var(--shadow-card) !important; }
.access-art-space { aspect-ratio: 10 / 7.2; }
.g-access h2 { position: relative; text-shadow: 0 0 16px rgba(251, 191, 36, .85), 0 2px 3px rgba(0, 0, 0, .8); }
.g-access p { position: relative; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); }
.g-feed { margin: 4px 0 20px !important; }

/* ===== LEGENDARY ACCESS: ใช้รูปการ์ดสำเร็จ (มีข้อความในรูป) ===== */
.g-access-img { position: relative; border-radius: var(--radius); overflow: hidden; line-height: 0;
  box-shadow: 0 0 30px -4px rgba(251, 191, 36, .65), 0 0 64px -14px rgba(245, 158, 11, .55), var(--shadow-card); }
.g-access-img img { display: block; width: 100%; height: auto; }

/* ===== (14/10/2569) Lucky: รูปไอเทมบนเลขที่เปิดแล้ว · ผลล่าสุดมีรูป + ไฮไลต์ Epic สีม่วง · ตอนเปิดผลมีรูป + แสงตามระดับ ===== */
#revealToInv[hidden], #revealClose[hidden] { display: none !important; }
.lgrid .num .num-n { position: relative; z-index: 2; }
.lgrid .num.has-art { padding: 0; }
.lgrid .num.has-art .num-img { position: absolute; inset: 14% 10% 6%; width: 80%; height: 80%; object-fit: contain; z-index: 1; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .7)); pointer-events: none; }
.lgrid .num.has-art .num-n { position: absolute; top: 3px; left: 7px; font-size: 12px; line-height: 1; opacity: .95; text-shadow: 0 1px 3px #000; }
.lgrid .num.taken.mine.has-art::after { z-index: 3; }
.lgrid .num.taken.jp.has-art::after { left: auto; right: 6px; transform: none; z-index: 3; }
.history li .h-art { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--rbg, rgba(255, 255, 255, .05)); border: 1px solid color-mix(in srgb, var(--rc, #888) 45%, transparent); color: var(--rc); overflow: hidden; }
.history li .h-img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.history li.jp-row .h-art { width: 58px; height: 58px; border-color: rgba(251, 191, 36, .75); box-shadow: 0 0 16px -2px rgba(251, 191, 36, .7); }
.history li.jp-row .h-img { width: 52px; height: 52px; }
.history li.ep-row { position: relative; overflow: hidden; margin: 6px 0; padding: 14px 16px; border: 1px solid rgba(192, 132, 252, .6); border-radius: 14px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(168, 85, 247, .28), transparent 60%), linear-gradient(90deg, rgba(88, 28, 135, .45), rgba(30, 10, 45, .55));
  box-shadow: 0 0 22px -6px rgba(192, 132, 252, .65), inset 0 0 0 1px rgba(233, 213, 255, .08); }
.history li.ep-row::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(233, 213, 255, .18) 50%, transparent 65%) 0 0/250% 100%; animation: ownerShine 4s ease-in-out infinite; }
.history li.ep-row .t { color: #d8b4fe; font-weight: 700; }
.history li.ep-row .what { font: 600 17px/1.35 'Kanit', sans-serif; color: #faf5ff; display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.history li.ep-row .what b { color: #fff; font-weight: 800; }
.history li.ep-row .what em { font-style: normal; font-weight: 800; font-size: 19px; color: transparent; background: linear-gradient(90deg, #f5d0fe, #c084fc 45%, #faf5ff 60%, #a855f7) 0 0/220% 100%; -webkit-background-clip: text; background-clip: text; animation: ownerText 3.5s linear infinite; }
.history li.ep-row .ep-star { font-size: 20px; color: #e9d5ff; text-shadow: 0 0 12px rgba(192, 132, 252, .9); margin-right: 2px; }
.history li.ep-row .h-art { width: 52px; height: 52px; border-color: rgba(192, 132, 252, .7); box-shadow: 0 0 14px -2px rgba(192, 132, 252, .7); }
.history li.ep-row .rarity-badge { color: #2e1065; background: linear-gradient(135deg, #f5d0fe, #c084fc); border-color: transparent; box-shadow: 0 0 12px rgba(192, 132, 252, .7); }
@media (max-width: 560px) { .history li.ep-row { flex-wrap: wrap; } .history li.ep-row .what { font-size: 15px; } .history li .h-art { width: 40px; height: 40px; } }
.result-ico.lucky-glow { overflow: hidden; }
.result-ico .reveal-img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); animation: pop .6s var(--ease-spring) both; }
.result-ico.lucky-glow.r-rare { box-shadow: 0 0 46px -4px var(--rc); }
.result-ico.lucky-glow.r-epic { box-shadow: 0 0 56px 0 var(--rc), 0 0 0 3px rgba(192, 132, 252, .35); animation: pop .7s var(--ease-spring) both, luckyGlowP 2.4s ease-in-out .7s infinite; }
.result-ico.lucky-glow.r-legendary { box-shadow: 0 0 70px 6px var(--rc), 0 0 0 3px rgba(251, 191, 36, .45); animation: pop .7s var(--ease-spring) both, luckyGlowG 2s ease-in-out .7s infinite; }
@keyframes luckyGlowP { 50% { box-shadow: 0 0 80px 8px rgba(192, 132, 252, .85), 0 0 0 4px rgba(192, 132, 252, .5); } }
@keyframes luckyGlowG { 50% { box-shadow: 0 0 100px 16px rgba(251, 191, 36, .9), 0 0 0 4px rgba(253, 224, 71, .6); } }
.result-card.r-epic { border-color: rgba(192, 132, 252, .6); box-shadow: 0 0 70px -10px rgba(192, 132, 252, .6), var(--shadow-card); }
.result-card.r-rare { border-color: rgba(96, 165, 250, .5); box-shadow: 0 0 60px -12px rgba(96, 165, 250, .55), var(--shadow-card); }
.result-card.r-uncommon { border-color: rgba(74, 222, 128, .45); box-shadow: 0 0 50px -14px rgba(74, 222, 128, .5), var(--shadow-card); }
@media (prefers-reduced-motion: reduce) { .history li.ep-row::after, .history li.ep-row .what em, .result-ico.lucky-glow { animation: none !important; } }

/* (14/10/2569) ป๊อปอัพเลขที่เปิดแล้ว */
.lgrid .num.taken { cursor: pointer; }
.lgrid .num.taken:hover, .lgrid .num.taken:focus-visible { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 20px -8px var(--rc); outline: none; }
.ltip { position: absolute; z-index: 90; display: flex; align-items: center; gap: 12px; min-width: 200px; max-width: 300px; padding: 10px 14px 10px 10px; border-radius: 14px; pointer-events: none;
  background: linear-gradient(160deg, rgba(30, 20, 40, .97), rgba(14, 9, 20, .97)); border: 1px solid color-mix(in srgb, var(--rc, #888) 60%, transparent);
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .8), 0 0 22px -6px var(--rc, transparent); animation: ltipIn .14s ease-out both; }
.ltip[hidden] { display: none; }
.ltip::after { content: ''; position: absolute; left: var(--ax, 50%); bottom: -7px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: rgba(16, 10, 22, .97);
  border-right: 1px solid color-mix(in srgb, var(--rc, #888) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--rc, #888) 60%, transparent); }
.ltip.below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(225deg); }
.ltip-art { flex: none; width: 58px; height: 58px; border-radius: 12px; display: grid; place-items: center; color: var(--rc); background: var(--rbg, rgba(255, 255, 255, .05)); border: 1px solid color-mix(in srgb, var(--rc, #888) 40%, transparent); }
.ltip-img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .6)); }
.ltip-tx { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ltip-item { font: 700 15px/1.25 'Kanit', sans-serif; color: #fff; overflow-wrap: anywhere; }
.ltip.r-epic .ltip-item { color: #f3e8ff; text-shadow: 0 0 10px rgba(192, 132, 252, .6); } .ltip.r-legendary .ltip-item, .ltip.jp .ltip-item { color: #fde68a; text-shadow: 0 0 10px rgba(251, 191, 36, .6); }
.ltip .rarity-badge { font-size: 11px; padding: 2px 9px; }
.ltip-who { font-size: 12.5px; color: var(--muted, #c9b2a2); }
@keyframes ltipIn { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ltip { animation: none; } }
.ltip-name { display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: 999px; font: 700 13px 'Kanit', sans-serif; color: #fff7ed;
  background: linear-gradient(135deg, rgba(249, 115, 22, .55), rgba(194, 65, 12, .55)); border: 1px solid rgba(253, 186, 116, .6); box-shadow: 0 0 10px -2px rgba(249, 115, 22, .6); }
.ltip-name.me { background: linear-gradient(135deg, rgba(34, 197, 94, .55), rgba(21, 128, 61, .55)); border-color: rgba(134, 239, 172, .6); box-shadow: 0 0 10px -2px rgba(34, 197, 94, .6); }

/* tooltip เลข + ไฮไลทประวัติตามระดับ */
.ltip-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ltip-num { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 700 13px 'Kanit', sans-serif; color: var(--rc, #fde68a); background: var(--rbg, rgba(255,255,255,.08)); border: 1px solid color-mix(in srgb, var(--rc, #fde68a) 55%, transparent); }
.ltip-name { margin-left: 0; }
.history li .what.hl { flex: 0 1 auto; margin-right: auto; padding: 4px 12px; border-radius: 10px; font-weight: 700; color: var(--rc); background: var(--rbg); border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); text-shadow: 0 0 10px color-mix(in srgb, var(--rc) 40%, transparent); }

/* =====================================================================
   (15/10/2569) MYTHIC ZONE + ระดับ Mythic (สีรุ้ง) · วงล้อที่ล็อกโชว์รูปชัด · แถบบนสีเต็มเรืองแสง
   ===================================================================== */
:root { --rainbow: linear-gradient(90deg, #f43f5e, #f59e0b, #facc15, #4ade80, #38bdf8, #a855f7, #ec4899, #f43f5e); }
@keyframes mythRbText { to { background-position: 300% 50%; } }
@keyframes mythRb2 { to { background-position: 0 0, 300% 50%; } }
@keyframes mythRb3 { to { background-position: 0 0, 0 0, 300% 50%; } }
@keyframes mythRb4 { to { background-position: 0 0, 0 0, 0 0, 300% 50%; } }
@keyframes mythPulse {
  0%, 100% { box-shadow: 0 0 30px -4px rgba(236, 72, 153, .6), 0 0 70px -20px rgba(56, 189, 248, .55), var(--shadow-card); }
  50% { box-shadow: 0 0 52px -2px rgba(168, 85, 247, .85), 0 0 110px -16px rgba(250, 204, 21, .6), var(--shadow-card); }
}
@keyframes mythStar { 0%, 100% { opacity: .1; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes mythFloat { 50% { transform: translateY(-4px); } }

.r-mythic { --rc: #e879f9; --rbg: rgba(232, 121, 249, .2); --glow: 26px; --glow2: 60px; --ga: 85%; --pulse: 1.8s; --shine: 2.4s; --sh: .3; }
.rb-text { background: var(--rainbow); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: mythRbText 5s linear infinite; }
.rarity-badge.r-mythic { color: #fff; border-color: transparent; background: var(--rainbow); background-size: 300% 100%; animation: mythRbText 4s linear infinite; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); box-shadow: 0 0 14px rgba(232, 121, 249, .75); }

/* ดาวกระพริบ */
.myth-stars { position: absolute !important; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; z-index: 1; }
.myth-stars i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(255, 255, 255, .9), 0 0 16px 4px rgba(232, 121, 249, .6); animation: mythStar 2.2s ease-in-out infinite; }

/* เรทการออก */
.drop-row.r-mythic .dot { background: conic-gradient(#f43f5e, #facc15, #4ade80, #38bdf8, #a855f7, #f43f5e); box-shadow: 0 0 10px rgba(232, 121, 249, .8); }
.drop-row.r-mythic .dn { font-weight: 800; }
.drop-row.r-mythic .drop-bar i { background: var(--rainbow); background-size: 300% 100%; animation: mythRbText 3s linear infinite; }
.myth-note { margin: 2px 0 6px; font-size: 11.5px; color: #e9d5ff; opacity: .85; }

/* การ์ดในวงล้อ (Mythic + การ์ด MYTHIC ZONE ใน Legendary Zone) */
.rcard.r-mythic, .rcard.myth-card {
  border: 2px solid transparent !important; color: #f5d0fe;
  background: radial-gradient(120% 90% at 50% 0%, rgba(232, 121, 249, .5), transparent 65%) padding-box,
    linear-gradient(180deg, #2a1146, #0b0614 80%) padding-box, var(--rainbow) border-box !important;
  background-size: 100% 100%, 100% 100%, 300% 100% !important; animation: mythRb3 4s linear infinite;
  box-shadow: 0 0 26px -4px rgba(232, 121, 249, .85);
}
.rcard.r-mythic::after, .rcard.myth-card::after { background: var(--rainbow); box-shadow: 0 0 14px #e879f9; }
.rcard.r-mythic .nm, .rcard.myth-card .nm { color: #fff; font-weight: 800; text-shadow: 0 0 10px rgba(232, 121, 249, .9); }
.rcard.myth-card .nm { letter-spacing: 1px; }
.myth-card-ico { font-size: 58px; line-height: 1; filter: drop-shadow(0 0 14px rgba(232, 121, 249, .9)); }
.rcard.win.r-mythic, .rcard.win.myth-card { animation: mythRb3 1.6s linear infinite, winPulse 1s ease-in-out infinite; }

/* วงล้อที่ยังล็อก: โชว์รูปไอเทมชัด + ป้ายข้อความทับตรงกลาง (เดิมเบลอ/เทา) */
.zone-lock { background: rgba(12, 6, 2, .2); backdrop-filter: none; -webkit-backdrop-filter: none; letter-spacing: normal; }
.g-zone.locked .zone-reel .track { filter: brightness(.85) saturate(.95); }
.lock-pill { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 999px; text-align: left; color: #fbbf24;
  background: rgba(13, 7, 4, .9); border: 1px solid rgba(251, 191, 36, .65); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .85), 0 0 22px -6px rgba(251, 191, 36, .65); }
.lock-pill svg { flex-shrink: 0; }
.lock-pill b { display: block; font: 800 16px 'Kanit', sans-serif; color: #fbbf24; letter-spacing: .5px; }
.lock-pill small { display: block; font: 500 13px 'IBM Plex Sans Thai', sans-serif; color: #fde68a; letter-spacing: 0; }

/* กล่อง MYTHIC ZONE (ใช้โครง g-zone เดิม เปลี่ยนเป็นรุ้ง) */
.g-zone.g-myth, .g-zone.g-myth.locked {
  border: 2px solid transparent !important;
  background: radial-gradient(700px 240px at 50% 0%, rgba(168, 85, 247, .32), transparent 70%) padding-box,
    linear-gradient(180deg, #170a28, #0b0614) padding-box, var(--rainbow) border-box !important;
  background-size: 100% 100%, 100% 100%, 300% 100% !important;
  animation: mythRb3 6s linear infinite, mythPulse 3s ease-in-out infinite !important;
}
.g-zone.g-myth.open { animation: mythRb3 2.4s linear infinite, mythPulse 1.2s ease-in-out infinite !important; filter: brightness(1.12); }
.g-zone.g-myth.unlocking { animation: zoneShake .5s ease-in-out 3, mythRb3 2.4s linear infinite, mythPulse 1.2s ease-in-out infinite !important; filter: brightness(1.15); }
.g-myth .zone-glow { background: conic-gradient(from 0deg, transparent 0 10%, rgba(232, 121, 249, .22) 12%, transparent 18% 40%, rgba(56, 189, 248, .2) 44%, transparent 50% 70%, rgba(250, 204, 21, .18) 74%, transparent 80%); }
.myth-title { margin: 0; font: 800 clamp(24px, 3.4vw, 36px) 'Kanit', sans-serif; letter-spacing: 3px; }
.myth-sub { color: #e9d5ff; }
.myth-reel { background: rgba(10, 4, 20, .72); border-color: rgba(232, 121, 249, .35); }
.myth-reel::before { background: linear-gradient(90deg, #0d0618, transparent); } .myth-reel::after { background: linear-gradient(270deg, #0d0618, transparent); }
.reel-line.myth { background: linear-gradient(180deg, transparent, #f0abfc 20%, #fff 50%, #67e8f9 80%, transparent); box-shadow: 0 0 18px #e879f9; }
.myth-lock .lock-pill { border: 2px solid transparent; color: #f0abfc;
  background: linear-gradient(rgba(10, 5, 20, .94), rgba(10, 5, 20, .94)) padding-box, var(--rainbow) border-box; background-size: 100% 100%, 300% 100%;
  animation: mythRb2 4s linear infinite; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .85), 0 0 26px -6px rgba(232, 121, 249, .85); }
.myth-lock .lock-pill small { color: #e9d5ff; }
.g-myth .zone-state { color: rgba(245, 208, 254, .6); }
.g-myth.open .zone-state, .g-myth.unlocking .zone-state { color: #fff; background: var(--rainbow); background-size: 300% 100%; animation: mythRbText 2s linear infinite; box-shadow: 0 0 34px rgba(232, 121, 249, .75); text-shadow: 0 1px 3px rgba(0, 0, 0, .65); border-color: transparent; }

/* แผงของรางวัลด้านขวา */
.prize-tabs.has-myth { grid-template-columns: 1fr 1.3fr 1fr; }
.prize-tab.myth-tab { color: #f5d0fe; }
.prize-tab.myth-tab.on { color: #fff; background: var(--rainbow); background-size: 300% 100%; animation: mythRbText 4s linear infinite; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.prize.r-mythic { border: 2px solid transparent !important;
  background: radial-gradient(130% 120% at 0% 50%, rgba(236, 72, 153, .38), transparent 62%) padding-box,
    linear-gradient(90deg, #2a1146, #0a1c2c) padding-box, var(--rainbow) border-box !important;
  background-size: 100% 100%, 100% 100%, 300% 100% !important; animation: cardIn .4s var(--ease-out) backwards, mythRb3 4s linear infinite, mythPulse 2.2s ease-in-out infinite; }
.prize.r-mythic .prize-tx b { color: #fff; text-shadow: 0 0 12px rgba(232, 121, 249, .9); }
.prize.r-mythic .prize-tx span { color: #e9d5ff; }
.prize.r-mythic .prize-art { background: rgba(232, 121, 249, .22); box-shadow: 0 0 16px -2px rgba(232, 121, 249, .85); }
.prize.r-mythic::after { background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 48%, transparent 64%); background-size: 250% 100%; animation-duration: 2.4s; }

/* ตัวหนังสือวิ่ง + ประวัติ */
.g-feed-item.r-mythic em { background: var(--rainbow); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: mythRbText 4s linear infinite; font-weight: 800; }
.zone-tag.myth-tag { color: #fff; background: var(--rainbow); background-size: 300% 100%; animation: mythRbText 4s linear infinite; border-color: transparent; }
.hist-row.r-mythic { border-color: rgba(232, 121, 249, .55); background: linear-gradient(90deg, rgba(168, 85, 247, .22), rgba(12, 6, 20, .6)); }

/* ป๊อปอัพผล: Mythic = การ์ดรุ้งใหญ่ รูปใหญ่ ดาวกระพริบ */
.result-card.myth-win { max-width: 480px; border: 2px solid transparent !important;
  background: radial-gradient(600px 300px at 50% 18%, rgba(168, 85, 247, .48), transparent 70%) padding-box,
    linear-gradient(180deg, #170a28, #0b0614) padding-box, var(--rainbow) border-box !important;
  background-size: 100% 100%, 100% 100%, 300% 100% !important; animation: mythRb3 3s linear infinite, mythPulse 1.6s ease-in-out infinite; }
.result-card.myth-win > .myth-stars { position: absolute !important; }
.myth-win .result-kicker { font: 800 20px 'Kanit', sans-serif; letter-spacing: 2px; }
.myth-win .result-art { width: 210px; height: 210px; border-radius: 40px; border: 3px solid transparent;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .22), rgba(42, 17, 70, .95)) padding-box, var(--rainbow) border-box; background-size: 100% 100%, 300% 100%;
  animation: artIn .9s var(--ease-spring) both, mythRb2 3s linear infinite; box-shadow: 0 0 70px -4px rgba(232, 121, 249, .9); }
.myth-win .result-art .item-img { width: 170px; height: 170px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .7)); }
.myth-win .result-art .myth-card-ico { font-size: 110px; }
.myth-win .title { font-size: clamp(26px, 4.4vw, 40px); color: #fff; text-shadow: 0 0 24px rgba(232, 121, 249, .95); }
.myth-win .rays { opacity: 1; background: conic-gradient(from 0deg, transparent 0 6%, rgba(232, 121, 249, .22) 6% 10%, transparent 10% 18%, rgba(56, 189, 248, .2) 18% 22%, transparent 22% 30%, rgba(250, 204, 21, .2) 30% 34%, transparent 34% 42%, rgba(74, 222, 128, .18) 42% 46%, transparent 46%); }

/* การ์ดในกระเป๋า: Mythic อลังการ (ขอบรุ้งวิ่ง + เรืองแสงเต้น + แสงปัดผ่าน + ดาว + ไอคอนลอย) */
.inv-card.r-mythic { border: 2px solid transparent;
  background: radial-gradient(130% 100% at 0% 0%, rgba(236, 72, 153, .4), transparent 62%) padding-box,
    radial-gradient(90% 80% at 100% 100%, rgba(56, 189, 248, .32), transparent 60%) padding-box,
    linear-gradient(160deg, #2a1146, #0b0614 78%) padding-box, var(--rainbow) border-box;
  background-size: 100% 100%, 100% 100%, 100% 100%, 300% 100%;
  animation: cardIn .4s var(--ease-out) backwards, mythRb4 4s linear infinite, mythPulse 2.2s ease-in-out infinite; }
.inv-card.r-mythic.still { animation: mythRb4 4s linear infinite, mythPulse 2.2s ease-in-out infinite; }
.inv-card.r-mythic .nm { font-size: 17px; font-weight: 800; background: var(--rainbow); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: mythRbText 4s linear infinite; }
.inv-card.r-mythic .inv-ico { width: 60px; height: 60px; flex-basis: 60px; border: 2px solid transparent; border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .25), rgba(42, 17, 70, .95)) padding-box, var(--rainbow) border-box; background-size: 100% 100%, 300% 100%;
  animation: mythRb2 3s linear infinite, mythFloat 3s ease-in-out infinite; box-shadow: 0 0 22px -2px rgba(232, 121, 249, .9); color: #fff; }
.inv-card.r-mythic .inv-ico .item-img { width: 52px; height: 52px; }
.inv-card.r-mythic::after { background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .38) 47%, transparent 64%); background-size: 250% 100%; animation-duration: 2.4s; }
.inv-card.r-mythic > *:not(.myth-stars) { position: relative; z-index: 2; }

/* แถบบน: ปุ่มสีเต็มไล่สี ไม่ซ้ำกัน + เรืองแสงเต้น (แบบปุ่มฝั่งแอดมิน) */
@keyframes chipGlow { 0%, 100% { box-shadow: 0 0 10px -3px var(--cg); } 50% { box-shadow: 0 0 20px 0 var(--cg), 0 0 0 1px rgba(255, 255, 255, .35) inset; } }
.chip-mini.bank, .chip-mini.goldc, .chip-mini.coinc, .chip-mini.promoc, .chip-mini.gachac, .chip-mini.lucky {
  color: #fff; border-color: rgba(255, 255, 255, .3); font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); animation: chipGlow 2.6s ease-in-out infinite; }
.chip-mini.bank   { background: linear-gradient(135deg, #059669, #10b981); --cg: rgba(16, 185, 129, .95); }
.chip-mini.goldc  { background: linear-gradient(135deg, #fde047, #f59e0b); --cg: rgba(250, 204, 21, .95); color: #3b2300; text-shadow: none; animation-delay: -.4s; }
.chip-mini.coinc  { background: linear-gradient(135deg, #ea580c, #fb923c); --cg: rgba(249, 115, 22, .95); animation-delay: -.8s; }
.chip-mini.promoc { background: linear-gradient(135deg, #0284c7, #38bdf8); --cg: rgba(56, 189, 248, .95); animation-delay: -1.2s; }
.chip-mini.gachac { background: linear-gradient(135deg, #be185d, #ec4899); --cg: rgba(236, 72, 153, .95); animation-delay: -1.6s; }
.chip-mini.lucky  { background: linear-gradient(135deg, #6d28d9, #a855f7); --cg: rgba(168, 85, 247, .95); animation-delay: -2s; }
.chip-mini.bank .cl, .chip-mini.coinc .cl, .chip-mini.promoc .cl, .chip-mini.gachac .cl, .chip-mini.lucky .cl { opacity: .95; }

/* (16/10/2569) การ์ด MYTHIC ZONE ในวงล้อ Legendary Zone = รูปจากเจ้าของ (myth-card-art.webp สี่เหลี่ยมจัตุรัส พื้นโปร่งใส) เต็มกว้างการ์ด + ขอบรุ้งวิ่ง */
@keyframes mythRbArt { to { background-position: 50% 22%, 0 0, 0 0, 300% 50%; } }
.rcard.myth-card {
  justify-content: flex-end !important; gap: 0 !important; padding: 10px 10px 14px !important;
  background: url("myth-zone-card-v2.webp") 50% 22% / 100% auto no-repeat padding-box,
    radial-gradient(90% 70% at 50% 38%, rgba(232, 121, 249, .55), transparent 72%) padding-box,
    linear-gradient(180deg, #1c0b30, #0b0614 85%) padding-box, var(--rainbow) border-box !important;
  background-size: 100% auto, 100% 100%, 100% 100%, 300% 100% !important;
  animation: mythRbArt 4s linear infinite;
}
.rcard.win.myth-card { animation: mythRbArt 1.6s linear infinite, winPulse 1s ease-in-out infinite; }
.rcard.myth-card .myth-art-space { flex: 1; }
.rcard.myth-card .nm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rcard.myth-card .rarity-badge { position: relative; z-index: 1; }

/* =====================================================================
   (16/10/2569) หน้ากระเป๋า: การ์ดเกมสะสม (สไตล์ ก. ที่เจ้าของเลือก)
   กรอบมุมตัด · อัญมณีหัวการ์ด · ฉากตามระดับ · ไอเทมลอยเหนือแท่นแสง · ชื่อไล่สี · อัญมณี 1-6 เม็ด
   ออร่าตามระดับ (ยิ่งสูงยิ่งแรง) · Epic+ แสงโฮโล + ไอเทมลอยขยับ · คอม: ชี้แล้วลอยขึ้น · Legendary คลื่นทอง
   ===================================================================== */
.inv-grid.icards { grid-template-columns: repeat(auto-fill, minmax(max(168px, calc((100% - 64px) / 5)), 1fr)); gap: 24px 16px; padding: 12px 4px 4px; }
@media (max-width: 460px) { .inv-grid.icards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }
@keyframes icSpin { to { transform: rotate(360deg); } }
@keyframes icBob { 50% { transform: translateY(-6px); } }
@keyframes icHolo { 0% { background-position: 160% 0; } 100% { background-position: -160% 0; } }
@keyframes icTw { 0%, 100% { opacity: .15; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes icAur { 0%, 100% { transform: translateX(-18%) skewX(-10deg); } 50% { transform: translateX(12%) skewX(8deg); } }
@keyframes icAura { 0%, 100% { opacity: var(--ao, .5); transform: scale(1); } 50% { opacity: calc(var(--ao, .5) + .3); transform: scale(1.04); } }
@keyframes icGem { 50% { filter: brightness(1.6); box-shadow: 0 0 18px var(--c), 0 0 4px #fff; } }

.icard { --rx: 0deg; --ry: 0deg; --hx: 50%; position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: center; cursor: default;
  transition: transform .3s var(--ease-out), filter .3s; animation: cardIn .4s var(--ease-out) backwards; }
/* คอม: เอาเมาส์ชี้ = การ์ดลอยขึ้น + ออร่าสว่างขึ้น */
@media (hover: hover) and (pointer: fine) {
  .icard:hover { transform: translateY(-10px) scale(1.03); z-index: 2; }
  .icard:hover .ic-aura { opacity: calc(var(--ao, .3) + .3); }
  .icard:hover .ic-frame { filter: brightness(1.12); }
}
.icard.still { animation: none; }
.icard.selectable { cursor: pointer; }
.icard:focus-visible { outline: none; }
.icard:focus-visible .ic-frame { filter: brightness(1.25); }
.icard:focus-visible .ic-aura { opacity: 1; }
/* ออร่าด้านหลัง (เบลอนิ่ง ๆ · Epic+ เต้น) */
.ic-aura { position: absolute; inset: -10px; z-index: 0; border-radius: 26px; background: radial-gradient(closest-side, var(--g), transparent); filter: blur(var(--ab, 10px)); opacity: var(--ao, .3); pointer-events: none; }
.icard.hi .ic-aura { animation: icAura var(--ap, 2.6s) ease-in-out infinite; }
.ic-frame { position: relative; z-index: 1; display: block; padding: 5px; background: var(--frame);
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); }
.ic-inner { position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden; padding-bottom: 10px; min-height: 262px; background: linear-gradient(180deg, #191210, #0b0806);
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px); }
.ic-gem { position: absolute; top: -7px; left: 50%; z-index: 6; width: 20px; height: 20px; margin-left: -10px; transform: rotate(45deg); background: linear-gradient(135deg, #fff, var(--c) 40%, var(--c3)); border: 2px solid var(--c2); box-shadow: 0 0 12px var(--c); }
.icard.hi .ic-gem { animation: icGem 2.4s ease-in-out infinite; }
.ic-src { position: absolute; top: 12px; left: 12px; z-index: 6; padding: 3px 8px; border-radius: 4px; background: rgba(10, 7, 5, .85); border: 1px solid var(--c2); color: var(--c); font: 800 10.5px/1 'Kanit', sans-serif; letter-spacing: 1.5px; }
.icard .ic-chk { position: absolute; top: 11px; right: 12px; z-index: 6; width: 24px; height: 24px; border: 2px solid rgba(255, 255, 255, .65); background: rgba(0, 0, 0, .55); border-radius: 7px; display: grid; place-items: center; }
.icard.sel .ic-chk { background: var(--gold); border-color: var(--gold); }
.icard.sel .ic-chk::after { content: ''; width: 6px; height: 11px; border: solid #1c1203; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.icard.sel .ic-frame { filter: brightness(1.2) saturate(1.1); }
.icard.sel .ic-aura { opacity: 1; --ab: 16px; }
.icard.sel { filter: drop-shadow(0 0 1.5px #fde047) drop-shadow(0 0 1.5px #fbbf24) drop-shadow(0 0 8px rgba(251, 191, 36, .8)); }

/* ฉากตามระดับ */
.ic-scene { position: relative; display: block; width: 100%; height: 152px; overflow: hidden; border-bottom: 2px solid var(--c2); }
.sc-common { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 5px), radial-gradient(80% 70% at 50% 45%, #5b6270, #22262c 65%, #0e1013); }
.sc-uncommon { background: radial-gradient(60% 55% at 50% 48%, rgba(52, 211, 153, .55), transparent 70%), radial-gradient(rgba(110, 231, 183, .22) 1.4px, transparent 1.6px) 0 0 / 11px 11px, linear-gradient(#0b2a20, #03100b); }
.sc-rare { background: radial-gradient(60% 55% at 50% 45%, rgba(147, 197, 253, .6), transparent 70%),
  conic-gradient(from 200deg at 50% 110%, transparent 0 12deg, rgba(191, 219, 254, .16) 12deg 18deg, transparent 18deg 34deg, rgba(191, 219, 254, .12) 34deg 39deg, transparent 39deg 58deg, rgba(191, 219, 254, .15) 58deg 64deg, transparent 64deg 82deg, rgba(191, 219, 254, .1) 82deg 86deg, transparent 86deg), linear-gradient(#0d2048, #040a1a); }
.sc-epic { background: radial-gradient(40% 36% at 28% 30%, rgba(236, 72, 153, .45), transparent), radial-gradient(48% 42% at 72% 62%, rgba(168, 85, 247, .6), transparent), radial-gradient(rgba(255, 255, 255, .5) .8px, transparent 1px) 0 0 / 23px 19px, linear-gradient(#22093a, #0a0318); }
.sc-legendary { background: radial-gradient(50% 46% at 50% 50%, rgba(251, 191, 36, .55), rgba(180, 83, 9, .18) 60%, transparent 76%), linear-gradient(#3d2405, #120801); }
/* Legendary: คลื่นออร่าทองนุ่ม ๆ แผ่ช้า ๆ + แกนทองหายใจ */
@keyframes icWave { 0% { transform: scale(.35); opacity: 0; } 20% { opacity: .95; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes icGlow { 0%, 100% { transform: scale(.92); opacity: .65; } 50% { transform: scale(1.08); opacity: 1; } }
.ic-wave::before { content: ''; position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 214, .55), rgba(251, 191, 36, .35) 38%, rgba(217, 119, 6, .12) 60%, transparent 72%); filter: blur(6px); animation: icGlow 5s ease-in-out infinite; }
.ic-wave i { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; opacity: 0; filter: blur(5px);
  background: radial-gradient(circle, transparent 38%, rgba(254, 240, 138, .5) 52%, rgba(251, 191, 36, .32) 60%, rgba(180, 83, 9, .12) 66%, transparent 72%);
  animation: icWave 7s cubic-bezier(.25, .5, .3, 1) infinite; }
.ic-wave i:nth-child(2) { animation-delay: -3.5s; } .ic-wave i:nth-child(3) { display: none; }
.sc-mythic { background: radial-gradient(55% 50% at 50% 50%, rgba(232, 121, 249, .35), transparent 72%), linear-gradient(#170a28, #07040f); }
.ic-rune { position: absolute; left: 50%; top: 50%; width: 118px; height: 118px; margin: -59px 0 0 -59px; border-radius: 50%; border: 1.5px dashed rgba(233, 213, 255, .45); box-shadow: 0 0 0 10px rgba(233, 213, 255, .05), inset 0 0 0 14px rgba(233, 213, 255, .06); animation: icSpin 18s linear infinite; }
.ic-rays { position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; background: repeating-conic-gradient(from 0deg, rgba(253, 224, 71, .3) 0 7deg, transparent 7deg 20deg);
  animation: icSpin 26s linear infinite; -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); }
.ic-rays-rb { background: repeating-conic-gradient(from 0deg, rgba(244, 63, 94, .28) 0 6deg, transparent 6deg 15deg, rgba(56, 189, 248, .28) 15deg 21deg, transparent 21deg 30deg, rgba(250, 204, 21, .26) 30deg 36deg, transparent 36deg 45deg); animation-duration: 18s; }
.ic-aur { position: absolute; inset: -20% -40%; background: linear-gradient(100deg, transparent 10%, rgba(244, 63, 94, .45) 22%, rgba(250, 204, 21, .4) 34%, rgba(74, 222, 128, .4) 46%, rgba(56, 189, 248, .45) 58%, rgba(168, 85, 247, .5) 70%, transparent 84%); filter: blur(14px); opacity: .75; animation: icAur 7s ease-in-out infinite; }
/* Rare: เกล็ดคริสตัลลอยระยิบ */
@keyframes icShard { 0%, 100% { opacity: .35; transform: translateY(0) rotate(var(--r, 0deg)); } 50% { opacity: 1; transform: translateY(-5px) rotate(var(--r, 0deg)); } }
.ic-shard i { position: absolute; width: 9px; height: 15px; clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); background: linear-gradient(160deg, #fff, #bfdbfe 35%, #60a5fa 70%, #1d4ed8);
  filter: drop-shadow(0 0 4px rgba(147, 197, 253, .95)); animation: icShard 3.2s ease-in-out infinite; }
.ic-shard i:nth-child(1) { left: 12%; top: 20%; --r: -18deg; } .ic-shard i:nth-child(2) { left: 82%; top: 16%; --r: 22deg; width: 7px; height: 12px; animation-delay: -.6s; }
.ic-shard i:nth-child(3) { left: 22%; top: 64%; --r: 12deg; width: 6px; height: 10px; animation-delay: -1.2s; } .ic-shard i:nth-child(4) { left: 74%; top: 60%; --r: -10deg; width: 11px; height: 18px; animation-delay: -1.8s; }
.ic-shard i:nth-child(5) { left: 48%; top: 8%; --r: 4deg; width: 6px; height: 10px; animation-delay: -2.4s; } .ic-shard i:nth-child(6) { left: 6%; top: 44%; --r: 30deg; width: 5px; height: 8px; animation-delay: -.9s; }
.ic-shard i:nth-child(7) { left: 90%; top: 42%; --r: -28deg; width: 6px; height: 10px; animation-delay: -2.1s; }
/* Mythic: ออร่ารุ้งแผ่จากไอเทม (หายใจเข้า-ออก ไม่หมุน) */
@keyframes icHalo { 0%, 100% { transform: scale(.88); opacity: .7; } 50% { transform: scale(1.1); opacity: 1; } }
.ic-halo { position: absolute; left: 50%; top: 50%; width: 230px; height: 230px; margin: -115px 0 0 -115px; border-radius: 50%; filter: blur(7px);
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0 10%, rgba(244, 63, 94, .5) 20%, rgba(250, 204, 21, .45) 30%, rgba(74, 222, 128, .42) 40%, rgba(56, 189, 248, .45) 50%, rgba(168, 85, 247, .5) 60%, transparent 70%);
  animation: icHalo 3.2s ease-in-out infinite; }
.ic-dust i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff7c2; box-shadow: 0 0 8px 2px rgba(253, 224, 71, .9); animation: icTw 2.4s ease-in-out infinite; }
.ic-dust i:nth-child(1) { left: 18%; top: 22%; } .ic-dust i:nth-child(2) { left: 78%; top: 28%; animation-delay: .7s; } .ic-dust i:nth-child(3) { left: 64%; top: 72%; animation-delay: 1.4s; } .ic-dust i:nth-child(4) { left: 28%; top: 66%; animation-delay: 2s; }
.ic-scene .myth-stars { z-index: 2; }
.ic-ped { position: absolute; left: 50%; bottom: 14px; width: 124px; height: 22px; margin-left: -62px; border-radius: 50%; background: radial-gradient(closest-side, var(--c), transparent); opacity: .8; filter: blur(2px); }
.ic-scene .item-img, .ic-scene .ic-ico { position: absolute; left: 50%; top: 50%; z-index: 3; width: 138px; height: 102px; margin: -58px 0 0 -69px; object-fit: contain; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .75)); }
.ic-scene .ic-ico { width: 64px; height: 64px; margin: -40px 0 0 -32px; color: var(--c); }
.icard.hi .ic-scene .item-img, .icard.hi .ic-scene .ic-ico { animation: icBob 3s ease-in-out infinite; }
.icard:nth-child(3n+2) .item-img { animation-delay: -1s; } .icard:nth-child(3n) .item-img { animation-delay: -2s; }

/* ชื่อ + อัญมณี + คำอธิบาย */
.ic-name { position: relative; z-index: 4; display: block; margin-top: -16px; padding: 6px 14px; min-width: 72%; max-width: calc(100% - 14px); box-sizing: border-box; background: linear-gradient(180deg, #2c241e, #120d0a);
  border: 1.5px solid var(--c2); box-shadow: 0 6px 12px -6px #000; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); }
.ic-name .gt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 800 14.5px/1.22 'Kanit', sans-serif; word-break: break-word;
  background: var(--nm); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ic-pips { display: flex; gap: 5px; align-items: center; justify-content: center; margin-top: 8px; }
.ic-pips i { width: 8px; height: 8px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 6px var(--c); }
.ic-pips span { margin-left: 6px; font: 700 11.5px 'Kanit', sans-serif; letter-spacing: 1px; color: var(--c); }
.ic-desc { display: block; width: calc(100% - 20px); box-sizing: border-box; margin: 8px 10px 0; padding: 6px 9px; border-top: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  font-size: 12px; line-height: 1.5; color: #ddcfc2; }
.ic-desc > span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: calc(12px * 1.5 * 3); }
.ic-inner .note { display: block; margin: 6px 10px 0; font-size: 11.5px; color: #fde68a; }
.ic-foot { display: flex; width: calc(100% - 20px); margin-top: auto; padding-top: 10px; align-items: center; justify-content: space-between; gap: 6px; }
.ic-foot { flex-wrap: wrap; }
.ic-foot .st { font-size: 10.5px; padding: 2px 8px; align-self: center; line-height: 1.35; }
.ic-id { margin-left: auto; font-size: 10px; color: #8f8073; letter-spacing: .3px; white-space: nowrap; }
.ic-holo { position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .2) 44%, rgba(125, 211, 252, .18) 50%, rgba(244, 114, 182, .18) 56%, transparent 70%); background-size: 300% 100%; animation: icHolo 4.2s ease-in-out infinite; }
.icard.tilting .ic-holo { animation: none; background-position: var(--hx) 0; }

/* สีตามระดับ + ออร่า (--ao ความเข้ม · --ab เบลอ · --ap จังหวะเต้น) */
.icard.t-common    { --frame: linear-gradient(145deg, #e5e7eb, #6b7280 40%, #f3f4f6 55%, #4b5563); --c: #d1d5db; --c2: #6b7280; --c3: #30343b; --g: rgba(203, 213, 225, .5); --nm: linear-gradient(180deg, #fff, #cbd5e1); --ao: .18; --ab: 8px; }
.icard.t-uncommon  { --frame: linear-gradient(145deg, #a7f3d0, #047857 40%, #d1fae5 55%, #065f46); --c: #6ee7b7; --c2: #059669; --c3: #064e3b; --g: rgba(52, 211, 153, .7); --nm: linear-gradient(180deg, #ecfdf5, #6ee7b7); --ao: .3; --ab: 9px; }
.icard.t-rare      { --frame: linear-gradient(145deg, #bfdbfe, #1d4ed8 40%, #dbeafe 55%, #1e3a8a); --c: #93c5fd; --c2: #2563eb; --c3: #1e3a8a; --g: rgba(96, 165, 250, .8); --nm: linear-gradient(180deg, #eff6ff, #93c5fd); --ao: .42; --ab: 11px; }
.icard.t-epic      { --frame: linear-gradient(145deg, #f5d0fe, #7e22ce 40%, #f0abfc 55%, #581c87); --c: #e9a8fd; --c2: #9333ea; --c3: #4c1d95; --g: rgba(192, 132, 252, .9); --nm: linear-gradient(180deg, #fdf4ff, #d8b4fe); --ao: .5; --ab: 13px; --ap: 2.8s; }
.icard.t-legendary { --frame: linear-gradient(145deg, #fef3c7, #b45309 20%, #fde68a 38%, #78350f 56%, #fbbf24 74%, #92400e 90%, #fde68a); --c: #fcd34d; --c2: #b45309; --c3: #78350f; --g: rgba(245, 158, 11, .95); --nm: linear-gradient(180deg, #fffbe6, #fbbf24 60%, #d97706); --ao: .62; --ab: 15px; --ap: 2.2s; }
.icard.t-mythic    { --frame: var(--rainbow); --c: #f0abfc; --c2: #c026d3; --c3: #4a044e; --g: rgba(232, 121, 249, 1); --nm: var(--rainbow); --ao: .72; --ab: 18px; --ap: 1.6s; }
.icard.t-mythic .ic-frame, .icard.t-mythic .ic-name .gt { background-size: 300% 100%; animation: mythRbText 4s linear infinite; }
.icard.t-mythic .ic-aura { background: conic-gradient(from 0deg, rgba(244, 63, 94, .9), rgba(250, 204, 21, .9), rgba(74, 222, 128, .9), rgba(56, 189, 248, .9), rgba(168, 85, 247, .9), rgba(244, 63, 94, .9)); border-radius: 30px; }
.icard.t-mythic .ic-pips i { background: linear-gradient(135deg, #f43f5e, #facc15, #38bdf8, #a855f7); }
.icard.t-mythic .ic-gem { background: conic-gradient(#f43f5e, #facc15, #4ade80, #38bdf8, #a855f7, #f43f5e); }
/* Legendary: ทองทั้งใบ + ออร่ารอบการ์ดเป็นคลื่นทองช้า ๆ */
@keyframes icGoldAura { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes icGoldWave { 0% { opacity: 0; transform: scale(.96); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(1.16); } }
.icard.t-legendary { --ao: .9; --ab: 16px; }
.icard.t-legendary .ic-aura { inset: -10px; border-radius: 24px; background: linear-gradient(160deg, #fef08a, #f59e0b 40%, #fbbf24 65%, #d97706); animation: icGoldAura 5s ease-in-out infinite; }
.icard.t-legendary .ic-aura::after { content: ''; position: absolute; inset: 4px; border-radius: 22px; box-shadow: 0 0 0 10px rgba(254, 240, 138, .8), 0 0 30px 14px rgba(251, 191, 36, .6); animation: icGoldWave 5s ease-out infinite; }
.icard.t-legendary .ic-inner { background: radial-gradient(110% 55% at 50% 100%, rgba(251, 191, 36, .3), transparent 72%), linear-gradient(180deg, #3b2507, #1d1103 55%, #2b1904); }
.icard.t-legendary .ic-scene { border-bottom-color: #f59e0b; }
.icard.t-legendary .ic-name { background: linear-gradient(180deg, #5a3a0b, #241504); border-color: #f59e0b; box-shadow: 0 0 14px -2px rgba(251, 191, 36, .7); }
.icard.t-legendary .ic-desc { color: #fde68a; background: linear-gradient(90deg, transparent, rgba(251, 191, 36, .1), transparent); }
.icard.t-legendary .ic-id { color: #d6a85a; }
.icard.t-legendary .ic-foot .st { background: rgba(120, 53, 15, .7); color: #fde68a; }
/* Mythic: ออร่ารุ้งแรงสุด แทบแสบตา (ไหลสี ไม่หมุน) */
@keyframes icRbFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes icRbPulse { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
.icard.t-mythic { --ao: .9; --ab: 16px; }
@keyframes icRbHue { to { filter: blur(var(--ab)) hue-rotate(360deg); } }
.icard.t-mythic .ic-aura { inset: -10px; border-radius: 24px; filter: blur(var(--ab)); background: conic-gradient(from 0deg, #f43f5e, #fb923c, #facc15, #4ade80, #22d3ee, #6366f1, #d946ef, #f43f5e);
  animation: icGoldAura 5s ease-in-out infinite, icRbHue 12s linear infinite; }
.icard.t-mythic .ic-aura::after { content: ''; position: absolute; inset: 4px; border-radius: 22px; padding: 10px; background: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: icGoldWave 5s ease-out infinite; }
.icard.t-mythic .ic-frame { box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
/* ทอง/รุ้ง: ติ๊กเลือกแล้วแสงเท่าเดิม (บอกด้วยเครื่องหมายถูกเรืองแสง) */
.icard.sel.t-legendary, .icard.sel.t-mythic { filter: none; }
.icard.sel.t-legendary .ic-chk, .icard.sel.t-mythic .ic-chk { box-shadow: 0 0 0 2px #fff, 0 0 10px #fde047; }
.icard.sel.t-legendary .ic-frame, .icard.sel.t-mythic .ic-frame { filter: none; }
.icard.sel.t-legendary .ic-aura, .icard.sel.t-mythic .ic-aura { --ab: 16px; }
@media (max-width: 460px) { .ic-scene { height: 136px; } .ic-scene .item-img { width: 124px; height: 92px; margin: -52px 0 0 -62px; } .ic-wave i { width: 100px; height: 100px; margin: -50px 0 0 -50px; } .ic-inner { min-height: 246px; } .ic-name .gt { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .icard, .ic-aura, .ic-rays, .ic-rune, .ic-aur, .ic-holo, .ic-gem, .ic-wave i, .ic-wave::before, .ic-aura::after, .ic-shard i, .ic-halo, .ic-scene .item-img, .icard.t-mythic .ic-frame { animation: none !important; } .icard { transform: none !important; } .ic-wave i { opacity: .5; transform: scale(1); } }

/* =====================================================================
   (16/10/2569) การ์ดบนวงล้อ: ฉากนิ่งตามระดับ + ใบที่ชนะเล่นเอฟเฟกต์ตามระดับ
   ===================================================================== */
.rcard > * { position: relative; z-index: 2; }
.rcard > .rc-scene, .rcard > .rc-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; overflow: hidden; }
.rcard > .rc-fx { z-index: 1; }
.rc-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8, 5, 3, .55) 72%, rgba(8, 5, 3, .9)); }
.rc-fx { animation: rcFxIn .5s ease-out both; }
@keyframes rcFxIn { from { opacity: 0; } to { opacity: 1; } }
.rc-fx .ic-wave, .rc-fx .ic-shard, .rc-fx .ic-dust { position: absolute; inset: 0 0 30% 0; }
.rc-fx .ic-wave i { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
.rc-fx .ic-wave::before { width: 140px; height: 140px; margin: -70px 0 0 -70px; }
.rc-fx .ic-rune { top: 36%; width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.rc-fx .ic-halo { top: 36%; width: 180px; height: 180px; margin: -90px 0 0 -90px; }
.rc-glow { position: absolute; left: 50%; top: 36%; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 70%, transparent), transparent); animation: icGlow 2.4s ease-in-out infinite; }
.rc-fx .myth-stars { z-index: 2; }
@media (prefers-reduced-motion: reduce) { .rc-fx, .rc-glow { animation: none !important; } }
.rc-fx .ic-halo { opacity: .6; }
.rcard.zone-card > .rc-fx, .rcard.myth-card > .rc-fx { mix-blend-mode: screen; opacity: .6; }
/* (16/10/2569) ใบที่ชนะบนวงล้อ: กระพริบช้า ๆ สมูท */
.rcard.win { animation: winPop .9s var(--ease-spring) both, winPulse 3s ease-in-out .9s infinite; }
.rcard.win.r-mythic { animation: mythRb3 5s linear infinite, winPulse 3s ease-in-out infinite; }
.rcard.win.myth-card { animation: mythRbArt 5s linear infinite, winPulse 3s ease-in-out infinite; }
.rc-fx .ic-dust i, .rc-fx .myth-stars i { animation-duration: 4.5s !important; animation-timing-function: ease-in-out !important; }
.rc-fx .ic-shard i { animation-duration: 5.5s; }
.rc-glow { animation-duration: 4.5s; }
.rc-fx .ic-aur { animation-duration: 10s; }
.rc-fx .ic-halo { animation-duration: 5s; }
.rc-fx .ic-wave i { animation-duration: 8s; } .rc-fx .ic-wave i:nth-child(2) { animation-delay: -4s; }

/* (16/10/2569) รายการรางวัล: ไล่แสง/ไล่สีช้า ๆ ทั้งหมด */
.prize { --shine: 14s; --pulse: 8s; }
.prize::after { animation-duration: 14s; }
.prize.r-mythic { animation: cardIn .4s var(--ease-out) backwards, mythRb3 12s linear infinite, mythPulse 6s ease-in-out infinite; }
.prize.r-mythic::after { animation-duration: 10s; }
.prize-tab.myth-tab.on { animation-duration: 12s; }
.prize .rarity-badge.r-mythic { animation-duration: 12s; }

/* =====================================================================
   (17/10/2569) การ์ดกระเป๋า: เล็กลง + มุมมน (เจ้าของไม่ชอบมุมตัดเหลี่ยม)
   คอม 7 ใบ/แถว (ใบละ ~140px ขึ้นไป) · มือถือ 3 ใบ (เล็กมาก 2 ใบ) · ฉาก/รูป/ตัวหนังสือย่อตามขนาด
   ===================================================================== */
.inv-grid.icards { grid-template-columns: repeat(auto-fill, minmax(max(140px, calc((100% - 96px) / 7)), 1fr)); gap: 18px 12px; }
@media (max-width: 760px) { .inv-grid.icards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; } }
@media (max-width: 560px) { .inv-grid.icards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; } }
.icard { height: 100%; }
.ic-frame { height: 100%; box-sizing: border-box; }
.ic-inner { height: 100%; box-sizing: border-box; }
.ic-frame { clip-path: none; border-radius: 16px; padding: 3px; }
.ic-inner { clip-path: none; border-radius: 13px; min-height: 0; padding-bottom: 8px; }
.ic-aura, .icard.t-legendary .ic-aura, .icard.t-mythic .ic-aura { border-radius: 20px; }
@media (hover: hover) and (pointer: fine) { .icard:hover { transform: translateY(-6px) scale(1.03); } }
.ic-gem { top: -6px; width: 14px; height: 14px; margin-left: -7px; border-width: 1.5px; }
.ic-src { top: 8px; left: 8px; padding: 2px 6px; font-size: 9px; letter-spacing: 1px; border-radius: 6px; }
.icard .ic-chk { top: 7px; right: 8px; width: 20px; height: 20px; border-radius: 6px; }
.icard.sel .ic-chk::after { width: 5px; height: 9px; }
.ic-scene { height: 104px; }
.ic-scene .item-img { width: 96px; height: 70px; margin: -38px 0 0 -48px; }
.ic-scene .ic-ico { width: 44px; height: 44px; margin: -26px 0 0 -22px; }
.ic-ped { width: 84px; height: 16px; margin-left: -42px; bottom: 10px; }
.ic-scene .ic-wave::before { width: 120px; height: 120px; margin: -60px 0 0 -60px; }
.ic-wave i { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.ic-rune { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.ic-halo { width: 160px; height: 160px; margin: -80px 0 0 -80px; }
.ic-name { margin-top: -12px; padding: 4px 10px; min-width: 70%; max-width: calc(100% - 12px); border-radius: 999px; clip-path: none; }
.ic-name .gt { font-size: 12.5px; line-height: 1.2; word-break: normal; overflow-wrap: break-word; }
.ic-pips { margin-top: 6px; gap: 4px; }
.ic-pips i { width: 6px; height: 6px; }
.ic-pips span { margin-left: 4px; font-size: 10px; }
.ic-desc { width: calc(100% - 14px); margin: 6px 7px 0; padding: 4px 6px; font-size: 11px; border-radius: 8px; }
.ic-desc > span { -webkit-line-clamp: 2; max-height: calc(11px * 1.5 * 2); }
.ic-inner .note { margin: 4px 8px 0; font-size: 10.5px; }
.ic-foot { width: calc(100% - 14px); padding-top: 8px; }
.ic-foot .st { font-size: 9.5px; padding: 1px 6px; border-radius: 999px; }
.ic-id { font-size: 9px; }

/* =====================================================================
   (17/10/2569) เมนูหลักเป็นแถวที่ 2 ใต้แถบเงิน (ทุกหน้า ทุกขนาดจอ · เลิกแถบซ้าย)
   แถบเงินเลื่อนหายตามหน้า · แถวเมนูติดบนสุดตอนเลื่อน · ปุ่มไอคอนสีเต็มเรือง (แบบเมนูหน้าแอดมิน) · ชี้เมาส์ = ป้ายชื่อใต้ปุ่ม
   แถบเงินดูยอดอย่างเดียว (layout.php เอาลิงก์ออก)
   ===================================================================== */
.topbar { position: relative; }
.dock-wrap.dock-row { position: sticky; top: 0; left: auto; right: auto; bottom: auto; transform: none; z-index: 25; display: flex; justify-content: center;
  padding: 8px 12px; pointer-events: auto; background: rgba(18, 8, 4, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.dock-row .dock { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; }
.dock-row .tile { width: 52px; height: 38px; }
.dock-row .face { border-radius: 999px; border: 0; color: #fff; background: linear-gradient(135deg, var(--d1), var(--d2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22) inset, 0 0 12px rgba(var(--dg), .45); }
.dock-row .face svg { width: 19px; height: 19px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.dock-row .tile:hover .face, .dock-row .tile:focus-visible .face { color: #fff; transform: translateY(-2px) scale(1.04); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6) inset, 0 0 20px rgba(var(--dg), .85), 0 0 36px rgba(var(--dg), .4); }
.dock-row .tile.active .face { color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(var(--dg), .5), 0 0 24px rgba(var(--dg), .9); }
.dock-row .tile.dk-gold .face, .dock-row .tile.dk-gold.active .face { color: #2b1a02; }
.dock-row .dock-sep { width: 1px; height: 26px; margin: 0 4px; background: rgba(255, 255, 255, .16); }
.dk-purple { --d1: #c084fc; --d2: #7e22ce; --dg: 168, 85, 247; }
.dk-gold   { --d1: #fde047; --d2: #f59e0b; --dg: 251, 191, 36; }
.dk-green  { --d1: #34d399; --d2: #047857; --dg: 16, 185, 129; }
.dk-orange { --d1: #fb923c; --d2: #c2410c; --dg: 249, 115, 22; }
.dk-pink   { --d1: #f472b6; --d2: #be185d; --dg: 236, 72, 153; }
.dk-violet { --d1: #a78bfa; --d2: #5b21b6; --dg: 139, 92, 246; }
.dk-teal   { --d1: #2dd4bf; --d2: #0f766e; --dg: 20, 184, 166; }
.dk-red    { --d1: #f87171; --d2: #991b1b; --dg: 239, 68, 68; }
/* ป้ายชื่อใต้ปุ่ม */
.dock-row .tip { left: 50%; right: auto; top: calc(100% + 10px); bottom: auto; transform: translate(-50%, -6px) scale(.9); z-index: 40; }
.dock-row .tip::after { left: 50%; right: auto; top: auto; bottom: 100%; margin: 0 0 0 -6px; border-color: transparent; border-bottom-color: #fff; }
.dock-row .tile:hover .tip, .dock-row .tile:focus-visible .tip, .dock-row .tile.show-tip .tip { transform: translate(-50%, 0) scale(1); }
.dock-row .tile:first-child .tip { left: 0; transform: translate(0, -6px) scale(.9); transform-origin: left top; }
.dock-row .tile:last-child .tip { left: auto; right: 0; transform: translate(0, -6px) scale(.9); transform-origin: right top; }
.dock-row .tile:first-child:hover .tip, .dock-row .tile:last-child:hover .tip, .dock-row .tile:first-child:focus-visible .tip, .dock-row .tile:last-child:focus-visible .tip { transform: translate(0, 0) scale(1); }
.dock-row .tile:first-child .tip::after { left: 22px; } .dock-row .tile:last-child .tip::after { left: auto; right: 14px; margin: 0; }
/* เลิกเว้นที่ซ้ายให้แถบเมนูเดิม */
@media (min-width: 900px) { .home { padding-left: 16px; } }
.home { padding-bottom: 60px; }
.toast { bottom: 24px; }
@media (max-width: 480px) { .dock-row .dock { gap: 6px; } .dock-row .tile { width: 40px; height: 34px; } .dock-row .face svg { width: 17px; height: 17px; } .dock-row .dock-sep { display: none; } }
/* แถบเงิน: ดูยอดอย่างเดียว */
.chip-mini { cursor: default; }

/* (17/10/2569) การ์ดกระเป๋า Legendary / Mythic: ลดแสงเรืองลง (เจ้าของบอกแรงไป) */
@keyframes icGoldAuraSoft { 0%, 100% { opacity: .32; transform: scale(1); } 50% { opacity: .5; transform: scale(1.02); } }
@keyframes icGoldWaveSoft { 0% { opacity: 0; transform: scale(.97); } 30% { opacity: .4; } 100% { opacity: 0; transform: scale(1.08); } }
.icard.t-legendary .ic-aura { inset: -4px; animation-name: icGoldAuraSoft; }
.icard.t-legendary .ic-aura::after { box-shadow: 0 0 0 4px rgba(254, 240, 138, .35), 0 0 14px 5px rgba(251, 191, 36, .25); animation-name: icGoldWaveSoft; }
.icard.t-mythic { --ab: 10px; }
.icard.t-mythic .ic-aura { inset: -4px; animation-name: icGoldAuraSoft, icRbHue; }
.icard.t-mythic .ic-aura::after { padding: 5px; animation-name: icGoldWaveSoft; }
.icard.sel.t-legendary .ic-aura, .icard.sel.t-mythic .ic-aura { --ab: 10px; }
@media (hover: hover) and (pointer: fine) { .icard.t-legendary:hover .ic-aura, .icard.t-mythic:hover .ic-aura { opacity: .6; } }
/* (17/10/2569) เจ้าของชอบการ์ดแบบไม่มีคำอธิบาย: ซ่อนคำอธิบายทุกระดับ ทั้งคอมและมือถือ */
.icard .ic-desc { display: none; }
.ic-foot { padding-top: 10px; }
/* (17/10/2569) แถบเงินด้านบน: ดูยอดอย่างเดียว กดไม่ได้ -> ไม่ใส่สี ไม่เรือง (สีเก็บไว้ให้ปุ่มที่กดได้เท่านั้น) */
.chip-mini.bank, .chip-mini.goldc, .chip-mini.coinc, .chip-mini.promoc, .chip-mini.gachac, .chip-mini.lucky {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); color: #f5e9df; text-shadow: none; font-weight: 600; animation: none; box-shadow: none; }
.chip-mini svg { color: #c9a88a; }
.chip-mini .cl { opacity: .75; font-weight: 500; }
.chip-mini b { color: #fff7ed; font-weight: 700; }
a.chip-mini:hover { transform: none; filter: none; }
/* (17/10/2569) แถบบน (โลโก้ + ยอดเงิน + ชื่อ) และแถวเมนู อยู่กึ่งกลางจอแนวเดียวกันพอดี */
.topbar { justify-content: center; column-gap: 28px; }
.who { justify-content: center; }
.dock-row .tile.active .face { background: linear-gradient(135deg, var(--d1), var(--d2)); border-color: transparent; }

/* ===== (26/10/2569) ห้องหลอมการ์ด ===== */
.forge-toggle { height: 52px; padding: 0 20px; border-radius: 16px; border: 1px solid rgba(205, 127, 50, .55); background: linear-gradient(180deg, #2a160b, #160b05); color: #fcd9a6; font: inherit; font-weight: 700; cursor: pointer; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; box-shadow: 0 0 0 1px rgba(205, 127, 50, .15) inset, 0 10px 26px -14px rgba(205, 127, 50, .9); }
.forge-toggle::before { content: ''; position: absolute; inset: -40% -60%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(251, 191, 36, .35) 80%, transparent 90%); animation: fgSpin 4s linear infinite; opacity: .55; }
.forge-toggle span { position: relative; }
.forge-toggle:hover { transform: translateY(-2px); border-color: #fbbf24; box-shadow: 0 0 22px -4px rgba(251, 191, 36, .6); }
.forge-toggle[aria-pressed="true"] { border-color: #fbbf24; color: #fff7ed; background: linear-gradient(180deg, #7c3f12, #3b1d08); }
.claim-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.forge { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); gap: 24px; align-items: center; margin: 0 0 22px; padding: 22px; border-radius: var(--radius); border: 1px solid rgba(205, 127, 50, .4); background: radial-gradient(ellipse at 75% 50%, rgba(249, 115, 22, .14), transparent 60%), rgba(20, 10, 5, .78); box-shadow: var(--shadow-card); animation: cardIn .45s var(--ease-spring) both; }
.forge[hidden] { display: none; }
.forge-info h2 { margin: 0 0 8px; font-size: 26px; background: linear-gradient(90deg, #fde68a, #cd7f32); -webkit-background-clip: text; background-clip: text; color: transparent; }
.forge-info p { margin: 0 0 12px; line-height: 1.65; }
.forge-steps { margin: 0 0 12px; padding-left: 22px; line-height: 1.8; color: var(--text); }
.forge-note { font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .06); color: #fde68a; }

.forge-stage { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; --slot-w: 23%; }
.forge-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fg-spin { transform-origin: 200px 200px; animation: fgSpin 24s linear infinite; }
.fg-spin.rev { animation-duration: 36s; animation-direction: reverse; }
.fg-glow { animation: fgBreath 3.2s ease-in-out infinite; transform-origin: 200px 200px; }
.fg-arms path { stroke-dasharray: 6 5; animation: fgFlow 1.4s linear infinite; }
@keyframes fgSpin { to { transform: rotate(360deg); } }
@keyframes fgBreath { 50% { opacity: .55; transform: scale(.97); } }
@keyframes fgFlow { to { stroke-dashoffset: -22; } }

.forge-slot { position: absolute; width: var(--slot-w); aspect-ratio: 3 / 4; padding: 6px 4px 4px; border-radius: 14px; border: 2px dashed rgba(205, 127, 50, .6); background: rgba(10, 5, 2, .85); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font: inherit; transition: transform .7s var(--ease-out), opacity .6s, border-color .2s, box-shadow .2s; z-index: 2; }
.forge-slot.s0 { left: 38.5%; top: -1%; --tx: 0%; --ty: 116%; }
.forge-slot.s1 { left: 1%; top: 62%; --tx: 163%; --ty: -89%; }
.forge-slot.s2 { left: 76%; top: 62%; --tx: -163%; --ty: -89%; }
.forge-slot:hover { border-color: #fbbf24; }
.forge-slot.full { border-style: solid; border-color: var(--rc, #cd7f32); background: radial-gradient(circle at 50% 35%, var(--rbg, rgba(205, 127, 50, .25)), rgba(10, 5, 2, .92) 70%); box-shadow: 0 0 18px -4px var(--rc, #cd7f32); animation: fgPop .35s var(--ease-spring); }
.forge-slot img, .forge-slot svg { width: 78%; max-height: 58%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }
.fs-name { font-size: 10.5px; line-height: 1.2; text-align: center; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fs-empty { font: 700 22px/1 inherit; color: rgba(205, 127, 50, .7); }
@keyframes fgPop { from { transform: scale(.6); opacity: 0; } }

.forge-core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid #7c3f12; background: radial-gradient(circle at 50% 40%, #3b1d08, #120804 70%); color: #fcd9a6; font: inherit; cursor: pointer; display: grid; place-items: center; z-index: 3; transition: box-shadow .3s, filter .3s, transform .2s; }
.forge-core b { position: relative; font-size: 15px; letter-spacing: .5px; }
.fc-ring { position: absolute; inset: 6%; border-radius: 50%; border: 2px solid transparent; border-top-color: #fbbf24; border-bottom-color: #f97316; animation: fgSpin 3s linear infinite; opacity: .5; }
.forge-core:disabled { cursor: not-allowed; filter: grayscale(.4) brightness(.8); }
.forge-core.ready { border-color: #fbbf24; color: #fff7ed; background: radial-gradient(circle at 50% 40%, #f59e0b, #9a3412 55%, #3b1d08 85%); box-shadow: 0 0 30px 2px rgba(251, 191, 36, .55), 0 0 80px -10px rgba(249, 115, 22, .8); animation: fgReady 1.6s ease-in-out infinite; }
.forge-core.ready .fc-ring { opacity: 1; animation-duration: 1.2s; }
.forge-core.ready:hover { transform: translate(-50%, -50%) scale(1.05); }
@keyframes fgReady { 50% { box-shadow: 0 0 46px 6px rgba(251, 191, 36, .75), 0 0 110px -6px rgba(249, 115, 22, .9); } }

/* กำลังหลอม: วงหมุนเร็ว + การ์ดสั่น */
.forge-stage.charge .fg-spin { animation-duration: 2.2s; }
.forge-stage.charge .fg-spin.rev { animation-duration: 3s; }
.forge-stage.charge .forge-slot.full { animation: fgShake .18s linear infinite; }
.forge-stage.charge .forge-core { box-shadow: 0 0 60px 10px rgba(251, 191, 36, .8); }
@keyframes fgShake { 25% { translate: 1px -1px; } 50% { translate: -1px 1px; } 75% { translate: 1px 1px; } }
/* รวมการ์ด: 3 ใบพุ่งเข้ากลาง */
.forge-stage.merge .forge-slot { transform: translate(var(--tx), var(--ty)) scale(.35) rotate(25deg); opacity: 0; animation: none; }
.forge-stage.merge .forge-core { transform: translate(-50%, -50%) scale(1.25); box-shadow: 0 0 120px 40px rgba(253, 230, 138, .9); }
.forge-stage.merge::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, #fff7ed, rgba(251, 191, 36, .8) 40%, transparent 70%); animation: fgFlash .9s ease-out forwards; z-index: 4; pointer-events: none; }
@keyframes fgFlash { to { width: 140%; opacity: 0; } }
.forge-stage.reveal .forge-core { opacity: 0; }
.forge-stage.done .forge-slot { transform: none; opacity: 1; transition-duration: .3s; }

/* ตั๋วที่ได้ */
.forge-result { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; perspective: 900px; cursor: pointer; }
.forge-result[hidden] { display: none; }
.fg-ticket { position: relative; height: 58%; width: auto; aspect-ratio: 3 / 4; transform-style: preserve-3d; transition: transform .9s var(--ease-spring); transform: rotateY(180deg) scale(.6); }
.fg-ticket.flip { transform: rotateY(0) scale(1); }
.tk-face { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.tk-back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, #3b1d08 0 8px, #2a160b 8px 16px); border: 3px solid #cd7f32; font: 700 40px/1 inherit; color: #fbbf24; }
.tk-front { border: 3px solid #fde68a; color: #fff; text-align: center; padding: 10px; }
.tk-front small { font-size: 12px; opacity: .85; } .tk-front b { font-size: 22px; } .tk-front em { font-style: normal; font-size: 30px; font-weight: 800; }
.fg-ticket.gacha .tk-front { background: radial-gradient(circle at 50% 30%, #fbbf24, #c2410c 70%); box-shadow: 0 0 50px 6px rgba(251, 191, 36, .7); }
.fg-ticket.lucky .tk-front { background: radial-gradient(circle at 50% 30%, #4ade80, #15803d 70%); box-shadow: 0 0 50px 6px rgba(74, 222, 128, .65); border-color: #bbf7d0; }

/* การ์ดในกระเป๋าตอนเปิดห้องหลอม */
body.fusing-mode .icard.nofuse { opacity: .35; filter: grayscale(.7); }
body.fusing-mode .icard.fsel { outline: 3px solid #fbbf24; outline-offset: 2px; }

.forge-cf-list { text-align: left; margin: -8px 0 14px; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.forge-cf-ack { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 0 0 18px; font-size: 14px; cursor: pointer; }
.forge-cf-ack input { width: 20px; height: 20px; accent-color: #f97316; }
.forge-modal { max-width: 430px; }

@media (max-width: 860px) {
  .forge { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .forge-stage { width: min(100%, 360px); }
}
@media (prefers-reduced-motion: reduce) {
  .fg-spin, .fg-glow, .fg-arms path, .fc-ring, .forge-toggle::before, .forge-core.ready { animation: none; }
}

/* (26/10/2569 รอบ 2) ปุ่มห้องหลอม = ขนาดเท่าปุ่มส่งเข้าเกม สีทองแดง แยกห่าง · ไม่สั่น · ตั๋วลอยขึ้นมาเลย (ไม่พลิก) */
.claim-actions { gap: 10px; }
.btn-main.forge-toggle { height: 44px; padding: 0 22px; font-size: 16px; margin-right: 28px; border: 0; color: #fff7ed;
  background: linear-gradient(135deg, #b45309, #7c2d12); box-shadow: 0 12px 28px -10px rgba(180, 83, 9, .85); }
.btn-main.forge-toggle::before { display: none; }
.btn-main.forge-toggle[aria-pressed="true"] { background: linear-gradient(135deg, #7c2d12, #431407); box-shadow: 0 0 0 2px rgba(251, 191, 36, .6), 0 12px 28px -10px rgba(180, 83, 9, .85); }
@media (max-width: 640px) { .btn-main.forge-toggle { margin-right: 0; } }
.forge-stage.charge .forge-slot.full { animation: none; }
.fg-ticket, .fg-ticket.flip { transform: none; }
.fg-ticket .tk-back { display: none; }
.fg-ticket { opacity: 0; transform: translateY(60px) scale(.5); transition: transform .9s var(--ease-spring), opacity .5s; }
.fg-ticket.rise { opacity: 1; transform: translateY(0) scale(1); animation: fgFloat 3s ease-in-out .9s infinite; }
@keyframes fgFloat { 50% { translate: 0 -8px; } }
.forge-cf-warn { margin: 0 0 18px; color: #fca5a5; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .fg-ticket.rise { animation: none; } }

/* (26/10/2569 รอบ 3) ช่องหลอม 3 ช่องอยู่บนวงเดียวกัน ห่างจากกลางเท่ากันทุกช่อง (120 องศา) · ช่องบนสูงขึ้น · การ์ดทึบตามสีระดับ ไม่เห็นวงด้านหลัง */
.forge-stage { margin-top: 26px; margin-bottom: 8px; }
.forge-slot.s0 { left: 38.5%; top: -5.4%; --tx: 0%; --ty: 130%; }
.forge-slot.s1 { left: 3.9%; top: 54.6%; --tx: 150%; --ty: -65%; }
.forge-slot.s2 { left: 73.1%; top: 54.6%; --tx: -150%; --ty: -65%; }
.forge-slot { background: #0d0704; }
.forge-slot.full { background: linear-gradient(180deg, color-mix(in srgb, var(--rc, #cd7f32) 55%, #1a0e07) 0%, color-mix(in srgb, var(--rc, #cd7f32) 22%, #120804) 60%, #120804 100%); }

/* (26/10/2569 รอบ 4) เส้นแสงสีส้มวิ่งรอบขอบการ์ดในช่องหลอม · 3 ใบหมุนพร้อมกันจังหวะเดียว (ตอนกำลังหลอมหมุนเร็วขึ้น) */
@property --fga { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.forge-slot.full::before { content: ''; position: absolute; inset: -4px; border-radius: 16px; padding: 3px; pointer-events: none;
  background: conic-gradient(from var(--fga), transparent 0deg 200deg, rgba(249, 115, 22, .25) 250deg, #f97316 310deg, #fde68a 340deg, #f97316 352deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, .8)); animation: fgOrbit 3s linear var(--fgd, 0s) infinite; }
@keyframes fgOrbit { to { --fga: 360deg; } }
.forge-stage.charge .forge-slot.full::before { animation-duration: .9s; }
@media (prefers-reduced-motion: reduce) { .forge-slot.full::before { animation: none; } }
