/* ============================================================
   SEALX64 — Game landing: fullscreen hero art + clean sections
   ============================================================ */

:root {
  --bg:      #ffffff;
  --surface: #f6f8fa;
  --ink:     #0b1220;   /* เกือบดำ ใช้เป็นสีหลัก */
  --muted:   #5b6472;
  --line:    #e6e9ee;
  --blue:    #2563eb;   /* สีฟ้า ใช้เฉพาะจุดเน้น */
  --blue-2:  #1d4ed8;
  --blue-10: #eff4ff;
  --red:     #dc2626;
  --red-10:  #fef2f2;
  --green:   #16a34a;
  --green-10:#f0fdf4;
  --radius:  14px;
  --font-head: 'Anuphan', system-ui, sans-serif;
  --font-body: 'Anuphan', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* หน้าเนื้อหาสั้น: ดัน footer ให้ติดขอบล่างจอเสมอ ไม่ให้มีพื้นขาวโผล่ใต้ footer */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

/* หน้าเนื้อหาน้อย: ให้ section สุดท้ายยืดเต็มและจัดเนื้อหากึ่งกลางแนวตั้ง */
.main-fill { display: flex; flex-direction: column; }
.main-fill .section-fill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer { margin-top: auto; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .logo, .btn { font-family: var(--font-head); }

a { color: var(--blue); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* ปุ่มหลัก: glass แบบเดียวกับปุ่มดาวน์โหลด แต่ย้อมฟ้าให้เด่น */
.btn-primary {
  background: rgba(37, 99, 235, .42);
  color: #fff;
  border-color: rgba(150, 185, 255, .65);
  backdrop-filter: blur(8px);
}
.btn-primary:hover {
  background: rgba(37, 99, 235, .62);
  border-color: rgba(200, 220, 255, .9);
}
/* ในการ์ดโมดัลพื้นขาว ใช้แบบทึบให้อ่านชัด */
.modal-card .btn-primary {
  background: linear-gradient(135deg, #4f8df9 0%, #2563eb 55%, #1d4ed8 100%);
  border-color: transparent;
  backdrop-filter: none;
}
.modal-card .btn-primary:hover {
  background: linear-gradient(135deg, #3b7bf0 0%, #1d4ed8 55%, #1e40af 100%);
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1c2536; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-glass {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, .3); }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-lg { padding: 15px 32px; font-size: 1.1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.is-disabled { opacity: .55; pointer-events: none; }

/* ---------- Preloader ---------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  /* พกภาพพื้นหลัง + ม่านเฉดของตัวเอง — หน้าตาคงที่ทุกหน้า/ทุกการรีเฟรช ไม่ขึ้นกับสิ่งที่อยู่ข้างหลัง */
  background:
    linear-gradient(100deg,
      rgba(0, 0, 0, .94) 0%,
      rgba(0, 0, 0, .78) 40%,
      rgba(0, 0, 0, .42) 100%),
    url('/assets/img/bg_x64.jpg') center / cover no-repeat #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-logo {
  width: min(190px, 48vw);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6));
  animation: preFloat 2.4s ease-in-out infinite;
}
@keyframes preFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.pre-text {
  display: flex;
  align-items: baseline;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.pre-dots { margin-left: .3em; }
.pre-dots i { font-style: normal; animation: preDot 1.2s infinite; }
.pre-dots i:nth-child(2) { animation-delay: .2s; }
.pre-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes preDot {
  0%, 60%, 100% { opacity: .25; }
  30%           { opacity: 1; }
}
.pre-pct {
  margin-left: .9em;
  min-width: 3em; /* จองที่ให้เลข กันบรรทัดขยับตอนหลักเปลี่ยน */
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

/* ซ่อน navbar + เนื้อหาระหว่างโหลด แล้วเฟดขึ้นเมื่อพร้อม (app.js เติม .app-ready)
   ซ่อนเฉพาะเนื้อหา — พื้นหลังภาพ/สียังโชว์ทะลุม่าน loader ได้ */
.nav,
.hero .container,
.page-hero .container,
.section .container,
.section .container-wide {
  transition: opacity .65s ease .1s;
}
html:not(.app-ready) .nav,
html:not(.app-ready) .hero .container,
html:not(.app-ready) .page-hero .container,
html:not(.app-ready) .section .container,
html:not(.app-ready) .section .container-wide {
  opacity: 0;
}

/* ---------- Navbar (ลอยโปร่งใสบนภาพ hero) ---------- */
.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 84px;
}
.logo { display: inline-flex; align-items: center; }
.logo img {
  height: 62px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .4));
}
.logo-invert { color: #fff; font-weight: 700; font-size: 1.1rem; }
.logo-invert span { color: #7ea8ff; }

.nav-links { display: flex; gap: 22px; margin-right: auto; }
.nav-links a {
  color: rgba(255, 255, 255, .85);
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}
.nav-links a:hover { color: #fff; }

.nav-links a.active { color: #fff; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}
.nav .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(11, 18, 32, .2);
}
.nav .btn-ghost:hover { border-color: #fff; background: rgba(11, 18, 32, .4); }

/* เมนูบัญชีผู้ใช้ (ชื่อไอดี + ลูกศร → เมนูเลือกการทำงาน) */
.user-menu { position: relative; }
.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] .lang-caret { transform: rotate(180deg); }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(6px);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font-body);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.user-chip:hover {
  background: rgba(255, 255, 255, .3);
  border-color: rgba(255, 255, 255, .5);
}
.user-chip .lang-caret { transition: transform .2s ease; }

.um-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 18, 32, .18);
  min-width: 200px;
  padding: 6px;
  z-index: 60;
}
.um-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
}
.um-item svg { color: var(--muted); flex-shrink: 0; }
a.um-item:hover { background: var(--surface); }
a.um-item:hover svg { color: var(--blue); }
.um-soon {
  margin-left: auto;
  font-style: normal;
  font-size: .62rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
}

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang-flag {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}
.lang-menu .lang-flag { box-shadow: 0 0 0 1px var(--line); }
.lang summary .lang-caret { transition: transform .2s ease; }
.lang[open] summary .lang-caret { transform: rotate(180deg); }
.lang summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  padding: 8px 10px;
  border-radius: 10px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .45);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 18, 32, .18);
  min-width: 140px;
  padding: 6px;
  z-index: 60;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
}
.lang-menu a:hover { background: var(--surface); }
.lang-menu a.active { color: var(--blue); font-weight: 600; }

