/* =====================================================================
   Over Tails Online - Neo-Fantasy & Glassmorphism Theme
   Designed for modern MMO portal with sleek Top Navigation Bar
   Colors: Obsidian Void, Electric Cyan (#00d2ff), Solar Amber (#ffb834)
   ===================================================================== */

:root {
  color-scheme: dark;
  --bg: #06080d;
  --bg-mesh: radial-gradient(at 0% 0%, rgba(0, 210, 255, 0.12) 0px, transparent 55%),
             radial-gradient(at 100% 0%, rgba(255, 184, 52, 0.10) 0px, transparent 50%),
             radial-gradient(at 50% 100%, rgba(0, 150, 255, 0.08) 0px, transparent 60%),
             #06080d;
  --panel: rgba(13, 17, 26, 0.78);
  --panel-solid: #0d121c;
  --panel2: rgba(20, 26, 40, 0.72);
  --panel3: rgba(28, 36, 56, 0.65);
  --line: rgba(0, 210, 255, 0.14);
  --line2: rgba(255, 184, 52, 0.20);
  --line-subtle: rgba(255, 255, 255, 0.07);
  --text: #f3f6fc;
  --muted: #8a99b5;
  --gold: #ffb834;
  --gold2: #ffe082;
  --cyan: #00d2ff;
  --cyan2: #80e7ff;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  --gold-glow: rgba(255, 184, 52, 0.30);
  --red: #ff5c5c;
  --green: #00e676;
  --r: 18px;
  --glass-blur: blur(18px) saturate(140%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  background: var(--bg-mesh);
  background-color: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Sarabun", "Kanit", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3, .brand, .kicker, .nav, .price, .stat b, .chip, button.primary, .btn, .boss-title {
  font-family: "Kanit", "Leelawadee UI", sans-serif;
}
h1, h2, h3 { letter-spacing: .2px; }

a { color: var(--cyan2); text-decoration: none; transition: color .15s ease; }
a:hover { color: #fff; }
.muted { color: var(--muted); }
.center { text-align: center; }
.err { color: var(--red); min-height: 1.4em; margin: 6px 0 0; }
.msg { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }
.msg.ok { color: var(--green); } .msg.bad { color: var(--red); }

/* SVG sprites */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic, .ni { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; flex: none; }

/* =====================================================================
   Top Navigation Bar (Header) - Neo-Fantasy Glass
   ===================================================================== */
.top {
  position: sticky; top: 0; z-index: 100;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: rgba(6, 8, 13, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: none;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 16px;
  box-sizing: border-box;
}

/* Brand logo & title */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.45));
  transition: transform .25s ease;
}
.brand:hover .brand-logo {
  transform: scale(1.05);
}
.b1 {
  background: linear-gradient(135deg, #ffe082 0%, #ffb834 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.b2 {
  background: linear-gradient(135deg, #a5f0ff 0%, #00d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  margin-left: 2px;
}

/* Horizontal Top Navigation */
.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.top-nav .nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: all .16s ease;
  white-space: nowrap;
}
.top-nav .nav:hover {
  color: #fff;
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.25);
}
.top-nav .nav.on {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.22), rgba(255, 184, 52, 0.16));
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
  font-weight: 600;
}
.top-nav .nav .ni {
  color: inherit;
  transition: transform .16s ease;
}
.top-nav .nav:hover .ni, .top-nav .nav.on .ni {
  transform: scale(1.12);
  color: var(--cyan);
}
.top-nav .nav.on .ni {
  color: var(--gold2);
}

/* Top right: who / guest buttons */
.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all .16s ease;
}
.who:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.25);
}
.who.on {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.18), rgba(255, 184, 52, 0.12));
  border-color: rgba(0, 210, 255, 0.5);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.22);
}
.who:hover .who-name span {
  color: var(--cyan2);
}
.who-name {
  display: flex;
  flex-direction: column;
  text-align: right;
  min-width: 0;
  line-height: 1.2;
}
.who-name span {
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who-name small {
  color: var(--muted);
  font-size: 11px;
}

.jil {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 184, 52, 0.10);
  border: 1px solid rgba(255, 184, 52, 0.35);
  padding: 3px 9px 3px 5px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 184, 52, 0.15);
  font-size: 13px;
}
.coin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #2b1800;
  background: linear-gradient(135deg, #ffe082, #ffb834);
  box-shadow: 0 0 8px rgba(255, 184, 52, 0.5);
}

