:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card2: #334155;
  --accent: #22c55e;
  --accent2: #16a34a;
  --gold: #fbbf24;
  --danger: #ef4444;
  --blue: #38bdf8;
  --purple: #a78bfa;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100dvh; overflow-x: hidden;
}
button, input { font-family: inherit; }

/* Screens */
.screen { display: none; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; }

/* Auth */
.auth-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px; background:
    radial-gradient(ellipse at top, #1e3a5f 0%, var(--bg) 60%);
}
.auth-logo { font-size: 2.4rem; margin-bottom: 6px; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; text-align: center; }
.auth-box {
  width: 100%; max-width: 340px; background: var(--card);
  border-radius: 18px; padding: 22px; border: 1px solid var(--border);
}
.auth-box h2 { font-size: 1.1rem; margin-bottom: 14px; text-align: center; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field select { cursor: pointer; }
.btn {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #052e16; }
.btn-secondary { background: var(--card2); color: var(--text); margin-top: 8px; }
.btn-gold { background: linear-gradient(135deg, #fbbf24, #d97706); color: #422006; }
.btn-danger { background: #7f1d1d; color: #fecaca; }
.btn:active { opacity: 0.9; transform: scale(0.98); }
.auth-err { color: #fca5a5; font-size: 0.82rem; text-align: center; margin-top: 8px; min-height: 1.2em; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.topbar .brand { font-weight: 800; font-size: 1rem; color: var(--accent); }
.coin-badge {
  display: flex; align-items: center; gap: 6px;
  background: #422006; color: var(--gold); padding: 6px 12px;
  border-radius: 20px; font-weight: 700; font-size: 0.9rem;
}
.topbar-user { font-size: 0.78rem; color: var(--muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lobby */
.content { flex: 1; padding: 14px; padding-bottom: 80px; overflow-y: auto; }
.banner {
  background: linear-gradient(135deg, #14532d, #166534 40%, #22c55e);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.banner h2 { font-size: 1.1rem; margin-bottom: 4px; }
.banner p { font-size: 0.82rem; opacity: 0.9; }
.section-title {
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 10px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: 0.15s; position: relative;
}
.game-card:active { transform: scale(0.97); }
.game-card .ico { font-size: 1.8rem; margin-bottom: 6px; }
.game-card .name { font-weight: 700; font-size: 0.9rem; }
.game-card .desc { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.game-card.locked { opacity: 0.75; }
.game-card .lock-tag {
  position: absolute; top: 8px; right: 8px;
  background: #422006; color: var(--gold); font-size: 0.68rem;
  padding: 3px 7px; border-radius: 8px; font-weight: 700;
}
.game-card.core {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  border-color: var(--blue);
}
.mission-card {
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border);
}
.mission-card .m-ico { font-size: 1.4rem; }
.mission-card .m-info { flex: 1; }
.mission-card .m-title { font-size: 0.88rem; font-weight: 600; }
.mission-card .m-prog { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.mission-card .m-reward {
  background: #14532d; color: var(--accent); font-size: 0.75rem;
  padding: 5px 10px; border-radius: 8px; font-weight: 700; white-space: nowrap;
}
.mission-card.done { opacity: 0.55; }

/* Bottom nav */
.botnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom);
}
.bnav {
  flex: 1; padding: 8px 4px; border: none; background: none;
  color: var(--muted); font-size: 0.65rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bnav .ico { font-size: 1.2rem; }
.bnav.active { color: var(--accent); }

/* Shop */
.shop-pack {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
}
.shop-pack .s-ico { font-size: 2rem; }
.shop-pack .s-info { flex: 1; }
.shop-pack .s-name { font-weight: 700; }
.shop-pack .s-coins { color: var(--gold); font-size: 0.85rem; font-weight: 600; }
.shop-pack .s-price {
  background: var(--card2); padding: 8px 14px; border-radius: 10px;
  font-weight: 700; font-size: 0.85rem; border: none; color: var(--text); cursor: pointer;
}
.shop-pack.best { border-color: var(--gold); }

/* Game container */
.game-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.game-header .back {
  width: 36px; height: 36px; border-radius: 10px; border: none;
  background: var(--card2); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.game-header h1 { font-size: 1rem; flex: 1; }
.game-body {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.game-area {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding: 12px; overflow: auto; min-width: 0;
}
.game-side {
  display: none; /* tampil di layar lebar */
  width: 160px; flex-shrink: 0; padding: 10px 8px;
  background: var(--card); border-color: var(--border);
  overflow-y: auto; font-size: 0.78rem;
}
.game-side-left { border-right: 1px solid var(--border); }
.game-side-right { border-left: 1px solid var(--border); }
.side-box {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; margin-bottom: 10px;
}
.side-box h4 {
  margin: 0 0 6px; font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.side-ad {
  min-height: 100px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); font-size: 0.68rem;
  margin-bottom: 10px; background: var(--bg); padding: 8px;
}
.side-stat { font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.side-stat small { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.game-mobile-bar {
  display: flex; gap: 8px; padding: 8px 10px; background: var(--card);
  border-top: 1px solid var(--border); flex-shrink: 0; overflow-x: auto;
}
.game-mobile-bar .mb-item {
  flex: 1; min-width: 70px; background: var(--card2); border-radius: 10px;
  padding: 6px 8px; text-align: center; font-size: 0.68rem; color: var(--muted);
}
.game-mobile-bar .mb-item strong { display: block; color: var(--text); font-size: 0.85rem; }
@media (min-width: 720px) {
  .game-body { flex-direction: row; }
  .game-side { display: block; }
  .game-mobile-bar { display: none; }
  .game-area { justify-content: center; }
  #tradeMobileWallet { display: none !important; }
}
@media (min-width: 1000px) {
  .game-side { width: 180px; }
}
.game-stats {
  display: flex; gap: 16px; margin-bottom: 12px; font-size: 0.85rem; font-weight: 600;
  flex-wrap: wrap; justify-content: center;
}
.game-stats span { color: var(--muted); font-weight: 400; }

/* Trading */
.trade-panel { width: 100%; max-width: 920px; }
#assetList.trade-cols { width: 100%; }
@media (max-width: 700px) {
  #assetList.trade-cols {
    grid-template-columns: 1fr !important;
  }
}
.asset-row {
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
}
.asset-row .a-name { flex: 1; font-weight: 700; font-size: 0.9rem; }
.asset-row .a-price { font-weight: 700; font-size: 0.95rem; }
.asset-row .a-change { font-size: 0.75rem; font-weight: 600; }
.asset-row .a-change.up { color: var(--accent); }
.asset-row .a-change.down { color: var(--danger); }
.trade-btns { display: flex; gap: 6px; }
.trade-btns button {
  padding: 7px 12px; border: none; border-radius: 8px;
  font-weight: 700; font-size: 0.75rem; cursor: pointer;
}
.btn-buy { background: #14532d; color: var(--accent); }
.btn-sell { background: #7f1d1d; color: #fca5a5; }
.portfolio-box {
  background: var(--card); border-radius: 12px; padding: 14px;
  margin-bottom: 14px; border: 1px solid var(--border);
}
.portfolio-box .p-label { font-size: 0.75rem; color: var(--muted); }
.portfolio-box .p-val { font-size: 1.4rem; font-weight: 800; color: var(--gold); }

/* Snake canvas */
#snakeCanvas, #shootCanvas {
  background: #020617; border-radius: 12px; border: 2px solid var(--border);
  max-width: 100%; touch-action: none;
}
.ctrl-pad {
  display: grid; grid-template-columns: repeat(3, 56px); gap: 6px;
  margin-top: 12px; justify-content: center;
}
.ctrl-pad button {
  width: 56px; height: 56px; border-radius: 12px; border: none;
  background: var(--card2); color: var(--text); font-size: 1.2rem; cursor: pointer;
}
.ctrl-pad button:active { background: var(--accent); color: #052e16; }

/* 2048 */
.g2048 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  width: min(320px, 92vw); background: var(--card2); padding: 8px; border-radius: 12px;
}
.g2048 .cell {
  aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.3rem;
  background: var(--card);
}

/* Memory */
.mem-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  width: min(320px, 92vw);
}
.mem-card {
  aspect-ratio: 1; border-radius: 10px; background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; cursor: pointer; border: 2px solid var(--border);
  transition: 0.2s;
}
.mem-card.flipped, .mem-card.matched {
  background: var(--card); border-color: var(--accent);
}
.mem-card.matched { opacity: 0.6; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--card); border-radius: 18px; padding: 22px;
  width: 100%; max-width: 340px; text-align: center; border: 1px solid var(--border);
}
.modal h3 { margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.45; }
.modal .btn { margin-top: 6px; }

/* Ad fake */
.ad-box {
  background: #1a1a2e; border: 2px dashed var(--purple); border-radius: 12px;
  padding: 24px; margin: 12px 0; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ad-box .ad-label { font-size: 0.7rem; color: var(--muted); margin-bottom: 8px; }
.ad-timer { font-size: 2rem; font-weight: 800; color: var(--purple); }

.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: #14532d; color: var(--accent); padding: 10px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; opacity: 0; transition: 0.25s; z-index: 200;
  pointer-events: none; white-space: nowrap; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #7f1d1d; color: #fecaca; }

.hint { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.4; }

/* PlayTown di HP/tablet: layar penuh (header, bar bawah, panel samping disembunyikan) */
body.sh-immersive { overflow: hidden; overscroll-behavior: none; }
body.sh-immersive #screen-game .game-header,
body.sh-immersive #screen-game .game-mobile-bar,
body.sh-immersive #screen-game .game-side { display: none !important; }
body.sh-immersive #screen-game .game-area { padding: 0; }

/* ===== PlayTown HUD — desain orisinal: bingkai biru malam + tepi emas ===== */
.sh-frame { background: linear-gradient(180deg, rgba(20,36,66,.94), rgba(9,18,38,.94)); border: 2px solid #dcb85e; border-radius: 12px;
  box-shadow: 0 0 0 2px #4a3414, inset 0 0 0 1px rgba(255,236,176,.28), 0 4px 12px rgba(0,0,0,.5); }
.sh-sq, .sh-act, .sh-tile, .sh-tab, .sh-atk { font-family: inherit; cursor: pointer; color: #fff; border: 2px solid #dcb85e; padding: 0;
  background: linear-gradient(180deg, #3b2c18, #20160a); box-shadow: 0 0 0 2px #4a3414, inset 0 1px 0 rgba(255,236,176,.3); pointer-events: auto; }
.sh-sq:active, .sh-act:active, .sh-tile:active, .sh-atk:active { transform: scale(.94); }
.sh-sq { width: 36px; height: 36px; border-radius: 10px; font-size: 1.05rem; }
.sh-gold { background: linear-gradient(180deg, #e8b04a, #9a6414); }
.sh-act { position: absolute; width: 42px; height: 42px; border-radius: 50%; font-size: 1.15rem; z-index: 6; }
.sh-atk { position: absolute; right: 14px; bottom: 14px; width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; z-index: 6;
  background: radial-gradient(circle at 35% 30%, #f1c25a, #b4741c 70%, #6a400c); }
.sh-tl { position: absolute; top: 6px; left: 6px; display: flex; align-items: center; gap: 6px; z-index: 5; pointer-events: none; }
.sh-ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #e6c068; box-shadow: 0 0 0 2px #4a3414, 0 3px 8px rgba(0,0,0,.5);
  background: #1e3a5f center/cover; flex-shrink: 0; }
.sh-plate { padding: 4px 8px 5px; min-width: 112px; }
.sh-name { font-size: .78rem; font-weight: 800; color: #fff; margin-bottom: 3px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-bar { height: 8px; border-radius: 5px; background: #0b1220; border: 1px solid #b8963e; overflow: hidden; }
.sh-bar > i { display: block; height: 100%; background: linear-gradient(180deg, #5ec8ff, #2a7fd0); transition: width .15s; }
.sh-bar.sh-hp > i { background: linear-gradient(180deg, #ff7a6a, #d2392b); }
.sh-chip { margin-top: 3px; font-size: .72rem; color: #ffe08a; font-weight: 700; }
.sh-tr { position: absolute; top: 6px; right: 6px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none; }
.sh-minibox { padding: 3px; pointer-events: auto; }
.sh-minibox canvas { display: block; border-radius: 8px; cursor: pointer; }
.sh-ch { font-size: .6rem; color: #cfe; text-align: center; padding-top: 2px; max-width: 150px; line-height: 1.15; }
.sh-row { display: flex; gap: 5px; }
.sh-zone { font-size: .68rem; color: #ffe9a0; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; }
.sh-menu { position: absolute; right: 6px; z-index: 9; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px; }
.sh-tile { width: 50px; height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; font-size: 1.2rem; line-height: 1.1; }
.sh-tile .l { font-size: .55rem; color: #ffe9b0; margin-top: 2px; font-weight: 700; }
.sh-tab { position: absolute; right: 0; z-index: 9; width: 20px; height: 40px; border-radius: 10px 0 0 10px; font-size: .9rem; }
.sh-target { position: absolute; left: 50%; transform: translateX(-50%); bottom: 128px; width: min(240px, 62vw); z-index: 6; padding: 6px 10px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.sh-target b { font-size: .78rem; color: #fff; display: block; margin-bottom: 3px; }
.sh-target > div { flex: 1; }
.sh-emotes { position: absolute; right: 10px; bottom: 160px; z-index: 7; display: flex; gap: 4px; padding: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 80%; }
.sh-emotes button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #5a7a9a; background: rgba(20,35,55,.9); font-size: 1rem; cursor: pointer; }

.sh-chip { pointer-events: auto; cursor: pointer; }
.zb { display: inline-block; width: 17px; height: 17px; line-height: 15px; text-align: center; border-radius: 50%; background: linear-gradient(180deg,#f6d36a,#b8801c); border: 1px solid #6a4410; color: #4a2c06; font-size: .66rem; font-weight: 900; vertical-align: middle; }
.sh-chattab { display: block; margin: 2px auto 0; padding: 3px 18px; border-radius: 0 0 12px 12px; border: 2px solid #dcb85e; border-top: 0; background: linear-gradient(180deg,#4a6a9a,#2a4060); color: #ffe9a0; font-weight: 800; font-size: .7rem; cursor: pointer; pointer-events: auto; font-family: inherit; }
.sh-banner { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); z-index: 21; padding: 10px 26px; text-align: center; color: #ffe9a0; font-weight: 800; font-size: 1.25rem; text-shadow: 0 2px 8px #000; pointer-events: none; transition: opacity .5s; background: linear-gradient(90deg,transparent,rgba(8,16,30,.78),transparent); width: min(520px, 90%); }

.sh-npcbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 128px; z-index: 6; width: min(240px, 62vw); padding: 7px 14px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(40,40,52,.92), rgba(18,18,28,.94)); border: 2px solid #dcb85e; box-shadow: 0 0 0 2px #4a3414, 0 4px 12px rgba(0,0,0,.5);
  flex-direction: column; align-items: center; color: #fff; font-size: .95rem; pointer-events: auto; }
.sh-npcbar b { font-size: .95rem; letter-spacing: .02em; } .sh-npcbar span { font-size: .62rem; color: #ffd9a0; margin-top: 1px; }

/* ===== Tutorial: gulungan kertas (digulung → terbuka). Seluruhnya digambar dengan CSS ===== */
.modal.scroll { background: transparent; border: 0; padding: 0; max-width: 360px; box-shadow: none; overflow: visible; }
.scroll-wrap { position: relative; width: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); animation: scrPop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes scrPop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.scroll-roll { position: relative; z-index: 3; height: 30px; margin: 0 -10px; border-radius: 15px; border: 2px solid #5a3a1c;
  background: linear-gradient(180deg, #8d5a2a 0%, #d9a860 28%, #f6dca3 50%, #d9a860 72%, #8d5a2a 100%); }
.scroll-roll::before, .scroll-roll::after { content: ''; position: absolute; top: -2px; bottom: -2px; width: 22px; border-radius: 50%; border: 2px solid #5a3a1c;
  background: radial-gradient(circle at 50% 50%, #5a3a1c 0 2px, #c98f4a 3px 5px, #f1d79c 6px 8px, #c98f4a 9px 10px, #8d5a2a 11px); }
.scroll-roll::before { left: -9px; } .scroll-roll::after { right: -9px; }
.scroll-bottom { margin-top: -2px; }
.scroll-paperbox { position: relative; z-index: 1; height: 0; overflow: hidden; margin: 0 6px; }
.modal.open .scroll-paperbox { animation: scrUnroll 1s cubic-bezier(.3,.7,.2,1) .5s forwards; }
@keyframes scrUnroll { to { height: var(--h); } }
.scroll-paper { height: 100%; background: linear-gradient(90deg, #dfc08a 0, #f7e5bb 9%, #fbefcf 50%, #f7e5bb 91%, #dfc08a 100%); box-shadow: inset 0 0 28px rgba(140,90,30,.4); position: relative; }
.scroll-paper::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at 20% 15%, rgba(150,100,40,.18) 0 18%, transparent 40%), radial-gradient(circle at 80% 70%, rgba(150,100,40,.16) 0 16%, transparent 38%); }
.scroll-content { position: relative; padding: 16px 18px 10px; color: #4a2f14; text-align: left; opacity: 0; }
.modal.open .scroll-content { animation: scrFade .6s ease 1.15s forwards; }
@keyframes scrFade { to { opacity: 1; } }
.scroll-content h3 { margin: 0 0 8px; text-align: center; color: #5a3410; font-size: 1.05rem; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.scroll-steps p { margin: 0 0 7px; font-size: .84rem; line-height: 1.45; color: #4a2f14; }
.scroll-btns { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 4px; }
.scroll-btn { flex: 1; padding: 9px 8px; border-radius: 10px; border: 2px solid #5a3a1c; font-weight: 800; font-size: .82rem; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #e9c98a, #c4934a); color: #4a2610; }
.scroll-btn.go { background: linear-gradient(180deg, #d9534a, #a32a22); color: #fff3e0; border-color: #5a1410; }

.sh-ring { image-rendering: pixelated; }

/* ===== Kasino ===== */
.modal.wide { max-width: 640px; width: 96vw; }
.cs-root { text-align: center; } .cs-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; } .cs-cd { background: #3a2a10; color: #ffd86a; border-radius: 8px; padding: 2px 9px; font-weight: 800; font-size: .8rem; min-width: 54px; text-align: center; }
.cs-phase { font-weight: 800; margin: 6px 0; color: #ffe9a0; } .cs-res { font-weight: 800; border-radius: 8px; padding: 3px 10px; display: inline-block; } .cs-res.w { background: rgba(60,180,90,.25); color: #8fe6a8; } .cs-res.l { background: rgba(220,70,70,.22); color: #ff9a9a; }
.cs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; } .cs-chip { border: 2px solid #d6aa46; background: #2a1a0c; color: #ffe9a0; border-radius: 999px; padding: 6px 12px; font-weight: 800; cursor: pointer; font-size: .8rem; } .cs-chip.on { background: #d6aa46; color: #2a1a0c; } .cs-chip.clr { border-color: #aa5a5a; color: #ffb0b0; } .cs-chip:disabled { opacity: .4; }
.cs-hist { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 4px 0; } .cs-hn { width: 22px; height: 22px; border-radius: 50%; font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #fff; } .green { background: #1b8a46; } .red { background: #c8283a; } .black { background: #1a1a20; }
.cs-board { display: grid; grid-template-columns: 34px 1fr 40px; gap: 3px; margin-top: 6px; } .cs-zero { display: flex; } .cs-zero .cs-cell { flex: 1; } .cs-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; } .cs-col { display: grid; grid-template-rows: repeat(3, 1fr); gap: 2px; }
.cs-cell { position: relative; border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 800; font-size: .72rem; padding: 7px 0; cursor: pointer; border-radius: 3px; background: #1a5a3a; } .cs-cell.out { background: #1c4a30; } .cs-cell.red { background: #c8283a; } .cs-cell.black { background: #1a1a20; } .cs-cell.green { background: #1b8a46; }
.cs-cell em { position: absolute; right: 0; top: -6px; background: #ffd23f; color: #2a1a00; font-style: normal; font-size: .58rem; border-radius: 8px; padding: 0 4px; } .cs-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 3px; } .cs-out.six { grid-template-columns: repeat(6, 1fr); }
.cs-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 3px 0; } .cs-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 48px; background: #fff; color: #111; border-radius: 5px; border: 1px solid #888; font-size: .78rem; line-height: 1; } .cs-card.red { color: #c01830; } .cs-card.back { background: repeating-linear-gradient(45deg, #1d3f8a, #1d3f8a 4px, #2a56b8 4px, #2a56b8 8px); border-color: #fff; } .cs-card i { font-style: normal; font-size: 1rem; }
.cs-dealer { background: rgba(0,0,0,.25); border-radius: 10px; padding: 4px; margin-bottom: 6px; } .cs-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; } .cs-seat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 4px; font-size: .72rem; } .cs-seat.me { border-color: #7dffa0; } .cs-seat.turn { box-shadow: 0 0 0 2px #ffd23f; } .cs-seat.empty { opacity: .45; } .cs-sn { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cs-val { font-weight: 800; font-size: .8rem; } .cs-badge { font-size: .6rem; border-radius: 6px; padding: 1px 5px; background: rgba(255,255,255,.15); } .cs-badge.w { background: #3cb45a; } .cs-badge.l { background: #c8402a; }
.cs-mj { display: grid; grid-template-columns: 1fr 1.5fr 1fr; grid-template-areas: ". top ." "left mid right" ". bot ."; gap: 4px; } .cs-mjp { background: rgba(255,255,255,.06); border-radius: 8px; padding: 3px; font-size: .7rem; min-height: 40px; } .cs-mjp.top { grid-area: top; } .cs-mjp.left { grid-area: left; } .cs-mjp.right { grid-area: right; } .cs-mjp.bot { grid-area: bot; } .cs-mjp.turn { box-shadow: 0 0 0 2px #ffd23f; } .cs-mjc { grid-area: mid; display: flex; flex-direction: column; justify-content: center; font-size: .78rem; font-weight: 700; }
.cs-disc { display: flex; flex-wrap: wrap; gap: 1px; justify-content: center; } .cs-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; height: 40px; background: #f4efe0; border-radius: 4px; border: 1px solid #8a7a5a; box-shadow: 0 2px 0 #b8a67a; line-height: 1; } .cs-tile b { font-size: 1rem; } .cs-tile i { font-style: normal; font-size: .62rem; } .cs-tile.sm { width: 17px; height: 23px; } .cs-tile.sm b { font-size: .68rem; } .cs-tile.sm i { font-size: .42rem; } .cs-tile.hot { outline: 2px solid #ff4a4a; } .cs-tile.act { cursor: pointer; } .cs-tile.act:hover { transform: translateY(-4px); } .cs-tile.drawn { background: #fff7c8; } .cs-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 8px; } .cs-gap { width: 10px; } .cs-reveal { text-align: left; margin-top: 4px; }

/* ===== Roulette (meja kasino) ===== */
.rl-root { text-align: center; } .rl-top { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.rl-wheelbox { position: relative; width: clamp(210px, 46vw, 290px); } .rl-wheelbox canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 12px rgba(0,0,0,.55)); }
.rl-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 21%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: clamp(1rem, 4.4vw, 1.5rem); color: #fff; border: 3px solid #e6bd5a; background: radial-gradient(#3a3a46, #111); box-shadow: 0 0 14px rgba(255,210,100,.45), inset 0 0 8px rgba(0,0,0,.6); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.rl-badge.red { background: radial-gradient(#e8506a, #9a1428); } .rl-badge.black { background: radial-gradient(#4a4a58, #101015); } .rl-badge.green { background: radial-gradient(#34c874, #0e6a34); } .rl-badge.dim { opacity: .55; } .rl-badge.spin { animation: rlpulse .6s ease-in-out infinite; }
@keyframes rlpulse { 50% { box-shadow: 0 0 22px rgba(255,220,120,.95), inset 0 0 8px rgba(0,0,0,.6); } }
.rl-side { flex: 1; min-width: 220px; text-align: left; } .rl-phase { font-weight: 900; font-size: 1.05rem; color: #ffe9a0; min-height: 1.4em; }
.rl-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: 6px 0 8px; } .rl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd23f, #ff8a3a); }
.rl-hist { display: flex; flex-wrap: wrap; gap: 3px; } .rl-seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin-top: 8px; }
.rl-seat { display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 4px 6px; font-size: .68rem; line-height: 1.25; } .rl-seat.me { border-color: #7dffa0; background: rgba(60,160,90,.18); } .rl-seat.empty { opacity: .4; } .rl-seat.bot { border-color: rgba(120,190,255,.5); }
.rl-seat em { font-style: normal; font-weight: 800; } .rl-seat em.w { color: #8fe6a8; } .rl-seat em.l { color: #ff9a9a; } .rl-av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(#f3d27a, #b8862a); color: #3a2200; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .8rem; }
.rl-felt { position: relative; border-radius: 18px; padding: 14px 10px 12px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 5px), radial-gradient(ellipse at 50% 35%, #1f9a5c 0%, #0f6a3c 58%, #093f24 100%); box-shadow: inset 0 0 0 2px #d6aa46, inset 0 0 0 6px #0a4d2b, inset 0 0 46px rgba(0,0,0,.6), 0 0 0 5px #6a3c1c, 0 0 0 9px #2e180a, 0 12px 22px rgba(0,0,0,.55); }
.rl-board { display: grid; grid-template-columns: 34px 1fr 40px; gap: 4px; } .rl-zero { display: flex; } .rl-zero .rl-c { flex: 1; font-size: 1rem; } .rl-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; } .rl-colb { display: grid; grid-template-rows: repeat(3, 1fr); gap: 3px; }
.rl-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 4px; } .rl-out.six { grid-template-columns: repeat(6, 1fr); }
.rl-c { position: relative; border: 0; color: #fff; font-weight: 900; font-size: .78rem; padding: 10px 0; cursor: pointer; border-radius: 6px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px rgba(230,189,90,.85), 0 2px 0 rgba(0,0,0,.45); text-shadow: 0 1px 2px rgba(0,0,0,.7); transition: transform .08s, filter .08s; }
.rl-c.red { background: linear-gradient(#e0405a, #a31630); } .rl-c.black { background: linear-gradient(#3a3a46, #15151a); } .rl-c.green { background: linear-gradient(#27b064, #0e6a34); } .rl-c:hover { filter: brightness(1.28); transform: translateY(-1px); } .rl-c:active { transform: translateY(1px); }
.rl-c.win { animation: rlwin .7s ease-in-out infinite; z-index: 2; } @keyframes rlwin { 0%, 100% { box-shadow: inset 0 0 0 2px #fff, 0 2px 0 rgba(0,0,0,.45); } 50% { box-shadow: inset 0 0 0 2px #fff, 0 0 18px 5px rgba(255,236,120,.95); } }
.rl-tok { position: absolute; right: -6px; top: -10px; z-index: 3; width: 23px; height: 23px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .54rem; font-weight: 900; border: 2px dashed rgba(255,255,255,.9); box-shadow: 0 2px 3px rgba(0,0,0,.65), inset 0 0 0 3px var(--c); animation: tokdrop .22s ease-out; pointer-events: none; text-shadow: none; }
@keyframes tokdrop { from { transform: translateY(-160%) scale(1.5); opacity: 0; } to { transform: none; opacity: 1; } }
.c1 { --c: #cfd3da; background: #eceff4; color: #222; } .c5 { --c: #b81f33; background: #e24a5e; color: #fff; } .c10 { --c: #1a56a8; background: #3a86e6; color: #fff; } .c25 { --c: #137a43; background: #2fbf72; color: #fff; } .c100 { --c: #0c0c10; background: #2b2b32; color: #ffd86a; }
.rl-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 14px 0 6px; min-height: 54px; }
.rl-chipbtn { width: 52px; height: 52px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.92); font-weight: 900; font-size: .72rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.5), inset 0 0 0 4px var(--c); transition: transform .12s, box-shadow .12s; }
.rl-chipbtn.on { transform: translateY(-7px) scale(1.1); box-shadow: 0 11px 12px rgba(0,0,0,.5), 0 0 0 3px #ffd23f, inset 0 0 0 4px var(--c); } .rl-clr { border: 2px solid #aa5a5a; background: rgba(120,30,30,.35); color: #ffb0b0; border-radius: 12px; padding: 6px 10px; font-size: .68rem; font-weight: 800; cursor: pointer; }
.rl-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; } .rl-banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-weight: 900; font-size: clamp(1rem, 4.6vw, 1.5rem); padding: 7px 16px; border-radius: 14px; white-space: nowrap; animation: rlban 2.4s ease forwards; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.rl-banner.w { background: linear-gradient(#ffe9a0, #e6a82e); color: #3a2200; } .rl-banner.l { background: linear-gradient(#5a1f28, #2e0d12); color: #ffb0b0; } .rl-banner.n { background: #2a3a4a; color: #cfe0f0; }
@keyframes rlban { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); } 22% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
.rl-coin { position: absolute; top: -8%; font-size: 1.35rem; animation: rlcoin 1.9s ease-in forwards; } @keyframes rlcoin { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(330px) rotate(540deg); opacity: 0; } }

/* ===== RESPONSIF: modal selalu muat di layar & bisa digeser (iOS/Android, potret/lanskap, desktop pendek) ===== */
.modal-bg { top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; bottom: auto; right: auto;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal { margin: auto; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal.scroll { max-height: none; overflow: visible; }
.modal.wide { max-width: 720px; width: 100%; }
@media (max-height: 520px) {
  .modal { padding: 12px 14px; } .modal h3 { font-size: 1rem; margin-bottom: 4px; } .modal p { margin-bottom: 8px; font-size: .82rem; margin-top: 0; } .modal .btn { padding-top: 8px; padding-bottom: 8px; }
}
/* meja kasino = lembar layar penuh: header tetap, area permainan digeser, tombol bawah SELALU terlihat */
.modal.cs-full { display: flex; flex-direction: column; height: calc(100vh - 20px); height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: none; overflow: hidden; padding: 10px 12px; }
.modal.cs-full .cs-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.modal.cs-full #csHead { flex: none; } .modal.cs-full #csGame { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 1px 4px; }
.modal.cs-full #csFoot { flex: none; display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.modal.cs-full #csFoot .btn { flex: 1; margin: 0; width: auto; padding: 10px 6px; font-size: .84rem; }
.cs-sticky, .rl-tray { position: sticky; bottom: 0; z-index: 6; background: var(--card); box-shadow: 0 -10px 10px -8px rgba(0,0,0,.55); }
.cs-sticky { padding: 6px 0 2px; } .rl-tray { margin: 10px 0 0; padding: 8px 0 4px; }
/* roulette: potret sempit = papan vertikal (sel besar, mudah diketuk) */
.rl-vb { display: grid; grid-template-columns: 46px repeat(3, minmax(0, 1fr)); gap: 3px; } .rl-vb .rl-c { padding: 11px 0; font-size: 1.02rem; } .rl-vb .v0 { grid-column: 2 / 5; grid-row: 1; } .rl-vb .vd { font-size: .72rem; padding: 4px 0; }
.rl-out.six.vert { grid-template-columns: repeat(3, 1fr); } .rl-grid, .rl-colb { min-width: 0; } .rl-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 600px) and (orientation: portrait) { .rl-wheelbox { width: min(60vw, 240px); } .rl-top { margin-bottom: 6px; } .rl-side { min-width: 0; width: 100%; } .rl-felt { padding: 10px 6px 8px; } }
@media (orientation: landscape) and (max-height: 560px) {
  .rl-root { display: grid; grid-template-columns: minmax(170px, 32%) 1fr; grid-template-areas: "top felt" "top tray" "top info"; column-gap: 12px; align-items: start; }
  .rl-top { grid-area: top; flex-direction: column; margin-bottom: 0; gap: 6px; } .rl-felt { grid-area: felt; } #rlTray { grid-area: tray; } #rlInfo { grid-area: info; }
  .rl-wheelbox { width: clamp(130px, 44vh, 220px); } .rl-side { min-width: 0; width: 100%; } .rl-seats { grid-template-columns: 1fr; } .rl-phase { font-size: .9rem; }
  .rl-chipbtn { width: 42px; height: 42px; font-size: .64rem; } .rl-tray { gap: 7px; margin-top: 6px; } .rl-c { padding: 7px 0; font-size: .7rem; }
}
@media (max-width: 420px) { .cs-seats { grid-template-columns: repeat(2, 1fr); } .cs-tile { width: 26px; height: 36px; } .cs-tile b { font-size: .9rem; } }
/* layar pendek (HP lanskap): kolom iklan/tips disembunyikan, bilah koin ringkas di bawah; area game memakai seluruh lebar */
@media (max-height: 520px) and (orientation: landscape) {
  .game-side { display: none !important; } .game-mobile-bar { display: flex !important; } .game-body { flex-direction: column; }
  .game-header { padding-top: 4px; padding-bottom: 4px; } .game-area { padding: 6px 8px; }
}

/* bilah mini roulette (fase + hasil terakhir) menempel di atas area permainan saat layar pendek */
.rl-mini { display: none; position: sticky; top: 0; z-index: 7; background: var(--card); padding: 5px 4px; margin: 0 0 4px; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; font-size: .85rem; color: #ffe9a0; box-shadow: 0 8px 8px -8px rgba(0,0,0,.6); }
@media (max-height: 760px) { .rl-mini { display: flex; } }
@media (orientation: landscape) and (max-height: 560px) {
  .rl-mini { display: none; } .modal.cs-full { padding: 6px 10px; } .modal.cs-full #csHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .modal.cs-full #csHead .cs-bar { margin: 0; gap: 12px; }
  .modal.cs-full #csFoot { padding-top: 4px; } .modal.cs-full #csFoot .btn { padding: 6px 6px; font-size: .78rem; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .cs-phase { margin: 2px 0; font-size: .82rem; } .cs-dealer { padding: 2px; margin-bottom: 3px; } .cs-card { width: 28px; height: 40px; font-size: .7rem; } .cs-card i { font-size: .85rem; }
  .cs-sticky .hint { display: none; } .cs-sticky .cs-chips, .cs-sticky.cs-chips { margin: 2px 0; gap: 4px; } .cs-chip { padding: 4px 10px; font-size: .74rem; } .cs-sticky { padding: 3px 0 0; }
  .cs-seat { padding: 3px; font-size: .68rem; } .cs-mjp { min-height: 30px; font-size: .64rem; } .cs-tile { width: 24px; height: 33px; } .cs-tile b { font-size: .85rem; } .cs-hand { margin-top: 2px; }
}

/* panel menu PlayTown tidak boleh menutupi tombol aksi di bawah saat layar pendek: tingginya dibatasi & bisa digulir */
.sh-menu { max-height: calc(100% - var(--mt, 214px) - 150px); overflow-y: auto; overscroll-behavior: contain; }

.scroll-chk { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: .86rem; font-weight: 800; color: #4a2f14; cursor: pointer; user-select: none; } .scroll-chk input { width: 22px; height: 22px; accent-color: #a32a22; flex: none; cursor: pointer; }
.coin-help { background: transparent; border: 1px dashed var(--border); color: var(--accent, #7dd3fc); border-radius: 999px; padding: 4px 10px; font-size: .74rem; font-weight: 700; cursor: pointer; }

/* ===== KARTU BERGAYA ASLI (dipakai Blackjack utama & kasino) ===== */
.pc { --cw: 58px; position: relative; display: inline-block; width: var(--cw); height: calc(var(--cw) * 1.42); margin-left: calc(var(--cw) * -.46); vertical-align: top; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.pc:first-child { margin-left: 0; }
.pc .f, .pc .b { position: absolute; inset: 0; border-radius: calc(var(--cw) * .13); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .55s cubic-bezier(.3,.7,.3,1); }
.pc .f { background: linear-gradient(160deg, #fff 0%, #f4f1e6 100%); border: 1px solid #cdc7b3; color: #17171c; font-weight: 800; overflow: hidden; } .pc.red .f { color: #c8182f; }
.pc .b { background: repeating-linear-gradient(45deg, #7d1626 0 5px, #a02438 5px 10px); border: 3px solid #fff; box-shadow: inset 0 0 0 2px #7d1626; transform: rotateY(180deg); }
.pc.down .f { transform: rotateY(180deg); } .pc.down .b { transform: rotateY(0); }
.pc i { font-style: normal; position: absolute; line-height: 1; } .pc .cr { left: calc(var(--cw) * .09); top: calc(var(--cw) * .07); font-size: calc(var(--cw) * .27); text-align: center; }
.pc .cr.bt { left: auto; top: auto; right: calc(var(--cw) * .09); bottom: calc(var(--cw) * .07); transform: rotate(180deg); } .pc .cc { left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .62); opacity: .92; }
.pc.deal { animation: pcDeal .5s cubic-bezier(.2,.8,.3,1) both; animation-delay: var(--d, 0s); }
@keyframes pcDeal { from { opacity: 0; transform: translate(var(--fx, 140px), var(--fy, -160px)) rotate(28deg) scale(.55); } to { opacity: 1; transform: none; } }

/* ===== BLACKJACK (tampilan game mobile) ===== */
.bjx { --cw: clamp(46px, 15vw, 64px); width: 100%; max-width: 580px; margin: 0 auto; text-align: center; position: relative; }
.bjx-hud { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.bjx-pill { display: flex; align-items: center; gap: 7px; background: linear-gradient(#2a3550, #18202f); border: 2px solid #e6bd5a; border-radius: 999px; padding: 4px 14px 4px 6px; box-shadow: 0 3px 0 rgba(0,0,0,.45); text-align: left; } .bjx-pill em { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: #0f1624; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.bjx-pill b { display: block; font-size: 1rem; line-height: 1.05; color: #fff; } .bjx-pill small { display: block; font-size: .56rem; letter-spacing: .08em; color: #e6bd5a; font-weight: 800; } .bjx-pill.gold b { color: #ffe08a; }
.bjx-ic { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #e6bd5a; background: #18202f; color: #ffe08a; font-size: 1rem; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.bjx-table { position: relative; border-radius: 30px 30px 46% 46% / 30px 30px 14% 14%; padding: 14px 10px 20px; min-height: clamp(300px, 52vh, 430px); background: radial-gradient(ellipse at 50% 28%, #25a266 0%, #147a46 46%, #0a5230 100%); border: 8px solid #5a3418; box-shadow: inset 0 0 0 3px #e6bd5a, inset 0 0 70px rgba(0,0,0,.55), 0 0 0 3px #2e180a, 0 14px 26px rgba(0,0,0,.55); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.bjx-table::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px); }
.bjx-shoe { position: absolute; right: 12px; top: 10px; width: 46px; height: 62px; z-index: 1; } .bjx-shoe span { position: absolute; inset: 0; border-radius: 6px; background: repeating-linear-gradient(45deg, #7d1626 0 4px, #a02438 4px 8px); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.5); } .bjx-shoe span:nth-child(2) { transform: translate(-3px, -3px); } .bjx-shoe span:nth-child(3) { transform: translate(-6px, -6px); }
.bjx-dealer, .bjx-player { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bjx-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(#f3d27a, #b8862a); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.bjx-who { display: flex; align-items: center; gap: 7px; font-weight: 900; font-size: .72rem; letter-spacing: .12em; color: #ffe9a0; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.bjx-score { min-width: 32px; height: 32px; padding: 0 6px; border-radius: 50%; background: radial-gradient(#fff, #e6e2d2); color: #17171c; font-weight: 900; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 0 3px #e6bd5a; letter-spacing: 0; } .bjx-score:empty { display: none; } .bjx-score.bust { background: #c8283a; color: #fff; } .bjx-score.bj { background: #ffd23f; }
.bjx-hand { display: flex; justify-content: center; min-height: calc(var(--cw) * 1.42); }
.bjx-arc { width: 92%; max-width: 420px; margin: -6px auto -10px; position: relative; z-index: 1; opacity: .9; } .bjx-arc text { fill: #e6bd5a; font-weight: 800; font-size: 11.5px; letter-spacing: .14em; }
.bjx-mid { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; min-height: 64px; }
.bjx-betc { width: 62px; height: 62px; border-radius: 50%; border: 2px dashed rgba(255,233,160,.8); display: flex; align-items: center; justify-content: center; flex-direction: column; color: #ffe9a0; font-weight: 900; font-size: .72rem; background: rgba(0,0,0,.12); } .bjx-betc .rl-tok { position: static; width: 34px; height: 34px; font-size: .62rem; animation: tokdrop .22s ease-out; }
.bjx-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); padding: 8px 22px; border-radius: 16px; font-weight: 900; font-size: clamp(1rem, 5vw, 1.45rem); white-space: nowrap; box-shadow: 0 8px 18px rgba(0,0,0,.55); z-index: 6; } .bjx-banner.show { animation: bjBan 2.6s ease forwards; }
.bjx-banner.w { background: linear-gradient(#ffe9a0, #e6a82e); color: #3a2200; } .bjx-banner.l { background: linear-gradient(#5a1f28, #2e0d12); color: #ffb0b0; } .bjx-banner.p { background: #2a3a4a; color: #dcecff; } .bjx-banner.b { background: linear-gradient(#ff6a3a, #c01c1c); color: #fff; }
@keyframes bjBan { 0% { transform: translate(-50%, -50%) scale(0); } 14% { transform: translate(-50%, -50%) scale(1.15); } 24% { transform: translate(-50%, -50%) scale(1); } 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
.bjx-coin { position: absolute; top: -6%; font-size: 1.3rem; animation: rlcoin 1.9s ease-in forwards; z-index: 5; pointer-events: none; }
.bjx-ctl { position: sticky; bottom: 0; z-index: 8; margin-top: 12px; padding: 10px 6px 6px; background: linear-gradient(to top, var(--bg, #0b1220) 72%, rgba(11,18,32,0)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bjx-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.bjx-rb { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; color: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; text-shadow: 0 2px 2px rgba(0,0,0,.5); box-shadow: 0 6px 0 rgba(0,0,0,.45), inset 0 -6px 10px rgba(0,0,0,.25); transition: transform .08s; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; } .bjx-rb small { font-size: .56rem; opacity: .85; letter-spacing: .08em; } .bjx-rb:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.45), inset 0 -6px 10px rgba(0,0,0,.25); } .bjx-rb:disabled { filter: grayscale(.8) brightness(.7); }
.bjx-rb.hit { background: radial-gradient(#4cd37a, #148a44); } .bjx-rb.stand { background: radial-gradient(#ff7a6a, #b81f33); } .bjx-rb.deal { background: radial-gradient(#ffd966, #d68a12); color: #3a2200; text-shadow: none; width: 92px; height: 92px; font-size: 1.1rem; } .bjx-rb.next { background: radial-gradient(#4cd37a, #148a44); width: 92px; height: 92px; }
.bjx-btn2 { border: 2px solid #e6bd5a; background: #18202f; color: #ffe9a0; border-radius: 999px; padding: 9px 18px; font-weight: 800; font-size: .85rem; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.bjx-note { font-size: .78rem; color: var(--muted); margin: 0; }
.bjx-tiles { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; text-align: left; }
.bjx-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 16px; border: 2px solid #e6bd5a; background: linear-gradient(#26324c, #172033); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 4px 0 rgba(0,0,0,.45); } .bjx-tile:disabled { opacity: .45; filter: grayscale(.5); cursor: not-allowed; } .bjx-tile .rl-tok { position: static; flex: none; width: 46px; height: 46px; font-size: .78rem; animation: none; }
.bjx-tile b { display: block; font-size: 1.02rem; } .bjx-tile span.sub { display: block; font-size: .78rem; color: #b8c4dc; } .bjx-tile .go { margin-left: auto; font-weight: 900; color: #ffd23f; }
.bjx-rules { font-size: .78rem; color: var(--muted); line-height: 1.5; margin-top: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .bjx { --cw: 38px; max-width: 760px; } .bjx-table { min-height: 0; padding: 8px 10px 10px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-radius: 22px; } .bjx-arc { display: none; } .bjx-avatar { width: 32px; height: 32px; font-size: 1.1rem; } .bjx-shoe { display: none; }
  .bjx-hud { margin-bottom: 4px; } .bjx-rb { width: 58px; height: 58px; font-size: .8rem; } .bjx-rb.deal, .bjx-rb.next { width: 66px; height: 66px; } .bjx-ctl { margin-top: 6px; padding: 6px 4px 2px; } .bjx-note { display: none; }
}

/* Blackjack: seluruh layar game dibuat pas tinggi layar; area game yang menggulir, sehingga kontrol (DEAL/HIT/STAND/NEXT) selalu terlihat di dasar */
#screen-game.game-fit { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
#screen-game.game-fit .game-body { flex: 1; min-height: 0; } #screen-game.game-fit .game-area { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
#screen-game.game-fit .game-side { overflow-y: auto; }
/* mode pas-layar: jangan memusatkan isi secara vertikal (isi yang lebih tinggi terpotong di atas); pusatkan lewat margin auto */
#screen-game.game-fit .game-area { justify-content: flex-start; }
#screen-game.game-fit .game-area > .bjx { margin-top: auto; margin-bottom: auto; }
:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card2: #334155;
  --accent: #22c55e;
  --accent2: #16a34a;
  --gold: #fbbf24;
  --danger: #ef4444;
  --blue: #38bdf8;
  --purple: #a78bfa;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100dvh; overflow-x: hidden;
}
button, input { font-family: inherit; }

/* Screens */
.screen { display: none; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; }

/* Auth */
.auth-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px; background:
    radial-gradient(ellipse at top, #1e3a5f 0%, var(--bg) 60%);
}
.auth-logo { font-size: 2.4rem; margin-bottom: 6px; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; text-align: center; }
.auth-box {
  width: 100%; max-width: 340px; background: var(--card);
  border-radius: 18px; padding: 22px; border: 1px solid var(--border);
}
.auth-box h2 { font-size: 1.1rem; margin-bottom: 14px; text-align: center; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field select { cursor: pointer; }
.btn {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #052e16; }
.btn-secondary { background: var(--card2); color: var(--text); margin-top: 8px; }
.btn-gold { background: linear-gradient(135deg, #fbbf24, #d97706); color: #422006; }
.btn-danger { background: #7f1d1d; color: #fecaca; }
.btn:active { opacity: 0.9; transform: scale(0.98); }
.auth-err { color: #fca5a5; font-size: 0.82rem; text-align: center; margin-top: 8px; min-height: 1.2em; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.topbar .brand { font-weight: 800; font-size: 1rem; color: var(--accent); }
.coin-badge {
  display: flex; align-items: center; gap: 6px;
  background: #422006; color: var(--gold); padding: 6px 12px;
  border-radius: 20px; font-weight: 700; font-size: 0.9rem;
}
.topbar-user { font-size: 0.78rem; color: var(--muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lobby */
.content { flex: 1; padding: 14px; padding-bottom: 80px; overflow-y: auto; }
.banner {
  background: linear-gradient(135deg, #14532d, #166534 40%, #22c55e);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; position: relative; overflow: hidden;
}
.banner h2 { font-size: 1.1rem; margin-bottom: 4px; }
.banner p { font-size: 0.82rem; opacity: 0.9; }
.section-title {
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 10px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; transition: 0.15s; position: relative;
}
.game-card:active { transform: scale(0.97); }
.game-card .ico { font-size: 1.8rem; margin-bottom: 6px; }
.game-card .name { font-weight: 700; font-size: 0.9rem; }
.game-card .desc { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.game-card.locked { opacity: 0.75; }
.game-card .lock-tag {
  position: absolute; top: 8px; right: 8px;
  background: #422006; color: var(--gold); font-size: 0.68rem;
  padding: 3px 7px; border-radius: 8px; font-weight: 700;
}
.game-card.core {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e3a5f, #0f172a);
  border-color: var(--blue);
}
.mission-card {
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border);
}
.mission-card .m-ico { font-size: 1.4rem; }
.mission-card .m-info { flex: 1; }
.mission-card .m-title { font-size: 0.88rem; font-weight: 600; }
.mission-card .m-prog { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.mission-card .m-reward {
  background: #14532d; color: var(--accent); font-size: 0.75rem;
  padding: 5px 10px; border-radius: 8px; font-weight: 700; white-space: nowrap;
}
.mission-card.done { opacity: 0.55; }

/* Bottom nav */
.botnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; z-index: 50; padding-bottom: env(safe-area-inset-bottom);
}
.bnav {
  flex: 1; padding: 8px 4px; border: none; background: none;
  color: var(--muted); font-size: 0.65rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bnav .ico { font-size: 1.2rem; }
.bnav.active { color: var(--accent); }

/* Shop */
.shop-pack {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
}
.shop-pack .s-ico { font-size: 2rem; }
.shop-pack .s-info { flex: 1; }
.shop-pack .s-name { font-weight: 700; }
.shop-pack .s-coins { color: var(--gold); font-size: 0.85rem; font-weight: 600; }
.shop-pack .s-price {
  background: var(--card2); padding: 8px 14px; border-radius: 10px;
  font-weight: 700; font-size: 0.85rem; border: none; color: var(--text); cursor: pointer;
}
.shop-pack.best { border-color: var(--gold); }

/* Game container */
.game-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.game-header .back {
  width: 36px; height: 36px; border-radius: 10px; border: none;
  background: var(--card2); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.game-header h1 { font-size: 1rem; flex: 1; }
.game-body {
  flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.game-area {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding: 12px; overflow: auto; min-width: 0;
}
.game-side {
  display: none; /* tampil di layar lebar */
  width: 160px; flex-shrink: 0; padding: 10px 8px;
  background: var(--card); border-color: var(--border);
  overflow-y: auto; font-size: 0.78rem;
}
.game-side-left { border-right: 1px solid var(--border); }
.game-side-right { border-left: 1px solid var(--border); }
.side-box {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; margin-bottom: 10px;
}
.side-box h4 {
  margin: 0 0 6px; font-size: 0.72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.side-ad {
  min-height: 100px; border: 1px dashed var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); font-size: 0.68rem;
  margin-bottom: 10px; background: var(--bg); padding: 8px;
}
.side-stat { font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.side-stat small { font-size: 0.7rem; color: var(--muted); font-weight: 500; }
.game-mobile-bar {
  display: flex; gap: 8px; padding: 8px 10px; background: var(--card);
  border-top: 1px solid var(--border); flex-shrink: 0; overflow-x: auto;
}
.game-mobile-bar .mb-item {
  flex: 1; min-width: 70px; background: var(--card2); border-radius: 10px;
  padding: 6px 8px; text-align: center; font-size: 0.68rem; color: var(--muted);
}
.game-mobile-bar .mb-item strong { display: block; color: var(--text); font-size: 0.85rem; }
@media (min-width: 720px) {
  .game-body { flex-direction: row; }
  .game-side { display: block; }
  .game-mobile-bar { display: none; }
  .game-area { justify-content: center; }
  #tradeMobileWallet { display: none !important; }
}
@media (min-width: 1000px) {
  .game-side { width: 180px; }
}
.game-stats {
  display: flex; gap: 16px; margin-bottom: 12px; font-size: 0.85rem; font-weight: 600;
  flex-wrap: wrap; justify-content: center;
}
.game-stats span { color: var(--muted); font-weight: 400; }

/* Trading */
.trade-panel { width: 100%; max-width: 920px; }
#assetList.trade-cols { width: 100%; }
@media (max-width: 700px) {
  #assetList.trade-cols {
    grid-template-columns: 1fr !important;
  }
}
.asset-row {
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border);
}
.asset-row .a-name { flex: 1; font-weight: 700; font-size: 0.9rem; }
.asset-row .a-price { font-weight: 700; font-size: 0.95rem; }
.asset-row .a-change { font-size: 0.75rem; font-weight: 600; }
.asset-row .a-change.up { color: var(--accent); }
.asset-row .a-change.down { color: var(--danger); }
.trade-btns { display: flex; gap: 6px; }
.trade-btns button {
  padding: 7px 12px; border: none; border-radius: 8px;
  font-weight: 700; font-size: 0.75rem; cursor: pointer;
}
.btn-buy { background: #14532d; color: var(--accent); }
.btn-sell { background: #7f1d1d; color: #fca5a5; }
.portfolio-box {
  background: var(--card); border-radius: 12px; padding: 14px;
  margin-bottom: 14px; border: 1px solid var(--border);
}
.portfolio-box .p-label { font-size: 0.75rem; color: var(--muted); }
.portfolio-box .p-val { font-size: 1.4rem; font-weight: 800; color: var(--gold); }

/* Snake canvas */
#snakeCanvas, #shootCanvas {
  background: #020617; border-radius: 12px; border: 2px solid var(--border);
  max-width: 100%; touch-action: none;
}
.ctrl-pad {
  display: grid; grid-template-columns: repeat(3, 56px); gap: 6px;
  margin-top: 12px; justify-content: center;
}
.ctrl-pad button {
  width: 56px; height: 56px; border-radius: 12px; border: none;
  background: var(--card2); color: var(--text); font-size: 1.2rem; cursor: pointer;
}
.ctrl-pad button:active { background: var(--accent); color: #052e16; }

/* 2048 */
.g2048 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  width: min(320px, 92vw); background: var(--card2); padding: 8px; border-radius: 12px;
}
.g2048 .cell {
  aspect-ratio: 1; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.3rem;
  background: var(--card);
}

/* Memory */
.mem-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  width: min(320px, 92vw);
}
.mem-card {
  aspect-ratio: 1; border-radius: 10px; background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; cursor: pointer; border: 2px solid var(--border);
  transition: 0.2s;
}
.mem-card.flipped, .mem-card.matched {
  background: var(--card); border-color: var(--accent);
}
.mem-card.matched { opacity: 0.6; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--card); border-radius: 18px; padding: 22px;
  width: 100%; max-width: 340px; text-align: center; border: 1px solid var(--border);
}
.modal h3 { margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.45; }
.modal .btn { margin-top: 6px; }

/* Ad fake */
.ad-box {
  background: #1a1a2e; border: 2px dashed var(--purple); border-radius: 12px;
  padding: 24px; margin: 12px 0; min-height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ad-box .ad-label { font-size: 0.7rem; color: var(--muted); margin-bottom: 8px; }
.ad-timer { font-size: 2rem; font-weight: 800; color: var(--purple); }

.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: #14532d; color: var(--accent); padding: 10px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; opacity: 0; transition: 0.25s; z-index: 200;
  pointer-events: none; white-space: nowrap; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #7f1d1d; color: #fecaca; }

.hint { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.4; }

/* PlayTown di HP/tablet: layar penuh (header, bar bawah, panel samping disembunyikan) */
body.sh-immersive { overflow: hidden; overscroll-behavior: none; }
body.sh-immersive #screen-game .game-header,
body.sh-immersive #screen-game .game-mobile-bar,
body.sh-immersive #screen-game .game-side { display: none !important; }
body.sh-immersive #screen-game .game-area { padding: 0; }

/* ===== PlayTown HUD — desain orisinal: bingkai biru malam + tepi emas ===== */
.sh-frame { background: linear-gradient(180deg, rgba(20,36,66,.94), rgba(9,18,38,.94)); border: 2px solid #dcb85e; border-radius: 12px;
  box-shadow: 0 0 0 2px #4a3414, inset 0 0 0 1px rgba(255,236,176,.28), 0 4px 12px rgba(0,0,0,.5); }
.sh-sq, .sh-act, .sh-tile, .sh-tab, .sh-atk { font-family: inherit; cursor: pointer; color: #fff; border: 2px solid #dcb85e; padding: 0;
  background: linear-gradient(180deg, #3b2c18, #20160a); box-shadow: 0 0 0 2px #4a3414, inset 0 1px 0 rgba(255,236,176,.3); pointer-events: auto; }
.sh-sq:active, .sh-act:active, .sh-tile:active, .sh-atk:active { transform: scale(.94); }
.sh-sq { width: 36px; height: 36px; border-radius: 10px; font-size: 1.05rem; }
.sh-gold { background: linear-gradient(180deg, #e8b04a, #9a6414); }
.sh-act { position: absolute; width: 42px; height: 42px; border-radius: 50%; font-size: 1.15rem; z-index: 6; }
.sh-atk { position: absolute; right: 14px; bottom: 14px; width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; z-index: 6;
  background: radial-gradient(circle at 35% 30%, #f1c25a, #b4741c 70%, #6a400c); }
.sh-tl { position: absolute; top: 6px; left: 6px; display: flex; align-items: center; gap: 6px; z-index: 5; pointer-events: none; }
.sh-ring { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #e6c068; box-shadow: 0 0 0 2px #4a3414, 0 3px 8px rgba(0,0,0,.5);
  background: #1e3a5f center/cover; flex-shrink: 0; }
.sh-plate { padding: 4px 8px 5px; min-width: 112px; }
.sh-name { font-size: .78rem; font-weight: 800; color: #fff; margin-bottom: 3px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-bar { height: 8px; border-radius: 5px; background: #0b1220; border: 1px solid #b8963e; overflow: hidden; }
.sh-bar > i { display: block; height: 100%; background: linear-gradient(180deg, #5ec8ff, #2a7fd0); transition: width .15s; }
.sh-bar.sh-hp > i { background: linear-gradient(180deg, #ff7a6a, #d2392b); }
.sh-chip { margin-top: 3px; font-size: .72rem; color: #ffe08a; font-weight: 700; }
.sh-tr { position: absolute; top: 6px; right: 6px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none; }
.sh-minibox { padding: 3px; pointer-events: auto; }
.sh-minibox canvas { display: block; border-radius: 8px; cursor: pointer; }
.sh-ch { font-size: .6rem; color: #cfe; text-align: center; padding-top: 2px; max-width: 150px; line-height: 1.15; }
.sh-row { display: flex; gap: 5px; }
.sh-zone { font-size: .68rem; color: #ffe9a0; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; }
.sh-menu { position: absolute; right: 6px; z-index: 9; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px; }
.sh-tile { width: 50px; height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; font-size: 1.2rem; line-height: 1.1; }
.sh-tile .l { font-size: .55rem; color: #ffe9b0; margin-top: 2px; font-weight: 700; }
.sh-tab { position: absolute; right: 0; z-index: 9; width: 20px; height: 40px; border-radius: 10px 0 0 10px; font-size: .9rem; }
.sh-target { position: absolute; left: 50%; transform: translateX(-50%); bottom: 128px; width: min(240px, 62vw); z-index: 6; padding: 6px 10px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.sh-target b { font-size: .78rem; color: #fff; display: block; margin-bottom: 3px; }
.sh-target > div { flex: 1; }
.sh-emotes { position: absolute; right: 10px; bottom: 160px; z-index: 7; display: flex; gap: 4px; padding: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 80%; }
.sh-emotes button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #5a7a9a; background: rgba(20,35,55,.9); font-size: 1rem; cursor: pointer; }

.sh-chip { pointer-events: auto; cursor: pointer; }
.zb { display: inline-block; width: 17px; height: 17px; line-height: 15px; text-align: center; border-radius: 50%; background: linear-gradient(180deg,#f6d36a,#b8801c); border: 1px solid #6a4410; color: #4a2c06; font-size: .66rem; font-weight: 900; vertical-align: middle; }
.sh-chattab { display: block; margin: 2px auto 0; padding: 3px 18px; border-radius: 0 0 12px 12px; border: 2px solid #dcb85e; border-top: 0; background: linear-gradient(180deg,#4a6a9a,#2a4060); color: #ffe9a0; font-weight: 800; font-size: .7rem; cursor: pointer; pointer-events: auto; font-family: inherit; }
.sh-banner { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); z-index: 21; padding: 10px 26px; text-align: center; color: #ffe9a0; font-weight: 800; font-size: 1.25rem; text-shadow: 0 2px 8px #000; pointer-events: none; transition: opacity .5s; background: linear-gradient(90deg,transparent,rgba(8,16,30,.78),transparent); width: min(520px, 90%); }

.sh-npcbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: 128px; z-index: 6; width: min(240px, 62vw); padding: 7px 14px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(40,40,52,.92), rgba(18,18,28,.94)); border: 2px solid #dcb85e; box-shadow: 0 0 0 2px #4a3414, 0 4px 12px rgba(0,0,0,.5);
  flex-direction: column; align-items: center; color: #fff; font-size: .95rem; pointer-events: auto; }
.sh-npcbar b { font-size: .95rem; letter-spacing: .02em; } .sh-npcbar span { font-size: .62rem; color: #ffd9a0; margin-top: 1px; }

/* ===== Tutorial: gulungan kertas (digulung → terbuka). Seluruhnya digambar dengan CSS ===== */
.modal.scroll { background: transparent; border: 0; padding: 0; max-width: 360px; box-shadow: none; overflow: visible; }
.scroll-wrap { position: relative; width: 100%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); animation: scrPop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes scrPop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.scroll-roll { position: relative; z-index: 3; height: 30px; margin: 0 -10px; border-radius: 15px; border: 2px solid #5a3a1c;
  background: linear-gradient(180deg, #8d5a2a 0%, #d9a860 28%, #f6dca3 50%, #d9a860 72%, #8d5a2a 100%); }
.scroll-roll::before, .scroll-roll::after { content: ''; position: absolute; top: -2px; bottom: -2px; width: 22px; border-radius: 50%; border: 2px solid #5a3a1c;
  background: radial-gradient(circle at 50% 50%, #5a3a1c 0 2px, #c98f4a 3px 5px, #f1d79c 6px 8px, #c98f4a 9px 10px, #8d5a2a 11px); }
.scroll-roll::before { left: -9px; } .scroll-roll::after { right: -9px; }
.scroll-bottom { margin-top: -2px; }
.scroll-paperbox { position: relative; z-index: 1; height: 0; overflow: hidden; margin: 0 6px; }
.modal.open .scroll-paperbox { animation: scrUnroll 1s cubic-bezier(.3,.7,.2,1) .5s forwards; }
@keyframes scrUnroll { to { height: var(--h); } }
.scroll-paper { height: 100%; background: linear-gradient(90deg, #dfc08a 0, #f7e5bb 9%, #fbefcf 50%, #f7e5bb 91%, #dfc08a 100%); box-shadow: inset 0 0 28px rgba(140,90,30,.4); position: relative; }
.scroll-paper::before { content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at 20% 15%, rgba(150,100,40,.18) 0 18%, transparent 40%), radial-gradient(circle at 80% 70%, rgba(150,100,40,.16) 0 16%, transparent 38%); }
.scroll-content { position: relative; padding: 16px 18px 10px; color: #4a2f14; text-align: left; opacity: 0; }
.modal.open .scroll-content { animation: scrFade .6s ease 1.15s forwards; }
@keyframes scrFade { to { opacity: 1; } }
.scroll-content h3 { margin: 0 0 8px; text-align: center; color: #5a3410; font-size: 1.05rem; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.scroll-steps p { margin: 0 0 7px; font-size: .84rem; line-height: 1.45; color: #4a2f14; }
.scroll-btns { display: flex; gap: 8px; margin-top: 10px; padding-bottom: 4px; }
.scroll-btn { flex: 1; padding: 9px 8px; border-radius: 10px; border: 2px solid #5a3a1c; font-weight: 800; font-size: .82rem; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #e9c98a, #c4934a); color: #4a2610; }
.scroll-btn.go { background: linear-gradient(180deg, #d9534a, #a32a22); color: #fff3e0; border-color: #5a1410; }

.sh-ring { image-rendering: pixelated; }

/* ===== Kasino ===== */
.modal.wide { max-width: 640px; width: 96vw; }
.cs-root { text-align: center; } .cs-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; } .cs-cd { background: #3a2a10; color: #ffd86a; border-radius: 8px; padding: 2px 9px; font-weight: 800; font-size: .8rem; min-width: 54px; text-align: center; }
.cs-phase { font-weight: 800; margin: 6px 0; color: #ffe9a0; } .cs-res { font-weight: 800; border-radius: 8px; padding: 3px 10px; display: inline-block; } .cs-res.w { background: rgba(60,180,90,.25); color: #8fe6a8; } .cs-res.l { background: rgba(220,70,70,.22); color: #ff9a9a; }
.cs-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; } .cs-chip { border: 2px solid #d6aa46; background: #2a1a0c; color: #ffe9a0; border-radius: 999px; padding: 6px 12px; font-weight: 800; cursor: pointer; font-size: .8rem; } .cs-chip.on { background: #d6aa46; color: #2a1a0c; } .cs-chip.clr { border-color: #aa5a5a; color: #ffb0b0; } .cs-chip:disabled { opacity: .4; }
.cs-hist { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 4px 0; } .cs-hn { width: 22px; height: 22px; border-radius: 50%; font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; color: #fff; } .green { background: #1b8a46; } .red { background: #c8283a; } .black { background: #1a1a20; }
.cs-board { display: grid; grid-template-columns: 34px 1fr 40px; gap: 3px; margin-top: 6px; } .cs-zero { display: flex; } .cs-zero .cs-cell { flex: 1; } .cs-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; } .cs-col { display: grid; grid-template-rows: repeat(3, 1fr); gap: 2px; }
.cs-cell { position: relative; border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 800; font-size: .72rem; padding: 7px 0; cursor: pointer; border-radius: 3px; background: #1a5a3a; } .cs-cell.out { background: #1c4a30; } .cs-cell.red { background: #c8283a; } .cs-cell.black { background: #1a1a20; } .cs-cell.green { background: #1b8a46; }
.cs-cell em { position: absolute; right: 0; top: -6px; background: #ffd23f; color: #2a1a00; font-style: normal; font-size: .58rem; border-radius: 8px; padding: 0 4px; } .cs-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 3px; } .cs-out.six { grid-template-columns: repeat(6, 1fr); }
.cs-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 3px 0; } .cs-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 48px; background: #fff; color: #111; border-radius: 5px; border: 1px solid #888; font-size: .78rem; line-height: 1; } .cs-card.red { color: #c01830; } .cs-card.back { background: repeating-linear-gradient(45deg, #1d3f8a, #1d3f8a 4px, #2a56b8 4px, #2a56b8 8px); border-color: #fff; } .cs-card i { font-style: normal; font-size: 1rem; }
.cs-dealer { background: rgba(0,0,0,.25); border-radius: 10px; padding: 4px; margin-bottom: 6px; } .cs-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; } .cs-seat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 4px; font-size: .72rem; } .cs-seat.me { border-color: #7dffa0; } .cs-seat.turn { box-shadow: 0 0 0 2px #ffd23f; } .cs-seat.empty { opacity: .45; } .cs-sn { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cs-val { font-weight: 800; font-size: .8rem; } .cs-badge { font-size: .6rem; border-radius: 6px; padding: 1px 5px; background: rgba(255,255,255,.15); } .cs-badge.w { background: #3cb45a; } .cs-badge.l { background: #c8402a; }
.cs-mj { display: grid; grid-template-columns: 1fr 1.5fr 1fr; grid-template-areas: ". top ." "left mid right" ". bot ."; gap: 4px; } .cs-mjp { background: rgba(255,255,255,.06); border-radius: 8px; padding: 3px; font-size: .7rem; min-height: 40px; } .cs-mjp.top { grid-area: top; } .cs-mjp.left { grid-area: left; } .cs-mjp.right { grid-area: right; } .cs-mjp.bot { grid-area: bot; } .cs-mjp.turn { box-shadow: 0 0 0 2px #ffd23f; } .cs-mjc { grid-area: mid; display: flex; flex-direction: column; justify-content: center; font-size: .78rem; font-weight: 700; }
.cs-disc { display: flex; flex-wrap: wrap; gap: 1px; justify-content: center; } .cs-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; height: 40px; background: #f4efe0; border-radius: 4px; border: 1px solid #8a7a5a; box-shadow: 0 2px 0 #b8a67a; line-height: 1; } .cs-tile b { font-size: 1rem; } .cs-tile i { font-style: normal; font-size: .62rem; } .cs-tile.sm { width: 17px; height: 23px; } .cs-tile.sm b { font-size: .68rem; } .cs-tile.sm i { font-size: .42rem; } .cs-tile.hot { outline: 2px solid #ff4a4a; } .cs-tile.act { cursor: pointer; } .cs-tile.act:hover { transform: translateY(-4px); } .cs-tile.drawn { background: #fff7c8; } .cs-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 8px; } .cs-gap { width: 10px; } .cs-reveal { text-align: left; margin-top: 4px; }

/* ===== Roulette (meja kasino) ===== */
.rl-root { text-align: center; } .rl-top { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.rl-wheelbox { position: relative; width: clamp(210px, 46vw, 290px); } .rl-wheelbox canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 12px rgba(0,0,0,.55)); }
.rl-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 21%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: clamp(1rem, 4.4vw, 1.5rem); color: #fff; border: 3px solid #e6bd5a; background: radial-gradient(#3a3a46, #111); box-shadow: 0 0 14px rgba(255,210,100,.45), inset 0 0 8px rgba(0,0,0,.6); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.rl-badge.red { background: radial-gradient(#e8506a, #9a1428); } .rl-badge.black { background: radial-gradient(#4a4a58, #101015); } .rl-badge.green { background: radial-gradient(#34c874, #0e6a34); } .rl-badge.dim { opacity: .55; } .rl-badge.spin { animation: rlpulse .6s ease-in-out infinite; }
@keyframes rlpulse { 50% { box-shadow: 0 0 22px rgba(255,220,120,.95), inset 0 0 8px rgba(0,0,0,.6); } }
.rl-side { flex: 1; min-width: 220px; text-align: left; } .rl-phase { font-weight: 900; font-size: 1.05rem; color: #ffe9a0; min-height: 1.4em; }
.rl-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: 6px 0 8px; } .rl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd23f, #ff8a3a); }
.rl-hist { display: flex; flex-wrap: wrap; gap: 3px; } .rl-seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin-top: 8px; }
.rl-seat { display: flex; gap: 6px; align-items: center; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 4px 6px; font-size: .68rem; line-height: 1.25; } .rl-seat.me { border-color: #7dffa0; background: rgba(60,160,90,.18); } .rl-seat.empty { opacity: .4; } .rl-seat.bot { border-color: rgba(120,190,255,.5); }
.rl-seat em { font-style: normal; font-weight: 800; } .rl-seat em.w { color: #8fe6a8; } .rl-seat em.l { color: #ff9a9a; } .rl-av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(#f3d27a, #b8862a); color: #3a2200; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .8rem; }
.rl-felt { position: relative; border-radius: 18px; padding: 14px 10px 12px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 2px, transparent 2px 5px), radial-gradient(ellipse at 50% 35%, #1f9a5c 0%, #0f6a3c 58%, #093f24 100%); box-shadow: inset 0 0 0 2px #d6aa46, inset 0 0 0 6px #0a4d2b, inset 0 0 46px rgba(0,0,0,.6), 0 0 0 5px #6a3c1c, 0 0 0 9px #2e180a, 0 12px 22px rgba(0,0,0,.55); }
.rl-board { display: grid; grid-template-columns: 34px 1fr 40px; gap: 4px; } .rl-zero { display: flex; } .rl-zero .rl-c { flex: 1; font-size: 1rem; } .rl-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; } .rl-colb { display: grid; grid-template-rows: repeat(3, 1fr); gap: 3px; }
.rl-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 4px; } .rl-out.six { grid-template-columns: repeat(6, 1fr); }
.rl-c { position: relative; border: 0; color: #fff; font-weight: 900; font-size: .78rem; padding: 10px 0; cursor: pointer; border-radius: 6px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px rgba(230,189,90,.85), 0 2px 0 rgba(0,0,0,.45); text-shadow: 0 1px 2px rgba(0,0,0,.7); transition: transform .08s, filter .08s; }
.rl-c.red { background: linear-gradient(#e0405a, #a31630); } .rl-c.black { background: linear-gradient(#3a3a46, #15151a); } .rl-c.green { background: linear-gradient(#27b064, #0e6a34); } .rl-c:hover { filter: brightness(1.28); transform: translateY(-1px); } .rl-c:active { transform: translateY(1px); }
.rl-c.win { animation: rlwin .7s ease-in-out infinite; z-index: 2; } @keyframes rlwin { 0%, 100% { box-shadow: inset 0 0 0 2px #fff, 0 2px 0 rgba(0,0,0,.45); } 50% { box-shadow: inset 0 0 0 2px #fff, 0 0 18px 5px rgba(255,236,120,.95); } }
.rl-tok { position: absolute; right: -6px; top: -10px; z-index: 3; width: 23px; height: 23px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .54rem; font-weight: 900; border: 2px dashed rgba(255,255,255,.9); box-shadow: 0 2px 3px rgba(0,0,0,.65), inset 0 0 0 3px var(--c); animation: tokdrop .22s ease-out; pointer-events: none; text-shadow: none; }
@keyframes tokdrop { from { transform: translateY(-160%) scale(1.5); opacity: 0; } to { transform: none; opacity: 1; } }
.c1 { --c: #cfd3da; background: #eceff4; color: #222; } .c5 { --c: #b81f33; background: #e24a5e; color: #fff; } .c10 { --c: #1a56a8; background: #3a86e6; color: #fff; } .c25 { --c: #137a43; background: #2fbf72; color: #fff; } .c100 { --c: #0c0c10; background: #2b2b32; color: #ffd86a; }
.rl-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 14px 0 6px; min-height: 54px; }
.rl-chipbtn { width: 52px; height: 52px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.92); font-weight: 900; font-size: .72rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.5), inset 0 0 0 4px var(--c); transition: transform .12s, box-shadow .12s; }
.rl-chipbtn.on { transform: translateY(-7px) scale(1.1); box-shadow: 0 11px 12px rgba(0,0,0,.5), 0 0 0 3px #ffd23f, inset 0 0 0 4px var(--c); } .rl-clr { border: 2px solid #aa5a5a; background: rgba(120,30,30,.35); color: #ffb0b0; border-radius: 12px; padding: 6px 10px; font-size: .68rem; font-weight: 800; cursor: pointer; }
.rl-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; } .rl-banner { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-weight: 900; font-size: clamp(1rem, 4.6vw, 1.5rem); padding: 7px 16px; border-radius: 14px; white-space: nowrap; animation: rlban 2.4s ease forwards; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.rl-banner.w { background: linear-gradient(#ffe9a0, #e6a82e); color: #3a2200; } .rl-banner.l { background: linear-gradient(#5a1f28, #2e0d12); color: #ffb0b0; } .rl-banner.n { background: #2a3a4a; color: #cfe0f0; }
@keyframes rlban { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); } 22% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
.rl-coin { position: absolute; top: -8%; font-size: 1.35rem; animation: rlcoin 1.9s ease-in forwards; } @keyframes rlcoin { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(330px) rotate(540deg); opacity: 0; } }

/* ===== RESPONSIF: modal selalu muat di layar & bisa digeser (iOS/Android, potret/lanskap, desktop pendek) ===== */
.modal-bg { top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; bottom: auto; right: auto;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal { margin: auto; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal.scroll { max-height: none; overflow: visible; }
.modal.wide { max-width: 720px; width: 100%; }
@media (max-height: 520px) {
  .modal { padding: 12px 14px; } .modal h3 { font-size: 1rem; margin-bottom: 4px; } .modal p { margin-bottom: 8px; font-size: .82rem; margin-top: 0; } .modal .btn { padding-top: 8px; padding-bottom: 8px; }
}
/* meja kasino = lembar layar penuh: header tetap, area permainan digeser, tombol bawah SELALU terlihat */
.modal.cs-full { display: flex; flex-direction: column; height: calc(100vh - 20px); height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: none; overflow: hidden; padding: 10px 12px; }
.modal.cs-full .cs-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.modal.cs-full #csHead { flex: none; } .modal.cs-full #csGame { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 1px 4px; }
.modal.cs-full #csFoot { flex: none; display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.modal.cs-full #csFoot .btn { flex: 1; margin: 0; width: auto; padding: 10px 6px; font-size: .84rem; }
.cs-sticky, .rl-tray { position: sticky; bottom: 0; z-index: 6; background: var(--card); box-shadow: 0 -10px 10px -8px rgba(0,0,0,.55); }
.cs-sticky { padding: 6px 0 2px; } .rl-tray { margin: 10px 0 0; padding: 8px 0 4px; }
/* roulette: potret sempit = papan vertikal (sel besar, mudah diketuk) */
.rl-vb { display: grid; grid-template-columns: 46px repeat(3, minmax(0, 1fr)); gap: 3px; } .rl-vb .rl-c { padding: 11px 0; font-size: 1.02rem; } .rl-vb .v0 { grid-column: 2 / 5; grid-row: 1; } .rl-vb .vd { font-size: .72rem; padding: 4px 0; }
.rl-out.six.vert { grid-template-columns: repeat(3, 1fr); } .rl-grid, .rl-colb { min-width: 0; } .rl-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 600px) and (orientation: portrait) { .rl-wheelbox { width: min(60vw, 240px); } .rl-top { margin-bottom: 6px; } .rl-side { min-width: 0; width: 100%; } .rl-felt { padding: 10px 6px 8px; } }
@media (orientation: landscape) and (max-height: 560px) {
  .rl-root { display: grid; grid-template-columns: minmax(170px, 32%) 1fr; grid-template-areas: "top felt" "top tray" "top info"; column-gap: 12px; align-items: start; }
  .rl-top { grid-area: top; flex-direction: column; margin-bottom: 0; gap: 6px; } .rl-felt { grid-area: felt; } #rlTray { grid-area: tray; } #rlInfo { grid-area: info; }
  .rl-wheelbox { width: clamp(130px, 44vh, 220px); } .rl-side { min-width: 0; width: 100%; } .rl-seats { grid-template-columns: 1fr; } .rl-phase { font-size: .9rem; }
  .rl-chipbtn { width: 42px; height: 42px; font-size: .64rem; } .rl-tray { gap: 7px; margin-top: 6px; } .rl-c { padding: 7px 0; font-size: .7rem; }
}
@media (max-width: 420px) { .cs-seats { grid-template-columns: repeat(2, 1fr); } .cs-tile { width: 26px; height: 36px; } .cs-tile b { font-size: .9rem; } }
/* layar pendek (HP lanskap): kolom iklan/tips disembunyikan, bilah koin ringkas di bawah; area game memakai seluruh lebar */
@media (max-height: 520px) and (orientation: landscape) {
  .game-side { display: none !important; } .game-mobile-bar { display: flex !important; } .game-body { flex-direction: column; }
  .game-header { padding-top: 4px; padding-bottom: 4px; } .game-area { padding: 6px 8px; }
}

/* bilah mini roulette (fase + hasil terakhir) menempel di atas area permainan saat layar pendek */
.rl-mini { display: none; position: sticky; top: 0; z-index: 7; background: var(--card); padding: 5px 4px; margin: 0 0 4px; justify-content: space-between; align-items: center; gap: 8px; font-weight: 800; font-size: .85rem; color: #ffe9a0; box-shadow: 0 8px 8px -8px rgba(0,0,0,.6); }
@media (max-height: 760px) { .rl-mini { display: flex; } }
@media (orientation: landscape) and (max-height: 560px) {
  .rl-mini { display: none; } .modal.cs-full { padding: 6px 10px; } .modal.cs-full #csHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .modal.cs-full #csHead .cs-bar { margin: 0; gap: 12px; }
  .modal.cs-full #csFoot { padding-top: 4px; } .modal.cs-full #csFoot .btn { padding: 6px 6px; font-size: .78rem; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .cs-phase { margin: 2px 0; font-size: .82rem; } .cs-dealer { padding: 2px; margin-bottom: 3px; } .cs-card { width: 28px; height: 40px; font-size: .7rem; } .cs-card i { font-size: .85rem; }
  .cs-sticky .hint { display: none; } .cs-sticky .cs-chips, .cs-sticky.cs-chips { margin: 2px 0; gap: 4px; } .cs-chip { padding: 4px 10px; font-size: .74rem; } .cs-sticky { padding: 3px 0 0; }
  .cs-seat { padding: 3px; font-size: .68rem; } .cs-mjp { min-height: 30px; font-size: .64rem; } .cs-tile { width: 24px; height: 33px; } .cs-tile b { font-size: .85rem; } .cs-hand { margin-top: 2px; }
}

/* panel menu PlayTown tidak boleh menutupi tombol aksi di bawah saat layar pendek: tingginya dibatasi & bisa digulir */
.sh-menu { max-height: calc(100% - var(--mt, 214px) - 150px); overflow-y: auto; overscroll-behavior: contain; }

.scroll-chk { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: .86rem; font-weight: 800; color: #4a2f14; cursor: pointer; user-select: none; } .scroll-chk input { width: 22px; height: 22px; accent-color: #a32a22; flex: none; cursor: pointer; }
.coin-help { background: transparent; border: 1px dashed var(--border); color: var(--accent, #7dd3fc); border-radius: 999px; padding: 4px 10px; font-size: .74rem; font-weight: 700; cursor: pointer; }

/* ===== KARTU BERGAYA ASLI (dipakai Blackjack utama & kasino) ===== */
.pc { --cw: 58px; position: relative; display: inline-block; width: var(--cw); height: calc(var(--cw) * 1.42); margin-left: calc(var(--cw) * -.46); vertical-align: top; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.pc:first-child { margin-left: 0; }
.pc .f, .pc .b { position: absolute; inset: 0; border-radius: calc(var(--cw) * .13); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .55s cubic-bezier(.3,.7,.3,1); }
.pc .f { background: linear-gradient(160deg, #fff 0%, #f4f1e6 100%); border: 1px solid #cdc7b3; color: #17171c; font-weight: 800; overflow: hidden; } .pc.red .f { color: #c8182f; }
.pc .b { background: repeating-linear-gradient(45deg, #7d1626 0 5px, #a02438 5px 10px); border: 3px solid #fff; box-shadow: inset 0 0 0 2px #7d1626; transform: rotateY(180deg); }
.pc.down .f { transform: rotateY(180deg); } .pc.down .b { transform: rotateY(0); }
.pc i { font-style: normal; position: absolute; line-height: 1; } .pc .cr { left: calc(var(--cw) * .09); top: calc(var(--cw) * .07); font-size: calc(var(--cw) * .27); text-align: center; }
.pc .cr.bt { left: auto; top: auto; right: calc(var(--cw) * .09); bottom: calc(var(--cw) * .07); transform: rotate(180deg); } .pc .cc { left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: calc(var(--cw) * .62); opacity: .92; }
.pc.deal { animation: pcDeal .5s cubic-bezier(.2,.8,.3,1) both; animation-delay: var(--d, 0s); }
@keyframes pcDeal { from { opacity: 0; transform: translate(var(--fx, 140px), var(--fy, -160px)) rotate(28deg) scale(.55); } to { opacity: 1; transform: none; } }

/* ===== BLACKJACK (tampilan game mobile) ===== */
.bjx { --cw: clamp(46px, 15vw, 64px); width: 100%; max-width: 580px; margin: 0 auto; text-align: center; position: relative; }
.bjx-hud { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.bjx-pill { display: flex; align-items: center; gap: 7px; background: linear-gradient(#2a3550, #18202f); border: 2px solid #e6bd5a; border-radius: 999px; padding: 4px 14px 4px 6px; box-shadow: 0 3px 0 rgba(0,0,0,.45); text-align: left; } .bjx-pill em { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: #0f1624; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.bjx-pill b { display: block; font-size: 1rem; line-height: 1.05; color: #fff; } .bjx-pill small { display: block; font-size: .56rem; letter-spacing: .08em; color: #e6bd5a; font-weight: 800; } .bjx-pill.gold b { color: #ffe08a; }
.bjx-ic { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #e6bd5a; background: #18202f; color: #ffe08a; font-size: 1rem; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.bjx-table { position: relative; border-radius: 30px 30px 46% 46% / 30px 30px 14% 14%; padding: 14px 10px 20px; min-height: clamp(300px, 52vh, 430px); background: radial-gradient(ellipse at 50% 28%, #25a266 0%, #147a46 46%, #0a5230 100%); border: 8px solid #5a3418; box-shadow: inset 0 0 0 3px #e6bd5a, inset 0 0 70px rgba(0,0,0,.55), 0 0 0 3px #2e180a, 0 14px 26px rgba(0,0,0,.55); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.bjx-table::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px); }
.bjx-shoe { position: absolute; right: 12px; top: 10px; width: 46px; height: 62px; z-index: 1; } .bjx-shoe span { position: absolute; inset: 0; border-radius: 6px; background: repeating-linear-gradient(45deg, #7d1626 0 4px, #a02438 4px 8px); border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.5); } .bjx-shoe span:nth-child(2) { transform: translate(-3px, -3px); } .bjx-shoe span:nth-child(3) { transform: translate(-6px, -6px); }
.bjx-dealer, .bjx-player { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bjx-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(#f3d27a, #b8862a); border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 3px 6px rgba(0,0,0,.5); }
.bjx-who { display: flex; align-items: center; gap: 7px; font-weight: 900; font-size: .72rem; letter-spacing: .12em; color: #ffe9a0; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.bjx-score { min-width: 32px; height: 32px; padding: 0 6px; border-radius: 50%; background: radial-gradient(#fff, #e6e2d2); color: #17171c; font-weight: 900; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 0 3px #e6bd5a; letter-spacing: 0; } .bjx-score:empty { display: none; } .bjx-score.bust { background: #c8283a; color: #fff; } .bjx-score.bj { background: #ffd23f; }
.bjx-hand { display: flex; justify-content: center; min-height: calc(var(--cw) * 1.42); }
.bjx-arc { width: 92%; max-width: 420px; margin: -6px auto -10px; position: relative; z-index: 1; opacity: .9; } .bjx-arc text { fill: #e6bd5a; font-weight: 800; font-size: 11.5px; letter-spacing: .14em; }
.bjx-mid { position: relative; z-index: 3; display: flex; align-items: center; justify-content: center; min-height: 64px; }
.bjx-betc { width: 62px; height: 62px; border-radius: 50%; border: 2px dashed rgba(255,233,160,.8); display: flex; align-items: center; justify-content: center; flex-direction: column; color: #ffe9a0; font-weight: 900; font-size: .72rem; background: rgba(0,0,0,.12); } .bjx-betc .rl-tok { position: static; width: 34px; height: 34px; font-size: .62rem; animation: tokdrop .22s ease-out; }
.bjx-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); padding: 8px 22px; border-radius: 16px; font-weight: 900; font-size: clamp(1rem, 5vw, 1.45rem); white-space: nowrap; box-shadow: 0 8px 18px rgba(0,0,0,.55); z-index: 6; } .bjx-banner.show { animation: bjBan 2.6s ease forwards; }
.bjx-banner.w { background: linear-gradient(#ffe9a0, #e6a82e); color: #3a2200; } .bjx-banner.l { background: linear-gradient(#5a1f28, #2e0d12); color: #ffb0b0; } .bjx-banner.p { background: #2a3a4a; color: #dcecff; } .bjx-banner.b { background: linear-gradient(#ff6a3a, #c01c1c); color: #fff; }
@keyframes bjBan { 0% { transform: translate(-50%, -50%) scale(0); } 14% { transform: translate(-50%, -50%) scale(1.15); } 24% { transform: translate(-50%, -50%) scale(1); } 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
.bjx-coin { position: absolute; top: -6%; font-size: 1.3rem; animation: rlcoin 1.9s ease-in forwards; z-index: 5; pointer-events: none; }
.bjx-ctl { position: sticky; bottom: 0; z-index: 8; margin-top: 12px; padding: 10px 6px 6px; background: linear-gradient(to top, var(--bg, #0b1220) 72%, rgba(11,18,32,0)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bjx-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.bjx-rb { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; color: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; text-shadow: 0 2px 2px rgba(0,0,0,.5); box-shadow: 0 6px 0 rgba(0,0,0,.45), inset 0 -6px 10px rgba(0,0,0,.25); transition: transform .08s; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; } .bjx-rb small { font-size: .56rem; opacity: .85; letter-spacing: .08em; } .bjx-rb:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.45), inset 0 -6px 10px rgba(0,0,0,.25); } .bjx-rb:disabled { filter: grayscale(.8) brightness(.7); }
.bjx-rb.hit { background: radial-gradient(#4cd37a, #148a44); } .bjx-rb.stand { background: radial-gradient(#ff7a6a, #b81f33); } .bjx-rb.deal { background: radial-gradient(#ffd966, #d68a12); color: #3a2200; text-shadow: none; width: 92px; height: 92px; font-size: 1.1rem; } .bjx-rb.next { background: radial-gradient(#4cd37a, #148a44); width: 92px; height: 92px; }
.bjx-btn2 { border: 2px solid #e6bd5a; background: #18202f; color: #ffe9a0; border-radius: 999px; padding: 9px 18px; font-weight: 800; font-size: .85rem; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.bjx-note { font-size: .78rem; color: var(--muted); margin: 0; }
.bjx-tiles { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; text-align: left; }
.bjx-tile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 16px; border: 2px solid #e6bd5a; background: linear-gradient(#26324c, #172033); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 4px 0 rgba(0,0,0,.45); } .bjx-tile:disabled { opacity: .45; filter: grayscale(.5); cursor: not-allowed; } .bjx-tile .rl-tok { position: static; flex: none; width: 46px; height: 46px; font-size: .78rem; animation: none; }
.bjx-tile b { display: block; font-size: 1.02rem; } .bjx-tile span.sub { display: block; font-size: .78rem; color: #b8c4dc; } .bjx-tile .go { margin-left: auto; font-weight: 900; color: #ffd23f; }
.bjx-rules { font-size: .78rem; color: var(--muted); line-height: 1.5; margin-top: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .bjx { --cw: 38px; max-width: 760px; } .bjx-table { min-height: 0; padding: 8px 10px 10px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-radius: 22px; } .bjx-arc { display: none; } .bjx-avatar { width: 32px; height: 32px; font-size: 1.1rem; } .bjx-shoe { display: none; }
  .bjx-hud { margin-bottom: 4px; } .bjx-rb { width: 58px; height: 58px; font-size: .8rem; } .bjx-rb.deal, .bjx-rb.next { width: 66px; height: 66px; } .bjx-ctl { margin-top: 6px; padding: 6px 4px 2px; } .bjx-note { display: none; }
}

/* Blackjack: seluruh layar game dibuat pas tinggi layar; area game yang menggulir, sehingga kontrol (DEAL/HIT/STAND/NEXT) selalu terlihat di dasar */
#screen-game.game-fit { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
#screen-game.game-fit .game-body { flex: 1; min-height: 0; } #screen-game.game-fit .game-area { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 0; }
#screen-game.game-fit .game-side { overflow-y: auto; }
/* mode pas-layar: jangan memusatkan isi secara vertikal (isi yang lebih tinggi terpotong di atas); pusatkan lewat margin auto */
#screen-game.game-fit .game-area { justify-content: flex-start; }
#screen-game.game-fit .game-area > .bjx { margin-top: auto; margin-bottom: auto; }

/* ===== Blackjack kasino (gaya meja game mobile, kartu animasi) ===== */
.cs-bjx { max-width: 640px; } .cs-bjx .bjx-table { min-height: 0; padding: 12px 8px 14px; } .cs-bjseats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; margin: 4px 0 6px; }
.cs-ms { --cw: 26px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 5px 4px; font-size: .66rem; display: flex; flex-direction: column; align-items: center; gap: 3px; } .cs-ms.turn { box-shadow: 0 0 0 2px #ffd23f; } .cs-ms.empty { opacity: .4; flex-direction: row; justify-content: center; }
.cs-msh { display: flex; gap: 5px; align-items: center; text-align: left; max-width: 100%; } .cs-msh b { display: block; max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cs-msh small { color: #cfe0f0; }
.cs-ms .bjx-hand { min-height: calc(26px * 1.42); } .cs-ms .bjx-score { min-width: 22px; height: 22px; font-size: .7rem; padding: 0 4px; } .cs-msf { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; } .cs-msf em { font-style: normal; font-weight: 800; } .cs-msf em.w { color: #8fe6a8; } .cs-msf em.l { color: #ff9a9a; }
.rl-tok.flat { position: static; transform: none; animation: none; width: 22px; height: 22px; display: inline-flex; } .cs-bjx .bjx-betc .rl-tok.flat { width: 40px; height: 40px; font-size: .7rem; }
.cs-bjx .bjx-mid { min-height: 56px; } .cs-bjx .bjx-ctl { position: static; }
@media (orientation: landscape) and (max-height: 520px) { .cs-bjx .bjx-table { display: block; border-radius: 22px; padding: 6px 8px 8px; } .cs-bjx .bjx-arc { display: none; } .cs-bjx .bjx-dealer, .cs-bjx .bjx-player { flex-direction: row; justify-content: center; flex-wrap: wrap; } .cs-bjx .bjx-mid { min-height: 40px; } .cs-bjseats { grid-template-columns: repeat(3, 1fr); } .bjx-rb { width: 54px; height: 54px; } }

/* blackjack kasino: pemadatan layar pendek */
.cs-bjx { --cw: clamp(38px, 11.5vw, 54px); } .cs-bjx .bjx-avatar { width: 36px; height: 36px; font-size: 1.2rem; } .cs-bjx .bjx-shoe { transform: scale(.72); transform-origin: top right; } .cs-bjx .bjx-who { flex-wrap: wrap; justify-content: center; }
.cs-bjx .bjx-who .rl-tok.flat { width: 26px; height: 26px; font-size: .56rem; }
.cs-bjx .bjx-banner { top: 40%; } .cs-bjx .bjx-table { position: relative; }
@media (max-height: 760px) { .cs-bjx .bjx-arc { display: none; } .cs-sticky .bjx-note { display: none; } }
@media (max-width: 600px) { .cs-sticky .bjx-rb { width: 62px; height: 62px; font-size: .78rem; } .cs-sticky .rl-chipbtn { width: 44px; height: 44px; font-size: .66rem; } .cs-sticky .bjx-row { gap: 8px; } }
@media (orientation: landscape) and (max-height: 560px) {
  #csGame.cs-bjgrid { display: grid; grid-template-columns: minmax(0, 1fr) 132px; column-gap: 8px; align-content: start; }
  #csGame.cs-bjgrid .cs-phase { grid-column: 1 / -1; grid-row: 1; margin: 0; } #csGame.cs-bjgrid .cs-bjx { grid-column: 1; grid-row: 2; --cw: 30px; max-width: none; }
  #csGame.cs-bjgrid .cs-sticky { grid-column: 2; grid-row: 2; position: sticky; top: 0; bottom: auto; align-self: start; box-shadow: none; background: transparent; padding: 0; }
  #csGame.cs-bjgrid .cs-sticky .bjx-row { flex-wrap: wrap; justify-content: center; gap: 6px; } #csGame.cs-bjgrid .cs-sticky .bjx-rb { width: 56px; height: 56px; font-size: .72rem; } #csGame.cs-bjgrid .cs-sticky .rl-chipbtn { width: 38px; height: 38px; font-size: .6rem; }
  .cs-bjx .bjx-who { font-size: .62rem; } .cs-bjx .bjx-dealer, .cs-bjx .bjx-player { gap: 6px; margin-bottom: 2px; } .cs-bjseats { grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 2px; }
}
/* ukuran kartu blackjack kasino (kartu menetapkan --cw sendiri, jadi dipakai variabel --ccw dari wadah) */
.cs-bjx { --ccw: clamp(38px, 11.5vw, 54px); } .cs-bjx .pc { --cw: var(--ccw); } .cs-ms .pc { --cw: 28px; } .cs-ms .bjx-hand { min-height: calc(28px * 1.42); } .cs-bjx .bjx-banner { top: 46%; }
@media (orientation: landscape) and (max-height: 560px) { #csGame.cs-bjgrid .cs-bjx { --cw: 34px; --ccw: 34px; } .cs-ms .pc { --cw: 24px; } .cs-ms .bjx-hand { min-height: calc(24px * 1.42); } }

/* ===== Bisik (whisper) ===== */
.wh-line { color: #e4b8ff; font-style: italic; } .wh-line strong, .wh-name { color: #f0d4ff; } #shLog .wh-name { pointer-events: auto; cursor: pointer; text-decoration: underline dotted; }
.wh-chip { align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; padding: 5px 9px; border-radius: 10px; background: rgba(150,90,230,.25); border: 1px solid #b070ff; color: #ecd6ff; font-size: .78rem; } .wh-chip button { background: transparent; border: 1px solid #b070ff; color: #ecd6ff; border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: .72rem; }

/* ===== Blackjack kasino v3: susunan duduk seperti meja kartu mobile (dealer atas, pemain kiri/kanan, KAMU bawah tengah) ===== */
.bj2 { border-radius: 16px; padding: 6px; background: linear-gradient(90deg, rgba(110,40,150,.55), rgba(30,10,50,0) 15%, rgba(30,10,50,0) 85%, rgba(110,40,150,.55)), radial-gradient(ellipse at 50% 0, #2e1a45, #130b1e); }
.bj2-table { position: relative; width: 100%; height: clamp(380px, 62dvh, 560px); border-radius: 42% 42% 34% 34% / 24% 24% 18% 18%; background: radial-gradient(ellipse at 50% 38%, #20ad6a 0%, #0e6d41 58%, #07452a 100%); box-shadow: inset 0 0 0 9px #17111f, inset 0 0 0 12px #44345a, inset 0 0 70px rgba(0,0,0,.55), 0 12px 24px rgba(0,0,0,.55); --cwo: clamp(21px, 6vw, 28px); --cwd: clamp(32px, 9vw, 44px); --cwm: clamp(40px, 11.5vw, 58px); }
.bj2-table::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px); }
.bj2-mark { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); text-align: center; font-weight: 900; letter-spacing: .1em; font-size: clamp(.62rem, 2.4vw, .85rem); color: rgba(230,189,90,.55); text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; z-index: 1; } .bj2-mark small { font-size: .62em; letter-spacing: .14em; }
.bj2-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: linear-gradient(#f3d27a, #b8862a); border: 2px solid #f6e3a1; box-shadow: 0 2px 6px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; font-weight: 900; color: #3a2200; flex: none; } .bj2-av img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: cover; } .bj2-av.big { width: 42px; height: 42px; } .bj2-av.dealer { width: 54px; height: 54px; border-width: 3px; }
.bj2-dealer { position: absolute; left: 50%; top: 3%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 3; } .bj2-dcards { display: flex; justify-content: center; min-height: calc(var(--cwd) * 1.42); --cw: var(--cwd); } .bj2-dval { font-weight: 900; font-size: .66rem; letter-spacing: .12em; color: #ffe9a0; display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.bj2-seat { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: grid; grid-template-columns: auto auto; grid-template-areas: "name name" "av cards" "bal bal" "info info"; gap: 2px 5px; align-items: center; justify-items: center; font-size: .62rem; max-width: 38%; }
.bj2-seat.r { grid-template-areas: "name name" "cards av" "bal bal" "info info"; } .bj2-name { grid-area: name; font-weight: 800; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 1px 7px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.bj2-seat .bj2-av { grid-area: av; } .bj2-cards { grid-area: cards; display: flex; min-width: 26px; min-height: calc(var(--cwo) * 1.42); --cw: var(--cwo); } .bj2-bal { grid-area: bal; background: rgba(0,0,0,.55); border: 1px solid #e6bd5a; border-radius: 999px; padding: 0 8px; font-weight: 800; color: #ffe9a0; white-space: nowrap; font-size: .62rem; }
.bj2-info { grid-area: info; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; } .bj2-info em { font-style: normal; font-weight: 800; } .bj2-info em.w { color: #8fe6a8; } .bj2-info em.l { color: #ff9a9a; } .bj2-info small { color: #cfe0f0; }
.bj2-bet { display: inline-flex; align-items: center; gap: 3px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 1px 8px 1px 2px; font-weight: 800; color: #fff; font-size: .64rem; } .bj2-bet i { font-style: normal; width: 15px; height: 15px; border-radius: 50%; background: #2fbf72; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .6rem; }
.bj2-seat .bjx-score, .bj2-me .bjx-score { min-width: 22px; height: 22px; padding: 0 4px; font-size: .72rem; } .bj2-seat.turn .bj2-av, .bj2-me.turn .bj2-av { animation: bj2ring 1s ease-in-out infinite; } @keyframes bj2ring { 50% { box-shadow: 0 0 0 4px rgba(255,210,63,.95), 0 0 14px #ffd23f; } }
.bj2-seat.TL { left: 19%; top: 27%; } .bj2-seat.TR { left: 81%; top: 27%; } .bj2-seat.L { left: 16%; top: 55%; } .bj2-seat.R { left: 84%; top: 55%; } .bj2-seat.BL { left: 17%; top: 80%; } .bj2-seat.BR { left: 83%; top: 80%; }
.bj2-me { position: absolute; left: 50%; bottom: 1.5%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 5; width: 62%; } .bj2-mycards { display: flex; justify-content: center; --cw: var(--cwm); margin-bottom: -10px; position: relative; z-index: 2; min-height: calc(var(--cwm) * 1.42); }
.bj2-mypanel { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; position: relative; z-index: 1; } .bj2-mytxt { display: flex; flex-direction: column; font-size: .62rem; line-height: 1.2; color: #fff; align-items: flex-start; } .bj2-mytxt b { letter-spacing: .1em; color: #ffe9a0; } .bj2-mypanel small { color: #cfe0f0; }
.bj2-table .bjx-banner { top: 45%; z-index: 8; }
/* panel bawah: baki chip kulit + tombol bulat-pil di kiri/kanan */
.bj2-bar { display: flex; align-items: center; gap: 8px; } .bj2-tray { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 18px 18px 8px 8px; background: linear-gradient(#2a2330, #130f19); border: 2px solid #4a3a5c; box-shadow: inset 0 2px 6px rgba(0,0,0,.6); min-height: 56px; } .bj2-tray.mid { gap: 0; }
.bj2-pill { flex: none; min-width: 66px; padding: 12px 10px; border-radius: 999px; border: 2px solid rgba(255,255,255,.85); font-weight: 900; font-size: .78rem; letter-spacing: .06em; color: #fff; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.5); text-shadow: 0 1px 2px rgba(0,0,0,.5); } .bj2-pill.red { background: linear-gradient(#ff7a6a, #b81f33); } .bj2-pill.blue { background: linear-gradient(#5aa8ff, #1f56b8); } .bj2-pill:disabled { filter: grayscale(.8) brightness(.6); cursor: default; box-shadow: none; }
.bj2-ch { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 3px dashed rgba(255,255,255,.95); font-weight: 900; font-size: .64rem; cursor: pointer; background: var(--bg); color: #17171c; box-shadow: 0 3px 0 rgba(0,0,0,.5), inset 0 0 0 4px var(--c); transition: transform .12s; } .bj2-ch.on { transform: translateY(-6px) scale(1.1); box-shadow: 0 9px 10px rgba(0,0,0,.5), 0 0 0 3px #ffd23f, inset 0 0 0 4px var(--c); }
.bj2-ch.c1 { --c: #2fbf72; --bg: #ffffff; } .bj2-ch.c5 { --c: #2f80ed; --bg: #ffffff; } .bj2-ch.c10 { --c: #f2a600; --bg: #ffffff; } .bj2-ch.c25 { --c: #8a4fd0; --bg: #ffffff; } .bj2-ch.c100 { --c: #d0293a; --bg: #ffffff; }
.bj2-dbl { border: 2px solid #fff; border-radius: 999px; padding: 9px 22px; font-weight: 900; font-size: .85rem; color: #3a2200; background: linear-gradient(#ffd966, #d68a12); box-shadow: 0 4px 0 rgba(0,0,0,.5); cursor: pointer; } .bj2-dbl small { opacity: .75; } .bj2-dbl:disabled { filter: grayscale(.8) brightness(.65); cursor: default; } .bj2-wait { color: #cfe0f0; font-size: .78rem; text-align: center; }
@media (max-width: 420px) { .bj2-pill { min-width: 58px; padding: 11px 6px; font-size: .72rem; } .bj2-ch { width: 38px; height: 38px; font-size: .6rem; } .bj2-seat { max-width: 42%; } .bj2-me { width: 70%; } }
@media (max-height: 760px) and (orientation: portrait) { .bj2-table { height: clamp(360px, 58dvh, 520px); } }
@media (orientation: landscape) and (max-height: 560px) {
  #csGame.cs-bjgrid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; column-gap: 8px; align-content: start; } #csGame.cs-bjgrid .cs-phase { grid-column: 1 / -1; grid-row: 1; margin: 0; } #csGame.cs-bjgrid .bj2 { grid-column: 1; grid-row: 2; }
  #csGame.cs-bjgrid .cs-sticky { grid-column: 2; grid-row: 2; position: sticky; top: 0; bottom: auto; align-self: start; box-shadow: none; background: transparent; padding: 0; }
  .bj2-table { height: clamp(250px, calc(100dvh - 120px), 420px); --cwo: 21px; --cwd: 30px; --cwm: 38px; } .bj2-bar { flex-direction: column; align-items: stretch; gap: 6px; } .bj2-pill { padding: 8px 6px; } .bj2-tray { flex-wrap: wrap; min-height: 0; padding: 5px; } .bj2-av { width: 28px; height: 28px; } .bj2-av.dealer { width: 38px; height: 38px; } .bj2-av.big { width: 30px; height: 30px; } .bj2-mark { display: none; } .bj2-me { width: 56%; } .bj2-seat { font-size: .56rem; }
}
/* kartu memakai ukuran dari wadahnya (.pc menetapkan --cw sendiri, jadi harus ditimpa di tingkat kartu) */
.bj2-cards .pc { --cw: var(--cwo); } .bj2-dcards .pc { --cw: var(--cwd); } .bj2-mycards .pc { --cw: var(--cwm); }
.bj2-me { width: max-content; max-width: 72%; } .bj2-mypanel { max-width: 200px; } .bj2-seat.BL { left: 14%; top: 79%; } .bj2-seat.BR { left: 86%; top: 79%; } .bj2-seat.L { left: 15%; } .bj2-seat.R { left: 85%; }
@media (max-width: 420px) { .bj2-me { max-width: 56%; } .bj2-mypanel { max-width: 150px; } .bj2-seat { max-width: 34%; } }
.bj2-seat.L, .bj2-seat.R { top: 52%; } .bj2-seat.BL, .bj2-seat.BR { top: 82%; } .bj2-seat.TL, .bj2-seat.TR { top: 26%; }
@media (max-width: 420px) { .bj2-seat.TL, .bj2-seat.TR { top: 24%; } .bj2-seat.L, .bj2-seat.R { top: 53%; } .bj2-seat.BL, .bj2-seat.BR { top: 83%; } .bj2-seat .cs-badge:not(.l):not(.w) { display: none; } .bj2-info { flex-wrap: nowrap; } .bj2-name { font-size: .58rem; padding: 0 6px; } }
/* rapikan: lencana nilai dealer & label KAMU tidak tertimpa kartu */
.bj2-dval { margin-top: 4px; } .bj2-dval .bjx-score { min-width: 24px; height: 24px; font-size: .78rem; } .bj2-mycards { margin-bottom: -2px; } .bj2-mypanel { padding-top: 2px; }
/* lanskap pendek: meja PAS tinggi area (kartuku harus terlihat tanpa menggulir) */
@media (orientation: landscape) and (max-height: 560px) {
  .bj2-table { height: clamp(165px, calc(100dvh - 128px), 420px); --cwo: 16px; --cwd: 24px; --cwm: 30px; border-radius: 34% 34% 28% 28% / 30% 30% 22% 22%; }
  .bj2-av { width: 24px; height: 24px; border-width: 1.5px; } .bj2-av.dealer { width: 30px; height: 30px; } .bj2-av.big { width: 26px; height: 26px; } .bj2-seat { font-size: .52rem; gap: 1px 3px; } .bj2-name { font-size: .5rem; padding: 0 5px; }
  .bj2-bal { font-size: .52rem; padding: 0 5px; } .bj2-bet { font-size: .54rem; } .bj2-bet i { width: 12px; height: 12px; font-size: .5rem; } .bj2-seat .bjx-score, .bj2-me .bjx-score { min-width: 17px; height: 17px; font-size: .6rem; }
  .bj2-dval { font-size: .54rem; margin-top: 1px; } .bj2-dval .bjx-score { min-width: 18px; height: 18px; font-size: .6rem; } .bj2-seat .cs-badge, .bj2-mypanel .cs-badge { font-size: .5rem; padding: 0 3px; }
  .bj2-seat.TL, .bj2-seat.TR { top: 30%; } .bj2-seat.L, .bj2-seat.R { top: 62%; } .bj2-dealer { top: 2%; gap: 1px; } .bj2-me { bottom: 0; } .bj2-mytxt { font-size: .5rem; }
}
/* ===== Bursa Kerajaan (PlayTown) ===== */
.modal.cs-full .bu-root { flex: 1; min-height: 0; display: flex; flex-direction: column; text-align: left; } .bu-title { font-weight: 900; font-size: 1.02rem; } .bu-sum { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .76rem; color: var(--muted); } .bu-sum b { color: var(--text); }
.bu-wallet { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0 4px; } .bu-w { display: flex; gap: 5px; flex: 1; min-width: 150px; } .bu-w input, .bu-in { min-width: 0; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: .85rem; } .bu-w input { flex: 1; width: 0; }
.bu-w .btn { width: auto; padding: 8px 10px; margin: 0; font-size: .74rem; white-space: nowrap; }
.bu-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: thin; flex: none; } .bu-tab { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .74rem; font-weight: 700; cursor: pointer; } .bu-tab.on { background: linear-gradient(#3a7bd5, #2a5ba5); border-color: #6aa6ff; color: #fff; }
.bu-news { font-size: .72rem; margin: 0 0 4px; flex: none; } .bu-n { padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.05); margin-bottom: 2px; } .bu-n.up { color: #8fe6a8; } .bu-n.down { color: #ff9a9a; } .bu-n em { opacity: .75; font-style: normal; }
.bu-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-right: 2px; } .bu-foot { flex: none; display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border); } .bu-foot .btn { flex: 1; margin: 0; width: auto; padding: 10px 6px; font-size: .84rem; }
.bu-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-areas: "l r" "act act"; gap: 6px 10px; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); margin-bottom: 6px; } .bu-row.own { border-color: var(--gold); background: rgba(253,203,110,.08); }
.bu-l { grid-area: l; display: flex; gap: 8px; align-items: center; min-width: 0; } .bu-r { grid-area: r; display: flex; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; } .bu-act { grid-area: act; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bu-tk { flex: none; width: 46px; text-align: center; padding: 7px 0; border-radius: 8px; font-weight: 900; font-size: .72rem; color: #10131a; background: var(--c); } .bu-nm { display: flex; flex-direction: column; min-width: 0; } .bu-nm b { font-size: .86rem; } .bu-nm small { font-size: .64rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bu-nm .bu-pos { color: var(--gold); }
.bu-px { display: block; font-size: .95rem; } .bu-chg { font-size: .72rem; font-weight: 800; } .bu-chg.up { color: #6df0a0; } .bu-chg.down { color: #ff8a8a; } .bu-spark { width: 84px; height: 30px; flex: none; }
.bu-in { width: 78px; } .bu-act button { padding: 7px 12px; font-weight: 800; border-radius: 8px; border: 0; cursor: pointer; font-size: .76rem; } .bu-act .btn-buy { background: #1f9d55; color: #fff; } .bu-act .btn-sell { background: #c0392b; color: #fff; } .bu-act button:disabled { opacity: .4; cursor: default; }
@media (orientation: landscape) and (max-height: 560px) { .bu-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1.5fr); grid-template-areas: "l r act"; align-items: center; } .bu-title { font-size: .9rem; } .bu-wallet { margin: 3px 0; } .bu-foot .btn { padding: 6px; } .bu-news { display: none; } .bu-spark { width: 60px; } }
@media (orientation: landscape) and (max-height: 560px) {
  .bu-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .bu-wallet { flex-wrap: nowrap; align-items: center; margin: 2px 0; } .bu-w { min-width: 0; } .bu-wallet .hint { flex: none; font-size: .6rem; max-width: 34%; line-height: 1.25; }
  .bu-tabs { padding: 2px 0 4px; } .bu-tab { padding: 4px 10px; } .bu-row { padding: 5px 8px; margin-bottom: 4px; } .bu-act button { padding: 5px 9px; }
}

/* ===== Arcade (PlayTown) ===== */
.ar-row { margin-bottom: 10px; } .ar-h { font-weight: 900; font-size: .78rem; letter-spacing: .08em; color: #ffd86a; margin: 0 0 5px; } .ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ar-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font-size: .7rem; } .ar-tile span { font-size: 1.5rem; } .ar-tile b { font-weight: 700; text-align: center; line-height: 1.15; } .ar-tile:hover { border-color: #ff7ae6; background: rgba(255,122,230,.12); }
/* ===== Login Google ===== */
.g-btn { display: flex; justify-content: center; min-height: 44px; margin: 4px 0; } .g-old { margin-top: 12px; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 10px; text-align: left; } .g-old summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
.home-hero { text-align: center; padding: 18px 14px; border: 1px solid var(--gold); background: linear-gradient(160deg, rgba(253,203,110,.12), rgba(108,92,231,.1)); }

/* ===== Layar masuk / daftar (v2) ===== */
#screen-auth { background: radial-gradient(900px 500px at 15% -10%, rgba(108,92,231,.38), transparent 60%), radial-gradient(800px 520px at 100% 110%, rgba(0,206,201,.22), transparent 60%), #0b1020; }
#screen-auth .auth-wrap { width: min(420px, 100%); padding: 18px 14px 28px; } .auth-hero { text-align: center; margin-bottom: 14px; }
#screen-auth .auth-box { background: rgba(20,27,48,.82); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 18px 16px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: rgba(255,255,255,.06); } .auth-tabs button { border: 0; border-radius: 999px; padding: 10px 0; font-weight: 800; font-size: .92rem; color: var(--muted); background: transparent; cursor: pointer; transition: .15s; } .auth-tabs button.on { color: #fff; background: linear-gradient(135deg, #6c5ce7, #4a90ff); box-shadow: 0 6px 16px rgba(94,92,231,.45); }
.auth-form { display: block; } .af { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0 12px; height: 50px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1.5px solid transparent; transition: .15s; } .af:focus-within { border-color: #6c5ce7; background: rgba(108,92,231,.12); } .af .ico { flex: none; font-size: 1.05rem; opacity: .85; }
.af input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .95rem; padding: 0; } .af input::placeholder { color: var(--muted); } .af .eye { flex: none; border: 0; background: transparent; font-size: 1.05rem; cursor: pointer; opacity: .8; padding: 4px; }
.pw-meter { display: flex; gap: 5px; align-items: center; margin: -2px 4px 10px; font-size: .7rem; color: var(--muted); } .pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); } .pw-meter span { flex: none; min-width: 44px; text-align: right; }
.pw-meter[data-s="1"] i:nth-child(1) { background: #ff6b6b; } .pw-meter[data-s="2"] i:nth-child(-n+2) { background: #ffb347; } .pw-meter[data-s="3"] i:nth-child(-n+3) { background: #c8e06b; } .pw-meter[data-s="4"] i { background: #4cd98a; }
.auth-go { margin-top: 4px; height: 50px; border-radius: 14px; font-size: 1rem; background: linear-gradient(135deg, #6c5ce7, #4a90ff); box-shadow: 0 10px 24px rgba(94,92,231,.4); }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: .78rem; } .auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.12); }
.auth-note { text-align: center; margin-top: 12px; font-size: .72rem; } #gLoginBox .auth-err, #gSetupBox .auth-err { min-height: 1.1em; text-align: center; }
@media (max-height: 640px) { #screen-auth .auth-logo { font-size: 2rem; } .af { height: 44px; margin-bottom: 8px; } .auth-go { height: 44px; } }
.auth-go, .auth-go:hover { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* ===== Biliar ===== */
.pl-root { position: fixed; inset: 0; z-index: 9500; overflow: hidden; background: #17171b repeating-linear-gradient(90deg, #1d1d22 0 54px, #181820 54px 108px); color: #fff; font-family: inherit; user-select: none; -webkit-user-select: none; touch-action: none; }
.pl-stage { position: absolute; transform-origin: 0 0; display: flex; flex-direction: column; padding: max(4px, env(safe-area-inset-top)) 6px 4px; box-sizing: border-box; }
.pl-top { display: flex; align-items: flex-start; gap: 8px; flex: none; } .pl-topm { flex: 1; min-width: 0; text-align: center; } .pl-msg { min-height: 1.3em; font-weight: 800; font-size: .95rem; color: #ffe21f; text-shadow: 0 1px 2px #000; line-height: 1.2; }
.pl-ib { flex: none; width: 44px; height: 44px; border-radius: 10px; border: 2px solid #3a3a42; background: #101014; color: #fff; font-size: 1.35rem; cursor: pointer; display: flex; align-items: center; justify-content: center; } .pl-ib.round { border-radius: 50%; width: 46px; height: 46px; border-color: #d9d9e0; background: radial-gradient(circle at 35% 30%, #fff, #bbb); font-size: 1.15rem; } .pl-ib:disabled { opacity: .4; }
.pl-plrs { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; } .pl-pl { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: .95rem; opacity: .62; min-width: 0; } .pl-pl.on { opacity: 1; } .pl-pl b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pl-pl em { font-style: normal; font-weight: 800; }
.pl-dots { display: inline-flex; gap: 3px; } .pl-d { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #55555e; background: #0d0d10; display: inline-block; } .pl-timer { font-weight: 800; color: #9fe6a8; font-size: .85rem; }
.pl-mid { flex: 1; min-height: 0; display: flex; gap: 8px; align-items: stretch; } .pl-tablewrap { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; } #plCv { display: block; touch-action: none; cursor: crosshair; }
.pl-left, .pl-right { flex: none; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 0; } .pl-pct { font-weight: 900; color: #ffe21f; font-size: .85rem; }
.pl-slider { position: relative; flex: 1; width: 34px; min-height: 80px; border: 2px solid #3a3a42; border-radius: 9px; background: #0e0e12; overflow: hidden; touch-action: none; cursor: pointer; } #plPwr i { position: absolute; left: 0; right: 0; top: 0; height: 0%; background: linear-gradient(#f6d58b, #c98a2b); border-radius: 0 0 6px 6px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.2); } #plPwr::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: linear-gradient(#bde0ff, #5da9e8); z-index: 1; border-radius: 6px 6px 0 0; }
.pl-slider.fine i { position: absolute; left: -2px; right: -2px; height: 10px; margin-top: -5px; background: #d92b2b; border-radius: 5px; top: 50%; } .pl-slider.fine { background: repeating-linear-gradient(#0e0e12 0 15px, #1b1b22 15px 16px); }
.pl-spin { flex: none; width: 52px; height: 52px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #fff, #c9c5b8); border: 3px solid #d9d9e0; touch-action: none; cursor: pointer; } .pl-spin i { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #d92b2b; box-shadow: 0 0 0 1px #5a0f0f; left: 50%; top: 50%; pointer-events: none; }
.pl-bottom { flex: none; display: flex; align-items: center; gap: 8px; padding-top: 2px; } .pl-shots { font-weight: 800; font-size: .85rem; min-width: 86px; } .pl-shots.r { text-align: right; } .pl-tray { flex: 1; min-height: 30px; display: flex; gap: 3px; align-items: center; padding: 3px 8px; background: #0b0b0e; border: 2px solid #3a3a42; border-radius: 4px; overflow: hidden; }
.pl-tb { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: .6rem; font-weight: 900; font-style: normal; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255,255,255,.35); box-sizing: border-box; flex: none; } .pl-tb.st { background: linear-gradient(#fff 28%, var(--c) 28% 72%, #fff 72%); color: #111; }
.pl-over { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); } .pl-ovb { background: #20232e; border: 2px solid #4b5063; border-radius: 16px; padding: 16px 18px; width: min(340px, 90%); text-align: center; max-height: 92%; overflow-y: auto; } .pl-ovt { font-size: 1.15rem; font-weight: 900; margin-bottom: 6px; } .pl-ovb .btn { margin-top: 8px; } .pl-chk { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 6px 0; }
.pl-root.rot .pl-ib { width: 40px; height: 40px; }
@media (max-height: 420px) { .pl-msg { font-size: .8rem; } .pl-ib { width: 38px; height: 38px; } .pl-left, .pl-right { width: 46px; } .pl-spin { width: 44px; height: 44px; } .pl-dots .pl-d { width: 12px; height: 12px; } }

/* biliar — potret: HUD tegak, meja vertikal, slider horizontal di bawah meja */
.pl-root.rot .pl-mid { flex-direction: column; gap: 6px; } .pl-root.rot .pl-tablewrap { order: 1; } .pl-root.rot .pl-left { order: 2; } .pl-root.rot .pl-right { order: 3; }
.pl-root.rot .pl-left, .pl-root.rot .pl-right { width: auto; flex-direction: row; align-items: center; gap: 8px; padding: 0 2px; } .pl-root.rot .pl-pct { min-width: 38px; text-align: center; }
.pl-root.rot .pl-slider { flex: 1; width: auto; height: 34px; min-height: 0; min-width: 60px; } .pl-root.rot #plPwr i { top: 0; bottom: 0; left: 0; right: auto; border-radius: 0 6px 6px 0; } .pl-root.rot #plPwr::before { left: 0; right: auto; top: 0; bottom: 0; width: 12px; height: auto; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, #bde0ff, #5da9e8); }
.pl-root.rot .pl-slider.fine { background: repeating-linear-gradient(90deg, #0e0e12 0 15px, #1b1b22 15px 16px); } .pl-root.rot .pl-slider.fine i { top: 0; bottom: 0; height: auto; width: 10px; margin: 0 0 0 -5px; left: 50%; }
.pl-root.rot .pl-msg { font-size: .88rem; } .pl-root.rot .pl-plrs { flex-wrap: wrap; } .pl-root.rot .pl-ib { width: 40px; height: 40px; } .pl-root.rot .pl-spin { width: 46px; height: 46px; } .pl-root.rot .pl-bottom { flex-wrap: wrap; } .pl-root.rot .pl-tray { order: 3; flex-basis: 100%; }
.pl-tablewrap { min-height: 0; min-width: 0; overflow: hidden; } #plCv { max-width: 100%; max-height: 100%; }
.pl-root.rot .pl-bottom { flex-wrap: nowrap; } .pl-root.rot .pl-tray { order: 0; flex-basis: auto; min-width: 0; } .pl-root.rot .pl-pl b { max-width: 180px; } .pl-root.rot .pl-shots { min-width: 0; font-size: .74rem; } .pl-root.rot .pl-plrs { gap: 2px 8px; }
.pl-root.rot .pl-left, .pl-root.rot .pl-right { flex: none; min-height: 48px; }

/* biliar v2: tampilan 3D ala 8 Ball Pool */
.pl-root { background: radial-gradient(900px 560px at 50% 38%, #1b2c55, #0b1226 70%), #0b1226; } #plCv { border-radius: 40px; box-shadow: 0 14px 24px rgba(0,0,0,.6); }
.pl-d { width: 17px; height: 17px; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.6); } .pl-d.e { background: radial-gradient(circle at 34% 28%, #3c3c46, #17171c 70%); box-shadow: inset 0 0 0 1.5px #4a4a54; }
.pl-ib { background: linear-gradient(#26b95c, #12803a); border-color: #4fe085; } .pl-ib#plGear { background: linear-gradient(#34354a, #1a1b28); border-color: #5a5c7a; } .pl-ib.round { background: radial-gradient(circle at 35% 30%, #fff, #bbb); }
.pl-pl { padding: 3px 8px; border-radius: 999px; background: rgba(8,12,28,.7); border: 1px solid rgba(120,140,200,.25); } .pl-pl.on { border-color: #ffe21f; box-shadow: 0 0 10px rgba(255,226,31,.35); }
.pl-slider { border-color: #5a6288; background: #070b19; } .pl-tray { background: #060913; border-color: #4a5278; }
.pl-cloth { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; font-size: .85rem; } .pl-cb { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #555; cursor: pointer; } .pl-cb.on { border-color: #ffe21f; box-shadow: 0 0 8px #ffe21f; }

/* ===== Poker 3D ===== */
.pk3d { max-width: 960px; margin: 0 auto; width: 100%; } .pk-stage { position: relative; border-radius: 14px; overflow: hidden; background: #1d0508; box-shadow: 0 8px 30px rgba(0,0,0,.55); line-height: 0; } #pkCv { display: block; width: 100%; }
.pk-x { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: rgba(0,0,0,.55); color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1; }
.pk-ctl { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; transition: opacity .2s; } .pk-ctl.off .pk-btns, .pk-ctl.off .pk-raise, .pk-ctl.off .pk-pre { opacity: .45; } .pk-info { font-size: .78rem; color: var(--muted); text-align: center; }
.pk-btns { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; } .pk-btn { height: 52px; border-radius: 12px; border: 2px solid rgba(255,255,255,.35); background: linear-gradient(#e0303d 0%, #b01220 45%, #6a0812 100%); color: #fff; font-weight: 900; letter-spacing: .04em; font-size: .95rem; cursor: pointer; text-shadow: 0 2px 3px rgba(0,0,0,.6); box-shadow: 0 4px 0 #3e0409, 0 8px 16px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.35); } .pk-btn.big { font-size: 1.1rem; } .pk-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #3e0409; } .pk-btn:disabled { filter: grayscale(.6); cursor: default; }
.pk-btn.gold { background: linear-gradient(#ffd96a, #d89a1a 55%, #8a5a08); color: #2a1a00; text-shadow: none; box-shadow: 0 4px 0 #5e3d05, 0 8px 16px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); }
.pk-raise { display: flex; align-items: center; gap: 8px; } .pk-raise input[type=range] { flex: 1; accent-color: #d8222f; height: 28px; } .pk-sq { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(255,255,255,.35); background: linear-gradient(#2a2d3d, #12141f); color: #fff; font-size: 1.3rem; font-weight: 900; cursor: pointer; } .pk-amt { min-width: 74px; text-align: right; font-weight: 900; color: #ffe9a0; }
.pk-pre { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .pk-pre button { height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: #1a1d2c; color: #fff; font-weight: 800; font-size: .76rem; cursor: pointer; } .pk-pre button:last-child { background: linear-gradient(#e0303d, #8a0e1a); }
.pk-end { gap: 8px; } .pk-end .pk-btn { flex: 1; } @media (max-width: 520px) { .pk-btn { height: 48px; font-size: .84rem; } }

@media (orientation: landscape) and (max-height: 520px) {
  .pk3d.land .pk-stage { margin: 0 auto; width: 100%; background: transparent; box-shadow: none; } .pk3d.land #pkCv { margin: 0 auto; border-radius: 12px; } .pk3d.land .pk-ctl { position: fixed; right: 8px; bottom: 8px; width: min(44vw, 330px); z-index: 60; margin: 0; background: rgba(14,2,6,.88); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 8px; gap: 6px; }
  .pk3d.land .pk-info, .pk3d.land .pk-pre { display: none; } .pk3d.land .pk-btn { height: 38px; font-size: .74rem; } .pk3d.land .pk-sq { width: 34px; height: 34px; } .pk3d.land .pk-end { flex-direction: column; }
}

/* ===== Slot Pendaki Gunung ===== */
.sl-root { position: fixed; inset: 0; z-index: 9500; display: flex; flex-direction: column; background: radial-gradient(900px 600px at 50% 30%, #2a2f5e, #0b0e22 75%); color: #fff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sl-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding-top: max(2px, env(safe-area-inset-top)); } #slCv { display: block; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.sl-ctl { flex: none; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); background: linear-gradient(#1a1f3a, #0c0f22); border-top: 2px solid #6b5522; box-shadow: 0 -6px 18px rgba(0,0,0,.5); }
.sl-free { text-align: center; font-weight: 900; color: #1a1000; background: linear-gradient(#ffe27a, #e8a21a); border-radius: 10px; padding: 3px 8px; margin: 0 auto 5px; max-width: 520px; font-size: .86rem; box-shadow: 0 2px 0 #7a4c05, 0 0 14px rgba(255,200,60,.6); } .sl-info { text-align: center; min-height: 1.2em; font-size: .78rem; color: #ffe27a; font-weight: 700; }
.sl-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 640px; margin: 2px auto 6px; } .sl-box { background: linear-gradient(#050810, #151b33); border: 2px solid #5a4a1e; border-radius: 10px; padding: 3px 8px; text-align: center; box-shadow: inset 0 2px 6px rgba(0,0,0,.8); } .sl-box small { display: block; font-size: .6rem; color: #b6a46a; letter-spacing: .08em; } .sl-box b { font: 900 1.1rem/1.2 "Courier New", monospace; color: #7dffa0; text-shadow: 0 0 8px rgba(80,255,140,.7); } .sl-box.win b { color: #ffd54a; text-shadow: 0 0 10px rgba(255,200,60,.8); }
.sl-btns { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; max-width: 760px; margin: 0 auto; }
.sl-b { min-width: 48px; height: 46px; padding: 0 8px; border-radius: 12px; border: 2px solid #8a7030; background: linear-gradient(#4a4f6e, #1f2340 55%, #12152a); color: #ffe9a0; font: 800 .66rem/1.05 sans-serif; cursor: pointer; box-shadow: 0 3px 0 #0a0c18, inset 0 2px 0 rgba(255,255,255,.28); text-shadow: 0 1px 2px #000; } .sl-b:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #0a0c18; } .sl-b:disabled { opacity: .45; } .sl-b.on { background: linear-gradient(#ffd54a, #c78a0e); color: #2a1a00; text-shadow: none; } .sl-b.exit { border-color: #a04040; color: #ffb0b0; }
.sl-step { text-align: center; } .sl-step small { display: block; font-size: .55rem; color: #b6a46a; letter-spacing: .06em; } .sl-step div { display: flex; align-items: center; gap: 4px; } .sl-step button { width: 34px; height: 36px; border-radius: 10px; border: 2px solid #8a7030; background: linear-gradient(#4a4f6e, #1f2340); color: #ffe9a0; font-size: 1.2rem; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 #0a0c18; } .sl-step button:disabled { opacity: .4; } .sl-step b { min-width: 46px; font: 900 .98rem monospace; color: #fff; }
.sl-spin { width: 88px; height: 88px; border-radius: 50%; border: 4px solid #ffe27a; background: radial-gradient(circle at 35% 28%, #9dffb0, #1fb24a 48%, #0b5a22); color: #fff; font: 900 1.25rem/1 "Trebuchet MS", sans-serif; text-shadow: 0 2px 3px rgba(0,0,0,.7); cursor: pointer; box-shadow: 0 6px 0 #064018, 0 10px 18px rgba(0,0,0,.55), inset 0 4px 8px rgba(255,255,255,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; } .sl-spin small { font-size: .62rem; } .sl-spin:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #064018; } .sl-spin:disabled { filter: grayscale(.7) brightness(.7); } .sl-spin.stop { background: radial-gradient(circle at 35% 28%, #ffb0b0, #d82a2a 48%, #6a0c0c); box-shadow: 0 6px 0 #4a0808, 0 10px 18px rgba(0,0,0,.55), inset 0 4px 8px rgba(255,255,255,.4); }
.sl-autow { position: relative; } .sl-menu { display: none; position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); background: #151a33; border: 2px solid #8a7030; border-radius: 12px; padding: 6px; gap: 4px; z-index: 5; } .sl-menu.show { display: flex; } .sl-menu button { min-width: 42px; height: 38px; border-radius: 9px; border: 1px solid #8a7030; background: #262b4d; color: #ffe9a0; font-weight: 800; cursor: pointer; }
.sl-over { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.72); padding: 10px; } .sl-pbox { background: linear-gradient(#232949, #12162b); border: 2px solid #8a7030; border-radius: 16px; padding: 14px 16px; width: min(480px, 96%); max-height: 94%; overflow-y: auto; text-align: left; } .sl-pbox h3 { margin: 0 0 6px; color: #ffe27a; text-align: center; }
.sl-prow { display: grid; grid-template-columns: 44px 1fr repeat(3, auto); gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid #2a3150; font-size: .8rem; } .sl-prow i { font-style: normal; color: #7dffa0; font-weight: 900; } .sl-pic canvas { width: 40px; height: 40px; display: block; } .sl-rules { font-size: .76rem; color: #cfd6f2; padding-left: 18px; line-height: 1.5; } .sl-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 4px; margin: 8px 0; } .sl-lines canvas { width: 100%; border-radius: 4px; border: 1px solid #2b3550; }
.sl-tier { padding: 8px 0; border-bottom: 1px solid var(--border); text-align: left; } .sl-buy { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .sl-buy .btn { width: auto; padding: 6px 12px; margin: 0; font-size: .8rem; }
@media (max-width: 560px) { .sl-spin { width: 76px; height: 76px; font-size: 1.05rem; } .sl-b { min-width: 42px; height: 42px; font-size: .6rem; } .sl-btns { gap: 5px; } .sl-box b { font-size: .95rem; } }
@media (orientation: landscape) and (max-height: 520px) { .sl-ctl { padding: 3px 6px 4px; } .sl-hud { margin: 0 auto 3px; } .sl-box { padding: 1px 6px; } .sl-box b { font-size: .85rem; } .sl-spin { width: 62px; height: 62px; font-size: .9rem; } .sl-b, .sl-step button { height: 34px; } .sl-info { min-height: 0; font-size: .68rem; } }

/* ===== Meja kasino 3D ===== */
.mj3, .bj3 { width: 100%; max-width: 960px; margin: 0 auto; } .mj3 canvas, .bj3 canvas { display: block; width: 100%; border-radius: 12px; box-shadow: 0 8px 26px rgba(0,0,0,.55); touch-action: manipulation; }

/* ===== Peta Kerajaan ===== */
.mp-body { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 8px; } #mpCv { flex: none; border-radius: 10px; border: 2px solid #8a7030; box-shadow: 0 4px 14px rgba(0,0,0,.5); cursor: pointer; }
.mp-list { flex: 1; min-width: 0; max-height: 50vh; overflow-y: auto; text-align: left; } .mp-row { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; } .mp-row.on { background: rgba(255,213,74,.14); border-color: #ffd54a; }
.mp-row i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 800 .7rem/18px sans-serif; text-align: center; font-style: normal; } .mp-t { flex: 1; min-width: 0; } .mp-t b { display: block; font-size: .82rem; } .mp-t small { display: block; font-size: .68rem; color: var(--muted); line-height: 1.25; } .mp-dir { display: inline-block; margin-top: 2px; font-size: .68rem; color: #ffe9a0; font-weight: 700; }
.mp-row button { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #8a7030; background: #262b4d; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 520px) { .mp-body { flex-direction: column; align-items: center; } .mp-list { width: 100%; max-height: 38vh; } }

/* ===== Mahjong merah: contekan poin ===== */
.mc-row { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--border); } .mc-h { display: flex; justify-content: space-between; align-items: center; } .mc-h b { color: #ff9aa6; } .mc-h span { background: #c42a3c; color: #fff; border-radius: 9px; padding: 1px 9px; font-weight: 800; font-size: .8rem; } .mc-row p { margin: 3px 0 5px; font-size: .78rem; color: var(--muted); } .mc-tiles { display: flex; flex-wrap: wrap; gap: 2px; } .mc-tiles canvas { border-radius: 3px; }

/* Bursa: jendela modal (tukar koin, dll.) harus tampil DI ATAS terminal layar penuh */
body.bx-open .modal-bg { z-index: 9600; }

/* Misi & Turnamen di dalam PlayTown */
.qb-body { max-height: 66vh; overflow-y: auto; text-align: left; margin: 4px 0 8px; }

/* ===== LOBI B.O.S Omniverse — infografik logam gelap ===== */
.bos { position: relative; max-width: 980px; margin: 0 auto; padding: 14px 10px 24px; color: #e7ecf4; font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #3a424f 0%, #272d37 55%, #1c2129 100%); }
.bos::before { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' seed='4'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .1  0 0 0 0 .12  0 0 0 .9 -.25'/></filter><rect width='260' height='260' filter='url(%23n)'/></svg>"); }
.bos > * { position: relative; }
.bos-head { display: flex; justify-content: center; margin: 2px 0 6px; }
.bos-shield { min-width: 240px; max-width: 86%; padding: 12px 34px 22px; text-align: center; background: linear-gradient(180deg, #1b2029, #0f1319); border: 2px solid #e8edf6; clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%); filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.bos-shield b { display: block; font-weight: 900; letter-spacing: .06em; color: #fff; text-shadow: 0 0 10px rgba(80,170,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bos-shield small { display: block; font-size: .52rem; letter-spacing: .26em; color: #9fb0c8; margin-top: 2px; }
.bos-wave { height: 22px; margin: 4px -10px 0; background: #11151b; -webkit-mask: radial-gradient(circle at 12px 0, transparent 11px, #000 12px) 0 0 / 24px 100% repeat-x; mask: radial-gradient(circle at 12px 0, transparent 11px, #000 12px) 0 0 / 24px 100% repeat-x; }
.bos-wave.inv { margin: 0 -10px 10px; transform: scaleY(-1); }
.bos-map { position: relative; margin: 0 auto; width: 100%; max-width: 640px; aspect-ratio: 768 / 770; overflow: hidden; background: #11151b; border: 2px solid #4a5365; border-radius: 12px; box-shadow: 0 8px 18px rgba(0,0,0,.5); }
.bos-map img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.85) brightness(.84); user-select: none; -webkit-user-drag: none; }
.bos-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 100% at 50% 50%, rgba(0,0,0,0) 55%, rgba(5,8,14,.55) 100%); }
.bos-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.bos-pin { position: absolute; z-index: 2; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid #1a1f27; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 45%, #10151d); box-shadow: 0 2px 4px rgba(0,0,0,.7); pointer-events: none; }
.bos-pin.me::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--c); opacity: .8; animation: bosPing 1.8s ease-out infinite; } @keyframes bosPing { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.bos-call { position: absolute; z-index: 3; transform: translate(-50%, -100%); min-width: 76px; padding: 5px 10px 7px; border: 0; border-radius: 9px; color: #fff; text-align: center; cursor: pointer; line-height: 1.05; box-shadow: 0 5px 10px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.55); transition: transform .15s; font-family: inherit; }
.bos-call::before { content: ""; position: absolute; inset: 2px 2px 52% 2px; border-radius: 7px 7px 20px 20px / 7px 7px 10px 10px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.05)); pointer-events: none; }
.bos-call small, .bos-call b { white-space: nowrap; } .bos-call small { display: block; font-size: .5rem; letter-spacing: .12em; font-weight: 800; opacity: .92; position: relative; } .bos-call b { display: block; font-size: .92rem; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.5); position: relative; }
.bos-call.big { min-width: 104px; padding: 7px 12px 9px; } .bos-call.big b { font-size: 1.1rem; } .bos-call:hover, .bos-call:focus-visible { transform: translate(-50%, -106%) scale(1.06); outline: none; }
.bos-call.orange { background: linear-gradient(180deg, #ffb347, #e8620c); } .bos-call.blue { background: linear-gradient(180deg, #5aa6ff, #1b52d6); } .bos-call.green { background: linear-gradient(180deg, #53e08a, #12904a); } .bos-call.purple { background: linear-gradient(180deg, #c58bff, #7a2bd0); }
.bos-call.pink { background: linear-gradient(180deg, #ff86c8, #cc2a86); } .bos-call.red { background: linear-gradient(180deg, #ff7a7a, #c42424); } .bos-call.teal { background: linear-gradient(180deg, #4de8dc, #0e8f86); } .bos-call.gold { background: linear-gradient(180deg, #ffe066, #d49a00); color: #2a1c00; text-shadow: none; } .bos-call.gold b { text-shadow: none; }
.bos-cta { display: block; width: 100%; margin: 6px 0 12px; padding: 12px 10px; border: 0; border-radius: 14px; cursor: pointer; color: #fff; font-family: inherit; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffb347, #e8620c); box-shadow: 0 6px 0 #8f3a06, 0 10px 18px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6); transition: transform .12s; }
.bos-cta::before { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0)); } .bos-cta:active { transform: translateY(4px); box-shadow: 0 2px 0 #8f3a06; }
.bos-cta span { position: relative; display: block; font-size: 1.3rem; font-weight: 900; letter-spacing: .08em; text-shadow: 0 2px 3px rgba(0,0,0,.45); } .bos-cta small { position: relative; display: block; font-size: .66rem; opacity: .95; margin-top: 2px; }
.bos-box { background: linear-gradient(180deg, rgba(14,18,25,.85), rgba(14,18,25,.6)); border: 1px solid #3d4658; border-radius: 12px; padding: 12px; }
.bos-box h4 { margin: 0 0 6px; font-size: .64rem; letter-spacing: .16em; color: #fff; display: inline-block; padding: 3px 10px; background: #0d1117; border: 1px solid #4a5365; border-radius: 3px; }
.bos-waters { display: flex; justify-content: space-around; gap: 4px; max-width: 520px; margin: 0 auto; } .bos-water { flex: 1; max-width: 130px; text-align: center; } .bos-water svg { width: 100%; height: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); } .bos-wlab { font-size: .55rem; letter-spacing: .1em; font-weight: 800; color: #cfd8e8; margin-top: -4px; }
.bos-water .wv { animation: bosWave 3.2s linear infinite; } .bos-water .wv2 { animation: bosWave 4.6s linear infinite reverse; } @keyframes bosWave { to { transform: translateX(-60px); } }
.bos-pins { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.bos-pb { border: 0; background: none; color: #dfe7f5; font-family: inherit; cursor: pointer; text-align: center; width: 66px; } .bos-pb i { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 3px; border-radius: 50%; font-style: normal; font-size: 1.25rem; border: 2px solid #5b667c; box-shadow: 0 4px 6px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.55); }
.bos-pb span { font-size: .58rem; font-weight: 800; letter-spacing: .06em; } .bos-pb:hover i { transform: translateY(-2px); }
.bos-pb.orange i { background: radial-gradient(circle at 35% 28%, #ffe0a0, #ff9a2a 55%, #8f3a06); } .bos-pb.blue i { background: radial-gradient(circle at 35% 28%, #bfe0ff, #3a8bff 55%, #0b2c8f); } .bos-pb.green i { background: radial-gradient(circle at 35% 28%, #c5ffd9, #37d27a 55%, #07502a); } .bos-pb.purple i { background: radial-gradient(circle at 35% 28%, #e6ccff, #b266ff 55%, #3d0f78); } .bos-pb.pink i { background: radial-gradient(circle at 35% 28%, #ffd0ea, #ff5fb2 55%, #7a0c4a); }
@media (max-width: 640px) { .bos-shield { min-width: 190px; padding: 10px 22px 18px; } .bos-call { min-width: 58px; padding: 3px 6px 5px; } .bos-call b { font-size: .7rem; } .bos-call small { font-size: .42rem; } .bos-call.big { min-width: 78px; } .bos-call.big b { font-size: .86rem; } .bos-cta span { font-size: 1.05rem; } }

/* ===== Ular Arena ===== */
.sio-wrap { position: relative; width: 100%; max-width: 980px; margin: 0 auto; height: calc(100vh - 150px); min-height: 340px; max-height: 760px; border-radius: 14px; overflow: hidden; background: #0f3aa8; touch-action: none; user-select: none; }
.sio-wrap canvas#sioCv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sio-hud { position: absolute; z-index: 3; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); font-size: .8rem; pointer-events: none; } .sio-hud.tl { left: 12px; top: 10px; } .sio-hud.tl b { font-size: 1.5rem; } .sio-hud small { opacity: .9; }
.sio-hud.tr { right: 10px; top: 10px; min-width: 130px; background: rgba(8,12,40,.45); border-radius: 10px; padding: 6px 9px; } .sio-hud.tr div { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; } .sio-hud.tr div.me { color: #fde047; font-weight: 800; } .sio-hud.tr i { font-style: normal; opacity: .85; }
.sio-mini { position: absolute; left: 10px; bottom: 10px; z-index: 3; width: 78px; height: 78px; opacity: .92; pointer-events: none; }
.sio-boost { position: absolute; right: 14px; bottom: 14px; z-index: 4; width: 74px; height: 74px; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); font-size: 2rem; color: #fff; background: radial-gradient(circle at 35% 28%, #ffe48a, #f59e0b 55%, #92400e); box-shadow: 0 5px 12px rgba(0,0,0,.45); touch-action: none; }
.sio-boost:active { transform: scale(.93); }
.sio-ov { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; background: rgba(6,12,50,.55); padding: 10px; overflow: auto; }
.sio-card { width: 100%; max-width: 360px; background: rgba(15,23,42,.94); border: 1px solid #2d3b6b; border-radius: 16px; padding: 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); } .sio-card h2 { margin: 0 0 6px; font-size: 1.3rem; } .sio-sub { margin: 0 0 8px; color: #b6c4e6; font-size: .8rem; }
.sio-prev { width: 100%; max-width: 300px; height: auto; border-radius: 12px; margin: 6px auto 10px; display: block; background: #1e5bd8; }
.sio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; } .sio-stats div { background: #0b1226; border-radius: 10px; padding: 6px 2px; } .sio-stats b { display: block; font-size: 1.05rem; color: #fde047; } .sio-stats span { font-size: .6rem; color: #9fb0d4; }
.sio-rw { margin: 6px 0; color: #fbbf24; font-weight: 800; }
.sio-opt { text-align: left; margin: 8px 0; } .sio-opt b { font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; } .sio-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.sio-sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #1e293b; cursor: pointer; } .sio-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.sio-chip { padding: 6px 11px; border-radius: 16px; border: 1px solid var(--border); background: var(--card2, #1e293b); color: var(--text, #e2e8f0); font-size: .78rem; cursor: pointer; } .sio-chip.on { background: var(--accent); color: #052e16; border-color: var(--accent); font-weight: 800; }