/* ---------- Hero (เต็มจอ ภาพเกมเป็นพื้นหลัง) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px 0 70px;
  /* ชั้นบน: ภาพเกม / ชั้นล่าง: เทาไล่เฉดโชว์ระหว่างภาพยังโหลดไม่เสร็จ */
  background:
    url('/assets/img/bg_x64.jpg') center / cover no-repeat,
    linear-gradient(100deg, #000000 0%, #181818 45%, #333333 100%);
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(11, 18, 32, .45) 0%,
    rgba(11, 18, 32, .1) 42%,
    rgba(11, 18, 32, .55) 100%);
}
.hero .container { position: relative; }

.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  animation: heroSway 6s ease-in-out infinite; /* โยกช้าๆ นุ่มๆ ตลอดเวลา */
}
.hero-logo {
  display: block;
  width: min(400px, 70vw);
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .5));
}
/* แสงเหลือบ — แถบแสงเฉียงกวาดจากมุมซ้ายล่างไปมุมขวาบน ทับเฉพาะเนื้อโลโก้ (mask เป็นรูปโลโก้เอง) */
.hero-logo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(55deg,
    transparent 42%,
    rgba(255, 255, 255, .55) 48%,
    rgba(255, 255, 255, .95) 50%,
    rgba(255, 255, 255, .55) 52%,
    transparent 58%);
  background-size: 300% 300%;
  background-position: 100% 100%;
  -webkit-mask: url('/assets/img/logo_sealx64_classic.png') center / contain no-repeat;
  mask: url('/assets/img/logo_sealx64_classic.png') center / contain no-repeat;
  opacity: 0;
  animation: heroGlint 8s linear infinite;
}
@keyframes heroSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-7px) rotate(.6deg); }
  50%      { transform: translateY(0) rotate(0deg); }
  75%      { transform: translateY(-7px) rotate(-.6deg); }
}
/* นิ่งเกือบทั้งรอบ แล้วกวาดแสงหนึ่งจังหวะ (~1.2 วิ) opacity กันแสงย้อนกลับตอนวนรอบ */
@keyframes heroGlint {
  0%, 79%   { background-position: 100% 100%; opacity: 0; }
  81%       { opacity: 1; }
  92%       { opacity: 1; }
  94%, 100% { background-position: 0% 0%; opacity: 0; }
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ---------- Countdown ---------- */
.countdown { margin: 4px 0 28px; }
.countdown-title {
  display: inline-block;
  position: relative;
  padding: 9px 30px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: .4em;
  text-indent: .4em; /* ชดเชย letter-spacing ให้กึ่งกลางจริง */
  color: #e8e4d8;
  border: 1px solid rgba(201, 168, 76, .3);
  background: linear-gradient(135deg,
    rgba(181, 148, 56, .2) 0%,
    rgba(120, 90, 20, .12) 40%,
    rgba(30, 28, 22, .9) 100%);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  margin-bottom: 16px;
}
/* ขอบทองไหลวนรอบป้าย */
.countdown-title::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 168, 76, .8) 50%,
    transparent 100%) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 200% 100%;
  animation: borderFlow 4s linear infinite;
  pointer-events: none;
}
@keyframes borderFlow {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 2.2vw, 20px);
}
.cd-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cd-num {
  display: inline-block;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}
