/* ============================================================
   Growvia — game client theme (pixel-art idle RPG)
   Bukan lagi tampilan Discord: palet earthy, panel chunky,
   font pixel untuk judul, sprite pixelated.
   ============================================================ */

@font-face {
  font-family: 'Press Start 2P';
  src: url('/fonts/press-start-2p-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #120e0a;
  --bg2: #1a1410;
  --panel: #241b14;
  --panel2: #2e2318;
  --panel3: #3a2c1e;
  --line: #4a3826;
  --line2: #6b5236;
  --text: #f0e4cd;
  --head: #fff4dc;
  --muted: #a89070;
  --green: #8ac926;
  --green2: #5c8a1e;
  --gold: #f2b23a;
  --blue: #4fa8e0;
  --red: #e05252;
  --purple: #b07ce0;
  --accent: #8ac926;
  --accent2: #5c8a1e;
  --shadow: 0 2px 0 rgba(0, 0, 0, .45);
  --top-h: 58px;
  --side-w: 228px;
  --right-w: 288px;
  --nav-h: 62px;
  --radius: 3px;
  --font-pixel: 'Press Start 2P', 'Courier New', monospace;
  --font-body: 'Trebuchet MS', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Anti-blok-teks Activity: teks UI tidak bisa di-select pakai cursor/drag/Ctrl+A.
 * Field form tetap bisa diketik & diseleksi (lihat override di bawah). */
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;          /* tidak ada scrollbar halaman: shell & layar muat pas layar */
  background:
    radial-gradient(1200px 600px at 15% -10%, #241a10 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, #1d2416 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font: 14px/1.4 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Kecualikan field yang memang harus bisa diketik/diselek: form, modal, search. */
input,
textarea,
select,
[contenteditable],
input::selection,
textarea::selection {
  -webkit-user-select: text;
  user-select: text;
}

/* Highlight seleksi tidak tampil untuk teks biasa (hanya field yang bisa). */
::selection { background: transparent; }
input::selection,
textarea::selection { background: rgba(242, 178, 58, .35);}

body.busy { cursor: progress; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
img { max-width: 100%; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; }
/* Sprite tanpa ukuran eksplisit (icon(x, 'pix')) jangan pernah tampil ukuran asli (128px+). */
.main img.pix:not(.big):not(.event-banner):not(.sprite) { max-width: 32px; max-height: 32px; flex: none; }
.main .view-title img.pix { max-width: 42px; max-height: 42px; }
/* ikon inline (hasil iconize) — ukuran seragam agar tidak melebar */
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.ic-placeholder {
  display: inline-block; width: 16px; height: 16px; flex: none;
  border: 2px dashed var(--line); background: var(--panel3);
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─────────────── Scrollbar minimalis (ala macOS: tanpa panah, ramping) ─────────────── */
/* Properti standar HANYA untuk Firefox: di Chromium 121+ (Discord desktop) properti ini
   membuat ::-webkit-scrollbar diabaikan dan memunculkan scrollbar bawaan + panah. */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(240, 228, 205, .22) transparent; }
}
*::-webkit-scrollbar { width: 10px; height: 0; }           /* height 0 = tanpa scrollbar horizontal */
*::-webkit-scrollbar-button { display: none; }             /* buang panah di kedua ujung */
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;                           /* inset: thumb ramping tanpa garis */
  border-radius: 999px;
  background-color: rgba(240, 228, 205, .14);              /* nyaris tak terlihat saat diam */
  background-clip: padding-box;
  transition: background-color .25s ease;
}
*:hover::-webkit-scrollbar-thumb { background-color: rgba(240, 228, 205, .3); }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(240, 228, 205, .45); }
*::-webkit-scrollbar-thumb:active { background-color: rgba(240, 228, 205, .6); }
/* Scrollbar kiri–kanan tetap dimatikan. */
*::-webkit-scrollbar:horizontal { display: none; }

/* ─────────────── Shell ─────────────── */
.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--right-w);
  grid-template-rows: var(--top-h) minmax(0, 1fr);
  grid-template-areas: 'top top top' 'side main right';
  height: 100vh;
  height: 100dvh; /* area terlihat sebenarnya (iframe Discord / HP); 100vh fallback browser lama */
}

/* ─────────────── Topbar ─────────────── */
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(#2c2115, #241b12);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .5);
  z-index: 20;
  overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand img { width: 34px; height: 34px; }
.brand-name {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--head);
  letter-spacing: .5px;
  line-height: 1.2;
}
.top-stats { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; box-sizing: border-box;
  padding: 0 9px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}
.stat-chip b { color: var(--head); font-weight: 700; }
.stat-chip.money { border-color: #7a5a1e; background: #33270f; }
.stat-chip.money b { color: var(--gold); }
.stat-chip img { width: 18px; height: 18px; }
.stat-chip.status.busy { border-color: #5c8a1e; background: #1f2a12; position: relative; }
.stat-chip.status.busy img { animation: bob 1.1s ease-in-out infinite; }
.stat-chip.status.busy::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-2px) rotate(-6deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--panel2);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 15px;
}
.icon-btn:hover { background: var(--panel3); border-color: var(--line2); }
.icon-btn:active { transform: translateY(2px); box-shadow: none; }

/* ─────────────── Sidebar ─────────────── */
.sidebar {
  grid-area: side;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg2);
  border-right: 2px solid var(--line);
  padding: 10px 8px 20px;
}
.viaz-h {
  display: flex; align-items: center; gap: 7px;
  width: 100%; background: transparent; border: none; cursor: pointer;
  text-align: left; color: var(--gold); margin-top: 0;
}
.viaz-h:hover { color: var(--head); }
.viaz-h .viaz-coin { width: 20px; height: 20px; image-rendering: pixelated; flex: none; }
.viaz-caret { margin-left: auto; font-size: 14px; color: var(--muted); flex: none; }
.skill-list.collapsed { display: none; }
.nav-list {
  display: flex; flex-direction: column; gap: 3px;
  position: relative;
  margin: 0 0 4px 18px; padding-left: 12px;
}
.nav-list.collapsed { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: 2px solid transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
}
.nav-item img { width: 20px; height: 20px; }
.nav-item { transition: background .12s ease, transform .12s ease; }
.nav-item:hover { background: var(--panel); transform: translateX(2px); }
.nav-item.active {
  background: var(--panel2);
  border-color: var(--line2);
  color: var(--head);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item .pip {
  margin-left: auto;
  min-width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.side-h {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 14px 4px 6px;
}
/* Judul + tombol tutup laci kiri: hanya tampil di layar sempit (sidebar = laci). */
.side-title { display: none; }
.skill-list {
  display: flex; flex-direction: column; gap: 3px;
  position: relative;
  margin: 0 0 4px 18px; padding-left: 12px;
}
/* garis vertikal penghubung dari WORLD / THE VIAZ ke submenu */
.skill-list::before, .nav-list::before {
  content: '';
  position: absolute;
  left: 3px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line2);
}
.skill-list.collapsed { display: none; }
.skill-item {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: 2px solid transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  position: relative;
  transition: background .12s ease, transform .12s ease;
}
.skill-item:hover { background: var(--panel); transform: translateX(2px); }
.skill-item.active {
  background: var(--panel2);
  border-color: var(--line2);
  color: var(--head);
  box-shadow: inset 3px 0 0 var(--accent);
}
.skill-item img { width: 20px; height: 20px; }
.skill-item .nm { font-size: 13px; }
.skill-item .lv { font-family: var(--font-pixel); font-size: 9px; color: var(--gold); min-width: 30px; text-align: right; }
.skill-item .track {
  position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: #15100c;
}
.skill-item .track i { display: block; height: 100%; background: var(--green); transform-origin: left; }

/* ─────────────── Main ─────────────── */
.main { grid-area: main; overflow-y: auto; overflow-x: hidden; padding: 12px; }
.view { display: flex; flex-direction: column; gap: 10px; max-width: 1100px; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.event-banner {
  display: block; width: 100%; aspect-ratio: 1024 / 254; object-fit: cover;
  border: 2px solid var(--line2); border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--bg2), 0 4px 0 rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .35);
  animation: banner-in .35s ease-out;
}
.event-banner + .view-head { margin-top: 2px; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .event-banner { animation: none; } }
.view-title { display: flex; align-items: center; gap: 12px; }
.view-title img { width: 42px; height: 42px; }
.view-title .eyebrow {
  font-family: var(--font-pixel); font-size: 8px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
}
.view-title h2 { margin: 2px 0 0; font-family: var(--font-pixel); font-size: 16px; color: var(--head); line-height: 1.3; }
.view-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; max-width: 560px; }
.level-badge {
  text-align: center;
  padding: 6px 12px;
  background: var(--panel2);
  border: 2px solid var(--line2);
  box-shadow: var(--shadow);
}
.level-badge span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.level-badge strong { font-family: var(--font-pixel); font-size: 14px; color: var(--gold); }

/* ─────────────── Panels & cards ─────────────── */
.panel {
  background: linear-gradient(180deg, var(--panel2) 0%, var(--panel) 48px);
  border: 2px solid var(--line);
  box-shadow: inset 0 0 0 2px var(--bg2), var(--shadow);
  padding: 12px;
  min-width: 0; max-width: 100%;
}
.panel-h { display: flex; align-items: center; gap: 8px; margin: -2px 0 12px; padding-bottom: 2px; min-width: 0; }
.panel-h img { width: 20px; height: 20px; }
.panel-h h3 { margin: 0; font-family: var(--font-pixel); font-size: 10px; color: var(--head); text-transform: uppercase; letter-spacing: .4px; min-width: 0; }
.panel-h .spacer { flex: 1; min-width: 0; }
.grid { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--panel3) 0%, var(--panel2) 40px);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.card.locked { opacity: .55; }
/* Tombol aksi kartu selalu di bawah supaya baris kartu sejajar. */
.card-foot { margin-top: auto; padding-top: 2px; }
.card-foot > .btn { width: 100%; }
.card-foot > .chip { display: flex; justify-content: center; }
.qty-row .btn { flex: 1 1 auto; min-width: max-content; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.sell-list { display: flex; flex-direction: column; gap: 4px; }
.sell-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: var(--panel2); border: 2px solid var(--line); font-size: 12px; }
.sell-row img { width: 22px; height: 22px; flex: none; }
.sell-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--head); }
.sell-row strong { color: var(--gold); min-width: 52px; text-align: right; }
.card:not(.locked) { transition: transform .15s ease, border-color .15s ease; }
.card:not(.locked):hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 4px 0 rgba(0, 0, 0, .45); }
.card.active { border-color: var(--gold); box-shadow: inset 0 0 0 2px #3a2c10, var(--shadow); }
.card-top { display: flex; align-items: center; gap: 9px; }
.card-top img { width: 30px; height: 30px; flex: none; }
.card-row { flex-direction: row; align-items: center; gap: 10px; }
.card-row > img, .card[style*="row"] > img { width: 30px; height: 30px; }
.card-top .nm { font-weight: 700; color: var(--head); font-size: 13px; line-height: 1.2; }
.card-top .sub { font-size: 11px; color: var(--muted); }
.card-top .grow { flex: 1; }
.card p { margin: 0; font-size: 12px; color: var(--muted); }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 6px; }
.meta-grid span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.meta-grid strong { display: block; font-size: 12px; color: var(--text); font-weight: 700; }
.meta-grid strong.good { color: var(--green); }
.meta-grid strong.bad { color: var(--red); }

