/* ==========================================================================
   rbo.css — ระบบดีไซน์เว็บ robex3.com (Ragnarok Battle Offline)
   ทิศทาง: หน้าต่าง UI แบบเกม RO มือถือ (ROM / ROX / ROO) — ฟ้า · ขาว · ทอง · สะอาด
   กฎ: ไม่มี inline style ใน HTML (CSP ไม่อนุญาต) · สีทั้งหมดผ่านตัวแปรด้านล่าง
   ========================================================================== */

:root {
  --ro-navy: #0e2656;
  --ro-navy-2: #16346f;
  --ro-blue-800: #1a44a4;
  --ro-blue-700: #1f58c9;
  --ro-blue-600: #2b6be0;
  --ro-blue-500: #3f86f2;
  --ro-blue-400: #6aa6ff;
  --ro-blue-300: #9cc6ff;
  --ro-blue-200: #c6ddff;
  --ro-blue-100: #e3efff;
  --ro-blue-50: #f2f8ff;
  --ro-sky: #eaf4ff;
  --ro-gold-700: #b8740c;
  --ro-gold-600: #d88f14;
  --ro-gold-500: #f2b53a;
  --ro-gold-300: #ffd982;
  --ro-gold-100: #fff3d2;
  --ro-pink: #ff6f98;
  --ro-pink-100: #ffe3ec;
  --ro-mint: #25c2a0;
  --ro-mint-100: #dcf8f1;
  --ro-red: #ec4f64;
  --ro-red-100: #ffe3e7;
  --ro-violet: #8b5cf6;

  --ink: #17284a;
  --ink-2: #44567a;
  --ink-3: #7f8eab;
  --line: #d8e5f8;
  --line-2: #e9f1fc;
  --panel: #ffffff;
  --panel-2: #f7fbff;

  --r-common: #93a3bd;
  --r-rare: #3f86f2;
  --r-epic: #9b5cf6;
  --r-legendary: #f29c1f;
  --r-mythic: #ff4f86;

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --radius-xl: 32px;
  --shadow-s: 0 2px 6px rgba(22, 60, 140, 0.08);
  --shadow: 0 10px 28px rgba(22, 60, 140, 0.12);
  --shadow-l: 0 22px 60px rgba(14, 38, 86, 0.18);
  --glow-blue: 0 0 0 3px rgba(63, 134, 242, 0.28);

  --font: "Prompt", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 76px;
  --topbar-h: 34px;
  --container: 1240px;
  color-scheme: light;
}