.guest-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

button.btn-logout-top, .btn-logout-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 92, 92, 0.3);
  background: rgba(255, 92, 92, 0.08);
  color: #ff8585;
  flex-shrink: 0;
  cursor: pointer;
  box-sizing: border-box;
  transition: all .18s ease;
}
button.btn-logout-top[hidden], .btn-logout-top[hidden] {
  display: none !important;
}
button.btn-logout-top:hover {
  background: rgba(255, 92, 92, 0.22);
  border-color: rgba(255, 92, 92, 0.6);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 92, 92, 0.35);
  transform: scale(1.05);
}
.btn-logout-top .ni {
  width: 16px;
  height: 16px;
  color: inherit;
}

button.menu-btn, .menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid var(--line);
  background: rgba(13, 17, 26, 0.85);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: all .18s ease;
}
button.menu-btn[hidden], .menu-btn[hidden] {
  display: none !important;
}
.menu-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}
.menu-btn .ic {
  width: 18px;
  height: 18px;
}

/* =====================================================================
   Shell & Content Area
   ===================================================================== */
.shell {
  display: block;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

main {
  width: 100%;
  padding: 28px 24px 80px;
  min-width: 0;
}

/* Mobile Sidebar Drawer (Only on small screens) */
.side {
  display: none;
}

@media (max-width: 1280px) {
  .top-nav .nav .ni { display: none; }
  .top-nav .nav { padding: 4px 7px; font-size: 12.5px; }
  .brand { font-size: 15px; }
  .brand-logo { height: 32px; }
  .top-bar { padding: 6px 12px; gap: 6px; }
  .who { padding: 2px 6px; gap: 6px; }
  .who-name span { font-size: 12px; }
}

@media (max-width: 1000px) {
  .top-nav { display: none; }
  /* same specificity as "button.menu-btn { display: none }" above, or the phone menu never shows */
  button.menu-btn, .menu-btn { display: grid; }
  .side {
    display: flex;
    position: fixed;
    z-index: 150;
    top: 60px;
    right: 0;
    width: 280px;
    height: calc(100vh - 60px);
    padding: 20px 16px;
    flex-direction: column;
    gap: 6px;
    background: rgba(9, 12, 18, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
  }
  .side.open {
    transform: translateX(0);
  }
  .side .nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .15s;
  }
  .side .nav:hover {
    color: #fff;
    background: rgba(0, 210, 255, 0.1);
    border-color: rgba(0, 210, 255, 0.25);
  }
  .side .nav.on {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(255, 184, 52, 0.15));
    border-color: var(--cyan);
    font-weight: 600;
  }
  .side-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-subtle);
  }
  .avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 18px;
    color: #110e08;
    background: linear-gradient(135deg, var(--gold2), var(--gold));
    box-shadow: 0 0 16px var(--gold-glow);
  }
}

/* =====================================================================
   Cards & Glass Surfaces
   ===================================================================== */
.card {
  background: var(--panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.item, .mis, .vip-card, .trade, .boss, .char, .stat, .post {
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s, box-shadow .2s;
}
.item:hover, .mis:hover, .vip-card:hover, .trade:hover, .boss:hover, .char:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.6), 0 0 20px var(--cyan-glow);
}

.pad { padding: 22px 24px; }
.pad h2 { margin: 0 0 14px; font-size: 19px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sec {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  margin: 28px 2px 14px;
  color: #fff;
}
.sec::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--gold));
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* =====================================================================
   Buttons & Inputs
   ===================================================================== */
button, .btn {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(22, 28, 42, 0.6);
  color: var(--text);
  padding: 8px 18px;
  transition: all .18s ease;
  white-space: nowrap;
}
button:hover:not(:disabled), .btn:hover {
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 0 14px var(--cyan-glow);
}
button:disabled { opacity: .45; cursor: not-allowed; }

button.primary, .btn.primary {
  background: linear-gradient(135deg, #ffc84b 0%, #f39c12 50%, #e67e22 100%);
  color: #110e08;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 20px rgba(243, 156, 18, 0.35);
}
button.primary:hover:not(:disabled), .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(243, 156, 18, 0.55);
  color: #000;
}