.cd-num.tick { animation: cdTick .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes cdTick {
  0%   { transform: translateY(-.4em); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
.cd-label {
  margin-top: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.cd-colon {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  padding-top: .08em;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Page hero (แบนเนอร์หัวหน้าใน เช่น ข่าว/Wiki) ---------- */
.page-hero {
  position: relative;
  padding: 150px 0 60px;
  text-align: center;
  color: #fff;
  background:
    url('/assets/img/bg_x64.jpg') center / cover no-repeat,
    linear-gradient(100deg, #000000 0%, #181818 45%, #333333 100%);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, .66);
}
.page-hero .container { position: relative; }
.page-title {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.page-sub {
  color: rgba(255, 255, 255, .82);
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); }
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
}
.section-sub {
  color: var(--muted);
  text-align: center;
  margin: 8px 0 42px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 10px 30px rgba(11, 18, 32, .07);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-10);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.925rem; }

/* ---------- ป้ายหมวด (tag) ---------- */
.tag {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 6px;
}
.tag-announce { background: var(--ink); }
.tag-update   { background: var(--blue); }
.tag-event    { background: #b08a2e; }
.tag-soon     { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* ---------- หน้า Wiki ---------- */
.wiki-card { display: block; color: var(--ink); }
.wiki-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.wiki-icon { font-size: 1.9rem; line-height: 1; }
.wiki-soon { opacity: .75; }
.wiki-soon:hover { transform: none; box-shadow: none; }

/* ---------- Footer: full-width light gray with grayscale logo ---------- */
.footer {
  background: #e5e5e5;
  color: #171717;
  padding: 44px 0 48px;
  text-align: center;
  font-size: 0.875rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.footer-links a { color: #171717; }
.footer-links a:hover { color: #000; }
.footer-links .sep { color: #717171; }
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-bottom: 26px;
}
.footer-social a {
  color: #171717;
  transition: color .15s, transform .15s;
}
.footer-social a:hover {
  color: #000;
  transform: translateY(-2px);
}

.footer-logo {
  height: 64px;
  width: auto;
  opacity: 1;
  filter: grayscale(100%);
  margin-bottom: 20px;
}
.footer .copy {
  font-size: 0.8rem;
  color: #171717;
}

/* ปุ่มแถว CTA หน้าแรก — จัดไอคอน+ข้อความให้อยู่กลางเสมอกัน */
.cta-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

/* ---------- กิจกรรม Like & Share (ธีมทองแบบ CLOSE BETA) ---------- */
.btn-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #f0e6c8;
  border: 1px solid rgba(201, 168, 76, .5);
  background: linear-gradient(135deg,
    rgba(181, 148, 56, .38) 0%,
    rgba(120, 90, 20, .24) 40%,
    rgba(30, 28, 22, .94) 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 0 14px rgba(201, 168, 76, .15);
  transition: filter .15s, border-color .15s, transform .15s;
}
.btn-event:hover {
  border-color: rgba(232, 205, 128, .85);
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ปุ่มในป๊อปอัปผลลัพธ์ (การ์ดขาว) — ฟ้าธีมเว็บ */
.ev-boxpop-card .btn-event {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #5aa8ff 0%, #2f7fe0 55%, #1f63bd 100%);
  box-shadow: 0 4px 14px rgba(47, 127, 224, .35);
}
.ev-boxpop-card .btn-event:hover {
  filter: brightness(1.08);
  transform: none;
}
.ev-boxpop-card .btn-event:disabled {
  filter: saturate(.35);
  opacity: .75;
  cursor: not-allowed;
}

/* ปุ่มทองเวอร์ชันพื้นสว่าง (ในโมดัลการ์ดขาว) — ทองทึบ ไม่มีเฉดดำ */
.modal-card .btn-event {
  color: #3d2e08;
  border: 1px solid rgba(150, 118, 42, .55);
  background: linear-gradient(180deg, #f0dc9a 0%, #ddbd68 55%, #c9a84c 100%);
  box-shadow: 0 4px 14px rgba(160, 128, 40, .35);
}
.modal-card .btn-event:hover {
  border-color: rgba(150, 118, 42, .8);
  filter: brightness(1.05);
  transform: none;
}
.modal-card .btn-event:disabled {
  filter: saturate(.35);
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}

/* โมดัล — การ์ดขาว ตัวหนังสือโทนดำทั้งหมด accent สีทอง (แนวตั้งคอลัมน์เดียว) */
.modal-card.ev-card { width: min(560px, calc(100vw - 32px)); max-width: 560px; }
/* สกอลบาร์เส้นบางเข้าธีม (ตอนเนื้อหาเกินความสูงจอ) */
.ev-card::-webkit-scrollbar { width: 6px; }
.ev-card::-webkit-scrollbar-track { background: transparent; }
.ev-card::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, .45); border-radius: 99px; }
.ev-card::-webkit-scrollbar-thumb:hover { background: rgba(150, 118, 42, .65); }
.ev-head { text-align: center; margin-bottom: 6px; }
.ev-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
}
.ev-period {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: #fdfaf1;
  border: 1px solid rgba(201, 168, 76, .55);
  font-size: .85rem;
  font-weight: 700;
  color: #6b5417;
}
.ev-period .ev-tz {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted);
}
.ev-sub {
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 6px;
}
.ev-post-link {
  text-align: center;
  margin: 0 0 16px;
  font-size: .82rem;
  word-break: break-all;
}
.ev-post-link a { color: var(--blue); text-decoration: underline; }
.ev-reward-head {
  text-align: center;
  padding: 8px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(135deg, #e8cd80, #c9a84c 55%, #96762a);
  color: #3d2e08;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.ev-rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 10px 10px;
  margin-bottom: 14px;
}
.ev-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}
/* กรอบรูปไอเทมสไตล์คลาสสิก — พื้นกระดาษเก่า + วงแหวนทองซ้อน + เงาด้านใน */
.ev-item-frame {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: #fbf5e4;
  border: 1px solid #d9c79a;
  border-radius: 6px;
  box-shadow:
    0 0 0 3px rgba(201, 168, 76, .2),
    inset 0 1px 4px rgba(90, 70, 20, .18);
}
.ev-item-frame img { width: 34px; height: 34px; object-fit: contain; }
.ev-item-name { flex: 1; font-size: .9rem; font-weight: 600; color: var(--ink); }
/* รายการที่เป็นกล่อง — กดกางดูของด้านในได้ */
.ev-openable { cursor: pointer; transition: border-color .15s, background .15s; }
.ev-openable:hover { border-color: rgba(201, 168, 76, .6); background: #fdfaf1; }
.ev-caret { display: inline-flex; color: var(--muted); transition: transform .2s ease; }
.ev-openable.open .ev-caret { transform: rotate(180deg); }
/* ป๊อปอัปซ้อน — ของด้านในกล่องรางวัล (ลอยทับโมดัลกิจกรรม) */
.ev-boxpop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ev-boxpop[hidden] { display: none; }
.ev-boxpop-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 55%);
  animation: evFadeIn .2s ease;
}
.ev-boxpop-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: min(520px, calc(100vw - 40px));
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(11, 18, 32, .4);
  animation: evPopIn .24s ease;
}
.ev-boxpop-card::-webkit-scrollbar { width: 6px; }
.ev-boxpop-card::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, .45); border-radius: 99px; }
@keyframes evFadeIn { from { opacity: 0; } }
@keyframes evPopIn {
  from { opacity: 0; transform: translateY(14px) scale(.94); }
}
.ev-boxpop-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 14px;
}

/* ของในกล่อง — ตารางการ์ดจิ๋ว */
.ev-box-contents {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px dashed rgba(201, 168, 76, .5);
  border-radius: 8px;
  background: #fdfbf5;
}
.ev-item-sub {
  flex-direction: column;
  text-align: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 6px 8px;
  background: #fff;
}
.ev-item-sub .ev-item-frame { width: 42px; height: 42px; }
.ev-item-sub .ev-item-frame img { width: 30px; height: 30px; }
.ev-item-sub .ev-item-name { font-size: .74rem; line-height: 1.3; font-weight: 600; }
.ev-item-sub .ev-item-qty { font-size: .72rem; padding: 2px 9px; }
@media (max-width: 480px) {
  .ev-box-contents { grid-template-columns: repeat(2, 1fr); }
}
.ev-item-qty {
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(201, 168, 76, .16);
  border: 1px solid rgba(201, 168, 76, .55);
  color: #6b5417;
  font-size: .8rem;
  font-weight: 700;
}
.ev-loading { text-align: center; padding: 10px; }
.ev-loading span {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, .12);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: evSpin .8s linear infinite;
}
@keyframes evSpin { to { transform: rotate(360deg); } }
.ev-status {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.ev-status-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 9px;
}
.ev-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
/* จุดสีนำหน้า — เห็นปุ๊บรู้สถานะทันที */
.ev-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
/* สีแยกตามสถานะ: ส้ม=รอตรวจ ฟ้า=ตรวจแล้ว เขียว=ได้ของ แดง=ปฏิเสธ */
.ev-st-NO       { background: rgba(249, 115, 22, .12); border: 1px solid rgba(194, 96, 14, .5);   color: #c2600e; }
.ev-st-CHECKED  { background: rgba(77, 163, 255, .12); border: 1px solid rgba(29, 111, 216, .45); color: #1d6fd8; }
.ev-st-YES      { background: rgba(46, 204, 113, .12); border: 1px solid rgba(30, 142, 78, .45);  color: #1e8e4e; }
.ev-st-REJECTED { background: rgba(231, 76, 60, .1);   border: 1px solid rgba(192, 57, 43, .45);  color: #c0392b; }
.ev-reject {
  margin-top: 9px;
  padding: 7px 11px;
  border-left: 3px solid #c0392b;
  border-radius: 0 8px 8px 0;
  background: rgba(231, 76, 60, .07);
  font-size: .8rem;
  color: #c0392b;
}

/* ---------- เตาปฏิกรณ์ ---------- */
.rx-wrap {
  width: 100%;
  max-width: 1560px; /* กว้างเท่าโซนเนื้อหา wiki */
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.rx-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 12px 0 6px;
}
/* ป้ายพอยต์ใน header (โชว์ตอน login) — โทนฟ้าธีมเว็บ */
.nav-point {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(77, 163, 255, .16);
  border: 1px solid rgba(77, 163, 255, .5);
  color: #8fc2ff;
  font-size: .85rem;
}
.nav-point b { font-weight: 700; color: #fff; }
/* ออกจากระบบในเมนูบัญชี — คั่นเส้น + โทนแดง */
.um-item.um-logout {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 4px;
  padding-top: 10px;
  color: #ff9b8f;
}
.um-item.um-logout:hover { color: #ff7a6b; }
.rx-gif {
  width: 456px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(255, 120, 20, .25));
  transition: filter .3s ease;
}
.rx-next { color: #e8cd80; font-weight: 700; font-size: .9rem; letter-spacing: .05em; min-height: 1.2em; }
/* ป้ายสะเก็ดไฟสะสม — มุมขวาบนของโซนเตา */
.rx-ember-chip {
  position: absolute;
  top: 6px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: .94rem;
}
.rx-ember-chip b { font-weight: 700; color: #fff; }
.rx-ember-ic { width: 18px; height: 18px; }
/* บรรทัดแจ้งได้สะเก็ดไฟในป๊อปอัปเตาแตก */
.rx-ember-gain {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 110, 40, .12);
  border: 1px solid rgba(255, 110, 40, .45);
  color: #c2600e;
  font-size: .85rem;
  font-weight: 700;
}
.rx-alert {
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(231, 76, 60, .15);
  border: 1px solid rgba(231, 76, 60, .5);
  color: #ff9b8f;
  font-size: .85rem;
}
.rx-ignite-btn { min-width: 240px; border-radius: 0; } /* ปุ่มเหลี่ยม ไม่มีขอบมน */
/* ตอนกำลังลุ้น — gif เร่งไฟ + สั่น */
.rx-burning .rx-gif {
  filter: brightness(1.35) saturate(1.4) drop-shadow(0 10px 40px rgba(255, 120, 20, .6));
  animation: rxShake .15s linear infinite;
}
.rx-burning .rx-ignite-btn { pointer-events: none; opacity: .6; }
@keyframes rxShake {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(1.5px, -1px); }
  50%      { transform: translate(-1px, 1px); }
  75%      { transform: translate(1px, 1.5px); }
}
/* การ์ดระดับ — 3×3 ต่อระดับ เรียงซ้าย→ขวา ไม่มีสกอลบาร์ (จอแคบไหลลงแถวใหม่เอง) */
.rx-levels {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}
.rx-level {
  flex: 1 0 272px;
  min-width: 272px;
  padding: 12px;
  border-radius: 14px; /* ขอบมนแบบเดิม */
  background: rgba(10, 10, 14, .5);
  border: 1px solid rgba(255, 255, 255, .3);
}
/* ระดับที่กำลังเล่น — เส้นขอบขาวสว่าง + เรืองรอบนอก */
.rx-level.active {
  border-color: rgba(255, 255, 255, .85);
  box-shadow: 0 0 18px rgba(255, 255, 255, .18);
}
/* ระดับที่ยังไปไม่ถึง — ล็อกเทาเฉพาะรายการไอเทม + รูปกุญแจทับกลาง หัวการ์ดยังอ่านชัด */
.rx-grid-box { position: relative; }
.rx-level.locked .rx-grid {
  filter: grayscale(.85);
  opacity: .35;
}
.rx-lock-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6));
}
.rx-level-head {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap; /* บังคับบรรทัดเดียว */
  margin-bottom: 10px;
}
.rx-level-name { font-weight: 800; color: #fff; margin-right: auto; }
.rx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.rx-badge-cost  { background: rgba(201, 168, 76, .16); border: 1px solid rgba(201, 168, 76, .5); color: #e8cd80; }
.rx-badge-break { background: rgba(231, 76, 60, .14);  border: 1px solid rgba(231, 76, 60, .5);  color: #ff9b8f; }
/* ช่องไอเทม 3×3 ครบ 9 ช่องเสมอ */
.rx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.rx-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  min-width: 0;
}
/* ช่องไอเทมในระดับ — ขอบมน + ล็อกความสูงตายตัว ทุกช่องเท่ากันเป๊ะ */
.rx-level .rx-item {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  height: 112px;
}
.rx-item-name {
  font-size: .68rem;
  line-height: 1.25;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
  white-space: nowrap;      /* ชื่อบรรทัดเดียว เกินตัดเป็น … */
  overflow: hidden;
  text-overflow: ellipsis;
}
.rx-level .rx-item-name { color: rgba(255, 255, 255, .85); }
/* จำนวน — ตัวหนังสือเปล่าๆ ไม่มีพื้นหลัง ไม่เบียดชื่อไอเทม */
.rx-level .ev-item-qty {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255, 255, 255, .7);
  font-size: .72rem;
  font-weight: 700;
}
.rx-item-empty { border: 1px dashed rgba(255, 255, 255, .12) !important; background: transparent !important; }
/* โอกาสเตาระเบิด — กลางใต้ตารางไอเทม ไม่มีพื้นหลัง ไอคอนใหญ่เห็นชัด */
.rx-break-line { display: flex; justify-content: center; margin-top: 10px; }
.rx-break-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ff9b8f;
  font-size: .82rem;
  font-weight: 700;
}
/* รูเล็ตตอนสุ่ม — ธีมขาว: ช่องที่ไฟวิ่งถึงสว่างเด้งขึ้น ช่องอื่นหรี่ลงเหมือนสปอตไลต์กวาด */
.rx-level .rx-item { transition: opacity .15s ease, transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease; }
.rx-grid.rx-rolling .rx-item:not(.rolling) {
  opacity: .4;
  filter: grayscale(.5);
}
.rx-level .rx-item.rolling {
  border-color: #fff;
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 0 16px rgba(255, 255, 255, .5);
  transform: scale(1.07);
}
/* ป๊อปอัปผลลัพธ์ (การ์ดขาว) */
.rx-pop-card { text-align: center; width: min(420px, calc(100vw - 40px)); }
.rx-pop-title { font-weight: 800; font-size: 1.25rem; margin-bottom: 14px; }
.rx-win   { color: #8a6d1f; }
.rx-claimed { color: #000; }
.rx-broke { color: #c0392b; }
.rx-pop-text { color: var(--muted); font-size: .9rem; }
.rx-pop-warn { font-size: .78rem; color: #dc2626; margin: 12px 0 0; }
.rx-pop-btns { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.rx-item-big { margin: 0 auto; }
.rx-item-big .ev-item-frame { width: 64px; height: 64px; }
.rx-item-big .ev-item-frame img { width: 48px; height: 48px; }
.rx-item-big .rx-item-name { font-size: .95rem; }
.rx-go { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.rx-go:hover { border-color: var(--muted); }

/* จอมือถือ — จัดโซนเตาให้เรียบร้อย */
@media (max-width: 700px) {
  .rx-wrap { gap: 20px; }
  /* ป้ายสะเก็ดไฟเลิกลอย — อยู่ในผังปกติชิดขวา ไม่ทับ GIF */
  .rx-ember-chip {
    position: static;
    align-self: flex-end;
    font-size: .8rem;
    padding: 5px 11px;
  }
  .rx-ignite-btn { width: 100%; min-width: 0; }
  .rx-level { flex-basis: 100%; min-width: 0; }
  /* ป้ายพอยต์ใน header ย่อ ไม่เบียดปุ่มออกจากระบบ */
  .nav-point { padding: 4px 9px; font-size: .76rem; gap: 4px; }
}

/* ---------- MessageBox กลาง (SW.messageBox / SW.confirm / SW.alert) ---------- */
.sw-dialog {
  --message-color: #2563eb;
  --message-tint: #eff6ff;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.sw-dialog[hidden] { display: none; }
.sw-dialog[data-type="success"] { --message-color: #16a064; --message-tint: #ecfdf3; }
.sw-dialog[data-type="error"] { --message-color: #dc3545; --message-tint: #fff1f2; }
.sw-dialog[data-type="warning"] { --message-color: #b77912; --message-tint: #fffbeb; }
.sw-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 62%);
  backdrop-filter: blur(4px);
  animation: evFadeIn .18s ease;
}
.sw-dialog-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 22px;
  padding: 34px 30px 28px;
  width: min(420px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 24px 64px rgba(11, 18, 32, .4);
  animation: evPopIn .22s ease;
}
.sw-dialog-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--message-tint);
  color: var(--message-color);
}
.sw-dialog-icon svg { width: 38px; height: 38px; }
.sw-dialog-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.sw-dialog-msg {
  margin: 0 0 26px;
  font-size: .94rem;
  line-height: 1.75;
  color: #64748b;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.sw-dialog-btns { display: flex; gap: 10px; }
.sw-dialog-btns .btn { flex: 1; min-height: 44px; border-radius: 11px; }
.sw-dialog-btns .btn-primary { background: linear-gradient(110deg, #3b82f6, #1552df); border-color: transparent; color: #fff; }
.sw-dialog-btns .btn-primary:hover { background: linear-gradient(110deg, #2563eb, #1648c5); }
.sw-dialog-btns .btn-ghost { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.sw-dialog-btns .btn:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
@media (max-width: 480px) {
  .sw-dialog-card { padding: 28px 22px 22px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-dialog-card, .sw-dialog-backdrop { animation: none; }
}

/* ---------- ปุ่มเปิดร้าน (ใต้ป้ายสะเก็ดไฟ ในหน้าเตา) ---------- */
.rx-shop-btn {
  position: absolute;
  top: 52px; /* ห่างจากป้ายสะเก็ดไฟมากขึ้น */
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  /* คนละสีกับป้ายสะเก็ดไฟ — โทนฟ้าธีมเว็บ */
  background: rgba(77, 163, 255, .16);
  border: 1px solid rgba(77, 163, 255, .5);
  color: #bcd9ff;
  font-family: var(--font-body);
  font-size: .94rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.rx-shop-btn:hover { background: rgba(77, 163, 255, .26); border-color: rgba(77, 163, 255, .75); transform: translateY(-1px); }
@media (max-width: 700px) {
  .rx-shop-btn { position: static; align-self: flex-end; }
}

/* ---------- ร้านค้าแลกแต้ม (ป๊อปอัป) ---------- */
.shop-card { width: min(820px, calc(100vw - 40px)); text-align: left; }
.shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-right: 34px; /* เว้นที่ให้ปุ่มกากบาท ไม่ให้ทับป้ายแต้ม */
}
.shop-title { margin: 0; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.shop-balance {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 110, 40, .12);
  border: 1px solid rgba(255, 110, 40, .45);
  color: #c2600e;
  font-size: .85rem;
  font-weight: 600;
}
.shop-balance b { color: #a2470a; }
/* รายการร้าน — การ์ดกว้างตายตัว 180px เรียงซ้ายไปขวา เต็มแถวขึ้นบรรทัดใหม่เอง */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  justify-content: center;
  gap: 10px;
  max-height: 64vh;
  overflow-y: auto;
  padding-right: 4px;
}
@media (max-width: 800px) { .shop-grid { grid-template-columns: repeat(3, 180px); } }
@media (max-width: 620px) { .shop-grid { grid-template-columns: repeat(2, 160px); } }
@media (max-width: 400px) { .shop-grid { grid-template-columns: 1fr; } }
.shop-grid::-webkit-scrollbar { width: 6px; }
.shop-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.shop-cell {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 10px 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.shop-cell.out { opacity: .6; }
.shop-cell-img { position: relative; width: 54px; height: 54px; }
.shop-cell-img img { width: 42px; height: 42px; }
.shop-item-qty {
  position: absolute;
  top: -5px;
  left: -5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: .66rem;
  font-weight: 700;
}
/* ชื่อไอเทม — บรรทัดเดียว เกินตัด … */
.shop-cell-name {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .76rem;
  font-weight: 600;
  color: var(--ink);
}
/* ราคา — ไอคอนไฟ + เลข */
.shop-cell-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .95rem;
  font-weight: 800;
  color: var(--ink);
}
.shop-cell-cost.short { color: #c0392b; } /* แต้มไม่พอ = แดง */
.shop-ember-ic { width: 17px; height: 17px; flex-shrink: 0; }
/* ปุ่มแลก — ธีมฟ้าแบบปุ่มร้านค้าแลกแต้ม เหลี่ยมไม่มีขอบมน */
.shop-buy {
  width: 100%;
  padding: 7px 8px;
  border-radius: 0;
  background: rgba(77, 163, 255, .14);
  border: 1px solid rgba(77, 163, 255, .55);
  color: #1d6fd8;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.shop-buy:hover { background: rgba(77, 163, 255, .24); border-color: rgba(77, 163, 255, .8); }
.shop-buy:disabled {
  background: rgba(0, 0, 0, .05);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.shop-remain { font-size: .68rem; color: var(--muted); font-weight: 600; }
.shop-remain.out { color: #c0392b; }
.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 30px 10px;
  font-size: .9rem;
}

/* ---------- Custom select เข้าธีม ---------- */
.nsel { position: relative; display: inline-block; }
.nsel > select { display: none !important; }
.nsel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.nsel-btn:hover { border-color: var(--muted); }
.nsel-caret { display: inline-flex; opacity: .6; transition: transform .2s ease; }
.nsel.open .nsel-caret { transform: rotate(180deg); }
.nsel-list {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 90;
  min-width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(11, 18, 32, .18);
  padding: 5px;
}
.nsel-list::-webkit-scrollbar { width: 6px; }
.nsel-list::-webkit-scrollbar-track { background: transparent; }
.nsel-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.nsel-list::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.nsel-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.nsel-opt:hover { background: var(--surface); }
.nsel-opt.sel { color: var(--ink); background: var(--surface); font-weight: 700; }

/* โหมดมืด (หน้า wiki/ranking) */
body.wiki-dark .nsel-btn {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .3);
  color: #fff;
}
body.wiki-dark .nsel-btn:hover { border-color: rgba(255, 255, 255, .6); }
body.wiki-dark .nsel-list {
  background: #252525;
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
}
body.wiki-dark .nsel-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); }
body.wiki-dark .nsel-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .45); }
body.wiki-dark .nsel-opt { color: rgba(255, 255, 255, .85); }
body.wiki-dark .nsel-opt:hover { background: rgba(255, 255, 255, .1); color: #fff; }
body.wiki-dark .nsel-opt.sel { color: #fff; background: rgba(255, 255, 255, .16); }

/* ปุ่มแบบแคปซูล (หน้า ranking) */
.nsel-btn.rank-job { border-radius: 999px; padding: 9px 16px; font-weight: 600; }

/* ตัวเลือกตีบวกในหัวข้อสเตตัส — ขนาดกะทัดรัดเท่าของเดิม */
.wk-stats-head .nsel-btn { padding: 5px 12px; font-size: .8rem; border-radius: 8px; font-weight: 600; }

/* ในโมดัลการ์ดขาว (เช่นตัวเลือกตีบวก) กลับเป็นโทนสว่าง */
body.wiki-dark .wk-modal-card .nsel-btn { background: #fff; border-color: var(--line); color: var(--ink); }
body.wiki-dark .wk-modal-card .nsel-list { background: #fff; border-color: var(--line); box-shadow: 0 12px 32px rgba(11, 18, 32, .18); }
body.wiki-dark .wk-modal-card .nsel-list::-webkit-scrollbar-thumb { background: var(--line); }
body.wiki-dark .wk-modal-card .nsel-opt { color: var(--ink); }
body.wiki-dark .wk-modal-card .nsel-opt:hover { background: var(--surface); }
body.wiki-dark .wk-modal-card .nsel-opt.sel { color: var(--ink); background: var(--surface); }

/* ---------- หน้าจัดอันดับ ---------- */
.rank-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.rank-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.rank-tab {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: rgba(255, 255, 255, .85);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}
.rank-tab:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.rank-tab.active {
  background: rgba(255, 255, 255, .3);
  border-color: rgba(255, 255, 255, .75);
  color: #fff;
}
.rank-job {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}
.rank-job:focus { border-color: rgba(255, 255, 255, .6); }
.rank-job option { background: #12161f; color: #fff; }
.rank-card {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 16px;
  padding: 18px 24px 22px;
}
.rank-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.rank-updated { color: rgba(255, 255, 255, .55); font-size: .78rem; }
.rank-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}
.rank-table th {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .5);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.rank-table td {
  padding: 6px 10px;
  height: 64px; /* สูงเท่ากันทุกแถว ทั้งแถวที่มี/ไม่มีตรากิลด์ */
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.rank-table tr:last-child td { border-bottom: none; }
.rk-num { width: 52px; font-weight: 800; }
/* เหรียญอันดับ 1-3 */
.rk-medal {
  width: 34px;
  height: 34px;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}
.rk-medal text { font-family: var(--font-body); }
.rk-right, .rank-table th.rk-right { text-align: right; }
.rk-name { font-weight: 600; }
.rk-job, .rk-guild { color: rgba(255, 255, 255, .75); }
/* ตรากิลด์ — รูป 3 ชั้นซ้อนในกรอบเดียว */
.rk-mark {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 52px;
  margin-right: 12px;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.rk-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: -webkit-optimize-contrast;
}
.rk-fame { font-weight: 700; color: #ffd76a; }
.rk-dim { color: rgba(255, 255, 255, .3); }
.rank-empty { text-align: center; color: rgba(255, 255, 255, .55); padding: 30px 0 !important; }

/* Top 3 ไฮไลต์ ทอง-เงิน-ทองแดง */
.rank-top td { font-size: .95rem; }
.rank-top-1 { background: linear-gradient(90deg, rgba(255, 200, 60, .16), transparent 70%); }
.rank-top-2 { background: linear-gradient(90deg, rgba(200, 210, 225, .13), transparent 70%); }
.rank-top-3 { background: linear-gradient(90deg, rgba(205, 130, 70, .14), transparent 70%); }

.rank-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.rank-page-info { color: rgba(255, 255, 255, .7); font-size: .85rem; }

@media (max-width: 700px) {
  .rank-card { padding: 14px 10px 16px; }
  .rank-table td, .rank-table th { padding: 8px 6px; font-size: .8rem; }
  .rank-table td { height: 48px; }
  .rk-mark { width: 32px; height: 32px; margin-right: 6px; }
  .rk-medal { width: 26px; height: 26px; }
  .rk-job { display: none; } /* จอเล็กตัดคอลัมน์อาชีพ */
  .rank-table th:nth-child(3) { display: none; }
}

/* ---------- Modal (จัดกึ่งกลางจอทั้งแนวตั้ง-แนวนอน) ---------- */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .65);
}
.modal-card {
  position: relative;
  background: #fff;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 24px 64px rgba(11, 18, 32, .25);
  max-height: 86vh;
  overflow-y: auto;
}
.modal-card h2 { font-size: 1.4rem; font-weight: 700; }
.modal-sub { color: var(--muted); font-size: 0.9rem; margin: 4px 0 20px; }
.modal-x {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-x:hover { color: var(--ink); }
.modal-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 16px;
}

/* ---------- หน้าต่างดาวน์โหลด (ป้ายดำสไตล์ Store badge) ---------- */
.dl-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: #17181c;
  border: 1px solid #2c2e34;
  border-radius: 14px;
  color: #fff;
  transition: border-color .15s, background .15s, transform .12s;
}
.dl-link:hover {
  border-color: rgba(120, 170, 255, .7);
  background: #1e2028;
  transform: translateY(-1px);
}
.dl-icon { width: 32px; height: 32px; flex-shrink: 0; color: #fff; }
.dl-text { display: flex; flex-direction: column; line-height: 1.3; }
.dl-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: #fff;
}
.dl-sub { font-size: .8rem; font-weight: 600; color: #4da3ff; }
.dl-sub-soon { color: #8a8f99; }
.dl-disabled { opacity: .6; cursor: default; }
.dl-disabled:hover { border-color: #2c2e34; background: #17181c; transform: none; }

/* สเปคเครื่องใต้ปุ่มดาวน์โหลด */
.dl-specs { margin-top: 22px; }
.dl-specs-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.dl-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.dl-specs-table th {
  text-align: left;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  padding: 7px 10px;
}
.dl-specs-table th:first-child { border-radius: 8px 0 0 8px; }
.dl-specs-table th:last-child { border-radius: 0 8px 8px 0; }
.dl-specs-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.dl-specs-table tr:last-child td { border-bottom: none; }
.dl-spec-label { font-weight: 700; color: var(--muted); }

/* ---------- Forms ---------- */
form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
}
form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-10);
}
form small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.775rem;
  margin-top: 4px;
}
form .btn { margin-top: 6px; }
.cf-turnstile { margin-bottom: 14px; }

.alert {
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 14px;
  background: var(--red-10);
  color: var(--red);
  border: 1px solid #fecaca;
}
.alert.success {
  background: var(--green-10);
  color: var(--green);
  border-color: #bbf7d0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .nav-inner { height: 72px; }
  .logo img { height: 48px; }
  .hero { padding: 96px 0 56px; }
  .page-hero { padding: 120px 0 48px; }

  /* เมนูมือถือ: ซ่อนลิงก์ไว้ กดปุ่ม ☰ เพื่อกางลงมา */
  .nav-toggle { display: block; order: 2; margin-left: auto; }
  .nav-actions { order: 3; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: rgba(10, 10, 10, .96);
    padding: 10px 24px 16px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 1rem; }
}

@media (max-width: 520px) {
  .cd-num { font-size: 1.9rem; }
  .cd-colon { font-size: 1.6rem; }
  .cd-label { font-size: 0.55rem; letter-spacing: .12em; }
}


/* ---------- SEALX64 floating navigation ---------- */
.nav { top: 20px; padding: 0 20px; }
.nav-inner {
  position: relative;
  height: 80px;
  background: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
  color: #171717;
}
.nav .logo img { filter: none; }
.nav-links a, .nav-links a.active, .nav-toggle,
.nav .lang summary, .nav .user-chip, .nav .nav-point,
.nav .nav-point b { color: #171717; text-shadow: none; }
.nav-links a:hover { color: #000; text-decoration: underline; text-underline-offset: 5px; }
.nav .lang summary:hover { color: #000; background: #e9e9e9; }
.nav .btn-ghost, .nav .user-chip {
  color: #171717;
  background: #fff;
  border-color: #dedede;
  backdrop-filter: none;
}
.nav .btn-ghost:hover, .nav .user-chip:hover { background: #ededed; border-color: #c9c9c9; }
.nav .btn-primary {
  color: #171717;
  background: #e5eaf2;
  border-color: #d4dbe6;
  backdrop-filter: none;
}
.nav .btn-primary:hover { background: #d9e0eb; border-color: #bac6d7; }
.nav .nav-point { background: #edf1f6; border-color: #d4dbe6; }
.nav :is(a, button, summary):focus-visible { outline: 2px solid #171717; outline-offset: 4px; }
@media (max-width: 860px) {
  .nav { top: 12px; padding: 0 12px; }
  .nav-inner { height: 72px; padding: 0 16px; gap: 16px; border-radius: 18px; }
  .nav-links {
    top: calc(100% + 8px);
    margin-right: 0;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
  }
}
@media (max-width: 520px) {
  .nav-inner { padding: 0 12px; gap: 10px; }
  .nav .logo img { height: 40px; }
  .nav-actions { gap: 6px; }
  .nav .lang summary { padding: 7px 4px; }
  .nav .btn-sm { padding: 7px 9px; font-size: .78rem; }
  .nav .user-chip { padding: 6px 8px; max-width: 110px; overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
  .nav-inner { height: auto; min-height: 72px; flex-wrap: wrap; padding: 10px 12px; gap: 6px 12px; }
  .nav-actions { width: 100%; justify-content: flex-end; }
  .hero { padding-top: 152px; }
  .page-hero { padding-top: 152px; }
}

/* Keep a clear gap between the supplied logo and the single event action. */
.hero .cta-row { margin-top: 28px; }

/* Homepage introduction between logo and event entry. */
.hero-intro {
  max-width: 780px;
  margin: 22px auto 0;
  color: #fff;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 400;
  line-height: 1.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .75);
}
.hero-intro span { display: block; }
.hero-intro span:first-child { font-weight: 600; }
@media (max-width: 600px) {
  .hero-intro { margin-top: 18px; line-height: 1.8; }
  .hero-intro span + span { margin-top: 5px; }
}

/* Homepage download section, replacing the former download dialog. */
.download-section {
  padding: 32px 20px 56px;
  background: #1b1d24;
  color: var(--ink);
  scroll-margin-top: 120px;
}
.download-section > .container {
  padding: 44px 32px 48px;
  background: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}
.download-section h2 { font-size: clamp(24px, 3vw, 32px); text-align: center; }
.download-subtitle { margin: 10px 0 32px; color: var(--muted); text-align: center; }
.download-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.download-section .dl-specs { margin-top: 0; min-width: 0; }
.download-section .dl-specs-title { font-size: .9rem; margin-bottom: 12px; }
.download-section .dl-specs-table { font-size: .9rem; }
.download-section .dl-specs-table th { background: #e5e5e5; }
.download-section .dl-specs-table td { padding: 10px; }
@media (max-width: 760px) {
  .download-section { padding: 20px 12px 36px; }
  .download-section > .container { padding: 28px 16px 32px; border-radius: 18px; }
  .download-grid { grid-template-columns: 1fr; gap: 28px; }
  .download-section .dl-specs-table { font-size: .8rem; }
}

/* Footer: brand/credit left, policy links/socials right. */
.footer > .container {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand links" "credit social";
  align-items: center;
  column-gap: 32px;
  row-gap: 16px;
  text-align: left;
}
.footer-logo { grid-area: brand; justify-self: start; margin-bottom: 0; }
.footer .copy { grid-area: credit; margin: 0; }
.footer-links { grid-area: links; justify-content: flex-end; margin-bottom: 0; flex-wrap: wrap; }
.footer-social { grid-area: social; justify-content: flex-end; margin-bottom: 0; }
@media (max-width: 600px) {
  .footer > .container {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "credit" "links" "social";
    row-gap: 18px;
  }
  .footer-links, .footer-social { justify-content: flex-start; }
}

/* Compact provider buttons beside system requirements. */
.download-grid { grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 56px; }
.download-options { min-width: 0; }
.download-section h2 { text-align: left; font-size: 28px; }
.download-subtitle { text-align: left; margin: 8px 0 22px; font-size: .9rem; }
.download-section .dl-list { max-width: 300px; gap: 10px; }
.download-section .dl-link { padding: 11px 14px; gap: 12px; border-radius: 10px; min-height: 58px; }
.download-section .dl-icon { width: 25px; height: 25px; }
.download-section .dl-title { font-size: .95rem; letter-spacing: 0; }
.download-section .dl-sub { font-size: .73rem; margin-top: 3px; }
.download-section .dl-specs-title { font-size: 1.1rem; letter-spacing: 0; color: var(--ink); margin: 5px 0 20px; }
@media (max-width: 760px) {
  .download-grid { grid-template-columns: 1fr; gap: 28px; }
  .download-section .dl-list { max-width: none; }
  .download-section h2 { font-size: 24px; }
}

/* Secondary upcoming-class badge, centered below the main homepage logo. */
.hero-class-announcement {
  display: block;
  width: min(260px, 58vw);
  height: auto;
  margin: 4px auto 0;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.25));
}
.hero-class-announcement + .hero-intro { margin-top: 20px; }

/* Cumulative top-up amount, immediately after Cash Point (no icon). */
.nav-topup-total { display:inline-flex; align-items:center; gap:4px; white-space:nowrap; padding:6px 10px; border:1px solid #d4dbe6; border-radius:999px; background:#edf1f6; color:#171717; font-size:.8rem; }
.nav-topup-total b { font-weight:700; }
@media (max-width:640px) { .nav-actions { flex-wrap:wrap; } .nav-topup-total { font-size:.74rem; padding:4px 8px; } }

/* Like & Share proof action: red counterpart of the rounded event CTA. */
#modal-event #ev-submit {
 color:#fff;
 background:linear-gradient(135deg,#cf4051,#b7273b);
 border:1px solid #e7818e;
 border-radius:12px;
 min-height:46px;
 box-shadow:0 4px 12px rgba(183,39,59,.18),inset 0 1px 0 rgba(255,255,255,.16);
 transition:background .15s,border-color .15s,box-shadow .15s;
}
#modal-event #ev-submit:hover:not(:disabled) {
 background:linear-gradient(135deg,#bd3043,#a31e31);
 border-color:#dc6374;
 filter:none;
 transform:none;
 box-shadow:0 5px 14px rgba(183,39,59,.24);
}
#modal-event #ev-submit:focus-visible { outline:3px solid #f4a8b3; outline-offset:3px; }
#modal-event #ev-submit:disabled { opacity:.65; filter:saturate(.45); cursor:not-allowed; box-shadow:none; }

/* Keep only a plain deadline beneath the Like & Share title. */
#modal-event .ev-deadline { color:#111; font-size:.9rem; font-weight:400; line-height:1.6; margin:10px 0 18px; }

/* White speaker control, separate from the account navigation. */
.music-toggle { position:fixed; left:20px; bottom:20px; z-index:80; width:44px; height:44px; padding:10px; display:grid; place-items:center; color:#fff; background:rgba(20,24,30,.65); border:1px solid rgba(255,255,255,.5); border-radius:50%; cursor:pointer; box-shadow:0 3px 12px rgba(0,0,0,.18); }
.music-toggle[hidden] { display:none; }
.music-toggle:hover { background:rgba(20,24,30,.85); }
.music-toggle:focus-visible { outline:2px solid white; outline-offset:4px; }
.music-toggle .music-waves, .music-toggle.is-playing .music-muted { display:none; }
.music-toggle.is-playing .music-waves { display:inline; }
@media (max-width:600px) { .music-toggle { left:12px; bottom:max(12px,env(safe-area-inset-bottom)); } }
