/* ==========================================
   STYLESHEET: KEHIDUPAN WNI MODERN — MEGA EDITION (52 PETAK)
   3D Isometric / Tilted 14x14 Perimeter Board (13 Petak x 4 Sisi)
   4 Corner Player Panels + Tilted 3D Board + 3D Twin Dice + Smart Bot AI
   ========================================== */

:root {
  --bg-tabletop-1: #2b1810;
  --bg-tabletop-2: #0b0f19;
  --bg-panel: rgba(23, 32, 51, 0.94);
  --bg-card: #1e293b;
  --bg-tile: #f8fafc;
  --bg-tile-corner: #fef3c7;
  --border-color: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --tile-text-dark: #0f172a;
  --tile-text-muted: #475569;
  --accent-primary: #3b82f6;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(251, 191, 36, 0.14) 0%, transparent 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 14px),
    radial-gradient(circle at 50% 50%, #432818 0%, #24140d 55%, #0e0a09 100%);
  color: var(--text-main);
  line-height: 1.32;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

.hidden {
  display: none !important;
}

.tabletop-stage {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1780px;
  margin: 0 auto;
  padding: 6px 12px;
  justify-content: space-between;
  position: relative;
}

/* ==========================================
   TOP FLOATING HUD BAR
   ========================================== */
.floating-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px 14px;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
  gap: 8px;
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-flag {
  font-size: 1.5rem;
}

.brand-chip h1 {
  font-size: 1rem;
  font-weight: 900;
  color: #fde68a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mega-badge {
  font-size: 0.62rem;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  padding: 1px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
}

.round-phase-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.round-pill {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1.5px solid #64748b;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #f8fafc;
}

.phase-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.76rem;
}

.phase-young {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1.5px solid rgba(16, 185, 129, 0.55);
}

.phase-old {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.6);
}

.phase-hot {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.3), rgba(245, 158, 11, 0.3));
  color: #fde047;
  border: 1.5px solid #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
}