button.ghost, .btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--text);
}
button.ghost:hover, .btn.ghost:hover {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--cyan);
}
button.wide { width: 100%; padding: 13px; font-size: 16px; }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: rgba(8, 11, 18, 0.85);
  border: 1px solid rgba(0, 210, 255, 0.16);
  border-radius: 12px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.22);
}

/* =====================================================================
   Home Banner & Page Heroes
   ===================================================================== */
.banner {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(0, 210, 255, 0.25);
  text-align: center;
  padding: 48px 24px 38px;
  background:
    radial-gradient(600px 240px at 50% 25%, rgba(0, 210, 255, 0.25), transparent 70%),
    radial-gradient(500px 300px at 80% 80%, rgba(255, 184, 52, 0.18), transparent 65%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.35) 0%, rgba(6, 8, 13, 0.94) 100%),
    var(--art, none) center 30% / cover no-repeat,
    #080c14;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), inset 0 0 60px rgba(0, 210, 255, 0.08);
}
.banner-logo {
  max-width: min(520px, 90%);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(0, 210, 255, 0.4)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8));
}
.banner-sub {
  margin: 10px 0 18px;
  letter-spacing: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan2);
  text-shadow: 0 0 16px var(--cyan-glow);
}
.banner-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.ghost-btn {
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}
.ghost-btn:hover {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--cyan);
}

.view > * + * { margin-top: 20px; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 34px 28px;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-color: var(--line);
  border-radius: 20px;
  margin-bottom: 22px;
  background:
    linear-gradient(90deg, rgba(6, 8, 13, 0.96) 0%, rgba(6, 8, 13, 0.82) 48%, rgba(6, 8, 13, 0.35) 100%),
    var(--art, none) center 70% / cover no-repeat,
    #0a0e18;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--gold), transparent 80%);
  opacity: .9;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  color: #fff;
}
.hero p {
  position: relative;
  max-width: 650px;
  color: #b0c0d8;
  margin: 8px 0 0;
}
.kicker {
  font-size: 11.5px;
  letter-spacing: 2.5px;
  color: var(--cyan);
  font-weight: 700;
  margin: 0 0 4px;
  text-shadow: 0 0 12px var(--cyan-glow);
}