/* ─────────────── Buttons ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 12px;
  background: linear-gradient(#4a3826, #3a2b1d);
  border: 2px solid var(--line2);
  box-shadow: 0 3px 0 #1c1410;
  color: var(--head);
  font-family: var(--font-pixel);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .3px;
  line-height: 1;
}
.btn:hover:not(:disabled) { background: linear-gradient(#5a452f, #463523); border-color: #8a6a44; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #1c1410; }
.btn:disabled { background: #2a211a; border-color: var(--line); color: var(--muted); }
.btn.primary { background: linear-gradient(#6f9c22, #4e7417); border-color: #93c240; color: #10160a; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(#7fae2a, #5a8520); }
.btn.danger { background: linear-gradient(#8a2f28, #6b211c); border-color: #b04a40; color: #ffe9e6; }
.btn.gold { background: linear-gradient(#a97c1c, #7d5a12); border-color: #d8a83a; color: #1d1503; }
.btn.sm { padding: 6px 8px; font-size: 8px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; }

/* ─────────────── Bars ─────────────── */
.bar { display: flex; flex-direction: column; gap: 4px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.bar-meta b { color: var(--text); }
.bar-track {
  height: 14px;
  background: #150f0a;
  border: 2px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .5);
  position: relative;
  overflow: hidden;
}
.bar-fill {
  --c: #8ac926;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(#b8ec4c, #6fa01f 70%, #5a8519);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), inset 0 2px 0 rgba(255, 255, 255, .25);
  transform-origin: left;
  transition: transform .4s ease-out;
}
.bar-fill.gold { --c: #f2b23a; background: linear-gradient(#ffe08a, #c98d16 70%, #a8740f); }
.bar-fill.blue { --c: #4fa8e0; background: linear-gradient(#8fd4fa, #2f7fb5 70%, #276b99); }
.bar-fill.red { --c: #e05252; background: linear-gradient(#f7948c, #b03329 70%, #922a22); }
.bar-fill.purple { --c: #b07ce0; background: linear-gradient(#dab8f5, #8350b5 70%, #6d4296); }
/* garis bergerak (aktif) */
.bar-fill.striped::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(-45deg, rgba(0,0,0,.2) 0 6px, transparent 6px 12px);
  background-size: 17px 17px;
  animation: bar-stripes .7s linear infinite;
}
/* kilau menyapu */
.bar-fill::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: bar-shine 2.4s ease-in-out infinite;
}
/* berjalan sendiri sampai 100% (durasi = sisa waktu) */
.bar-fill.live { animation: bar-grow linear forwards; }
.bar.done .bar-track { border-color: var(--gold); animation: bar-glow 1.4s ease-in-out infinite; }
.bar.done .bar-meta b { color: var(--gold); }
@keyframes bar-stripes { to { background-position: 17px 0; } }
@keyframes bar-shine { 0%, 30% { left: -40%; } 100% { left: 110%; } }
@keyframes bar-grow { from { transform: scaleX(var(--from)); } to { transform: scaleX(1); } }
@keyframes bar-glow { 50% { box-shadow: inset 0 2px 0 rgba(0,0,0,.5), 0 0 10px rgba(242, 178, 58, .55); } }

/* ─────────────── Chips / tags ─────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 7px;
  background: var(--panel3);
  border: 1px solid var(--line2);
  font-size: 11px;
  color: var(--text);
}
.chip img { width: 15px; height: 15px; }
.chip.good { color: var(--green); border-color: #4e6b1e; }
.chip.bad { color: var(--red); border-color: #7a2a24; }
.chip.gold { color: var(--gold); border-color: #7a5a1e; }
.tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  border: 1px solid var(--line2);
  color: var(--muted);
}
.rarity-common { color: #b9b3a6; }
.rarity-uncommon { color: #8ac926; }
.rarity-rare { color: #4fa8e0; }
.rarity-epic { color: #b07ce0; }
.rarity-legendary { color: #f2b23a; }

/* ─────────────── Right panel ─────────────── */
.rightbar {
  grid-area: right;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  overscroll-behavior: contain;
  background: var(--bg2);
  border-left: 2px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-card { background: var(--panel); border: 2px solid var(--line); padding: 10px; flex: none; min-width: 0; max-width: 100%; }
.right-scrim { display: none; }
.side-scrim { display: none; }
.icon-btn.stats-btn { display: none; align-items: center; justify-content: center; }
.icon-btn.stats-btn img { width: 18px; height: 18px; }
.icon-btn.stats-btn.on { border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .rightbar { transition: none !important; } }
.side-card h3 { margin: 0 0 8px; font-family: var(--font-pixel); font-size: 9px; color: var(--head); text-transform: uppercase; }
.focus-block { display: flex; flex-direction: column; gap: 3px; }
.focus-block strong { color: var(--head); font-size: 13px; }
.focus-block span { font-size: 11px; color: var(--muted); }
.equip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.equip-slot {
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--bg2);
  border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
}
.equip-slot span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equip-slot img { width: 28px; height: 28px; }
.equip-slot.empty { border-style: dashed; }
.collection-row { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.collection-row div { display: flex; justify-content: space-between; gap: 8px; }
.collection-row span { color: var(--muted); }
.collection-row b { color: var(--text); }
.log { display: flex; flex-direction: column; gap: 5px; max-height: 190px; overflow-y: auto; }
.log-entry { font-size: 11px; padding-left: 7px; border-left: 2px solid var(--line2); }
.log-entry.success { border-color: var(--green); color: #cfe8a8; }
.log-entry.warning { border-color: var(--gold); color: #f0d9a0; }
.log-entry.danger { border-color: var(--red); color: #f0b3ad; }
.log-entry.info { color: var(--muted); }

/* ─────────────── Map ─────────────── */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.map-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.map-node {
  aspect-ratio: 1;
  background: var(--panel2);
  border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text);
  position: relative;
  box-shadow: var(--shadow);
}
.map-node img { width: 30px; height: 30px; }
.map-node .lbl { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.1; }
.map-node.fog { background: #17120d; border-style: dashed; color: #5e5142; }
.map-node.fog .lbl { color: #5e5142; }
.map-node.unlocked { border-color: var(--line2); }
.map-node.current { border-color: var(--gold); box-shadow: inset 0 0 0 2px #3a2c10, var(--shadow); }
.map-node.boss { border-color: #7a2a24; }
.map-node:hover:not(.fog) { background: var(--panel3); }
.map-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }

/* Combat: lihat combat.css */

/* ─────────────── Bank ─────────────── */
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.bank-cell {
  aspect-ratio: 1;
  background: var(--panel2);
  border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  position: relative;
  color: var(--text);
}
.bank-cell img { width: 32px; height: 32px; }
.bank-cell .qty { font-size: 11px; font-weight: 700; color: var(--head); }
.bank-cell .nm { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.1; }
.bank-cell.empty { border-style: dashed; opacity: .4; }
.bank-cell:hover:not(.empty) { border-color: var(--line2); background: var(--panel3); }

/* ─────────────── Tabs ─────────────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.tab {
  padding: 7px 11px;
  background: var(--panel);
  border: 2px solid var(--line);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 8px;
  text-transform: uppercase;
}
.tab { transition: color .12s ease, background .12s ease; }
.tab:hover { color: var(--text); background: var(--panel2); }
.tab.active { background: var(--panel3); border-color: var(--line2); color: var(--head); box-shadow: inset 0 -3px 0 var(--accent); }
.tab-lv { font-family: var(--font-pixel); font-size: 8px; color: var(--gold); }

/* ─────────────── Profil ─────────────── */

.profile-row { display: flex; align-items: center; gap: 14px; margin: 8px 0 12px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 8px; flex: none;
  border: 2px solid var(--line2); background: var(--panel3); image-rendering: pixelated; object-fit: cover;
}
.profile-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-name { font-family: var(--font-pixel); font-size: 13px; color: var(--head); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Role & badge (pengganti role Discord yang tidak terlihat di Activity) */
.badge-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; font-family: var(--font-body, inherit); font-size: 11px; font-weight: 700;
  color: var(--text); background: var(--panel2); border: 2px solid var(--line);
}
.badge-pill img { width: 16px; height: 16px; }
.badge-pill.g-event { color: #ffb36b; border-color: #8a4a1e; background: linear-gradient(90deg, #3a1f10, #2a1a24); }
.badge-pill.g-merchant { color: #9fd8ff; border-color: #2c5a7a; }
.badge-pill.g-casino { color: #ff8fc1; border-color: #7a2c56; }
.badge-pill.g-rank { color: var(--gold); border-color: #7a5a1e; }
.badge-group { margin-top: 10px; }
.badge-group-h { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.badge-group-h img { width: 16px; height: 16px; }
.badge-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

/* Boost aktif (topbar + panel kanan) */
.boost-chip { cursor: pointer; color: var(--gold); border-color: #7a5a1e; }
.boost-list { display: flex; flex-direction: column; gap: 4px; }
.boost-row { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.boost-row img { width: 18px; height: 18px; }
.boost-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boost-row b { color: var(--gold); }
.profile-sub { font-size: 12px; color: var(--muted); }
.profile-id .chip { align-self: flex-start; margin-top: 4px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.profile-tags .chip { margin: 0; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-stats .stat-chip { font-size: 11px; }

/* ─────────────── Guide / Rules / Gacha ─────────────── */

.loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 240px; color: var(--muted); font-family: var(--font-pixel);
  font-size: 9px; text-transform: uppercase; letter-spacing: .5px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.chip-row .chip { cursor: pointer; }
.chip-row .chip.on { background: var(--accent); color: #1a1206; border-color: var(--accent2); font-weight: 700; }
.chip-row .chip:hover { border-color: var(--accent); }

.guide-body { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.guide-line { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text); }
.guide-line.gap { min-height: 4px; }
.guide-line b { color: var(--head); }
.guide-line img { height: 15px; width: 15px; vertical-align: -2px; image-rendering: pixelated; }

.rule-block { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.rule-block:first-of-type { border-top: none; }
.rule-block h4 { margin: 0 0 6px; font-family: var(--font-pixel); font-size: 9px; color: var(--gold); }

/* Guide: daftar isi kiri + artikel kanan */
.guide-layout { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: start; }
.guide-toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; padding: 6px; background: var(--panel); border: 2px solid var(--line); }
.guide-toc-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: transparent; border: 2px solid transparent; color: var(--text);
  text-align: left; font-size: 12px; transition: background .12s ease;
}
.guide-toc-item img { width: 18px; height: 18px; flex: none; }
.guide-toc-item:hover { background: var(--panel2); }
.guide-toc-item.active { background: var(--panel3); border-color: var(--line2); color: var(--head); box-shadow: inset 3px 0 0 var(--accent); }
.guide-hero { display: flex; align-items: center; gap: 12px; padding-bottom: 2px; margin-bottom: 10px; }
.guide-hero img.big { width: 48px; height: 48px; }
.guide-hero .eyebrow { font-family: var(--font-pixel); font-size: 8px; color: var(--muted); }
.guide-hero h3 { margin: 3px 0 2px; font-family: var(--font-pixel); font-size: 13px; color: var(--head); line-height: 1.3; }
.guide-hero p { margin: 0; font-size: 12px; }
.guide-h { margin: 8px 0 0; font-family: var(--font-pixel); font-size: 9px; color: var(--gold); text-transform: uppercase; }
.guide-steps, .guide-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.guide-steps li::marker { color: var(--gold); font-weight: 700; }
.guide-list li::marker { color: var(--accent); }
.guide-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.guide-facts > div { padding: 7px 9px; background: var(--panel2); border: 2px solid var(--line); }
.guide-facts span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.guide-facts strong { font-size: 13px; color: var(--head); }
.guide-tip { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; background: #2a2410; border: 2px solid #6b5a1e; border-left-width: 4px; }
.guide-tip img { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.guide-pager { justify-content: space-between; margin-top: 14px; padding-top: 2px; }
.rule-card .guide-line { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static; flex-direction: row; overflow-x: auto; }
  .guide-toc-item { flex: none; }
}

/* ─────────────── Bottom nav (mobile) ─────────────── */
.bottomnav { display: none; }

/* ─────────────── Toast ─────────────── */
.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 100;
  max-width: min(360px, 90vw);
  pointer-events: none;
}
.toast {
  background: var(--panel3);
  border: 2px solid var(--line2);
  border-left-width: 4px;
  padding: 9px 11px;
  font-size: 12px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toast-in .18s ease-out;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast.gold { border-left-color: var(--gold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─────────────── Modal ─────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(8, 6, 4, .78);
  display: grid; place-items: center;
  z-index: 90;
  padding: 14px;
}
.modal {
  width: min(460px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--panel);
  border: 2px solid var(--line2);
  box-shadow: inset 0 0 0 2px var(--bg2), 0 8px 0 rgba(0,0,0,.5);
  padding: 14px;
}
.modal h3 { margin: 0 0 10px; font-family: var(--font-pixel); font-size: 11px; color: var(--head); text-transform: uppercase; }
.modal .field { margin-bottom: 10px; }
.modal label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; }
.modal input, .modal select {
  width: 100%;
  padding: 9px 10px;
  background: var(--bg2);
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 14px;
}
.modal input:focus, .modal select:focus { border-color: var(--gold); outline: none; }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }

/* ─────────────── Dropdown (native select) ─────────────── */
.select-row { margin-top: 10px; max-width: 340px; }
.select {
  width: 100%;
  padding: 9px 10px;
  background: var(--bg2);
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.select:hover { border-color: var(--line2); }
.select:focus { border-color: var(--gold); outline: none; }

/* ─────────────── States ─────────────── */
.empty {
  padding: 26px 14px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
  border: 2px dashed var(--line);
}
.empty h3 { margin: 0 0 6px; font-family: var(--font-pixel); font-size: 10px; color: var(--text); text-transform: uppercase; }
.empty p { margin: 0; font-size: 12px; }
.skeleton { display: flex; flex-direction: column; gap: 10px; }
.sk { background: linear-gradient(90deg, #241b14 25%, #2e2318 37%, #241b14 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; height: 16px; border: 2px solid var(--line); }
.sk.title { height: 30px; width: 40%; }
.sk.short { width: 60%; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ─────────────── Layar muat (splash) ─────────────── */
.boot-screen {
  height: 100dvh;
  overflow: hidden;
  display: grid; place-items: center; justify-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}
/* Logo: cincin berputar + kilau + mantul halus */
.boot-logo { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.boot-logo img {
  width: 74px; height: 74px; position: relative; z-index: 1;
  animation: boot-bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 14px rgba(242, 178, 58, .35));
}
.boot-ring {
  position: absolute; inset: 6px; border-radius: 50%;
  border: 3px dashed rgba(242, 178, 58, .55);
  animation: boot-spin 7s linear infinite;
}
.boot-logo::before,
.boot-logo::after {
  content: ''; position: absolute; width: 6px; height: 6px;
  background: var(--gold); box-shadow: 0 0 10px rgba(242, 178, 58, .85);
  animation: boot-twinkle 1.8s ease-in-out infinite;
}
.boot-logo::before { top: 8px; right: 6px; }
.boot-logo::after { bottom: 10px; left: 4px; animation-delay: .9s; }
/* Judul: shimmer emas menyapu */
.boot-screen h1 {
  margin: 0; font-family: var(--font-pixel); font-size: 20px; letter-spacing: 1px;
  background: linear-gradient(100deg, var(--head) 32%, var(--gold) 50%, var(--head) 68%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: boot-shimmer 3s linear infinite;
}
.boot-screen p { margin: 0; color: var(--muted); max-width: 420px; font-size: 13px; animation: boot-fade 1.8s ease-in-out infinite; }
/* Bar memuat (indeterminate) */
.boot-bar { width: 220px; height: 10px; margin-top: 2px; background: var(--panel); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.boot-bar i { display: block; width: 42%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: boot-slide 1.4s ease-in-out infinite; }
.boot-screen .btn { margin-top: 6px; }

@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes boot-twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes boot-shimmer { from { background-position: 250% 0; } to { background-position: -250% 0; } }
@keyframes boot-fade { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes boot-slide { 0% { transform: translateX(-130%); } 100% { transform: translateX(330%); } }

/* ─────────────── Responsive ─────────────── */
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-areas: 'top top' 'side main'; }
  /* Panel kanan jadi laci dari kanan (tombol stats di topbar), bukan disembunyikan. */
  .rightbar {
    position: fixed; top: var(--top-h); right: 0; bottom: 0; z-index: 40;
    width: min(var(--right-w), 86vw);
    transform: translateX(100%); transition: transform .2s ease;
    box-shadow: -4px 0 0 rgba(0, 0, 0, .45);
  }
  .shell.right-open .rightbar { transform: none; }
  .right-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 39; background: rgba(0, 0, 0, .45); }
  .shell:not(.right-open) .right-scrim { display: none; }
  .icon-btn.stats-btn { display: inline-flex; }
  .map-wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --top-h: 50px; }
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--top-h) minmax(0, 1fr);
    grid-template-areas: 'top' 'main';
  }
  /* topbar satu baris: logo | stat | aksi */
  .topbar { gap: 8px; padding: 0 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { display: none; }
  .top-stats { flex-wrap: nowrap; gap: 6px; overflow: hidden; }
  .top-stats .stat-chip { height: 30px; font-size: 11px; padding: 0 8px; }
  .top-stats .stat-chip.hide-sm, .stat-chip.money > span { display: none; }
  .top-actions { flex: none; gap: 4px; }
  .icon-btn { width: 30px; height: 30px; }
  .main { padding: 12px 12px calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); }
  /* sidebar jadi laci kiri (label tetap tampil); menu utama pindah ke bottom nav */
  .sidebar {
    position: fixed; top: var(--top-h); bottom: 0; left: 0; z-index: 41;
    width: min(260px, 84vw);
    padding: 10px 8px calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 4px 0 0 rgba(0, 0, 0, .45);
  }
  .shell.side-open .sidebar { transform: none; }
  .side-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    position: sticky; top: 0; z-index: 1; background: var(--bg2);
    margin: 0 0 2px; padding: 0 2px 8px; border-bottom: 2px solid var(--line);
    font-family: var(--font-pixel); font-size: 9px; color: var(--head);
    text-transform: uppercase; letter-spacing: .5px;
  }
  .side-close {
    width: 32px; height: 32px; flex: none; display: grid; place-items: center;
    background: var(--panel2); border: 2px solid var(--line); color: var(--text); font-size: 14px;
  }
  .side-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 40; background: rgba(0, 0, 0, .45); }
  .shell:not(.side-open) .side-scrim { display: none; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 42;
    background: var(--bg2); border-top: 2px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .bottomnav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 48px; padding: 6px 2px;
    background: none; border: 0; color: var(--muted);
    font-size: 10px; line-height: 1.1; text-align: center;
  }
  .bottomnav button img { width: 22px; height: 22px; image-rendering: pixelated; }
  .bottomnav button.active { color: var(--head); }
  .bottomnav button.active img { filter: drop-shadow(0 0 5px var(--accent)); }
  /* pemisah antar grup di laci (WORLD | THE VIAZ) */
  .sidebar .viaz-h:not(:first-child) { margin-top: 8px; padding-top: 10px; border-top: 2px solid var(--line); }
  .btn-row .btn { flex: 1 1 auto; white-space: nowrap; padding: 9px 8px; }
  .view-title h2 { font-size: 13px; }
}

/* ─────────────── Leaderboard (podium + daftar) ─────────────── */
.lb { display: flex; flex-direction: column; gap: 10px; }
.lb-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.lb-pod {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0;
  padding: 10px 6px; text-align: center;
  background: var(--panel2); border: 2px solid var(--line); box-shadow: var(--shadow);
}
.lb-pod.r1 { padding-top: 16px; padding-bottom: 14px; border-color: #b8901e; background: linear-gradient(#3a2c10, var(--panel2)); }
.lb-pod.r2 { border-color: #8a8f99; background: linear-gradient(#2c3038, var(--panel2)); }
.lb-pod.r3 { border-color: #8a5a2e; background: linear-gradient(#352418, var(--panel2)); }
.lb-pod .lb-medal { width: 26px; height: 26px; }
.lb-pod.r1 .lb-medal { width: 34px; height: 34px; }
.lb-pod .lb-rank { font-family: var(--font-pixel); font-size: 12px; color: var(--gold); }
.lb-pod.r2 .lb-rank { color: #c9cfd8; }
.lb-pod.r3 .lb-rank { color: #d99a5e; }
.lb-name { font-weight: 700; color: var(--head); font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-id { font-size: 10px; color: var(--muted); font-family: monospace; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { display: flex; align-items: baseline; gap: 4px; justify-content: center; }
.lb-val b { color: var(--gold); font-size: 13px; }
.lb-val span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.lb-list { display: flex; flex-direction: column; gap: 4px; }
.lb-you { font-size: 10px; color: var(--green); font-weight: 400; margin-left: 4px; }
.lb-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 6px 10px; background: var(--panel2); border: 2px solid var(--line);
}
.lb-row .lb-rank { font-family: var(--font-pixel); font-size: 11px; color: var(--muted); }
.lb-who { display: flex; flex-direction: column; min-width: 0; }
.lb-row .lb-val { justify-content: flex-end; }
.lb-pod.me, .lb-row.me { border-color: var(--accent, #8ac926); box-shadow: inset 0 0 0 2px rgba(138, 201, 38, .25), var(--shadow); }
@media (max-width: 860px) {
  .lb-podium { gap: 5px; }
  .lb-pod { padding: 8px 4px; }
  .lb-name { font-size: 12px; }
}

/* ─────────────── Pager: baris kartu geser ke samping ─────────────── */
.pager { --per: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.pager-track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per) - 1) * 8px) / var(--per));
  gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding: 2px 0 4px;
}
.pager-track::-webkit-scrollbar { display: none; }
.pager-track > * { scroll-snap-align: start; min-width: 0; }
.pager-btn {
  width: 28px; height: 56px; display: grid; place-items: center;
  background: var(--panel2); border: 2px solid var(--line2); box-shadow: var(--shadow);
  color: var(--head); font-size: 20px; line-height: 1;
}
.pager-btn:hover:not(:disabled) { background: var(--panel3); border-color: var(--gold); }
.pager-btn:disabled { opacity: .3; }
.pager-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 5px; }
.pager-dot { width: 8px; height: 8px; padding: 0; background: var(--line); border: 0; }
.pager-dot.on { background: var(--gold); width: 18px; transition: width .2s ease; }
.pager.single .pager-btn, .pager.single .pager-dots { display: none; }
.pager.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1180px) { .pager { --per: 4; } }
@media (max-width: 980px) { .pager { --per: 3; } }
@media (max-width: 860px) {
  .pager { --per: 1.15; grid-template-columns: minmax(0, 1fr); }
  .pager-btn { display: none; }
}

/* Gacha selesai */
.nav-item.ended { opacity: .6; }
.nav-tag { margin-left: auto; font-size: 9px; padding: 1px 5px; color: var(--red); border: 1px solid #7a2a24; text-transform: uppercase; }
.lb-row > img { width: 22px; height: 22px; }
@media (max-width: 860px) { .nav-tag { display: none; } }

/* Halving: lihat mint.css */
.hv-note { margin: 10px 0 0; }

/* ─────────────── Farming (The Viaz) — scene ladang maksimal ─────────────── */
.farm-stack { gap: 14px; }
.farm-field-panel, .farm-seeds-panel { animation: farm-in .35s ease-out both; }
.farm-field-panel { border-color: #4e6b1e; }
/* Langit + bukit + rumput: parallax awan 3 lapis, matahari dengan rays berputar */
.farm-sky {
  position: relative; height: 108px; margin-top: 10px; overflow: hidden;
  border: 2px solid #241b12; border-radius: 3px;
  background: linear-gradient(180deg, #7ec8f2 0%, #b8e4fb 55%, #d9f2c9 78%, #8ac926 100%);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), var(--shadow);
}
.farm-rays {
  position: absolute; top: -46px; left: -46px; width: 150px; height: 150px;
  background: repeating-conic-gradient(rgba(255,255,255,.22) 0 7deg, transparent 7deg 18deg);
  border-radius: 50%; animation: farm-rays 22s linear infinite; pointer-events: none;
}
@keyframes farm-rays { to { transform: rotate(360deg); } }
.farm-sun2 {
  position: absolute; top: 14px; left: 18px; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle, #fff6c9 0%, #ffe08a 45%, #f2b23a 78%);
  box-shadow: 0 0 18px rgba(242,178,58,.9), 0 0 34px rgba(242,178,58,.45);
  animation: farm-sun2 2.6s ease-in-out infinite;
}
@keyframes farm-sun2 { 50% { transform: scale(1.08); box-shadow: 0 0 24px rgba(242,178,58,1); } }
.farm-cloud {
  position: absolute; border-radius: 999px; background: rgba(255,255,255,.92);
  box-shadow: 12px 3px 0 rgba(255,255,255,.85), 22px 0 0 rgba(255,255,255,.9);
  pointer-events: none;
}
.farm-cloud.far { top: 12px; width: 30px; height: 8px; opacity: .75; animation: farm-drift 26s linear infinite; }
.farm-cloud.mid { top: 30px; width: 40px; height: 10px; animation: farm-drift 17s linear infinite; animation-delay: -7s; }
.farm-cloud.near { top: 48px; width: 26px; height: 7px; opacity: .9; animation: farm-drift 12s linear infinite; animation-delay: -3s; }
@keyframes farm-drift { from { left: -70px; } to { left: 108%; } }
.farm-hills {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38px; pointer-events: none;
  background:
    radial-gradient(180px 42px at 18% 100%, #5c8a1e 98%, transparent 100%),
    radial-gradient(240px 48px at 82% 100%, #4e7417 98%, transparent 100%);
}
.farm-grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #6fa01f 0 5px, #5c8a1e 5px 10px);
  clip-path: polygon(0 45%, 3% 0, 6% 45%, 9% 0, 12% 45%, 15% 0, 18% 45%, 21% 0, 24% 45%, 27% 0, 30% 45%, 33% 0, 36% 45%, 39% 0, 42% 45%, 45% 0, 48% 45%, 51% 0, 54% 45%, 57% 0, 60% 45%, 63% 0, 66% 45%, 69% 0, 72% 45%, 75% 0, 78% 45%, 81% 0, 84% 45%, 87% 0, 90% 45%, 93% 0, 96% 45%, 100% 0, 100% 100%, 0 100%);
}
.farm-sky-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.farm-sky-chips .chip { animation: farm-pop .3s ease-out both; }
/* Petak: ring conic progres, crossfade seed→block, goyang + tilt 3D */
.farm-tiles { margin-top: 10px; }
.farm-tile {
  gap: 6px; overflow: hidden; perspective: 600px;
  animation: farm-in .35s ease-out both;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.farm-tile:hover { transform: translateY(-3px) rotateX(3deg); border-color: var(--gold); box-shadow: 0 6px 0 rgba(0,0,0,.45), 0 0 10px rgba(242,178,58,.25); }
.farm-tile.ready { border-color: var(--gold); animation: farm-ready 1.5s ease-in-out infinite; }
@keyframes farm-ready { 50% { box-shadow: 0 0 14px rgba(242,178,58,.6), var(--shadow); } }
.farm-stage {
  display: flex; align-items: flex-end; gap: 8px; min-height: 66px; padding: 10px 4px 2px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, transparent 70%, #241b12 71%, #1c1410 100%);
}
.farm-ring {
  --p: 0; flex: none; width: 58px; height: 58px; border-radius: 50%; padding: 4px;
  background: conic-gradient(#8ac926 calc(var(--p) * 1turn), #241b12 0);
  box-shadow: 0 0 0 2px #1c1410, 0 2px 0 rgba(0,0,0,.4);
  animation: farm-ring-in .5s ease-out both;
}
@keyframes farm-ring-in { from { transform: scale(.85); } to { transform: scale(1); } }
.farm-tile.ready .farm-ring { background: conic-gradient(#f2b23a calc(var(--p) * 1turn), #241b12 0); box-shadow: 0 0 0 2px #7a5a1e, 0 0 12px rgba(242,178,58,.7); }
.farm-crop {
  position: relative; width: 50px; height: 50px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 72%, #4a3826 0%, #2c2417 70%);
  display: grid; place-items: center;
  animation: farm-sway 2.3s ease-in-out infinite; transform-origin: bottom center;
}
.farm-tile:nth-child(3n) .farm-crop { animation-duration: 2.7s; }
.farm-tile:nth-child(4n) .farm-crop { animation-duration: 3.1s; }
@keyframes farm-sway { 50% { transform: rotate(-4deg); } }
.farm-crop-in { display: block; animation: farm-bob 1.9s ease-in-out infinite; position: relative; width: 44px; height: 44px; }
@keyframes farm-bob { 50% { transform: translateY(-2px); } }
.farm-crop img { width: 42px; height: 42px; max-width: 42px; max-height: 42px; }
.farm-crop .farm-block { position: absolute; inset: 1px; width: 42px; height: 42px; max-width: 42px; max-height: 42px; transition: opacity .4s ease; }
.farm-tile.s3 .farm-crop, .farm-tile.ready .farm-crop { filter: drop-shadow(0 0 6px rgba(242,178,58,.65)); }
.farm-qty {
  margin-left: auto; font-family: var(--font-pixel); font-size: 10px; color: var(--gold);
  background: #241b12; border: 2px solid #7a5a1e; padding: 3px 7px; animation: farm-pop .3s ease-out both;
}
.farm-tile-head { align-items: flex-start; }
.farm-ghost { border-style: dashed; opacity: .75; animation: farm-in .35s ease-out both; }
.farm-stage.ghost { justify-content: center; min-height: 66px; }
.farm-ghost-ic { width: 34px; height: 34px; opacity: .5; animation: farm-bob 2.2s ease-in-out infinite; }
.farm-ghost-t { text-align: center; }
.farm-actions { margin-top: 12px; }
.farm-harvest { position: relative; overflow: hidden; }
.farm-harvest::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: farm-shine 2.6s ease-in-out infinite;
}
@keyframes farm-shine { 0%, 40% { left: -45%; } 100% { left: 115%; } }
.farm-harvest-live { animation: farm-btn 1.3s ease-in-out infinite; }
@keyframes farm-btn { 50% { box-shadow: 0 3px 0 #1c1410, 0 0 14px rgba(242,178,58,.9); } }
.farm-toggle { position: relative; padding-left: 34px; }
.farm-knob {
  position: absolute; left: 6px; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transform: translateY(-50%); transition: all .2s ease;
}
.farm-auto-on { background: linear-gradient(#6f9c22, #4e7417) !important; border-color: #93c240 !important; color: #10160a !important; }
.farm-auto-on .farm-knob { left: calc(100% - 22px); background: #10160a; box-shadow: 0 0 6px rgba(255,255,255,.6); }
.farm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 10px 16px; text-align: center; margin-top: 10px;
  border: 2px dashed #4e6b1e; background: linear-gradient(180deg, #274012, #241b12);
}
.farm-empty-ic { width: 44px !important; height: 44px !important; animation: farm-bob 1.8s ease-in-out infinite; }
/* Benih: kartu toko standar, aksen rarity tipis di kiri */
.farm-seed { border-left: 3px solid var(--c, var(--line)); }
.farm-seed.r-common { --c: #6b5236; }
.farm-seed.r-uncommon { --c: #5c8a1e; }
.farm-seed.r-rare { --c: #2f7fb5; }
.farm-seed.r-epic { --c: #8350b5; }
.farm-seed.r-legendary { --c: #c98d16; }
.farm-seed:not(.locked):hover { border-color: var(--line2); border-left-color: var(--c); }
.main .farm-seed img.farm-seed-art { width: 36px; height: 36px; }
.farm-seed-own { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; background: var(--bg2); border: 1px solid var(--line); font-size: 11px; color: var(--head); }
.main .farm-seed-own img { width: 14px; height: 14px; }
.farm-seed.locked img.farm-seed-art { filter: grayscale(.8) brightness(.6); }
.farm-lock {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px; font-size: 12px; color: var(--red);
  background: rgba(28,20,16,.85); border: 2px solid #7a2a24;
}
.farm-lock img { width: 16px; height: 16px; }
@keyframes farm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes farm-pop { from { transform: scale(.9); opacity: .5; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 760px) {
  .farm-tiles { grid-template-columns: minmax(0, 1fr); }
  .farm-sky { height: 88px; }
  .farm-stage { min-height: 60px; }
}

/* ─────────────── Mining (The Viaz) — kaverna maksimal ─────────────── */
.mine-stack { gap: 14px; }
.mine-field-panel, .mine-caves-panel { animation: farm-in .35s ease-out both; }
.mine-field-panel { border-color: #7a6a4a; }
/* Banner kaverna: glow lantern tengah, kristal 3 warna, batuan bertapis */
.mine-cavern {
  position: relative; height: 92px; margin-top: 10px; overflow: hidden;
  border: 2px solid #241b12; border-radius: 3px;
  background: linear-gradient(180deg, #0a0806 0%, #1a1410 42%, #2e2318 72%, #1c1410 100%);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.4), inset 0 0 42px rgba(0,0,0,.7), var(--shadow);
}
.mine-glow {
  position: absolute; left: 50%; top: 44%; width: 220px; height: 110px; border-radius: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(ellipse, rgba(242,178,58,.35) 0%, rgba(242,178,58,.12) 45%, transparent 72%);
  animation: mine-glow 3s ease-in-out infinite; pointer-events: none;
}
.mine-cavern.idle .mine-glow { opacity: .5; }
@keyframes mine-glow { 50% { opacity: .65; transform: translate(-50%,-50%) scale(1.12); } }
.mine-crystal { position: absolute; width: 10px; height: 10px; transform: rotate(45deg); animation: mine-twinkle 2s ease-in-out infinite; pointer-events: none; }
.mine-crystal.c1 { top: 14px; left: 14%; background: #b07ce0; box-shadow: 0 0 8px #b07ce0; }
.mine-crystal.c2 { top: 10px; right: 16%; background: #4fa8e0; box-shadow: 0 0 8px #4fa8e0; animation-delay: -0.7s; }
.mine-crystal.c3 { top: 22px; left: 46%; background: #8ac926; box-shadow: 0 0 8px #8ac926; animation-delay: -1.3s; }
@keyframes mine-twinkle { 50% { transform: rotate(45deg) scale(1.45); opacity: .7; } }
.mine-rock { position: absolute; bottom: 0; height: 16px; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 3px, transparent 3px 18px); }
.mine-rock.r1 { left: 0; right: 0; }
.mine-rock.r2 { left: 8%; right: 64%; height: 24px; border-radius: 50% 50% 0 0; background: #241b12; }
.mine-cavern-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mine-cavern-chips .chip { animation: farm-pop .3s ease-out both; }
/* Kartu ekspedisi: ring progres, pickaxe berayun, pip ore */
.mine-trip { margin-top: 10px; gap: 6px; overflow: hidden; animation: farm-in .35s ease-out both; transition: transform .18s ease, border-color .18s ease; }
.mine-trip:hover { transform: translateY(-2px); border-color: var(--gold); }
.mine-trip.ready { border-color: var(--gold); animation: farm-ready 1.5s ease-in-out infinite; }
.mine-stage { display: flex; align-items: center; gap: 12px; padding: 10px; position: relative; overflow: hidden; background: linear-gradient(180deg, #1c1410 0%, #2e2318 100%); border: 2px solid #241b12; }
.mine-ring {
  --p: 0; flex: none; width: 72px; height: 72px; border-radius: 50%; padding: 5px;
  background: conic-gradient(#f2b23a calc(var(--p) * 1turn), #241b12 0);
  box-shadow: 0 0 0 2px #1c1410, 0 0 12px rgba(242,178,58,.35);
}
.mine-cave-ic { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; background: #1c1410; display: grid; place-items: center; animation: farm-bob 2s ease-in-out infinite; }
.mine-cave-img { width: 52px !important; height: 52px !important; max-width: 52px; max-height: 52px; }
.mine-hero { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mine-swing { display: inline-flex; animation: mine-swing .9s ease-in-out infinite; transform-origin: 80% 90%; }
@keyframes mine-swing { 0%,100% { transform: rotate(-18deg); } 50% { transform: rotate(28deg); } }
.mine-pick { width: 38px !important; height: 38px !important; max-width: 38px; max-height: 38px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.5)); }
.mine-ore-pips { display: flex; gap: 5px; flex-wrap: wrap; }
.mine-ore-pip { width: 30px; height: 30px; border-radius: 50%; background: #241b12; border: 2px solid #4a3826; display: grid; place-items: center; }
.mine-ore-pip.lg { width: 34px; height: 34px; }
.mine-ore-img { width: 22px !important; height: 22px !important; max-width: 22px; max-height: 22px; }
.mine-pct { font-family: var(--font-pixel); font-size: 13px; color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.mine-head { align-items: flex-start; }
.mine-actions { margin-top: 8px; }
.mine-claim { position: relative; overflow: hidden; }
.mine-claim::after { content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: farm-shine 2.6s ease-in-out infinite; }
.mine-claim-live { animation: farm-btn 1.3s ease-in-out infinite; }
.mine-toggle { position: relative; padding-left: 34px; }
.mine-knob { position: absolute; left: 6px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transform: translateY(-50%); transition: all .2s ease; }
.mine-auto-on { background: linear-gradient(#6f9c22, #4e7417) !important; border-color: #93c240 !important; color: #10160a !important; }
.mine-auto-on .mine-knob { left: calc(100% - 22px); background: #10160a; box-shadow: 0 0 6px rgba(255,255,255,.6); }
.mine-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; text-align: center; margin-top: 10px; border: 2px dashed #7a6a4a; background: linear-gradient(180deg, #241b12, #1c1410); }
.mine-empty .mine-pick { animation: farm-bob 2s ease-in-out infinite; }
/* Kartu gua */
.mine-cave { overflow: hidden; animation: farm-in .35s ease-out both; border-left-width: 4px; transition: transform .15s ease, border-color .15s ease; --c: #b9b3a6; }
.mine-cave:hover { transform: translateY(-3px); border-color: var(--gold); }
.mine-cave.r-common { --c: #b9b3a6; }
.mine-cave.r-uncommon { --c: #8ac926; }
.mine-cave.r-rare { --c: #4fa8e0; }
.mine-cave.r-epic { --c: #b07ce0; }
.mine-cave.r-legendary { --c: #f2b23a; box-shadow: 0 0 14px rgba(242,178,58,.3), var(--shadow); animation: farm-leg 2.4s ease-in-out infinite; }
.mine-cave-scene { position: relative; height: 78px; margin: -5px -5px 4px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 38%, rgba(242,178,58,.18) 0%, transparent 62%), linear-gradient(180deg, #0a0806 0%, #2e2318 72%, #1c1410 100%); border-bottom: 2px solid #241b12; }
.mine-glow.sm { width: 150px; height: 80px; }
.mine-cave-scene .mine-cave-img { width: 58px !important; height: 58px !important; max-width: 58px; max-height: 58px; animation: farm-sway 2.6s ease-in-out infinite; transform-origin: bottom center; filter: drop-shadow(0 4px 0 rgba(0,0,0,.55)); }
.mine-depth { position: absolute; top: 6px; right: 6px; font-family: var(--font-pixel); font-size: 9px; color: var(--gold); background: #241b12; border: 2px solid var(--c); padding: 3px 6px; }
.mine-ore-row { position: absolute; left: 8px; bottom: 6px; display: flex; gap: 4px; }
.mine-xph { font-family: var(--font-pixel); font-size: 9px; color: var(--gold); background: #241b12; border: 2px solid #7a5a1e; padding: 4px 7px; text-align: center; }
.mine-lock { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; font-size: 12px; color: var(--red); background: rgba(28,20,16,.85); border: 2px solid #7a2a24; }
.mine-lock img { width: 16px; height: 16px; }
.mine-start { position: relative; overflow: hidden; }
.mine-start-live::after { content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent); animation: farm-shine 2.4s ease-in-out infinite; }
.mine-cave.locked .mine-cave-img, .mine-cave.locked .mine-ore-img { filter: grayscale(.75) brightness(.55); }
@keyframes farm-leg { 50% { box-shadow: 0 0 18px rgba(242,178,58,.55), var(--shadow); } }
@media (max-width: 760px) {
  .mine-cavern { height: 76px; }
  .mine-stage { flex-wrap: wrap; }
}

/* ─────────────── Fishing (The Viaz) — dermaga maksimal ─────────────── */
.fish-stack { gap: 14px; }
.fish-field-panel, .fish-baits-panel { animation: farm-in .35s ease-out both; }
.fish-field-panel { border-color: #2f7fb5; }
/* Laut: langit-ombak 3 lapis, matahari, perahu goyang, joran + tali + pelampung */
.fish-sea {
  position: relative; height: 118px; margin-top: 10px; overflow: hidden;
  border: 2px solid #241b12; border-radius: 3px;
  background: linear-gradient(180deg, #7ec8f2 0%, #b8e4fb 38%, #4fa8e0 66%, #276b99 100%);
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.18), var(--shadow);
}
.fish-sun {
  position: absolute; top: 12px; right: 16px; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle, #fff6c9 0%, #ffe08a 45%, #f2b23a 78%);
  box-shadow: 0 0 16px rgba(242,178,58,.85); animation: farm-sun2 2.6s ease-in-out infinite;
}
.fish-boat { position: absolute; left: 14px; bottom: 34px; animation: fish-bob 2.6s ease-in-out infinite; }
.fish-boat-ic { width: 40px !important; height: 40px !important; max-width: 40px; max-height: 40px; }
@keyframes fish-bob { 50% { transform: translateY(4px) rotate(-3deg); } }
.fish-rod { position: absolute; right: 16px; bottom: 40px; animation: fish-tilt 3.2s ease-in-out infinite; transform-origin: 90% 90%; }
.fish-rod-img { width: 44px !important; height: 44px !important; max-width: 44px; max-height: 44px; }
@keyframes fish-tilt { 50% { transform: rotate(-6deg); } }
.fish-line { position: absolute; right: 30px; bottom: 46px; width: 42px; height: 2px; background: rgba(255,255,255,.7); transform: rotate(28deg); transform-origin: left center; }
.fish-bobber { position: absolute; right: 58px; bottom: 30px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0%, #f26d6d 55%, #b03329 100%); border: 2px solid #241b12; animation: fish-bobber 2s ease-in-out infinite; }
.fish-bobber i { position: absolute; left: 50%; top: -8px; width: 2px; height: 9px; background: #fff; transform: translateX(-50%); }
.fish-bobber.antsy { animation-duration: .55s; }
@keyframes fish-bobber { 50% { transform: translateY(-4px) scale(1.15); } }
.fish-wave { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; pointer-events: none; }
.fish-wave.w1 { bottom: -18px; height: 46px; background: rgba(143,212,250,.55); animation: fish-wave 6s ease-in-out infinite; }
.fish-wave.w2 { bottom: -26px; height: 52px; background: rgba(47,127,181,.65); animation: fish-wave 8s ease-in-out infinite reverse; }
.fish-wave.w3 { bottom: -34px; height: 56px; background: rgba(39,107,153,.85); animation: fish-wave 10s ease-in-out infinite; }
@keyframes fish-wave { 50% { transform: translateX(18px); } }
.fish-sea.live .fish-wave { animation-duration: 4s; }
.fish-sea-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fish-sea-chips .chip { animation: farm-pop .3s ease-out both; }
/* Sesi: ring strike biru, hasil tangkap terakhir */
.fish-session { margin-top: 10px; gap: 6px; overflow: hidden; animation: farm-in .35s ease-out both; transition: transform .18s ease, border-color .18s ease; }
.fish-session:hover { transform: translateY(-2px); border-color: var(--blue); }
.fish-stage { display: flex; align-items: center; gap: 12px; padding: 10px; background: linear-gradient(180deg, #142434 0%, #1c2f42 100%); border: 2px solid #241b12; }
.fish-ring { --p: 0; flex: none; width: 66px; height: 66px; border-radius: 50%; padding: 5px; background: conic-gradient(#4fa8e0 calc(var(--p) * 1turn), #241b12 0); box-shadow: 0 0 0 2px #1c1410, 0 0 12px rgba(79,168,224,.4); }
.fish-bait-ic { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #142434; display: grid; place-items: center; animation: fish-bob 2.2s ease-in-out infinite; }
.fish-bait-img { width: 44px !important; height: 44px !important; max-width: 44px; max-height: 44px; }
.fish-sess-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fish-sess-info .nm { font-weight: 700; color: var(--head); font-size: 13px; }
.fish-pct { font-family: var(--font-pixel); font-size: 13px; color: var(--blue); }
.fish-caught { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.fish-catch { animation: farm-pop .3s ease-out both; }
.fish-catch img { width: 18px !important; height: 18px !important; max-width: 18px; max-height: 18px; }
.fish-actions { margin-top: 8px; }
.fish-reel { position: relative; overflow: hidden; }
.fish-reel::after { content: ''; position: absolute; top: 0; bottom: 0; left: -45%; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: farm-shine 2.6s ease-in-out infinite; }
.fish-reel-live { animation: farm-btn 1.3s ease-in-out infinite; }
.fish-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; text-align: center; margin-top: 10px; border: 2px dashed #2f7fb5; background: linear-gradient(180deg, #142434, #1c1410); }
.fish-empty-ic { width: 44px !important; height: 44px !important; max-width: 44px; max-height: 44px; animation: farm-bob 2s ease-in-out infinite; }
/* Umpan */
.fish-bait { overflow: hidden; animation: farm-in .35s ease-out both; border-left-width: 4px; transition: transform .15s ease, border-color .15s ease; --c: #b9b3a6; }
.fish-bait:hover { transform: translateY(-3px); border-color: var(--blue); }
.fish-bait.r-common { --c: #b9b3a6; }
.fish-bait.r-uncommon { --c: #8ac926; }
.fish-bait.r-rare { --c: #4fa8e0; }
.fish-bait.r-epic { --c: #b07ce0; }
.fish-bait.r-legendary { --c: #f2b23a; box-shadow: 0 0 14px rgba(242,178,58,.3), var(--shadow); animation: farm-leg 2.4s ease-in-out infinite; }
.fish-bait-scene { position: relative; height: 60px; margin: -5px -5px 4px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(180deg, #142434 0%, #1c3a52 62%, #276b99 100%); border-bottom: 2px solid #241b12; }
.fish-bait-wave { position: absolute; left: -10%; right: -10%; bottom: -6px; height: 18px; border-radius: 50%; background: rgba(143,212,250,.4); animation: fish-wave 4.5s ease-in-out infinite; }
.fish-bait-big { width: 44px !important; height: 44px !important; max-width: 44px; max-height: 44px; animation: fish-bob 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)); }
.fish-depth { position: absolute; top: 6px; right: 6px; font-family: var(--font-pixel); font-size: 9px; color: var(--blue); background: #142434; border: 2px solid var(--c); padding: 3px 6px; }
.fish-bait-ic { flex: none; animation: farm-float 2.4s ease-in-out infinite; }
.fish-xph { font-family: var(--font-pixel); font-size: 9px; color: var(--blue); background: #142434; border: 2px solid #2f7fb5; padding: 4px 7px; text-align: center; }
.fish-pool { display: flex; height: 10px; border: 2px solid #241b12; overflow: hidden; background: #241b12; }
.fish-seg { display: block; height: 100%; min-width: 0; }
.fish-seg.r-common { background: #b9b3a6; }
.fish-seg.r-uncommon { background: #8ac926; }
.fish-seg.r-rare { background: #4fa8e0; }
.fish-seg.r-epic { background: #b07ce0; }
.fish-seg.r-legendary { background: #f2b23a; }
.fish-lock { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px; font-size: 12px; color: var(--red); background: rgba(20,36,52,.9); border: 2px solid #7a2a24; }
.fish-lock img { width: 16px; height: 16px; }
.fish-bait.locked .fish-bait-big, .fish-bait.locked .fish-bait-ic img { filter: grayscale(.75) brightness(.55); }
@media (max-width: 760px) {
  .fish-sea { height: 92px; }
  .fish-stage { flex-wrap: wrap; }
}

/* ─────────────── Casino ViazVegas ───────────────
   Palet sengaja dibatasi: hitam/onyx untuk permukaan, emas untuk aksi & angka penting,
   felt hijau tua hanya di meja. Animasi minimal (hover/press), tanpa lampu berkedip. */
.cs {
  --cs-bg: #0e0c0a;
  --cs-surface: #17130f;
  --cs-raise: #1f1a15;
  --cs-line: #2e2720;
  --cs-line2: #4a3d2c;
  --cs-gold: #d9a84a;
  --cs-gold2: #f1cf86;
  --cs-ink: #f3ead8;
  --cs-mute: #9a8c78;
  --cs-felt: #10382a;
  --cs-felt2: #0b2a1f;
  --cs-red: #a8312a;
  --cs-up: #7fbf4d;
  --cs-down: #d0614f;
  gap: 12px;
  color: var(--cs-ink);
}
.cs .cs-fine { margin: 0; font-size: 11px; color: var(--cs-mute); line-height: 1.5; }

/* Lobi: banner + nama */
.cs-lobby { position: relative; border: 1px solid var(--cs-line2); background: var(--cs-bg); overflow: hidden; }
.cs-lobby-art { display: block; width: 100%; aspect-ratio: 1024 / 254; object-fit: cover; filter: saturate(.9) brightness(.8); }
.cs-lobby-bar {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 28px 16px 12px; background: linear-gradient(transparent, rgba(8, 6, 4, .92));
}
.cs-brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cs-brand-k { font-family: var(--font-pixel); font-size: 8px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: 1px; }
.cs-brand h2 { margin: 0; font-family: var(--font-pixel); font-size: 18px; color: var(--cs-gold2); letter-spacing: 1px; text-shadow: 0 2px 0 #000; }
.cs-brand-d { margin: 0; max-width: 340px; font-size: 12px; color: var(--cs-mute); text-align: right; }
.cs-status { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 2px 7px; border: 1px solid currentColor; }
.cs-status.on { color: var(--cs-up); }
.cs-status.off { color: var(--cs-down); }

/* Kasir: saldo chip + KPI */
.cs-cage {
  display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 1px;
  background: var(--cs-line); border: 1px solid var(--cs-line);
}
.cs-cage > * { background: var(--cs-surface); }
.cs-cage-main { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: linear-gradient(180deg, #221b12, var(--cs-surface)); }
.cs-cage-chips { display: flex; align-items: center; gap: 8px; }
.cs-cage-chips img { width: 26px; height: 26px; }
.cs-cage-chips strong { font-family: var(--font-pixel); font-size: 22px; color: var(--cs-gold2); line-height: 1.2; }
.cs-cage-btns { display: flex; gap: 6px; margin-top: 8px; }
.cs-cage-btns .cs-bet-btn:first-child { flex: 1; }
.cs-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--cs-line); }
.cs-kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px; background: var(--cs-surface); min-width: 0; }
.cs-kpi-l { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .6px; }
.cs-kpi-v { font-family: var(--font-pixel); font-size: 13px; color: var(--cs-ink); line-height: 1.4; overflow-wrap: anywhere; }
.cs-kpi-s { font-size: 11px; color: var(--cs-mute); }
.cs-kpi.up .cs-kpi-v { color: var(--cs-up); }
.cs-kpi.down .cs-kpi-v { color: var(--cs-down); }
.cs-cage > .cs-fine { grid-column: 1 / -1; padding: 8px 16px; background: var(--cs-bg); }

.cs-alert { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid #6a2a22; border-left-width: 3px; background: #1d0f0c; }
.cs-alert img { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.cs-alert p { margin: 4px 0 0; font-size: 12px; }
.cs-alert.soft { border-color: var(--cs-line2); background: var(--cs-raise); margin-top: 10px; }

/* Tab */
.cs-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--cs-line2); scrollbar-width: none; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-tab {
  display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 10px 14px;
  background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--cs-mute); font-size: 12px; text-transform: uppercase; letter-spacing: .6px;
  transition: color .12s ease, border-color .12s ease;
}
.cs-tab img { width: 16px; height: 16px; opacity: .65; }
.cs-tab:hover { color: var(--cs-ink); }
.cs-tab.on { color: var(--cs-gold2); border-bottom-color: var(--cs-gold); }
.cs-tab.on img { opacity: 1; }

/* Tombol casino: satu sistem, 4 varian */
.cs-bet-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 14px;
  border: 1px solid var(--cs-line2); background: var(--cs-raise); color: var(--cs-ink);
  font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.cs-bet-btn:hover:not(:disabled) { border-color: var(--cs-gold); }
.cs-bet-btn:active:not(:disabled) { transform: translateY(1px); }
.cs-bet-btn:disabled { opacity: .4; cursor: not-allowed; }
.cs-bet-btn.gold { background: linear-gradient(180deg, #e2b459, #b9862f); border-color: #f1cf86; color: #1a1206; }
.cs-bet-btn.gold:hover:not(:disabled) { background: linear-gradient(180deg, #ecc26b, #c8953a); }
.cs-bet-btn.ghost { background: transparent; }
.cs-bet-btn.danger { background: transparent; border-color: #6a2a22; color: #e8897b; }
.cs-bet-btn.danger:hover:not(:disabled) { background: #2a120e; border-color: var(--cs-down); }
.cs-bet-btn.sm { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.cs-bet-btn.big { min-height: 48px; min-width: 200px; font-size: 13px; }
.cs-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-actions > .cs-bet-btn { flex: 1 1 120px; }
.cs-actions.sm > .cs-bet-btn { flex: 0 0 auto; }
.cs-actions.end { justify-content: flex-end; }

/* Rak chip taruhan */
.cs-floor { display: flex; flex-direction: column; gap: 12px; }
.cs-rack {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px;
  border: 1px solid var(--cs-line); background: var(--cs-surface);
}
.cs-rack-l { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .8px; }
.cs-rack-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-chip {
  position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 0; color: #fff; font-size: 11px; font-weight: 700;
  background: var(--c); box-shadow: 0 3px 0 rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .12s ease;
}
/* Garis tepi chip (edge spots) */
.cs-chip::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, .85) 0 12deg, transparent 12deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%);
}
.cs-chip::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .45); }
.cs-chip span { position: relative; z-index: 1; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.cs-chip.c1 { --c: #f2ede3; color: #1b1712; }
.cs-chip.c1 span { text-shadow: none; }
.cs-chip.c2 { --c: #b2302a; }
.cs-chip.c3 { --c: #1f5a99; }
.cs-chip.c4 { --c: #1f6b3f; }
.cs-chip.c5 { --c: #17120d; color: var(--cs-gold2); }
.cs-chip:hover:not(:disabled) { transform: translateY(-3px); }
.cs-chip.on { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--cs-bg), 0 0 0 4px var(--cs-gold), 0 6px 0 rgba(0, 0, 0, .5); }
.cs-chip:disabled { opacity: .35; }

/* Lantai: daftar game + meja */
.cs-floor-main { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: start; }
.cs-gamelist { display: flex; flex-direction: column; border: 1px solid var(--cs-line); background: var(--cs-surface); }
.cs-game {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 9px 12px;
  background: transparent; border: 0; border-bottom: 1px solid var(--cs-line); border-left: 2px solid transparent;
  color: var(--cs-ink); font-size: 12px; text-align: left; transition: background .12s ease;
}
.cs-game:last-child { border-bottom: 0; }
.cs-game img { width: 20px; height: 20px; }
.cs-game-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-game-r { font-size: 10px; color: var(--cs-mute); font-variant-numeric: tabular-nums; }
.cs-game:hover { background: var(--cs-raise); }
.cs-game.on { background: #241c12; border-left-color: var(--cs-gold); color: var(--cs-gold2); }

.cs-table { border: 1px solid var(--cs-line2); background: var(--cs-surface); }
.cs-table.off { opacity: .6; }
.cs-table-h { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--cs-line); }
.cs-table-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--cs-line2); background: var(--cs-bg); }
.cs-table-ic img { width: 28px; height: 28px; }
.cs-table-h h3 { margin: 0; font-family: var(--font-pixel); font-size: 13px; color: var(--cs-gold2); line-height: 1.4; }
.cs-table-h p { margin: 3px 0 0; font-size: 12px; color: var(--cs-mute); }
.cs-specs { display: flex; gap: 18px; margin: 0; }
.cs-specs div { text-align: right; }
.cs-specs dt { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .6px; }
.cs-specs dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-felt {
  display: flex; flex-direction: column; gap: 12px; padding: 22px 16px;
  background: radial-gradient(ellipse at 50% 0%, var(--cs-felt) 0%, var(--cs-felt2) 75%);
  box-shadow: inset 0 0 0 1px rgba(217, 168, 74, .18), inset 0 12px 30px rgba(0, 0, 0, .35);
}
.cs-felt > .cs-actions { justify-content: center; }
.cs-felt > .cs-actions > .cs-bet-btn { flex: 0 1 180px; }
.cs-felt .cs-bet-btn.ghost { border-color: rgba(241, 207, 134, .35); background: rgba(0, 0, 0, .2); }
.cs-felt .cs-bet-btn.risk { flex: 0 1 150px; }
.cs-bet-btn.risk.low { border-color: #3f7a4b; }
.cs-bet-btn.risk.mid { border-color: #9a7a2c; }
.cs-bet-btn.risk.high { border-color: #8a3226; }

/* Roulette: papan 0 + 3×12, taruhan luar di bawah */
.cs-wheelboard { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
.cs-numgrid { display: grid; grid-template-columns: 40px repeat(12, minmax(30px, 1fr)); grid-template-rows: repeat(3, 34px); gap: 2px; min-width: 460px; }
.cs-numgrid > :first-child { grid-row: 1 / span 3; }
.cs-bet-btn.num { min-height: 0; padding: 0; font-size: 12px; border: 1px solid rgba(255, 255, 255, .25); }
.cs-bet-btn.num.red { background: var(--cs-red); }
.cs-bet-btn.num.black { background: #15110d; }
.cs-bet-btn.num.zero { background: #1f6b3f; }
.cs-outside { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; min-width: 460px; }
.cs-outside > :nth-child(n + 7) { grid-column: span 2; }
.cs-bet-btn.felt { min-height: 34px; font-size: 11px; background: transparent; border-color: rgba(255, 255, 255, .25); }
.cs-bet-btn.felt.red { background: var(--cs-red); }
.cs-bet-btn.felt.black { background: #15110d; }

/* Mines */
.cs-mines { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cs-mines-grid { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; }
.cs-tile {
  aspect-ratio: 1; border: 1px solid rgba(241, 207, 134, .25);
  background: linear-gradient(180deg, #2a2219, #1a1510); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35);
  transition: border-color .12s ease, transform .08s ease;
}
.cs-tile:hover:not(:disabled) { border-color: var(--cs-gold); }
.cs-tile:active:not(:disabled) { transform: translateY(1px); }

/* Game sampingan */
.cs-sides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cs-side { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--cs-line); background: var(--cs-surface); }
.cs-side.off { opacity: .6; }
.cs-side-h { display: flex; align-items: center; gap: 10px; }
.cs-side-h img { width: 24px; height: 24px; }
.cs-side-h h4 { margin: 0; font-size: 13px; color: var(--cs-ink); }
.cs-side-h span { font-size: 11px; color: var(--cs-mute); }
.cs-side > p { margin: 0; font-size: 12px; color: var(--cs-mute); flex: 1; }

/* Kartu umum (pots/duel/season/shop/info) */
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.cs-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--cs-line); background: var(--cs-surface); }
.cs-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--cs-line); }
.cs-card-h h3 { margin: 0; font-size: 11px; color: var(--cs-gold2); text-transform: uppercase; letter-spacing: 1px; }
.cs-card-meta { font-size: 11px; color: var(--cs-mute); }
.cs-figs { display: flex; flex-wrap: wrap; gap: 1px; background: var(--cs-line); border: 1px solid var(--cs-line); }
.cs-fig { flex: 1 1 100px; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--cs-raise); }
.cs-fig span { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .5px; }
.cs-fig strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.cs-fig.gold strong { color: var(--cs-gold2); }
.cs-fig.down strong { color: var(--cs-down); }
.cs-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* Ledger / tabel */
.cs-ledger { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.cs-ledger th { padding: 6px 8px; font-size: 10px; font-weight: 400; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .5px; text-align: left; border-bottom: 1px solid var(--cs-line2); }
.cs-ledger td { padding: 8px; border-bottom: 1px solid var(--cs-line); vertical-align: middle; }
.cs-ledger tr:last-child td { border-bottom: 0; }
.cs-ledger .r { text-align: right; }
.cs-ledger .muted { color: var(--cs-mute); }
.cs-ledger .gold { color: var(--cs-gold2); font-weight: 700; }
.cs-ledger tr.win td:last-child { color: var(--cs-up); font-weight: 700; }
.cs-ledger tr.loss td:last-child { color: var(--cs-down); }
.cs-ledger.compact td { padding: 5px 8px; }
.cs-pays { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cs-pay h4 { margin: 0 0 4px; font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .6px; }

/* Lotre */
.cs-ticket { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px dashed var(--cs-line2); background: var(--cs-raise); }
.cs-ticket.mega { border-color: rgba(217, 168, 74, .55); background: linear-gradient(180deg, #2a2010, var(--cs-raise)); }
.cs-ticket header { display: flex; justify-content: space-between; gap: 8px; }
.cs-ticket-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.cs-ticket-pot span, .cs-jackpot-pot span { display: block; font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .6px; }
.cs-ticket-pot strong { font-family: var(--font-pixel); font-size: 18px; color: var(--cs-gold2); }

/* Jackpot */
.cs-jackpot-pot { padding: 6px 0; text-align: center; }
.cs-jackpot-pot strong { display: block; font-family: var(--font-pixel); font-size: 26px; color: var(--cs-gold2); line-height: 1.3; text-shadow: 0 2px 0 #000; }
.cs-jackpot-pot em { font-style: normal; font-size: 11px; color: var(--cs-mute); }
.cs-rank { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.cs-rank li { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--cs-line); font-size: 12px; font-variant-numeric: tabular-nums; }
.cs-rank li:first-child strong { color: var(--cs-gold2); }

/* Balap & prediksi */
.cs-lanes { display: flex; flex-direction: column; gap: 4px; }
.cs-lane {
  display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--cs-raise); border: 1px solid var(--cs-line); color: var(--cs-ink); font-size: 12px; text-align: left;
}
.cs-lane:hover:not(:disabled) { border-color: var(--cs-gold); }
.cs-lane:disabled { opacity: .5; }
.cs-lane-bar { height: 6px; background: var(--cs-bg); }
.cs-lane-bar i { display: block; height: 100%; background: var(--cs-gold); }
.cs-lane-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--cs-mute); }
.cs-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cs-versus .side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-versus .side:last-child { text-align: right; }
.cs-versus .side span { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-versus .side strong { font-family: var(--font-pixel); font-size: 15px; }
.cs-versus .damned strong { color: var(--cs-down); }
.cs-versus .chosen strong { color: var(--cs-gold2); }
.cs-versus-bar { width: 120px; height: 6px; background: var(--cs-gold); }
.cs-versus-bar i { display: block; height: 100%; background: var(--cs-down); }
.cs-duel-pot { text-align: center; }
.cs-duel-pot span { display: block; font-size: 10px; color: var(--cs-mute); text-transform: uppercase; }
.cs-duel-pot strong { display: block; font-family: var(--font-pixel); font-size: 16px; color: var(--cs-gold2); }
.cs-duel-pot em { font-style: normal; font-size: 11px; color: var(--cs-mute); }

/* Season */
.cs-progress { display: flex; align-items: center; gap: 10px; }
.cs-progress-t { flex: 1; height: 8px; background: var(--cs-bg); border: 1px solid var(--cs-line); }
.cs-progress-t i { display: block; height: 100%; background: linear-gradient(90deg, #b9862f, var(--cs-gold2)); }
.cs-progress span { font-size: 11px; color: var(--cs-mute); font-variant-numeric: tabular-nums; }
.cs-tiers { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.cs-tiers li { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--cs-line); font-size: 12px; opacity: .55; }
.cs-tiers li:last-child { border-bottom: 0; }
.cs-tiers li.ready, .cs-tiers li.done { opacity: 1; }
.cs-tiers li.ready { background: linear-gradient(90deg, rgba(217, 168, 74, .1), transparent); }
.cs-tier-n { width: 56px; font-size: 10px; color: var(--cs-mute); text-transform: uppercase; }

/* Toko */
.cs-items { display: flex; flex-direction: column; }
.cs-item { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--cs-line); }
.cs-item:last-child { border-bottom: 0; }
.cs-item img { width: 26px; height: 26px; }
.cs-item h4 { margin: 0; font-size: 13px; }
.cs-item span { font-size: 11px; color: var(--cs-mute); }
.cs-item.off { opacity: .55; }
.cs-options { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-option { padding: 7px 12px; border: 1px solid var(--cs-line2); background: var(--cs-raise); color: var(--cs-ink); font-size: 12px; }
.cs-option:hover:not(:disabled) { border-color: var(--cs-gold); }
.cs-option.on { border-color: var(--cs-gold); color: var(--cs-gold2); }
.cs-option:disabled { opacity: .4; }

/* Info */
.cs-achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.cs-ach { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--cs-line); background: var(--cs-raise); opacity: .55; }
.cs-ach.done { opacity: 1; border-color: rgba(217, 168, 74, .45); }
.cs-ach img { width: 20px; height: 20px; }
.cs-ach strong { display: block; font-size: 12px; }
.cs-ach span { font-size: 11px; color: var(--cs-mute); }
.cs-ach-mark { color: var(--cs-gold2); font-weight: 700; }
.cs-kvs { display: flex; flex-direction: column; gap: 6px; }
.cs-kv { display: flex; flex-direction: column; gap: 3px; }
.cs-kv span { font-size: 10px; color: var(--cs-mute); text-transform: uppercase; letter-spacing: .5px; }
.cs-kv code { padding: 6px 8px; background: var(--cs-bg); border: 1px solid var(--cs-line); font-size: 11px; color: var(--cs-ink); overflow-wrap: anywhere; }

/* Kosong */
.cs .empty { border: 1px dashed var(--cs-line2); background: transparent; }

@media (max-width: 1080px) {
  .cs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-sides { grid-template-columns: 1fr; }
}
/* Kolom grid tidak boleh melebar mengikuti isi (min-content) — penyebab layar HP terpotong. */
.cs > *, .cs-floor > *, .cs-floor-main > *, .cs-grid > *, .cs-felt > *, .cs-card > * { min-width: 0; }
@media (max-width: 760px) {
  .cs { gap: 10px; }
  .cs-cage { grid-template-columns: minmax(0, 1fr); }
  .cs-cage-main { padding: 12px; }
  .cs-kpi { padding: 10px 12px; }
  .cs-lobby-bar { position: static; padding: 10px 12px; background: var(--cs-bg); flex-direction: column; align-items: flex-start; }
  .cs-brand-d { text-align: left; }

  /* Tab: grid 3 kolom, semua terlihat tanpa geser */
  .cs-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: visible; border: 1px solid var(--cs-line); background: var(--cs-line); }
  .cs-tab { flex-direction: column; gap: 4px; padding: 8px 4px; margin: 0; border-bottom-width: 2px; background: var(--cs-surface); font-size: 10px; letter-spacing: .3px; text-align: center; white-space: normal; }
  .cs-tab.on { background: #241c12; }

  /* Chip: 5 kolom sama lebar, selalu muat satu baris */
  .cs-rack { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .cs-rack-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .cs-chip { width: 100%; height: auto; max-width: 56px; aspect-ratio: 1; justify-self: center; font-size: 10px; }

  /* Daftar game: grid kartu kecil, bukan baris geser */
  .cs-floor-main { grid-template-columns: minmax(0, 1fr); }
  .cs-gamelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 1px; background: var(--cs-line); }
  .cs-game { display: flex; flex-direction: column; gap: 4px; padding: 8px 4px; border: 0; border-top: 2px solid transparent; background: var(--cs-surface); text-align: center; }
  .cs-game.on { border-left: 0; border-top-color: var(--cs-gold); }
  .cs-game-n { white-space: normal; font-size: 11px; line-height: 1.25; }
  .cs-game-r { display: none; }

  .cs-table-h { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .cs-specs { width: 100%; justify-content: flex-start; }
  .cs-specs div { text-align: left; }
  .cs-felt { padding: 16px 12px; }
  .cs-felt > .cs-actions > .cs-bet-btn { flex: 1 1 120px; }
  .cs-bet-btn.big { min-width: 0; width: 100%; }

  /* Roulette tegak (3 kolom × 12 baris) seperti meja di aplikasi casino HP */
  .cs-numgrid { min-width: 0; direction: rtl; grid-auto-flow: column; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 34px repeat(12, 30px); }
  .cs-numgrid > :first-child { grid-row: 1; grid-column: 1 / -1; }
  .cs-outside { min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-outside > :nth-child(n + 7) { grid-column: auto; }

  .cs-mines-grid { grid-template-columns: repeat(5, minmax(0, 48px)); }
  .cs-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-card { padding: 12px; }
  .cs-versus-bar { width: 56px; }
  .cs-ledger td, .cs-ledger th { padding: 6px 5px; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .cs *, .cs *::before, .cs *::after { transition: none !important; }
}
.pager:has(> .seed-row) { --per: 3; }
@media (max-width: 1180px) { .pager:has(> .seed-row) { --per: 2; } }
@media (max-width: 860px) { .pager:has(> .seed-row) { --per: 1.1; } }

/* ─────────────── Chat (World / Guild / DM) ─────────────── */
.nav-count {
  margin-left: auto; min-width: 18px; padding: 1px 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700; text-align: center; line-height: 16px;
}
@media (max-width: 860px) {
  .nav-item { position: relative; }
  .nav-item span.nav-count { display: block; position: absolute; top: 3px; right: 3px; min-width: 15px; padding: 0 3px; font-size: 9px; line-height: 14px; }
}
/* Layar chat: lihat chat.css */
/* Voice (panel kanan) */
.voice-list { display: flex; flex-direction: column; gap: 4px; }
.voice-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid transparent; font-size: 12px; }
.voice-row em { font-style: normal; font-size: 10px; color: var(--muted); }
.voice-av { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s ease; }
.voice-row.talk .voice-av { box-shadow: 0 0 0 2px var(--green); }
.voice-row.talk { border-color: rgba(138, 201, 38, .35); }
.voice-tag { color: var(--green) !important; }
.voice-hint { margin: 4px 0; font-size: 11px; }
/* Cari guild */
.clan-search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; margin-top: 4px; }
.clan-search input { min-width: 0; }
@media (max-width: 560px) { .clan-search { grid-template-columns: 1fr 1fr; } .clan-search input { grid-column: 1 / -1; } }
/* Form masukan */
.fb-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.fb-form .field { display: flex; flex-direction: column; gap: 4px; }
.fb-form .field span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.fb-form input, .fb-form textarea { width: 100%; padding: 8px 10px; background: var(--bg2); border: 2px solid var(--line); color: var(--text); font: inherit; font-size: 13px; resize: vertical; }
.fb-form input:focus, .fb-form textarea:focus { outline: none; border-color: var(--accent); }
.confirm-text { margin: 0; white-space: pre-line; line-height: 1.5; }
/* Banner raid The Chosen (pengganti DM) */
.raid-alert {
  position: fixed; z-index: 60; top: calc(var(--top-h) + 8px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: min(560px, calc(100vw - 24px)); padding: 10px 12px;
  background: #2a0f0c; border: 2px solid var(--red); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); font-size: 13px;
  animation: raid-in .25s ease-out;
}
.raid-alert img { width: 22px; height: 22px; flex: none; }
.raid-alert strong { color: #ffb4a6; }
@keyframes raid-in { from { opacity: 0; transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) { .raid-alert { animation: none; } }

/* ─────────────── Event: ringkasan + stack ─────────────── */
.ev-view { gap: 10px; }
.ev-stack { gap: 14px; }
.ev-stack > .grid { gap: 14px; }
.dev-chip { border-color: #b07ce0 !important; color: #d9b8ff; background: #2a1838 !important; }

/* ─────────────── Plot (Bazaar Farm) ─────────────── */
.plot-cap { display: grid; gap: 6px; }
.plot-cap-bar { height: 14px; background: var(--bg2); border: 2px solid var(--line); overflow: hidden; }
.plot-used { display: block; height: 100%; background: linear-gradient(#a5dd3a, #6fa01f); transition: width .5s ease-out; }
.plot-src { display: flex; height: 6px; gap: 2px; }
.plot-seg { min-width: 4px; }
.plot-seg.base, .plot-legend .base i { background: #b9b3a6; }
.plot-seg.lvl, .plot-legend .lvl i { background: var(--green); }
.plot-seg.buy, .plot-legend .buy i { background: var(--gold); }
.plot-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); }
.plot-legend span { display: inline-flex; align-items: center; gap: 5px; }
.plot-legend i { width: 8px; height: 8px; }
.plot-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 9px; background: var(--bg2); border-left: 3px solid var(--green); font-size: 12px; }
.plot-note.bad { border-left-color: var(--red); color: #ffd9d4; }
.main .plot-note img { width: 16px; height: 16px; }
.plot-packs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.plot-pack {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  background: var(--panel2); border: 2px solid var(--line2); box-shadow: 0 3px 0 #1c1410; color: var(--head);
  transition: border-color .12s ease, transform .08s ease;
}
.plot-pack:hover:not(:disabled) { border-color: var(--gold); }
.plot-pack:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #1c1410; }
.plot-pack:disabled { opacity: .5; }
.plot-pack-n { font-family: var(--font-pixel); font-size: 11px; color: var(--head); }
.plot-pack-cost { display: inline-flex; align-items: center; gap: 4px; }
.plot-pack-cost b { font-size: 14px; color: var(--gold); }
.main .plot-pack-cost img { width: 14px; height: 14px; }
.plot-pack small { font-size: 10px; color: var(--muted); text-align: center; }
.plot-pack.custom { border-style: dashed; justify-content: center; }
.plot-pack.custom .plot-pack-n { font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.plot-hint { margin: 10px 0 0; font-size: 11px; }
@media (max-width: 860px) {
  .plot-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plot-pack.custom { grid-column: 1 / -1; }
}
/* Saklar pengaturan (checkbox) */
.switch-row { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.switch-input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* Pengaturan suara */
.sound-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 44px; align-items: center; gap: 10px; max-width: 420px; margin: 8px 0; font-size: 13px; }
.sound-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.sound-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* Goals > Top: filter jenis papan peringkat */
.top-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; background: var(--panel2); border: 2px solid var(--line); color: var(--muted); }
.chip-btn:hover { color: var(--head); }
.chip-btn.on { color: var(--head); border-color: var(--gold); background: #2a2010; }
.main .chip-btn img.pix { width: 16px; height: 16px; }

/* ─────────────── Goals ─────────────── */
/* Tab Goals: di HP dibungkus 3 kolom (bukan satu baris geser tanpa scrollbar yang memotong Ranks/Top/Ascension). */
.tab-n { display: inline-block; margin-left: 5px; min-width: 14px; padding: 1px 3px; font-size: 7px; line-height: 1.3; text-align: center; color: #1a1206; background: var(--gold); }
@media (max-width: 860px) {
  .tabs.goal-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .tabs.goal-tabs > .tab { min-width: 0; padding: 7px 2px; font-size: 7px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.rank-list { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.rank-panel { display: flex; flex-direction: column; gap: 10px; }
.rank-panel.ready { border-color: var(--gold); }
.rank-panel .panel-h { margin-bottom: 0; }
.rank-chip { white-space: nowrap; }
.rank-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.rank-step {
  --rc: #b9b3a6;
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  padding: 5px 2px; background: var(--bg2); border: 2px solid var(--line); opacity: .5;
}
.rank-step b { font-size: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-step span { font-size: 9px; color: var(--muted); }
@media (max-width: 420px) { .rank-ladder, .tabs.goal-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rank-step.on { opacity: 1; border-color: var(--rc); box-shadow: inset 0 0 8px color-mix(in srgb, var(--rc) 30%, transparent); }
.rank-step.next { opacity: 1; border-style: dashed; border-color: var(--rc); }
.rank-bonus { margin: 0; font-size: 11px; color: var(--muted); }
.rank-max { margin: 0; font-size: 12px; color: var(--gold); }
.rank-next { padding: 8px; background: var(--bg2); border: 2px solid var(--line); }
.rank-next-h { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.rank-next-h span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.rank-reqs { display: flex; flex-direction: column; gap: 8px; }
.rank-req.ok .bar-meta span { color: var(--green); }
.rank-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.rank-foot .btn { flex: 1 1 140px; }

/* ─────────────── Fit mode (jendela sempit / Activity diminimalkan) ───────────────
   Layout desktop 3 kolom dipertahankan; seluruh .shell di-scale turun lewat --fit
   (diatur applyFit() di game.js) supaya muat utuh, bukan reflow ke layout mobile.
   ponytail: override balik breakpoint ≤1180/≤860, bukan @container. Pindah ke
   @container (width-based) kalau breakpoint konten lain ikut meleset. */
html.fit { --top-h: 58px; }
html.fit body { overflow: hidden; }
html.fit .shell {
  width: calc(100vw / var(--fit));
  height: calc(100dvh / var(--fit));
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--right-w);
  grid-template-rows: var(--top-h) minmax(0, 1fr);
  grid-template-areas: 'top top top' 'side main right';
  transform: scale(var(--fit));
  transform-origin: top left;
}
html.fit .topbar { gap: 10px; padding: 0 12px; }
html.fit .brand img { width: 34px; height: 34px; }
html.fit .brand-name { display: block; }
html.fit .top-stats { flex-wrap: wrap; gap: 8px; overflow: visible; }
html.fit .top-stats .stat-chip { height: 30px; font-size: 12px; padding: 0 9px; }
html.fit .top-stats .stat-chip.hide-sm { display: inline-flex; }
html.fit .top-stats .stat-chip.money > span { display: inline; }
html.fit .top-actions { gap: 6px; }
html.fit .icon-btn { width: 32px; height: 32px; }
html.fit .main { padding: 12px; }
html.fit .sidebar {
  position: static; width: auto; transform: none; transition: none; box-shadow: none;
  z-index: auto; padding: 10px 8px 20px;
}
html.fit .rightbar {
  position: static; width: auto; transform: none; transition: none; box-shadow: none; z-index: auto;
}
html.fit .bottomnav,
html.fit .side-scrim,
html.fit .right-scrim,
html.fit .side-title,
html.fit .icon-btn.stats-btn { display: none; }
html.fit .map-wrap { grid-template-columns: minmax(0, 1fr) 280px; }
/* Chat: kembalikan daftar room + percakapan berdampingan (bukan mode daftar HP). */
html.fit .ch-view { height: calc(100dvh / var(--fit) - var(--top-h) - 24px); }
html.fit .ch { grid-template-columns: 272px minmax(0, 1fr); }
html.fit .ch-rooms { display: flex; }
html.fit .ch.list .ch-rooms { display: flex; }
html.fit .ch.list .ch-main { display: flex; }
html.fit .ch-back { display: none; }
html.fit .guide-layout { grid-template-columns: 210px 1fr; }
html.fit .guide-toc { position: sticky; flex-direction: column; overflow: visible; }
