
  :root {
    --bg-dark: #0b1120;
    --bg-panel: #131c31;
    --bg-card: #1b2742;
    --border: #2a3a5e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --gold: #facc15;
    --gold-dark: #ca8a04;
    --red: #dc2626;
    --red-dark: #991b1b;
    --blue: #0284c7;
    --blue-dark: #0369a1;
    --green: #16a34a;
    --purple: #9333ea;
    --radius: 14px;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }

  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at top, #172544 0%, var(--bg-dark) 65%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
  }

  button, input, select { font-family: inherit; }
  .hidden { display: none !important; }

  /* ---------- TOP BAR ---------- */
  .topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px;
    background: rgba(11, 17, 32, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .brand { display: flex; align-items: center; gap: 10px; }
  .brand-logo {
    background: #dc2626; color: var(--gold); border: 2px solid var(--gold);
    font-weight: 900; font-size: 11px; line-height: 1; padding: 5px 7px;
    border-radius: 6px; letter-spacing: 0.5px; text-align: center;
    box-shadow: 0 2px 10px rgba(250, 204, 21, 0.25);
  }
  .brand-title { font-weight: 900; font-size: 16px; color: var(--gold); letter-spacing: 0.5px; }
  .brand-sub { font-size: 11px; color: var(--text-muted); }

  .topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 12px; font-weight: 700; color: var(--text-main);
  }
  .pill-gold { background: rgba(250, 204, 21, 0.14); border-color: rgba(250, 204, 21, 0.5); color: var(--gold); cursor: pointer; }
  .pill-alert { background: rgba(220, 38, 38, 0.2); border-color: #ef4444; color: #fca5a5; animation: pulseBorder 1.5s infinite; }

  .icon-btn {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-main);
    border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: transform .12s, background .15s;
  }
  .icon-btn:hover { background: #26365a; }
  .icon-btn:active { transform: scale(0.95); }

  /* ---------- BUTTONS ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: 12px; padding: 11px 16px;
    font-weight: 800; font-size: 14px; cursor: pointer;
    transition: transform .12s, filter .15s, box-shadow .15s;
    color: #0b1120;
  }
  .btn:hover:not(:disabled) { filter: brightness(1.08); }
  .btn:active:not(:disabled) { transform: scale(0.97); }
  .btn:disabled { opacity: 0.45; cursor: not-allowed; }
  .btn-gold { background: linear-gradient(135deg, #facc15, #f59e0b); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35); }
  .btn-green { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35); }
  .btn-red { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
  .btn-blue { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; }
  .btn-ghost { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border); }
  .btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
  .btn-block { width: 100%; }

  /* ---------- LOBBY SCREEN ---------- */
  .lobby-wrap {
    max-width: 960px; margin: 20px auto; padding: 0 14px 40px;
  }
  .hero-banner {
    background: linear-gradient(135deg, #14532d 0%, #1e293b 55%, #7f1d1d 100%);
    border: 2px solid rgba(250, 204, 21, 0.5);
    border-radius: 20px; padding: 24px 20px; text-align: center;
    margin-bottom: 20px; box-shadow: var(--shadow);
  }
  .hero-banner h1 { margin: 0 0 6px; font-size: clamp(24px, 5vw, 38px); color: var(--gold); letter-spacing: 1px; }
  .hero-banner p { margin: 0; font-size: 14px; color: #e2e8f0; opacity: 0.92; }

  .lobby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
  .panel {
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  }
  .panel h2, .panel h3 { margin: 0 0 12px; color: var(--gold); font-size: 17px; display: flex; align-items: center; gap: 8px; }

  .field { margin-bottom: 12px; }
  .field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
  .input {
    width: 100%; padding: 10px 12px; border-radius: 10px;
    background: #0b1222; border: 1px solid var(--border); color: var(--text-main);
    font-size: 14px; outline: none;
  }
  .input:focus { border-color: var(--gold); }
  .row-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }

  .avatar-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .avatar-opt {
    background: #0b1222; border: 2px solid var(--border); border-radius: 10px;
    padding: 6px 4px; text-align: center; cursor: pointer; transition: .15s;
  }
  .avatar-opt.active { border-color: var(--gold); background: rgba(250, 204, 21, 0.14); transform: translateY(-2px); }
  .avatar-opt span { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .room-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
  .room-item {
    display: flex; align-items: center; justify-content: space-between;
    background: #0b1222; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  }

  /* ---------- WAITING ROOM ---------- */
  .waiting-card { max-width: 680px; margin: 20px auto; }
  .room-code-big {
    font-size: 36px; font-weight: 900; letter-spacing: 6px; color: var(--gold);
    background: #0b1222; border: 2px dashed var(--gold); border-radius: 14px;
    padding: 12px 20px; text-align: center; margin: 10px 0; cursor: pointer;
  }
  .lobby-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 16px 0; }
  .lobby-p-card {
    display: flex; align-items: center; gap: 10px;
    background: #0b1222; border: 1px solid var(--border); border-radius: 12px; padding: 10px;
  }

  /* ---------- MAIN GAME LAYOUT (3 KOLOM DESKTOP, RESPONSIF HP) ---------- */
  .game-shell {
    display: grid;
    grid-template-columns: 295px minmax(0, 1fr) 330px;
    gap: 12px;
    max-width: 1680px;
    margin: 0 auto;
    padding: 10px 12px 24px;
    align-items: start;
  }
  .col-left, .col-right {
    display: flex; flex-direction: column; gap: 10px;
  }
  .side-card {
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
  }
  .side-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(42, 58, 94, 0.7);
  }
  .side-card-title { font-size: 13px; font-weight: 900; color: var(--gold); letter-spacing: 0.3px; }
  .scroll-box { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; }

  /* ASET & KEPEMILIKAN TANAH */
  .asset-owner-group {
    background: #0b1222; border: 1px solid var(--border); border-radius: 10px; padding: 8px 9px;
  }
  .asset-owner-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; font-weight: 800; margin-bottom: 6px;
  }
  .asset-chips { display: flex; flex-wrap: wrap; gap: 4px; }
  .asset-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 7px;
    color: #fff; cursor: pointer; border: 1px solid rgba(255,255,255,0.25);
    transition: transform .1s, filter .15s;
  }
  .asset-chip:hover { filter: brightness(1.15); transform: translateY(-1px); }

  /* LIVE CHAT & VOICE NOTE */
  .chat-live-box {
    background: #0b1222; border: 1px solid var(--border); border-radius: 12px;
    padding: 8px; height: 225px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 1.38;
  }
  .chat-msg { padding: 6px 9px; border-radius: 10px; background: #15213a; border-left: 3px solid #334155; }
  .chat-msg.turn-vn { background: rgba(250, 204, 21, 0.12); border-left-color: var(--gold); }
  .vn-audio { width: 100%; height: 32px; margin-top: 5px; border-radius: 8px; }
  .vn-rec-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 7px 10px; border-radius: 10px; margin-top: 6px;
    background: rgba(220, 38, 38, 0.22); border: 1px solid #ef4444; color: #fecaca;
    font-size: 12px; font-weight: 800;
  }
  .rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; display: inline-block; animation: pulseBorder 1s infinite; }

  /* AUTH / ACCOUNT SCREEN */
  .auth-wrap { max-width: 460px; margin: 22px auto; padding: 0 14px 40px; }
  .auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; background: #0b1222; padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
  .resume-banner {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.22), rgba(2, 132, 199, 0.22));
    border: 2px solid #22c55e; border-radius: 14px; padding: 14px 16px;
    margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  }

  /* BOARD AREA */
  .board-panel {
    background: radial-gradient(circle at 50% 35%, #233329 0%, #0f172a 85%);
    border: 2px solid #365341;
    border-radius: 20px;
    padding: 12px;
    position: relative;
    box-shadow: var(--shadow), inset 0 0 40px rgba(0, 0, 0, 0.55);
  }
  .board-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-bottom: 8px; flex-wrap: wrap;
  }
  .global-badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .g-badge {
    font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
    background: rgba(239, 68, 68, 0.22); border: 1px solid #ef4444; color: #fecaca;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
  }
  .g-badge-ok { background: rgba(34, 197, 94, 0.16); border-color: #22c55e; color: #bbf7d0; box-shadow: none; }

  .board-viewport {
    width: 100%;
    overflow: auto;
    border-radius: 16px;
    background: radial-gradient(circle at center, #1b3a2b 0%, #0d1f17 75%, #07120d 100%);
    border: 3px solid #3f624c;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.65);
    position: relative;
    touch-action: pan-x pan-y pinch-zoom;
  }
  #board-svg-wrap {
    width: 100%;
    min-width: 310px;
    transform-origin: top left;
    transition: transform 0.2s ease;
    display: flex; justify-content: center;
  }
  #pentagon-svg {
    width: 100%;
    height: auto;
    max-height: 79vh;
    display: block;
    user-select: none;
  }
  .svg-tile { cursor: pointer; transition: filter 0.15s; }
  .svg-tile:hover { filter: brightness(1.14) drop-shadow(0 0 6px rgba(250, 204, 21, 0.7)); }
  .pawn-group { transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .pawn-hopping { animation: pawnHop 0.26s ease-out; }
  .ufo-bob { animation: ufoFloat 2.8s ease-in-out infinite; }
  .turn-ring-pulse { animation: ringPulse 1.5s ease-out infinite; transform-origin: center; }
  .land-ripple { animation: rippleOut 0.85s ease-out forwards; }

  @keyframes pawnHop {
    0% { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45)); }
    50% { filter: drop-shadow(0 16px 8px rgba(0,0,0,0.75)); }
    100% { filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45)); }
  }
  @keyframes ufoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
  }
  @keyframes ringPulse {
    0% { opacity: 0.95; stroke-width: 4; }
    50% { opacity: 0.45; stroke-width: 6; }
    100% { opacity: 0.95; stroke-width: 4; }
  }
  @keyframes rippleOut {
    0% { r: 12; opacity: 0.95; stroke-width: 5; }
    100% { r: 44; opacity: 0; stroke-width: 1; }
  }

  /* SIDEBAR / CONTROLS */
  .sidebar {
    display: flex; flex-direction: column; gap: 12px;
  }
  .turn-box {
    background: linear-gradient(160deg, #1b2847 0%, #11192e 100%);
    border: 2px solid var(--border);
    border-radius: var(--radius); padding: 14px;
    box-shadow: var(--shadow);
  }
  .turn-box.my-turn { border-color: var(--gold); box-shadow: 0 0 24px rgba(250, 204, 21, 0.22); }
  .turn-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .turn-who { font-size: 16px; font-weight: 900; color: var(--gold); }
  .turn-phase { font-size: 11px; font-weight: 700; color: #38bdf8; text-transform: uppercase; letter-spacing: 0.5px; }

  /* 3D DICE STAGE */
  .dice-stage {
    display: flex; align-items: center; justify-content: center; gap: 18px;
    padding: 14px 10px; margin: 10px 0;
    background: radial-gradient(circle, #0d162a 0%, #070c17 100%);
    border-radius: 12px; border: 1px solid var(--border);
    perspective: 600px; min-height: 78px;
  }
  .die-cube {
    width: 48px; height: 48px; position: relative;
    transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.2, 0.9, 0.25, 1.05);
  }
  .die-cube.rolling { animation: diceSpin 0.55s linear infinite; }
  .die-face {
    position: absolute; width: 48px; height: 48px;
    background: linear-gradient(145deg, #ffffff, #e2e8f0);
    border: 2px solid #94a3b8; border-radius: 9px;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
    padding: 6px; gap: 2px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.15);
  }
  .die-face.f1 { transform: rotateY(0deg) translateZ(24px); }
  .die-face.f2 { transform: rotateY(90deg) translateZ(24px); }
  .die-face.f3 { transform: rotateX(90deg) translateZ(24px); }
  .die-face.f4 { transform: rotateX(-90deg) translateZ(24px); }
  .die-face.f5 { transform: rotateY(-90deg) translateZ(24px); }
  .die-face.f6 { transform: rotateY(180deg) translateZ(24px); }
  .pip { width: 8px; height: 8px; border-radius: 50%; background: #0f172a; margin: auto; }
  .pip.red { background: #dc2626; width: 10px; height: 10px; }

  @keyframes diceSpin {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(720deg) rotateY(540deg) rotateZ(360deg); }
  }

  .dice-total-badge {
    font-size: 13px; font-weight: 800; color: var(--gold);
    background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.4);
    padding: 5px 10px; border-radius: 10px;
  }

  /* ACTION BOX */
  .action-area { display: flex; flex-direction: column; gap: 8px; }
  .action-prompt {
    font-size: 13px; line-height: 1.45; color: #e2e8f0;
    background: rgba(15, 23, 42, 0.75); border-left: 3px solid var(--gold);
    padding: 9px 11px; border-radius: 8px;
  }

  /* TABS SIDEBAR */
  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #0b1222; padding: 4px; border-radius: 12px; border: 1px solid var(--border); }
  .tab-btn {
    border: none; background: transparent; color: var(--text-muted);
    padding: 8px 4px; border-radius: 9px; font-size: 12px; font-weight: 800; cursor: pointer;
  }
  .tab-btn.active { background: var(--bg-card); color: var(--gold); }

  /* PLAYERS LIST */
  .players-list { display: flex; flex-direction: column; gap: 8px; }
  .player-row {
    display: flex; align-items: center; gap: 10px;
    background: #0d1527; border: 1px solid var(--border); border-radius: 12px; padding: 9px 10px;
    position: relative;
  }
  .player-row.active-turn { border-color: var(--gold); background: rgba(250, 204, 21, 0.08); }
  .player-row.bankrupt { opacity: 0.45; filter: grayscale(1); }
  .p-info { flex: 1; min-width: 0; }
  .p-name { font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
  .p-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
  .p-money { text-align: right; font-weight: 900; font-size: 13px; color: #4ade80; font-variant-numeric: tabular-nums; }
  .p-props-cnt { font-size: 10px; color: #94a3b8; text-align: right; margin-top: 2px; }
  .tag { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #334155; color: #f8fafc; }
  .tag-lapas { background: #991b1b; color: #fecaca; }
  .tag-bekasi { background: #581c87; color: #e9d5ff; }
  .tag-muted { background: #9a3412; color: #fed7aa; }

  /* SAVED CARDS */
  .hand-cards { display: flex; flex-direction: column; gap: 8px; }
  .mini-card {
    background: linear-gradient(135deg, #0369a1, #0284c7);
    border: 1px solid #7dd3fc; border-radius: 12px; padding: 10px 12px;
    color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  }
  .mini-card h4 { margin: 0 0 3px; font-size: 13px; color: #fef08a; }
  .mini-card p { margin: 0; font-size: 11px; opacity: 0.92; line-height: 1.35; }

  /* LOG & CHAT */
  .feed-box {
    background: #0b1222; border: 1px solid var(--border); border-radius: 12px;
    padding: 10px; height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
    font-size: 12px; line-height: 1.4;
  }
  .log-item { padding: 5px 8px; border-radius: 8px; background: rgba(30, 41, 59, 0.55); border-left: 3px solid #475569; }
  .log-item.alert { border-left-color: #ef4444; background: rgba(153, 27, 27, 0.25); }
  .log-item.money { border-left-color: #22c55e; }
  .log-item.card { border-left-color: #38bdf8; }
  .log-item.win { border-left-color: var(--gold); background: rgba(250, 204, 21, 0.16); font-weight: 700; }
  .log-item.turn { border-left-color: var(--gold); }

  .chat-form { display: flex; gap: 6px; margin-top: 8px; }
  .chat-msg { padding: 6px 9px; border-radius: 10px; background: #16223a; }
  .chat-sender { font-weight: 800; font-size: 11px; margin-right: 6px; }

  /* ---------- REALISTIC CARD MODAL (3D FLIP) ---------- */
  .modal-backdrop {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(2, 6, 23, 0.8); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; padding: 14px;
    overflow-y: auto;
  }
  .modal-box {
    width: 100%; max-width: 440px;
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: 18px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    animation: modalPop 0.22s ease-out;
  }
  @keyframes modalPop {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
  }

  /* Kartu Fisik WNI Simulator (Dual-Face 3D Flip + Shimmer) */
  .wni-card-flip { perspective: 1200px; margin-bottom: 14px; }
  .wni-card-inner {
    position: relative;
    transform-style: preserve-3d;
    animation: cardDramaticFlip 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  @keyframes cardDramaticFlip {
    0%   { transform: translateY(70px) scale(0.55) rotateY(180deg) rotateZ(-8deg); opacity: 0.2; }
    42%  { transform: translateY(-10px) scale(1.03) rotateY(180deg) rotateZ(2deg); opacity: 1; }
    100% { transform: translateY(0px) scale(1) rotateY(0deg) rotateZ(0deg); opacity: 1; }
  }
  .wni-card-back {
    position: absolute; inset: 0; border-radius: 16px;
    backface-visibility: hidden; transform: rotateY(180deg);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-weight: 900; letter-spacing: 2px; color: #fde047;
    box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  }
  .wni-card-back.musibah { background: repeating-linear-gradient(45deg, #991b1b, #991b1b 12px, #b91c1c 12px, #b91c1c 24px); border: 3px solid #fde047; }
  .wni-card-back.takdir  { background: repeating-linear-gradient(45deg, #075985, #075985 12px, #0284c7 12px, #0284c7 24px); border: 3px solid #bae6fd; }
  .wni-card {
    border-radius: 16px; padding: 18px; color: #fff;
    position: relative; overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 18px 42px rgba(0,0,0,0.55);
  }
  .wni-card::after {
    content: ""; position: absolute; top: -50%; left: -120%; width: 70%; height: 200%;
    background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.38) 50%, transparent 80%);
    transform: skewX(-20deg);
    animation: foilSweep 1.2s ease-out 0.65s forwards;
    pointer-events: none;
  }
  @keyframes foilSweep {
    0% { left: -120%; }
    100% { left: 160%; }
  }
  .wni-card.musibah {
    background: linear-gradient(145deg, #dc2626, #991b1b);
    border: 2.5px solid #fde047;
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.55), 0 16px 36px rgba(0,0,0,0.55);
  }
  .wni-card.takdir {
    background: linear-gradient(145deg, #0ea5e9, #0369a1);
    border: 2.5px solid #bae6fd;
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.5), 0 16px 36px rgba(0,0,0,0.55);
  }
  .wni-card.keepable-glow {
    background: linear-gradient(145deg, #0284c7 0%, #4f46e5 55%, #0369a1 100%);
    border: 2.5px solid #fde047;
    box-shadow: 0 0 38px rgba(250, 204, 21, 0.55), 0 16px 36px rgba(0,0,0,0.55);
  }

  /* FX OVERLAY LAYER (Splash Banner, Confetti, Jail Bars, Floating Money, Screen Shake) */
  .fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
  .event-splash {
    position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
    padding: 13px 24px; border-radius: 16px;
    font-weight: 900; font-size: clamp(14px, 3.2vw, 19px); letter-spacing: 0.4px;
    text-align: center; max-width: 92vw;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    animation: splashInOut 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .event-splash.gold   { background: linear-gradient(135deg, #facc15, #f59e0b); color: #0f172a; border: 2px solid #fef9c3; }
  .event-splash.danger { background: linear-gradient(135deg, #dc2626, #7f1d1d); color: #fef08a; border: 2px solid #fca5a5; }
  .event-splash.info   { background: linear-gradient(135deg, #0284c7, #1e3a8a); color: #fff; border: 2px solid #7dd3fc; }
  @keyframes splashInOut {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-28px) scale(0.8); }
    14%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.04); }
    22%  { transform: translateX(-50%) translateY(0) scale(1); }
    82%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(0.95); }
  }

  .money-float {
    position: fixed; right: 24px; top: 135px;
    font-weight: 900; font-size: 20px; text-shadow: 0 3px 10px rgba(0,0,0,0.85);
    animation: floatUpFade 2.1s ease-out forwards;
  }
  .money-float.plus  { color: #4ade80; }
  .money-float.minus { color: #f87171; }
  @keyframes floatUpFade {
    0%   { opacity: 0; transform: translateY(16px) scale(0.85); }
    18%  { opacity: 1; transform: translateY(0) scale(1.1); }
    100% { opacity: 0; transform: translateY(-68px) scale(1); }
  }

  .confetti-piece {
    position: fixed; top: -16px; width: 10px; height: 14px; border-radius: 2px;
    animation: confettiFall var(--dur, 2.2s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }
  @keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateY(105vh) translateX(var(--drift, 40px)) rotate(720deg); opacity: 0; }
  }

  .jail-overlay {
    position: fixed; inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 58px, rgba(15,23,42,0.88) 58px 72px);
    box-shadow: inset 0 0 120px rgba(220, 38, 38, 0.55);
    animation: jailSlam 1.6s ease-out forwards;
  }
  @keyframes jailSlam {
    0%   { transform: translateY(-100%); opacity: 0.9; }
    20%  { transform: translateY(0%); opacity: 0.95; }
    72%  { transform: translateY(0%); opacity: 0.85; }
    100% { transform: translateY(-100%); opacity: 0; }
  }

  .shake-hit { animation: screenShake 0.42s ease-in-out; }
  @keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(-6px, 3px); }
    40% { transform: translate(6px, -4px); }
    60% { transform: translate(-4px, -2px); }
    80% { transform: translate(4px, 3px); }
  }

  /* LIVE LOG POP-UP CARDS (Denda, Sewa, Lapor Bersuara, Penjara, Beli, Bangkrut) */
  .event-pop-stack {
    position: fixed; top: 68px; right: 14px; z-index: 96;
    display: flex; flex-direction: column; gap: 8px;
    width: min(350px, 90vw); pointer-events: none;
  }
  .event-pop-card {
    pointer-events: auto; cursor: pointer;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 13px; border-radius: 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid var(--gold); color: #f8fafc;
    box-shadow: 0 14px 36px rgba(0,0,0,0.65);
    animation: popSlideIn 0.36s cubic-bezier(0.22, 1.28, 0.36, 1) forwards;
  }
  .event-pop-card.fade-out { animation: popSlideOut 0.32s ease-in forwards; }
  .event-pop-card.pop-danger { background: linear-gradient(135deg, rgba(127,29,29,0.96), rgba(30,10,18,0.96)); border-color: #ef4444; }
  .event-pop-card.pop-jail   { background: linear-gradient(135deg, rgba(153,27,27,0.98), rgba(15,23,42,0.98)); border-color: #facc15; box-shadow: 0 0 24px rgba(239,68,68,0.55); }
  .event-pop-card.pop-money  { background: linear-gradient(135deg, rgba(20,83,45,0.96), rgba(15,23,42,0.96)); border-color: #4ade80; }
  .event-pop-card.pop-build  { background: linear-gradient(135deg, rgba(30,58,138,0.96), rgba(15,23,42,0.96)); border-color: #38bdf8; }
  .event-pop-card.pop-card   { background: linear-gradient(135deg, rgba(88,28,135,0.96), rgba(15,23,42,0.96)); border-color: #c084fc; }
  .event-pop-icon { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
  .event-pop-title { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.6px; color: #fde047; margin-bottom: 2px; }
  .event-pop-body { font-size: 12.5px; font-weight: 700; line-height: 1.38; color: #f8fafc; }
  @keyframes popSlideIn {
    0%   { opacity: 0; transform: translateX(48px) scale(0.88); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
  }
  @keyframes popSlideOut {
    0%   { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(48px) scale(0.92); }
  }

  /* LIVE DICE STAGE DI ATAS KARTU (Musibah / Takdir / Pengadilan) */
  .card-dice-stage {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    padding: 12px 14px; margin-bottom: 12px;
    background: radial-gradient(circle, #172544 0%, #070d1c 100%);
    border: 2px solid rgba(250, 204, 21, 0.55); border-radius: 14px;
    perspective: 700px; min-height: 76px;
    box-shadow: inset 0 0 22px rgba(0,0,0,0.6), 0 6px 20px rgba(0,0,0,0.35);
  }
  .card-dice-result-pill {
    font-size: 13px; font-weight: 900; padding: 6px 12px; border-radius: 10px;
    background: rgba(250, 204, 21, 0.16); border: 1.5px solid #facc15; color: #fde047;
    animation: modalPop 0.25s ease-out;
  }
  .card-dice-result-pill.brutal { background: rgba(220,38,38,0.35); border-color: #f87171; color: #fecaca; }
  .card-dice-result-pill.lucky  { background: rgba(22,163,74,0.35); border-color: #4ade80; color: #bbf7d0; }
  .musibah-table tr.tier-hit {
    background: rgba(250, 204, 21, 0.34) !important;
    outline: 2.5px solid #fef08a;
    animation: tierPulse 0.7s ease-in-out infinite;
  }
  @keyframes tierPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
  }
  .wni-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
  .wni-card-title { font-size: 20px; font-weight: 900; letter-spacing: 0.4px; line-height: 1.15; margin: 0; }
  .wni-card-badge {
    font-size: 10px; font-weight: 900; padding: 4px 7px; border-radius: 6px;
    background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.4); white-space: nowrap;
  }
  .wni-card-sub { color: #fde047; font-weight: 800; font-size: 12px; margin-bottom: 10px; }
  .musibah-table { width: 100%; border-collapse: collapse; font-size: 12px; border: 1px solid rgba(253, 224, 71, 0.7); }
  .musibah-table td { padding: 7px 8px; border: 1px solid rgba(253, 224, 71, 0.55); vertical-align: top; line-height: 1.38; }
  .musibah-table td:first-child { width: 46px; font-weight: 900; color: #fde047; text-align: center; background: rgba(0,0,0,0.16); }
  .wni-card-quote {
    margin-top: 12px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.28);
    font-style: italic; font-size: 12px; text-align: center; opacity: 0.92;
  }

  /* Kartu Surat Tanah (Persis PDF Hal. 16-40) */
  .deed-card {
    background: #f8fafc; color: #0f172a; border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45); margin-bottom: 12px;
  }
  .deed-header { padding: 14px; text-align: center; color: #fff; }
  .deed-region { font-size: 11px; letter-spacing: 2px; font-weight: 800; opacity: 0.9; }
  .deed-city { font-size: 26px; font-weight: 900; margin-top: 2px; }
  .deed-body { padding: 14px; }
  .deed-price { text-align: center; font-size: 15px; font-weight: 800; margin-bottom: 10px; }
  .deed-row { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
  .deed-row.r0 { background: #e2e8f0; }
  .deed-row.r1 { background: #dcfce7; }
  .deed-row.r2 { background: #bbf7d0; }
  .deed-row.r3 { background: #fecdd3; }
  .deed-row.current { outline: 2px solid #0f172a; }
  .deed-build { display: flex; justify-content: space-around; margin-top: 10px; padding-top: 10px; border-top: 1px solid #cbd5e1; font-size: 12px; font-weight: 800; }

  /* Battery Screenshot Preview */
  .battery-preview {
    width: 100%; max-height: 260px; object-fit: contain;
    border-radius: 12px; border: 2px solid var(--gold); background: #000; margin: 10px 0;
  }

  /* Mute Bait Floating Button (T-07 Dibungkam) */
  .mute-bait {
    position: fixed; bottom: 80px; right: 16px; z-index: 60;
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff; border: 2px solid #fde047; border-radius: 999px;
    padding: 10px 16px; font-weight: 900; font-size: 13px; cursor: pointer;
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.55);
    animation: wiggle 1.4s infinite;
  }
  @keyframes wiggle {
    0%, 100% { transform: rotate(-2deg) scale(1); }
    50% { transform: rotate(2deg) scale(1.06); }
  }
  @keyframes pulseBorder {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  }

  /* TOAST */
  .toast {
    position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 100;
    background: #0f172a; border: 2px solid var(--gold); color: var(--gold);
    padding: 10px 18px; border-radius: 12px; font-weight: 800; font-size: 13px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6); max-width: 92vw; text-align: center;
  }

  /* ---------- MOBILE & TABLET RESPONSIVE ---------- */
  @media (max-width: 1180px) {
    .game-shell {
      grid-template-columns: 1fr;
      padding: 8px 8px 80px;
      gap: 10px;
    }
    .board-panel { order: 1; }
    .col-right   { order: 2; }
    .col-left    { order: 3; }
    .topbar { padding: 8px 10px; }
    .brand-sub { display: none; }
    #pentagon-svg { max-height: 54vh; }
    .feed-box, .chat-live-box { height: 185px; }
    .dice-stage { min-height: 68px; padding: 10px; }
  }


/* ---------- GAME HUB DASHBOARD (PILIHAN PERMAINAN) ---------- */
.hub-wrap { max-width: 1060px; margin: 20px auto; padding: 0 14px 48px; }
.hub-header-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, #14532d 0%, #1e293b 55%, #7f1d1d 100%);
  border: 2px solid rgba(250, 204, 21, 0.55); border-radius: 22px; padding: 22px 24px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.hub-user-box { display: flex; align-items: center; gap: 14px; }
.hub-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hub-stat-pill {
  background: rgba(11, 17, 32, 0.72); border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 12px; padding: 8px 14px; text-align: center;
}
.hub-stat-pill b { display: block; font-size: 18px; color: var(--gold); }
.hub-stat-pill span { font-size: 10.5px; color: #cbd5e1; font-weight: 700; }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.game-card {
  background: linear-gradient(165deg, #17233f 0%, #0f172a 100%);
  border: 2px solid var(--border); border-radius: 20px; padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  box-shadow: var(--shadow); transition: transform .18s ease, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.game-card.playable:hover {
  transform: translateY(-4px); border-color: var(--gold);
  box-shadow: 0 18px 44px rgba(250, 204, 21, 0.22);
}
.game-card.coming-soon { opacity: 0.62; filter: saturate(0.7); }
.game-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-icon-big { font-size: 38px; line-height: 1; }
.game-badge {
  font-size: 10px; font-weight: 900; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.6px;
}
.game-badge.live { background: rgba(34, 197, 94, 0.2); border: 1px solid #22c55e; color: #86efac; }
.game-badge.soon { background: rgba(148, 163, 184, 0.16); border: 1px solid #64748b; color: #cbd5e1; }
.game-card h3 { margin: 0; font-size: 19px; color: var(--gold); }
.game-card p { margin: 6px 0 0; font-size: 13px; color: #cbd5e1; line-height: 1.48; }
.game-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.game-tag { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: #0b1222; border: 1px solid var(--border); color: #94a3b8; }

/* ---------- LIVE MIC & AUTO-DENDA BUNGKAM BAR ---------- */
.mic-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 8px; border-radius: 12px;
  background: rgba(11, 18, 34, 0.85); border: 1.5px solid var(--border);
}
.mic-bar.mic-live { border-color: #22c55e; background: rgba(20, 83, 45, 0.25); }
.mic-bar.mic-locked-muted {
  border-color: #ef4444; background: rgba(153, 27, 27, 0.35);
  animation: pulseBorder 1.1s infinite;
}
.mic-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mic-meter-wrap {
  width: 115px; height: 10px; border-radius: 999px;
  background: #0f172a; border: 1px solid #334155; overflow: hidden; position: relative;
}
.mic-meter-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #facc15 62%, #ef4444 100%);
  transition: width 0.06s linear;
}
.mic-threshold-mark {
  position: absolute; top: 0; bottom: 0; left: 26%; width: 2px; background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}
.voice-peers-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vpeer-pill {
  font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: #0f172a; border: 1px solid #334155; color: #cbd5e1;
  display: inline-flex; align-items: center; gap: 4px;
}
.vpeer-pill.speaking { border-color: #4ade80; color: #bbf7d0; box-shadow: 0 0 10px rgba(74, 222, 128, 0.5); }
.vpeer-pill.mic-on { border-color: #38bdf8; }

/* ---------- POP-UP ANIMASI KREATIF (STEMPEL, SIRINE POLISI, MEGAFON SUARA) ---------- */
.event-pop-card { position: relative; overflow: hidden; }
.event-pop-stamp {
  position: absolute; right: 10px; bottom: 6px;
  font-size: 10px; font-weight: 900; letter-spacing: 1px;
  padding: 2px 6px; border-radius: 4px; border: 2px solid currentColor;
  transform: rotate(-12deg); opacity: 0;
  animation: stampSlam 0.42s cubic-bezier(0.22, 1.4, 0.36, 1) 0.14s forwards;
  pointer-events: none;
}
.event-pop-stamp.red  { color: #fca5a5; background: rgba(127, 29, 29, 0.45); }
.event-pop-stamp.gold { color: #fde047; background: rgba(113, 63, 18, 0.45); }
.event-pop-stamp.blue { color: #7dd3fc; background: rgba(12, 74, 110, 0.45); }
@keyframes stampSlam {
  0%   { opacity: 0; transform: scale(2.8) rotate(-25deg); }
  70%  { opacity: 0.95; transform: scale(0.92) rotate(-10deg); }
  100% { opacity: 0.88; transform: scale(1) rotate(-12deg); }
}

.siren-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 94;
  animation: sirenFlash 0.45s ease-in-out 4;
}
@keyframes sirenFlash {
  0%, 100% { box-shadow: inset 0 0 90px rgba(239, 68, 68, 0.65); }
  50%      { box-shadow: inset 0 0 90px rgba(37, 99, 235, 0.65); }
}

.voice-boom-banner {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 99; padding: 18px 28px; border-radius: 20px; text-align: center;
  background: linear-gradient(135deg, #dc2626, #7f1d1d);
  border: 3px solid #fde047; color: #fff;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.8), 0 20px 50px rgba(0, 0, 0, 0.75);
  animation: boomPop 2.4s cubic-bezier(0.22, 1.25, 0.36, 1) forwards;
}
@keyframes boomPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(-8deg); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); }
  25%  { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  82%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(0.9); }
}