/* =====================================================================
   Stats Grid
   ===================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.stat {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(14, 18, 28, 0.8);
  border: 1px solid var(--line);
}
.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
}
.stat small {
  color: var(--muted);
  display: block;
  font-size: 13px;
}
.stat b {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px var(--cyan-glow);
}

/* Global sleek scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(6, 8, 13, 0.7);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.22);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 255, 0.45);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, 0.25) rgba(6, 8, 13, 0.7);
}

/* =====================================================================
   Chips / Tabs
   ===================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 2px 10px;
  margin: 14px 0 18px;
}
.chip {
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all .16s ease;
}
.chip:hover {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(0, 210, 255, 0.1);
}
.chip[aria-selected="true"] {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.3), rgba(255, 184, 52, 0.2));
  color: #fff;
  border-color: var(--cyan);
  font-weight: 600;
  box-shadow: 0 0 16px var(--cyan-glow);
}
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan2);
  border: 1px solid rgba(0, 210, 255, 0.35);
}

/* =====================================================================
   Shop & Item Cards
   ===================================================================== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
.search.card {
  padding: 4px;
  background: rgba(12, 16, 26, 0.75);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  transition: border-color .18s, box-shadow .18s;
}
.search.card input {
  background: transparent;
  border: none;
  padding: 10px 16px;
  color: #fff;
  width: 100%;
}
.search.card input:focus {
  outline: none;
  box-shadow: none;
}
.search.card:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow);
}
.browse-head { margin: 6px 2px 12px; color: var(--muted); }
.browse-head b { color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}
.item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
  border-radius: 16px;
  background: rgba(13, 17, 26, 0.75);
}
.item-top { display: flex; gap: 12px; align-items: center; }
.icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #172033, #080c14 75%);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.6);
}
.icon img { width: 48px; height: 48px; image-rendering: auto; }
.icon .ph { color: var(--muted); font-weight: 800; }
.tag { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.item h3 { margin: 0; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; color: #fff; }
.item .num { color: var(--muted); font-size: 13px; }
.item .desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vip { font-size: 12px; color: #c9a6ff; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.price { font-weight: 800; color: var(--gold2); font-size: 18px; text-shadow: 0 0 12px var(--gold-glow); }
.btns { display: flex; gap: 6px; }
.btns button { padding: 6px 12px; font-size: 13px; }

/* Cart */
.cart { position: sticky; top: 76px; padding: 18px; border-radius: 18px; }
.cart-head { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-head small { display: block; color: var(--muted); }
.cart-ic {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.3);
  font-size: 18px;
}
.cart-list { display: grid; gap: 10px; margin: 14px 0; max-height: 46vh; overflow: auto; }
.cline { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.cline .icon { width: 40px; height: 40px; border-radius: 8px; }
.cline .icon img { width: 34px; height: 34px; }
.cline .nm { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; color: #fff; }
.cline .sub { font-size: 12px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { padding: 2px 8px; }
.qty span { min-width: 22px; text-align: center; }
.cart-foot { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; }

/* =====================================================================
   World Boss Cards & Events
   ===================================================================== */
.boss-now {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-radius: 18px;
}
.boss-now.live {
  border-color: rgba(255, 92, 92, 0.5);
  background: radial-gradient(400px 140px at 0 0, rgba(255, 92, 92, 0.22), transparent), var(--panel);
}
.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5c5c;
  margin-right: 8px;
  box-shadow: 0 0 12px #ff5c5c;
}

.boss-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin: 18px 0 28px;
}
.boss {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}
.boss.boss-interactive {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(13, 17, 26, 0.85);
}
.boss.boss-interactive:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--cyan-glow);
}
.boss-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 434 / 210;
  overflow: hidden;
  background: #060910;
}
.boss-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 434 / 210;
  object-fit: cover;
  object-position: center 65%;
  display: block;
  margin-bottom: 0;
  transition: transform .35s ease;
}
.boss.boss-interactive:hover .boss-img { transform: scale(1.05); }
.boss-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.boss-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}
.boss-badge.lv {
  background: linear-gradient(135deg, #ffc84b, #e69500);
  color: #110e08;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.boss-badge.players {
  background: rgba(8, 12, 20, 0.88);
  color: #fff;
  border: 1px solid rgba(0, 210, 255, 0.35);
}
.boss-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.boss-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.boss-title {
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
}
.boss-code {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 600;
  background: rgba(0, 210, 255, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0, 210, 255, 0.25);
}
.boss-subname {
  font-size: 12px;
  color: var(--gold2);
  margin-top: -4px;
}
.boss-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.boss-drops-preview {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.boss-drops-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.boss-drops-label { color: #d0d8e8; font-weight: 600; }
.boss-drops-count { color: var(--cyan); font-size: 11px; }
.boss-drops-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.boss-drop-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 210, 255, 0.14);
  border-radius: 6px;
  padding: 4px 7px 4px 5px;
  font-size: 11.5px;
  color: #eee;
  min-width: 0;
  transition: all .15s ease;
}
.boss-drop-chip:hover {
  background: rgba(0, 210, 255, 0.14);
  border-color: var(--cyan);
  transform: translateY(-1px);
}
.boss-drop-chip .icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #080c14;
  border: 1px solid rgba(0, 210, 255, 0.25);
  flex-shrink: 0;
}
.boss-drop-chip .icon img {
  width: 22px;
  height: 22px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.boss-drop-chip .icon .ph { font-size: 11px; }
.boss-drop-chip .drop-chip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.boss-drop-chip.more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 210, 255, 0.1);
  color: var(--cyan2);
  font-weight: 700;
  border-color: rgba(0, 210, 255, 0.3);
  padding: 4px 8px;
  cursor: pointer;
}
.boss-drop-chip.more:hover {
  background: rgba(0, 210, 255, 0.22);
  border-color: var(--cyan);
}
.boss-action {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.boss-btn-hint {
  font-size: 12px;
  color: var(--cyan2);
  font-weight: 600;
  transition: transform .15s ease;
}
.boss.boss-interactive:hover .boss-btn-hint { transform: translateX(3px); }

/* =====================================================================
   Library / Missions / Simulator
   ===================================================================== */
.mis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mis { padding: 12px 14px 14px; display: grid; gap: 4px; overflow: hidden; cursor: pointer; border-radius: 16px; }
.mis .top-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.mis h3 { margin: 0; font-size: 15px; color: #fff; }
.mis .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.mis.done { border-color: rgba(0, 230, 118, 0.45); }
.mis-img {
  width: calc(100% + 28px);
  margin: -12px -14px 6px;
  aspect-ratio: 434 / 285;
  object-fit: cover;
  display: block;
  border-radius: 15px 15px 0 0;
  transition: transform .3s ease;
}
.mis:hover .mis-img { transform: scale(1.03); }
.mis .lvl { color: var(--gold2); font-weight: 600; }
.mis-obj { margin: 4px 0 0; font-size: 13px; color: #b8c8dc; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Mission detail popup dialog */
dialog.mis-dlg:not([open]) {
  display: none !important;
}
dialog.mis-dlg[open], .popup.mis-dlg[open] {
  position: fixed !important;
  top: 74px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 98px);
  border: 1px solid var(--line);
  background: rgba(9, 13, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 210, 255, 0.2);
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  z-index: 200;
}
#mis-dlg-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
}
.md-head {
  position: relative;
  min-height: 210px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0) 30%, rgba(6, 8, 13, .96) 100%),
    var(--art, none) center 60% / cover no-repeat,
    #0c101c;
}
.md-head h2 { margin: 2px 0 0; font-size: 27px; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .85); }
.md-code { font-size: 12px; color: var(--cyan); letter-spacing: 1px; }
.md-kind { position: absolute; top: 14px; left: 16px; }
.md-body { padding: 18px 22px 24px; display: grid; gap: 12px; }
.md-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.md-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--line);
}
.md-tile b { display: block; font-family: "Kanit", sans-serif; font-size: 18px; color: #fff; }
.md-tile small { color: var(--muted); }
.md-ic { width: 26px; text-align: center; font-size: 17px; }
.md-tile.gold .md-ic { color: var(--gold2); }
.md-tile.blue .md-ic { color: var(--cyan2); }
.md-tile.green .md-ic { color: var(--green); }
.md-map {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--line);
  color: #d0daf0;
}
.md-sec {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid var(--line);
}
.md-sec p { margin: 4px 0 0; line-height: 1.6; color: #d0daf0; }
.md-goal {
  background: linear-gradient(180deg, rgba(0, 210, 255, 0.12), rgba(0, 210, 255, 0.04));
  border-color: rgba(0, 210, 255, 0.35);
}
.md-goal .md-label { color: var(--cyan); }
.md-label { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); font-family: "Kanit", sans-serif; }
.md-rules { display: flex; flex-wrap: wrap; gap: 8px; }
.md-rule { padding: 6px 12px; border-radius: 10px; font-size: 13px; border: 1px solid var(--line); }
.md-rule.on { color: #8ee08a; background: rgba(0, 230, 118, 0.12); border-color: rgba(0, 230, 118, 0.4); }
.md-rule.off { color: #6a7890; background: rgba(255, 255, 255, 0.02); }
.md-drops-head { display: flex; justify-content: space-between; align-items: center; font-family: "Kanit", sans-serif; font-weight: 600; color: #fff; }
.md-drops { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; padding: 14px; }
.md-drop { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--muted); }
.md-drop span { line-height: 1.25; overflow-wrap: anywhere; }
.md-drop .icon { width: 52px; height: 52px; border-radius: 12px; }
.md-drop.key .icon { border-color: var(--gold); box-shadow: 0 0 14px var(--gold-glow); }

/* Boss schedule & crafting */
.boss-table { display: grid; gap: 8px; }
.boss-table .day { margin: 16px 2px 4px; font-size: 15px; color: var(--cyan2); font-weight: 600; }
.slot {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(14, 18, 28, 0.7);
  border: 1px solid var(--line);
}
.slot.live {
  border-color: rgba(255, 92, 92, 0.5);
  background: radial-gradient(300px 80px at 0 0, rgba(255, 92, 92, 0.2), transparent), var(--panel);
}
.slot-time { font-variant-numeric: tabular-nums; color: var(--gold2); font-weight: 700; }

.sets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.set { padding: 16px 18px; display: grid; gap: 12px; }
.set-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.set-head b { font-size: 18px; color: #fff; }
.part {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
}
.part-top { display: flex; gap: 10px; align-items: center; }
.part .nm { font-weight: 700; color: #fff; }
.mats { display: flex; flex-wrap: wrap; gap: 10px; }
.mat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 21, 33, 0.85);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 12px 5px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all .15s ease;
}
.mat:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.mat .icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mat .icon img { width: 28px; height: 28px; }
.mat-n { font-weight: 700; font-size: 13px; color: var(--cyan2); }
.mat-name { font-size: 13px; color: #d8e2ec; }
.mat.has {
  border-color: rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.08);
}
.mat.has .mat-n { color: #00e676; }
.mat.lack {
  border-color: rgba(255, 92, 92, 0.45);
  background: rgba(255, 92, 92, 0.08);
}
.mat.lack .mat-n { color: #ff5c5c; }
.mat.give {
  border-color: rgba(255, 184, 52, 0.45);
  background: rgba(255, 184, 52, 0.08);
}
.mat.give .mat-name {
  color: #ffe082;
  font-weight: 600;
}

/* =====================================================================
   Monthly Exchange Hub (Event Tab)
   ===================================================================== */
.exch {
  margin-top: 32px;
  background: rgba(8, 12, 18, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--corner);
  padding: 28px;
}
.exch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.exch-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
  letter-spacing: .2px;
}
#ex-char-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(14, 19, 29, 0.75);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
#ex-char {
  background: rgba(6, 9, 14, 0.95);
  color: var(--gold2);
  border: 1px solid rgba(255, 184, 52, 0.35);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all .2s;
}
#ex-char:focus, #ex-char:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
  color: #fff;
}

/* Exchange List - Responsive Grid */
.exch-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

@media (max-width: 600px) {
  .exch-list {
    grid-template-columns: 1fr;
  }
}

/* Individual Trade Card */
.trade.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  background: rgba(11, 15, 23, 0.85);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.trade.card:hover {
  border-color: rgba(0, 210, 255, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 210, 255, 0.15);
}

.trade-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.trade-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2px;
}
.trade-limit {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.trade-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trade-sec-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trade-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.trade-btn {
  padding: 9px 28px;
  font-size: 14px;
  font-weight: 700;
  min-width: 130px;
  border-radius: 10px;
  letter-spacing: .3px;
}

/* Simulators */
.sim { display: grid; gap: 14px; max-width: 660px; }
.sim-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sim-top input { width: 90px; }
.sim-rows { display: grid; gap: 8px; }
.sim-row { display: grid; grid-template-columns: 48px 34px 50px 34px 1fr 70px; gap: 8px; align-items: center; }
.sim-row button { padding: 3px 0; border-radius: 8px; }
.sim-v { text-align: center; font-weight: 700; color: var(--cyan2); }
.bar { height: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--gold)); }

