/* public/css/style.css */
:root {
  --bg-deep: #0b1120;
  --panel-bg: #111827;
  --panel-elevated: #1e293b;
  --panel-border: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-red: #dc2626;
  --accent-green: #16a34a;
  --accent-gold: #f59e0b;
  --accent-blue: #2563eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Warna dasar di HTML sekaligus BODY agar area notch/safe-area HP tidak pernah bocor putih */
html {
  width: 100%;
  height: 100%;
  background-color: #0b1120;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #0b1120;
  background-image: radial-gradient(circle at 20% 0%, #1e293b 0%, #0f172a 55%, #070b14 100%);
  background-attachment: fixed;
  color: var(--text-main);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  transition: background-color 0.25s ease;
}

/* Tema Background Seragam & Kontras Sesuai Edisi Papan */
html.edition-indonesia,
body.edition-indonesia {
  background-color: #13281c;
}

body.edition-indonesia {
  background-image: radial-gradient(circle at 25% 15%, #1e3f2c 0%, #13281c 60%, #0b1911 100%);
}

body.edition-indonesia .sidebar {
  background: rgba(13, 30, 21, 0.94);
  border-color: rgba(134, 239, 172, 0.2);
}

html.edition-world,
body.edition-world {
  background-color: #071426;
}

body.edition-world {
  background-image: radial-gradient(circle at 25% 15%, #102a4c 0%, #071426 60%, #040b16 100%);
}

body.edition-world .sidebar {
  background: rgba(9, 23, 43, 0.94);
  border-color: rgba(251, 191, 36, 0.22);
}

.hidden { display: none !important; }
.text-green { color: #4ade80; }
.text-red { color: #f87171; }
.text-gold { color: #fbbf24; }

/* ================= OVERLAY PUTAR HP (PORTRAIT GUARD KHUSUS HP) ================= */
.rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: radial-gradient(circle at center, #1e293b 0%, #070b14 100%);
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.edition-indonesia .rotate-overlay {
  background: radial-gradient(circle at center, #1e3f2c 0%, #0b1911 100%);
}

body.edition-world .rotate-overlay {
  background: radial-gradient(circle at center, #102a4c 0%, #040b16 100%);
}

@media (max-width: 720px) and (orientation: portrait) {
  body.in-game .rotate-overlay {
    display: flex;
  }
}

.rotate-card {
  max-width: 340px;
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.7);
}

@keyframes phoneTilt {
  0%, 18% { transform: rotate(0deg); }
  52%, 75% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

.rotate-phone-anim {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  border: 2px solid rgba(251, 191, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fbbf24;
}

.rotate-phone-anim i { animation: phoneTilt 2.2s infinite ease-in-out; }
.rotate-card h2 { font-size: 19px; font-weight: 800; color: #ffffff; margin-bottom: 8px; }
.rotate-card p { font-size: 13px; line-height: 1.5; color: #cbd5e1; margin-bottom: 18px; }

.btn-rotate-lock {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.32);
}

/* ================= LOBBY ================= */
.lobby-wrapper {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow-y: auto;
}

.lobby-card {
  width: 100%;
  max-width: 520px;
  margin: auto;
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.lobby-brand { text-align: center; margin-bottom: 16px; }
.brand-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #dc2626, #991b1b); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; padding: 5px 12px; border-radius: 999px; margin-bottom: 7px; box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35); }
.lobby-brand h1 { font-size: 23px; font-weight: 800; letter-spacing: 0.8px; margin-bottom: 3px; }
.lobby-brand p { font-size: 12px; color: var(--text-muted); }

.lobby-grid { display: flex; flex-direction: column; }
.lobby-col { display: flex; flex-direction: column; }

.edition-switcher, .rule-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.edition-btn, .rule-btn { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; border: 2px solid var(--panel-border); background: #0b1120; color: #e2e8f0; text-align: left; cursor: pointer; font-family: inherit; transition: all 0.18s ease; }
.edition-btn:hover, .rule-btn:hover { border-color: #64748b; transform: translateY(-1px); }
.edition-btn.active, .rule-btn.active { border-color: var(--accent-gold); background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.95)); box-shadow: 0 0 18px rgba(245, 158, 11, 0.2); }
.edition-icon, .rule-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; flex-shrink: 0; }
.edition-icon.ed-id { background: linear-gradient(135deg, #16a34a, #15803d); }
.edition-icon.ed-world { background: linear-gradient(135deg, #0284c7, #1e3a8a); }
.rule-icon.rule-classic { background: linear-gradient(135deg, #475569, #1e293b); }
.rule-icon.rule-fast { background: linear-gradient(135deg, #f97316, #dc2626); }

.edition-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.edition-meta strong { font-size: 12.5px; font-weight: 800; color: #f8fafc; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.edition-meta small { font-size: 10px; color: #94a3b8; line-height: 1.2; }
.tag-hot { font-size: 8.5px; font-weight: 900; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; padding: 1.5px 5px; border-radius: 4px; letter-spacing: 0.4px; }

.mode-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #0b1120; padding: 5px; border-radius: 12px; border: 1px solid var(--panel-border); margin-bottom: 14px; }
.mode-btn { padding: 8px; border: none; border-radius: 8px; background: transparent; color: #94a3b8; font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.16s; }
.mode-btn.active { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }

.form-group { margin-bottom: 12px; }
.form-group label { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #cbd5e1; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: #0b1120; color: #fff; font-size: 13.5px; font-family: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.form-group input:focus, .form-group select:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }

.token-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.token-opt { font-size: 18px; padding: 9px 0; background: #0b1120; color: #cbd5e1; border: 2px solid var(--panel-border); border-radius: 10px; cursor: pointer; transition: all 0.18s ease; }
.token-opt:hover { transform: translateY(-2px); border-color: #64748b; color: #fff; }
.token-opt.active { border-color: var(--accent-gold); background: rgba(245, 158, 11, 0.16); color: #fbbf24; }

.pass-play-roster { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.roster-row { display: flex; align-items: center; gap: 8px; background: #0b1120; border: 1px solid var(--panel-border); padding: 6px 8px; border-radius: 10px; }
.roster-badge { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.35); }
.roster-name-input { flex: 1; min-width: 0; background: #111827; border: 1px solid #334155; border-radius: 8px; color: #fff; padding: 6px 9px; font-family: inherit; font-size: 13px; font-weight: 700; outline: none; }
.roster-name-input:focus { border-color: var(--accent-gold); }
.roster-token-select { background: #111827; border: 1px solid #334155; border-radius: 8px; color: #e2e8f0; padding: 6px 8px; font-family: inherit; font-size: 12px; font-weight: 700; outline: none; }

.btn-primary { width: 100%; padding: 12px; border: none; border-radius: 12px; background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; font-size: 14.5px; font-weight: 800; font-family: inherit; cursor: pointer; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 20px -5px rgba(220, 38, 38, 0.45); transition: transform 0.15s, filter 0.15s; }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ================= FULL-VIEWPORT GAME LAYOUT ================= */
.game-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 340px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  gap: 8px;
  padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  transition: grid-template-columns 0.25s ease;
  overflow: hidden;
}

.game-layout.sidebar-collapsed { grid-template-columns: 1fr 0px; gap: 0; }
.game-layout.sidebar-collapsed .sidebar { width: 0; padding: 0; border: none; opacity: 0; pointer-events: none; }

.floating-viewport-controls {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  z-index: 500;
  display: flex;
  gap: 6px;
}

.btn-float-ctrl {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.15s;
}

.btn-float-ctrl:hover { background: #f59e0b; color: #0f172a; border-color: #f59e0b; transform: translateY(-1px); }

.board-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

/* ================= SIDEBAR ================= */
.sidebar {
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow: hidden;
  min-height: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s ease, padding 0.2s ease;
}

.cockpit-nav,
.cockpit-controls-pane { display: none; }

.sidebar-content-grid { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--panel-border); margin-bottom: 9px; flex-shrink: 0; }
.sidebar-header h2 { font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.header-tools { display: flex; align-items: center; gap: 7px; }
.bank-stock { font-size: 11.5px; font-weight: 700; background: #0b1120; border: 1px solid #1e293b; padding: 5px 8px; border-radius: 8px; color: #cbd5e1; }
.btn-icon-only { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--panel-border); background: #0b1120; color: #e2e8f0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.btn-icon-only:hover { border-color: var(--accent-gold); color: #fbbf24; }
.btn-icon-only.muted { color: #64748b; border-color: #1e293b; }

.fast-win-guide { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(239, 68, 68, 0.12)); border: 1px solid rgba(245, 158, 11, 0.35); border-radius: 8px; padding: 6px 9px; font-size: 10.5px; font-weight: 700; color: #fde68a; margin-bottom: 9px; flex-shrink: 0; }

.players-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; overflow-y: auto; flex-shrink: 0; max-height: 52%; padding-right: 2px; }
.players-list::-webkit-scrollbar { width: 4px; }
.players-list::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }

.player-card { background: #0b1120; border: 2px solid #1e293b; border-radius: 11px; padding: 9px 11px; display: flex; flex-direction: column; gap: 6px; transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s; }
.player-card.active-turn { border-color: var(--accent-gold); background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), #0b1120 65%); box-shadow: 0 0 16px rgba(245, 158, 11, 0.2); }
.player-card.is-bankrupt { opacity: 0.45; filter: grayscale(0.85); border-color: #450a0a; }
.player-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.player-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.player-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; background: #1e293b; border: 2px solid #475569; flex-shrink: 0; }
.player-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.player-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.player-tag { font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 4px; background: #1e293b; color: #94a3b8; }
.player-tag.tag-human { background: rgba(239, 68, 68, 0.22); color: #fca5a5; }
.player-jail-badge { font-size: 9px; font-weight: 800; background: #991b1b; color: #fee2e2; padding: 2px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-bankrupt-badge { font-size: 9px; font-weight: 800; background: #450a0a; color: #fca5a5; padding: 2px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-key-badge { font-size: 9px; font-weight: 800; background: rgba(245, 158, 11, 0.2); color: #fbbf24; padding: 2px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-progress-badge { font-size: 9px; font-weight: 800; background: rgba(34, 197, 94, 0.18); color: #86efac; padding: 2px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-angel-badge { font-size: 9px; font-weight: 800; background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(250, 204, 21, 0.25)); border: 1px solid rgba(125, 211, 252, 0.55); color: #bae6fd; padding: 1.5px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-ticket-badge { font-size: 9px; font-weight: 800; background: rgba(16, 185, 129, 0.22); border: 1px solid rgba(52, 211, 153, 0.45); color: #6ee7b7; padding: 1.5px 5px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.player-money { font-size: 13px; font-weight: 800; color: #4ade80; white-space: nowrap; }
.player-money.low-cash { color: #f87171; }

.player-assets { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 3px; }
.asset-group-pill { display: inline-flex; align-items: center; gap: 3px; background: rgba(30, 41, 59, 0.85); border: 1px solid rgba(148, 163, 184, 0.22); padding: 2px 4px; border-radius: 5px; }
.asset-group-pill.is-complete { border-color: #fbbf24; background: rgba(245, 158, 11, 0.14); }
.asset-dot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, 0.5); cursor: pointer; transition: transform 0.12s; flex-shrink: 0; }
.asset-dot.mortgaged { opacity: 0.4; border-style: dashed; }
.asset-dot.is-landmark { border: 1.5px solid #fef08a; box-shadow: 0 0 8px #facc15; }
.asset-dot:hover { transform: scale(1.25); }

.log-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--panel-border); padding-top: 9px; }
.log-panel h3 { font-size: 11.5px; color: var(--text-muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.7px; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.event-log { flex: 1; overflow-y: auto; font-size: 11.5px; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.event-log::-webkit-scrollbar { width: 5px; }
.event-log::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }

.log-item { background: #0b1120; padding: 6px 9px; border-radius: 7px; border-left: 3px solid #3b82f6; line-height: 1.4; display: flex; align-items: flex-start; gap: 7px; animation: logSlideIn 0.2s ease-out; }
.log-item i { margin-top: 3px; font-size: 11.5px; color: #60a5fa; flex-shrink: 0; }
.log-item.log-money { border-left-color: #22c55e; }
.log-item.log-money i { color: #4ade80; }
.log-item.log-warn { border-left-color: #f59e0b; }
.log-item.log-warn i { color: #fbbf24; }
.log-item.log-danger { border-left-color: #ef4444; }
.log-item.log-danger i { color: #f87171; }
.log-item.log-card { border-left-color: #a855f7; }
.log-item.log-card i { color: #c084fc; }
.log-item.log-angel { background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), #0b1120 75%); border-left-color: #38bdf8; }
.log-item.log-angel i { color: #7dd3fc; }
.log-item.log-attack { background: linear-gradient(135deg, rgba(220, 38, 38, 0.22), #0b1120 75%); border-left-color: #f43f5e; }
.log-item.log-attack i { color: #fda4af; }
.log-item.log-landmark { background: linear-gradient(135deg, rgba(180, 83, 9, 0.22), #0b1120 75%); border-left-color: #facc15; }
.log-item.log-landmark i { color: #fde047; }

@keyframes logSlideIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ================= TIPOGRAFI & BADGE LANDMARK EKSKLUSIF ================= */
@keyframes goldSweep { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }

.landmark-pill-exclusive { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 8px; border-radius: 999px; background: linear-gradient(135deg, #0f172a 0%, #292524 60%, #451a03 100%); border: 1.5px solid #facc15; color: #fde047; font-size: 10.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35); }
.landmark-pill-exclusive::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: landmarkShimmer 2.6s infinite ease-in-out; pointer-events: none; }
.landmark-callout { position: relative; overflow: hidden; background: radial-gradient(circle at top, #292524 0%, #0f172a 100%); border: 2px solid #facc15; border-radius: 14px; padding: 16px 14px; text-align: center; margin-bottom: 12px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.35), inset 0 0 24px rgba(250, 204, 21, 0.16); }
.landmark-callout::before { content: ''; position: absolute; top: -40%; bottom: -40%; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(254, 240, 138, 0.2), transparent); animation: landmarkShimmer 2.8s infinite ease-in-out; pointer-events: none; }
.landmark-crown-emblem { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; background: linear-gradient(135deg, #fde047, #b45309); border: 2px solid #fef9c3; color: #0f172a; font-size: 24px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(250, 204, 21, 0.65); }
.landmark-kicker { font-size: 9.5px; font-weight: 800; letter-spacing: 2.6px; color: #fbbf24; text-transform: uppercase; margin-bottom: 3px; }
.landmark-title-exclusive { font-size: 20px; font-weight: 900; letter-spacing: 2.8px; text-transform: uppercase; background: linear-gradient(90deg, #fde047 0%, #ffffff 35%, #f59e0b 65%, #fde047 100%); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldSweep 3.2s linear infinite; margin-bottom: 5px; }
.landmark-callout p { font-size: 12px; color: #e2e8f0; line-height: 1.45; }
.landmark-callout p strong { color: #fde047; }

/* ================= DRAMATIC JAIL CINEMATIC OVERLAY ================= */
.jail-cinematic { position: fixed; inset: 0; z-index: 2000; background: rgba(4, 6, 14, 0.88); display: flex; align-items: center; justify-content: center; overflow: hidden; animation: fadeIn 0.15s ease-out; }
.siren-light { position: absolute; top: 0; bottom: 0; width: 55%; pointer-events: none; filter: blur(70px); }
.siren-red { left: -10%; background: radial-gradient(circle, rgba(239, 68, 68, 0.72), transparent 70%); animation: sirenRedFlash 0.45s infinite alternate; }
.siren-blue { right: -10%; background: radial-gradient(circle, rgba(37, 99, 235, 0.72), transparent 70%); animation: sirenBlueFlash 0.45s infinite alternate; }
@keyframes sirenRedFlash { 0% { opacity: 0.95; transform: scale(1.08); } 100% { opacity: 0.1; transform: scale(0.95); } }
@keyframes sirenBlueFlash { 0% { opacity: 0.1; transform: scale(0.95); } 100% { opacity: 0.95; transform: scale(1.08); } }
.prison-bars { position: absolute; inset: 0; display: flex; justify-content: space-evenly; pointer-events: none; animation: barsSlam 0.34s cubic-bezier(0.18, 0.89, 0.32, 1.15) forwards; }
.prison-bars span { width: clamp(12px, 1.6vw, 22px); height: 100%; background: linear-gradient(90deg, #1e293b 0%, #64748b 35%, #0f172a 75%, #334155 100%); box-shadow: 6px 0 18px rgba(0, 0, 0, 0.85); }
@keyframes barsSlam { 0% { transform: translateY(-100%); } 85% { transform: translateY(2%); } 100% { transform: translateY(0%); } }
.jail-cinematic-card { position: relative; z-index: 10; text-align: center; background: rgba(15, 23, 42, 0.92); border: 3px solid #ef4444; border-radius: 18px; padding: 24px 30px; max-width: 420px; width: 88%; box-shadow: 0 0 50px rgba(239, 68, 68, 0.5), 0 20px 50px rgba(0, 0, 0, 0.9); animation: jailCardShake 0.42s ease-out 0.22s; }
@keyframes jailCardShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px) rotate(-1.5deg); } 40% { transform: translateX(10px) rotate(1.5deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.jail-skull-wrap { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; background: rgba(220, 38, 38, 0.22); border: 2px solid #ef4444; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #f87171; }
.jail-stamp { display: inline-block; border: 3px solid #ef4444; color: #ef4444; font-size: 18px; font-weight: 900; letter-spacing: 4px; padding: 4px 14px; border-radius: 6px; transform: rotate(-4deg); margin-bottom: 10px; }
.jail-cinematic-card h2 { font-size: 20px; font-weight: 800; color: #ffffff; margin-bottom: 5px; }
.jail-cinematic-card p { font-size: 13px; color: #cbd5e1; line-height: 1.45; }

/* ================= MODAL OVERLAY & CARDS (ANTI-CLIPPING 92dvh) ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  animation: fadeIn 0.18s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-host { width: 100%; max-height: 100%; display: flex; justify-content: center; align-items: center; }

.modal-content {
  background: #ffffff;
  color: #111827;
  width: 100%;
  max-width: 395px;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
  border: 3px solid #111827;
  animation: popScale 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-content.modal-wide { max-width: 640px; }
.modal-content.modal-auction { max-width: 450px; }
@keyframes popScale { from { opacity: 0; transform: scale(0.92) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.deed-header { padding: 14px 16px; text-align: center; color: #fff; border-bottom: 2px solid #111827; flex-shrink: 0; }
.deed-header.light-text-dark { color: #111827; }
.deed-subtitle { font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.92; }
.deed-title { font-size: 18px; font-weight: 800; margin-top: 3px; }
.deed-body { padding: 13px 16px; font-size: 13px; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.deed-row { display: flex; justify-content: space-between; align-items: center; padding: 4.5px 0; gap: 8px; }
.deed-row.highlight { font-weight: 800; border-bottom: 1px solid #e5e7eb; padding-bottom: 8px; margin-bottom: 6px; }
.deed-divider { border: none; border-top: 1px dashed #cbd5e1; margin: 8px 0; }
.deed-footer { padding: 10px 16px 14px; text-align: center; background: #f8fafc; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
.deed-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 9px; }
.btn-close-modal { width: 100%; padding: 10px; border: none; border-radius: 10px; background: #111827; color: #fff; font-weight: 700; font-family: inherit; cursor: pointer; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions-stack { display: flex; flex-direction: column; gap: 7px; }

.btn-buy-confirm { flex: 1.3; padding: 10px; border: none; border-radius: 10px; background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; font-weight: 800; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-buy-confirm:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-takeover-confirm { flex: 1.4; padding: 10px; border: none; border-radius: 10px; background: linear-gradient(135deg, #f97316, #dc2626); color: #fff; font-weight: 800; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-takeover-confirm:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-landmark-confirm { flex: 1.5; padding: 10px; border: 1.5px solid #fde047; border-radius: 10px; background: linear-gradient(135deg, #0f172a 0%, #451a03 100%); color: #fde047; font-weight: 900; letter-spacing: 0.6px; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 6px 18px rgba(234, 179, 8, 0.4); }
.btn-landmark-confirm:disabled { background: #9ca3af; border-color: #9ca3af; color: #fff; box-shadow: none; cursor: not-allowed; }
.btn-pass { flex: 0.9; padding: 10px; border: none; border-radius: 10px; background: #e2e8f0; color: #111827; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 5px; }

.btn-angel-use { width: 100%; padding: 10px 14px; border: 1.5px solid #7dd3fc; border-radius: 10px; background: linear-gradient(135deg, #0284c7, #1d4ed8); color: #ffffff; font-weight: 800; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35); }
.btn-ticket-use { width: 100%; padding: 10px 14px; border: 1.5px solid #6ee7b7; border-radius: 10px; background: linear-gradient(135deg, #059669, #047857); color: #ffffff; font-weight: 800; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 6px 16px rgba(5, 150, 105, 0.32); }

.angel-defense-box { background: linear-gradient(135deg, #eff6ff, #e0f2fe); border: 2px solid #38bdf8; border-radius: 12px; padding: 13px; text-align: center; margin-bottom: 10px; }
.angel-defense-box i.angel-hero-icon { font-size: 32px; color: #0284c7; margin-bottom: 6px; }
.angel-defense-box strong { display: block; font-size: 14px; color: #0c4a6e; margin-bottom: 4px; }
.angel-defense-box p { font-size: 12px; color: #334155; line-height: 1.45; }

.attack-target-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; margin-top: 8px; }
.attack-target-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 9px; border: 2px solid #e2e8f0; background: #f8fafc; cursor: pointer; font-family: inherit; text-align: left; transition: all 0.14s; }
.attack-target-item:hover { border-color: #94a3b8; }
.attack-target-item.selected { border-color: #dc2626; background: #fef2f2; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16); }
.attack-target-left { display: flex; align-items: center; gap: 8px; min-width: 0; }

.fast-build-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.fast-opt-btn { border: 2px solid #cbd5e1; background: #f8fafc; border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; font-family: inherit; transition: all 0.14s; display: flex; flex-direction: column; gap: 3px; }
.fast-opt-btn:hover:not(:disabled) { border-color: #64748b; }
.fast-opt-btn.selected { border-color: #16a34a; background: #f0fdf4; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22); }
.fast-opt-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.fast-opt-title { font-size: 12.5px; font-weight: 800; color: #0f172a; display: flex; align-items: center; justify-content: space-between; }
.fast-opt-cost { font-size: 12px; font-weight: 800; color: #15803d; }
.fast-opt-rent { font-size: 10.5px; color: #64748b; font-weight: 600; }
.takeover-callout { background: #fff7ed; border: 1.5px solid #fb923c; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; color: #9a3412; line-height: 1.45; }
.win-reason-pill { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #dc2626); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px; }

/* Kelola Aset Modal */
.manage-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; background: #f1f5f9; padding: 9px 12px; border-radius: 10px; margin-bottom: 11px; font-size: 12.5px; font-weight: 700; }
.manage-group-section { margin-bottom: 11px; border: 1.5px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.manage-group-header { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; padding: 7px 12px; border-bottom: 1px solid #e2e8f0; font-size: 12px; font-weight: 800; color: #334155; }
.manage-group-title { display: flex; align-items: center; gap: 8px; }
.manage-group-badge { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: #e2e8f0; color: #475569; }
.manage-group-badge.complete { background: #dcfce7; color: #166534; }
.manage-list { display: flex; flex-direction: column; }
.manage-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #fff; border-bottom: 1px solid #f1f5f9; }
.manage-item:last-child { border-bottom: none; }
.manage-item.is-mortgaged { background: #f8fafc; opacity: 0.85; }
.manage-item-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.manage-color-square { width: 22px; height: 22px; min-width: 22px; min-height: 22px; aspect-ratio: 1 / 1; border-radius: 6px; flex-shrink: 0; border: 1.5px solid rgba(15, 23, 42, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.manage-title { font-weight: 800; font-size: 13px; color: #0f172a; }
.manage-sub { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.manage-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }

.btn-mini { padding: 6px 10px; border-radius: 8px; border: none; font-size: 11.5px; font-weight: 800; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.btn-mini:disabled { opacity: 0.36; cursor: not-allowed; }
.btn-mini-build { background: #16a34a; color: #fff; }
.btn-mini-sell { background: #f59e0b; color: #fff; }
.btn-mini-mortgage { background: #475569; color: #fff; }
.btn-mini-unmortgage { background: #2563eb; color: #fff; }
.btn-mini-trade { background: #7c3aed; color: #fff; }

/* Lelang, Trade & GameOver */
.auction-status-box { background: #0f172a; color: #f8fafc; border-radius: 12px; padding: 12px; text-align: center; margin-bottom: 10px; }
.auction-bid-amount { font-size: 24px; font-weight: 800; color: #4ade80; margin: 3px 0; }
.auction-leader { font-size: 12px; color: #cbd5e1; }
.auction-bidders { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 8px; }
.bidder-chip { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: #e2e8f0; color: #0f172a; display: inline-flex; align-items: center; gap: 5px; }
.bidder-chip.leading { background: #fef3c7; border: 1.5px solid #f59e0b; color: #92400e; }
.bidder-chip.active-bidder { box-shadow: 0 0 0 2px #2563eb; }
.bidder-chip.folded { opacity: 0.4; text-decoration: line-through; }
.auction-log { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; height: 84px; overflow-y: auto; font-size: 11.5px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.auction-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.btn-bid { padding: 9px 6px; border: none; border-radius: 8px; background: #16a34a; color: #fff; font-weight: 800; font-size: 12px; font-family: inherit; cursor: pointer; }
.btn-bid:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-fold { width: 100%; padding: 9px; border: none; border-radius: 8px; background: #ef4444; color: #fff; font-weight: 800; font-family: inherit; cursor: pointer; }
.btn-fold:disabled { opacity: 0.5; cursor: not-allowed; }
.auction-spectate-note { text-align: center; font-size: 12px; font-weight: 700; color: #64748b; background: #f1f5f9; padding: 9px; border-radius: 8px; }

.trade-partner-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; font-size: 12.5px; }
.trade-partner-bar select { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1.5px solid #cbd5e1; font-family: inherit; font-weight: 700; }
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trade-col { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 9px; display: flex; flex-direction: column; gap: 7px; }
.trade-col h4 { font-size: 12.5px; color: #0f172a; border-bottom: 1px solid #e2e8f0; padding-bottom: 5px; }
.trade-prop-list { max-height: 165px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.trade-group-label { font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.trade-prop-item { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; background: #fff; padding: 5px 7px; border-radius: 6px; border: 1px solid #e2e8f0; cursor: pointer; }
.trade-swatch { width: 14px; height: 14px; min-width: 14px; min-height: 14px; aspect-ratio: 1 / 1; border-radius: 4px; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.2); }
.trade-cash-input { width: 100%; padding: 7px 9px; border-radius: 8px; border: 1.5px solid #cbd5e1; font-family: inherit; font-weight: 700; font-size: 12.5px; }
.trade-feedback { margin-top: 9px; padding: 8px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; text-align: center; }
.trade-feedback.ok { background: #dcfce7; color: #166534; }
.trade-feedback.err { background: #fee2e2; color: #991b1b; }
.trade-confirm-box { background: #f8fafc; border: 2px solid #7c3aed; border-radius: 12px; padding: 13px; text-align: center; }
.trade-confirm-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; text-align: left; }
.trade-confirm-col { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px; font-size: 12px; }

.gameover-trophy { font-size: 48px; color: #f59e0b; margin-bottom: 6px; }
.ranking-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ranking-row { display: flex; justify-content: space-between; align-items: center; background: #f1f5f9; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; }

/* 3D Card Flip */
.flip-scene { width: 345px; max-width: 92vw; height: min(260px, 82dvh); perspective: 1100px; }
.flip-card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1); }
.flip-card.is-flipped { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65); border: 4px solid #ffffff; overflow: hidden; display: flex; flex-direction: column; }
.flip-back { align-items: center; justify-content: center; gap: 12px; color: #fff; text-align: center; }
.flip-back.theme-chance { background: repeating-linear-gradient(45deg, #ea580c, #ea580c 14px, #f97316 14px, #f97316 28px); }
.flip-back.theme-chest { background: repeating-linear-gradient(45deg, #1d4ed8, #1d4ed8 14px, #2563eb 14px, #2563eb 28px); }
.flip-back-inner { background: rgba(15, 23, 42, 0.45); border: 2px dashed rgba(255, 255, 255, 0.8); border-radius: 14px; padding: 20px 26px; }
.flip-back-inner i { font-size: 42px; margin-bottom: 8px; display: block; }
.flip-back-inner span { font-size: 17px; font-weight: 800; letter-spacing: 2px; }

.flip-front { transform: rotateY(180deg); background: #fffbeb; color: #111827; }
.flip-front.theme-chest { background: #eff6ff; }
.flip-front.theme-angel { background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%); border-color: #fde047; }
.flip-front.theme-ticket { background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%); border-color: #6ee7b7; }
.flip-front.theme-attack { background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%); border-color: #fda4af; }

.card-front-banner { padding: 9px 15px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.theme-chance .card-front-banner { background: linear-gradient(135deg, #ea580c, #c2410c); }
.theme-chest .card-front-banner { background: linear-gradient(135deg, #2563eb, #1e40af); }
.theme-angel .card-front-banner { background: linear-gradient(135deg, #0284c7, #0369a1); }
.theme-ticket .card-front-banner { background: linear-gradient(135deg, #059669, #047857); }
.theme-attack .card-front-banner { background: linear-gradient(135deg, #be123c, #7f1d1d); }

.card-front-body { flex: 1; padding: 12px 18px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; }
.card-front-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 21px; }
.theme-chance .card-front-icon { background: #ffedd5; color: #c2410c; }
.theme-chest .card-front-icon { background: #dbeafe; color: #1d4ed8; }
.theme-angel .card-front-icon { background: linear-gradient(135deg, #bae6fd, #fef08a); color: #0369a1; box-shadow: 0 0 16px rgba(56, 189, 248, 0.55); }
.theme-ticket .card-front-icon { background: #a7f3d0; color: #047857; }
.theme-attack .card-front-icon { background: #fecdd3; color: #be123c; }

.card-front-title { font-size: 16px; font-weight: 800; color: #0f172a; }
.card-front-text { font-size: 12.5px; line-height: 1.4; color: #334155; }
.card-front-footer { padding: 0 16px 12px; }
.btn-card-ok { width: 100%; padding: 9px; border: none; border-radius: 10px; font-weight: 800; font-size: 13px; font-family: inherit; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.theme-chance .btn-card-ok { background: #ea580c; }
.theme-chest .btn-card-ok { background: #2563eb; }
.theme-angel .btn-card-ok { background: linear-gradient(135deg, #0284c7, #1d4ed8); }
.theme-ticket .btn-card-ok { background: linear-gradient(135deg, #059669, #047857); }
.theme-attack .btn-card-ok { background: linear-gradient(135deg, #e11d48, #9f1239); }
.bot-auto-note { text-align: center; font-size: 11.5px; font-weight: 700; color: #64748b; padding: 5px 0; }

/* ===================================================================== */
/* ================= RESPONSIVE 1: IPAD LANDSCAPE (721px - 1120px) ===== */
/* ===================================================================== */
@media (min-width: 721px) and (max-width: 1120px) and (orientation: landscape) and (min-height: 561px) {
  .game-layout { grid-template-columns: 1fr 290px; }
  .sidebar { padding: 10px; }
  .player-card { padding: 8px 9px; }
}

/* ===================================================================== */
/* ================= RESPONSIVE 2: IPAD PORTRAIT (BEBAS MAIN!) ========= */
/* ===================================================================== */
@media (min-width: 721px) and (max-width: 1080px) and (orientation: portrait) {
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 8px;
  }

  .game-layout.sidebar-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 0px;
  }

  .sidebar { padding: 10px 12px; }
  .sidebar-header { padding-bottom: 7px; margin-bottom: 7px; }

  .sidebar-content-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 10px;
    min-height: 0;
  }

  .players-list { max-height: none; margin-bottom: 0; height: 100%; }
  .log-panel { border-top: none; border-left: 1px solid var(--panel-border); padding-top: 0; padding-left: 10px; }
}

/* ===================================================================== */
/* ================= RESPONSIVE 3: HP PORTRAIT (LOBBY RAPI) ============ */
/* ===================================================================== */
@media (max-width: 720px) and (orientation: portrait) {
  .lobby-card { padding: 18px 16px; border-radius: 16px; }
  .lobby-brand h1 { font-size: 20px; }
  .edition-switcher, .rule-switcher { grid-template-columns: 1fr; gap: 7px; }
}

/* ===================================================================== */
/* ================= RESPONSIVE 4: HP LANDSCAPE — KOKPIT KANAN ========= */
/* ===================================================================== */
body.is-phone-landscape .lobby-card { max-width: min(760px, 96vw); padding: 12px 16px; border-radius: 16px; }
body.is-phone-landscape .lobby-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
body.is-phone-landscape .lobby-brand .brand-badge { margin-bottom: 0; font-size: 9.5px; padding: 3px 9px; }
body.is-phone-landscape .lobby-brand h1 { font-size: 17px; margin-bottom: 0; }
body.is-phone-landscape .lobby-brand p { display: none; }
body.is-phone-landscape .lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
body.is-phone-landscape .form-group { margin-bottom: 8px; }
body.is-phone-landscape .form-group label { font-size: 11px; margin-bottom: 4px; }
body.is-phone-landscape .form-group input,
body.is-phone-landscape .form-group select { padding: 7px 10px; font-size: 12.5px; }
body.is-phone-landscape .edition-btn,
body.is-phone-landscape .rule-btn { padding: 7px 8px; gap: 7px; }
body.is-phone-landscape .edition-icon,
body.is-phone-landscape .rule-icon { width: 28px; height: 28px; font-size: 12px; }
body.is-phone-landscape .edition-meta strong { font-size: 11.5px; }
body.is-phone-landscape .edition-meta small { font-size: 9.5px; }
body.is-phone-landscape .mode-switcher { margin-bottom: 8px; padding: 3px; }
body.is-phone-landscape .mode-btn { padding: 6px; font-size: 11.5px; }
body.is-phone-landscape .token-opt { padding: 6px 0; font-size: 15px; }
body.is-phone-landscape .btn-primary { padding: 9px; font-size: 13px; }

/* Arena HP Landscape: Papan Dinamis Penuh di Kiri + Kokpit Kanan Fleksibel */
body.is-phone-landscape .floating-viewport-controls { display: none; }

body.is-phone-landscape .game-layout,
body.is-phone-landscape .game-layout.sidebar-collapsed {
  grid-template-columns: auto minmax(245px, 1fr);
  gap: 8px;
  padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}

body.is-phone-landscape .sidebar {
  width: 100% !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  padding: 7px 9px;
  border-radius: 12px;
  gap: 6px;
}

body.is-phone-landscape .sidebar-header,
body.is-phone-landscape .fast-win-guide { display: none !important; }

body.is-phone-landscape .cockpit-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}

.cockpit-tabs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #0b1120;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid #1e293b;
}

.cockpit-tab {
  padding: 5px 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.14s;
}

.cockpit-tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.cockpit-quick-btns { display: flex; gap: 4px; flex-shrink: 0; }

body.is-phone-landscape .sidebar.tab-controls .cockpit-controls-pane { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; }
body.is-phone-landscape .sidebar.tab-controls .sidebar-content-grid { display: none; }
body.is-phone-landscape .sidebar.tab-players .sidebar-content-grid { display: flex; }
body.is-phone-landscape .sidebar.tab-players .players-list { max-height: none; flex: 1; margin-bottom: 0; }
body.is-phone-landscape .sidebar.tab-players .log-panel { display: none; }
body.is-phone-landscape .sidebar.tab-log .sidebar-content-grid { display: flex; }
body.is-phone-landscape .sidebar.tab-log .players-list { display: none; }
body.is-phone-landscape .sidebar.tab-log .log-panel { border-top: none; padding-top: 0; }

.mobile-player-strip { display: flex; gap: 5px; overflow-x: auto; flex-shrink: 0; padding-bottom: 1px; }
.mobile-player-strip::-webkit-scrollbar { display: none; }

.mini-p-chip {
  flex: 1;
  min-width: 78px;
  background: #0b1120;
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.mini-p-chip.active-turn { border-color: #f59e0b; background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), #0b1120 75%); }
.mini-p-chip.is-bankrupt { opacity: 0.4; }
.mini-p-dot { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mini-p-info { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.mini-p-name { font-size: 10px; font-weight: 800; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-p-cash { font-size: 10px; font-weight: 800; color: #4ade80; white-space: nowrap; }
.mini-p-cash.low-cash { color: #f87171; }

.cockpit-dice-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }

body.is-phone-landscape .modal-content { max-width: min(480px, 90vw); }
body.is-phone-landscape .modal-content.modal-wide { max-width: min(640px, 94vw); }
body.is-phone-landscape .deed-header { padding: 9px 14px; }
body.is-phone-landscape .deed-title { font-size: 15.5px; }
body.is-phone-landscape .deed-body { padding: 9px 14px; font-size: 12px; }
body.is-phone-landscape .deed-footer { padding: 8px 14px 10px; }
body.is-phone-landscape .landmark-callout { padding: 10px 12px; margin-bottom: 8px; }
body.is-phone-landscape .landmark-crown-emblem { width: 38px; height: 38px; font-size: 18px; margin-bottom: 4px; }
body.is-phone-landscape .landmark-title-exclusive { font-size: 16px; }
body.is-phone-landscape .jail-cinematic-card { padding: 16px 22px; }
body.is-phone-landscape .jail-skull-wrap { width: 48px; height: 48px; font-size: 22px; margin-bottom: 6px; }
body.is-phone-landscape .jail-stamp { font-size: 15px; margin-bottom: 6px; }
body.is-phone-landscape .jail-cinematic-card h2 { font-size: 17px; }