/* ---------------------------------------------------------------- พื้นฐาน */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ro-sky);
  background-image:
    radial-gradient(1200px 520px at 10% -10%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(900px 480px at 100% 10%, rgba(214, 232, 255, 0.9), transparent 62%),
    linear-gradient(180deg, #f4f9ff 0%, #e8f2ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--ro-blue-600); text-decoration: none; }
a:hover { color: var(--ro-blue-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ro-blue-400); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--ro-blue-200); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ro-navy); font-weight: 700; }
p { margin: 0 0 0.8em; }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
svg:not([width]):not([class]) { width: 20px; height: 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- ปุ่ม */
.btn {
  --bg: linear-gradient(180deg, #5aa2ff 0%, #2f6fe4 55%, #245ed0 100%);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--bg); color: #fff; font-weight: 600; font-size: 15px; letter-spacing: 0.1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px rgba(36, 94, 208, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-shadow: 0 1px 0 rgba(0, 30, 90, 0.25); white-space: nowrap; user-select: none;
}
.btn:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 10px 22px rgba(36, 94, 208, 0.38); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { filter: grayscale(0.6) opacity(0.6); cursor: not-allowed; transform: none; }
.btn-gold {
  --bg: linear-gradient(180deg, #fff1bd 0%, #ffd66a 40%, #f2a92c 100%);
  color: #5a3503; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(178, 104, 8, 0.35), 0 6px 16px rgba(216, 143, 20, 0.35);
}
.btn-gold:hover { color: #4a2a00; }
.btn-pink { --bg: linear-gradient(180deg, #ff9fbd 0%, #ff6f98 55%, #ec4f7b 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px rgba(236, 79, 123, 0.32); }
.btn-ghost { --bg: #fff; color: var(--ro-blue-700); text-shadow: none; border: 1.5px solid var(--ro-blue-200); box-shadow: var(--shadow-s); }
.btn-ghost:hover { color: var(--ro-blue-800); border-color: var(--ro-blue-400); }
.btn-plain { --bg: transparent; color: var(--ink-2); text-shadow: none; box-shadow: none; }
.btn-plain:hover { color: var(--ro-blue-700); background: var(--ro-blue-50); box-shadow: none; }
.btn-danger { --bg: linear-gradient(180deg, #ff8a98 0%, #ec4f64 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 16px rgba(236, 79, 100, 0.3); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn .ico { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- ป้าย/ชิป */
.tag { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1.5px solid currentColor; background: #fff; white-space: nowrap; }
.tag-notice { color: var(--ro-blue-600); }
.tag-update { color: #0f9f84; }
.tag-event { color: var(--ro-pink); }
.tag-maintenance { color: #7b879e; }
.tag-news { color: var(--ro-violet); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: #fff; background: var(--ro-blue-600); }
.badge-new { background: linear-gradient(180deg, #4fd6b7, #1fae8f); }
.badge-hot { background: linear-gradient(180deg, #ff8a6b, #ec4f4f); }
.badge-limited { background: linear-gradient(180deg, #b78bff, #7c4ce0); }
.badge-sale { background: linear-gradient(180deg, #ffb13d, #e0820c); }
.badge-soon { background: linear-gradient(180deg, #8ea3c7, #5f7499); }
.badge-try { background: linear-gradient(180deg, #5aa2ff, #2b6be0); }   /* ไอเท็มที่ลองสวมบนหุ่นตัวละครจริงได้แล้ว */

/* ---------------------------------------------------------------- หน้าต่างแบบเกม (panel) */
.window { background: var(--panel); border-radius: var(--radius-l); box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.9); overflow: hidden; }
.window-head {
  display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 22px;
  background: linear-gradient(180deg, #f5f9ff 0%, #e2eeff 100%);
  border-bottom: 1px solid var(--line);
}
.window-head h2, .window-head h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.window-head .spacer { flex: 1; }
.window-body { padding: 20px 22px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 14px; color: var(--ro-navy); }
.section-title .ico { width: 30px; height: 30px; flex: none; }
.section-title .more { margin-left: auto; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: var(--shadow-s); }

/* ---------------------------------------------------------------- ฟอร์ม */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.field .hint.ok { color: #0f9f84; }
.field .hint.bad { color: var(--ro-red); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--panel-2); color: var(--ink); font-size: 15.5px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ro-blue-400); background: #fff; box-shadow: var(--glow-blue); }
.input.is-bad { border-color: var(--ro-red); }
.input.is-ok { border-color: #29b995; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); display: grid; place-items: center; }
.input-wrap .eye:hover { color: var(--ro-blue-600); background: var(--ro-blue-50); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ro-blue-600); flex: none; }
.rules { display: grid; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-3); }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.rules li.ok { color: #0f9f84; }
.rules li.ok::before { border-color: #29b995; background: #29b995 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/10px no-repeat; }
.form-error { display: none; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--ro-red-100); color: #b3263a; font-size: 14px; }
.form-error.on { display: block; }
.form-ok { display: none; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--ro-mint-100); color: #0b7a64; font-size: 14px; }
.form-ok.on { display: block; }
.pow-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.pow-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ro-blue-300); }
.pow-note.done .dot { background: #29b995; }

/* ---------------------------------------------------------------- ส่วนหัว */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: transform 0.3s ease; }
.topbar { height: var(--topbar-h); background: rgba(14, 38, 86, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #d8e6ff; font-size: 13px; }
.topbar .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.topbar a { color: #d8e6ff; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar .spacer { flex: 1; }
.topbar .sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.25); }
.gnb { height: var(--header-h); background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid rgba(214, 229, 250, 0.9); box-shadow: 0 6px 20px rgba(14, 38, 86, 0.06); }
.gnb .container { height: 100%; display: grid; grid-template-columns: 1fr 240px 1fr; align-items: center; }
.gnb-side { display: flex; align-items: stretch; height: 100%; }
.gnb-side.left { justify-content: space-evenly; }
.gnb-side.right { justify-content: space-evenly; }
.gnb-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 10px; color: var(--ro-navy); font-weight: 600; font-size: 15px; letter-spacing: 0.2px; white-space: nowrap; }
.gnb-link .ico { width: 34px; height: 34px; transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 3px 4px rgba(22, 60, 140, 0.18)); }
.gnb-link:hover { color: var(--ro-blue-600); }
.gnb-link:hover .ico { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.gnb-link.is-active { color: var(--ro-blue-600); }
.gnb-link.is-active::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ro-blue-400), var(--ro-blue-600)); }
.gnb-link .soon { position: absolute; top: 8px; right: -2px; font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: linear-gradient(180deg, #ff9d7a, #f06a4a); color: #fff; letter-spacing: 0.3px; }
.gnb-logo { position: relative; height: 100%; display: flex; justify-content: center; }
.gnb-logo a { position: absolute; top: 8px; width: 230px; filter: drop-shadow(0 8px 14px rgba(14, 38, 86, 0.28)); transition: transform 0.3s ease; }
.gnb-logo a:hover { transform: scale(1.03); }
.gnb-logo img { width: 100%; height: auto; }
.gnb-mobile { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #fff !important; font-weight: 600; }
.user-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #fff; }
img.coin { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }   /* ค่าพื้นฐาน: coin.svg ไม่มีขนาดในตัว → ที่ไหนลืมกำหนดจะเด้งเต็มจอ (ผู้ใช้แจ้ง 09-26 หน้ารายละเอียดไอเท็ม) */
.coin-chip { display: inline-flex; align-items: center; gap: 5px; color: var(--ro-gold-300) !important; font-weight: 600; }
.coin-chip .coin { width: 16px; height: 16px; }
.menu-pop { position: absolute; top: calc(var(--topbar-h) + 4px); right: 20px; width: 230px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-l); border: 1px solid var(--line); padding: 8px; display: none; z-index: 80; }
.menu-pop.on { display: block; animation: pop 0.18s ease; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); background: none; border: 0; text-align: left; font-size: 14.5px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--ro-blue-50); color: var(--ro-blue-700); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

/* มือถือ */
.drawer-bg { position: fixed; inset: 0; background: rgba(8, 20, 48, 0.45); backdrop-filter: blur(2px); z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 340px); background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%); z-index: 91; transform: translateX(-102%); transition: transform 0.28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; box-shadow: var(--shadow-l); }
.drawer.on { transform: none; }
.drawer.on + .drawer-bg, .drawer-bg.on { opacity: 1; pointer-events: auto; }
.drawer-head { padding: 16px 16px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line-2); }
.drawer-head img { width: 150px; }
.drawer-head .x { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--ro-blue-50); color: var(--ro-navy); display: grid; place-items: center; }
.drawer nav { padding: 10px; overflow-y: auto; flex: 1; }
.drawer nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; color: var(--ro-navy); font-weight: 600; font-size: 16px; }
.drawer nav a .ico { width: 30px; height: 30px; }
.drawer nav a:hover, .drawer nav a.is-active { background: var(--ro-blue-100); }
.drawer nav .group { margin: 12px 12px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.4px; }
.drawer-foot { padding: 14px 16px 22px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; }

@media (max-width: 1080px) {
  :root { --header-h: 58px; }
  .topbar { display: none; }
  .gnb .container { display: flex; justify-content: space-between; padding: 0 12px; }
  .gnb-side { display: none; }
  .gnb-mobile { display: flex; align-items: center; gap: 6px; }
  .gnb-logo { flex: 1; }
  .gnb-logo a { position: static; width: 150px; margin: 0 auto; filter: drop-shadow(0 3px 6px rgba(14, 38, 86, 0.25)); }
  .icon-btn { width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--ro-blue-50); color: var(--ro-navy); display: grid; place-items: center; }
  .icon-btn .ico { width: 22px; height: 22px; }
  .icon-btn img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
  .menu-pop { top: calc(var(--header-h) + 4px); right: 10px; }
}

/* ---------------------------------------------------------------- หน้าแรก: ฮีโร่ */
.page-home main { padding-top: 0; }
.hero { position: relative; min-height: 520px; height: 64vh; max-height: 700px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.08) translateY(-1%); } }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(180deg, rgba(234, 244, 255, 0) 0%, rgba(234, 244, 255, 0.85) 62%, #eaf4ff 100%); pointer-events: none; }
.hero-center { position: absolute; left: 50%; top: calc(var(--topbar-h) + var(--header-h) + 64px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 3; }
.play-btn { position: relative; width: 250px; height: 250px; border-radius: 50%; border: 0; padding: 0; background: none; filter: drop-shadow(0 16px 30px rgba(17, 58, 150, 0.45)); transition: transform 0.25s cubic-bezier(.3, 1.5, .5, 1); }
.play-btn img { width: 100%; height: 100%; }
.play-btn::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.75); animation: ring 2.4s ease-out infinite; }
.play-btn:hover { transform: scale(1.05); }
.play-btn:active { transform: scale(0.98); }
@keyframes ring { 0% { transform: scale(0.92); opacity: 0.9; } 80%, 100% { transform: scale(1.22); opacity: 0; } }
.hero-sub { margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-tagline { margin-top: 14px; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(6px); color: var(--ro-navy); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-s); text-align: center; }
.home-sheet { position: relative; z-index: 4; margin-top: -170px; }
.home-sheet .sheet { background: rgba(255, 255, 255, 0.97); border-radius: 36px; padding: 26px; box-shadow: var(--shadow-l); border: 1px solid #fff; }

/* แบนเนอร์สไลด์ */
.carousel { position: relative; border-radius: 26px; overflow: hidden; background: var(--ro-navy); aspect-ratio: 1190 / 380; min-height: 260px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); isolation: isolate; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; display: block; color: #fff; }
.slide.on { opacity: 1; z-index: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; transform: scale(1.04); transition: transform 6s ease-out; }
.slide.on img { transform: scale(1); }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 38, 86, 0) 38%, rgba(14, 38, 86, 0.72) 60%, rgba(12, 30, 70, 0.96) 78%); }
.slide-text { position: absolute; z-index: 2; right: 5%; top: 50%; transform: translateY(-50%); width: min(40%, 470px); }
.slide-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(255, 217, 130, 0.18); color: var(--ro-gold-300); border: 1px solid rgba(255, 217, 130, 0.45); margin-bottom: 12px; }
.slide-title { font-size: clamp(24px, 3.2vw, 44px); font-weight: 700; line-height: 1.12; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); letter-spacing: 0.2px; }
.slide-desc { margin-top: 12px; font-size: clamp(13px, 1.25vw, 16px); color: #dce8ff; line-height: 1.6; }
.slide-cta { margin-top: 18px; }
.car-ctrl { position: absolute; z-index: 3; right: 18px; bottom: 16px; display: flex; gap: 8px; align-items: center; }
.car-btn { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; backdrop-filter: blur(6px); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.car-btn:hover { background: rgba(255, 255, 255, 0.26); }
.car-count { letter-spacing: 1px; }
.car-count b { color: #fff; }
.car-count span { opacity: 0.6; margin: 0 6px; }
.car-dots { position: absolute; z-index: 3; left: 22px; bottom: 18px; display: flex; gap: 6px; }
.car-dot { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, 0.4); transition: width 0.3s, background 0.3s; }
.car-dot.on { width: 26px; background: linear-gradient(90deg, #ffe08a, #f2b53a); }
.car-prog { position: absolute; z-index: 3; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, #6aa6ff, #ffd982); }
.car-prog.run { animation: prog linear forwards; }
@keyframes prog { to { width: 100%; } }

.home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; margin-top: 26px; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.news-item a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink); transition: background 0.15s, transform 0.15s, box-shadow 0.15s; }
.news-item a:hover { background: #fff; box-shadow: var(--shadow-s); transform: translateX(3px); }
.news-item .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-item .d { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.news-item.pinned .t::before { content: "📌 "; }
.guide-card { position: relative; display: block; border-radius: 22px; overflow: hidden; min-height: 230px; background: linear-gradient(135deg, #2f7cf0, #1b4db8); color: #fff; box-shadow: var(--shadow); }
.guide-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.guide-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 60, 150, 0) 30%, rgba(20, 60, 150, 0.82) 62%, rgba(16, 48, 128, 0.95)); }
.guide-card .txt { position: absolute; z-index: 2; right: 18px; top: 18px; bottom: 18px; width: 52%; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.guide-card h3 { color: #fff; font-size: 20px; }
.guide-steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 7px; font-size: 13.5px; }
.guide-steps li { display: flex; align-items: center; gap: 8px; color: #e3eeff; }
.guide-steps b { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); display: grid; place-items: center; font-size: 12px; flex: none; }
.guide-card:hover { color: #fff; }
.guide-card:hover img { transform: scale(1.03); transition: transform 0.4s; }
.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ro-navy); font-weight: 600; font-size: 13.5px; text-align: center; transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.quick .ico { width: 32px; height: 32px; }
.quick:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-s); }
.stat-online { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.stat-online .live { width: 8px; height: 8px; border-radius: 50%; background: #22c58f; box-shadow: 0 0 0 4px rgba(34, 197, 143, 0.18); animation: live 1.8s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 143, 0.05); } }

/* ---------------------------------------------------------------- หน้าใน: หัวหน้า */
.page-hero { position: relative; height: 300px; overflow: hidden; margin-bottom: -80px; }
.page-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 38, 86, 0.1) 0%, rgba(14, 38, 86, 0.35) 45%, rgba(234, 244, 255, 0.4) 75%, #eaf4ff 100%); }
.page-hero .title { position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--topbar-h) + var(--header-h) + 30px); text-align: center; color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 44px); text-shadow: 0 4px 20px rgba(8, 24, 60, 0.55); letter-spacing: 0.5px; }
.page-hero p { margin-top: 6px; font-size: 15px; color: #eaf2ff; text-shadow: 0 2px 10px rgba(8, 24, 60, 0.6); }
.page-body { position: relative; z-index: 3; padding-bottom: 60px; }
.page-plain { padding-top: calc(var(--topbar-h) + var(--header-h) + 28px); }
@media (max-width: 1080px) { .page-plain { padding-top: calc(var(--header-h) + 18px); } .page-hero .title { top: calc(var(--header-h) + 24px); } }

/* แท็บ */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; background: var(--ro-blue-50); border-radius: 999px; border: 1px solid var(--line); width: max-content; max-width: 100%; }
.tab { height: 38px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--ro-blue-700); }
.tab.on { background: linear-gradient(180deg, #5aa2ff, #2b6be0); color: #fff; box-shadow: 0 4px 12px rgba(43, 107, 224, 0.3); }
.tabs-scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs-scroll::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------------- ข่าว */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.news-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); color: var(--ink); transition: transform 0.2s, box-shadow 0.2s; }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.news-card .cover { aspect-ratio: 16 / 8; background: linear-gradient(135deg, #cfe2ff, #eaf4ff); overflow: hidden; }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.news-card .b { padding: 14px 16px 16px; display: grid; gap: 8px; }
.news-card h3 { font-size: 16.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .s { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.article { max-width: 860px; margin: 0 auto; }
.article .window-body { padding: 28px 34px 34px; }
.article h1 { font-size: clamp(22px, 3vw, 32px); margin: 10px 0 6px; }
.article .meta { color: var(--ink-3); font-size: 13.5px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.article .cover { margin: 20px 0; border-radius: 18px; overflow: hidden; }
.article .cover img { width: 100%; height: auto; }   /* ผู้ใช้แจ้ง 09-27: ปกข่าวยืดบนมือถือ — แท็กมี height="771" + img {max-width:100%} = กว้างหดแต่สูงคงเดิม · ตรวจ tools/img_stretch_check.py */
.prose { font-size: 16px; line-height: 1.85; color: var(--ink); }
.prose h2 { font-size: 21px; margin: 26px 0 10px; padding-left: 12px; border-left: 4px solid var(--ro-blue-500); }
.prose h3 { font-size: 18px; margin: 20px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 16px 0; padding: 12px 16px; background: var(--ro-blue-50); border-radius: 14px; border-left: 4px solid var(--ro-gold-500); color: var(--ink-2); }
.prose img { border-radius: 14px; margin: 14px 0; }
.prose code { background: var(--ro-blue-50); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 24px 0; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.around { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.around a { display: block; padding: 14px 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; }
.around a small { display: block; color: var(--ink-3); }
.around a.next { text-align: right; }

/* ---------------------------------------------------------------- ข้อมูลเกม: อาชีพ */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 18px; }
.class-card { position: relative; border: 0; padding: 0; text-align: left; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #f5f9ff 0%, #dcebff 100%); box-shadow: var(--shadow-s); border: 1px solid #fff; transition: transform 0.25s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.25s; }
.class-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.class-card .art { height: 250px; display: flex; align-items: flex-end; justify-content: center; padding-top: 10px; background: radial-gradient(120px 90px at 50% 80%, rgba(255, 255, 255, 0.95), transparent 70%); }
.class-card .art img { height: 240px; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(14, 38, 86, 0.22)); transition: transform 0.3s; }
.class-card:hover .art img { transform: scale(1.04); }
.class-card .cap { padding: 12px 14px 14px; background: #fff; }
.class-card .cap b { display: block; font-size: 16.5px; color: var(--ro-navy); }
.class-card .cap small { color: var(--ink-3); font-size: 12.5px; }
.class-card .job { position: absolute; top: 10px; left: 10px; }
.job-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); color: var(--ro-navy); font-size: 12px; font-weight: 700; box-shadow: var(--shadow-s); }
.job-dot { width: 9px; height: 9px; border-radius: 50%; }
.job-novice { background: #f2b53a; } .job-swordman { background: #ec4f64; } .job-archer { background: #25c2a0; }
.job-magician { background: #8b5cf6; } .job-merchant { background: #f0822d; } .job-acolyte { background: #f5c33b; } .job-thief { background: #5a6b8c; }
.class-detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
.pose-stage { position: relative; border-radius: 24px; background: radial-gradient(260px 200px at 50% 78%, #fff, transparent 70%), linear-gradient(180deg, #eaf3ff, #cfe1ff); height: 460px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.pose-stage img { height: 440px; width: auto; max-width: 96%; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(14, 38, 86, 0.25)); animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.pose-pick { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.pose-pick button { width: 64px; height: 64px; border-radius: 16px; border: 2px solid var(--line); background: #fff; padding: 4px; }
.pose-pick button img { width: 100%; height: 100%; object-fit: contain; }
.pose-pick button.on { border-color: var(--ro-blue-500); box-shadow: var(--glow-blue); }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.skill { padding: 6px 12px; border-radius: 12px; background: var(--ro-blue-50); border: 1px solid var(--line); font-size: 13.5px; color: var(--ro-navy); }
.stat-bars { display: grid; gap: 8px; margin: 10px 0 18px; }
.stat-bar { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.stat-bar i { height: 10px; border-radius: 999px; background: var(--ro-blue-100); overflow: hidden; position: relative; }
.stat-bar i::after { content: ""; position: absolute; inset: 0; width: var(--v, 50%); border-radius: 999px; background: linear-gradient(90deg, var(--ro-blue-400), var(--ro-blue-600)); }
.guide-soon { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(90deg, #fff7df, #fff); border: 1px dashed var(--ro-gold-500); color: #7a5208; font-size: 14px; }
.mob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.mob-card { border-radius: 20px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); overflow: hidden; text-align: center; }
.mob-card .art { height: 150px; display: grid; place-items: center; background: radial-gradient(100px 70px at 50% 70%, #fff, transparent 70%), linear-gradient(180deg, #f1f7ff, #deebff); }
.mob-card .art img { max-height: 132px; width: auto; max-width: 88%; filter: drop-shadow(0 8px 10px rgba(14, 38, 86, 0.2)); }
.mob-card .cap { padding: 10px 12px 12px; }
.mob-card b { display: block; color: var(--ro-navy); }
.mob-card small { color: var(--ink-3); font-size: 12px; }
.mob-card.boss { border-color: #ffd982; }
.mob-card.boss .art { background: radial-gradient(100px 70px at 50% 70%, #fff, transparent 70%), linear-gradient(180deg, #fff5d6, #ffe2a8); }
.boss-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #a2600a; background: var(--ro-gold-100); border-radius: 999px; padding: 1px 8px; }
.stage-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.stage-card { position: relative; border-radius: 20px; overflow: hidden; min-height: 180px; color: #fff; box-shadow: var(--shadow-s); }
.stage-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 38, 86, 0) 30%, rgba(14, 38, 86, 0.9)); }
.stage-card .c { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 12px; }
.stage-card b { display: block; font-size: 17px; }
.stage-card small { font-size: 12.5px; color: #dbe7ff; }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 14px; }
kbd { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); border-bottom-width: 3px; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ro-navy); }

/* ---------------------------------------------------------------- ทรัพยากร */
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platform { padding: 20px; border-radius: 22px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); display: grid; gap: 10px; align-content: start; }
.platform .ico { width: 46px; height: 46px; }
.platform h3 { font-size: 18px; }
.platform ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; width: max-content; }
.state.ok { background: var(--ro-mint-100); color: #0b7a64; }
.state.wip { background: var(--ro-gold-100); color: #8a5a06; }
.spec-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.spec-table thead th { background: var(--ro-blue-50); color: var(--ro-navy); font-weight: 600; }
.spec-table thead th:first-child { border-top-left-radius: 14px; }
.spec-table thead th:last-child { border-top-right-radius: 14px; }
.spec-table td:first-child { font-weight: 600; color: var(--ro-navy); width: 26%; }
.tbd { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.tbd::before { content: ""; width: 34px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--line), var(--line-2), var(--line)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.device-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: end; }
.mock-pc { position: relative; border-radius: 18px; padding: 12px 12px 26px; background: linear-gradient(180deg, #2b3450, #151b2d); box-shadow: var(--shadow-l); }
.mock-pc img { border-radius: 8px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mock-pc::after { content: ""; position: absolute; left: 40%; right: 40%; bottom: -18px; height: 18px; background: linear-gradient(180deg, #c3cde0, #8b97b0); border-radius: 0 0 10px 10px; }
.mock-phone { position: relative; border-radius: 34px; padding: 10px; background: linear-gradient(180deg, #2b3450, #151b2d); box-shadow: var(--shadow-l); transform: rotate(-2deg); }
.mock-phone img { border-radius: 26px; width: 100%; aspect-ratio: 844 / 390; object-fit: cover; }
.steps { counter-reset: s; display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; font-size: 14.5px; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #5aa2ff, #2b6be0); color: #fff; font-weight: 700; font-size: 14px; }
.steps code { background: var(--ro-blue-50); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; word-break: break-all; }
/* QR ตั้งค่า 2FA (qr.js) — พื้นขาวล้วน + ขอบเงียบในตัว · ห้ามลดขนาดจนช่องเล็กกว่า ~4 px (กล้องมือถืออ่านยาก) */
.qr-step { display: grid; gap: 10px; min-width: 0; }
.qr-box { justify-self: start; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-s); line-height: 0; }
.qr-canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.qr-key { font-size: 13px; line-height: 1.6; }

/* ---------------------------------------------------------------- เร็ว ๆ นี้ */
.soon-hero { position: relative; border-radius: 30px; overflow: hidden; min-height: 420px; background: var(--ro-navy); box-shadow: var(--shadow-l); }
.soon-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.soon-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 38, 86, 0) 30%, rgba(14, 38, 86, 0.78) 60%, rgba(12, 30, 70, 0.96)); }
.soon-hero .txt { position: absolute; z-index: 2; right: 6%; top: 50%; transform: translateY(-50%); width: min(40%, 440px); color: #fff; }
.soon-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 50px); }
.soon-hero p { color: #dce8ff; font-size: 16px; margin-top: 10px; }
.soon-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 217, 130, 0.18); color: var(--ro-gold-300); border: 1px solid rgba(255, 217, 130, 0.5); font-weight: 600; font-size: 13px; margin-bottom: 12px; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.feature { padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); display: grid; gap: 6px; }
.feature .ico { width: 40px; height: 40px; }
.feature b { color: var(--ro-navy); font-size: 16px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------------------------------------------------------------- ไอเท็มช็อป */
.shop { display: grid; grid-template-columns: 210px 1fr 300px; gap: 18px; align-items: start; }
.shop > * { min-width: 0; }   /* ช่องกริดห้ามขยายตามแถวที่เลื่อนข้างได้ (ไอคอนอาชีพ 13 ปุ่ม) — เดิมห้องลองชุดล้นจอมือถือ */
.shop-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-top h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.shop-top .spacer { flex: 1; }
.cur { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px; background: linear-gradient(180deg, #fff, #eef5ff); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-weight: 700; color: var(--ro-navy); font-size: 15px; }
.cur .coin { width: 24px; height: 24px; }
.cur .plus { width: 28px; height: 28px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #5aa2ff, #2b6be0); color: #fff; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.shop-cats { position: sticky; top: calc(var(--topbar-h) + var(--header-h) + 14px); display: grid; gap: 8px; }
.shop-cat { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line-2); background: #fff; color: var(--ro-navy); font-weight: 600; font-size: 15px; text-align: left; box-shadow: var(--shadow-s); transition: transform 0.15s, background 0.15s; }
.shop-cat .ico { width: 30px; height: 30px; }
.shop-cat:hover { transform: translateX(3px); }
.shop-cat.on { background: linear-gradient(180deg, #ffb2c8 0%, #ff7fa6 100%); color: #fff; border-color: #ff9fbd; box-shadow: 0 8px 18px rgba(255, 111, 152, 0.35); text-shadow: 0 1px 0 rgba(160, 20, 70, 0.3); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.item-card { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; border-radius: 22px; background: linear-gradient(180deg, #fffdfa 0%, #fff4ec 100%); border: 1px solid #f7e6d8; box-shadow: var(--shadow-s); overflow: hidden; text-align: center; padding: 0; transition: transform 0.2s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.2s; }
.item-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.item-card .n { padding: 2px 10px 6px; font-weight: 600; font-size: 14.5px; color: #6b4a3a; min-height: 44px; display: grid; place-items: center; line-height: 1.3; }
.slot { position: relative; width: 104px; height: 104px; margin: 4px auto 10px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(160deg, #eaf4ff 0%, #c9dcff 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8), 0 4px 10px rgba(22, 60, 140, 0.15); overflow: hidden; }
.slot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.55) 48%, transparent 56%); transform: translateX(-120%); transition: transform 0.7s; }
.item-card:hover .slot::before { transform: translateX(120%); }
.slot img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 4px 5px rgba(14, 38, 86, 0.2)); }
.slot.r-rare { background: linear-gradient(160deg, #e6f0ff 0%, #a9c9ff 100%); }
.slot.r-epic { background: linear-gradient(160deg, #f3ebff 0%, #c9adff 100%); }
.slot.r-legendary { background: linear-gradient(160deg, #fff4dc 0%, #ffcf7c 100%); }
.slot.r-mythic { background: linear-gradient(160deg, #ffe8f0 0%, #ff9dbc 100%); }
.slot.r-common { background: linear-gradient(160deg, #f4f7fc 0%, #d9e2f0 100%); }
.item-card .p { display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; background: rgba(255, 255, 255, 0.75); border-top: 1px solid #f5e3d6; font-weight: 700; font-size: 17px; color: #5a3d2e; }
.item-card .p .coin { width: 22px; height: 22px; }
/* ป้าย HOT/NEW/เร็ว ๆ นี้ อยู่แถวบนของการ์ด (เดิมลอยทับชื่อไอเท็ม — ผู้ใช้แจ้ง 09-25) */
.item-card .badges { display: flex; flex-wrap: wrap; gap: 4px; min-height: 30px; padding: 9px 10px 0; z-index: 2; }
.item-card:has(.owned) .badges { padding-right: 64px; }
.item-card .owned { position: absolute; top: 8px; right: 8px; z-index: 2; }
.item-card.is-preview .p { color: #8a7b92; font-size: 14px; }
.rarity-text { font-size: 12.5px; font-weight: 700; }
.rarity-common { color: var(--r-common); } .rarity-rare { color: var(--r-rare); } .rarity-epic { color: var(--r-epic); } .rarity-legendary { color: var(--r-legendary); } .rarity-mythic { color: var(--r-mythic); }
.doll { position: sticky; top: calc(var(--topbar-h) + var(--header-h) + 14px); }
.doll-stage { height: 370px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(160px 120px at 50% 80%, #fff, transparent 70%), linear-gradient(180deg, #eaf3ff, #d3e4ff); border-radius: 20px; overflow: hidden; }
.doll-stage { position: relative; }
.doll-cv { display: block; width: 100%; height: 100%; }
.doll-msg { position: absolute; inset: auto 12px 12px; margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); font-size: 13px; text-align: center; }
.doll-who { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.doll-flip { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ro-navy); font-size: 16px; display: grid; place-items: center; box-shadow: var(--shadow-s); }
.doll-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.doll-acts button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ro-navy); font-weight: 600; font-size: 13px; }
.doll-acts button.on { background: linear-gradient(180deg, #5aa2ff, #2b6be0); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(43, 107, 224, 0.3); }
.doll-full { width: 100%; margin-top: 26px; min-height: 42px; }
.doll-note { font-size: 12.5px; margin: 10px 0 0; }
.gear-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.gear { aspect-ratio: 1; border-radius: 14px; background: linear-gradient(160deg, #f4f8ff, #dde9fb); border: 1px dashed var(--ro-blue-300); display: grid; place-items: center; position: relative; }
.gear img { width: 78%; height: 78%; object-fit: contain; }
.gear.on { border-style: solid; border-color: var(--ro-blue-400); background: #fff; padding: 0; box-shadow: 0 4px 12px rgba(43, 107, 224, 0.2); }
.gear.on:hover { border-color: #ec4f4f; }
.gear small { position: absolute; bottom: -18px; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.class-select { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: thin; }
.class-select button { flex: none; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line); background: #fff; padding: 2px; overflow: hidden; }
.class-select button img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; background: linear-gradient(180deg, #f3f8ff, #dfeaff); }
.class-select button.on { border-color: var(--ro-blue-500); box-shadow: var(--glow-blue); }

/* ---------------------------------------------------------------- โมดัล / ป๊อปอัป */
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(8, 20, 48, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 18px; }
.modal-bg.on { display: flex; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: min(100%, 460px); max-height: calc(100vh - 36px); overflow: auto; background: #fff; border-radius: 28px; box-shadow: var(--shadow-l); animation: rise 0.28s cubic-bezier(.2, 1.3, .4, 1); }
.modal.wide { width: min(100%, 720px); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: linear-gradient(180deg, #f5f9ff, #e2eeff); border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; flex: 1; }
.modal-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; color: var(--ro-navy); display: grid; place-items: center; box-shadow: var(--shadow-s); font-size: 18px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 22px; flex-wrap: wrap; }
.modal-art { margin: -22px -22px 16px; height: 170px; overflow: hidden; background: linear-gradient(135deg, #cfe2ff, #f2f8ff); display: grid; place-items: center; }
.modal-art img { height: 100%; width: auto; object-fit: contain; }
/* หน้ารายละเอียด = ลองสวมบนตัวละครจริงของเกม (ผู้ใช้ 09-26) */
.modal-art.try-art { height: auto; display: grid; gap: 10px; padding: 14px 14px 12px; place-items: stretch; }
.try-stage { position: relative; height: 346px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(55% 45% at 50% 44%, #fff 0%, rgba(255, 255, 255, 0) 72%), linear-gradient(180deg, #eaf2ff, #d4e3ff); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
.try-cv { display: block; width: 100%; height: 100%; }
.modal-art .try-icon { position: absolute; top: 10px; left: 10px; width: 62px; height: 62px; margin: 0; border-radius: 14px; }
.modal-art .try-icon img { width: 86%; height: 86%; }
.try-who { display: block; margin: 8px 0 2px; text-align: center; color: var(--ro-navy); font-size: 13px; font-weight: 600; }   /* ใต้เวที (เดิมป้ายลอยในเวทีบังเงาแบบเกม) */
.try-heads { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.try-heads button { flex: none; width: 44px; height: 44px; padding: 2px; border-radius: 12px; border: 2px solid var(--line-2); background: linear-gradient(180deg, #f3f8ff, #dfeaff); cursor: pointer; }
.try-heads button.on { border-color: var(--ro-blue-400); box-shadow: 0 0 0 3px rgba(43, 107, 224, 0.2); }
.try-heads button[disabled] { opacity: 0.35; cursor: not-allowed; }
.modal-art .try-heads img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }   /* ผมที่ล้นขอบรูปถูกตัดตามมุมโค้งของปุ่ม */
@media (max-width: 760px) { .try-stage { height: 298px; } }   /* เวทีสูงขึ้นให้เห็นเงาแบบเกม (ขนาดตัวละครเท่าเดิม · Doll unitsTall 280 เท้า 0.77) */
.gate-art { height: 190px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(180px 120px at 50% 90%, #fff, transparent 70%), linear-gradient(180deg, #d9e9ff, #f2f8ff); margin: -22px -22px 18px; overflow: hidden; }
.gate-art img { height: 180px; width: auto; }

/* ---------------------------------------------------------------- toast */
.toasts { position: fixed; z-index: 300; left: 50%; top: calc(var(--header-h) + 18px); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-l); border: 1px solid var(--line); font-size: 14.5px; animation: rise 0.25s ease; }
.toast.ok { border-color: #a9ecd9; }
.toast.bad { border-color: #ffc2cb; }
.toast .i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; flex: none; color: #fff; background: var(--ro-blue-500); }
.toast.ok .i { background: #22b98f; }
.toast.bad .i { background: var(--ro-red); }

/* ---------------------------------------------------------------- สมาชิก (ล็อกอิน/สมัคร) */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; padding-top: calc(var(--topbar-h) + var(--header-h)); }
.auth-art { position: relative; overflow: hidden; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 38, 86, 0.05), rgba(234, 244, 255, 0) 60%, rgba(234, 244, 255, 0.9) 100%); }
.auth-art .cap { position: absolute; z-index: 2; left: 34px; bottom: 30px; right: 34px; color: #fff; text-shadow: 0 3px 14px rgba(8, 24, 60, 0.6); }
.auth-art .cap b { font-size: 28px; display: block; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 34px 20px; }
.auth-card { width: min(100%, 440px); }
.auth-card .window-body { padding: 26px 28px 28px; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink-2); font-size: 14.5px; margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 18px; font-size: 14px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14.5px; color: var(--ink-2); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; padding-top: var(--header-h); }
  .auth-art { height: 210px; }
  .auth-art .cap { left: 18px; bottom: 16px; }
  .auth-art .cap b { font-size: 21px; }
  .auth-side { padding: 0 14px 40px; margin-top: -40px; position: relative; z-index: 2; }
}

/* ---------------------------------------------------------------- โปรไฟล์ */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.id-card { text-align: center; overflow: hidden; }
.id-card .cover { height: 110px; background: url("/assets/img/kv/kv-pc-1600.webp") center 30% / cover; }
.id-card .ava { width: 116px; height: 116px; border-radius: 50%; margin: -58px auto 10px; border: 5px solid #fff; box-shadow: var(--shadow); object-fit: cover; background: #fff; }
.id-card h2 { font-size: 22px; }
.id-card .role { margin: 6px 0 14px; }
.kv-list { display: grid; gap: 0; margin: 0; }
.kv-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; align-items: center; }
.kv-list dt { color: var(--ink-3); }
.kv-list dd { margin: 0; color: var(--ink); font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv-list dd .coin { width: 22px; height: 22px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { padding: 14px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line-2); }
.tile small { color: var(--ink-3); font-size: 12.5px; }
.tile b { display: block; font-size: 22px; color: var(--ro-navy); }
.ava-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; padding: 4px; }
.ava-pick button { aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; padding: 0; overflow: hidden; background: #fff; box-shadow: var(--shadow-s); }
.ava-pick button img { width: 100%; height: 100%; object-fit: cover; }
.ava-pick button.on { border-color: var(--ro-blue-500); }
.session-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.session-row .d { flex: 1; }
.session-row small { color: var(--ink-3); display: block; }
.save-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.save-chars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---------------------------------------------------------------- อันดับ */
.rank-wrap { display: grid; gap: 18px; }
.rank-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.podium { position: relative; display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: 18px; padding: 34px 26px 0; border-radius: 30px; background: radial-gradient(600px 300px at 50% 0%, rgba(255, 223, 140, 0.35), transparent 70%), linear-gradient(180deg, #16346f 0%, #0e2656 100%); overflow: hidden; min-height: 400px; box-shadow: var(--shadow-l); }
.podium::before { content: ""; position: absolute; inset: 0; background: url("/assets/img/art/art-ranking.webp") center 30% / cover; opacity: 0.28; mix-blend-mode: screen; }
.pod { position: relative; z-index: 1; text-align: center; color: #fff; }
.pod .ava { position: relative; width: 108px; height: 108px; margin: 0 auto; border-radius: 50%; padding: 4px; background: conic-gradient(from 0deg, #c3cfe6, #ffffff, #93a3bd, #ffffff, #c3cfe6); animation: spin 6s linear infinite; }
.pod .ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.pod .name { margin-top: 10px; font-weight: 700; font-size: 17px; }
.pod .time { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; color: var(--ro-gold-300); letter-spacing: 1px; }
.pod .base { margin-top: 12px; height: 110px; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)); display: grid; place-items: center; font-size: 40px; font-weight: 800; color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.25); border-bottom: 0; }
.pod.p1 .ava { width: 136px; height: 136px; background: conic-gradient(from 0deg, #ffd24a, #fff6c9, #f29c1f, #fff6c9, #ffd24a); box-shadow: 0 0 40px rgba(255, 200, 60, 0.65); }
.pod.p1 .base { height: 150px; background: linear-gradient(180deg, rgba(255, 214, 106, 0.55), rgba(255, 214, 106, 0.12)); color: #fff3c4; }
.pod.p2 .base { height: 115px; }
.pod.p3 .ava { background: conic-gradient(from 0deg, #e6a272, #ffe0c7, #b06a3b, #ffe0c7, #e6a272); }
.pod.p3 .base { height: 90px; background: linear-gradient(180deg, rgba(230, 162, 114, 0.45), rgba(230, 162, 114, 0.1)); }
.crown { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); width: 56px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, -5px); } }
.mvp-tag { display: inline-block; margin-top: 6px; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #5a3503; background: linear-gradient(180deg, #fff1bd, #f2b53a); box-shadow: 0 0 18px rgba(255, 210, 74, 0.6); }
.sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sparkles i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff6c9; box-shadow: 0 0 10px #ffd24a; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 56px 46px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); }
.rank-row .no { font-size: 20px; font-weight: 800; color: var(--ro-navy); text-align: center; font-variant-numeric: tabular-nums; }
.rank-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.rank-row .t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ro-blue-700); font-size: 16px; }
.rank-row.me { border-color: var(--ro-blue-400); box-shadow: var(--glow-blue); }
.tier { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tier-mvp { color: #5a3503; background: linear-gradient(180deg, #fff1bd, #f2b53a); box-shadow: 0 0 12px rgba(242, 181, 58, 0.55); }
.tier-champion { color: #2d3b57; background: linear-gradient(180deg, #ffffff, #c9d4e8); }
.tier-hero { color: #fff; background: linear-gradient(180deg, #b78bff, #7c4ce0); }
.tier-elite { color: #fff; background: linear-gradient(180deg, #6aa6ff, #2b6be0); }
.tier-adventurer { color: #4a5b7c; background: #eef3fb; }
.me-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 20px; background: linear-gradient(90deg, #eaf3ff, #fff); border: 1px solid var(--ro-blue-200); }
.empty { text-align: center; padding: 34px 20px; color: var(--ink-2); }
.empty img { width: 150px; margin: 0 auto 12px; filter: drop-shadow(0 8px 10px rgba(14, 38, 86, 0.18)); }
.empty b { display: block; font-size: 18px; color: var(--ro-navy); margin-bottom: 4px; }

/* ---------------------------------------------------------------- ห้องออนไลน์ */
.lobby { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.lobby-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.lobby-bar .spacer { flex: 1; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.room-card { display: grid; gap: 10px; padding: 16px; border-radius: 22px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-s); transition: transform 0.2s, box-shadow 0.2s; }
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.room-card .top { display: flex; align-items: center; gap: 8px; }
.room-card .code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-weight: 700; letter-spacing: 1.5px; color: var(--ro-blue-700); background: var(--ro-blue-50); padding: 2px 8px; border-radius: 8px; font-size: 13px; }
.room-card h3 { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.room-card .seats { display: flex; gap: 8px; }
.seat-mini { width: 44px; height: 44px; border-radius: 50%; background: var(--ro-blue-50); border: 2px dashed var(--ro-blue-200); overflow: hidden; display: grid; place-items: center; color: var(--ro-blue-300); font-size: 18px; }
.seat-mini img { width: 100%; height: 100%; object-fit: cover; }
.seat-mini.filled { border-style: solid; border-color: #fff; box-shadow: var(--shadow-s); }
.room-view { display: grid; gap: 16px; }
.room-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.room-head h2 { font-size: 22px; }
.seat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seat { position: relative; border-radius: 24px; overflow: hidden; min-height: 320px; background: linear-gradient(180deg, #f2f8ff, #d6e7ff); border: 2px solid #fff; box-shadow: var(--shadow-s); display: flex; flex-direction: column; }
.seat .art { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-top: 12px; background: radial-gradient(120px 90px at 50% 88%, #fff, transparent 70%); }
.seat .art img { height: 240px; width: auto; max-width: 90%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(14, 38, 86, 0.25)); }
.seat .info { padding: 12px 14px; background: #fff; display: flex; align-items: center; gap: 10px; }
.seat .info img { width: 34px; height: 34px; border-radius: 50%; }
.seat .info b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .no { position: absolute; top: 10px; left: 12px; font-weight: 800; color: var(--ro-blue-700); background: rgba(255, 255, 255, 0.9); border-radius: 10px; padding: 2px 10px; font-size: 13px; }
.seat .host { position: absolute; top: 10px; right: 12px; }
.seat.empty-seat { border: 2px dashed var(--ro-blue-200); background: rgba(255, 255, 255, 0.6); align-items: center; justify-content: center; color: var(--ink-3); }
.seat.ready { border-color: #54d8b3; box-shadow: 0 0 0 3px rgba(84, 216, 179, 0.25), var(--shadow-s); }
.seat.offline { filter: grayscale(0.8); opacity: 0.7; }
.ready-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ready-pill.yes { background: var(--ro-mint-100); color: #0b7a64; }
.ready-pill.no { background: #f1f4fa; color: var(--ink-3); }
.room-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.countdown { position: fixed; inset: 0; z-index: 250; display: none; place-items: center; background: rgba(8, 20, 48, 0.55); backdrop-filter: blur(4px); }
.countdown.on { display: grid; }
.countdown b { font-size: 160px; font-weight: 800; color: #fff; text-shadow: 0 10px 40px rgba(63, 134, 242, 0.9); animation: zoom 1s ease-out infinite; }
@keyframes zoom { from { transform: scale(1.5); opacity: 0; } 30% { opacity: 1; } to { transform: scale(0.9); opacity: 0.2; } }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.pick-grid button { border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 4px; aspect-ratio: 1; overflow: hidden; }
.pick-grid button img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.pick-grid button.on { border-color: var(--ro-blue-500); box-shadow: var(--glow-blue); }

/* แชท (ในหน้า และแบบลอย) */
.chat { display: flex; flex-direction: column; height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #f7fbff, #fff); scroll-behavior: smooth; }
.msg { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; }
.msg img.a { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: var(--shadow-s); }
.msg .who { font-size: 12.5px; font-weight: 700; color: var(--ro-blue-700); display: flex; align-items: center; gap: 6px; }
.msg .who time { font-weight: 400; color: var(--ink-3); font-size: 11.5px; }
.msg .txt { margin-top: 2px; padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: #fff; border: 1px solid var(--line-2); font-size: 14px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; width: fit-content; max-width: 100%; }
.msg.mine { grid-template-columns: 1fr 34px; }
.msg.mine img.a { order: 2; }
.msg.mine .body { text-align: right; }
.msg.mine .who { justify-content: flex-end; }
.msg.mine .txt { margin-left: auto; border-radius: 16px 4px 16px 16px; background: linear-gradient(180deg, #e7f1ff, #d6e7ff); border-color: #c5dbff; text-align: left; }
.msg.sys { display: block; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.msg .staff { font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff9d7a, #f06a4a); border-radius: 6px; padding: 0 5px; }
.invite { margin-top: 4px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #fff7df, #fff); border: 1.5px solid #ffd982; display: grid; gap: 8px; max-width: 290px; }
.invite b { color: #7a5208; font-size: 14px; }
.invite small { color: var(--ink-2); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-2); background: #fff; }
.chat-form .input { min-height: 44px; border-radius: 999px; padding: 10px 16px; }
.chat-form .btn { flex: none; }
.dock-btn { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 10px; border-radius: 999px; border: 0; color: #fff; font-weight: 700; background: linear-gradient(180deg, #5aa2ff, #2458c9); box-shadow: 0 12px 28px rgba(36, 88, 201, 0.42); }
.dock-btn img { width: 38px; height: 38px; border-radius: 50%; background: #fff; object-fit: cover; }
.dock-btn .n { font-size: 12px; font-weight: 600; opacity: 0.9; display: flex; align-items: center; gap: 5px; }
.dock-btn .unread { position: absolute; top: -4px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ro-pink); font-size: 12px; display: none; place-items: center; box-shadow: 0 0 0 3px #fff; }
.dock-btn .unread.on { display: grid; }
.dock { position: fixed; right: 18px; bottom: 84px; z-index: 71; width: 370px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-l); background: #fff; transform: translateY(16px) scale(0.98); opacity: 0; pointer-events: none; transition: transform 0.22s ease, opacity 0.22s ease; border: 1px solid var(--line); }
.dock.on { transform: none; opacity: 1; pointer-events: auto; }
.dock .window-head { min-height: 52px; padding: 0 12px 0 16px; }
.dock .chat { height: min(62vh, 520px); }
.guest-chat { padding: 26px 20px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.guest-chat img { width: 120px; }
@media (max-width: 640px) {
  .dock { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 24px 24px 0 0; }
  .dock .chat { height: 70vh; }
  /* ผู้ใช้ 09-26: แคปซูล "ออนไลน์" ทับเนื้อหา/ท้ายเว็บบนมือถือ → เหลือปุ่มกลมโพริง + จุดเขียวแทนคำว่าออนไลน์ · ท้ายเว็บเว้นที่ให้เลื่อนพ้นปุ่ม */
  .dock-btn { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; padding: 0; gap: 0; justify-content: center; }
  .dock-btn img { width: 42px; height: 42px; }
  .dock-btn .lbl, .dock-btn .n { display: none; }
  .dock-btn::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #22c58f; box-shadow: 0 0 0 2px #fff; }
  body:not([data-nodock]) .site-footer .container { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------- แจ้งปัญหา */
.support { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.drop { display: grid; place-items: center; gap: 6px; padding: 18px; border-radius: 18px; border: 2px dashed var(--ro-blue-300); background: var(--ro-blue-50); color: var(--ink-2); text-align: center; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.drop:hover, .drop.over { background: #fff; border-color: var(--ro-blue-500); }
.drop .ico { width: 38px; height: 38px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-s); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(8, 20, 48, 0.7); color: #fff; font-size: 13px; display: grid; place-items: center; }
.ticket-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink); }
.ticket-row:hover { background: #fff; box-shadow: var(--shadow-s); color: var(--ink); }
.status { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-new { background: var(--ro-blue-100); color: var(--ro-blue-700); }
.status-open { background: var(--ro-gold-100); color: #8a5a06; }
.status-waiting { background: var(--ro-pink-100); color: #b82e5a; }
.status-resolved { background: var(--ro-mint-100); color: #0b7a64; }
.status-closed { background: #eef1f6; color: #6b778f; }
.thread { display: grid; gap: 10px; margin-top: 14px; }
.reply { padding: 12px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); }
.reply.staff { background: linear-gradient(180deg, #fff9e8, #fff); border-color: #ffe29a; }
.reply small { color: var(--ink-3); }

/* ---------------------------------------------------------------- ท้ายเว็บ */
.site-footer { margin-top: 40px; background: linear-gradient(180deg, #0e2656, #0a1c42); color: #b7c7e6; font-size: 13.5px; }
.site-footer .container { padding-top: 30px; padding-bottom: 30px; display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center; }
.site-footer img { width: 170px; height: auto; opacity: 0.95; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: #dce7ff; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 16px; font-size: 12.5px; color: #8fa3c9; line-height: 1.7; }
.page-home .site-footer { margin-top: 30px; }

/* ---------------------------------------------------------------- GM */
.gm { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.gm-nav { position: sticky; top: calc(var(--topbar-h) + var(--header-h) + 14px); display: grid; gap: 6px; }
.gm-nav button { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; color: var(--ro-navy); font-weight: 600; text-align: left; }
.gm-nav button.on { background: var(--ro-navy); color: #fff; border-color: var(--ro-navy); }
.gm-nav .n { margin-left: auto; min-width: 22px; height: 22px; border-radius: 999px; background: var(--ro-pink); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }
.gm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.table th { color: var(--ink-3); font-weight: 600; font-size: 12.5px; background: var(--panel-2); position: sticky; top: 0; }
.table tr:hover td { background: #fbfdff; }
.table img { width: 30px; height: 30px; border-radius: 50%; }
.table-wrap { overflow: auto; max-height: 70vh; border-radius: 14px; border: 1px solid var(--line-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.warn-box { padding: 14px 16px; border-radius: 16px; background: #fff4e5; border: 1px solid #ffd79a; color: #7a4d06; font-size: 14px; }

/* ---------------------------------------------------------------- ตอบสนองขนาดจอ */
@media (max-width: 1180px) {
  /* ห้องลองชุดย้ายขึ้นเหนือรายการสินค้า (เดิมซ่อนบนจอเล็ก — ลองสวมใส่ต้องใช้ได้ทุกจอ) */
  .shop { grid-template-columns: 190px 1fr; grid-template-areas: "cats doll" "cats items"; }
  .shop > .shop-cats { grid-area: cats; }
  .shop > section { grid-area: items; }
  .shop > .doll { grid-area: doll; position: static; }
  .shop .doll-stage { height: 313px; }
}
@media (max-width: 1080px) {
  .hero { height: auto; min-height: 0; aspect-ratio: 9 / 13; max-height: 760px; }
  .hero-bg img { object-position: 50% 20%; }
  .hero-center { top: calc(var(--header-h) + 36%); }
  .play-btn { width: 190px; height: 190px; }
  .home-sheet { margin-top: -110px; }
  .home-sheet .sheet { padding: 14px; border-radius: 26px; }
  .home-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .carousel { aspect-ratio: auto; height: auto; min-height: 0; }
  .slide { position: relative; display: none; }
  .slide.on { display: block; }
  .slide img { position: relative; aspect-ratio: 16 / 8; height: auto; transform: none !important; }
  .slide::after { display: none; }
  .slide-text { position: relative; transform: none; right: auto; top: auto; width: 100%; padding: 16px 16px 58px; }
  .car-dots { bottom: 22px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .class-detail { grid-template-columns: 1fr; }
  .pose-stage { height: 360px; }
  .pose-stage img { height: 340px; }
  .platform-grid { grid-template-columns: 1fr 1fr; }
  .device-row { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .lobby { grid-template-columns: 1fr; }
  .support { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .gm { grid-template-columns: 1fr; }
  .gm-nav { position: static; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .stage-row { grid-template-columns: 1fr 1fr; }
  .soon-hero { min-height: 0; }
  .soon-hero img { position: relative; aspect-ratio: 16 / 8; height: auto; }
  .soon-hero::after { display: none; }
  .soon-hero .txt { position: relative; transform: none; right: auto; top: auto; width: 100%; padding: 20px; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .container { padding: 0 14px; }
  .shop { grid-template-columns: 1fr; grid-template-areas: "cats" "doll" "items"; }
  /* หัวหน้าต่างร้านค้า: ชื่อ + เหรียญแถวแรก · แท็บเต็มแถวที่สอง (เดิมเบียดกันจนชื่อหักบรรทัด) */
  .page-shop .window-head { flex-wrap: wrap; row-gap: 10px; }
  .page-shop .window-head .tabs { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .page-shop .window-head .tabs .tab { flex: 1; padding: 0 10px; }
  .shop .doll-stage { height: 280px; }
  .shop .gear-slots { grid-template-columns: repeat(8, 1fr); gap: 4px; }
  .shop .gear small { display: none; }
  .shop-cats { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .shop-cat { flex: none; height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
  .shop-cat .ico { width: 24px; height: 24px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .slot { width: 88px; height: 88px; }
  .news-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .stat-tiles, .gm-tiles { grid-template-columns: 1fr 1fr; }
  .seat-row { grid-template-columns: 1fr; }
  .seat { min-height: 0; flex-direction: row; }
  .seat .art { width: 42%; min-height: 150px; }
  .seat .art img { height: 150px; }
  .seat .info { flex: 1; flex-direction: column; align-items: flex-start; justify-content: center; }
  .podium { grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 26px 10px 0; min-height: 0; }
  .pod .ava { width: 70px; height: 70px; }
  .pod.p1 .ava { width: 88px; height: 88px; }
  .pod .name { font-size: 13.5px; }
  .pod .time { font-size: 15px; }
  .pod .base { height: 70px; font-size: 28px; }
  .pod.p1 .base { height: 96px; }
  .pod.p3 .base { height: 56px; }
  .crown { width: 40px; top: -22px; }
  .rank-row { grid-template-columns: 38px 38px 1fr auto; padding: 10px 12px; }
  .rank-row .tier { display: none; }
  .kv-list > div { grid-template-columns: 1fr; gap: 2px; }
  .window-body { padding: 16px; }
  .article .window-body { padding: 18px; }
  .spec-table th, .spec-table td { padding: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .around { grid-template-columns: 1fr; }
  .stage-row { grid-template-columns: 1fr; }
  .guide-card .txt { width: 62%; }
  .site-footer .container { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; }
  .site-footer img { margin: 0 auto; }
}

/* ---------------------------------------------------------------- สถานะสมาชิก (สลับด้วยคลาสบน <html>) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
html:not(.me-known) .guest-only, html:not(.me-known) .member-only { visibility: hidden; }
html:not(.is-member) .member-only { display: none !important; }
html.is-member .guest-only { display: none !important; }
html:not(.is-staff) .staff-only { display: none !important; }
.site-header.scrolled .gnb { background: rgba(255, 255, 255, 0.96); box-shadow: 0 8px 24px rgba(14, 38, 86, 0.1); }
.user-chip.btn-plain { border: 0; cursor: pointer; }

/* ปุ่มเข้าเล่นคร่อมขอบแผ่นเนื้อหา + รอยเว้าบนแบนเนอร์ (แบบธีมเดิม) — เดสก์ท็อป */
@media (min-width: 1081px) {
  .hero-center { top: auto; bottom: 22px; z-index: 6; }
  .carousel { -webkit-mask: radial-gradient(circle 142px at 50% -4px, transparent 141px, #000 142.5px); mask: radial-gradient(circle 142px at 50% -4px, transparent 141px, #000 142.5px); }
}
.car-count { white-space: nowrap; min-width: 64px; }
.car-count { display: inline-flex; align-items: center; }
.drawer { box-shadow: none; }
.drawer.on { box-shadow: var(--shadow-l); }
@media (min-width: 1081px) {
  .slide-text { right: 3.5%; width: min(35%, 440px); top: 57%; }
  .slide-title { font-size: clamp(22px, 2.7vw, 40px); }
}

/* ---------------------------------------------------------------- หน้าเข้าเล่น (ตรวจบัญชี → ซิงก์เซฟ → เข้าเอนจิน) */
.launch { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; overflow: hidden; }
.launch-bg { position: absolute; inset: 0; }
.launch-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: kenburns 16s ease-in-out infinite alternate; }
.launch::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(70% 80% at 50% 45%, rgba(234, 244, 255, 0.1), rgba(14, 38, 86, 0.62)); }
.launch-card { position: relative; z-index: 2; width: min(500px, 100%); padding: 22px 24px 20px; text-align: center; border-radius: var(--radius-xl); background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: var(--shadow-l); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: rise 0.5s ease both; }
.launch-logo { display: block; width: min(320px, 78%); height: auto; margin: 0 auto 12px; filter: drop-shadow(0 6px 14px rgba(14, 38, 86, 0.22)); }
.launch-who { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; margin-bottom: 14px; border-radius: 999px; background: var(--ro-blue-50); border: 1px solid var(--line); text-align: left; }
.launch-who img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-s); object-fit: cover; background: #fff; }
.launch-who small { display: block; font-size: 11px; line-height: 1.2; color: var(--ink-3); }
.launch-who b { font-size: 16px; line-height: 1.3; color: var(--ro-navy); }
.launch-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; text-align: left; }
.launch-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink-3); transition: background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.launch-steps li > div { min-width: 0; }
.launch-steps li b { display: block; font-size: 14px; line-height: 1.35; color: inherit; }
.launch-steps li small { display: block; font-size: 12px; line-height: 1.4; }
.launch-steps li i { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; line-height: 1; }
.launch-steps li.run { color: var(--ink); background: #fff; border-color: var(--ro-blue-300); box-shadow: var(--glow-blue); }
.launch-steps li.run i { border-color: var(--ro-blue-500); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.launch-steps li.ok { color: var(--ink); background: #fff; }
.launch-steps li.ok i { background: var(--ro-mint); border-color: var(--ro-mint); color: #fff; }
.launch-steps li.ok i::before { content: "✓"; }
.launch-steps li.bad { color: #b3263b; background: #fff7f8; border-color: var(--ro-red-100); }
.launch-steps li.bad i { background: var(--ro-red); border-color: var(--ro-red); color: #fff; }
.launch-steps li.bad i::before { content: "!"; }
.launch-bar { height: 8px; margin: 2px 0 12px; border-radius: 999px; background: var(--ro-blue-100); overflow: hidden; }
.launch-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ro-gold-600), var(--ro-gold-300)); box-shadow: 0 0 12px rgba(242, 181, 58, 0.6); transition: width 0.5s ease; }
.launch-tip { min-height: 3.2em; margin: 0 0 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.launch-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.launch-keys { position: absolute; z-index: 2; right: 22px; bottom: 22px; width: 250px; padding: 14px 16px; border-radius: var(--radius-l); background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; }
.launch-keys > b { display: block; margin-bottom: 8px; color: var(--ro-navy); font-size: 13.5px; }
.launch-keys dl { display: grid; gap: 6px; margin: 0; }
.launch-keys dl > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.launch-keys dt { display: flex; gap: 4px; }
.launch-keys dd { margin: 0; color: var(--ink-2); }
.kbd { display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 7px; border-radius: 7px; background: #fff; border: 1px solid var(--line); border-bottom-width: 3px; font-size: 12px; font-weight: 700; color: var(--ro-navy); }
@media (max-width: 1080px), (pointer: coarse) { .launch-keys { display: none; } }
@media (max-width: 760px) {
  .launch { align-items: end; padding: 16px 16px 22px; }
  .launch-card { padding: 18px 16px 16px; }
  .launch-logo { width: min(240px, 72%); }
}
@media (prefers-reduced-motion: reduce) { .launch-bg img, .launch-card { animation: none; } }

/* ตัวเลือกเมื่อเซฟในเครื่องไม่ตรงกับบนคลาวด์ */
.sync-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.sync-side { padding: 12px 14px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); margin: 10px 0; }
.sync-cmp .sync-side { margin: 0; }
.sync-side h4 { margin: 0; font-size: 15px; color: var(--ro-navy); }
.sync-side .t { margin: 2px 0 8px; font-size: 12px; color: var(--ink-3); }
.sync-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sync-side li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.sync-side li span { color: var(--ink-3); }
.sync-chars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip img.a { width: 22px; height: 22px; margin-left: -8px; border-radius: 50%; object-fit: cover; background: #fff; }
@media (max-width: 560px) { .sync-cmp { grid-template-columns: 1fr; } }

/* โปรไฟล์: การ์ดประจำตัวแคบ → ช่องสถิติ 2 คอลัมน์ */
.id-card .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; text-align: left; }
.id-card .tile { padding: 10px 12px; }
.id-card .tile b { font-size: 19px; }
.save-row > .btn { align-self: center; justify-self: end; }
.window-body > .room-actions + .section-title { margin-top: 24px; }

/* ---------------------------------------------------------------- หลังบ้าน GM */
.gm { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.gm-nav { position: sticky; top: calc(var(--header-h) + 12px); }
.gm-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--ro-navy); font-size: 16px; }
#gmTabs { display: grid; gap: 4px; }
#gmTabs button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-s); background: none; font: inherit; font-size: 14.5px; color: var(--ink-2); text-align: left; cursor: pointer; }
#gmTabs button:hover { background: var(--ro-blue-50); color: var(--ink); }
#gmTabs button.on { background: var(--ro-blue-100); color: var(--ro-navy); font-weight: 700; }
.gm-badge:empty { display: none; }
.gm-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ro-red); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.gm-note { margin: 14px 0 0; font-size: 12px; }
.gm-main { display: grid; gap: 18px; min-width: 0; }
.gm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gm-tiles .tile span { display: block; font-size: 12px; }
.gm-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.gm-inline > .field { flex: 1 1 160px; margin-bottom: 0; }
.gm-inline > .input { flex: 1 1 260px; max-width: 420px; }
.gm-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.gm-table th { position: sticky; top: 0; padding: 9px 10px; background: var(--panel-2); color: var(--ink-3); font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.gm-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.gm-table tr.click { cursor: pointer; }
.gm-table tr.click:hover td, .gm-table tr.click:focus-visible td { background: var(--ro-blue-50); }
.gm-user { display: inline-flex; align-items: center; gap: 8px; }
.gm-user img { border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.gm-user.big { display: flex; margin-bottom: 8px; }
.gm-user.big b { font-size: 18px; color: var(--ro-navy); }
.state.bad { background: var(--ro-red-100); color: #b3263b; }
.state.t-new { background: var(--ro-red-100); color: #b3263b; }
.state.t-open { background: var(--ro-blue-100); color: var(--ro-blue-800); }
.state.t-waiting { background: var(--ro-gold-100); color: #8a5a06; }
.state.t-resolved { background: var(--ro-mint-100); color: #0b7a64; }
.state.t-closed { background: var(--line-2); color: var(--ink-3); }
.gm-ticket-body { margin: 10px 0 12px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--panel-2); border: 1px solid var(--line-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.gm-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.gm-files img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.gm-thread { display: grid; gap: 8px; margin-bottom: 12px; }
.gm-msg { display: block; padding: 10px 12px; border-radius: var(--radius-s); background: #fff; border: 1px solid var(--line-2); }
.gm-msg.staff { background: var(--ro-blue-50); border-color: var(--ro-blue-200); }
.gm-msg-meta { font-size: 12px; color: var(--ink-3); }
.gm-msg-txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.gm-device { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.gm-md { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.gm-item { border-radius: 8px; background: var(--panel-2); object-fit: contain; }
.gm-del { text-decoration: line-through; }
.gm-meta { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
@media (max-width: 1080px) {
  .gm { grid-template-columns: 1fr; }
  .gm-nav { position: static; }
  #gmTabs { grid-template-columns: repeat(4, 1fr); }
  .gm-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  #gmTabs { grid-template-columns: repeat(2, 1fr); }
  .gm-table thead { display: none; }
  .gm-table tr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .gm-table td { border: 0; padding: 3px 4px; }
  .gm-table td[data-th]:not([data-th=""])::before { content: attr(data-th) " · "; color: var(--ink-3); font-size: 12px; }
}

/* ---------------------------------------------------------------- 404 */
.nf { max-width: 620px; margin: 30px auto; text-align: center; }
.nf .window-body { padding: 34px 28px 30px; }
.nf-art { width: 200px; height: auto; margin: 0 auto -6px; display: block; animation: floaty 3.2s ease-in-out infinite; }
.nf-code { display: block; font-size: 64px; line-height: 1; font-weight: 800; color: var(--ro-blue-200); letter-spacing: 4px; }
.nf h1 { font-size: 24px; margin: 6px 0; color: var(--ro-navy); }
.nf .room-actions { justify-content: center; margin-top: 16px; }

/* ---------------------------------------------------------------- ปุ่มเข้าเล่น: วงระยิบระยับ (canvas · play.js) + โพริ่งดุ๊กดิ๊ก */
.hero { overflow: visible; }
.hero-bg { overflow: hidden; }                                        /* เงาปุ่มตกลงบนแผ่นขาวได้ ไม่ถูกตัดขอบ */
.play-btn .play-fx { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; display: block; }
.play-poring { position: absolute; top: 44%; left: 69.6%; width: 20%; aspect-ratio: 360 / 289; pointer-events: none; }
.play-btn .play-poring img { position: absolute; height: auto; }
.play-poring .pb { left: 0; bottom: 0; width: 100%; transform-origin: 50% 100%; animation: poring-squish 1.7s cubic-bezier(.45, 0, .55, 1) infinite; filter: drop-shadow(0 3px 3px rgba(4, 14, 70, 0.45)); }
.play-poring .ph { width: 20%; left: 42.7%; top: -26.4%; transform-origin: 50% 100%; animation: heart-bob 1.7s ease-in-out infinite; }
@keyframes poring-squish {
  0%, 100% { transform: translateY(0) scale(1.07, 0.93); }
  14% { transform: translateY(0) scale(0.93, 1.08); }
  36% { transform: translateY(-17%) scale(0.98, 1.03) rotate(-5deg); }
  56% { transform: translateY(0) scale(1.12, 0.88) rotate(4deg); }
  72% { transform: translateY(0) scale(0.96, 1.05) rotate(-2deg); }
  86% { transform: translateY(0) scale(1.03, 0.97) rotate(1deg); }
}
@keyframes heart-bob {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  30% { transform: translateY(-38%) scale(1.2) rotate(-10deg); }
  48% { transform: translateY(-30%) scale(0.92) rotate(8deg); }
  66% { transform: translateY(-12%) scale(1.08) rotate(-4deg); }
}
.play-btn:hover .pb, .play-btn:focus-visible .pb, .play-btn:hover .ph, .play-btn:focus-visible .ph { animation-duration: 0.9s; }
@media (prefers-reduced-motion: reduce) { .play-poring .pb, .play-poring .ph { animation: none; } }

/* มือถือ/แท็บเล็ต: โครงเดียวกับคอม — ปุ่มกลมใหญ่คร่อมขอบบนแผ่นขาว · แบนเนอร์เว้ารับปุ่ม */
@media (max-width: 1080px) {
  .hero-center { top: auto; bottom: 16px; z-index: 6; }
  .play-btn { width: 170px; height: 170px; }
  .home-sheet { margin-top: -101px; }
  .home-sheet .sheet { padding-top: 70px; }
  .carousel { -webkit-mask: radial-gradient(circle 97px at 50% -70px, transparent 96px, #000 97.5px); mask: radial-gradient(circle 97px at 50% -70px, transparent 96px, #000 97.5px); }
}
@media (max-width: 760px) {
  .hero { aspect-ratio: 3 / 4; max-height: 72vh; max-height: 72svh; }
  .play-btn { width: 150px; height: 150px; }
  .hero-center { bottom: 14px; }
  .home-sheet { margin-top: -89px; }
  .home-sheet .sheet { padding-top: 60px; }
  .carousel { -webkit-mask: radial-gradient(circle 86px at 50% -60px, transparent 85px, #000 86.5px); mask: radial-gradient(circle 86px at 50% -60px, transparent 85px, #000 86.5px); }
  .slide img { aspect-ratio: 4 / 3; object-position: center; }
}

/* โลโก้ใหม่ RAGNARÖK BATTLE ONLINE EX (สัดส่วน 1.82 : 1 — สูงกว่าโลโก้เดิม) */
.gnb-logo a { width: 210px; top: 6px; }
@media (max-width: 1080px) { .gnb-logo a { width: 100px; } }
.site-footer img { width: 190px; height: auto; }   /* ต้องมี height:auto — แอตทริบิวต์ height=209 ในหน้าเว็บทำให้โลโก้ถูกบีบ (ผู้ใช้แจ้ง 09-26) */
.drawer-head img { width: 132px; height: auto; }
/* พื้นสำรองของปุ่มก่อน canvas วาดเสร็จ (โหลดช้า/ปิดสคริปต์) — หน้าตาเดียวกันแบบนิ่ง */
.play-btn { container-type: inline-size; background: radial-gradient(circle at 50% 96%, #43b0ff 0%, #1f6cf0 30%, #1238c2 62%, #0a1c86 100%); box-shadow: inset 0 0 0 4.5cqw #4fd2ff, inset 0 0 0 5.2cqw rgba(255, 255, 255, 0.55); }
.play-btn.fx-on { background: none; box-shadow: none; }
/* พื้นสำรองก่อน JS วาด = ภาพคำว่าเข้าเล่นภาพเดียวกับ canvas (ตำแหน่งตรงกับ play.js: fs 19% · จุดเริ่ม 10.4% · แนวกลาง 53%) */
.play-btn .play-fallback { position: absolute; left: 3.95%; top: 35.63%; width: 69.58%; height: auto; pointer-events: none; }
.play-btn.fx-on .play-fallback { display: none; }

/* ผู้ใช้ 09-25: มือถือ "การ์ดเข้าเล่นลงมาต่ำเกิน — ดึงขึ้นเยอะ ๆ" → ฮีโร่เตี้ยลง ปุ่ม+แบนเนอร์ขึ้นมาอยู่ครึ่งบนของจอ */
@media (max-width: 1080px) {
  .hero { aspect-ratio: auto; height: min(62vw, 560px); min-height: 0; max-height: none; }
  .hero-bg img { object-position: 50% 24%; }
}
@media (max-width: 760px) {
  .hero { height: min(92vw, 370px); max-height: none; }
  .hero-bg img { object-position: 50% 20%; }
}

/* ตัวเลือก B (ผู้ใช้เสนอ 09-25): คงฮีโร่สูงเดิม + มอคอัพมือถือแนวนอนมีเกมจริงของเราในจอ ตรงช่องว่างกลางรูป · สลับด้วยคลาส .hero--phone */
.hero-phone { display: none; }
.phone { position: relative; aspect-ratio: 19.5 / 9; padding: 2.2% 2.5%; border-radius: 13% / 28%;
  background: linear-gradient(160deg, #50566363 0%, #1b1e25 16%, #0b0d12 52%, #1d2129 84%, #4a505c 100%), #0b0d12;
  box-shadow: inset 0 0 0 1px rgba(170, 180, 200, 0.55), inset 0 0 0 3.5px #07090c, 0 24px 44px rgba(8, 24, 60, 0.42), 0 6px 14px rgba(8, 24, 60, 0.28); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10% / 22%; background: #000; }
.phone::after { content: ""; position: absolute; inset: 2.2% 2.5%; border-radius: 10% / 22%; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 26%, rgba(255, 255, 255, 0) 40%); }
.phone .island { position: absolute; left: 3.4%; top: 50%; width: 1.9%; height: 25%; transform: translateY(-50%); border-radius: 999px; background: #020305; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.phone .vol, .phone .pwr { position: absolute; height: 1.5%; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #6b717d, #2a2e36); }
.phone .vol { top: -1.2%; left: 16%; width: 13%; }
.phone .pwr { bottom: -1.2%; left: 24%; width: 10%; border-radius: 0 0 3px 3px; }
@keyframes phone-float { 50% { transform: translate(-50%, -52%); } }
@media (max-width: 1080px) {
  .hero.hero--phone { height: auto; aspect-ratio: 9 / 11; max-height: 820px; }
  .hero--phone .hero-phone { display: block; position: absolute; z-index: 2; left: 50%; top: 42%; width: min(74vw, 600px); transform: translate(-50%, -50%);
    animation: phone-float 6s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.35)); }
}
@media (max-width: 760px) {
  .hero.hero--phone { aspect-ratio: 3 / 4; max-height: 72vh; max-height: 72svh; height: auto; }
  .hero--phone .hero-phone { width: min(82vw, 380px); top: 44%; }
}
@media (prefers-reduced-motion: reduce) { .hero--phone .hero-phone { animation: none; } }

/* ---- ร้านค้า: ยังไม่เข้าสู่ระบบ (ผู้ใช้กำหนด 09-25 ร้านค้าเฉพาะสมาชิก) */
.shop-gate { grid-column: 1 / -1; max-width: 560px; margin: 8px auto 12px; padding: 0 22px 26px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-s); overflow: hidden; }
.shop-gate .gate-art { margin: 0 -22px 18px; }
.shop-gate h2 { font-size: 22px; margin: 0 0 8px; }
.shop-gate p { margin: 0 0 14px; }
.shop-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 14px; }
.shop-gate-actions .btn { min-width: 150px; }