.sk-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.sk-top input { width: 90px; }
.sk-points { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.sk-points .pill b { color: var(--gold2); }
.sk-points .pill.over b { color: var(--red); }
.sk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; margin-top: 14px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sk-cell {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px;
  min-height: 64px;
  border-radius: 12px;
  background: rgba(18, 24, 38, 0.7);
  color: var(--muted);
  overflow-wrap: anywhere;
  border: 1px solid var(--line-subtle);
  transition: all .15s ease;
}
.sk-cell .nm { font-size: 13px; font-weight: 700; color: var(--text); }
.sk-cell .sub { font-size: 11px; }
.sk-cell.empty { visibility: hidden; }
.sk-cell.locked { opacity: .45; }
.sk-cell.can { border-color: rgba(0, 210, 255, 0.35); }
.sk-cell.can .nm { color: var(--cyan2); }
.sk-cell.on { background: rgba(0, 210, 255, 0.14); border-color: var(--cyan); box-shadow: 0 0 12px var(--cyan-glow); }
.sk-cell.on .nm::before { content: "✔ "; color: var(--green); }
.sk-cell.sel { outline: 2px solid var(--gold2); outline-offset: 1px; }
.sk-row-label { grid-column: 1 / -1; font-size: 12px; color: var(--cyan); margin-top: 4px; font-weight: 600; }
.sk-info { position: sticky; top: 76px; display: grid; gap: 8px; }
.sk-info h3 { margin: 0; color: #fff; }
.sk-info p { margin: 0; white-space: pre-wrap; color: var(--muted); }
.sk-info .req li.bad { color: var(--red); }
.sk-info .req li.good { color: var(--green); }
.sk-info .req { margin: 0; padding-left: 18px; font-size: 13px; }

/* =====================================================================
   Donate & VIP
   ===================================================================== */
.packs { display: grid; gap: 8px; }
.pack { display: flex; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: rgba(18, 24, 38, 0.7); border: 1px solid var(--line); }
.paylist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.paylist li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-subtle); }
.paylist b { overflow-wrap: anywhere; text-align: right; color: #fff; }
.vip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.vip-card { position: relative; overflow: hidden; border-top: 3px solid var(--tc, #b48cff); padding: 18px; }
.vip-card h3 { color: var(--tc, #d8b8ff); font-size: 22px; margin: 0 0 8px; }
.vip-card ul { margin: 0; padding-left: 18px; font-size: 14px; color: #cbd5e1; }
.vip-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tc, #b48cff) 35%, transparent), transparent 70%);
}
.tier1 { --tc: #c9a27a; } .tier2 { --tc: #d7dde6; } .tier3 { --tc: #ffd166; } .tier4 { --tc: #00d2ff; } .tier5 { --tc: #ff75c8; }
.vip-card.me { box-shadow: 0 0 0 1px var(--tc), 0 14px 38px rgba(0, 0, 0, .5); }

/* News & Posts */
.news { display: grid; gap: 14px; }
.post {
  padding: 18px 20px;
  border-left: 3px solid var(--cyan);
  background: rgba(14, 18, 28, 0.75);
}
.post.has-img {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  border-left-width: 1px;
}
.post-img { width: 100%; height: 100%; max-height: 220px; object-fit: cover; display: block; }
.post.has-img .post-text { padding: 18px 20px; }
.post h3 { margin: 4px 0 6px; font-size: 18px; color: #fff; }
.post .meta { font-size: 12px; color: var(--cyan2); }
.post .body { white-space: pre-wrap; margin: 0; overflow-wrap: anywhere; color: #b8c8dc; }

/* Login */
.login {
  max-width: 420px;
  margin: 70px auto;
  padding: 34px;
  border-color: var(--line);
  background: radial-gradient(320px 150px at 50% 0%, rgba(0, 210, 255, 0.15), transparent 70%), var(--panel);
}
.login h1 { margin: 0 0 4px; font-size: 28px; color: #fff; }
.login form { display: grid; gap: 14px; margin-top: 18px; }
.login label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }

/* Downloads */
.dl-list { display: grid; gap: 12px; }
.dl { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; flex-wrap: wrap; }
.steps ol { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; color: #d0daf0; }
.specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.specs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-subtle); padding: 8px 0; }
.specs b { color: #fff; }

/* Redeem & Account */
.redeem, .pw { display: grid; gap: 14px; max-width: 480px; }
.redeem label, .pw label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.char { padding: 16px; border-radius: 16px; }
.char b { font-size: 17px; color: #fff; }

/* Dialogs */
dialog:not([open]) {
  display: none !important;
}
.dlg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  background: rgba(11, 15, 23, 0.96);
  backdrop-filter: blur(24px);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  z-index: 200;
}
.dlg::backdrop, .popup::backdrop, .mis-dlg::backdrop {
  background: rgba(3, 5, 8, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dlg h2 { margin: 0 0 12px; color: #fff; }
.dlg ul { padding-left: 18px; margin: 0 0 12px; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 15, 23, 0.96);
  backdrop-filter: blur(24px);
  color: var(--text);
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  z-index: 200;
}
.popup img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; }
.popup-text { padding: 18px 22px 22px; }
.popup-text h2 { margin: 8px 0 4px; color: #fff; }
.popup-text p { margin: 0; white-space: pre-wrap; color: var(--muted); }
.popup-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 250;
  pointer-events: auto;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 210, 255, 0.35);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}
.popup-x:hover {
  background: rgba(255, 92, 92, 0.9);
  border-color: #ff5c5c;
  transform: scale(1.08);
}

/* Footer note */
main::after {
  content: "Over Tails Online · เซิร์ฟเวอร์ส่วนตัวสำหรับเพื่อน";
  display: block;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line-subtle);
  color: #556680;
  font-size: 13px;
  text-align: center;
}

/* =====================================================================
   Responsive Adjustments
   ===================================================================== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .cart { position: static; order: -1; }
  .two { grid-template-columns: 1fr; }
  main { padding: 20px 16px 60px; }
  .sk-wrap { grid-template-columns: 1fr; }
  .sk-info { position: static; }
}

@media (max-width: 640px) {
  dialog.mis-dlg[open], .popup.mis-dlg[open] {
    top: 64px !important;
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 80px) !important;
    border-radius: 16px;
  }
  .post.has-img { grid-template-columns: 1fr; }
  .part { grid-template-columns: 1fr; }
  .sk-grid { gap: 5px; }
  .sk-cell { padding: 6px; min-height: 56px; }
  .sk-cell .nm { font-size: 11px; }
  .slot { grid-template-columns: 100px 1fr; }
  .slot > :last-child { display: none; }
  .sim-row { grid-template-columns: 44px 32px 44px 32px 1fr; }
  .sim-row > :last-child { display: none; }
}

@media (max-width: 520px) {
  .top-bar { padding: 10px 14px; }
  .brand > span { display: none; }
  .brand-logo { height: 32px; }
  .who-name { display: none; }
  .hero { padding: 22px 18px 18px; min-height: 120px; }
  .hero h1 { font-size: 26px; }
  .banner { padding: 32px 16px 26px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 21px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .item { padding: 12px; }
  .item-top { flex-direction: column; align-items: flex-start; }
  .btns button { padding: 6px 8px; }
  .md-tiles { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .md-tile { padding: 10px; gap: 6px; }
  .md-tile b { font-size: 15px; }
  .md-ic { display: none; }
}

/* donation slip upload (donate page) */
.slip-card { margin-top: 18px; }
.slip-form { display: grid; gap: 14px; max-width: 520px; }
.slip-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.slip-form input[type=file] { padding: 9px 12px; }
.slip-preview { max-width: 260px; max-height: 360px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; }
.slip-card h3 { margin: 22px 0 8px; font-size: 16px; }
.slip-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.slip-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(18, 24, 38, 0.7); border: 1px solid var(--line); }
.slip-list li div { display: grid; gap: 2px; }
.slip-st { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: rgba(255, 184, 52, 0.14); color: var(--gold); }
.slip-st.ok { background: rgba(0, 230, 118, 0.14); color: var(--green); }
.slip-st.bad { background: rgba(255, 92, 92, 0.14); color: var(--red); }
.slip-qr { display: flex; gap: 16px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(18, 24, 38, 0.7); border: 1px solid var(--line); }
.slip-qr img { width: 180px; height: 180px; border-radius: 10px; background: #fff; flex: none; }
.slip-qr b { color: #fff; font-size: 17px; }
.slip-qr p { margin: 6px 0 0; font-size: 13px; }
@media (max-width: 520px) { .slip-qr { flex-direction: column; text-align: center; } }

/* shop badges, sale price, limits (panel > ร้านค้าหน้าเว็บ) */
.item.card { position: relative; }
.ribbons { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 1; }
.rib { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .2px;
  background: rgba(0, 210, 255, .16); color: var(--cyan2); border: 1px solid rgba(0, 210, 255, .35); }
.rib.sale { background: linear-gradient(135deg, #ff5c5c, #ff9a3c); color: #fff; border: 0; }
.rib.hot { background: rgba(255, 92, 92, .16); color: #ff8a80; border-color: rgba(255, 92, 92, .4); }
.rib.rec { background: rgba(255, 184, 52, .16); color: var(--gold); border-color: rgba(255, 184, 52, .45); }
.rib.new { background: rgba(0, 230, 118, .14); color: var(--green); border-color: rgba(0, 230, 118, .4); }
.rib.limited { background: rgba(180, 120, 255, .16); color: #c9a7ff; border-color: rgba(180, 120, 255, .4); }
.item.tag-rec { border-color: rgba(255, 184, 52, .45); box-shadow: 0 0 0 1px rgba(255, 184, 52, .15), 0 10px 30px rgba(255, 184, 52, .08); }
.item.on-sale { border-color: rgba(255, 122, 92, .45); }
.price-box { display: inline-flex; align-items: baseline; gap: 8px; }
.price-box .old { color: var(--muted); font-size: 13px; }
.item.on-sale .price { color: #ff9a6c; }
.limits { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