.top-action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-glass {
  background: rgba(51, 65, 85, 0.78);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.btn-glass:hover {
  background: rgba(71, 85, 105, 0.95);
  transform: translateY(-1px);
}

.btn-danger-glass {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-danger-glass:hover {
  background: #ef4444;
  color: #fff;
}

/* ==========================================
   ARENA UTAMA: 4 SUDUT PEMAIN + PAPAN 52 PETAK DI TENGAH
   ========================================== */
.arena-viewport {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 6px 0 16px;
}

/* Layer 4 Panel Pemain di 4 Sudut Layar */
.corners-hud-layer {
  position: absolute;
  inset: 4px 0;
  pointer-events: none;
  z-index: 30;
}

.corner-player-panel {
  pointer-events: auto;
  position: absolute;
  width: clamp(220px, 18.5vw, 260px);
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(155deg, rgba(28, 39, 59, 0.96), rgba(15, 23, 42, 0.97));
  border: 2px solid #475569;
  border-top: 5px solid var(--player-color, #fbbf24);
  border-radius: 13px;
  padding: 7px 10px 8px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.corner-top-left { top: 2px; left: 2px; }
.corner-top-right { top: 2px; right: 2px; }
.corner-bottom-left { bottom: 2px; left: 2px; }
.corner-bottom-right { bottom: 2px; right: 2px; }

.active-corner-panel {
  border-color: var(--player-color, #fbbf24);
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.35),
    0 0 22px var(--player-color, #3b82f6),
    0 12px 26px rgba(0, 0, 0, 0.75);
  transform: scale(1.02);
}

.bankrupt-panel {
  border-color: #ef4444;
}

.corner-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 6px;
}

.corner-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.corner-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.corner-rank-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1.5px solid #0f172a;
  z-index: 2;
}

.rank-1 { background: linear-gradient(135deg, #fde047, #eab308); color: #0f172a; }
.rank-2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #0f172a; }
.rank-3 { background: linear-gradient(135deg, #fdba74, #d97706); color: #0f172a; }
.rank-4 { background: #334155; color: #cbd5e1; }

.corner-identity-info {
  flex: 1;
  min-width: 0;
}

.corner-name-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.corner-name-line h4 {
  font-size: 0.88rem;
  font-weight: 900;
  color: #fff;
}

.corner-turn-beacon {
  font-size: 0.54rem;
  font-weight: 900;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #0f172a;
  padding: 1px 4px;
  border-radius: 4px;
  animation: pulseBeacon 1.2s infinite alternate;
}

@keyframes pulseBeacon {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.corner-role-line {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.role-badge,
.role-chip {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
}

.role-pengangguran {
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.role-karyawan-kontrak,
.role-karyawan {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.role-karyawan-tetap {
  background: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.role-pejabat {
  background: rgba(245, 158, 11, 0.32);
  color: #fde68a;
}

.corner-pos-tag {
  font-size: 0.62rem;
  color: #38bdf8;
  font-weight: 700;
}

.corner-currency-cluster {
  display: flex;
  gap: 5px;
  align-items: center;
}

.corner-currency-cluster.single-currency-mode {
  flex-shrink: 0;
}

.corner-rupiah-single-box {
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(59, 130, 246, 0.6);
  border-radius: 8px;
  padding: 3px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 96px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.corner-cuan-box,
.corner-rupiah-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #334155;
  border-radius: 7px;
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 52px;
}

.corner-cuan-box {
  border-color: rgba(245, 158, 11, 0.45);
}

.corner-rupiah-box {
  border-color: rgba(59, 130, 246, 0.45);
}

.cuan-caption {
  font-size: 0.52rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1;
}

.rupiah-caption {
  font-size: 0.52rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.03em;
  line-height: 1;
}

.cuan-big-val {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
}

.rupiah-big-val {
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.15;
  color: #93c5fd;
  white-space: nowrap;
}

.corner-debt-alert {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.4));
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  margin: 3px 0;
  text-align: center;
}

.stat-positive { color: #34d399; }
.stat-negative { color: #f87171; }

.corner-bars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 5px;
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  padding: 4px 6px;
  border-radius: 7px;
}

.corner-bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #cbd5e1;
}

.bar-label-row small {
  font-size: 0.54rem;
  color: #64748b;
}

.mini-progress {
  height: 4px;
  background: #0f172a;
  border-radius: 999px;
  overflow: hidden;
}

.mini-bar {
  height: 100%;
  border-radius: 999px;
}

.bar-waras { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.bar-relasi { background: linear-gradient(90deg, #8b5cf6, #c084fc); }

.corner-jejak-pill {
  background: #0f172a;
  border: 1px solid #334155;
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.6rem;
  color: #94a3b8;
  white-space: nowrap;
}

.has-dirty-jejak {
  border-color: #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

.corner-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.flag-pill {
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.flag-score {
  background: rgba(15, 23, 42, 0.8);
  color: #fde047;
  border: 1px solid rgba(253, 224, 71, 0.35);
}

.flag-victory-ready {
  background: linear-gradient(90deg, #059669, #10b981);
  color: #fff;
}

.flag-burnout { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.flag-debt { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.flag-bankrupt { background: #991b1b; color: #fecaca; }
.flag-relasi { background: rgba(139, 92, 246, 0.25); color: #ddd6fe; }

/* ==========================================
   PANGGUNG PAPAN ISOMETRIK 28 PETAK PERSEGI 1:1 (8x8 GRID)
   ========================================== */
.isometric-scene-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1650px;
  perspective-origin: 50% 44%;
  z-index: 10;
  padding: 4px 8px 18px;
  transform: scale(var(--board-zoom, 1));
  transform-origin: center center;
  transition: transform 0.14s ease-out;
}

.iso-board-wrapper {
  width: min(820px, 80vh, calc(100vw - clamp(460px, 36vw, 540px)));
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: flat;
  transform-origin: center center;
  will-change: transform;
}

/* Proyeksi Isometrik Belah Ketupat (Diamond Board ala Let's Get Rich) */
.iso-board-wrapper.is-3d {
  transform: rotateX(36deg) rotateZ(45deg) scale(0.84);
}

.iso-board-wrapper.is-flat {
  transform: rotateX(0deg) rotateZ(0deg) scale(0.96);
}

.board-3d-slab {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #5c3a21, #3b2314);
  border: 5px solid #e5c158;
  border-radius: 16px;
  padding: 6px;
  box-shadow:
    inset 0 0 0 2px #78350f,
    0 12px 0 #5c3a21,
    0 20px 0 #3b2314,
    0 26px 0 #1e130b,
    0 40px 68px rgba(0, 0, 0, 0.9);
  position: relative;
}

.iso-board-wrapper.is-3d .board-3d-slab {
  box-shadow:
    inset 0 0 0 2px #78350f,
    10px 10px 0 #5c3a21,
    18px 18px 0 #3b2314,
    26px 26px 0 #1e130b,
    40px 40px 68px rgba(0, 0, 0, 0.9);
}

/* Counter-rotate isi petak & slot pion pada Mode Diamond 3D agar tetap tegak terbaca */
.iso-board-wrapper.is-3d .tile-main {
  transform: rotateZ(-45deg);
  transition: transform 0.35s ease;
}

.iso-board-wrapper.is-3d .tile-pawns-stage {
  transform: rotateZ(-45deg);
}

.iso-board-wrapper.is-3d .shortcut-mini-tag,
.iso-board-wrapper.is-3d .shortcut-exit-tag,
.iso-board-wrapper.is-3d .start-direction-arrow {
  transform: rotateZ(-45deg);
}

.start-direction-arrow {
  position: absolute;
  bottom: 2px;
  left: 3px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #b91c1c;
  background: rgba(254, 240, 138, 0.9);
  border: 1px solid #d97706;
  border-radius: 999px;
  padding: 0 3px;
  line-height: 1.1;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Grid 8x8 Persegi Simetris 1:1 untuk 28 Petak Perimeter (7 Petak per Sisi) */
.board-perimeter-28 {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: 1.24fr repeat(6, 1fr) 1.24fr;
  grid-template-rows: 1.24fr repeat(6, 1fr) 1.24fr;
  gap: 0;
  border: 3px solid #0f172a;
  border-radius: 12px;
  overflow: visible;
  background: #0f172a;
}

/* Grid 14x14 untuk 52 Petak Perimeter (Legacy Mega Edition) */
.board-perimeter-52 {
  display: grid;
  grid-template-columns: 1.25fr repeat(12, 1fr) 1.25fr;
  grid-template-rows: 1.22fr repeat(12, 46px) 1.22fr;
  gap: 0;
  border: 2.5px solid #0f172a;
  border-radius: 10px;
  overflow: visible;
  background: #0f172a;
}

.board-tiles-layer {
  display: contents;
}

/* ==========================================
   PETAK PAPAN 28 (SIMETRIS & MUDAH DIBACA)
   ========================================== */
.board-tile.tile-28,
.board-tile.tile-52 {
  background: linear-gradient(180deg, #fdfbf7 0%, #f1ede2 100%);
  color: var(--tile-text-dark);
  border: 1.5px solid #1e293b;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 12;
  pointer-events: auto !important;
  min-width: 0;
  min-height: 0;
  padding: 0;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.board-tile.tile-28:hover,
.board-tile.tile-52:hover {
  z-index: 20;
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #2563eb, 0 6px 14px rgba(0, 0, 0, 0.45);
}

.tile-28 .tile-title {
  font-size: 0.61rem;
  line-height: 1.1;
  font-weight: 800;
}

.tile-28 .tile-icon {
  font-size: 1.02rem;
}

.tile-28.tile-corner .tile-icon {
  font-size: 1.32rem;
}

.tile-28.tile-corner .tile-title {
  font-size: 0.68rem;
  font-weight: 900;
}

.board-tile.tile-corner {
  background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #92400e;
  box-shadow: inset 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.board-tile.tile-active-current {
  background: linear-gradient(180deg, #fef08a 0%, #facc15 100%);
  box-shadow: inset 0 0 0 2.5px #1d4ed8, 0 0 14px rgba(37, 99, 235, 0.7);
  z-index: 6;
}

.board-tile.tile-has-shortcut {
  box-shadow: inset 0 0 0 2px #d97706;
}

.board-tile.tile-shortcut-target {
  box-shadow: inset 0 0 0 2px #059669;
}

/* Color Strip di Bagian Dalam Petak Mengarah ke Tengah Papan (Ala Get Rich) */
.tile-color-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px 4px;
  color: #ffffff;
  font-weight: 900;
  border-bottom: 1.5px solid #0f172a;
  font-size: 0.58rem;
  line-height: 1.15;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Sisi Atas (#16..#21): Strip warna di BAWAH menghadap ke tengah */
.board-tile.side-top {
  flex-direction: column-reverse;
}
.board-tile.side-top .tile-color-strip {
  border-bottom: none;
  border-top: 1.5px solid #0f172a;
}

/* Sisi Kiri (#9..#14): Strip warna di KANAN menghadap ke tengah */
.board-tile.side-left {
  flex-direction: row-reverse;
}
.board-tile.side-left .tile-color-strip {
  width: 16px;
  padding: 2px 1px;
  border-bottom: none;
  border-left: 1.5px solid #0f172a;
  writing-mode: vertical-rl;
}

/* Sisi Kanan (#23..#28): Strip warna di KIRI menghadap ke tengah */
.board-tile.side-right {
  flex-direction: row;
}
.board-tile.side-right .tile-color-strip {
  width: 16px;
  padding: 2px 1px;
  border-bottom: none;
  border-right: 1.5px solid #0f172a;
  writing-mode: vertical-rl;
}

.board-tile.side-left .tile-body,
.board-tile.side-right .tile-body {
  flex: 1;
  min-width: 0;
}

.strip-gold { background: linear-gradient(90deg, #b45309, #eab308); color: #0f172a; }
.strip-blue { background: linear-gradient(90deg, #0284c7, #2563eb); }
.strip-indigo { background: linear-gradient(90deg, #4338ca, #6366f1); }
.strip-amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
.strip-rose { background: linear-gradient(90deg, #e11d48, #f43f5e); }
.strip-emerald { background: linear-gradient(90deg, #059669, #10b981); }
.strip-purple { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.strip-cyan { background: linear-gradient(90deg, #0891b2, #06b6d4); }

.tile-number {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tile-body {
  padding: 3px 3px 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1;
  min-height: 0;
  position: relative;
}

.tile-main {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  width: 100%;
}

.tile-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.tile-corner .tile-icon {
  font-size: 1.15rem;
}

.tile-title {
  font-weight: 800;
  font-size: 0.56rem;
  color: #0f172a;
  line-height: 1.06;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.tile-corner .tile-title {
  font-size: 0.62rem;
  font-weight: 900;
}

.shortcut-mini-tag,
.shortcut-exit-tag {
  font-size: 0.48rem;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.1;
  margin-top: 1px;
}

.shortcut-mini-tag {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #d97706;
}

.shortcut-exit-tag {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #059669;
}

/* ==========================================
   PION 3D BERDIRI DI ATAS PETAK (SLOT 2x2 ANTI-TUMPANG TINDIH)
   ========================================== */
.tile-pawns-stage {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 18px);
  grid-template-rows: repeat(2, 18px);
  gap: 2px 4px;
  align-items: center;
  justify-items: center;
  pointer-events: none;
  z-index: 5;
}

/* Jika hanya 1 pion di petak, posisikan di tengah bawah */
.tile-pawns-stage > .pawn-3d-token:only-child {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Jika ada 2 pion di petak, sejajarkan di baris bawah kiri-kanan */
.tile-pawns-stage > .pawn-3d-token:first-child:nth-last-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.tile-pawns-stage > .pawn-3d-token:last-child:nth-child(2) {
  grid-column: 2;
  grid-row: 2;
}

.pawn-3d-token {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.75));
}

.pawn-head {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pawn-color, #3b82f6);
  border: 2px solid #ffffff;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  z-index: 2;
}

.pawn-base {
  margin-top: -4px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #ffffff;
  border: 1.5px solid var(--pawn-color, #3b82f6);
  border-radius: 999px;
  font-size: 0.45rem;
  font-weight: 900;
  padding: 0 4px;
  line-height: 1.1;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.65);
}

.pawn-active-bounce {
  animation: pawnHop 0.75s infinite alternate ease-in-out;
}

@keyframes pawnHop {
  0% { transform: translateY(0) scale(1.08); }
  100% { transform: translateY(-4px) scale(1.22); }
}

/* Animasi Melangkah Satu Petak ke Petak (Pawn Step Hop) */
.pawn-3d-token.pawn-stepping-hop {
  animation: pawnStepHop 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
  z-index: 25 !important;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px var(--pawn-color, #3b82f6)) !important;
}

@keyframes pawnStepHop {
  0% {
    transform: translateY(0) scale(1.1);
  }
  45% {
    transform: translateY(-20px) scale(1.4);
  }
  100% {
    transform: translateY(0) scale(1.18);
  }
}

/* Animasi Pendaratan Membal di Petak Tujuan (Pawn Land Bounce) */
.pawn-3d-token.pawn-land-bounce {
  animation: pawnLandBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
  z-index: 30 !important;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px #fbbf24) !important;
}

@keyframes pawnLandBounce {
  0% {
    transform: translateY(-22px) scale(1.4);
  }
  45% {
    transform: translateY(2px) scale(1.28, 0.82);
  }
  75% {
    transform: translateY(-7px) scale(1.08, 1.16);
  }
  100% {
    transform: translateY(0) scale(1.15);
  }
}

/* Animasi Jalur Tikus / Pintas Cepat (Pawn Shortcut Dash) */
.pawn-3d-token.pawn-shortcut-dash {
  animation: pawnShortcutDash 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
  z-index: 35 !important;
  filter: drop-shadow(0 0 12px #f59e0b) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.9)) !important;
}

@keyframes pawnShortcutDash {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  40% {
    transform: translateY(-26px) scale(1.5) rotate(16deg);
  }
  100% {
    transform: translateY(0) scale(1.18) rotate(0deg);
  }
}

/* Efek Sorot Petak Saat Sedang Dilangkahi (Tile Stepping Highlight) */
.board-tile.tile-stepping-highlight {
  z-index: 15 !important;
  transform: scale(1.14) !important;
  box-shadow: 0 0 0 3px #f59e0b, 0 8px 22px rgba(245, 158, 11, 0.8) !important;
  background: linear-gradient(180deg, #fef08a 0%, #fde047 100%) !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}

/* Efek Denyut Petak Pintasan Saat Dipotong (Tile Shortcut Pulse) */
.board-tile.tile-shortcut-pulse {
  z-index: 16 !important;
  transform: scale(1.18) !important;
  box-shadow: 0 0 0 3.5px #10b981, 0 10px 26px rgba(16, 185, 129, 0.85) !important;
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

/* ==========================================
   TENGAH PAPAN (CENTER COURT)
   ========================================== */
.board-perimeter-28 .board-center-hub {
  grid-column: 2 / 8;
  grid-row: 2 / 8;
}

.board-perimeter-52 .board-center-hub {
  grid-column: 2 / 14;
  grid-row: 2 / 14;
}

.board-center-hub {
  grid-column: 2 / 8;
  grid-row: 2 / 8;
  background:
    radial-gradient(circle at 50% 45%, #166534 0%, #0d3b26 68%, #06281e 100%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 14px, transparent 14px, transparent 28px);
  border: 2.5px solid #d4af37;
  box-shadow: inset 0 0 0 5px rgba(212, 175, 55, 0.18), inset 0 0 36px rgba(0, 0, 0, 0.45);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  isolation: isolate;
}

.center-hub-upright {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.iso-board-wrapper.is-3d .center-hub-upright {
  transform: rotateZ(-45deg) scale(0.92);
  padding: 6px 12px;
}

.btn-convert-3d {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1.5px solid #34d399;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 3px 0 #047857, 0 4px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn-convert-3d:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-convert-3d:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #047857;
}

.btn-convert-3d:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

.currency-exchange-pill {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
  border-color: #34d399;
}

.center-top-shortcuts {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 86%;
}

.shortcut-bridge-track {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.25), rgba(245, 158, 11, 0.35));
  border: 1.5px dashed #fbbf24;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.64rem;
}

.shortcut-bridge-2 {
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.25), rgba(16, 185, 129, 0.35));
  border-color: #34d399;
}

.rat-badge {
  font-weight: 900;
  color: #fde68a;
}

.rat-cost {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.58rem;
}

.center-court-grid {
  display: grid;
  grid-template-columns: minmax(74px, 96px) minmax(0, 1fr) minmax(74px, 96px);
  gap: 8px;
  align-items: center;
  margin: auto 0;
  width: 100%;
}

.deck-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1.5px dashed rgba(253, 224, 71, 0.35);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.coin-stack-deco {
  font-size: 0.95rem;
}

.card-3d-stack {
  width: 100%;
  max-width: 94px;
  height: clamp(92px, 13.5vh, 122px);
  border-radius: 10px;
  padding: 5px;
  transition: transform 0.2s ease;
}

.card-3d-stack:hover {
  transform: translateY(-4px) scale(1.04);
}

.stack-drama {
  background: linear-gradient(145deg, #be123c, #f43f5e);
  border: 2px solid #fecdd3;
  box-shadow: -3px 3px 0 #9f1239, -6px 6px 0 #881337, 0 10px 16px rgba(0, 0, 0, 0.55);
  transform: rotate(-4deg);
}

.stack-opp {
  background: linear-gradient(145deg, #047857, #10b981);
  border: 2px solid #a7f3d0;
  box-shadow: 3px 3px 0 #065f46, 6px 6px 0 #064e3b, 0 10px 16px rgba(0, 0, 0, 0.55);
  transform: rotate(4deg);
}

.card-3d-face {
  border: 1.5px dashed rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  gap: 3px;
}

.card-3d-icon { font-size: 1.5rem; }
.card-3d-title { font-size: 0.64rem; font-weight: 900; color: #fff; }
.card-3d-sub { font-size: 0.56rem; color: rgba(255, 255, 255, 0.9); }

/* Konsol Tengah: Pemain Aktif, 2 Dadu 3D & Syarat Ganda */
.center-dice-pit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.board-emblem-title {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ffffff;
  background: linear-gradient(90deg, #b91c1c, #dc2626, #b91c1c);
  border: 2px solid #fde047;
  padding: 3px 14px;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.active-player-banner {
  width: 100%;
}

.active-turn-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--active-color, #38bdf8);
  padding: 5px 10px;
  border-radius: 10px;
}

.turn-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid #fff;
}

.turn-meta { text-align: left; }
.turn-title { font-size: 0.8rem; }
.turn-sub { font-size: 0.66rem; color: #cbd5e1; }

/* ==========================================
   GET RICH STYLE 3D ISOMETRIC DICE & ANIMATION
   ========================================== */
.dice-3d-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 14px;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative;
  z-index: 25;
  border-radius: 14px;
  isolation: isolate;
  transition: transform 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28), filter 0.18s ease;
}

.dice-3d-stage:hover:not(.stage-rolling) {
  transform: translateY(-3px) scale(1.07);
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.65));
}

.dice-3d-stage:active:not(.stage-rolling) {
  transform: translateY(2px) scale(0.96);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.die-3d-cube-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  perspective: 600px;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.die-cube {
  width: 44px;
  height: 44px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* Wajah Kubus Dadu (Lebar 44px, translateZ = 22px) */
.cube-face {
  position: absolute;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%);
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.9),
    inset 0 -3px 4px rgba(15, 23, 42, 0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
  box-sizing: border-box;
  backface-visibility: hidden;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.face-1 { transform: rotateY(0deg) translateZ(22px); }
.face-2 { transform: rotateY(90deg) translateZ(22px); }
.face-3 { transform: rotateX(90deg) translateZ(22px); }
.face-4 { transform: rotateX(-90deg) translateZ(22px); }
.face-5 { transform: rotateY(-90deg) translateZ(22px); }
.face-6 { transform: rotateY(180deg) translateZ(22px); }

/* Titik Pip Dadu */
.cube-face .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #334155, #0f172a);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 1px rgba(255, 255, 255, 0.8);
  margin: auto;
}

/* Sisi 1 ala Get Rich / Mahjong / Marble: Titik Merah Mewah */
.cube-face .pip-red {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 35% 35%, #ff4d6d, #be123c 70%, #881337 100%);
  box-shadow: 0 0 6px rgba(225, 29, 72, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Posisi Pip di Grid 3x3 */
.pip-center { grid-column: 2; grid-row: 2; }
.pip-tl { grid-column: 1; grid-row: 1; }
.pip-tr { grid-column: 3; grid-row: 1; }
.pip-ml { grid-column: 1; grid-row: 2; }
.pip-mr { grid-column: 3; grid-row: 2; }
.pip-bl { grid-column: 1; grid-row: 3; }
.pip-br { grid-column: 3; grid-row: 3; }

/* Bayangan Dinamis Get Rich di Bawah Dadu */
.die-shadow {
  position: absolute;
  bottom: -9px;
  left: 4px;
  width: 36px;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: -1;
}

/* Animasi Lemparan Tumble Ala Get Rich (Dadu 1 & Dadu 2 berputar beda sudut & melayang ke udara) */
.tumble-anim-1 .die-cube {
  animation: getRichTumble1 0.75s ease-in-out infinite;
}

.tumble-anim-1 .die-shadow {
  animation: getRichShadow 0.75s ease-in-out infinite;
}

.tumble-anim-2 .die-cube {
  animation: getRichTumble2 0.75s ease-in-out infinite;
}

.tumble-anim-2 .die-shadow {
  animation: getRichShadow 0.75s ease-in-out infinite 0.08s;
}

@keyframes getRichTumble1 {
  0% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  30% {
    transform: translateY(-28px) rotateX(180deg) rotateY(240deg) rotateZ(45deg) scale(1.18);
  }
  60% {
    transform: translateY(-12px) rotateX(360deg) rotateY(480deg) rotateZ(-30deg) scale(1.08);
  }
  85% {
    transform: translateY(-4px) rotateX(540deg) rotateY(640deg) rotateZ(15deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotateX(720deg) rotateY(720deg) rotateZ(0deg) scale(1);
  }
}

@keyframes getRichTumble2 {
  0% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
  }
  32% {
    transform: translateY(-34px) rotateX(-210deg) rotateY(-180deg) rotateZ(-40deg) scale(1.22);
  }
  65% {
    transform: translateY(-15px) rotateX(-420deg) rotateY(-360deg) rotateZ(25deg) scale(1.1);
  }
  88% {
    transform: translateY(-5px) rotateX(-580deg) rotateY(-540deg) rotateZ(-12deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotateX(-720deg) rotateY(-720deg) rotateZ(0deg) scale(1);
  }
}

@keyframes getRichShadow {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  30% {
    transform: scale(0.55);
    opacity: 0.25;
  }
  60% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

/* Efek Hentakan Pendaratan (Settled Bounce) */
.dice-settled {
  animation: diceSettleBounce 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) 1;
}

@keyframes diceSettleBounce {
  0% { transform: translateY(-8px) scale(1.1); }
  50% { transform: translateY(2px) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}

/* Efek Pop & Glow pada Badge Total Dadu Get Rich */
.dice-total-badge {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.dice-pop-highlight {
  animation: popBadgeGlow 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28) 1;
}

@keyframes popBadgeGlow {
  0% {
    transform: scale(0.85);
    box-shadow: 0 0 0 rgba(250, 204, 21, 0);
  }
  45% {
    transform: scale(1.22);
    border-color: #facc15;
    color: #fde047;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.8), 0 0 35px rgba(234, 179, 8, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  }
}

.stage-rolling .dice-total-badge {
  opacity: 0.65;
  transform: scale(0.95);
}

.center-action-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 25;
}

.btn-roll-3d {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #0f172a;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 7px 18px;
  border-radius: 999px;
  border: 2px solid #fef08a;
  box-shadow: 0 4px 0 #92400e, 0 6px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-roll-3d:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 0 #92400e, 0 10px 20px rgba(245, 158, 11, 0.55);
}

.btn-roll-3d:active:not(:disabled) {
  transform: translateY(2px) scale(0.97);
  box-shadow: 0 2px 0 #92400e, 0 4px 8px rgba(0, 0, 0, 0.4);
}

.btn-roll-3d:disabled {
  cursor: not-allowed !important;
  opacity: 0.55;
  filter: grayscale(40%);
  box-shadow: 0 3px 0 #78350f, 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-shortcut-3d {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #a7f3d0;
}

.center-payday-ribbon {
  width: auto;
  max-width: 82%;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid #475569;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.58rem;
  color: #cbd5e1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.center-victory-strip {
  width: 100%;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: 8px;
  padding: 4px 8px;
}

.victory-strip-title {
  font-size: 0.58rem;
  font-weight: 900;
  color: #fde68a;
  margin-bottom: 3px;
}

.victory-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.v-pill {
  font-size: 0.58rem;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid #475569;
  padding: 1px 6px;
  border-radius: 999px;
  color: #e2e8f0;
}

.center-compass-footer {
  font-size: 0.58rem;
  color: #94a3b8;
  text-align: center;
}

/* ==========================================
   DOCK BAWAH: TICKER LOG & DRAWER
   ========================================== */
.bottom-hud-dock {
  z-index: 35;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 5px 12px;
}

.live-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticker-badge {
  background: #3b82f6;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.latest-log-ticker {
  flex: 1;
  font-size: 0.76rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-drawer-toggle {
  background: #334155;
  color: #fde68a;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.bottom-drawer-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #334155;
}

.drawer-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 12px;
}

.drawer-victory-box h3,
.drawer-log-box h3 {
  font-size: 0.8rem;
  color: #fde68a;
  margin-bottom: 5px;
}

.victory-mini-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
}

.victory-mini-list li {
  background: rgba(30, 41, 59, 0.75);
  padding: 4px 7px;
  border-radius: 5px;
}

.event-log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 125px;
  overflow-y: auto;
}

.log-item {
  font-size: 0.7rem;
  background: rgba(30, 41, 59, 0.75);
  padding: 3px 7px;
  border-radius: 4px;
  border-left: 3px solid #64748b;
  display: flex;
  gap: 6px;
}

.log-success { border-left-color: var(--accent-green); }
.log-warning { border-left-color: var(--accent-amber); }
.log-danger { border-left-color: var(--accent-red); }
.log-time { font-weight: 800; color: #38bdf8; white-space: nowrap; }

/* ==========================================
   RESPONSIVE: PERTAHANKAN LAYOUT WEB DI MOBILE LANDSCAPE
   ========================================== */
@media (max-width: 1120px) and (orientation: landscape), (max-height: 600px) and (orientation: landscape) {
  .floating-topbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 3px 8px;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .floating-topbar::-webkit-scrollbar {
    display: none;
  }

  .topbar-brand,
  .topbar-round-pill,
  .topbar-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .brand-sub,
  .brand-badge {
    display: none;
  }

  .brand-title-row h1 {
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .round-pill,
  .phase-pill,
  .btn-glass {
    font-size: 0.6rem;
    padding: 2px 7px;
    min-height: 24px;
    white-space: nowrap;
  }

  .arena-viewport {
    padding: 2px 4px;
    overflow: hidden;
  }

  .iso-board-wrapper {
    width: min(76vh, calc(100vw - clamp(320px, 46vw, 410px)));
    aspect-ratio: 1 / 1;
  }

  .iso-board-wrapper.is-3d {
    transform: rotateX(34deg) rotateZ(45deg) scale(0.84);
  }

  .iso-board-wrapper.is-3d .center-hub-upright {
    transform: rotateZ(-45deg) scale(0.62);
    padding: 2px;
    gap: 2px;
  }

  .center-top-shortcuts,
  .center-payday-ribbon,
  .center-brand-pill {
    display: none;
  }

  .board-center-hub {
    padding: 4px;
  }

  .active-turn-indicator {
    padding: 3px 6px;
    gap: 5px;
  }

  .turn-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  .turn-title {
    font-size: 0.64rem;
  }

  .turn-sub {
    font-size: 0.54rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
  }

  .center-court-grid {
    gap: 4px;
    margin-top: 2px;
  }

  .card-3d-stack {
    height: 54px;
    padding: 4px;
  }

  .deck-tag {
    font-size: 0.45rem;
  }

  .deck-title {
    font-size: 0.56rem;
  }

  .deck-sub {
    display: none;
  }

  .dice-3d {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .btn-roll-3d {
    padding: 4px 10px;
    font-size: 0.62rem;
    min-height: 26px;
  }

  .tile-28 .tile-title {
    font-size: 0.36rem;
    line-height: 1.05;
  }

  .tile-28 .tile-num {
    font-size: 0.38rem;
  }

  /* 4 Panel Sudut: super ringkas agar Top & Bottom tidak pernah bertumpukan */
  .corner-player-panel {
    width: clamp(154px, 22vw, 198px);
    min-height: auto;
    max-height: calc((100vh - 64px) / 2 - 6px);
    overflow: hidden;
    padding: 5px 7px;
    border-radius: 8px;
  }

  .corner-top-left { top: 4px; left: 6px; }
  .corner-top-right { top: 4px; right: 6px; }
  .corner-bottom-left { bottom: 4px; left: 6px; }
  .corner-bottom-right { bottom: 4px; right: 6px; }

  .corner-card-top {
    gap: 4px;
    flex-wrap: nowrap;
  }

  .corner-avatar-circle {
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  .corner-rank-badge {
    font-size: 0.46rem;
    padding: 0 3px;
  }

  .corner-identity-info {
    min-width: 0;
    flex: 1;
  }

  .corner-name-line {
    gap: 3px;
  }

  .corner-name-line h4 {
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-toggle-bot,
  .corner-turn-beacon {
    font-size: 0.48rem;
    padding: 1px 4px;
  }

  .corner-role-line {
    gap: 3px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .role-badge,
  .corner-pos-tag {
    font-size: 0.48rem;
    padding: 1px 4px;
    white-space: nowrap;
  }

  .role-salary-tag,
  .corner-tax-safe,
  .flag-persona,
  .endgame-prog-sub,
  .corner-bars-grid .mini-progress {
    display: none;
  }

  .corner-rupiah-single-box {
    padding: 2px 5px;
    flex-shrink: 0;
  }

  .rupiah-caption {
    font-size: 0.42rem;
  }

  .rupiah-big-val {
    font-size: 0.64rem;
  }

  .corner-debt-alert {
    font-size: 0.5rem;
    padding: 1px 5px;
    margin-top: 2px;
  }

  .corner-bars-grid {
    gap: 4px;
    margin-top: 2px;
  }

  .bar-label-row {
    font-size: 0.52rem;
  }

  .corner-jejak-pill {
    font-size: 0.5rem;
    padding: 1px 4px;
  }

  .corner-flags-row {
    margin-top: 2px;
    gap: 3px;
  }

  .flag-pill {
    font-size: 0.48rem;
    padding: 1px 4px;
  }

  .corner-endgame-progress {
    margin-top: 2px;
    padding: 2px 4px;
  }

  .endgame-prog-head {
    font-size: 0.48rem;
  }

  .corner-hand-row {
    margin-top: 2px;
    gap: 3px;
  }

  .hand-counter-label,
  .hand-empty-hint,
  .hand-card-chip {
    font-size: 0.48rem;
    padding: 1px 4px;
  }

  .bottom-hud-dock {
    padding: 2px 8px;
  }

  .live-ticker-bar {
    font-size: 0.6rem;
    gap: 6px;
  }

  .btn-drawer-toggle {
    font-size: 0.58rem;
    padding: 2px 6px;
  }

  .modal-card {
    width: min(92vw, 560px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 12px 16px;
  }
}

/* ==========================================
   RESPONSIVE FALLBACK (PORTRAIT ONLY)
   ========================================== */
@media (max-width: 1120px) and (orientation: portrait) {
  .arena-viewport {
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    padding: 12px 10px 76px;
    overflow-y: auto;
  }

  .arena-viewport::before {
    content: "📱 Putar layar ke mode Landscape untuk tampilan Papan Web 4 Sudut penuh";
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fde68a;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 999px;
    padding: 5px 12px;
  }

  .isometric-scene-container {
    width: 100%;
    padding: 8px 0;
  }

  .iso-board-wrapper {
    width: min(620px, 90vw);
    aspect-ratio: 1 / 1;
  }

  .iso-board-wrapper.is-3d {
    transform: rotateX(26deg) rotateZ(45deg) scale(0.74);
  }

  .corners-hud-layer {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 960px;
  }

  .corner-player-panel {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 10px;
  }
}

@media (max-width: 960px) and (orientation: portrait) {
  .floating-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .topbar-brand,
  .topbar-round-pill,
  .topbar-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn-glass {
    min-height: 36px;
    padding: 6px 12px;
  }

  .iso-board-wrapper {
    width: min(620px, 95vw);
  }

  .iso-board-wrapper.is-3d,
  .iso-board-wrapper.is-3d .center-hub-upright,
  .iso-board-wrapper.is-3d .tile-main,
  .iso-board-wrapper.is-3d .tile-pawns-stage,
  .iso-board-wrapper.is-3d .shortcut-mini-tag,
  .iso-board-wrapper.is-3d .shortcut-exit-tag,
  .iso-board-wrapper.is-3d .start-direction-arrow {
    transform: none !important;
  }

  .iso-board-wrapper.is-3d .center-hub-upright {
    padding: 8px;
  }

  .corners-hud-layer {
    grid-template-columns: repeat(2, 1fr);
  }

  .drawer-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: min(95vw, 560px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 16px;
  }

  .bottom-hud-dock {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (max-width: 640px) and (orientation: portrait) {
  .iso-board-wrapper {
    width: min(96vw, 520px);
  }

  .board-center-hub {
    padding: 8px;
  }

  .center-court-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .center-dice-pit {
    grid-column: 1 / -1;
    order: -1;
  }

  .card-3d-stack {
    height: 78px;
    max-width: none;
  }

  .btn-roll-3d {
    min-height: 40px;
    font-size: 0.78rem;
    padding: 8px 14px;
  }

  .tile-28 .tile-title {
    font-size: 0.5rem;
  }

  .center-top-shortcuts,
  .center-payday-ribbon {
    max-width: 96%;
    font-size: 0.64rem;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .corners-hud-layer {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   BUTTONS, BOT AI & MODAL INTERAKTIF
   ========================================== */
button,
.btn-glass,
.btn-roll-3d,
.btn-shortcut-3d,
.btn-drawer-toggle,
.choice-card-btn,
.deck-zone,
.dice-3d-stage {
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

button:disabled,
.btn-roll-3d:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.modal-desc,
.modal-info-box,
.rules-content,
.event-log-list {
  user-select: text;
  -webkit-user-select: text;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  background: #172033;
  border: 2px solid #64748b;
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon { font-size: 2rem; }
.modal-kicker { font-size: 0.74rem; color: #38bdf8; font-weight: 700; text-transform: uppercase; }
.modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 10px; }

.modal-alert-banner {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #f59e0b;
  color: #fde68a;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
}

.modal-player-context {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #0f172a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.modal-desc { font-size: 0.9rem; color: #e2e8f0; }
.choices-stack { display: flex; flex-direction: column; gap: 8px; }

.choice-card-btn {
  text-align: left;
  background: var(--bg-card);
  border: 1.5px solid #475569;
  color: var(--text-main);
  padding: 10px 13px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.choice-card-btn:hover:not(:disabled) {
  border-color: #38bdf8;
  background: #334155;
  transform: translateX(3px);
}

.choice-clean { border-color: var(--accent-green); }
.choice-dirty { border-color: var(--accent-amber); }
.choice-btn-title { font-weight: 800; font-size: 0.88rem; color: #38bdf8; }
.choice-btn-desc { font-size: 0.8rem; color: #cbd5e1; }

.card-type-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 3px;
}

.card-badge-drama { background: rgba(239, 68, 68, 0.25); color: #fca5a5; }
.card-badge-opp { background: rgba(16, 185, 129, 0.25); color: #6ee7b7; }

.drawn-card-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  border-left: 4px solid #38bdf8;
}

.drawn-drama { border-left-color: #ef4444; }
.drawn-opp { border-left-color: #10b981; }

.target-selector-box {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid #8b5cf6;
  padding: 9px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.82rem;
}

.target-select {
  background: #0f172a;
  color: #fff;
  border: 1px solid #475569;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.interview-question-box {
  background: #0f172a;
  border-left: 4px solid var(--accent-primary);
  padding: 10px 13px;
  border-radius: 8px;
  font-style: italic;
  font-size: 0.88rem;
}

.modal-subhint { font-size: 0.8rem; color: var(--text-muted); }
.text-danger { color: #f87171; font-weight: 700; }

.rules-content { display: flex; flex-direction: column; gap: 10px; font-size: 0.84rem; }
.rules-content h4 { color: #38bdf8; margin-top: 4px; }
.rules-content ul { padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.champion-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(16, 185, 129, 0.2));
  border: 1px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
}

.champ-title { font-size: 1.05rem; font-weight: 800; color: #fde68a; margin-bottom: 4px; }
.rankings-list { display: flex; flex-direction: column; gap: 8px; }

.ranking-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid #475569;
  padding: 10px 12px;
  border-radius: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-champion { border-color: #f59e0b; background: #2d3b4e; }
.ranking-left { display: flex; align-items: center; gap: 10px; }
.ranking-pos { font-weight: 800; font-size: 1rem; color: #fde68a; }
.ranking-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.ranking-titles { font-size: 0.74rem; color: #34d399; font-weight: 600; }
.ranking-right { text-align: right; font-size: 0.78rem; }
.ranking-score { font-size: 0.9rem; color: #38bdf8; }

/* BOT AI CONTROLS */
.btn-toggle-bot {
  font-size: 0.54rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.is-bot-badge {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  border-color: #7dd3fc;
}

.is-human-badge {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border-color: #34d399;
}

.btn-bot-mode.bot-all-active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: #a78bfa;
  color: #fff;
}

.bot-chip-active {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  background: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

.flag-persona {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.bot-thinking-banner {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.24), rgba(59, 130, 246, 0.2));
  border: 1.5px solid #38bdf8;
  color: #e0f2fe;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.84rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bot-reason-text {
  font-size: 0.8rem;
  color: #fde68a;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.55);
  padding: 5px 8px;
  border-radius: 6px;
  border-left: 3px solid #fbbf24;
}

.bot-selected-choice {
  border-color: #fbbf24 !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(30, 41, 59, 0.95)) !important;
  box-shadow: 0 0 0 2px #fbbf24, 0 0 16px rgba(245, 158, 11, 0.45) !important;
}

.bot-selected-choice .choice-btn-title::after {
  content: " 👈 [Pilihan Bot AI]";
  color: #fde047;
  font-size: 0.76rem;
  font-weight: 900;
}

.corner-tax-safe {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  margin: 3px 0;
  text-align: center;
}

/* Kartu di Tangan Pemain (Max 3) */
.corner-hand-row {
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hand-counter-label {
  font-size: 0.56rem;
  font-weight: 800;
  color: #cbd5e1;
}

.hand-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.hand-empty-hint {
  font-size: 0.56rem;
  color: #64748b;
  font-style: italic;
}

.hand-card-chip {
  font-size: 0.56rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.hand-card-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.hand-card-chip:disabled {
  opacity: 0.68;
  cursor: default;
}

.chip-attack {
  background: rgba(239, 68, 68, 0.24);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

.chip-support {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}

.chip-defense {
  background: rgba(14, 165, 233, 0.24);
  border-color: rgba(56, 189, 248, 0.65);
  color: #bae6fd;
}

.card-badge-def {
  background: rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
}

.choice-defense-btn {
  border-color: #38bdf8 !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(30, 41, 59, 0.95)) !important;
}

.role-salary-tag {
  font-size: 0.56rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 1px 5px;
  border-radius: 999px;
  white-space: nowrap;
}

.corner-endgame-progress {
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.28);
  padding: 3px 6px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.endgame-prog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font-size: 0.55rem;
  color: #fde68a;
}

.endgame-prog-sub {
  font-size: 0.51rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-endgame {
  background: linear-gradient(90deg, #f59e0b, #10b981);
}

/* Jaga tengah papan tetap bersih & fokus pada Dadu + 2 Dek Kartu */
.center-top-shortcuts,
.board-emblem-title,
.center-payday-ribbon {
  display: none !important;
}

.flag-match-point {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
  animation: pulseMatchPoint 1.4s ease-in-out infinite;
}

.flag-installment {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

.chip-sakti {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(168, 85, 247, 0.28));
  border-color: rgba(251, 191, 36, 0.7);
  color: #fef08a;
}

.btn-judol-3d {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.7);
  background: linear-gradient(135deg, #be185d, #7e22ce);
  color: #fdf2f8;
  font-weight: 800;
  font-size: 0.74rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.35);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-judol-3d:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-judol-3d:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.judol-slot-box {
  background: linear-gradient(145deg, rgba(88, 28, 135, 0.45), rgba(15, 23, 42, 0.9));
  border: 2px solid rgba(250, 204, 21, 0.65);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  text-align: center;
}

.judol-phase-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fde047;
  margin-bottom: 8px;
}

.judol-reels-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0;
}

.judol-reel {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.88);
  border: 2px solid rgba(244, 114, 182, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7);
}

.judol-result-area {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #e2e8f0;
}

/* ==========================================
   MAIN MENU, LOBBY MULTIPLAYER & DEFENSE COUNTDOWN
   ========================================== */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.fullscreen-overlay.hidden {
  display: none !important;
}

.menu-card,
.lobby-card {
  width: min(94vw, 520px);
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  color: #f8fafc;
}

.lobby-card {
  width: min(96vw, 860px);
  max-height: 92vh;
  overflow-y: auto;
}

.menu-card {
  text-align: center;
}

.menu-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  margin-bottom: 10px;
}

.menu-title {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fef08a, #f59e0b, #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.menu-subtitle {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 18px;
}

.menu-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-menu-primary {
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38);
}

.btn-menu-secondary {
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.75), rgba(30, 64, 175, 0.75));
  color: #f0f9ff;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-menu-ghost {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.7);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.menu-settings-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lobby-header,
.lobby-room-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.lobby-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lobby-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.lobby-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.75);
  color: #f8fafc;
  font-size: 0.84rem;
}

.lobby-inline-row {
  display: flex;
  gap: 6px;
}

.lobby-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.lobby-rooms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #fde68a;
}

.lobby-rooms-list,
.lobby-chat-log {
  min-height: 120px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
}

.lobby-room-item,
.lobby-slot-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.lobby-slot-card.slot-ready {
  border-color: rgba(16, 185, 129, 0.6);
}

.lobby-slots-grid,
.lobby-room-actions,
.quick-chat-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lobby-room-actions,
.quick-chat-presets {
  flex-direction: row;
  flex-wrap: wrap;
}

.room-id-pill {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.75rem;
}

.lobby-status-msg {
  margin-top: 10px;
  font-size: 0.8rem;
  text-align: center;
}

.defense-countdown-pill {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
  font-size: 0.78rem;
  font-weight: 800;
}

.center-match-point-banner {
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(153, 27, 27, 0.85);
  border: 1px solid rgba(252, 165, 165, 0.75);
  color: #fef2f2;
  font-size: 0.64rem;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
}

@keyframes pulseMatchPoint {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0); }
}
