:root {
  --bg: #0D1622;
  --panel: #162436;
  --panel-hi: #1F324A;
  --ink: #EAF2FA;
  --muted: #8EA3B7;
  --gold: #F5B324;
  --red: #D2263A;
  --ok: #2E9E5B;
  --ok-hi: #38B86C;
  --blue: #1E5CA8;
  --blue-hi: #2C76CF;
  --purple: #7E45C4;
  --border: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(245, 179, 36, 0.45);
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: -webkit-fill-available;
  height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: Nunito, system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden; /* No vertical or horizontal page scrolling */
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
}

/* Fullscreen Viewport & Main Game Container */
.game-viewport {
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #090E17;
}

.game-box {
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 2px 4px;
  padding-left: max(4px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
  padding-bottom: max(2px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow: hidden;
  gap: 2px;
  position: relative;
}

/* Top In-Game HUD */
.hud {
  width: 100%;
  height: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 8px;
  padding-left: max(8px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}
.hud-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.hud-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.hud-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: Bungee, Impact, sans-serif;
  font-size: 13px;
  color: #FF5C6C;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #0F1A28;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
}
.stat b {
  font-family: Bungee, sans-serif;
  font-size: 12px;
  color: #fff;
}
.coin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.3);
}
.hp {
  width: 44px;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.hp i {
  display: block;
  height: 100%;
  background: #FF4757;
  transition: width 0.2s;
}

/* Common Buttons */
.btn {
  font: 800 12px Nunito, system-ui, sans-serif;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  color: #fff;
  background: var(--ok);
  box-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.1s, background-color 0.12s;
  user-select: none;
}
.btn:active {
  transform: translateY(1px);
  box-shadow: 0 0.5px 0 rgba(0, 0, 0, 0.35);
}
.btn:disabled {
  background: #4B5A68;
  cursor: default;
  opacity: 0.65;
}
.btn.ghost {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn.gold {
  background: var(--gold);
  color: #2A1B00;
}
.icon-btn {
  padding: 2px 6px;
  font-size: 12px;
  min-width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn[hidden] { display: none !important; }
/* Privasi & Akun */
.prv { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; align-items: stretch; }
.prv-card { display: flex; flex-direction: column; gap: 8px; }
.prv-card h3 { margin: 0; }
.prv-card p { margin: 0; font-size: 12.5px; line-height: 1.4; color: #CBD5E1; }
.prv-card a.ox-btn { display: inline-flex; justify-content: center; text-decoration: none; margin-top: auto; }
.prv-sw { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #E2E8F0; cursor: pointer; }
.prv-sw input { accent-color: #FACC15; margin-top: 2px; }
.prv-del { margin-top: auto; background: linear-gradient(180deg, #F87171, #B91C1C); color: #fff; }
.prv-msg { min-height: 16px; color: #FDE68A; }
.prv-google { display: flex; flex-direction: column; gap: 4px; }
.prv-google small { font-size: 11px; color: #94A3B8; line-height: 1.3; }
.prv-ok { color: #86EFAC !important; font-weight: 800; }
.prv-done { text-align: center; margin: 6px 0 0; font-weight: 800; color: #86EFAC; }
.prv-link { margin-top: auto; font-size: 11.5px; color: #7DD3FC; }
@media (max-height: 520px) { .prv { gap: 6px; } .prv-card { gap: 5px; padding: 8px 10px; } .prv-card p, .prv-sw { font-size: 11px; } }
.start-btn {
  background: var(--ok);
  font-weight: 800;
  padding: 4px 11px;
  font-size: 12px;
}
.start-btn:not(:disabled):hover {
  background: var(--ok-hi);
}
.shop-btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* Center Game Stage */
/* Center Game Stage */
.stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  background: #000;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

/* In-Stage Message Toast Banner */
.stage-msg {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 22, 34, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s;
}
.stage-msg.bad {
  color: #FF666B;
  border-color: rgba(255, 102, 107, 0.5);
  background: rgba(40, 12, 18, 0.92);
}

/* Floating Bottom Dock (Floating Island Overlay) */
.dock {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: calc(100% - 16px);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 8px 4px;
  background: rgba(11, 19, 32, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 25;
  transition: transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.15), opacity 0.22s ease;
}

.dock.collapsed {
  transform: translateX(-50%) translateY(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.dock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 22px;
}

.tab-group {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.tab-btn {
  font: 800 11px Nunito, sans-serif;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  background: #0F1A28;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s;
}

.tab-btn[aria-selected="true"] {
  background: var(--blue-hi);
  color: #fff;
  border-color: #fff;
}

.dock-info {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.dock-info b {
  color: var(--gold);
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.erase-btn {
  padding: 2px 7px;
  font-size: 11px;
  border: 1px solid rgba(255, 100, 100, 0.35);
  color: #FF8585;
  background: rgba(255, 80, 80, 0.1);
  border-radius: 5px;
}

.dock-hide-btn {
  padding: 2px 7px;
  font-size: 11px;
  color: #94A3B8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
}
.dock-hide-btn:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.25);
}

/* Floating Collapsed Pill Trigger: Diposisikan di pojok kiri bawah (area spawn hero kolom 0-1 yang tidak bisa dibangun)
   sehingga tidak pernah menutupi petak permainan mana pun (kolom 2-19) */
.dock-pill-btn {
  position: absolute;
  bottom: max(6px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  transform: translateY(0);
  z-index: 24;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(15, 26, 40, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  color: #fff;
  font: 800 12px Nunito, sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(56, 189, 248, 0.2);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
  user-select: none;
}
.dock-pill-btn.visible {
  display: inline-flex;
  animation: popIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.dock-pill-btn:hover {
  background: rgba(27, 43, 64, 0.98);
  border-color: #38BDF8;
  transform: translateY(-2px);
}
.dock-pill-icon {
  font-size: 13px;
}
.dock-pill-badge {
  font-size: 10.5px;
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 800;
}

/* Horizontal Scrolling Item Tray */
.tray {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 1px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  width: 100%;
}
.tray::-webkit-scrollbar {
  height: 3px;
}
.tray::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* Compact Arsenal & Terrain Cards */
.card {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 74px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  background: var(--blue);
  background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 8px 8px;
  font: 800 11px/1.1 Nunito, system-ui, sans-serif;
  transition: transform 0.1s, background-color 0.12s, border-color 0.12s;
  user-select: none;
}
.card.terrain {
  background: #1B583A;
}
.card.terrain[aria-pressed="true"] {
  background: #278054;
}
.card svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.card-name {
  font-weight: 800;
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: -0.2px;
}
.card .cost {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #FFE78A;
  white-space: nowrap;
}
.card .cost i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.card[aria-pressed="true"] {
  border-color: #fff;
  background-color: var(--blue-hi);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.card.poor {
  opacity: 0.55;
}
.card.locked {
  background: #3B4755;
  background-image: none;
  cursor: default;
  opacity: 0.65;
}
.card.locked .cost {
  color: #9FB2C6;
}
.card.new {
  animation: pop 0.5s ease 2;
}
@keyframes pop {
  50% { transform: translateY(-2px) scale(1.03); }
}

/* Modals & Dialogs */
.overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 14, 22, 0.78);
  padding: 10px;
  overflow: auto;
  backdrop-filter: blur(4px);
}
.overlay[hidden] {
  display: none;
}
.sheet {
  background: #1B3D6B;
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 440px;
  width: 100%;
  max-height: calc(100% - 16px);
  overflow: auto;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 16px 16px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.sheet h2 {
  font-family: Bungee, Impact, sans-serif;
  font-size: 18px;
  margin: 0 0 6px;
}
.sheet p {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.35;
}
.poster {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #F3E3C3;
  color: #3A2A1A;
  border-radius: 8px;
  padding: 6px;
  margin: 0 0 6px;
  border: 2px dashed #8B5A2B;
}
.brief-intel {
  background: rgba(253, 224, 71, 0.12);
  border: 1px solid rgba(253, 224, 71, 0.45);
  border-radius: 8px;
  padding: 7px 9px;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
}
.brief-intel ul {
  margin: 4px 0 0;
  padding-left: 16px;
}
.brief-intel li {
  margin: 1px 0;
}
.poster img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: #E8D2A6;
  border-radius: 6px;
}
.poster b {
  display: block;
  font-family: Bungee, Impact, sans-serif;
  font-size: 12px;
  margin-bottom: 1px;
}
.poster span {
  font-size: 11px;
  line-height: 1.2;
  display: block;
}

/* Shop Modal */
.shop-sheet {
  background: #14202E;
  color: #E4ECF4;
  border-radius: 12px;
  padding: 14px;
  max-width: 600px;
  width: 100%;
  max-height: calc(100% - 16px);
  overflow: auto;
  border: 2px solid var(--gold);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 16px 16px;
}
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.shop-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 16px;
  color: var(--gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.shop-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 5px;
}
.shop-tab-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: 800 12px Nunito, sans-serif;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}
.shop-tab-btn[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 7px;
}
.shop-card {
  background: #1C2B3E;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.shop-card.owned {
  border-color: var(--ok);
}
.shop-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
}
.shop-card-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}
.shop-card-name {
  font-family: Bungee, sans-serif;
  font-size: 11.5px;
  color: #fff;
  line-height: 1.2;
}
.shop-card-desc {
  font-size: 11px;
  color: #9FB3C8;
  line-height: 1.25;
  flex: 1;
}
.shop-card-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.badge-owned {
  background: var(--ok);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Portrait Orientation Prompt */
.rotate-hint {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 16, 26, 0.94);
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 14px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.rotate-icon {
  font-size: 44px;
  animation: spin-phone 2.5s ease-in-out infinite;
}
@keyframes spin-phone {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-90deg); }
  75% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
.rotate-sub {
  max-width: 320px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Responsive Rules */
/* Wajib landscape: perangkat sentuh posisi tegak ditutup layar putar (tanpa opsi lanjut tegak) */
@media (orientation: portrait) and (pointer: coarse), (orientation: portrait) and (max-width: 600px) {
  .rotate-hint {
    display: flex;
  }
}

@media (max-width: 680px), (orientation: landscape) and (max-height: 500px) {
  .logo-text { display: none; }
  .hud {
    gap: 3px;
    padding: 2px 4px;
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
  }
  .stat { padding: 2px 4px; font-size: 11px; }
  .btn { padding: 3px 8px; font-size: 11px; }
}

/* HP landscape: bar atas dirampingkan & baki mengambang ultra-compact */
@media (orientation: landscape) and (max-height: 500px) {
  .game-box {
    padding: 1px 3px;
    padding-left: max(4px, env(safe-area-inset-left));
    padding-right: max(4px, env(safe-area-inset-right));
    padding-bottom: max(2px, env(safe-area-inset-bottom));
    gap: 2px;
  }
  .hud { height: 28px; min-height: 28px; }
  .icon-btn { height: 23px; min-width: 23px; }
  .dock {
    bottom: 3px;
    padding: 2px 6px 3px;
    max-width: min(640px, calc(100% - 8px));
  }
  .dock-top { height: 20px; gap: 4px; }
  .tab-btn { padding: 1px 5px; font-size: 10px; }
  .dock-info { font-size: 10px; }
  .dock-actions .btn { padding: 1px 5px; font-size: 10px; }
  .tray { gap: 4px; padding: 1px 0; }
  .card {
    height: 32px;
    min-width: 66px;
    padding: 1px 5px;
    gap: 4px;
    font-size: 10px;
  }
  .card svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }
  .card-name { font-size: 10px; }
  .card .cost { font-size: 9.5px; }
  .dock-pill-btn {
    bottom: max(4px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    padding: 3px 10px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card.new { animation: none; }
  .rotate-icon { animation: none; }
}

/* Enemy Intel Modal & Cards */
.intel-hud-btn {
  font: 800 11px Nunito, sans-serif;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38BDF8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s;
}
.intel-hud-btn:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}
.intel-sheet {
  background: #121A26;
  color: #E4ECF4;
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 680px;
  width: 95%;
  max-height: calc(100% - 16px);
  overflow-y: auto;
  border: 2px solid #38BDF8;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.intel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
}
.intel-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 15px;
  color: #38BDF8;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.intel-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.intel-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.intel-nav-btns {
  display: flex;
  gap: 4px;
}
.intel-nav-btn {
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.intel-badge {
  font-family: Nunito, sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.intel-badge.active {
  background: rgba(224, 72, 63, 0.25);
  border: 1px solid #E0483F;
  color: #FF7B72;
}
.intel-badge.next {
  background: rgba(43, 163, 154, 0.25);
  border: 1px solid #2BA39A;
  color: #5EEAD4;
}
.intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  overflow-y: auto;
  max-height: 52vh;
  padding-right: 2px;
}
.intel-card {
  background: #1A2636;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.intel-card.boss-card {
  border-color: #F59E0B;
  background: linear-gradient(145deg, #241D2B, #1B2433);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.intel-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.intel-avatar-box {
  width: 44px;
  height: 44px;
  background: #111A24;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.intel-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.intel-head-text {
  flex: 1;
  min-width: 0;
}
.intel-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.intel-name {
  font-family: Bungee, Impact, sans-serif;
  font-size: 12.5px;
  color: #fff;
}
.intel-tag {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}
.intel-tag.boss {
  background: #EF4444;
  color: #fff;
  letter-spacing: 0.5px;
}
.intel-tag.pct {
  background: rgba(255, 255, 255, 0.12);
  color: #CBD5E1;
}
.intel-role {
  font-size: 10.5px;
  color: #38BDF8;
  font-weight: 800;
}
.intel-stats-mini {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: #94A3B8;
  margin-top: 2px;
}
.intel-stats-mini b {
  color: #E2E8F0;
}
.intel-desc {
  font-size: 11px;
  line-height: 1.25;
  color: #CBD5E1;
}
.intel-tactic-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 10.5px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 3px solid #38BDF8;
}
.boss-card .intel-tactic-box {
  border-left-color: #F59E0B;
}
.tactic-label {
  color: #FFE27A;
}
.intel-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Weapon Placement Confirmation Dialog */
.confirm-dialog {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: 90%;
  max-width: 360px;
  pointer-events: auto;
  animation: popIn 0.18s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.confirm-card {
  background: rgba(18, 26, 42, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.confirm-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 13px;
  color: #FFE27A;
  letter-spacing: 0.3px;
}
.confirm-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 15px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.confirm-close:hover {
  color: #fff;
}
.confirm-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.confirm-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}
.confirm-badge.cost {
  background: rgba(245, 195, 59, 0.2);
  color: #FDE047;
  border: 1px solid rgba(245, 195, 59, 0.4);
}
.confirm-badge.coord {
  background: rgba(148, 163, 184, 0.2);
  color: #E2E8F0;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.confirm-badge.radius {
  background: rgba(56, 189, 248, 0.2);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.confirm-note {
  font-size: 10.5px;
  color: #94A3B8;
  line-height: 1.25;
}
.confirm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #E2E8F0;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.confirm-checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--gold);
  cursor: pointer;
}
.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 2px;
}
.confirm-actions .btn {
  padding: 5px 12px;
  font-size: 12px;
}
.place-mode-btn {
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
}
.place-mode-btn.active {
  background: rgba(245, 195, 59, 0.2);
  color: var(--gold);
  border-color: var(--gold);
}

/* Debug & Sandbox Modal */
.debug-overlay {
  z-index: 120;
}
.debug-sheet {
  background: #0E1624;
  color: #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 640px;
  width: 95%;
  max-height: calc(100% - 16px);
  overflow-y: auto;
  border: 2px solid #8B5CF6;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8);
  background-image: linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debug-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(139, 92, 246, 0.25);
  padding-bottom: 6px;
}
.debug-title-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.debug-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 15px;
  color: #C4B5FD;
  margin: 0;
}
.debug-subtitle {
  font-size: 10.5px;
  color: #94A3B8;
}
.debug-close-btn {
  font-size: 16px;
  padding: 2px 8px;
  line-height: 1;
}
.debug-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debug-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.debug-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.debug-section-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 12px;
  color: #FDE047;
}
.debug-count-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}
.debug-label {
  font-size: 11px;
  color: #CBD5E1;
}
.debug-count-btns {
  display: flex;
  gap: 3px;
}
.debug-count-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.debug-count-btn.active {
  background: #8B5CF6;
  border-color: #A78BFA;
  color: #fff;
}
.debug-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.debug-hero-btn {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  color: #fff;
  transition: all 0.15s;
}
.debug-hero-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #8B5CF6;
  transform: translateY(-1px);
}
.debug-hero-btn:active {
  transform: scale(0.97);
}
.debug-hero-btn.boss {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}
.debug-hero-btn.boss:hover {
  background: rgba(245, 158, 11, 0.35);
  border-color: #F59E0B;
}
.debug-hero-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.debug-hero-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.debug-hero-name {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #F1F5F9;
}
.debug-hero-sub {
  font-size: 9.5px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.debug-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 6px;
}
.debug-btn {
  font-size: 11px;
  padding: 5px 8px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
}
.debug-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
}
.debug-btn.bad {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}
.debug-btn.bad:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #EF4444;
}
.debug-btn.active {
  background: #3B82F6;
  border-color: #60A5FA;
  color: #fff;
}
.debug-wave-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.debug-wave-btn {
  flex: 1 1 calc(10% - 5px);
  min-width: 48px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7DD3FC;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 4px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}
.debug-wave-btn:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38BDF8;
  color: #fff;
}
.debug-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.debug-hint {
  font-size: 10px;
  color: #94A3B8;
}
.debug-hud-btn {
  color: #C4B5FD !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
  background: rgba(139, 92, 246, 0.15) !important;
}


/* ===== Menu Utama ===== */
[hidden] { display: none !important; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(191, 227, 255, 0.04) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(191, 227, 255, 0.04) 0 1px, transparent 1px 32px),
    linear-gradient(160deg, rgba(10, 25, 48, 0.95), rgba(5, 10, 20, 0.97));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.menu-card {
  position: relative;
  display: flex;
  width: min(890px, 96vw);
  height: min(440px, 94vh);
  background: linear-gradient(145deg, #0B132B 0%, #152238 50%, #0D162A 100%);
  border-radius: 22px;
  border: 2px solid #F59E0B;
  box-shadow: 
    0 24px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 0 45px rgba(245, 158, 11, 0.25);
  overflow: hidden;
  animation: menuIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-card::before, .menu-card::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid #FACC15;
  pointer-events: none;
  z-index: 10;
}
.menu-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.menu-card::after { bottom: 8px; right: 8px; border-left: none; border-top: none; border-bottom-right-radius: 8px; }

@keyframes menuIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Sisi Kiri: Karya Seni Heroik SVG */
.menu-hero-side {
  flex: 0 0 46%;
  position: relative;
  background: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.5) 0%, rgba(15, 23, 42, 0.95) 75%);
  border-right: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.menu-hero-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sisi Kanan: Pusat Tindakan & Tombol */
.menu-actions-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px 10px 16px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.menu-head {
  margin-bottom: 3px;
}
.menu-game-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 29px;
  line-height: 1;
  background: linear-gradient(180deg, #FFFBEB 0%, #FDE047 35%, #F59E0B 75%, #D97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2.5px 0 #78350F) drop-shadow(0 5px 12px rgba(0,0,0,0.6));
  letter-spacing: 0.5px;
  margin: 0;
}
.menu-subtitle {
  font-size: 11px;
  line-height: 1.35;
  color: #94A3B8;
  font-weight: 700;
  margin: 2px 0 0;
}

.menu-body-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 4px 0;
}

/* Tombol Utama Utama (Hero CTA) */
.btn-hero-play {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, #22C55E 0%, #16A34A 55%, #15803D 100%);
  border: none;
  border-top: 1.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 0 #14532D, 0 8px 18px rgba(22, 163, 74, 0.45);
  color: #FFFFFF;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  overflow: hidden;
  text-decoration: none;
}
.btn-hero-play::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 42%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.btn-hero-play:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 5.5px 0 #14532D, 0 10px 22px rgba(22, 163, 74, 0.6);
}
.btn-hero-play:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #14532D, 0 3px 8px rgba(22, 163, 74, 0.3);
}

.btn-hero-play.continue {
  background: linear-gradient(180deg, #EAB308 0%, #CA8A04 55%, #A16207 100%);
  box-shadow: 0 4px 0 #713F12, 0 8px 18px rgba(202, 138, 4, 0.45);
}
.btn-hero-play.continue:hover {
  box-shadow: 0 5.5px 0 #713F12, 0 10px 22px rgba(202, 138, 4, 0.6);
}
.btn-hero-play.continue:active {
  box-shadow: 0 1px 0 #713F12, 0 3px 8px rgba(202, 138, 4, 0.3);
}

.btn-hero-play-main {
  display: flex;
  align-items: center;
  gap: 11px;
}
.btn-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 14px;
}
.btn-hero-text {
  text-align: left;
}
.btn-hero-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-shadow: 0 1.5px 3px rgba(0,0,0,0.4);
}
.btn-hero-sub {
  font-size: 10px;
  font-weight: 800;
  color: #DCFCE7;
  opacity: 0.92;
}
.btn-hero-play.continue .btn-hero-sub {
  color: #FEF08A;
}
.btn-hero-arrow {
  font-size: 18px;
  font-weight: 900;
  opacity: 0.85;
}

/* Grid Mode Permainan (2 Kolom) */
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.mode-card-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.mode-card-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
  pointer-events: none;
}
.mode-card-btn.raja {
  background: linear-gradient(135deg, #7C3AED 0%, #C026D3 100%);
  border-color: rgba(232, 121, 249, 0.4);
  box-shadow: 0 3px 0 #581C87, 0 4px 12px rgba(124, 58, 237, 0.35);
}
.mode-card-btn.raja:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4.5px 0 #581C87, 0 6px 16px rgba(124, 58, 237, 0.5);
}
.mode-card-btn.arch {
  background: linear-gradient(135deg, #0284C7 0%, #0D9488 100%);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 3px 0 #075985, 0 4px 12px rgba(2, 132, 199, 0.35);
}
.mode-card-btn.arch:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4.5px 0 #075985, 0 6px 16px rgba(2, 132, 199, 0.5);
}
.mode-card-btn:active {
  transform: translateY(1.5px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.5);
}
.mode-card-icon {
  font-size: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.mode-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mode-card-title {
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mode-card-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  white-space: nowrap;
}
.mode-badge-new {
  background: #FACC15;
  color: #3A2A00;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Tombol Fort Khusus (Benteng PvP) */
.fort-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.fort-pill-btn {
  background: linear-gradient(135deg, #1E3A8A 0%, #4338CA 100%);
  border: 1.5px solid #60A5FA;
  border-radius: 9px;
  padding: 6px 10px;
  color: #EFF6FF;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.fort-pill-btn:hover {
  background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
  border-color: #93C5FD;
}

/* Baris Tutorial & Latihan (Ringkas & Bersih) */
.tutorials-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.tut-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  padding: 7px 10px;
  color: #CBD5E1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tut-pill-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(250, 204, 21, 0.6);
  color: #fff;
}
.tut-pill-btn.suggest {
  border-color: #FACC15;
  color: #FEF08A;
  background: rgba(120, 80, 10, 0.4);
  box-shadow: 0 0 0 1px #FACC15;
  animation: suggestPulse 1.8s ease-in-out infinite;
}

.menu-badge {
  background: #FDE047;
  color: #3A2A00;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 5px;
}

/* Footer Menu */
.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #64748B;
  font-weight: 700;
  gap: 6px;
}
.menu-footer-guard {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #94A3B8;
  white-space: nowrap;
}
.menu-footer-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.footer-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #CBD5E1;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.footer-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: #FDE047;
  color: #fff;
}
.footer-btn.ios {
  background: rgba(30, 58, 138, 0.85);
  border-color: #60A5FA;
  color: #DBEAFE;
}

/* Animasi Rotasi Roda Gigi SVG */
@keyframes spinCw { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes spinCcw { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.gear-anim-cw { transform-box: fill-box; transform-origin: center; animation: spinCw 24s linear infinite; }
.gear-anim-ccw { transform-box: fill-box; transform-origin: center; animation: spinCcw 32s linear infinite; }

@keyframes suggestPulse {
  0%, 100% { box-shadow: 0 0 0 1px #FACC15, 0 0 0 0 rgba(253, 224, 71, 0.55); }
  50% { box-shadow: 0 0 0 1px #FACC15, 0 0 0 6px rgba(253, 224, 71, 0); }
}

/* Adaptasi Layar Kecil / Lanskap HP */
@media (max-height: 480px), (max-width: 720px) {
  .menu-card { width: min(840px, 98vw); height: min(390px, 96vh); }
  .menu-hero-side { flex-basis: 40%; }
  .menu-actions-side { padding: 10px 14px 8px 12px; }
  .menu-game-title { font-size: 22px; }
  .menu-subtitle { font-size: 9.5px; }
  .btn-hero-play { padding: 7px 12px; border-radius: 10px; }
  .btn-hero-icon { width: 24px; height: 24px; font-size: 11px; }
  .btn-hero-title { font-size: 13.5px; }
  .btn-hero-sub { font-size: 8.5px; }
  .mode-card-btn { padding: 5px 8px; border-radius: 9px; gap: 6px; }
  .mode-card-icon { font-size: 17px; }
  .mode-card-title { font-size: 11.5px; }
  .mode-card-sub { font-size: 8.5px; }
  .tut-pill-btn { padding: 4px 6px; font-size: 9.5px; border-radius: 8px; }
  .menu-badge { font-size: 8px; padding: 1px 4px; margin-left: 3px; }
  .menu-footer-guard { display: none; }
  .menu-footer { justify-content: center; }
  .footer-btn { padding: 2px 5px; font-size: 9px; }
}

@media (max-width: 520px) {
  .menu-hero-side { display: none; }
}

/* ===== Tutorial Interaktif ===== */
.tut-layer {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
}
.tut-block {
  position: fixed;
  background: rgba(6, 10, 20, 0.62);
  pointer-events: auto;
}
.tut-block.clear {
  background: transparent;
  pointer-events: none;
}
.tut-shield {
  position: fixed;
  pointer-events: auto;
}
.tut-ring {
  position: fixed;
  border: 3px solid #FDE047;
  border-radius: 9px;
  pointer-events: none;
  animation: tutRing 1.1s ease-in-out infinite;
}
@keyframes tutRing {
  0%, 100% { box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.35), 0 0 16px rgba(253, 224, 71, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(253, 224, 71, 0.12), 0 0 26px rgba(253, 224, 71, 0.85); }
}
.tut-hand {
  position: fixed;
  font-size: 28px;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5));
  animation: tutHand 0.9s ease-in-out infinite;
}
@keyframes tutHand { 50% { transform: translateY(8px); } }
.tut-coach {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, 94vw);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #F7F1E3;
  color: #2A2118;
  border: 3px solid #1E1A24;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}
.tut-coach.at-top { top: 44px; }
.tut-coach.at-bottom { bottom: 12px; }
.tut-coach.at-center { top: 50%; transform: translate(-50%, -50%); }
.tut-coach.at-corner { top: 44px; width: min(420px, 90vw); opacity: 0.96; }
.tut-coach.pop { animation: tutPop 0.28s ease-out; }
.tut-coach.at-center.pop { animation: tutPopCenter 0.28s ease-out; }
@keyframes tutPop { from { transform: translateX(-50%) scale(0.94); } to { transform: translateX(-50%) scale(1); } }
@keyframes tutPopCenter { from { transform: translate(-50%, -50%) scale(0.94); } to { transform: translate(-50%, -50%) scale(1); } }
.tut-face {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #FFE3A3;
  border: 2px solid #1E1A24;
  object-fit: contain;
  padding: 2px;
}
.tut-bulb {
  position: absolute;
  left: 50px;
  top: -12px;
  font-size: 20px;
  display: none;
  animation: logoFloat 1.4s ease-in-out infinite;
}
.tut-coach.idea .tut-bulb { display: block; }
.tut-body { flex: 1; min-width: 0; }
.tut-name {
  font-family: Bungee, Impact, sans-serif;
  font-size: 12px;
  color: #1C4E8A;
  margin-bottom: 2px;
}
.tut-prog {
  font-family: Nunito, sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: #8A7A66;
  margin-left: 4px;
}
.tut-text { font-size: 14px; line-height: 1.4; }
.tut-text b { color: #B45309; }
.tut-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.tut-skip {
  background: none;
  border: 0;
  padding: 0;
  font: 700 12px Nunito, sans-serif;
  color: #7A6A56;
  text-decoration: underline;
  cursor: pointer;
}
.tut-btns { display: flex; gap: 6px; margin-left: auto; }
.tut-btn { font-size: 13px; padding: 6px 12px; }
.tut-btn.ghost { background: #3B4F68; color: #fff; }

@media (max-height: 500px) {
  .tut-coach { padding: 6px 9px; gap: 8px; border-width: 2px; }
  .tut-coach.at-top, .tut-coach.at-corner { top: 38px; }
  .tut-face { flex-basis: 42px; width: 42px; height: 42px; }
  .tut-text { font-size: 12.5px; line-height: 1.3; }
  .tut-actions { margin-top: 5px; }
  .tut-hand { font-size: 22px; }
}

/* ===== Tutorial Mode Raja Theme ===== */
.tut-coach.raja {
  background: linear-gradient(145deg, #1E1738 0%, #2A1B4E 60%, #17112B 100%);
  color: #F1F5F9;
  border: 2.5px solid #FFD24A;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 210, 74, 0.25);
}
.tut-coach.raja .tut-face {
  background: #2D1E4E;
  border-color: #FFD24A;
}
.tut-coach.raja .tut-name {
  color: #FFD24A;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.tut-coach.raja .tut-prog {
  background: rgba(255, 210, 74, 0.2);
  color: #FDE68A;
  border: 1px solid rgba(255, 210, 74, 0.4);
  padding: 1px 6px;
  border-radius: 999px;
}
.tut-coach.raja .tut-text b {
  color: #FDE047;
}
.tut-coach.raja .tut-skip {
  color: #CBD5E1;
}
.tut-coach.raja .tut-skip:hover {
  color: #FFD24A;
}
.tut-coach.raja .tut-btn {
  background: linear-gradient(135deg, #EAB308, #CA8A04);
  color: #1F1300;
  font-weight: 800;
  border-color: #FEF08A;
}
.tut-coach.raja .tut-btn:hover {
  background: linear-gradient(135deg, #FACC15, #EAB308);
}
.tut-coach.raja .tut-btn.ghost {
  background: rgba(88, 28, 135, 0.75);
  color: #F3E8FF;
  border-color: rgba(216, 180, 254, 0.4);
}
.tut-coach.raja .tut-btn.ghost:hover {
  background: rgba(107, 33, 168, 0.9);
  color: #fff;
}

.menu-btn.tutorial.raja {
  background: linear-gradient(135deg, #6D28D9, #92400E) !important;
  border-color: rgba(253, 224, 71, 0.45);
}
.menu-btn.tutorial.raja:hover {
  background: linear-gradient(135deg, #7C3AED, #B45309) !important;
  border-color: #FDE047;
}
.menu-btn.tutorial.raja.suggest {
  box-shadow: 0 0 0 2px #FDE047, 0 4px 14px rgba(253, 224, 71, 0.35);
}

.rj-tut-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rj-tut-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* Tombol musik: dicoret saat mati */
.music-btn { position: relative; }
.music-btn.off { opacity: .55; }
.music-btn.off::after {
  content: ""; position: absolute; left: 22%; right: 22%; top: 50%;
  height: 2px; background: #FF6B6B; transform: rotate(-35deg); border-radius: 2px;
}
.menu-foot { flex-wrap: wrap; gap: 6px; }

/* ================= MODE RAJA ================= */
.menu-btn.raja { background: linear-gradient(135deg, #7C3AED, #B45309) !important; }
.menu-badge.new { background: #FFD24A; }
.rj-hud-title { display: none; font-family: Bungee, Impact, sans-serif; font-size: 13px; color: #FFD24A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
body.raja-mode .rj-hud-title { display: inline-block; }
body.raja-mode #startBtn, body.raja-mode #shopBtn, body.raja-mode #intelBtn, body.raja-mode .wave-stat,
body.raja-mode:not(.duel-mek) .gold-stat, body.raja-mode:not(.duel-mek) #dock, body.raja-mode:not(.duel-mek) .dock, body.raja-mode:not(.duel-mek) #dockPillBtn,
body.raja-mode #lotExpand, body.raja-mode .lot-expand { display: none !important; }
body.raja-mode canvas { cursor: default; }

.raja-ui { position: absolute; inset: 0; pointer-events: none; z-index: 20; font-family: system-ui, sans-serif; color: #fff; }
.raja-ui[hidden] { display: none; }
.raja-ui button { pointer-events: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.raja-ui kbd { font: 700 9px/1 system-ui, sans-serif; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.35); border-radius: 3px; padding: 1px 3px; }
.raja-ui.rj-touch kbd { display: none; }

.rj-top { position: absolute; top: 6px; left: 8px; right: 8px; display: flex; align-items: flex-start; gap: 8px; }
.rj-stat, .rj-crown { background: rgba(14,20,34,.72); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rj-stat #rjLives { color: #FF6B6B; letter-spacing: 1px; }
.rj-timer { color: #BAE6FD; font-variant-numeric: tabular-nums; }
.rj-crown { flex-direction: column; align-items: stretch; gap: 3px; min-width: 76px; }
.rj-crown b { color: #FFD24A; }
.rj-crown span { height: 5px; background: rgba(255,255,255,.15); border-radius: 3px; overflow: hidden; }
.rj-crown i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #F59E0B, #FFD24A); }
.rj-cards { display: flex; gap: 5px; margin: 0 auto; }
.rj-card { position: relative; width: 50px; height: 54px; padding: 0; border-radius: 9px; border: 2px solid #FFD24A; background: rgba(40,24,70,.82); cursor: pointer; overflow: hidden; }
.rj-card img { width: 40px; height: 40px; display: block; margin: 1px auto 0; }
.rj-card .rj-cost { position: absolute; left: 0; right: 0; bottom: 1px; font-size: 10px; font-weight: 800; color: #FFD24A; text-shadow: 0 1px 0 #000; }
.rj-card kbd { position: absolute; top: 2px; left: 2px; }
.rj-card.poor { filter: grayscale(.85) brightness(.7); border-color: #64748B; }
.rj-card:active { transform: scale(.94); }
.rj-log-btn { background: rgba(14,20,34,.72); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; font-size: 12px; font-weight: 700; padding: 5px 9px; cursor: pointer; }

.rj-log { position: absolute; top: 66px; right: 8px; width: 220px; max-height: calc(100% - 150px); overflow: auto; pointer-events: auto;
  background: rgba(14,20,34,.86); border: 1px solid rgba(255,210,74,.4); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; line-height: 1.35; }
.rj-log[hidden] { display: none; }
.rj-log-h { font-family: Bungee, Impact, sans-serif; color: #FFD24A; font-size: 12px; margin-bottom: 4px; }
.rj-log-stats { display: flex; gap: 8px; color: #CBD5E1; }
.rj-log-stats b, .rj-log-known b { color: #fff; }
.rj-log-known { margin: 3px 0; color: #FDE68A; }
.rj-log-sub { margin-top: 6px; color: #94A3B8; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.rj-log-row { display: grid; grid-template-columns: 78px 1fr 18px; gap: 5px; align-items: center; margin-top: 3px; }
.rj-log-row i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #EF4444, #F97316); }
.rj-log-row b { text-align: right; }
.rj-log-feed { color: #E2E8F0; margin-top: 2px; font-size: 10.5px; }
.rj-log-empty { color: #94A3B8; margin-top: 4px; }

.rj-skills { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: flex-end; gap: 6px; }
.rj-sk { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: rgba(30,41,59,.78); color: #fff; font-size: 20px; padding: 0; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.rj-sk span { position: relative; z-index: 2; line-height: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; transition: filter 0.16s ease, opacity 0.16s ease; }
.rj-sk span svg { width: 68%; height: 68%; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); pointer-events: none; }
.rj-sk kbd { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); z-index: 4; transition: opacity 0.15s ease; }
.rj-sk .rj-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, rgba(15,23,42,.75) 0%, rgba(2,6,23,.92) 100%); z-index: 3; pointer-events: none; border-top: 1.5px solid rgba(56,189,248,.65); box-shadow: 0 0 8px rgba(56,189,248,.35); }
.rj-sk .rj-cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Bungee, Impact, system-ui, sans-serif; font-size: 20px; font-weight: 800; color: #FFFFFF; text-shadow: 0 2px 4px #000, 0 0 10px rgba(0,0,0,.95), 0 0 16px rgba(254,240,138,.6); letter-spacing: -0.5px; z-index: 5; pointer-events: none; opacity: 0; transform: scale(0.85); transition: opacity 0.15s ease, transform 0.15s ease; }
.rj-sk.cooling { border-color: rgba(148,163,184,.35) !important; }
.rj-sk.cooling span { filter: grayscale(0.85) brightness(0.38); opacity: 0.45; }
.rj-sk.cooling kbd { opacity: 0.2; }
.rj-sk.cooling .rj-cd-num { opacity: 1; transform: scale(1); }
.rj-sk.just-ready { animation: rjSkillReady 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes rjSkillReady {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,215,0,.95), inset 0 0 0 2px #FFFFFF; border-color: #FFFFFF; }
  35% { transform: scale(1.18); box-shadow: 0 0 24px 6px rgba(255,215,0,.9), inset 0 0 14px rgba(255,255,255,.95); border-color: #FEF08A; }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(0,0,0,.55); }
}
.rj-sk:active { transform: scale(.92); }
.rj-sk.noaim { opacity: .55; }
.rj-ult { border-color: #FFD24A; }
.rj-ult .rj-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, rgba(245,158,11,.75), rgba(255,210,74,.45)); z-index: 1; }
.rj-ult.ready { animation: rjReady 1s ease-in-out infinite; }
@keyframes rjReady { 0%,100% { box-shadow: 0 0 0 0 rgba(255,210,74,.7); } 50% { box-shadow: 0 0 0 8px rgba(255,210,74,0); } }
.rj-jump { display: none !important; }
.rj-pad { display: none; }

/* Kontrol sentuh: pad kiri, tombol besar kanan */
.raja-ui.rj-touch .rj-pad { display: block; position: absolute; left: 0; bottom: 0; width: 44%; height: 72%; pointer-events: auto; touch-action: none; }
.rj-base { position: absolute; left: 14px; bottom: 14px; width: 110px; height: 110px; border-radius: 50%; opacity: .22; transition: opacity .15s;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0 40%, rgba(255,255,255,.16) 41% 100%); border: 2px solid rgba(255,255,255,.45); }
.rj-pad.active .rj-base { opacity: .9; transition: none; bottom: auto; }
.rj-knob { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255,255,255,.55); border: 2px solid rgba(255,255,255,.85); pointer-events: none; }
.rj-base::before, .rj-base::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.rj-base::before { left: 6px; border-right: 8px solid rgba(255,255,255,.6); border-left-width: 0; }
.rj-base::after { right: 6px; border-left: 8px solid rgba(255,255,255,.6); border-right-width: 0; }

/* Klaster tombol aksi kanan: tata letak lengkung ergonomis */
.raja-ui.rj-touch .rj-skills {
  display: grid;
  grid-template-columns: 64px 64px 82px;
  grid-template-rows: 64px 82px;
  gap: 8px;
  align-items: center;
  justify-items: center;
  right: 14px;
  bottom: 12px;
  opacity: 1;
}
.raja-ui.rj-touch .rj-sk {
  opacity: 0.95;
  border-width: 2.5px;
  border-color: rgba(255, 255, 255, 0.75);
  background: radial-gradient(circle at 35% 30%, rgba(55, 65, 81, 0.92) 0%, rgba(17, 24, 39, 0.96) 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.25);
  transition: transform 0.08s ease, filter 0.08s ease;
}
.raja-ui.rj-touch .rj-sk::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: auto;
}
.raja-ui.rj-touch .rj-sk:active {
  transform: scale(0.92);
  filter: brightness(1.2);
}
.raja-ui.rj-touch .rj-sk.rj-s2 {
  grid-column: 1;
  grid-row: 1;
  width: 64px;
  height: 64px;
  font-size: 28px;
}
.raja-ui.rj-touch .rj-sk.rj-s1 {
  grid-column: 2;
  grid-row: 1;
  width: 64px;
  height: 64px;
  font-size: 28px;
}
.raja-ui.rj-touch .rj-sk.rj-ult {
  grid-column: 3;
  grid-row: 1;
  width: 60px;
  height: 60px;
  font-size: 26px;
  border-color: #FFD24A;
  background: radial-gradient(circle at 38% 32%, #B45309 0%, #78350F 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(245, 158, 11, 0.45);
}
.raja-ui.rj-touch .rj-sk.rj-s0 {
  grid-column: 2;
  grid-row: 2;
  width: 64px;
  height: 64px;
  font-size: 28px;
}
.raja-ui.rj-touch .rj-cd-num {
  font-size: 24px;
}
.raja-ui.rj-touch .rj-jump {
  display: flex !important;
  grid-column: 3;
  grid-row: 2;
  width: 82px;
  height: 82px;
  font-size: 36px;
  background: radial-gradient(circle at 38% 32%, #22C55E 0%, #15803D 100%);
  border-color: #BBF7D0;
  border-width: 3px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 16px rgba(34, 197, 94, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}
.raja-ui.rj-touch .rj-jump:active {
  transform: scale(0.92);
  background: radial-gradient(circle at 38% 32%, #16A34A 0%, #14532D 100%);
}
.rj-card img { transform: scale(1.35) translateY(6%); }
.sheet.rj-sheet { max-width: 580px; }

/* Layar pilih tahap */
.rj-beta { font-size: 11px; background: #FFD24A; color: #3A2A00; border-radius: 999px; padding: 2px 7px; vertical-align: middle; font-family: system-ui, sans-serif; }
.rj-help { margin: 4px 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.45; }
.rj-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.rj-stage { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 10px; background: linear-gradient(135deg, #6D28D9, #92400E); text-align: left; }
.rj-stage span { font-size: 11px; font-weight: 600; opacity: .9; }
.rj-stage.locked { background: #334155; opacity: .6; cursor: not-allowed; }
.rj-end-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; font-size: 12.5px; margin: 6px 0 8px; }
.rj-end-cause { color: #FCA5A5; }

/* HP landscape pendek */
@media (orientation: landscape) and (max-height: 500px) {
  .rj-top { top: 4px; left: 6px; right: 6px; gap: 5px; }
  .rj-stat, .rj-crown { font-size: 10.5px; padding: 3px 6px; }
  .rj-crown { min-width: 60px; }
  .rj-card { width: 40px; height: 44px; border-radius: 7px; }
  .rj-card img { width: 32px; height: 32px; }
  .rj-card .rj-cost { font-size: 9px; }
  .rj-log-btn span { display: none; }
  .rj-log { top: 52px; width: 190px; max-height: calc(100% - 64px); font-size: 10.5px; }
  .raja-ui.rj-touch .rj-skills {
    grid-template-columns: 58px 58px 78px;
    grid-template-rows: 58px 78px;
    gap: 7px;
    right: 10px;
    bottom: 8px;
  }
  .raja-ui.rj-touch .rj-sk.rj-s2,
  .raja-ui.rj-touch .rj-sk.rj-s1,
  .raja-ui.rj-touch .rj-sk.rj-s0 {
    width: 58px;
    height: 58px;
    font-size: 26px;
  }
  .raja-ui.rj-touch .rj-sk.rj-ult {
    width: 54px;
    height: 54px;
    font-size: 24px;
  }
  .raja-ui.rj-touch .rj-jump {
    width: 78px;
    height: 78px;
    font-size: 34px;
  }
  .rj-base { width: 96px; height: 96px; left: 10px; bottom: 8px; }
  .rj-knob { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .sheet.rj-sheet { padding: 10px 14px; }
  .sheet.rj-sheet p, .rj-help { font-size: 11.5px; }
}

body.raja-mode .stage-msg { top: 66px; }
@media (orientation: landscape) and (max-height: 500px) { body.raja-mode .stage-msg { top: 52px; font-size: 10px; } }

/* ================= MODE RAJA MVP 2 ================= */
.menu-fort { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-fort[hidden] { display: none; }
.menu-btn.fort { background: linear-gradient(135deg, #1D4ED8, #7C3AED) !important; font-size: 14px; padding: 8px 10px; }

.rj-orders { display: flex; gap: 3px; }
.rj-ord { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.3); background: rgba(14,20,34,.72); color: #fff; font-size: 16px; padding: 0; cursor: pointer; }
.rj-ord.on { border-color: #FFD24A; background: rgba(120,80,10,.8); box-shadow: 0 0 0 2px rgba(255,210,74,.35); }
.rj-ord kbd { position: absolute; bottom: -3px; right: -3px; }

.rj-coach { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); max-width: min(560px, 80%); pointer-events: auto;
  background: rgba(30,27,75,.93); border: 2px solid #FFD24A; border-radius: 12px; padding: 7px 10px 7px 12px; font-size: 13px; line-height: 1.35;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: rjCoachIn .35s ease-out; }
.rj-coach[hidden] { display: none; }
.rj-coach-n { background: #FFD24A; color: #3A2A00; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.rj-coach-skip { margin-left: auto; background: transparent; color: #CBD5E1; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; font-size: 11px; padding: 3px 7px; cursor: pointer; white-space: nowrap; }
@keyframes rjCoachIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }

.rj-replay { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(220,38,38,.85); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 1px; border-radius: 999px; padding: 4px 12px; animation: rjBlink 1.2s ease-in-out infinite; }
.rj-replay[hidden] { display: none; }
@keyframes rjBlink { 50% { opacity: .55; } }
.raja-ui.rj-replaying .rj-skills, .raja-ui.rj-replaying .rj-pad, .raja-ui.rj-replaying .rj-cards, .raja-ui.rj-replaying .rj-orders { opacity: .35; pointer-events: none; }

.rj-sk.armed { border-color: #FFD24A; box-shadow: 0 0 0 3px rgba(255,210,74,.45); }
.raja-ui.rj-touch .rj-s2 { grid-column: 1; grid-row: 2; }
.raja-ui.rj-touch .rj-s1 { grid-column: 2; grid-row: 2; }
.raja-ui.rj-touch .rj-s0 { grid-column: 3; grid-row: 2; }

/* Layar pilih: skill & kode */
.rj-sub-h { font-family: Bungee, Impact, sans-serif; font-size: 12px; color: #FFD24A; margin: 8px 0 5px; }
.rj-sub-h span { font-family: system-ui, sans-serif; color: #E2E8F0; font-size: 11px; font-weight: 600; margin-left: 6px; }
.rj-skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rj-skill-chip { position: relative; display: flex; align-items: center; gap: 8px; background: rgba(15,23,42,.6); color: #E2E8F0; border: 1.5px solid rgba(255,255,255,.25); border-radius: 9px; padding: 6px 8px; font-size: 11.5px; cursor: pointer; text-align: left; }
.rj-skill-chip span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex-shrink: 0; background: rgba(30,41,59,.75); border-radius: 6px; border: 1px solid rgba(255,255,255,.18); padding: 2px; }
.rj-skill-chip span svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.rj-skill-chip b { font-weight: 700; flex: 1; }
.rj-skill-chip.on { border-color: #FFD24A; background: rgba(120,80,10,.55); color: #fff; }
.rj-skill-chip.on span { border-color: #FFD24A; background: rgba(245,158,11,.25); }
.rj-skill-chip i { position: absolute; top: -6px; right: -5px; background: #FFD24A; color: #3A2A00; font-style: normal; font-weight: 800; font-size: 10px; border-radius: 999px; padding: 1px 5px; }
.rj-stages { grid-template-columns: repeat(5, 1fr) !important; }
.rj-stage em { font-style: normal; color: #FFD24A; font-size: 12px; letter-spacing: 1px; }
.rj-stage.need3, #rjCodePlay.need3 { opacity: .5; }
.rj-code-row { display: flex; gap: 6px; }
.rj-code-in { flex: 1; min-width: 0; background: rgba(15,23,42,.7); color: #fff; border: 1.5px solid rgba(255,255,255,.3); border-radius: 8px; padding: 7px 9px; font: 12px ui-monospace, monospace; }
.rj-code-in.bad { border-color: #F87171; }
.rj-code { width: 100%; box-sizing: border-box; background: rgba(15,23,42,.7); color: #FDE68A; border: 1.5px solid rgba(255,255,255,.3); border-radius: 8px; padding: 8px; font: 12px/1.4 ui-monospace, monospace; resize: none; word-break: break-all; }
.rj-end-stars { font-size: 30px; color: #FFD24A; letter-spacing: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.4); margin: 2px 0 4px; }
.rj-end-goals { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #94A3B8; margin-bottom: 6px; }
.rj-end-goals .on { color: #FDE68A; }
.rj-end-btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (orientation: landscape) and (max-height: 500px) {
  .rj-ord { width: 30px; height: 30px; font-size: 14px; }
  .rj-coach { top: 54px; font-size: 11.5px; padding: 5px 8px; }
  .rj-skill-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .rj-skill-chip { padding: 4px 6px; font-size: 10.5px; gap: 6px; }
  .rj-skill-chip span { width: 22px; height: 22px; padding: 1px; }
  .raja-ui.rj-touch .rj-cd-num { font-size: 21px; }
  .rj-stage { padding: 6px 7px; }
  .rj-stage b { font-size: 12px; }
  .rj-stage span { font-size: 10px; }
  .menu-btn.fort { font-size: 12px; padding: 6px 8px; }
}
@media (max-width: 760px) {
  .rj-cards { gap: 3px; }
}

body.rj-coaching .stage-msg { display: none !important; }

/* ================= DUNIA LEBAR, KAMERA & ARSITEK PVP ================= */
.mini-map { position: absolute; left: 8px; top: 8px; width: 200px; height: 30px; z-index: 18; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.55); box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; touch-action: none; }
.mini-map[hidden] { display: none; }
body.raja-mode .mini-map { left: 50%; top: auto; bottom: 8px; transform: translateX(-50%); width: 220px; }
.cam-edge { position: absolute; top: 40%; z-index: 18; width: 34px; height: 58px; border: 1.5px solid rgba(255,255,255,.45); background: rgba(14,20,34,.55); color: #fff; font-size: 18px; cursor: pointer; touch-action: none; }
.cam-edge.left { left: 4px; border-radius: 0 10px 10px 0; }
.cam-edge.right { right: 4px; border-radius: 10px 0 0 10px; }
.cam-edge[hidden] { display: none; }

.arch-btn, .arch-league { display: none !important; }
body.arch-mode .arch-btn { display: inline-flex !important; }
body.arch-mode .arch-league { display: inline-block !important; font-weight: 800; font-size: 12px; color: #FDE68A; background: rgba(14,20,34,.6); border: 1px solid rgba(255,210,74,.4); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
body.arch-mode #startBtn, body.arch-mode #shopBtn, body.arch-mode #intelBtn, body.arch-mode .wave-stat { display: none !important; }
#archPubBtn.ok { box-shadow: 0 0 0 2px #4ADE80; }

.menu-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-btn.arch { background: linear-gradient(135deg, #0F766E, #1D4ED8) !important; }

.rj-leagues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rj-league { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px; background: linear-gradient(135deg, #1E3A8A, #6D28D9); text-align: left; }
.rj-league span { font-size: 13px; font-weight: 800; color: #FDE68A; }
.rj-league em { font-style: normal; font-size: 11px; opacity: .85; }
.rj-wide-bar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.15); overflow: hidden; }
.rj-wide-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22C55E, #FACC15); }

.rj-shop { display: flex; flex-direction: column; gap: 4px; max-height: 42vh; overflow: auto; }
.rj-shop-row { display: grid; grid-template-columns: 34px 1fr 30px 28px 26px 28px; align-items: center; gap: 6px; background: rgba(15,23,42,.55); border-radius: 8px; padding: 3px 6px; }
.rj-shop-row img { width: 34px; height: 34px; transform: scale(1.3); }
.rj-shop-name { display: flex; flex-direction: column; min-width: 0; }
.rj-shop-name b { font-size: 12.5px; }
.rj-shop-name span { font-size: 10.5px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rj-shop-row em { font-style: normal; font-weight: 800; color: #FDE68A; font-size: 12px; }
.rj-qty { width: 28px; height: 28px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.4); background: rgba(30,41,59,.9); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; padding: 0; }
.rj-n { text-align: center; font-size: 14px; }
.rj-shop-total { display: flex; justify-content: space-between; margin: 6px 2px 0; font-size: 13px; }
.rj-shop-total b.bad { color: #F87171; }
.rj-end-ok { color: #4ADE80; font-weight: 700; }
.rj-end-army { color: #CBD5E1; }
.raja-ui.rj-army .rj-crown { min-width: 92px; }

@media (orientation: landscape) and (max-height: 500px) {
  .mini-map { width: 150px; height: 24px; left: 6px; top: 6px; }
  body.raja-mode .mini-map { width: 160px; bottom: 4px; }
  .cam-edge { width: 28px; height: 46px; font-size: 15px; }
  body.arch-mode .arch-league { font-size: 10.5px; padding: 2px 6px; }
  .rj-leagues { gap: 6px; }
  .rj-league { padding: 7px; }
  .rj-shop { max-height: 36vh; }
  .rj-shop-row { grid-template-columns: 28px 1fr 26px 26px 22px 26px; padding: 2px 5px; }
  .rj-shop-row img { width: 28px; height: 28px; }
  .rj-shop-name span { display: none; }
  .rj-qty { width: 26px; height: 26px; }
}

.rj-replay { top: 66px; bottom: auto; }
@media (orientation: landscape) and (max-height: 500px) { .rj-replay { top: 52px; font-size: 10.5px; } }

/* ---------- Tombol perluas lapak (menempel di sisi kiri lapak) & tombol geser ---------- */
.lot-expand { position: absolute; left: 0; top: 0; z-index: 17; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; will-change: transform; }
.lot-expand[hidden] { display: none; }
.lot-add { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 9px 6px; min-width: 84px;
  border: 2px dashed #FDE68A; border-radius: 12px; background: rgba(120,72,10,.82); color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.45); animation: lotPulse 2.2s ease-in-out infinite; }
.lot-add i { font-style: normal; font-size: 22px; line-height: 1; color: #FDE68A; font-weight: 900; }
.lot-add b { font-size: 12px; white-space: nowrap; }
.lot-add span { font-size: 10.5px; color: #FDE68A; white-space: nowrap; }
.lot-add:hover { background: rgba(150,92,14,.92); }
.lot-add.poor { filter: grayscale(.7); animation: none; }
.lot-add:disabled { filter: grayscale(1); opacity: .6; animation: none; cursor: default; }
.lot-sub { pointer-events: auto; width: 34px; height: 26px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.5); background: rgba(14,20,34,.75); color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; }
.lot-sub[hidden] { display: none; }
.lot-min {
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(14, 20, 34, 0.78);
  color: #CBD5E1;
  font: 700 10.5px Nunito, sans-serif;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.lot-min:hover { color: #fff; background: rgba(14, 20, 34, 0.95); border-color: #fff; }
.lot-expand.collapsed .lot-add, .lot-expand.collapsed .lot-sub { display: none !important; }
.lot-expand.collapsed .lot-min {
  background: rgba(120, 72, 10, 0.92);
  border: 1.5px dashed #FDE68A;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  color: #FDE68A;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.lot-expand.collapsed .lot-min::after { content: " ＋ Lapak"; }
@keyframes lotPulse { 0%,100% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 0 0 rgba(253,230,138,.55); } 50% { box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 0 8px rgba(253,230,138,0); } }

.pan-btn { position: absolute; left: 8px; top: 46px; z-index: 18; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 54px; height: 54px; border-radius: 14px; border: 2px solid rgba(255,255,255,.7); background: rgba(14,20,34,.82); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.45); touch-action: none; }
.pan-btn span { font-size: 10px; font-weight: 800; letter-spacing: .3px; }
.pan-btn[hidden] { display: none; }
.pan-btn.on { background: #F59E0B; border-color: #FEF3C7; color: #1F1300; box-shadow: 0 0 0 4px rgba(245,158,11,.35), 0 4px 12px rgba(0,0,0,.45); }
body.panning #cv { cursor: grab; }
body.grabbing #cv { cursor: grabbing; }
body.panning .cam-edge { display: none; }

@media (orientation: landscape) and (max-height: 500px) {
  .lot-add { min-width: 70px; padding: 5px 7px 4px; }
  .lot-add i { font-size: 18px; }
  .lot-add b { font-size: 10.5px; }
  .lot-add span { font-size: 9.5px; }
  .pan-btn { top: 36px; left: 6px; width: 46px; height: 46px; font-size: 20px; border-radius: 12px; }
}

@media (orientation: landscape) and (max-height: 500px) {
  body:not(.raja-mode) .mini-map { top: 32px; }
  .pan-btn { top: 62px; }
}

/* ---------- Regu pasukan (6 dari 13) ---------- */
.rj-troop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; }
.rj-troop-chip { position: relative; display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 5px; align-items: center; text-align: left;
  background: rgba(15,23,42,.6); color: #E2E8F0; border: 1.5px solid rgba(255,255,255,.25); border-radius: 9px; padding: 4px 6px; cursor: pointer; }
.rj-troop-chip img { grid-row: 1 / 3; width: 26px; height: 26px; transform: scale(1.35); }
.rj-troop-chip b { font-size: 10.5px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rj-troop-chip span { font-size: 10px; color: #FDE68A; }
.rj-troop-chip.on { border-color: #FFD24A; background: rgba(120,80,10,.55); color: #fff; }
.rj-troop-chip i { position: absolute; top: -6px; right: -5px; background: #FFD24A; color: #3A2A00; font-style: normal; font-weight: 800; font-size: 10px; border-radius: 999px; padding: 1px 5px; }
.rj-shop-row.on { background: rgba(120,80,10,.45); }
.rj-shop-total b.full { color: #FDE68A; }
@media (orientation: landscape) and (max-height: 500px) {
  .rj-troop-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; }
  .rj-troop-chip { padding: 3px 5px; }
  .rj-troop-chip b { font-size: 9.5px; }
}

/* ---------- Gelembung info (tahan tombol skill / kartu pasukan) ---------- */
.rj-info { position: absolute; z-index: 30; width: 230px; pointer-events: none; background: rgba(15,12,40,.95); border: 2px solid #FFD24A; border-radius: 12px;
  padding: 8px 10px; color: #E2E8F0; font-size: 11.5px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0,0,0,.55); animation: rjInfoIn .18s ease-out; }
.rj-info[hidden] { display: none; }
.rj-info-h { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.rj-info-h b { font-family: Bungee, Impact, sans-serif; font-size: 13px; color: #FFD24A; font-weight: 400; }
.rj-info-h i, .rj-info-h img { width: 28px; height: 28px; flex: 0 0 28px; display: flex; }
.rj-info-h i svg { width: 28px; height: 28px; }
.rj-info-h img { transform: scale(1.3); }
.rj-info p { margin: 0 0 5px; }
.rj-info span { display: block; font-size: 10.5px; color: #FDE68A; }
@keyframes rjInfoIn { from { opacity: 0; transform: translateY(4px) scale(.96); } to { opacity: 1; transform: none; } }
@media (orientation: landscape) and (max-height: 500px) {
  .rj-info { width: 200px; font-size: 10.5px; padding: 6px 8px; }
}

/* ---------- Panduan Layar Penuh iOS / iPhone ---------- */
#iosFsModal {
  z-index: 400;
}
.ios-fs-sheet {
  max-width: 440px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 1.5px solid rgba(254, 224, 71, 0.65);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(234, 179, 8, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
}
.ios-fs-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 12px;
}
.ios-fs-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #F1F5F9;
  line-height: 1.45;
}
.ios-fs-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FACC15;
  color: #0F172A;
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.ios-fs-icon {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 2px;
}
.ios-pwa-btn {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(67, 56, 202, 0.8) 100%) !important;
  border: 1.5px solid #60A5FA !important;
  font-size: 11.5px !important;
  padding: 6px 10px !important;
  margin-top: 3px !important;
  color: #EFF6FF !important;
}


/* =================== MENU UTAMA (adegan penuh layar) =================== */
.menu.mn { padding: 0; display: block; overflow: hidden; background: #081430; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu.mn[hidden] { display: none; }
.mn-scene { position: absolute; inset: 0; }
.mn-scene-svg { width: 100%; height: 100%; display: block; }
.mn-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,10,28,.82) 0%, rgba(6,10,28,.62) 32%, rgba(6,10,28,.18) 52%, rgba(6,10,28,0) 64%),
              radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.45), transparent 60%); }

.mn-ui { position: absolute; top: 0; bottom: 0; left: max(18px, 4.5vw); width: min(560px, 48vw);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(8px, 2.6vh, 20px); }

/* Logo */
.mn-logo { width: 100%; max-width: 540px; }
.mn-logo-svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.mn-logo-tilt { transform-origin: 320px 100px; animation: mnLogoFloat 5s ease-in-out infinite; }
.mn-lamp { animation: mnLamp 1.1s steps(1) infinite; }
.mn-lamp.b { animation-delay: .55s; }

/* Tombol utama: bentuk miring bersudut, bukan kotak */
.mn-main { display: flex; flex-direction: column; gap: clamp(6px, 1.6vh, 12px); align-items: flex-start; }
.mn-play { position: relative; isolation: isolate; display: flex; align-items: center; gap: clamp(8px, 1.6vw, 14px);
  width: min(100%, 470px); height: clamp(50px, 14vh, 80px); padding: 0 clamp(18px, 3vw, 34px) 0 clamp(8px, 1.2vw, 12px);
  border: 0; background: none; color: #fff; cursor: pointer; text-align: left;
  filter: drop-shadow(0 5px 0 #052E16) drop-shadow(0 12px 20px rgba(0,0,0,.45));
  transition: transform .15s ease, filter .15s ease; }
.mn-play::before, .mn-play::after { content: ""; position: absolute; z-index: -2;
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); }
.mn-play::before { inset: 0; background: #052E16; }
.mn-play::after { inset: 3px; z-index: -1; background: linear-gradient(180deg, #86EFAC 0%, #22C55E 38%, #16A34A 70%, #166534 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35); }
.mn-play-ico { flex: 0 0 auto; width: clamp(36px, 10vh, 58px); height: clamp(36px, 10vh, 58px); animation: mnPulse 2.2s ease-in-out infinite; }
.mn-play-ico svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.mn-play-txt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.mn-play-txt b { font-family: Bungee, Impact, sans-serif; font-weight: 400; font-size: clamp(18px, 5.4vh, 32px); letter-spacing: .5px;
  text-shadow: 0 3px 0 rgba(5,46,22,.8); }
.mn-play-txt small { font: 800 clamp(10px, 2.6vh, 14px) Nunito, system-ui, sans-serif; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-shine { position: absolute; inset: 3px; z-index: -1; pointer-events: none; overflow: hidden;
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); }
.mn-shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 28%; left: -40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: mnShine 3.4s ease-in-out infinite; }
.mn-play:hover { transform: translateY(-2px) scale(1.015); }
.mn-play:active { transform: translateY(3px); filter: drop-shadow(0 2px 0 #052E16) drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.mn-play.cont { filter: drop-shadow(0 5px 0 #431407) drop-shadow(0 12px 20px rgba(0,0,0,.45)); }
.mn-play.cont::before { background: #431407; }
.mn-play.cont::after { background: linear-gradient(180deg, #FED7AA 0%, #FB923C 38%, #EA580C 70%, #9A3412 100%); }
.mn-play.cont .mn-play-txt b { text-shadow: 0 3px 0 rgba(67,20,7,.8); }
/* Online PvP sebagai tombol utama: biru toska */
.mn-play.pvp { filter: drop-shadow(0 5px 0 #042F2E) drop-shadow(0 12px 20px rgba(0,0,0,.45)); }
.mn-play.pvp::before { background: #042F2E; }
.mn-play.pvp::after { background: linear-gradient(180deg, #99F6E4 0%, #2DD4BF 36%, #0D9488 70%, #115E59 100%); }
.mn-play.pvp .mn-play-txt b { text-shadow: 0 3px 0 rgba(4,47,46,.8); }
.mn-play.pvp:active { filter: drop-shadow(0 2px 0 #042F2E) drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.mn-play .mn-tag { top: -7px; right: 30px; font-size: 10px; }
.mn-play.alt { width: min(78%, 360px); height: clamp(38px, 10vh, 56px); }
.mn-play.alt .mn-play-ico { width: clamp(28px, 7.5vh, 42px); height: clamp(28px, 7.5vh, 42px); animation: none; }
.mn-play.alt .mn-play-txt b { font-size: clamp(14px, 4vh, 22px); }
.mn-play.alt .mn-play-txt small { display: none; }

/* Medali mode: cakram bulat berbingkai emas + pita label */
.mn-medals { display: flex; gap: clamp(6px, 1.6vw, 18px); flex-wrap: nowrap; }
.mn-medal { --c1: #A855F7; --c2: #6B21A8; --rib: #581C87; position: relative; display: flex; flex-direction: column; align-items: center;
  background: none; border: 0; padding: 0; cursor: pointer; color: #fff; width: clamp(66px, 11vw, 112px); }
.mn-medal[data-tone="arch"] { --c1: #2DD4BF; --c2: #0F766E; --rib: #115E59; }
.mn-medal[data-tone="mek"] { --c1: #4ADE80; --c2: #15803D; --rib: #14532D; }
.mn-medal[data-tone="tut"] { --c1: #60A5FA; --c2: #1D4ED8; --rib: #1E3A8A; }
.mn-medal[data-tone="tutraja"] { --c1: #FBBF24; --c2: #B45309; --rib: #92400E; }
.mn-disc { position: relative; z-index: 1; display: grid; place-items: center; width: clamp(42px, 12.5vh, 78px); height: clamp(42px, 12.5vh, 78px); border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.55), transparent 42%), radial-gradient(circle at 50% 60%, var(--c1), var(--c2));
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.28), 0 0 0 3px #1E1A24, 0 0 0 6px #FACC15, 0 0 0 8.5px #1E1A24, 0 8px 14px rgba(0,0,0,.45);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .2s; }
.mn-disc svg { width: 64%; height: 64%; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.mn-rib { position: relative; z-index: 2; margin-top: -9px; padding: 3px 13px 4px; background: var(--rib); color: #fff; white-space: nowrap;
  font: 800 clamp(9.5px, 2.4vh, 13px) Nunito, system-ui, sans-serif; letter-spacing: .2px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%, 7px 50%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.2); }
.mn-tag { position: absolute; z-index: 3; top: -4px; right: 2px; font: 800 9px Nunito, system-ui, sans-serif; font-style: normal; letter-spacing: .5px;
  background: #EF4444; color: #fff; border: 2px solid #1E1A24; border-radius: 999px; padding: 1px 6px; animation: mnBadge 1.6s ease-in-out infinite; }
.mn-tag[hidden] { display: none; }
.mn-medal:hover .mn-disc { transform: translateY(-4px) rotate(-8deg) scale(1.07); box-shadow: inset 0 -5px 0 rgba(0,0,0,.28), 0 0 0 3px #1E1A24, 0 0 0 6px #FDE68A, 0 0 0 8.5px #1E1A24, 0 0 22px var(--c1), 0 10px 16px rgba(0,0,0,.45); }
.mn-medal:active .mn-disc { transform: translateY(2px) scale(.96); }
.mn-medal.suggest .mn-disc { animation: mnSuggest 1.8s ease-in-out infinite; }

.mn-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mn-chips[hidden], .mn-chip[hidden] { display: none; }
.mn-chip { font: 800 clamp(10.5px, 2.6vh, 13px) Nunito, system-ui, sans-serif; color: #fff; cursor: pointer; padding: 6px 13px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.5); background: rgba(30,27,75,.75); backdrop-filter: blur(3px); align-self: flex-start; }
.mn-chip:hover { background: rgba(67,56,202,.85); }
.mn-chip.gold { background: linear-gradient(180deg, #FBBF24, #D97706); color: #1F1300; border-color: #1E1A24; }

/* Tombol bulat pojok kanan atas: suara, musik, tips iPhone */
.mn-corner { position: absolute; top: max(12px, 2.4vh); right: max(12px, 1.6vw); display: flex; gap: 8px; }
.mn-round { width: clamp(34px, 9vh, 46px); height: clamp(34px, 9vh, 46px); border-radius: 50%; padding: 7px; cursor: pointer;
  background: rgba(8,14,34,.6); border: 2px solid rgba(255,255,255,.5); backdrop-filter: blur(4px); transition: transform .15s; }
.mn-round[hidden] { display: none; }
.mn-round:hover { transform: scale(1.08); }
.mn-round svg { width: 100%; height: 100%; display: block; }
.mn-round .mn-slash { display: none; }
.mn-round.off .mn-slash { display: inline; }
.mn-round.off .mn-wave { display: none; }
.mn-round.off { opacity: .7; }

/* Animasi masuk */
.menu.mn:not([hidden]) .mn-logo { animation: mnDrop .75s cubic-bezier(.2,1.5,.4,1) both; }
.menu.mn:not([hidden]) .mn-main > * { animation: mnSlide .55s cubic-bezier(.2,1.2,.4,1) both; animation-delay: .18s; }
.menu.mn:not([hidden]) .mn-medal { animation: mnPop .5s cubic-bezier(.3,1.7,.5,1) both; }
.menu.mn:not([hidden]) .mn-medal:nth-child(1) { animation-delay: .32s; }
.menu.mn:not([hidden]) .mn-medal:nth-child(2) { animation-delay: .4s; }
.menu.mn:not([hidden]) .mn-medal:nth-child(3) { animation-delay: .48s; }
.menu.mn:not([hidden]) .mn-medal:nth-child(4) { animation-delay: .56s; }

/* ---- Animasi adegan ---- */
.mn-stars circle { animation: mnTwinkle 3.2s ease-in-out infinite; }
.mn-sun { animation: mnSunPulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.mn-cloud { animation: mnDrift 40s linear infinite; }
.mn-cloud.c2 { animation-duration: 55s; animation-delay: -20s; }
.mn-cloud.c3 { animation-duration: 48s; animation-delay: -35s; }
.mn-gear { transform-box: fill-box; transform-origin: center; animation: mnSpin 16s linear infinite; }
.mn-gear.small { animation-duration: 9s; animation-direction: reverse; }
.mn-flag { transform-box: fill-box; transform-origin: left center; animation: mnFlag 1.4s ease-in-out infinite alternate; }
.mn-flame { transform-box: fill-box; transform-origin: 50% 90%; animation: mnFlicker .28s ease-in-out infinite alternate; }
.mn-flame.b { animation-delay: -.14s; }
.mn-coin { animation: mnCoin 1.6s ease-in-out infinite; }

.mn-mech { animation: mnBob 2.8s ease-in-out infinite; }
.mn-head { animation: mnHead 7s ease-in-out infinite; }
.mn-arm { animation: mnArm 7s ease-in-out infinite; }
.mn-plan { animation: mnPlan 2.4s ease-in-out infinite; }
.mn-eyes { transform-box: fill-box; transform-origin: center; animation: mnBlink 4.6s infinite; }
.mn-stache { transform-box: fill-box; transform-origin: center; animation: mnStache 3.5s ease-in-out infinite; }
.mn-brows { animation: mnBrows 7s ease-in-out infinite; }
.mn-bulb { opacity: 0; animation: mnBulb 7s ease-in-out infinite; }

.mn-march { animation: mnMarch 12s linear infinite; }
.mn-hero-body { animation: mnStep .36s ease-in-out infinite alternate; }
.mn-leg { transform-box: fill-box; transform-origin: top center; animation: mnLeg .36s ease-in-out infinite alternate; }
.mn-leg.b { animation-direction: alternate-reverse; }
.mn-spring { transform-box: fill-box; transform-origin: bottom center; animation: mnSpring 4s linear infinite; }
.mn-boing { opacity: 0; animation: mnBoing 4s linear infinite; }

@keyframes mnLogoFloat { 0%, 100% { transform: rotate(-2.5deg) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-4px); } }
@keyframes mnLamp { 0% { fill: #FDE68A; } 50% { fill: #F97316; } }
@keyframes mnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes mnShine { 0%, 55% { left: -40%; } 85%, 100% { left: 130%; } }
@keyframes mnBadge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes mnSuggest { 0%, 100% { box-shadow: inset 0 -5px 0 rgba(0,0,0,.28), 0 0 0 3px #1E1A24, 0 0 0 6px #FACC15, 0 0 0 8.5px #1E1A24, 0 0 0 8.5px rgba(250,204,21,.6); }
  50% { box-shadow: inset 0 -5px 0 rgba(0,0,0,.28), 0 0 0 3px #1E1A24, 0 0 0 6px #FACC15, 0 0 0 8.5px #1E1A24, 0 0 0 18px rgba(250,204,21,0); } }
@keyframes mnDrop { from { opacity: 0; transform: translateY(-40px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes mnSlide { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes mnPop { from { opacity: 0; transform: scale(.4) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes mnTwinkle { 0%, 100% { opacity: .9; } 50% { opacity: .2; } }
@keyframes mnSunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes mnDrift { from { transform: translateX(-300px); } to { transform: translateX(1700px); } }
@keyframes mnSpin { to { transform: rotate(360deg); } }
@keyframes mnFlag { from { transform: skewY(-3deg) scaleX(.96); } to { transform: skewY(4deg) scaleX(1.02); } }
@keyframes mnFlicker { from { transform: scale(.85, 1.05); opacity: .85; } to { transform: scale(1.1, .92); opacity: 1; } }
@keyframes mnCoin { 0%, 100% { transform: translate(690px, 760px) scaleX(1); } 50% { transform: translate(690px, 748px) scaleX(.3); } }
@keyframes mnBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
/* Kepala: menatap pahlawan (menoleh ke kiri atas) lalu menunduk membaca blueprint */
@keyframes mnHead { 0%, 40% { transform: rotate(-7deg); } 48%, 70% { transform: rotate(11deg) translateY(4px); } 78%, 100% { transform: rotate(-7deg); } }
@keyframes mnArm { 0%, 6% { transform: rotate(0); } 10% { transform: rotate(-10deg); } 14% { transform: rotate(4deg); } 18% { transform: rotate(-8deg); } 22%, 40% { transform: rotate(0); }
  48%, 70% { transform: rotate(24deg); } 78%, 100% { transform: rotate(0); } }
@keyframes mnPlan { 0%, 100% { transform: rotate(0) skewY(0); } 50% { transform: rotate(-1.5deg) skewY(1.2deg); } }
@keyframes mnBlink { 0%, 44%, 48%, 92%, 96%, 100% { transform: scaleY(1); } 46%, 94% { transform: scaleY(.1); } }
@keyframes mnStache { 0%, 100% { transform: rotate(0) scaleX(1); } 45% { transform: rotate(-3deg) scaleX(1.04); } 55% { transform: rotate(3deg) scaleX(1.04); } }
@keyframes mnBrows { 0%, 40% { transform: translateY(0); } 48%, 70% { transform: translateY(4px); } 72% { transform: translateY(-5px); } 80%, 100% { transform: translateY(0); } }
@keyframes mnBulb { 0%, 70% { opacity: 0; transform: translate(70px, -310px) scale(.4); } 74% { opacity: 1; transform: translate(70px, -338px) scale(1.15); }
  78%, 88% { opacity: 1; transform: translate(70px, -330px) scale(1); } 94%, 100% { opacity: 0; transform: translate(70px, -350px) scale(.8); } }
/* Pahlawan berjalan ke menara (x 1000), terlontar pegas, lalu kembali dari kiri */
@keyframes mnMarch {
  0% { transform: translate(-160px, 0); opacity: 0; }
  3% { opacity: 1; }
  72% { transform: translate(1082px, 0) rotate(0); }
  75% { transform: translate(1098px, 10px) rotate(0); }
  86% { transform: translate(840px, -520px) rotate(-340deg); opacity: 1; }
  87%, 100% { transform: translate(780px, -600px) rotate(-360deg); opacity: 0; } }
@keyframes mnStep { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes mnLeg { from { transform: rotate(18deg); } to { transform: rotate(-18deg); } }
@keyframes mnSpring { 0%, 14% { transform: scaleY(1); } 18% { transform: scaleY(.45); } 22% { transform: scaleY(1.35); } 28%, 100% { transform: scaleY(1); } }
@keyframes mnBoing { 0%, 17% { opacity: 0; transform: translateY(20px) scale(.6); } 21% { opacity: 1; transform: translateY(0) scale(1.15); } 32% { opacity: 1; transform: translateY(-10px) scale(1); } 38%, 100% { opacity: 0; transform: translateY(-20px) scale(1); } }

/* HP landscape: lebih rapat */
@media (orientation: landscape) and (max-height: 500px) {
  .mn-ui { left: max(12px, 3vw); width: min(420px, 54vw); gap: 8px; }
  .mn-logo { max-width: 390px; }
  .mn-medal { width: clamp(58px, 12vw, 84px); }
  .mn-rib { padding: 2px 9px 3px; }
  .mn-corner { top: 8px; right: 8px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu.mn *, .menu.mn *::before { animation: none !important; transition: none !important; }
  .mn-bulb, .mn-boing { opacity: 0; }
}

/* Raja di adegan menu: jubah berkibar, pedang diacungkan, teriak SERBU! */
.mn-king { animation: mnKBob 2.4s ease-in-out infinite; }
.mn-cape { animation: mnCape 1.3s ease-in-out infinite alternate; }
.mn-karm { animation: mnKArm 4s ease-in-out infinite; }
.mn-khead { animation: mnKHead 4s ease-in-out infinite; }
.mn-keyes { transform-box: fill-box; transform-origin: center; animation: mnBlink 5.2s infinite; animation-delay: -1.3s; }
.mn-glint { transform-box: fill-box; transform-origin: center; animation: mnGlint 2.2s ease-in-out infinite; }
.mn-glint.b { animation-delay: -1.1s; }
.mn-shout { opacity: 0; animation: mnShout 4s ease-in-out infinite; }
.mn-vs { animation: mnVs 2.6s ease-in-out infinite; }
@keyframes mnKBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes mnCape { from { transform: skewX(-5deg) scaleX(.97); } to { transform: skewX(6deg) scaleX(1.04); } }
@keyframes mnKArm { 0%, 20% { transform: rotate(0); } 30% { transform: rotate(-28deg); } 36% { transform: rotate(-20deg); } 42% { transform: rotate(-30deg); } 58%, 100% { transform: rotate(0); } }
@keyframes mnKHead { 0%, 20% { transform: rotate(0); } 30%, 50% { transform: rotate(-8deg); } 60%, 100% { transform: rotate(0); } }
@keyframes mnGlint { 0%, 60%, 100% { opacity: 0; transform: scale(.3); } 75% { opacity: 1; transform: scale(1.2); } }
@keyframes mnShout { 0%, 24% { opacity: 0; transform: translate(78px, -290px) scale(.5); } 30% { opacity: 1; transform: translate(78px, -304px) scale(1.1); }
  34%, 52% { opacity: 1; transform: translate(78px, -300px) scale(1); } 60%, 100% { opacity: 0; transform: translate(78px, -312px) scale(.9); } }
@keyframes mnVs { 0%, 100% { transform: translate(357px, 66px) rotate(-4deg) scale(1); } 50% { transform: translate(357px, 66px) rotate(4deg) scale(1.08); } }

/* ================= MODAL PILIHAN TUTORIAL ================= */
.tut-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px;
  animation: tutFadeIn 0.2s ease-out;
}
.tut-modal-overlay[hidden] {
  display: none !important;
}
.tut-sheet {
  position: relative;
  background: linear-gradient(165deg, #101B36 0%, #080E20 100%);
  border: 2px solid #38BDF8;
  box-shadow: 0 0 0 1px #050A18, 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: clamp(12px, 3vh, 18px) clamp(14px, 3vw, 22px);
  width: 100%;
  max-width: min(600px, 94vw);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2vh, 14px);
  animation: tutPopIn 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.tut-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}
.tut-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tut-title {
  font-family: Bungee, Impact, sans-serif;
  font-size: clamp(15px, 3.6vh, 20px);
  color: #FDE047;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
  margin: 0;
}
.tut-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #CBD5E1;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.tut-close:hover {
  background: rgba(239, 68, 68, 0.4);
  border-color: #EF4444;
  color: #fff;
  transform: scale(1.06);
}
.tut-lead {
  font-size: clamp(11px, 2.2vh, 12.5px);
  color: #94A3B8;
  margin: 0;
  line-height: 1.35;
}
.tut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2.4vw, 16px);
}
.tut-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: clamp(10px, 2.4vh, 14px) clamp(10px, 2vw, 14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s cubic-bezier(0.2, 1.3, 0.4, 1), border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.tut-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}
.tut-card:active {
  transform: translateY(1px) scale(0.98);
}
.tut-card.mek {
  --glow: rgba(56, 189, 248, 0.4);
}
.tut-card.mek:hover {
  border-color: #38BDF8;
  box-shadow: 0 0 18px var(--glow), 0 10px 24px rgba(0, 0, 0, 0.6);
}
.tut-card.raja {
  --glow: rgba(245, 158, 11, 0.4);
}
.tut-card.raja:hover {
  border-color: #F59E0B;
  box-shadow: 0 0 18px var(--glow), 0 10px 24px rgba(0, 0, 0, 0.6);
}
.tut-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font: 800 9px Nunito, system-ui, sans-serif;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.tut-card-badge.done {
  background: #065F46;
  color: #6EE7B7;
  border: 1px solid #10B981;
}
.tut-card-badge.new {
  background: #DC2626;
  color: #fff;
  border: 1px solid #F87171;
  animation: mnBadge 1.6s ease-in-out infinite;
}
.tut-card-art {
  width: clamp(48px, 11vh, 60px);
  height: clamp(48px, 11vh, 60px);
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.tut-card-art svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}
.tut-role {
  font: 800 9.5px Nunito, system-ui, sans-serif;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tut-card.mek .tut-role {
  background: rgba(14, 165, 233, 0.22);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.tut-card.raja .tut-role {
  background: rgba(245, 158, 11, 0.22);
  color: #FDE047;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.tut-name {
  font-family: Bungee, Impact, sans-serif;
  font-size: clamp(13px, 2.7vh, 16px);
  color: #fff;
  letter-spacing: 0.3px;
  margin: 2px 0;
}
.tut-desc {
  font-size: clamp(10.5px, 2.1vh, 11.5px);
  line-height: 1.35;
  color: #CBD5E1;
  margin: 0;
}
.tut-play-pill {
  margin-top: 4px;
  font: 800 clamp(10px, 2.2vh, 11.5px) Nunito, system-ui, sans-serif;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.tut-card.mek .tut-play-pill {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  border: 1.5px solid #38BDF8;
}
.tut-card.raja .tut-play-pill {
  background: linear-gradient(135deg, #7C3AED, #92400E);
  border: 1.5px solid #F59E0B;
}
.tut-card:hover .tut-play-pill {
  transform: scale(1.05);
}
@keyframes tutFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tutPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .tut-sheet { padding: 10px 14px; gap: 8px; }
  .tut-card { padding: 6px 10px; gap: 3px; }
  .tut-card-art { width: 40px; height: 40px; }
  .tut-desc { font-size: 10px; }
}

/* ================= ONLINE PVP (Fase A: Serbu Benteng) ================= */
.sheet.ol-sheet { max-width: 620px; max-height: calc(100vh - 24px); overflow: auto; }
.ol-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; }
.ol-prof { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(15,23,42,.55); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px 10px; margin: 2px 0 10px; font-size: 13px; }
.ol-prof .ol-rt { color: #FDE68A; }
.ol-mini { background: rgba(30,41,59,.9); color: #E2E8F0; border: 1px solid rgba(255,255,255,.28); border-radius: 7px; font-size: 11.5px; font-weight: 700; padding: 4px 8px; cursor: pointer; }
.ol-prof .ol-mini { margin-left: auto; }
.ol-mini:hover { border-color: #FFD24A; color: #fff; }
.ol-warn { color: #FCA5A5; font-size: 12.5px; }
.ol-msg { min-height: 16px; font-size: 12px; color: #FDE68A; margin: 6px 0 0; }
.ol-load { color: #94A3B8; font-size: 12.5px; text-align: center; padding: 10px 0; }
.ol-in { font: 700 13px Nunito, system-ui, sans-serif; letter-spacing: .3px; }

.ol-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ol-mode { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; color: #fff; cursor: pointer;
  border: 2px solid rgba(255,255,255,.22); border-radius: 16px; padding: 14px 14px 12px; box-shadow: 0 6px 0 rgba(0,0,0,.35); transition: transform .12s, box-shadow .12s; }
.ol-mode:hover { transform: translateY(-2px); }
.ol-mode:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.ol-mode b { font: 400 17px Bungee, Impact, sans-serif; letter-spacing: .5px; }
.ol-mode small { font-size: 11.5px; line-height: 1.35; opacity: .9; }
.ol-mode-ico { font-size: 34px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.ol-async { background: linear-gradient(145deg, #B45309, #7C2D12 60%, #4C1D95); border-color: #FBBF24; }
.ol-live { background: linear-gradient(145deg, #2563EB, #4338CA 60%, #6D28D9); border-color: #A5B4FC; }
.ol-mode::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.ol-soon { font: 800 9px Nunito, system-ui, sans-serif; font-style: normal; background: #FFD24A; color: #3A2A00; border-radius: 999px; padding: 2px 6px; vertical-align: middle; letter-spacing: .5px; }

.ol-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.ol-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; color: #fff; cursor: pointer; border: 2px solid rgba(255,255,255,.22); border-radius: 14px; padding: 12px 6px 10px; box-shadow: 0 5px 0 rgba(0,0,0,.35); transition: transform .12s; }
.ol-tile:hover { transform: translateY(-2px); }
.ol-tile:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.ol-tile span { font-size: 30px; line-height: 1.1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.ol-tile b { font: 400 12.5px Bungee, Impact, sans-serif; }
.ol-tile small { font-size: 10.5px; line-height: 1.25; opacity: .85; }
.t-build { background: linear-gradient(160deg, #0E7490, #1E3A8A); }
.t-browse { background: linear-gradient(160deg, #B45309, #7C2D12); border-color: #FBBF24; }
.t-mine { background: linear-gradient(160deg, #15803D, #14532D); }
.t-top { background: linear-gradient(160deg, #7C3AED, #4C1D95); }
.ol-badge { position: absolute; top: -7px; right: -5px; min-width: 20px; height: 20px; border-radius: 999px; background: #EF4444; color: #fff; font: 800 11px/20px Nunito, system-ui, sans-serif; font-style: normal; box-shadow: 0 0 0 2px #fff; animation: olPulse 1.4s ease-in-out infinite; }
.ol-badge[hidden] { display: none; }
@keyframes olPulse { 50% { transform: scale(1.15); } }

.ol-filters { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ol-filters > div { display: flex; gap: 4px; }
.ol-chip { background: rgba(15,23,42,.6); color: #CBD5E1; border: 1.5px solid rgba(255,255,255,.2); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ol-chip.on { background: #FFD24A; border-color: #FFD24A; color: #3A2A00; }

.ol-list { display: flex; flex-direction: column; gap: 5px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.ol-row { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 8px; background: rgba(15,23,42,.6); border: 1.5px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.ol-row:hover { border-color: rgba(255,210,74,.6); }
.ol-row-main { min-width: 0; display: flex; flex-direction: column; }
.ol-row-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-row-main span { font-size: 11px; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-lg { font-style: normal; font-size: 22px; text-align: center; }
.ol-rt { font-style: normal; font-weight: 800; font-size: 12px; color: #FDE68A; white-space: nowrap; }
.ol-go { padding: 6px 12px; font-size: 13px; }
.ol-t { font: 800 9px Nunito, system-ui, sans-serif; font-style: normal; letter-spacing: .4px; border-radius: 999px; padding: 1px 6px; vertical-align: middle; background: rgba(148,163,184,.3); color: #E2E8F0; }
.ol-t.mine { background: #2563EB; color: #fff; }
.ol-t.won { background: #16A34A; color: #fff; }
.ol-t.try { background: #92400E; color: #FDE68A; }
.ol-t.new { background: #EF4444; color: #fff; }

.ol-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 6px; }
.ol-stats span { background: rgba(15,23,42,.6); border-radius: 9px; padding: 6px 4px; text-align: center; font-size: 11px; color: #94A3B8; display: flex; flex-direction: column; }
.ol-stats b { color: #fff; font-size: 16px; }
.ol-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ol-scroll { max-height: 34vh; overflow: auto; }
.ol-arow { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 6px; font-size: 12px; padding: 4px 6px; border-radius: 7px; background: rgba(15,23,42,.45); margin-bottom: 3px; }
.ol-arow span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ol-arow small { color: #94A3B8; font-weight: 600; }
.ol-arow em { font-style: normal; color: #CBD5E1; font-size: 11px; white-space: nowrap; }
.ol-arow.won em { color: #FCA5A5; }
.ol-arow.lost em { color: #86EFAC; }
.ol-arow.me { background: rgba(120,80,10,.55); outline: 1.5px solid #FFD24A; }
.ol-arow .ol-mini { padding: 2px 7px; }
.ol-rank { text-align: center; }
.ol-old { color: #FCA5A5; }
.ol-del { color: #FCA5A5 !important; }
.ol-endres { font-size: 12.5px; color: #CBD5E1; background: rgba(15,23,42,.55); border-radius: 8px; padding: 6px 9px; }
.ol-endres.up { color: #86EFAC; }
.ol-endres.down { color: #FCA5A5; }

@media (max-width: 640px), (orientation: landscape) and (max-height: 500px) {
  .ol-tiles { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .ol-tile { padding: 8px 4px 7px; }
  .ol-tile span { font-size: 24px; }
  .ol-tile small { display: none; }
  .ol-mode { padding: 10px; }
  .ol-mode-ico { font-size: 26px; }
  .ol-mode b { font-size: 14px; }
  .ol-mode small { font-size: 10.5px; }
  .ol-list { max-height: 50vh; }
  .ol-stats b { font-size: 14px; }
}
@media (max-width: 520px) {
  .ol-modes, .ol-cols { grid-template-columns: 1fr; }
  .ol-tiles { grid-template-columns: 1fr 1fr; }
  .ol-row { grid-template-columns: 26px 1fr auto; }
  .ol-row .ol-rt { display: none; }
}
.rj-qty:disabled { opacity: .35; cursor: default; }
.rj-qty.no { opacity: .45; }
.rj-shop { overscroll-behavior: contain; }
.rj-shop-row .rj-qty { touch-action: manipulation; }
.rj-shop-note { min-height: 15px; margin: 2px 2px 0 !important; font-size: 11.5px !important; color: #FCA5A5; }
.rj-shop-note.flash { animation: rjNote .35s ease-out; }
@keyframes rjNote { from { transform: translateX(-4px); } 40% { transform: translateX(4px); } to { transform: none; } }
.rj-shop-tools { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; }
.rj-shop-tools span { margin-left: auto; font-size: 10.5px; color: #94A3B8; }
.rj-shop-tools [hidden] { display: none; }
.rj-qty { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ol-prev { margin: 4px 0 8px; }
.ol-prev canvas { display: block; width: 100%; height: auto; border-radius: 10px; border: 2px solid rgba(255,255,255,.2); }
.ol-prev span { display: block; font-size: 11px; color: #CBD5E1; margin-top: 3px; }
@media (orientation: landscape) and (max-height: 500px) { .ol-prev canvas { max-height: 90px; object-fit: contain; } }
.ol-proof { display: flex; flex-direction: column; gap: 3px; background: rgba(15,23,42,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 7px 10px; margin: 0 0 8px; font-size: 12px; color: #CBD5E1; }
.ol-proof .ok { color: #86EFAC; }
.ol-proof .hot { color: #FCA5A5; }
.ol-proof .lock { color: #FDE68A; font-size: 11px; }
.ol-mini.ol-lock { opacity: .75; }
.rj-restart { margin-left: 4px; }
.raja-ui.rj-replaying .rj-restart { display: none; }
.sc-code { font: 400 34px Bungee, Impact, sans-serif; letter-spacing: 4px; text-align: center; color: #FDE68A; background: rgba(15,23,42,.6); border: 2px dashed rgba(253,230,138,.5); border-radius: 12px; padding: 8px; margin: 6px 0 10px; }
.ol-arow.sc-row { grid-template-columns: 1fr auto auto; }

/* ================= DUEL LANGSUNG (B1: Mekanik live) ================= */
.duel-bar { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 19; display: flex; align-items: center; gap: 10px; background: rgba(14,20,34,.85); border: 2px solid #FFD24A; border-radius: 999px; padding: 5px 8px 5px 14px; font-size: 12.5px; color: #E2E8F0; box-shadow: 0 4px 14px rgba(0,0,0,.4); white-space: nowrap; }
.duel-bar[hidden] { display: none; }
.duel-bar > b { font: 400 15px Bungee, Impact, sans-serif; color: #FDE68A; }
.duel-bar .btn { padding: 5px 12px; font-size: 13px; }
body.duel-mek .duel-bar { top: 8px; left: auto; right: 8px; transform: none; padding: 4px 12px; }
body.duel-mek #rajaUI .rj-pad, body.duel-mek #rajaUI .rj-skills, body.duel-mek #rajaUI .rj-cards,
body.duel-mek #rajaUI .rj-orders, body.duel-mek #rajaUI .rj-restart, body.duel-mek #rajaUI .rj-coach { display: none !important; }
body.duel-mek #confirmToggleBtn { display: none !important; }
body.duel-mek canvas { cursor: crosshair; }
body.duel-prep #archTestBtn, body.duel-prep #archPubBtn { display: none !important; }
@media (orientation: landscape) and (max-height: 500px) {
  .duel-bar { top: 50px; font-size: 11px; gap: 6px; }
  .duel-bar > b { font-size: 13px; }
  body.duel-mek .duel-bar { top: 4px; right: 6px; padding: 3px 10px; }
  body.duel-mek .duel-bar > b { display: none; }
}
body.duel-mek #rajaUI .rj-log, body.duel-mek #rajaUI .rj-log-btn { display: none !important; }

/* Lobby Duel (B2) */
.dl-code { font: 400 42px Bungee, Impact, sans-serif; letter-spacing: 8px; text-align: center; color: #FDE68A; background: rgba(15,23,42,.6); border: 2px dashed rgba(253,230,138,.5); border-radius: 14px; padding: 4px 8px; margin: 4px 0 6px; }
.dl-share { justify-content: center !important; margin-top: 0 !important; }
.dl-code-in { font: 400 22px Bungee, Impact, sans-serif !important; letter-spacing: 6px; text-transform: uppercase; text-align: center; }
.dl-slots { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 8px; }
.dl-slot { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(15,23,42,.6); border: 2px solid rgba(255,255,255,.18); border-radius: 12px; padding: 8px 6px; min-height: 92px; text-align: center; }
.dl-slot.me { border-color: #60A5FA; }
.dl-slot.empty { border-style: dashed; opacity: .75; }
.dl-slot b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-slot small { font-size: 11px; color: #94A3B8; }
.dl-slot i { font-style: normal; font-size: 12px; font-weight: 800; color: #86EFAC; min-height: 16px; }
.dl-av { font-size: 26px; line-height: 1.1; }
.dl-vs { font: 400 20px Bungee, Impact, sans-serif; color: #F87171; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.dl-net { text-align: center; font-size: 12.5px; padding: 6px 8px; border-radius: 9px; background: rgba(15,23,42,.55); }
.dl-net.ok { color: #86EFAC; }
.dl-net.fail, .dl-net.err { color: #FCA5A5; }
.dl-ping.good { color: #86EFAC; } .dl-ping.mid { color: #FDE68A; } .dl-ping.bad { color: #FCA5A5; }
.dl-emo { display: flex; justify-content: center; gap: 6px; margin: 8px 0 0; }
.dl-emo button { font-size: 22px; width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(30,41,59,.9); cursor: pointer; }
.dl-emo button:active { transform: scale(.9); }
.dl-pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dl-pop { position: absolute; right: 22%; bottom: 30%; font-size: 46px; animation: dlPop 1.6s ease-out forwards; }
.dl-pop.mine { left: 22%; right: auto; }
@keyframes dlPop { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.25); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-70px) scale(1); opacity: 0; } }
.sheet.ol-sheet { position: relative; }
@media (orientation: landscape) and (max-height: 500px) {
  .dl-code { font-size: 30px; }
  .dl-slot { min-height: 70px; padding: 5px; }
  .dl-av { font-size: 20px; }
  .dl-emo button { width: 36px; height: 36px; font-size: 18px; }
}

/* Duel online (B3) */
.dn-wait { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 25; background: rgba(14,20,34,.88); border: 2px solid #FDE68A; border-radius: 14px; padding: 10px 18px; font-weight: 800; color: #FDE68A; animation: rjBlink 1.2s ease-in-out infinite; pointer-events: none; }
.dn-wait[hidden] { display: none; }
body.duel-net #rajaUI .rj-restart, body.duel-net #speedBtn { display: none !important; }

/* Hasil pertandingan duel (B4) */
.dm-rounds { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 8px; }
.dm-round { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(15,23,42,.6); border: 1.5px solid rgba(255,255,255,.14); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; }
.dm-round.best { border-color: #FDE047; box-shadow: 0 0 0 2px rgba(253,224,71,.25); }
.dm-round em { font-style: normal; color: #CBD5E1; }

.exc-cap { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 30; background: rgba(14,20,34,.85); border: 1.5px solid #FDE047; border-radius: 999px; padding: 5px 14px; font-size: 12.5px; color: #FEF3C7; pointer-events: none; }
.exc-cap b { font-family: Bungee, Impact, sans-serif; font-weight: 400; color: #FDE047; margin-right: 6px; }

/* Pilihan ultimate */
.rj-ult-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rj-ult-card { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; background: rgba(15,23,42,.6); color: #E2E8F0; border: 1.5px solid rgba(255,255,255,.25); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.rj-ult-card span { grid-row: span 2; width: 40px; height: 40px; }
.rj-ult-card span svg { width: 100%; height: 100%; display: block; }
.rj-ult-card b { font-size: 12.5px; }
.rj-ult-card small { font-size: 10.5px; color: #94A3B8; line-height: 1.3; }
.rj-ult-card.on { border-color: #FFD24A; background: rgba(120,80,10,.55); box-shadow: 0 0 0 2px rgba(255,210,74,.3); }
.rj-ult-card.on small { color: #FDE68A; }
@media (orientation: landscape) and (max-height: 500px) {
  .rj-ult-card { grid-template-columns: 30px 1fr; padding: 4px 6px; }
  .rj-ult-card span { width: 30px; height: 30px; }
  .rj-ult-card small { font-size: 9.5px; }
}

/* Duel B5: menyerah & riwayat */
/* Kiri atas di bawah baris status (Mekanik & Raja): tidak menutupi baki jebakan, kartu pasukan, atau tombol skill */
.dn-forfeit { position: fixed; left: 10px; top: 64px; z-index: 60; background: rgba(127,29,29,.85); color: #FEE2E2; border: 1.5px solid #FCA5A5; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 5px 12px; cursor: pointer; }
.dn-forfeit[hidden] { display: none; }
@media (orientation: landscape) and (max-height: 500px) { .dn-forfeit { top: 60px; font-size: 11px; padding: 3px 10px; } }
.dh-row { grid-template-columns: auto 1fr auto; }
.dh-r { font-size: 12px; white-space: nowrap; }
.dh-r.win { color: #86EFAC; } .dh-r.lose { color: #FCA5A5; } .dh-r.mis { color: #FDE68A; }
.dh-row em.up { color: #86EFAC; } .dh-row em.down { color: #FCA5A5; }

/* ================= ONLINE PVP: TAMPILAN GAME (online-ui.js) ================= */
.overlay > .ox-scene { display: none; }
.overlay:has(> .sheet.ol-sheet) { background: #0B1020; padding: 0; backdrop-filter: none; align-items: stretch; }
.overlay:has(> .sheet.ol-sheet) > .ox-scene { display: block; position: absolute; inset: 0; overflow: hidden; }
.ox-scene-svg { width: 100%; height: 100%; display: block; }
.ox-scene { --ox-sky1: #1B0F2E; --ox-sky2: #7A2E1D; --ox-sky3: #E8793A; --ox-glow: #FBBF24; --ox-far: #2A1430; --ox-mtn: #3B1A2E; --ox-ground: #1A0F14; --ox-cloud: rgba(255,200,160,.16); --ox-moon: #FDE68A; --ox-flag: #FACC15; }
.ox-scene[data-theme="duel"] { --ox-sky1: #050B24; --ox-sky2: #1E1B4B; --ox-sky3: #4338CA; --ox-glow: #60A5FA; --ox-far: #0F1433; --ox-mtn: #151A45; --ox-ground: #080B1F; --ox-cloud: rgba(147,197,253,.13); --ox-moon: #BFDBFE; --ox-flag: #60A5FA; }
.ox-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.ox-star { fill: #fff; animation: oxTwinkle 3.2s ease-in-out infinite; }
.ox-moon { animation: oxMoon 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ox-cloud { animation: oxDrift 80s linear infinite; }
.ox-win { fill: #FDE68A; animation: oxWin 2.4s steps(2) infinite; }
.ox-flag { transform-box: fill-box; transform-origin: left center; animation: oxFlag 1.3s ease-in-out infinite alternate; }
.ox-ember { fill: #FDBA74; opacity: 0; animation: oxEmber 8s linear infinite; }
.ox-scene[data-theme="duel"] .ox-ember { fill: #93C5FD; }
.ox-bolt { opacity: 0; }
.ox-scene[data-theme="duel"] .ox-bolt { animation: oxBoltFlash 7s linear infinite; }

.sheet.ol-sheet { position: relative; z-index: 1; width: 100%; max-width: none; max-height: none; height: 100%; margin: 0; border-radius: 0; background: none; box-shadow: none; border: 0;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow: auto; }
.ox-wrap { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.ox-wrap > * { animation: oxIn .5s cubic-bezier(.2, 1.35, .4, 1) both; animation-delay: calc(var(--oi, 0) * var(--ostep, 55ms)); }
.sheet.ol-sheet p { margin: 0; }
.sheet.ol-sheet .ol-msg { text-align: center; font-weight: 700; min-height: 18px; }

/* Judul pita + tombol kembali */
.ox-head { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; }
.ox-back { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #1E1A24; background: linear-gradient(180deg, #475569, #1E293B); box-shadow: 0 5px 0 #0F172A, inset 0 2px 0 rgba(255,255,255,.25); padding: 8px; cursor: pointer; transition: transform .12s; }
.ox-back svg { width: 100%; height: 100%; display: block; }
.ox-back:hover { transform: scale(1.08) rotate(-6deg); }
.ox-back:active { transform: translateY(4px); box-shadow: 0 1px 0 #0F172A; }
.ox-title { justify-self: center; position: relative; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; padding: 8px 34px 9px;
  background: linear-gradient(180deg, var(--rib1, #F59E0B), var(--rib2, #B45309)); border: 3px solid #1E1A24; box-shadow: 0 6px 0 rgba(0,0,0,.45);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%, 14px 50%); max-width: 100%; }
.sheet.ol-sheet[data-theme="duel"] .ox-title { --rib1: #6366F1; --rib2: #3730A3; }
.ox-title-ico { grid-row: span 2; width: 38px; height: 38px; animation: oxBob 2.4s ease-in-out infinite; }
.ox-title-ico svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.ox-title b { font: 400 clamp(18px, 3.4vw, 28px) Bungee, Impact, sans-serif; color: #fff; letter-spacing: 1px; text-shadow: 0 3px 0 #1E1A24, 0 0 14px rgba(255,255,255,.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-title small { font-size: 11.5px; color: #FFFBEB; opacity: .92; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }

/* Profil */
.ox-prof { display: flex; align-items: center; gap: 10px; background: rgba(8,12,28,.62); border: 2px solid rgba(255,255,255,.14); border-radius: 16px; padding: 7px 10px; backdrop-filter: blur(3px); }
.ox-prof-name { display: flex; flex-direction: column; min-width: 0; }
.ox-prof-name > b { font: 400 16px Bungee, Impact, sans-serif; color: #fff; }
.ox-prof-name small { color: #CBD5E1; font-size: 11.5px; }
.ox-prof-rt { display: flex; gap: 6px; }
.ox-prof-rt i { font-style: normal; font-size: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 1px 8px; color: #FDE68A; }
.ox-pill { margin-left: auto; background: rgba(30,41,59,.9); color: #E2E8F0; border: 1.5px solid rgba(255,255,255,.28); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 6px 12px; cursor: pointer; }
.ox-pill:hover { border-color: #FDE68A; color: #fff; }
.ox-av { display: inline-block; width: 38px; height: 38px; flex: 0 0 auto; }
.ox-av.big { width: 70px; height: 70px; }
.ox-av svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.ox-av-empty { width: 38px; height: 38px; opacity: .6; }
.ox-av-empty svg { width: 100%; height: 100%; }
.ox-lg { display: inline-block; width: 40px; height: 40px; flex: 0 0 auto; }
.ox-lg svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }

/* Kartu mode berilustrasi */
.ox-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ox-mode { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; color: #fff;
  border: 4px solid #1E1A24; border-radius: 22px; background: #1E1A24; box-shadow: 0 9px 0 rgba(0,0,0,.5), 0 0 0 3px var(--mc, #FACC15); transition: transform .16s cubic-bezier(.2,1.4,.4,1); }
.ox-mode.m-serbu { --mc: #FACC15; animation: oxFromL .6s cubic-bezier(.2,1.3,.4,1) both; }
.ox-mode.m-duel { --mc: #818CF8; animation: oxFromR .6s cubic-bezier(.2,1.3,.4,1) .08s both; }
.ox-mode:hover { transform: translateY(-5px) rotate(-.6deg); }
.ox-mode:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 0 3px var(--mc); }
.ox-mode-art { display: block; height: clamp(110px, 24vh, 190px); overflow: hidden; border-bottom: 4px solid #1E1A24; }
.ox-art { width: 100%; height: 100%; display: block; }
.ox-mode-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 54px; background: linear-gradient(180deg, #2B1B3F, #160F24); flex: 1; }
.ox-mode.m-duel .ox-mode-body { background: linear-gradient(180deg, #1E2A6B, #0F1640); }
.ox-mode-body b { font: 400 clamp(19px, 3vw, 26px) Bungee, Impact, sans-serif; text-shadow: 0 3px 0 #000; }
.ox-mode-body small { font-size: 12.5px; line-height: 1.4; color: #E2E8F0; opacity: .9; }
.ox-cta { position: absolute; right: 14px; bottom: 12px; font: 400 16px Bungee, Impact, sans-serif; color: #3A2A00; background: linear-gradient(180deg, #FEF08A, #FACC15 50%, #EAB308);
  border: 3px solid #1E1A24; border-radius: 999px; padding: 5px 16px; box-shadow: 0 4px 0 #1E1A24; animation: oxCta 1.6s ease-in-out infinite; }
.ox-mode.m-duel .ox-cta { background: linear-gradient(180deg, #C7D2FE, #818CF8 55%, #6366F1); color: #fff; text-shadow: 0 2px 0 #1E1A24; }
.ox-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; border-radius: inherit; }
.ox-shine::before { content: ""; position: absolute; top: -30%; bottom: -30%; width: 22%; left: -40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent); transform: skewX(-20deg); animation: oxShine 4.2s ease-in-out infinite; }
.ox-art-trp { animation: oxMarch 5.5s linear infinite; }
.ox-art-trp > * { animation: oxStep .3s ease-in-out infinite alternate; }
.ox-art-arrow { animation: oxArrow 2.6s ease-in infinite; }
.ox-art-l { animation: oxDuelL 2.2s ease-in-out infinite; }
.ox-art-r { animation: oxDuelR 2.2s ease-in-out infinite; }
.ox-gear { transform-box: fill-box; transform-origin: center; animation: oxSpin 6s linear infinite; }
.ox-art-bolt { transform-box: fill-box; transform-origin: center; animation: oxZap 1.8s steps(1) infinite; }
.ox-art-vs { transform-box: fill-box; transform-origin: center; animation: oxVsPulse 1.2s ease-in-out infinite; }

/* Medali (seperti menu utama) */
.ox-medals { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 2.4vw, 26px); padding: 6px 0 4px; }
.ox-medal { --c1: #60A5FA; --c2: #1D4ED8; --rib: #1E3A8A; position: relative; display: flex; flex-direction: column; align-items: center; width: clamp(96px, 17vw, 150px); background: none; border: 0; cursor: pointer; color: #fff; padding: 0;
  animation: oxPop .55s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(.08s + var(--mi, 0) * 70ms); }
.ox-medals .ox-medal:nth-child(1) { --mi: 0; } .ox-medals .ox-medal:nth-child(2) { --mi: 1; } .ox-medals .ox-medal:nth-child(3) { --mi: 2; } .ox-medals .ox-medal:nth-child(4) { --mi: 3; } .ox-medals .ox-medal:nth-child(5) { --mi: 4; }
.ox-medal.t-browse { --c1: #FDBA74; --c2: #C2410C; --rib: #7C2D12; }
.ox-medal.t-mine { --c1: #86EFAC; --c2: #15803D; --rib: #14532D; }
.ox-medal.t-top { --c1: #C4B5FD; --c2: #7C3AED; --rib: #4C1D95; }
.ox-medal.t-gold { --c1: #FEF08A; --c2: #CA8A04; --rib: #854D0E; }
.ox-disc { position: relative; z-index: 1; display: grid; place-items: center; width: clamp(66px, 12vw, 104px); height: clamp(66px, 12vw, 104px); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2)); border: 4px solid #1E1A24; box-shadow: inset 0 -7px 0 rgba(0,0,0,.28), inset 0 5px 0 rgba(255,255,255,.35), 0 7px 0 rgba(0,0,0,.45);
  animation: oxFloat 3s ease-in-out infinite; animation-delay: calc(var(--mi, 0) * -.6s); transition: transform .15s; }
.ox-disc svg { width: 62%; height: 62%; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.ox-medal:hover .ox-disc { transform: scale(1.1) rotate(-7deg); }
.ox-medal:active .ox-disc { transform: scale(.92); }
.ox-rib { position: relative; z-index: 2; margin-top: -12px; padding: 4px 14px 5px; background: var(--rib); border: 3px solid #1E1A24; border-radius: 8px; font: 400 clamp(11px, 1.8vw, 15px) Bungee, Impact, sans-serif; white-space: nowrap; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.ox-medal small { margin-top: 5px; font-size: 11px; color: #E2E8F0; opacity: .85; text-align: center; line-height: 1.25; }
.ox-medal .ol-badge { top: 0; right: 14%; z-index: 3; }

/* Panel, input, tombol */
.ox-card { background: rgba(8,12,28,.7); border: 2px solid rgba(255,255,255,.14); border-radius: 18px; padding: 12px 14px; backdrop-filter: blur(3px); box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.ox-card h3, .ox-sub { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font: 400 14px Bungee, Impact, sans-serif; color: #FDE68A; letter-spacing: .5px; }
.ox-card h3 svg { width: 22px; height: 22px; }
.ox-sub span { font: 600 11px system-ui, sans-serif; color: #CBD5E1; letter-spacing: 0; }
.ox-in { width: 100%; box-sizing: border-box; background: rgba(2,6,23,.75); color: #fff; border: 3px solid #1E1A24; box-shadow: inset 0 3px 0 rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.14); border-radius: 12px; padding: 10px 12px; font: 800 16px Nunito, system-ui, sans-serif; outline: none; }
.ox-in:focus { box-shadow: inset 0 3px 0 rgba(0,0,0,.4), 0 0 0 3px #FACC15; }
.ox-in.bad { box-shadow: inset 0 3px 0 rgba(0,0,0,.4), 0 0 0 3px #F87171; animation: oxShake .3s; }
.ox-inrow { display: flex; gap: 8px; }
.ox-btn { --b1: #475569; --b2: #1E293B; --bs: #0F172A; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; color: #fff; font: 800 14px Nunito, system-ui, sans-serif;
  padding: 9px 16px; border: 3px solid #1E1A24; border-radius: 14px; background: linear-gradient(180deg, var(--b1), var(--b2)); box-shadow: 0 5px 0 var(--bs), inset 0 2px 0 rgba(255,255,255,.3); text-shadow: 0 2px 0 rgba(0,0,0,.35); transition: transform .1s, filter .15s; }
.ox-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }
.ox-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.ox-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bs), inset 0 2px 0 rgba(255,255,255,.3); }
.ox-btn:disabled { filter: grayscale(.7) brightness(.8); cursor: default; transform: none; }
.ox-btn.gold { --b1: #FEF08A; --b2: #EAB308; --bs: #854D0E; color: #3A2A00; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.ox-btn.green { --b1: #86EFAC; --b2: #16A34A; --bs: #14532D; }
.ox-btn.blue { --b1: #93C5FD; --b2: #2563EB; --bs: #1E3A8A; }
.ox-btn.red { --b1: #FCA5A5; --b2: #DC2626; --bs: #7F1D1D; }
.ox-btn.ghost { --b1: rgba(51,65,85,.95); --b2: rgba(15,23,42,.95); --bs: #020617; }
.ox-btn.big { font: 400 clamp(15px, 2.4vw, 19px) Bungee, Impact, sans-serif; padding: 11px 22px; border-radius: 16px; letter-spacing: .5px; }
.ox-btn.pulse { animation: oxBtnPulse 1.5s ease-in-out infinite; }
.ox-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.ox-actions.sticky { position: sticky; bottom: -16px; z-index: 5; padding: 12px 6px 14px; margin: 0 -6px; background: linear-gradient(180deg, transparent, rgba(5,8,22,.92) 35%); }

/* Tab */
.ox-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ox-tab { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: rgba(8,12,28,.7); color: #CBD5E1; border: 2.5px solid rgba(255,255,255,.18); border-radius: 999px; padding: 5px 14px 5px 8px; font: 800 13px Nunito, system-ui, sans-serif; transition: transform .12s; }
.ox-tab.small { padding: 5px 12px; font-size: 12px; }
.ox-tab .ox-lg, .ox-tab svg { width: 26px; height: 26px; }
.ox-tab:hover { transform: translateY(-2px); color: #fff; }
.ox-tab.on { background: linear-gradient(180deg, #FEF08A, #EAB308); color: #3A2A00; border-color: #1E1A24; box-shadow: 0 4px 0 #854D0E; }

/* Kartu benteng */
.ox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ox-fort { position: relative; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, rgba(30,27,56,.92), rgba(12,10,26,.94)); border: 3px solid #1E1A24; border-radius: 18px; padding: 8px 8px 10px;
  box-shadow: 0 7px 0 rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.1); cursor: pointer; transition: transform .15s cubic-bezier(.2,1.4,.4,1), box-shadow .15s;
  animation: oxUp .5s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--oi, 0) * var(--ostep, 45ms)); }
.ox-fort:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 12px 0 rgba(0,0,0,.45), 0 0 0 2px #FACC15; }
.ox-fort.mine { box-shadow: 0 7px 0 rgba(0,0,0,.45), 0 0 0 2px #60A5FA; }
.ox-fort-map { position: relative; border-radius: 12px; overflow: hidden; border: 3px solid #1E1A24; background: #0F172A; }
.ox-fort-map canvas { display: block; width: 100%; height: auto; }
.ox-stamp { position: absolute; right: 8px; top: 8px; font: 400 16px Bungee, Impact, sans-serif; font-style: normal; color: #DC2626; border: 3px solid #DC2626; border-radius: 8px; padding: 1px 8px; background: rgba(255,255,255,.82); transform: rotate(-10deg); animation: oxStamp .4s cubic-bezier(.2,1.6,.4,1) both .3s; }
.ox-stamp.try { color: #B45309; border-color: #B45309; font-size: 13px; }
.ox-ribbon { position: absolute; z-index: 3; top: 10px; left: -6px; font: 800 10px Nunito, system-ui, sans-serif; font-style: normal; letter-spacing: .8px; color: #fff; background: #2563EB; border: 2px solid #1E1A24; padding: 2px 10px 2px 8px; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.ox-ribbon.hot { background: #DC2626; animation: oxBadge 1s ease-in-out infinite; }
.ox-fort-top { display: flex; align-items: center; gap: 8px; }
.ox-fort-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ox-fort-name b { font: 400 15px/1.15 Bungee, Impact, sans-serif; white-space: normal; overflow-wrap: anywhere; }
.ox-fort-name small { font-size: 11.5px; color: #94A3B8; }
.ox-rt-shield { position: relative; display: grid; place-items: center; width: 46px; height: 50px; flex: 0 0 auto;
  background: radial-gradient(circle at 40% 30%, #FEF3C7, #F59E0B); clip-path: path('M23 0 L46 8 V26 Q46 42 23 50 Q0 42 0 26 V8 Z'); }
.ox-rt-shield b { font: 400 12px Bungee, Impact, sans-serif; color: #451A03; }
.ox-fort-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ox-fort-stats span { text-align: center; font-size: 11.5px; font-weight: 800; background: rgba(255,255,255,.07); border-radius: 8px; padding: 3px 0; color: #E2E8F0; }
.ox-fort-foot { font-size: 11.5px; color: #94A3B8; text-align: center; }
.ox-go { width: 100%; }

/* Detail benteng */
.ox-detail { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
.ox-map-frame { padding: 8px; border-radius: 16px; background: linear-gradient(135deg, #92400E, #451A03); border: 3px solid #1E1A24; box-shadow: 0 7px 0 rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.25); }
.ox-map-frame .ol-prev { margin: 0; }
.ox-map-frame .ol-prev canvas { border: 3px solid #1E1A24; border-radius: 10px; }
.ox-map-frame .ol-prev span { color: #FEF3C7; font-weight: 700; }
.ox-side { display: flex; flex-direction: column; gap: 10px; }
.ox-statmedals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ox-sm { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: rgba(8,12,28,.72); border: 2px solid rgba(255,255,255,.14); border-radius: 14px; padding: 7px 10px; }
.ox-sm i { grid-row: span 2; font-style: normal; font-size: 26px; animation: oxBob 2.6s ease-in-out infinite; }
.ox-sm b { font: 400 20px Bungee, Impact, sans-serif; color: #fff; }
.ox-sm small { font-size: 11px; color: #94A3B8; }
.ox-proof { display: flex; flex-direction: column; gap: 4px; background: rgba(8,12,28,.7); border: 2px solid rgba(255,255,255,.12); border-radius: 14px; padding: 8px 12px; font-size: 12.5px; color: #CBD5E1; }
.ox-proof .ok { color: #86EFAC; } .ox-proof .hot { color: #FCA5A5; } .ox-proof .lock { color: #FDE68A; font-size: 11.5px; }
.ox-cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ox-scroll { max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }

/* Baris & podium */
.ox-list { display: flex; flex-direction: column; gap: 7px; }
.ox-row { display: flex; align-items: center; gap: 9px; background: rgba(8,12,28,.72); border: 2px solid rgba(255,255,255,.12); border-radius: 14px; padding: 6px 10px; animation: oxUp .45s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--oi, 0) * var(--ostep, 40ms)); }
.ox-row.me { border-color: #FACC15; background: rgba(120,80,10,.5); }
.ox-row.won em { color: #FCA5A5; } .ox-row.lost em { color: #86EFAC; }
.ox-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ox-row-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-row-main small { font-size: 11px; color: #94A3B8; }
.ox-row em { font-style: normal; font-size: 12px; color: #CBD5E1; white-space: nowrap; }
.ox-rank { font: 400 16px Bungee, Impact, sans-serif; color: #94A3B8; width: 26px; text-align: center; }
.ox-score { font: 400 14px Bungee, Impact, sans-serif !important; color: #FDE68A !important; }
.ox-score.up { color: #86EFAC !important; } .ox-score.down { color: #FCA5A5 !important; }
.ox-play { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #1E1A24; background: linear-gradient(180deg, #93C5FD, #2563EB); box-shadow: 0 3px 0 #1E3A8A; padding: 5px; cursor: pointer; flex: 0 0 auto; }
.ox-play svg { width: 100%; height: 100%; display: block; }
.ox-play.lock { background: linear-gradient(180deg, #64748B, #334155); box-shadow: 0 3px 0 #0F172A; font-size: 14px; padding: 0; }
.ox-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding-top: 16px; }
.ox-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; animation: oxPop .55s cubic-bezier(.2,1.5,.4,1) both; }
.ox-pod.p1 { animation-delay: .25s; } .ox-pod.p2 { animation-delay: .1s; } .ox-pod.p3 { animation-delay: .4s; }
.ox-pod b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-pod small { font-size: 11px; color: #CBD5E1; }
.ox-pod em { font: 400 14px Bungee, Impact, sans-serif; font-style: normal; color: #FDE68A; }
.ox-pod .ox-play { margin-top: 2px; }
.ox-pod-step { order: 10; display: grid; place-items: center; width: 100%; margin-top: 6px; border: 3px solid #1E1A24; border-radius: 12px 12px 4px 4px; font: 400 22px Bungee, Impact, sans-serif; color: #fff; text-shadow: 0 3px 0 #1E1A24; box-shadow: 0 6px 0 rgba(0,0,0,.4); }
.ox-pod.p1 .ox-pod-step { height: 74px; background: linear-gradient(180deg, #FEF08A, #EAB308); }
.ox-pod.p2 .ox-pod-step { height: 54px; background: linear-gradient(180deg, #E2E8F0, #94A3B8); }
.ox-pod.p3 .ox-pod-step { height: 40px; background: linear-gradient(180deg, #FDBA74, #C2410C); }
.ox-podium:not(.big) .ox-pod.p1 .ox-pod-step { height: 52px; } .ox-podium:not(.big) .ox-pod.p2 .ox-pod-step { height: 38px; } .ox-podium:not(.big) .ox-pod.p3 .ox-pod-step { height: 28px; }
.ox-pod.me b { color: #FDE68A; }
.ox-pod-crown { width: 40px; height: 40px; margin-bottom: -8px; animation: oxCrown 2s ease-in-out infinite; }
.ox-pod-crown svg { width: 100%; height: 100%; }
.ox-pod.p1 .ox-av.big { filter: drop-shadow(0 0 12px rgba(250,204,21,.7)); }

/* Kosong, memuat */
.ox-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px; text-align: center; color: #E2E8F0; }
.ox-empty svg { width: 64px; height: 64px; animation: oxFloat 3s ease-in-out infinite; opacity: .9; }
.ox-empty b { font: 400 16px Bungee, Impact, sans-serif; }
.ox-empty small { color: #94A3B8; }
.ox-empty.small { padding: 12px 6px; }
.ox-empty.small svg { width: 40px; height: 40px; }
.ox-empty.warn b { color: #FCA5A5; font-family: Nunito, system-ui, sans-serif; font-weight: 800; }
.ox-big-ico { font-size: 54px; animation: oxShake 1.2s ease-in-out infinite; }
.ox-load { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 30px 0; color: #FDE68A; }
.ox-load b { font: 400 14px Bungee, Impact, sans-serif; margin: 0 4px; }
.ox-load-crown { width: 34px; height: 34px; animation: oxSpinY 1.4s linear infinite; }
.ox-load-crown svg { width: 100%; height: 100%; }
.ox-load i { width: 7px; height: 7px; border-radius: 50%; background: #FDE68A; animation: oxDot .9s ease-in-out infinite; }
.ox-load i:nth-of-type(2) { animation-delay: .15s; } .ox-load i:nth-of-type(3) { animation-delay: .3s; }

/* ID benteng, paspor nama, tips */
.ox-idbox { display: flex; align-items: center; gap: 12px; }
.ox-idbox-ico { width: 46px; height: 46px; flex: 0 0 auto; animation: oxKey 2.4s ease-in-out infinite; }
.ox-idbox-ico svg { width: 100%; height: 100%; }
.ox-idbox-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ox-idbox-body b { font-size: 13.5px; }
#olIdIn, .ox-code-in { font: 400 18px Bungee, Impact, sans-serif; letter-spacing: 4px; text-transform: uppercase; text-align: center; }
.ox-passport { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, rgba(120,53,15,.85), rgba(69,26,3,.9)); border-color: #FACC15; }
.ox-passport-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.ox-passport-body label { font: 400 13px Bungee, Impact, sans-serif; color: #FDE68A; }
.ox-passport-body small { font-size: 11.5px; color: #FEF3C7; opacity: .8; }
.ox-passport .ox-av.big { width: 88px; height: 88px; animation: oxBob 2.4s ease-in-out infinite; }
.ox-tips { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.4; color: #E2E8F0; }

/* Pilihan liga */
.ox-leagues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ox-league { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; cursor: pointer; color: #fff;
  border: 4px solid #1E1A24; border-radius: 20px; box-shadow: 0 8px 0 rgba(0,0,0,.45); background: linear-gradient(180deg, #92400E, #451A03); transition: transform .15s cubic-bezier(.2,1.4,.4,1);
  animation: oxPop .55s cubic-bezier(.2,1.5,.4,1) both; }
.ox-league:nth-child(2) { animation-delay: .08s; background: linear-gradient(180deg, #64748B, #1E293B); }
.ox-league:nth-child(3) { animation-delay: .16s; background: linear-gradient(180deg, #CA8A04, #713F12); }
.ox-league:hover { transform: translateY(-6px) scale(1.03); }
.ox-league:active { transform: translateY(4px); }
.ox-league .ox-lg { width: 70px; height: 70px; animation: oxFloat 3s ease-in-out infinite; }
.ox-league b { font: 400 clamp(13px, 2vw, 17px) Bungee, Impact, sans-serif; text-shadow: 0 2px 0 #000; }
.ox-coins { display: inline-flex; align-items: center; gap: 5px; font: 400 16px Bungee, Impact, sans-serif; color: #FDE68A; }
.ox-coin { width: 20px; height: 20px; }
.ox-league small { font-size: 11px; opacity: .85; }

/* Lobby duel: tiket kode & layar VS */
.ox-ticket { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(135deg, #312E81, #1E1B4B); border: 3px dashed rgba(199,210,254,.6); border-radius: 18px;
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.ox-ticket small { font: 400 11px Bungee, Impact, sans-serif; letter-spacing: 3px; color: #C7D2FE; }
.ox-ticket > b { font: 400 clamp(34px, 7vw, 54px) Bungee, Impact, sans-serif; letter-spacing: 10px; color: #FEF08A; text-shadow: 0 4px 0 #1E1A24, 0 0 22px rgba(253,224,71,.55); }
.ox-ticket-btns { display: flex; gap: 8px; }
.ox-ticket.join { max-width: 460px; width: 100%; margin: 0 auto; padding: 16px; }
.ox-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.ox-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 150px; justify-content: center; text-align: center; padding: 12px 8px;
  background: linear-gradient(180deg, rgba(37,99,235,.55), rgba(15,23,42,.85)); border: 3px solid #1E1A24; border-radius: 20px; box-shadow: 0 7px 0 rgba(0,0,0,.45), 0 0 0 2px #60A5FA; animation: oxFromL .6s cubic-bezier(.2,1.3,.4,1) both; }
.ox-player.foe { background: linear-gradient(180deg, rgba(220,38,38,.5), rgba(15,23,42,.85)); box-shadow: 0 7px 0 rgba(0,0,0,.45), 0 0 0 2px #F87171; animation-name: oxFromR; }
.ox-player.empty { background: rgba(15,23,42,.6); box-shadow: 0 0 0 2px rgba(255,255,255,.2); border-style: dashed; }
.ox-player.empty .ox-player-av { opacity: .35; animation: oxBob 2s ease-in-out infinite; }
.ox-player b { font: 400 16px Bungee, Impact, sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-player small { font-size: 11.5px; color: #CBD5E1; }
.ox-player > i { font-style: normal; min-height: 22px; font-size: 12px; color: #94A3B8; }
.ox-ready { position: absolute; top: 10px; right: 8px; font: 400 16px Bungee, Impact, sans-serif; color: #22C55E !important; border: 3px solid #22C55E; border-radius: 8px; padding: 0 8px; background: rgba(255,255,255,.9); transform: rotate(12deg); animation: oxStamp .35s cubic-bezier(.2,1.6,.4,1) both; }
.ox-vs-mid { position: relative; display: grid; place-items: center; width: 80px; height: 80px; }
.ox-vs-mid b { position: relative; z-index: 2; font: 400 34px Bungee, Impact, sans-serif; color: #fff; text-shadow: 0 4px 0 #1E1A24, 0 0 18px rgba(253,224,71,.8); animation: oxVsPulse 1.2s ease-in-out infinite; }
.ox-vs-bolt { position: absolute; inset: 0; animation: oxZap 1.6s steps(1) infinite; }
.ox-vs-bolt svg { width: 100%; height: 100%; }
.ox-vs.go .ox-vs-mid { animation: oxShake .25s linear infinite; }
.ox-vs.go .ox-player { box-shadow: 0 7px 0 rgba(0,0,0,.45), 0 0 0 3px #FACC15, 0 0 26px rgba(250,204,21,.6); }
.sheet.ol-sheet .dl-net { border: 2px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(8,12,28,.7); font-weight: 700; }
.sheet.ol-sheet .dl-emo button { width: 48px; height: 48px; font-size: 24px; border: 3px solid #1E1A24; box-shadow: 0 4px 0 rgba(0,0,0,.45); background: linear-gradient(180deg, #334155, #0F172A); border-radius: 14px; transition: transform .1s; }
.sheet.ol-sheet .dl-emo button:hover { transform: translateY(-3px) rotate(-6deg); }
.sheet.ol-sheet .dl-pop { font-size: 64px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.4)); }

/* Kilas duel, pemilih Raja, menunggu */
.ox-duel-hero { position: relative; border: 4px solid #1E1A24; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 0 rgba(0,0,0,.45), 0 0 0 3px #818CF8; }
.ox-duel-hero .ox-mode-art { height: clamp(90px, 18vh, 150px); border-bottom: 0; }
.ox-duel-rules { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }
.ox-duel-rules span { font-size: 11.5px; font-weight: 800; background: rgba(15,23,42,.8); border: 1.5px solid rgba(255,255,255,.2); border-radius: 999px; padding: 2px 9px; }
.ox-timer { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ox-timer-ring { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 5px solid #FACC15; background: rgba(8,12,28,.8); box-shadow: 0 0 0 3px #1E1A24, 0 0 22px rgba(250,204,21,.5); animation: oxBtnPulse 1s ease-in-out infinite; }
.ox-timer-ring b { font: 400 24px Bungee, Impact, sans-serif; color: #FDE68A; }
.ox-timer small { color: #CBD5E1; font-weight: 700; }
.ox-wait { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.ox-hourglass { font-size: 64px; animation: oxFlip 2s ease-in-out infinite; }

/* Hasil pertandingan */
.ox-result { position: relative; display: grid; place-items: center; min-height: 170px; overflow: hidden; border-radius: 22px; border: 4px solid #1E1A24; box-shadow: 0 8px 0 rgba(0,0,0,.45); background: radial-gradient(circle, #1E3A8A, #0B1020); }
.ox-result.win { background: radial-gradient(circle, #CA8A04, #451A03 70%); }
.ox-result.lose { background: radial-gradient(circle, #475569, #111827 70%); }
.ox-rays { position: absolute; inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.14) 0 9deg, transparent 9deg 22deg); animation: oxSpin 18s linear infinite; }
.ox-result.lose .ox-rays { opacity: .35; }
.ox-result-banner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px; }
.ox-result-ico { width: 70px; height: 70px; animation: oxCrown 1.8s ease-in-out infinite; }
.ox-result-ico svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 0 rgba(0,0,0,.4)); }
.ox-result-banner b { font: 400 clamp(34px, 7vw, 58px) Bungee, Impact, sans-serif; color: #fff; text-shadow: 0 5px 0 #1E1A24, 0 0 24px rgba(255,255,255,.35); animation: oxSlam .6s cubic-bezier(.2,1.6,.4,1) both .15s; }
.ox-result.win .ox-result-banner b { color: #FEF08A; }
.ox-result-banner small { font-size: 13px; font-weight: 700; color: #F1F5F9; }
.ox-conf-box { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.ox-conf { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: oxConf 2.2s cubic-bezier(.25,.6,.5,1) forwards; }
.ox-rounds { display: flex; flex-direction: column; gap: 7px; }
.ox-round { display: flex; align-items: center; gap: 9px; background: rgba(8,12,28,.75); border: 2px solid rgba(255,255,255,.14); border-radius: 14px; padding: 7px 10px; }
.ox-round.best { border-color: #FACC15; box-shadow: 0 0 16px rgba(250,204,21,.35); }
.ox-round em { font-style: normal; font-size: 12.5px; color: #E2E8F0; white-space: nowrap; }
.ox-round-n { font: 400 15px Bungee, Impact, sans-serif; color: #FDE68A; }
.ox-why { text-align: center; color: #E2E8F0; font-weight: 700; }
.ox-rating { text-align: center; font-size: 14px !important; }
.ox-delta { font: 400 20px Bungee, Impact, sans-serif; }
.ox-swap { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ox-swap-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 14px; border-radius: 16px; border: 3px solid #1E1A24; background: rgba(8,12,28,.7); opacity: .6; }
.ox-swap-card svg { width: 44px; height: 44px; }
.ox-swap-card.now { opacity: 1; background: linear-gradient(180deg, #4338CA, #1E1B4B); box-shadow: 0 0 0 3px #FACC15, 0 0 22px rgba(250,204,21,.5); animation: oxPop .6s cubic-bezier(.2,1.6,.4,1) both .3s; }
.ox-swap-card b { font: 400 14px Bungee, Impact, sans-serif; }
.ox-swap-card small { font-size: 11px; color: #CBD5E1; }
.ox-swap-arrow { font-size: 30px; color: #FDE68A; animation: oxNudge 1s ease-in-out infinite; }
.dh-r { font: 400 11px Bungee, Impact, sans-serif; padding: 3px 8px; border-radius: 8px; border: 2px solid #1E1A24; background: #475569; white-space: nowrap; }
.dh-r.win { background: #16A34A; } .dh-r.lose { background: #DC2626; } .dh-r.draw { background: #2563EB; } .dh-r.mis { background: #B45309; }

/* Animasi */
@keyframes oxIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes oxUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes oxPop { from { opacity: 0; transform: scale(.4) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes oxFromL { from { opacity: 0; transform: translateX(-70px) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes oxFromR { from { opacity: 0; transform: translateX(70px) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes oxFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes oxBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes oxShine { 0%, 55% { left: -40%; } 85%, 100% { left: 130%; } }
@keyframes oxCta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes oxBtnPulse { 0%, 100% { box-shadow: 0 5px 0 var(--bs, #854D0E), 0 0 0 0 rgba(250,204,21,.55); } 50% { box-shadow: 0 5px 0 var(--bs, #854D0E), 0 0 0 10px rgba(250,204,21,0); } }
@keyframes oxTwinkle { 0%, 100% { opacity: .9; } 50% { opacity: .15; } }
@keyframes oxMoon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes oxDrift { from { transform: translateX(-400px); } to { transform: translateX(1800px); } }
@keyframes oxWin { 0% { opacity: 1; } 50% { opacity: .45; } }
@keyframes oxFlag { from { transform: skewY(-4deg) scaleX(.95); } to { transform: skewY(5deg) scaleX(1.03); } }
@keyframes oxEmber { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: .9; } 100% { opacity: 0; transform: translate(40px, -760px); } }
@keyframes oxBoltFlash { 0%, 91%, 100% { opacity: 0; } 92% { opacity: .9; } 93% { opacity: .1; } 94% { opacity: .8; } 96% { opacity: 0; } }
@keyframes oxMarch { from { transform: translateX(-30px); } to { transform: translateX(215px); } }
@keyframes oxStep { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes oxArrow { 0% { transform: translate(40px, 30px) rotate(10deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translate(230px, 105px) rotate(28deg); opacity: 0; } }
@keyframes oxDuelL { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
@keyframes oxDuelR { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
@keyframes oxSpin { to { transform: rotate(360deg); } }
@keyframes oxSpinY { to { transform: rotateY(360deg); } }
@keyframes oxZap { 0%, 60% { opacity: 1; } 65% { opacity: .2; } 70% { opacity: 1; } 75%, 100% { opacity: .85; } }
@keyframes oxVsPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
@keyframes oxStamp { from { opacity: 0; transform: scale(2.4) rotate(-10deg); } to { opacity: 1; } }
@keyframes oxBadge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes oxShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px) rotate(-2deg); } 75% { transform: translateX(3px) rotate(2deg); } }
@keyframes oxCrown { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
@keyframes oxDot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }
@keyframes oxKey { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(18deg); } }
@keyframes oxFlip { 0%, 40% { transform: rotate(0); } 60%, 100% { transform: rotate(180deg); } }
@keyframes oxSlam { from { opacity: 0; transform: scale(3); } to { opacity: 1; transform: scale(1); } }
@keyframes oxConf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--rx), 320px) rotate(var(--rr)); opacity: 0; } }
@keyframes oxNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

/* Layar kecil / HP */
@media (max-width: 720px) {
  .ox-modes, .ox-detail, .ox-cols2 { grid-template-columns: 1fr; }
  .ox-leagues { gap: 8px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .ox-wrap { gap: 8px; }
  .ox-head { grid-template-columns: 40px 1fr 40px; }
  .ox-back { width: 38px; height: 38px; padding: 6px; }
  .ox-title { padding: 5px 26px 6px; }
  .ox-title-ico { width: 28px; height: 28px; }
  .ox-title b { font-size: 17px; }
  .ox-title small { font-size: 10px; }
  .ox-modes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ox-mode-art { height: 86px; }
  .ox-mode-body { padding: 8px 10px 44px; }
  .ox-mode-body b { font-size: 16px; }
  .ox-mode-body small { font-size: 11px; }
  .ox-cta { font-size: 13px; padding: 3px 12px; bottom: 8px; }
  .ox-medal { width: 92px; }
  .ox-disc { width: 58px; height: 58px; }
  .ox-rib { font-size: 11px; padding: 3px 9px; }
  .ox-medal small { display: none; }
  .ox-detail { grid-template-columns: 1.2fr 1fr; }
  .ox-cols2 { grid-template-columns: 1fr 1fr; }
  .ox-player { min-height: 110px; padding: 8px 6px; }
  .ox-av.big { width: 54px; height: 54px; }
  .ox-vs-mid { width: 60px; height: 60px; }
  .ox-vs-mid b { font-size: 26px; }
  .ox-ticket > b { font-size: 30px; }
  .ox-result { min-height: 120px; }
  .ox-result-ico { width: 46px; height: 46px; }
  .ox-league { padding: 8px 6px; }
  .ox-league .ox-lg { width: 48px; height: 48px; }
  .ox-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .ox-scene *, .sheet.ol-sheet * { animation: none !important; }
}
.ox-podium { width: 100%; max-width: 640px; margin: 0 auto; }
.ox-duel-hero .ox-mode-art { background: linear-gradient(90deg, #1E3A8A 50%, #7F1D1D 50%); }
.ox-map-frame .ol-prev canvas { max-height: none !important; }

/* ================= MODE RAJA: LOADOUT GAME (raja.js, arch.js) ================= */
.ox-scene[data-theme="raja"] { --ox-sky1: #12061F; --ox-sky2: #3B0F4F; --ox-sky3: #9D3C8F; --ox-glow: #FACC15; --ox-far: #1E0B2E; --ox-mtn: #2A0F3A; --ox-ground: #0E0616; --ox-cloud: rgba(233,180,255,.13); --ox-moon: #FDE68A; --ox-flag: #C084FC; }
.ox-scene[data-theme="raja"] .ox-ember { fill: #FDE047; }
.sheet.ol-sheet[data-theme="raja"] .ox-title { --rib1: #A855F7; --rib2: #6B21A8; }
.ox-head:has(.lo-corner) { grid-template-columns: auto 1fr auto; }
.lo-corner { display: flex; gap: 6px; }
.lo-round { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #1E1A24; background: linear-gradient(180deg, #7C3AED, #4C1D95); box-shadow: 0 4px 0 #2E1065, inset 0 2px 0 rgba(255,255,255,.25);
  color: #FEF3C7; font: 400 18px Bungee, Impact, sans-serif; cursor: pointer; padding: 0; transition: transform .12s; }
.lo-round:hover { transform: scale(1.1) rotate(6deg); }
.lo-round:active { transform: translateY(3px); box-shadow: 0 1px 0 #2E1065; }
.lo-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; padding: 10px 12px; border-radius: 14px; background: rgba(8,12,28,.8); border: 2px solid rgba(250,204,21,.35); font-size: 12px; color: #E2E8F0; animation: oxPop .35s cubic-bezier(.2,1.5,.4,1) both; }
.lo-help[hidden] { display: none; }
.lo-help span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.lo-help kbd, .lo-slot kbd, .lo-tile kbd, .lo-ult-lbl kbd { font: 800 10px Nunito, system-ui, sans-serif; background: #FACC15; color: #3A2A00; border: 1.5px solid #1E1A24; border-radius: 5px; padding: 0 4px; line-height: 15px; }

.lo-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .lo-grid { grid-template-columns: 1fr 1.25fr; align-items: start; } }
.lo-panel { padding: 10px 12px 12px; }
.lo-panel h3 { margin-bottom: 8px; }
.lo-host.rj-skill-grid, .lo-host.rj-troop-grid { display: flex; flex-direction: column; gap: 9px; }

/* Slot terpasang */
.lo-slots { display: flex; justify-content: center; gap: 10px; padding: 8px 6px 12px; border-radius: 14px; background: radial-gradient(ellipse at 50% 120%, rgba(250,204,21,.18), transparent 70%), rgba(0,0,0,.28); }
.lo-slots.troops { gap: 6px; }
.lo-slot { position: relative; width: 64px; height: 64px; flex: 0 0 auto; border-radius: 16px; border: 2.5px dashed rgba(255,255,255,.28); background: rgba(2,6,23,.55); cursor: pointer; padding: 7px; transition: transform .15s, box-shadow .2s; }
.lo-slots.troops .lo-slot { width: 50px; height: 50px; border-radius: 13px; padding: 3px; }
.lo-slot.full { border: 3px solid #1E1A24; background: linear-gradient(180deg, #FDE68A, #D97706); box-shadow: 0 4px 0 #78350F, 0 0 0 2px rgba(250,204,21,.5), 0 0 16px rgba(250,204,21,.35); }
.lo-slots.troops .lo-slot.full { background: linear-gradient(180deg, #C4B5FD, #6D28D9); box-shadow: 0 3px 0 #2E1065, 0 0 0 2px rgba(196,181,253,.45); }
.lo-slot.full:hover { transform: translateY(-2px) rotate(-3deg); }
.lo-slot.full:hover::after { content: "\2715"; position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; background: #DC2626; color: #fff; font: 900 11px/20px system-ui; border: 2px solid #1E1A24; }
.lo-slot kbd { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); }
.lo-slot.land { animation: loLand .5s cubic-bezier(.2,1.8,.4,1); }
.lo-ico { display: block; width: 100%; height: 100%; }
.lo-ico svg, .lo-ico img { width: 100%; height: 100%; display: block; object-fit: contain; }
.lo-slot .lo-ico img { border-radius: 9px; }
.lo-plus { display: grid; place-items: center; height: 100%; font: 400 24px Bungee, Impact, sans-serif; color: rgba(255,255,255,.3); font-style: normal; animation: loBreath 1.8s ease-in-out infinite; }
.lo-slots.shake { animation: loShake .4s; }

/* Koleksi */
.lo-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.lo-pool.troops { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.lo-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px 4px; border-radius: 12px; cursor: pointer;
  border: 2px solid rgba(255,255,255,.12); background: linear-gradient(180deg, rgba(51,65,85,.7), rgba(15,23,42,.8)); color: #E2E8F0; transition: transform .12s, border-color .15s, opacity .15s; min-width: 0; }
.lo-tile .lo-ico { width: 38px; height: 38px; transition: transform .2s; }
.lo-pool.troops .lo-tile .lo-ico { width: 42px; height: 42px; }
.lo-pool.troops .lo-tile img { border-radius: 8px; }
.lo-tile small { font-size: 9.5px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.lo-tile:hover { transform: translateY(-3px); border-color: rgba(250,204,21,.6); }
.lo-tile:hover .lo-ico { transform: scale(1.12) rotate(-5deg); }
.lo-tile:active { transform: scale(.92); }
.lo-tile.on { opacity: .45; filter: saturate(.5); }
.lo-tile.on:hover { opacity: .75; }
.lo-tile.focus { border-color: #FACC15; box-shadow: 0 0 0 2px rgba(250,204,21,.35), 0 0 14px rgba(250,204,21,.25); }
.lo-tile kbd { position: absolute; top: 3px; right: 3px; }
.lo-cost { position: absolute; top: 2px; left: 2px; font: 800 9.5px Nunito, system-ui, sans-serif; font-style: normal; background: rgba(2,6,23,.85); color: #FDE68A; border-radius: 6px; padding: 0 3px; }
.lo-tile.pop { animation: loLand .45s cubic-bezier(.2,1.8,.4,1); }

/* Satu baris info */
.lo-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 34px; padding: 6px 10px; border-radius: 10px; background: rgba(2,6,23,.55); border-left: 3px solid #FACC15; font-size: 12px; line-height: 1.35; color: #CBD5E1; animation: loInfo .3s ease-out; }
.lo-info b { color: #FEF3C7; font-size: 12.5px; }
.lo-info span { flex: 1 1 60%; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lo-info em { font-style: normal; font-weight: 800; color: #FDE68A; white-space: nowrap; }
.lo-warn { flex-basis: 100%; font-style: normal; font-weight: 800; color: #FCA5A5; }

/* Ultimate */
.rj-ult-box { margin-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.lo-ult { display: flex; align-items: center; gap: 8px; }
.lo-ult-lbl { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 400 11px Bungee, Impact, sans-serif; color: #FDE68A; }
.lo-tile.ult { flex: 1; flex-direction: row; gap: 8px; padding: 6px 10px; justify-content: flex-start; }
.lo-tile.ult .lo-ico { width: 36px; height: 36px; flex: 0 0 auto; }
.lo-tile.ult small { font-size: 12px; }
.lo-tile.ult:not(.on) { opacity: .6; }
.lo-tile.ult.on { opacity: 1; filter: none; background: linear-gradient(180deg, #7C3AED, #3B0764); border-color: #FACC15; box-shadow: 0 0 16px rgba(168,85,247,.55); }
.lo-tile.ult.on .lo-ico { animation: loGlow 1.6s ease-in-out infinite; }

/* Tahap */
.lo-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.lo-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px 9px; cursor: pointer; color: #fff; border-radius: 16px; border: 3px solid #1E1A24;
  background: linear-gradient(180deg, #7C3AED, #3B0764); box-shadow: 0 5px 0 #1E0B3A, inset 0 2px 0 rgba(255,255,255,.2); transition: transform .12s; animation: oxPop .5s cubic-bezier(.2,1.5,.4,1) both; }
.lo-stage:nth-child(2) { animation-delay: .06s; } .lo-stage:nth-child(3) { animation-delay: .12s; } .lo-stage:nth-child(4) { animation-delay: .18s; } .lo-stage:nth-child(5) { animation-delay: .24s; } .lo-stage:nth-child(n+6) { animation-delay: .3s; }
.lo-stage:hover { transform: translateY(-4px) scale(1.03); }
.lo-stage:active { transform: translateY(3px); box-shadow: 0 2px 0 #1E0B3A; }
.lo-stage b { font-size: 12.5px; font-weight: 800; text-align: center; line-height: 1.2; }
.lo-stage-n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 400 18px Bungee, Impact, sans-serif; color: #3A2A00; background: radial-gradient(circle at 35% 30%, #FEF9C3, #EAB308 70%); border: 2.5px solid #1E1A24; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.lo-stars { display: flex; gap: 2px; font-size: 16px; }
.lo-stars i { font-style: normal; color: rgba(255,255,255,.2); }
.lo-stars i.on { color: #FACC15; text-shadow: 0 0 8px rgba(250,204,21,.7); animation: oxPop .4s cubic-bezier(.2,1.8,.4,1) both .35s; }
.lo-stage.next { box-shadow: 0 5px 0 #1E0B3A, 0 0 0 3px #FACC15, 0 0 22px rgba(250,204,21,.45); }
.lo-stage.next .lo-stage-n { animation: oxCta 1.2s ease-in-out infinite; }
.lo-new { position: absolute; top: -8px; right: -6px; font: 400 10px Bungee, Impact, sans-serif; font-style: normal; background: #DC2626; color: #fff; padding: 2px 6px; border-radius: 8px; border: 2px solid #1E1A24; transform: rotate(8deg); animation: oxVsPulse 1s ease-in-out infinite; }
.lo-stage.locked { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.lo-stage.locked:hover { transform: none; }
.lo-stage.locked .lo-stars { visibility: hidden; }
.lo-stage.need3 { opacity: .7; }
.lo-code { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lo-code .ox-pill { margin: 0; }
.lo-code .ox-inrow { width: 100%; max-width: 520px; }
.lo-code .ox-inrow[hidden] { display: none; }
.ox-in.bad { box-shadow: inset 0 3px 0 rgba(0,0,0,.4), 0 0 0 2px #EF4444; }
.sheet.ol-sheet .lo-warnline { color: #FCA5A5; }

/* Toko Pasukan */
.sh-bar { position: sticky; top: -10px; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 16px; background: rgba(8,12,28,.92); border: 2px solid rgba(250,204,21,.35); box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.sh-gold { display: inline-flex; align-items: center; gap: 6px; font: 400 22px Bungee, Impact, sans-serif; color: #FDE68A; }
.sh-gold .ox-coin { width: 28px; height: 28px; animation: oxSpinY 3s linear infinite; }
.sh-gold small { font: 700 12px system-ui, sans-serif; color: #94A3B8; }
.sh-gold b.bad { color: #F87171; }
.sh-stat { font-weight: 800; color: #E2E8F0; font-size: 14px; }
.sh-stat b.full { color: #FACC15; }
.sh-tools { margin-left: auto; display: flex; gap: 6px; }
.sh-tools .ox-pill { margin: 0; }
.sh-tools .ox-pill[hidden] { display: none; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px 8px; padding-top: 4px; }
.sh-card { position: relative; animation: oxPop .45s cubic-bezier(.2,1.5,.4,1) both; }
.sh-main { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 14px; cursor: pointer; color: #E2E8F0; touch-action: none; user-select: none; -webkit-user-select: none;
  border: 2.5px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(51,65,85,.8), rgba(15,23,42,.9)); transition: transform .1s, border-color .15s; }
.sh-main:hover { border-color: rgba(250,204,21,.6); transform: translateY(-2px); }
.sh-main:active { transform: scale(.94); }
.sh-port { width: 54px; height: 54px; }
.sh-port img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; display: block; }
.sh-main small { font-size: 10.5px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-price { display: inline-flex; align-items: center; gap: 3px; font: 800 12px Nunito, system-ui, sans-serif; color: #FDE68A; }
.sh-price .ox-coin { width: 14px; height: 14px; }
.sh-n { position: absolute; top: -7px; right: -5px; min-width: 22px; font: 400 13px Bungee, Impact, sans-serif; color: #3A2A00; background: #FACC15; border: 2px solid #1E1A24; border-radius: 10px; padding: 1px 5px; text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.sh-n:empty { display: none; }
.sh-minus { position: absolute; top: -7px; left: -5px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #1E1A24; background: #DC2626; color: #fff; font: 900 16px/1 system-ui; cursor: pointer; padding: 0; touch-action: none; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.sh-minus:disabled { display: none; }
.sh-card.on .sh-main { border-color: #FACC15; background: linear-gradient(180deg, rgba(124,58,237,.85), rgba(46,16,101,.95)); box-shadow: 0 0 14px rgba(250,204,21,.3); }
.sh-card.no:not(.on) .sh-main { opacity: .4; filter: grayscale(.7); }
.sh-card.bump .sh-port { animation: loLand .35s cubic-bezier(.2,1.8,.4,1); }
.sh-card.bump .sh-n { animation: oxPop .3s cubic-bezier(.2,1.8,.4,1); }
.sheet.ol-sheet .rj-shop-note { min-height: 18px; font-size: 12.5px; color: #FDE68A; }
.lo-panel h3 #rjSkillDesc { font: 700 11.5px system-ui, sans-serif; color: #FCA5A5; }

/* Terbang & percikan */
.lo-fly { position: fixed; z-index: 9999; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)) drop-shadow(0 0 10px rgba(250,204,21,.7)); }
.lo-fly svg, .lo-fly img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 8px; }
.lo-spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #FEF08A; box-shadow: 0 0 8px #FACC15; pointer-events: none; animation: loSpark .6s ease-out forwards; }

@keyframes loLand { 0% { transform: scale(1); } 35% { transform: scale(1.25) rotate(-6deg); } 70% { transform: scale(.94) rotate(3deg); } 100% { transform: none; } }
@keyframes loShake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes loBreath { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes loInfo { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes loGlow { 0%, 100% { filter: drop-shadow(0 0 2px #FACC15); } 50% { filter: drop-shadow(0 0 9px #FACC15); } }
@keyframes loSpark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--sx), var(--sy)) scale(.2); opacity: 0; } }

@media (max-height: 460px) {
  .lo-slot { width: 52px; height: 52px; padding: 5px; }
  .lo-slots.troops .lo-slot { width: 44px; height: 44px; }
  .lo-tile .lo-ico { width: 32px; height: 32px; }
  .lo-pool.troops .lo-tile .lo-ico { width: 36px; height: 36px; }
  .lo-stages { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .sh-port { width: 44px; height: 44px; }
}
.sh-main, .sh-minus { -webkit-touch-callout: none; }

/* ================= BAKI BANGUN: PANEL INFO + BILAH CEPAT (ui.js) ================= */
.dock-info { display: none; }
.dock-detail { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 4px 6px 4px 5px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.dock-detail:empty { display: none; }
.dd-ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.3); }
.dd-ico.terrain { background: #1B583A; }
.dd-ico.erase { background: #7F1D1D; }
.dd-ico svg { width: 26px; height: 26px; display: block; }
.dd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dd-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; line-height: 1.2; }
.dd-head b { font: 800 13px Nunito, sans-serif; color: var(--gold); }
.dd-cost { font: 800 11px Nunito, sans-serif; color: #FFE78A; background: rgba(250,204,21,.14); border-radius: 8px; padding: 0 6px; }
.dd-chip { font: 800 10.5px Nunito, sans-serif; color: #7DD3FC; background: rgba(56,189,248,.16); border-radius: 8px; padding: 0 6px; }
.dd-desc { font: 600 11.5px/1.3 Nunito, sans-serif; color: #CBD5E1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dd-note { color: #94A3B8; }
.dd-use { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; font: 900 12.5px Nunito, sans-serif; color: #052E16; background: linear-gradient(180deg, #86EFAC, #22C55E); box-shadow: 0 3px 0 #14532D; }
.dd-use:active { transform: translateY(2px); box-shadow: 0 1px 0 #14532D; }

/* Bilah cepat: kolom di kiri bawah (di atas kolom markas yang tidak bisa dibangun) */
.hotbar { position: absolute; left: max(8px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); z-index: 24; display: none; flex-direction: column-reverse; gap: 6px; }
.hotbar.visible { display: flex; animation: popIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
.hotbar-tools { display: flex; flex-direction: column-reverse; gap: 6px; }
.hotbar .hot { position: relative; width: 46px; height: 46px; padding: 0; border-radius: 12px; border: 2px solid rgba(255,255,255,.3); background: var(--blue); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.5); color: #fff; }
.hotbar .hot svg { width: 28px; height: 28px; display: block; }
.hotbar .hot.terrain { background: #1B583A; }
.hotbar .hot.erase { background: rgba(127,29,29,.95); border-color: rgba(252,165,165,.5); }
.hotbar .hot.on { border-color: #FACC15; box-shadow: 0 0 0 2px rgba(250,204,21,.45), 0 4px 12px rgba(0,0,0,.5); }
.hotbar .hot:active { transform: scale(.92); }
.hot-cost { position: absolute; right: -5px; bottom: -5px; font: 800 10px/14px Nunito, sans-serif; font-style: normal; color: #FDE68A; background: #0F172A; border: 1px solid rgba(250,204,21,.5); border-radius: 8px; padding: 0 4px; }
.hotbar .hot-open { background: rgba(15,26,40,.95); border-color: rgba(56,189,248,.6); display: flex; flex-direction: column; gap: 0; line-height: 1; }
.hotbar .hot-open .hot-burger { font-size: 18px; }
.hotbar .hot-open small { font: 800 9.5px Nunito, sans-serif; color: #7DD3FC; }
body.raja-mode:not(.duel-mek) #hotbar, body.raja-mode:not(.duel-mek) #hotbar .hot.terrain { display: none !important; }

/* HP landscape: kartu & tombol lebih besar supaya enak diketuk */
@media (orientation: landscape) and (max-height: 500px) {
  .dock { padding: 4px 7px 5px; gap: 4px; max-width: min(760px, calc(100% - 8px)); }
  .dock-top { height: 26px; }
  .tab-btn { padding: 3px 9px; font-size: 11.5px; }
  .dock-actions .btn { padding: 3px 8px; font-size: 11px; }
  .dock-detail { min-height: 40px; padding: 3px 5px; }
  .dd-ico { width: 30px; height: 30px; flex-basis: 30px; }
  .dd-ico svg { width: 22px; height: 22px; }
  .dd-desc { font-size: 11px; }
  .card { height: 42px; min-width: 80px; padding: 2px 7px; gap: 5px; }
  .card svg { width: 24px; height: 24px; flex: 0 0 24px; }
  .card-name { font-size: 11px; }
  .card .cost { font-size: 10.5px; }
  .hotbar .hot { width: 42px; height: 42px; }
  .hotbar .hot svg { width: 25px; height: 25px; }
  .hotbar, .hotbar-tools { gap: 5px; }
}
@keyframes popIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; } }

/* ================= iOS SAFARI ================= */
/* Jangan perbesar tulisan otomatis saat HP diputar ke landscape */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Safari tidak mewariskan font ke tombol/kolom: pakai font game */
button, input, select, textarea { font-family: inherit; }
/* Kolom teks tetap bisa diketik & diseleksi walau halaman memakai user-select: none */
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Cegah zoom ketuk-ganda di tombol, menu, dan layar yang bisa digulir (touch-action tidak menembus wadah gulir).
   :where() = spesifisitas nol, jadi aturan touch-action: none yang lebih khusus (kanvas, joystick, tombol tahan) tetap menang. */
:where(button, a, label, .card, .hot, [role="button"], .sheet, .sheet *, .menu, .menu *, .overlay, .overlay *, .dock, .dock *) { touch-action: manipulation; }
/* iOS memperbesar halaman saat mengetik di kolom < 16px */
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
/* Tombol perluas lapak versi ringkas untuk layar sempit */
.lot-expand.compact { gap: 4px; }
.lot-expand.compact .lot-add { min-width: 0; padding: 5px 7px 4px; }
.lot-expand.compact .lot-add b { display: none; }
.lot-expand.compact .lot-add i { font-size: 18px; }
.lot-expand.compact .lot-add span { font-size: 9.5px; }
.lot-expand.compact .lot-min { font-size: 0 !important; padding: 3px 9px; }
.lot-expand.compact .lot-min::after { content: '◀'; font-size: 11px; }
.lot-expand.compact.collapsed .lot-min::after { content: '▶'; }

/* ================= SLOT SKILL: 4 biasa + Medan ================= */
.rj-terr-box { margin-top: 9px; display: flex; flex-direction: column; gap: 7px; }
.lo-ult-lbl.terr { color: #86EFAC; }
.lo-ult-lbl.terr kbd { background: #4ADE80; }
.lo-tile.ult.terr.on { background: linear-gradient(180deg, #16A34A, #14532D); border-color: #86EFAC; box-shadow: 0 0 16px rgba(74,222,128,.45); }
.lo-info.terr { border-left-color: #4ADE80; }
.lo-slots .lo-slot { width: 58px; height: 58px; }
.rj-sk.rj-terr { border-color: #4ADE80; }
.rj-sk.rj-terr kbd { background: #4ADE80; color: #052E16; }
/* Klaster sentuh: busur mengikuti ayunan jempol kanan. Lompat di pojok (titik istirahat jempol),
   busur dalam = skill 1-3 (jarak sama dari Lompat), busur luar = skill 4, tanah, Ultimate.
   Posisi dihitung dari pusat Lompat: kanan = jx - R*cos(sudut) - ukuran/2, bawah = jy + R*sin(sudut) - ukuran/2 */
.raja-ui.rj-touch .rj-skills { display: block; width: 0; height: 0; right: 0; bottom: 0; }
.raja-ui.rj-touch .rj-skills .rj-sk { position: absolute; margin: 0; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s4 { background: radial-gradient(circle at 35% 30%, #166534 0%, #052E16 100%); border-color: #86EFAC; }
.raja-ui.rj-touch .rj-skills .rj-jump { width: 90px; height: 90px; right: 21px; bottom: 17px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s0 { width: 62px; height: 62px; right: 138.9px; bottom: 27.4px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s1 { width: 62px; height: 62px; right: 113.5px; bottom: 99.2px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s2 { width: 62px; height: 62px; right: 45.9px; bottom: 134.4px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s3 { width: 56px; height: 56px; right: 217.6px; bottom: 21.4px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-s4 { width: 56px; height: 56px; right: 204.9px; bottom: 101.4px; }
.raja-ui.rj-touch .rj-skills .rj-sk.rj-ult { width: 64px; height: 64px; right: 105.1px; bottom: 197.5px; }
/* Kartu pasukan + mahkota pindah ke kanan atas (lebih dekat jempol kanan); perintah pasukan ke kiri */

.raja-ui.rj-touch .rj-top .rj-crown { order: 4; margin-left: auto; }
.raja-ui.rj-touch .rj-top .rj-cards { order: 5; margin: 0; }
.raja-ui.rj-touch .rj-top .rj-log-btn { order: 6; }
@media (orientation: landscape) and (max-height: 500px) {
  .raja-ui.rj-touch .rj-skills .rj-jump { width: 80px; height: 80px; right: 18px; bottom: 14px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-s0 { width: 54px; height: 54px; right: 122.9px; bottom: 23.8px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-s1 { width: 54px; height: 54px; right: 100.4px; bottom: 87.4px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-s2 { width: 54px; height: 54px; right: 40.6px; bottom: 118.5px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-s3 { width: 50px; height: 50px; right: 192.6px; bottom: 17.8px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-s4 { width: 50px; height: 50px; right: 181.3px; bottom: 88.9px; }
  .raja-ui.rj-touch .rj-skills .rj-sk.rj-ult { width: 58px; height: 58px; right: 92.3px; bottom: 174.1px; }
  .lo-slots .lo-slot { width: 50px; height: 50px; }
}

/* ---------- Serbu Benteng: satu layar (bangun + daftar benteng) ---------- */
.ox-fh-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.ox-fh-build { flex: 0 0 auto; }
.ox-fh-build svg { width: 28px; height: 28px; }
.ox-fh-b { position: relative; }
.ox-fh-b .ol-badge { top: -9px; right: -7px; }
.ox-fh-id { display: flex; gap: 6px; flex: 0 1 230px; min-width: 190px; }
.ox-fh-id .ox-in { padding: 8px 10px; font-size: 14px; text-transform: uppercase; }
.ox-fh-id .ox-in::placeholder { text-transform: none; }
.ox-fh-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
.ox-fh-id #olIdIn { font-size: 15px; letter-spacing: 2px; }
@media (max-height: 520px) {
  .ox-fh-bar { gap: 7px; flex-wrap: nowrap; }
  .ox-fh-build.big { font-size: 13px; padding: 7px 12px; }
  .ox-fh-build svg { width: 22px; height: 22px; }
  .ox-fh-b { padding: 6px 10px; font-size: 12.5px; }
  .ox-fh-b svg { width: 18px; height: 18px; }
  .ox-fh-id { flex: 0 1 170px; min-width: 130px; gap: 5px; }
  .ox-fh-id .ox-in { padding: 5px 8px; }
  .ox-fh-id #olIdIn { font-size: 13px; letter-spacing: 1px; }
  .ox-fh-id .ox-btn { padding: 5px 10px; font-size: 12.5px; }
  .ox-fh-filter { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; gap: 10px; }
  .ox-fh-filter::-webkit-scrollbar { display: none; }
  .ox-fh-filter .ox-tabs { flex-wrap: nowrap; flex: 0 0 auto; gap: 6px; }
  .ox-fh-filter .ox-tab { padding: 3px 10px 3px 6px; font-size: 12px; white-space: nowrap; }
  .ox-fh-filter .ox-tab .ox-lg { width: 20px; height: 20px; }
}
@media (max-height: 520px) and (max-width: 700px) {
  .ox-fh-b span { display: none; }
  .ox-fh-b { padding: 6px 9px; }
}

/* ---------- Pilih stage (Mode Mekanik & Mode Raja) ---------- */
.st-sec { margin-top: 12px; }
.st-sec-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 2px 8px; font: 400 17px Bungee, Impact, sans-serif; color: #FEF3C7; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.st-sec-h > span { font-size: 22px; }
.st-sec-h small { font: 800 12.5px Nunito, system-ui, sans-serif; color: #FCA5A5; text-shadow: none; }
.st-sec.th-bambu .lo-stage:not(.locked) { background: linear-gradient(180deg, #4ADE80, #15803D); }
.st-sec.th-bambu .lo-stage:not(.locked) .lo-stage-n { background: #FEF3C7; }
.st-classic { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; margin-top: 6px; cursor: pointer; color: #fff; text-align: left;
  border: 3px solid #1E1A24; border-radius: 18px; background: linear-gradient(180deg, #F59E0B, #B45309); box-shadow: 0 6px 0 #78350F, inset 0 2px 0 rgba(255,255,255,.3); font-family: inherit; }
.st-classic:hover { filter: brightness(1.07); }
.st-classic-ico { font-size: 34px; }
.st-classic-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.st-classic-body b { font: 400 19px Bungee, Impact, sans-serif; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.st-classic-body small { font: 800 13px Nunito, system-ui, sans-serif; opacity: .95; }
.st-classic .ox-cta { position: static; }
.st-sec[class*=' th-'] .lo-stage-n { font-size: 12.5px; letter-spacing: -.5px; }

/* Tombol bahasa di pojok menu: bahasa aktif besar, pilihan lain kecil */
.mn-lang { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; line-height: 1; font-family: Bungee, Impact, sans-serif; color: #fff; }
.mn-lang span { font-size: clamp(12px, 3vh, 16px); }
.mn-lang small { font-size: clamp(8px, 2vh, 10px); opacity: .6; }

/* Gambar peta di kartu benteng & kartu pasukan toko: jari boleh menggeser layar ke atas/bawah */
.ox-fort-map canvas, .ol-prev canvas { touch-action: pan-y; cursor: pointer; }
.sh-main, .sh-minus { touch-action: pan-y; -webkit-touch-callout: none; }

/* ================= PANDUAN SINGKAT (tautan undangan ?b=) ================= */
.qg-overlay { position: fixed; inset: 0; z-index: 420; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(4, 8, 22, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: tutFadeIn .2s ease-out; }
.qg-card { width: 100%; max-width: 360px; max-height: calc(100vh - 24px); overflow-y: auto; color: #fff; border-radius: 18px; padding: 12px 16px 14px;
  background: linear-gradient(165deg, #2E1065 0%, #140A2E 100%); border: 2.5px solid #FACC15;
  box-shadow: 0 0 0 1px #050A18, 0 16px 40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.2); animation: tutPopIn .25s cubic-bezier(.2,1.4,.4,1); }
.qg-top { display: flex; align-items: center; justify-content: space-between; }
.qg-tag { font: 400 12px Bungee, Impact, sans-serif; color: #FDE047; letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.qg-skip { background: none; border: 0; color: #C4B5FD; font: 800 13px Nunito, system-ui, sans-serif; cursor: pointer; padding: 4px 2px; }
.qg-body { text-align: center; padding: 6px 2px 2px; }
.qg-body.in { animation: qgIn .28s ease-out; }
.qg-ic { font-size: clamp(34px, 9vh, 48px); line-height: 1.1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.qg-body small { display: block; margin-top: 4px; font: 800 11px Nunito, system-ui, sans-serif; color: #A78BFA; text-transform: uppercase; letter-spacing: .6px; }
.qg-body b { display: block; margin: 2px 0 4px; font: 400 clamp(16px, 4vh, 20px) Bungee, Impact, sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.qg-body p { margin: 0; font: 700 14px/1.4 Nunito, system-ui, sans-serif; color: #E9E5FF; min-height: 3.6em; }
.qg-dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0; }
.qg-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.25); transition: width .2s, background .2s; }
.qg-dots i.on { width: 22px; background: #FACC15; }
.qg-nav { display: flex; gap: 8px; }
.qg-prev { flex: 0 0 48px; height: 46px; border-radius: 12px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: 900 24px/1 system-ui; cursor: pointer; }
.qg-prev:disabled { opacity: .3; cursor: default; }
.qg-next { flex: 1; height: 46px; border-radius: 12px; border: 0; cursor: pointer; font: 400 16px Bungee, Impact, sans-serif; color: #3A2A00;
  background: linear-gradient(180deg, #FDE047, #EAB308); box-shadow: 0 4px 0 #A16207, 0 6px 14px rgba(0,0,0,.4); }
.qg-next:active { transform: translateY(2px); box-shadow: 0 2px 0 #A16207; }
@keyframes qgIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.qg-dots i.later { background: rgba(250,204,21,.28); }

/* Pemandu interaktif di serbuan pertama (tidak menghalangi sentuhan ke game) */
.qc-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.qc-layer .tut-ring { border-radius: 14px; }
.qc-bubble { position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 112px); transform: translateX(-50%); width: min(340px, calc(100vw - 32px));
  padding: 8px 12px 10px; border-radius: 14px; color: #fff; pointer-events: auto;
  background: linear-gradient(165deg, rgba(46,16,101,.95), rgba(20,10,46,.95)); border: 2px solid #FACC15; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.qc-bubble.pop { animation: tutPopIn .25s cubic-bezier(.2,1.4,.4,1); }
.qc-head { display: flex; align-items: center; justify-content: space-between; }
.qc-step { font: 800 11px Nunito, system-ui, sans-serif; color: #FDE047; text-transform: uppercase; letter-spacing: .6px; }
.qc-skip { background: none; border: 0; color: #C4B5FD; font: 800 12px Nunito, system-ui, sans-serif; cursor: pointer; padding: 2px 0; }
.qc-skip[hidden] { display: none; }
.qc-text { margin-top: 2px; font: 700 14px/1.35 Nunito, system-ui, sans-serif; color: #F5F3FF; }
.qc-text b { color: #FDE047; }
.qc-ok { display: block; margin: 8px 0 0 auto; padding: 6px 14px; border: 0; border-radius: 10px; cursor: pointer; font: 400 13px Bungee, Impact, sans-serif; color: #3A2A00;
  background: linear-gradient(180deg, #FDE047, #EAB308); box-shadow: 0 3px 0 #A16207; }
.qc-ok[hidden] { display: none; }
.qc-ok:active { transform: translateY(2px); box-shadow: 0 1px 0 #A16207; }

/* ================= TOKO PASUKAN: 3 LANGKAH ================= */
.sh-steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 6px; }
.sh-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 20px; cursor: pointer;
  border: 2px solid rgba(255,255,255,.16); background: rgba(15,23,42,.7); color: #94A3B8; font: 800 13px Nunito, system-ui, sans-serif; transition: all .15s; }
.sh-step i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 400 12px Bungee, Impact, sans-serif; font-style: normal;
  background: rgba(255,255,255,.12); color: #CBD5E1; }
.sh-step.on { border-color: #FACC15; color: #FEF9C3; background: rgba(120,53,15,.55); box-shadow: 0 0 0 3px rgba(250,204,21,.18); }
.sh-step.on i { background: #FACC15; color: #3A2A00; }
.sh-step.done { color: #BBF7D0; border-color: rgba(74,222,128,.5); }
.sh-step.done i { background: #22C55E; color: #052E16; }
.sh-step-line { flex: 0 1 28px; height: 2px; border-radius: 1px; background: rgba(255,255,255,.2); }
.sh-hint { margin: 0 0 8px; text-align: center; font: 700 13px/1.35 Nunito, system-ui, sans-serif; color: #E2E8F0; }
.sh-page[hidden], .sh-skill[hidden], .ox-actions .ox-btn[hidden] { display: none !important; }
.sh-skill[data-sub="2"] .rj-ult-box, .sh-skill[data-sub="2"] .rj-terr-box { display: none !important; }
.sh-skill[data-sub="3"] .rj-skill-grid { display: none !important; }
@media (max-width: 520px) { .sh-step { padding-right: 8px; font-size: 12px; } .sh-step-line { flex-basis: 12px; } }
.sh-hint.bad { color: #FCA5A5; animation: rjNote .35s ease-out; }
.sh-page .rj-shop-note:empty { display: none; }

/* Layar pendek (HP mendatar): tiap langkah toko muat tanpa digulir */
@media (max-height: 520px) {
  .ox-wrap:has(> .sh-steps) { gap: 6px; }
  .ox-wrap:has(> .sh-steps) .ox-head { grid-template-columns: 40px 1fr 40px; }
  .ox-wrap:has(> .sh-steps) .ox-back { width: 38px; height: 38px; padding: 6px; }
  .ox-wrap:has(> .sh-steps) .ox-title { padding: 4px 26px 5px; }
  .ox-wrap:has(> .sh-steps) .ox-title-ico { width: 26px; height: 26px; grid-row: auto; }
  .ox-wrap:has(> .sh-steps) .ox-title b { font-size: 17px; }
  .ox-wrap:has(> .sh-steps) .ox-title small { display: none; }
  .sh-steps { margin: 0; }
  .sh-step { padding: 3px 10px 3px 3px; font-size: 12px; }
  .sh-step i { width: 19px; height: 19px; font-size: 11px; }
  .sh-hint { margin: 0; font-size: 12px; }
  .ox-wrap:has(> .sh-steps) .sh-bar { padding: 4px 10px; top: 0; }
  .ox-wrap:has(> .sh-steps) .sh-gold { font-size: 17px; }
  .ox-wrap:has(> .sh-steps) .sh-gold .ox-coin { width: 22px; height: 22px; }
  .ox-wrap:has(> .sh-steps) .sh-tools .ox-pill { padding-top: 3px; padding-bottom: 3px; }
  .ox-wrap:has(> .sh-steps) .sh-page { display: flex; flex-direction: column; gap: 6px; }
  .ox-wrap:has(> .sh-steps) .sh-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px 6px; padding-top: 2px; }
  .ox-wrap:has(> .sh-steps) .sh-main { padding: 4px 3px 3px; gap: 0; }
  .ox-wrap:has(> .sh-steps) .sh-port { width: 34px; height: 34px; }
  .ox-wrap:has(> .sh-steps) .sh-main small { font-size: 10px; }
  .ox-wrap:has(> .sh-steps) .sh-price { font-size: 11px; }
  .ox-wrap:has(> .sh-steps) .ox-actions.sticky { padding: 4px 6px 6px; bottom: -16px; }
  .ox-wrap:has(> .sh-steps) .ox-actions .ox-btn.big { padding: 7px 20px; font-size: 15px; }
  .ox-wrap:has(> .sh-steps) .ox-actions .ox-btn.ghost { padding-top: 7px; padding-bottom: 7px; }
  .sh-skill.lo-panel, .rj-step-skills.lo-panel { padding: 6px 10px 8px; }
  .sh-skill > h3, .rj-step-skills > h3 { display: none; }
  .sh-skill .lo-slots, .rj-step-skills .lo-slots { padding: 4px 6px 6px; gap: 8px; }
  .sh-skill .lo-slots .lo-slot, .rj-step-skills .lo-slots .lo-slot { width: 44px; height: 44px; padding: 5px; border-radius: 12px; }
  .sh-skill .lo-pool, .rj-step-skills .lo-pool { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 4px; margin-top: 6px; }
  .sh-skill .lo-tile, .rj-step-skills .lo-tile { padding: 3px 2px 2px; }
  .sh-skill .lo-tile .lo-ico, .rj-step-skills .lo-tile .lo-ico { width: 28px; height: 28px; }
  .sh-skill .lo-info, .rj-step-skills .lo-info { min-height: 0; padding: 4px 8px; margin-top: 6px; font-size: 11.5px; }
  .sh-skill .rj-ult-box, .rj-step-skills .rj-ult-box, .sh-skill .rj-terr-box, .rj-step-skills .rj-terr-box { margin-top: 2px; gap: 5px; }
}
@media (max-height: 390px) {
  .ox-wrap:has(> .sh-steps) { gap: 4px; }
  .ox-wrap:has(> .sh-steps) .ox-title { padding: 2px 22px 3px; }
  .ox-wrap:has(> .sh-steps) .ox-title b { font-size: 15px; }
  .ox-wrap:has(> .sh-steps) .ox-back { width: 34px; height: 34px; }
  .sh-hint { font-size: 11px; line-height: 1.25; }
  .sh-skill .lo-slots .lo-slot, .rj-step-skills .lo-slots .lo-slot { width: 38px; height: 38px; padding: 4px; }
  .sh-skill .lo-slots kbd, .rj-step-skills .lo-slots kbd { transform: scale(.85); }
  .sh-skill .lo-pool, .rj-step-skills .lo-pool { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 3px; margin-top: 4px; }
  .sh-skill .lo-tile .lo-ico, .rj-step-skills .lo-tile .lo-ico { width: 24px; height: 24px; }
  .sh-skill .lo-tile small, .rj-step-skills .lo-tile small { font-size: 8.5px; }
  .sh-skill .lo-info, .rj-step-skills .lo-info { margin-top: 4px; padding: 3px 8px; }
  .ox-wrap:has(> .sh-steps) .sh-port { width: 30px; height: 30px; }
  .ox-wrap:has(> .sh-steps) .sh-grid { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 7px 5px; }
}

/* ================= MODE RAJA: 3 LANGKAH (BERTAP) ================= */
.rj-page[hidden] { display: none !important; }
.rj-page { display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }

/* Langkah 1: Ringkasan tahap terpilih */
.rj-stage-brief { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-radius: 14px; background: rgba(15,23,42,.75); border: 2px solid rgba(250,204,21,.35); box-shadow: 0 4px 12px rgba(0,0,0,.3); margin-bottom: 2px; }
.rj-brief-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rj-brief-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 400 16px Bungee, Impact, sans-serif; color: #3A2A00; background: radial-gradient(circle at 35% 30%, #FEF9C3, #EAB308 70%); border: 2.5px solid #1E1A24; flex-shrink: 0; }
.rj-brief-meta { display: flex; flex-direction: column; min-width: 0; }
.rj-brief-meta b { font-size: 14px; font-weight: 800; color: #FEF3C7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.rj-brief-meta small { font-size: 11px; color: #94A3B8; font-weight: 700; }
.rj-brief-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rj-brief-btn { padding: 6px 14px; font-size: 13px; }
.lo-stage.picked { box-shadow: 0 5px 0 #1E0B3A, 0 0 0 3px #38BDF8, 0 0 20px rgba(56,189,248,.6) !important; transform: translateY(-2px) scale(1.03); }
.sty-prolog-card { flex-direction: row !important; justify-content: center; align-items: center; gap: 12px !important; padding: 8px 16px !important; max-width: 420px; margin: 0 auto 6px !important; }
.sty-prolog-card .lo-stage-n { width: 34px; height: 34px; font-size: 16px; margin: 0; }

/* Langkah 2: Raja & Skill. Satu tab = satu bidang fokus (Raja / Jurus / Ultimate / Medan); empat tab sama lebar,
   isi tiap tab ditata simetris dan tidak saling berebut ruang. */
.rj-skill-desc:empty { display: none; }
.rj-subtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rj-subtab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 5px 6px 6px;
  border-radius: 14px; border: 2px solid rgba(255,255,255,.16); background: rgba(15,23,42,.7); color: #94A3B8; cursor: pointer; transition: all .15s; }
.rj-subtab b { display: inline-flex; align-items: center; gap: 5px; font: 400 12.5px Bungee, Impact, sans-serif; letter-spacing: .3px; color: inherit; }
.rj-subtab b i { font-style: normal; font-size: 13px; filter: grayscale(.6); }
.rj-subtab small { max-width: 100%; font: 800 10.5px Nunito, system-ui, sans-serif; color: #CBD5E1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rj-subtab:hover { border-color: rgba(250,204,21,.5); }
.rj-subtab.on { border-color: #FACC15; background: rgba(120,53,15,.55); color: #FEF9C3; box-shadow: 0 0 0 3px rgba(250,204,21,.18); }
.rj-subtab.on b i { filter: none; }
.rj-subtab.seen:not(.on) b::after { content: ''; width: 7px; height: 7px; margin-left: 3px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 6px rgba(74,222,128,.7); }
.rj-subtab.need { border-color: rgba(248,113,113,.7); }
.rj-subtab.need small { color: #FCA5A5; }
.rj-step-skills { display: block !important; }
.rj-step-skills[data-sub="hero"] > :not(.rj-hero-box),
.rj-step-skills[data-sub="skill"] > :not(#rjSkillGrid):not(.rj-lockbar),
.rj-step-skills[data-sub="ult"] > :not(.rj-ult-box),
.rj-step-skills[data-sub="terr"] > :not(.rj-terr-box) { display: none !important; }
/* Raja: semua sekutu dalam satu baris (membungkus ke baris kedua bila layar sempit), rata tengah */
.rj-step-skills .rj-hero-box { margin: 0; gap: 8px; }
.rj-step-skills .rj-hero-head { justify-content: center; text-align: center; }
.rj-step-skills .rj-hero-row { flex-wrap: wrap; justify-content: center; overflow: visible; scroll-snap-type: none; padding: 4px 2px 6px; }
/* Jurus */
.rj-step-skills .lo-slots { justify-content: center; }
.rj-step-skills .lo-pool { justify-content: center; }
.rj-step-skills:not(.show-locked) #rjSkillGrid .lo-tile.locked { display: none; }
.rj-lockbar { display: block; margin: 8px auto 0; padding: 4px 14px; border-radius: 999px; border: 1.5px dashed rgba(255,255,255,.3); background: rgba(15,23,42,.6); color: #CBD5E1; font: 800 11.5px Nunito, system-ui, sans-serif; cursor: pointer; }
.rj-lockbar:hover { border-color: #FACC15; color: #FEF9C3; }
.rj-lockbar[hidden] { display: none; }
/* Ultimate & Medan: kiri = pilihan, kanan = penjelasan (+ video), tinggi sama */
.rj-step-skills .rj-ult-box, .rj-step-skills .rj-terr-box { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 10px; align-items: stretch; }
.rj-step-skills .rj-ult-box > *, .rj-step-skills .rj-terr-box > * { min-width: 0; }
.rj-step-skills .rj-ult-box .lo-ult-lbl, .rj-step-skills .rj-terr-box .lo-ult-lbl { display: none; }
.rj-step-skills .lo-ult.u2-grid { align-items: flex-start; }
.rj-step-skills .u2-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rj-step-skills .rj-terr-box .lo-ult { flex-wrap: wrap; align-content: flex-start; }
.rj-step-skills .rj-terr-box .lo-ult .lo-tile.ult { flex: 1 1 130px; }
.rj-step-skills .rj-ult-box .lo-info, .rj-step-skills .rj-terr-box .lo-info { margin: 0; align-self: stretch; }
.rj-step-skills .lo-info.u2-info { align-items: center; }
.rj-step-skills .u2-text span { font-size: 11.5px; line-height: 1.35; }
.rj-step-skills .u2-prev { width: 128px; }
@media (max-width: 639px) {
  .rj-step-skills .rj-ult-box, .rj-step-skills .rj-terr-box { grid-template-columns: minmax(0, 1fr); }
}
/* Jurus (layar lebar): 4 slot di kiri, koleksi jurus di kanan, satu baris info di bawah keduanya */
@media (min-width: 700px) {
  .rj-step-skills .lo-host.rj-skill-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "slots pool" "info info"; gap: 8px 12px; align-items: center; }
  .rj-step-skills .lo-host.rj-skill-grid > .lo-slots { grid-area: slots; margin: 0; padding: 6px 12px 12px; }
  .rj-step-skills .lo-host.rj-skill-grid > .lo-pool { grid-area: pool; justify-content: flex-start; }
  .rj-step-skills .lo-host.rj-skill-grid > .lo-info { grid-area: info; margin: 0; }
}
/* HP mendatar sangat pendek (<= 390px): teks & video penjelasan dirapatkan supaya deskripsi terpanjang tetap muat */
@media (max-height: 390px) and (min-width: 600px) {
  .rj-step-skills .u2-text span, .rj-step-skills .lo-info.terr span { font-size: 10.5px; line-height: 1.25; }
  .rj-step-skills .u2-prev { width: 104px; }
  .rj-step-skills .u2-tiles .lo-tile.ult { padding: 3px 2px 3px; }
  .rj-step-skills .u2-tiles .lo-tile.ult .lo-ico { width: 24px; height: 24px; }
  .rj-step-skills .rj-ult-box, .rj-step-skills .rj-terr-box { gap: 8px; }
}
/* HP mendatar (pendek): tab satu baris & rapat supaya isi tiap tab muat di layar */
@media (max-height: 520px) and (min-width: 600px) {
  .rj-subtabs { gap: 5px; }
  .rj-subtab { flex-direction: row; gap: 6px; padding: 4px 8px; border-radius: 12px; }
  .rj-subtab b { font-size: 11.5px; }
  .rj-subtab small { font-size: 10px; max-width: 68%; }
  .rj-step-skills.lo-panel { padding: 6px 10px 8px; }
  .rj-lockbar { margin-top: 5px; padding: 2px 12px; font-size: 10.5px; }
}

/* Langkah 3: Pasukan & Ringkasan */
.rj-step3-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) {
  .rj-step3-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .rj-step3-grid > * { min-width: 0; }
}
.rj-summary-card { display: flex; flex-direction: column; gap: 8px; }
.rj-summary-card h3 { margin-bottom: 2px; }
.rj-sum-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(2,6,23,.55); border: 1px solid rgba(255,255,255,.1); }
.rj-sum-hero-por { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex-shrink: 0; border: 2px solid #FACC15; background: #0F172A; }
.rj-sum-hero-por img { width: 100%; height: 100%; object-fit: cover; }
.rj-sum-hero-meta b { display: block; font-size: 13px; color: #FEF3C7; font-weight: 800; line-height: 1.2; }
.rj-sum-hero-meta small { font-size: 11px; color: #94A3B8; }
.rj-sum-section { display: flex; flex-direction: column; gap: 4px; }
.rj-sum-lbl { font: 800 11px Nunito, system-ui, sans-serif; color: #CBD5E1; text-transform: uppercase; letter-spacing: .4px; }
.rj-sum-icons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rj-sum-sk-ico, .rj-sum-tp-ico { width: 34px; height: 34px; border-radius: 9px; padding: 3px; box-sizing: border-box; background: rgba(15,23,42,.8); border: 1.5px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.rj-sum-sk-ico svg, .rj-sum-tp-ico img { width: 100%; height: 100%; object-fit: contain; }
.rj-sum-sk-ico.ult { border-color: #F472B6; background: rgba(120,20,60,.3); }
.rj-sum-sk-ico.terr { border-color: #38BDF8; background: rgba(14,116,144,.3); }
.rj-sum-go-btn { margin-top: 4px; padding: 10px 16px; font-size: 15px; justify-content: center; }

@media (max-height: 520px) {
  .rj-summary-card { padding: 6px 10px; gap: 5px; }
  .rj-sum-row { padding: 4px 8px; gap: 6px; }
  .rj-sum-hero-por { width: 32px; height: 32px; }
  .rj-sum-sk-ico, .rj-sum-tp-ico { width: 28px; height: 28px; padding: 2px; }
  .rj-sum-go-btn { display: none; }
  .rj-stage-brief { padding: 4px 10px; }
  .rj-brief-num { width: 28px; height: 28px; font-size: 12px; }
  .rj-brief-meta b { font-size: 12px; }
  .rj-brief-meta small { font-size: 10px; }
  .rj-brief-btn { padding: 3px 8px; font-size: 11px; }
  .rj-hero { width: 50px; padding-bottom: 2px; }
  .rj-hero small { font-size: 9px; }
  .rj-hero-box { margin-bottom: 4px; gap: 3px; }
  .rj-hero-head { font-size: 11px; }
  .rj-hero-row { padding: 3px 2px 4px; gap: 5px; }
  .rj-step-skills { gap: 6px 10px; }
}

/* ================= HUD ULTIMATE: cooldown jelas ================= */
.rj-sk.rj-ult { --p: 0; }
.rj-ult .rj-fill { opacity: .45; }
.rj-ult-ring { position: absolute; inset: 0; border-radius: 50%; z-index: 3; pointer-events: none;
  background: conic-gradient(from -90deg, #FDE047 calc(var(--p) * 1%), rgba(255,255,255,.13) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.rj-ult-pct { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  font: 400 13px Bungee, Impact, system-ui, sans-serif; color: #FFF; letter-spacing: .3px; white-space: nowrap;
  text-shadow: 0 2px 3px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.8); }
.rj-ult.charging span { filter: grayscale(.75) brightness(.5); opacity: .7; }
.rj-ult.charging kbd { opacity: .35; }
.rj-ult.ready { border-color: #FDE047 !important; animation: rjUltReady 1.1s ease-in-out infinite; }
.rj-ult.ready .rj-ult-ring { background: conic-gradient(from 0deg, #FDE047, #FFF7C2, #F59E0B, #FDE047); animation: rjUltSpin 1.6s linear infinite; }
.rj-ult.ready .rj-ult-pct { top: 5px; transform: translateX(-50%); font-size: 9px; color: #3A2A00; background: #FACC15; padding: 1px 5px 0; border-radius: 7px; text-shadow: none; box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.rj-ult.ult-pop { animation: rjUltPop .5s cubic-bezier(.175,.885,.32,1.275), rjUltReady 1.1s ease-in-out .5s infinite; }
.raja-ui.rj-touch .rj-ult-pct { font-size: 15px; }
.raja-ui.rj-touch .rj-ult.ready .rj-ult-pct { font-size: 10px; top: 6px; }
@keyframes rjUltReady { 0%,100% { box-shadow: 0 0 0 2px rgba(253,224,71,.85), 0 0 14px 2px rgba(250,204,21,.55); } 50% { box-shadow: 0 0 0 4px rgba(253,224,71,1), 0 0 26px 8px rgba(250,204,21,.85); } }
@keyframes rjUltSpin { to { transform: rotate(360deg); } }
@keyframes rjUltPop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }

/* ================= PEMILIH ULTIMATE: 7 pilihan + video pratinjau ================= */
.lo-ult.u2-grid { align-items: flex-start; }
.u2-tiles { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.u2-tiles .lo-tile.ult { min-height: 0; padding: 5px 3px 4px; flex-direction: column; }
.u2-tiles .lo-tile.ult .lo-ico { width: 34px; height: 34px; }
.u2-tiles .lo-tile.ult small { font-size: 9.5px; white-space: normal; line-height: 1.1; text-align: center; }
.lo-info.u2-info { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.u2-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.u2-text span { -webkit-line-clamp: unset !important; }
.u2-prev { position: relative; flex: 0 0 auto; width: 176px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0B1020; border: 2px solid rgba(250,204,21,.7); box-shadow: 0 4px 14px rgba(0,0,0,.45), 0 0 12px rgba(250,204,21,.25); }
.u2-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.u2-prev.none { display: none; }
.u2-prev.pop { animation: u2PrevPop .35s cubic-bezier(.175,.885,.32,1.275); }
.u2-prev-tag { position: absolute; left: 6px; top: 5px; font: 800 8.5px Nunito, system-ui, sans-serif; font-style: normal; letter-spacing: .6px; color: #FEF3C7; background: rgba(0,0,0,.55); padding: 1px 5px; border-radius: 5px; }
@keyframes u2PrevPop { 0% { transform: scale(.85); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }
@media (max-height: 520px) { .u2-prev { width: 150px; } .u2-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; } .u2-tiles .lo-tile.ult .lo-ico { width: 26px; height: 26px; } .u2-tiles .lo-tile.ult small { font-size: 8.5px; } }
@media (max-height: 520px) {
  .u2-prev { width: 128px; }
  .lo-info.u2-info { padding: 3px 8px; gap: 8px; }
  .u2-text b { font-size: 12px; }
  .u2-text span { font-size: 11px; -webkit-line-clamp: 3 !important; }
}

/* ================= Baki berkelompok + Bangunan Ultimate Mekanik ================= */
.tab-sub { display: flex; align-items: center; gap: 3px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-left: 6px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.16); }
.tab-sub::-webkit-scrollbar { display: none; }
.tab-sub[hidden] { display: none; }
.sub-btn { flex: 0 0 auto; font: 800 10.5px Nunito, sans-serif; border-radius: 999px; padding: 2px 8px; border: 1px solid rgba(148,163,184,.35); background: rgba(15,26,40,.9); color: #CBD5E1; white-space: nowrap; cursor: pointer; transition: all .12s; }
.sub-btn[aria-pressed="true"] { background: rgba(56,189,248,.24); border-color: #7DD3FC; color: #fff; box-shadow: 0 0 0 1px rgba(125,211,252,.25); }
.sub-btn:active { transform: scale(.94); }
.tab-btn.ult { background: linear-gradient(135deg, rgba(76,29,149,.9), rgba(30,58,138,.9)); border-color: rgba(250,204,21,.55); color: #FDE68A; }
.tab-btn.ult[aria-selected="true"] { background: linear-gradient(135deg, #F59E0B, #B45309); border-color: #FEF3C7; color: #fff; box-shadow: 0 0 10px rgba(250,204,21,.45); }
.card.ult { background: linear-gradient(135deg, #5B21B6, #1E3A8A); border-color: rgba(250,204,21,.6); box-shadow: inset 0 0 12px rgba(250,204,21,.18); }
.card.ult[aria-pressed="true"] { background: linear-gradient(135deg, #7C3AED, #2563EB); border-color: #FDE68A; box-shadow: 0 0 10px rgba(250,204,21,.5), 0 2px 6px rgba(0,0,0,.4); }
.card.ult.locked { background: #3B4755; box-shadow: none; }
.card.ult.maxed { opacity: .6; }
.card-max { font-style: normal; font-size: 9px; color: #FCA5A5; margin-left: 4px; }
.hotbar .hot.ult { background: linear-gradient(135deg, #6D28D9, #1E40AF); border-color: rgba(250,204,21,.7); }

@media (orientation: landscape) and (max-height: 500px) {
  .sub-btn { padding: 3px 9px; font-size: 11px; }
}
@media (max-width: 720px) {
  .tab-btn { padding: 2px 6px; }
  .sub-btn { padding: 2px 7px; }
  .dock-info { display: none; }
}
.ol-prev span.ol-prev-ult { color: #FDE68A; font-weight: 800; }
/* Layar sempit: tombol aksi baki cukup ikonnya supaya chip kelompok muat */
@media (max-width: 740px) {
  .dock-actions .btn { width: 25px; min-width: 25px; padding-left: 5px !important; padding-right: 0 !important; overflow: hidden; white-space: nowrap; text-align: left; justify-content: flex-start; }
  .dock-actions .dock-hide-btn { width: 21px; min-width: 21px; }
  .tab-sub { padding-left: 4px; }
  .sub-btn { padding: 2px 6px; }
}

/* ================= Serbu Benteng: banner Bangun Benteng + filter ringkas ================= */
.ox-build-hero { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; margin: 2px 0 12px; padding: 10px 18px 10px 10px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 45%, #7C3AED 100%); border: 4px solid #1E1A24; border-radius: 22px;
  box-shadow: 0 7px 0 #1E1A24, 0 0 0 3px rgba(250,204,21,.55), 0 12px 32px rgba(37,99,235,.45); overflow: hidden; animation: obhPulse 2.4s ease-in-out infinite; transition: transform .12s; }
.ox-build-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 48%, transparent 60%); transform: translateX(-120%); animation: obhShine 3.2s ease-in-out infinite; pointer-events: none; }
.ox-build-hero:hover { transform: translateY(-2px); }
.ox-build-hero:active { transform: translateY(4px); box-shadow: 0 3px 0 #1E1A24, 0 0 0 3px rgba(250,204,21,.55); }
.ox-bh-art { flex: 0 0 auto; width: 190px; height: 112px; border-radius: 14px; background: #0F2A6B; border: 3px solid #1E1A24; overflow: hidden; }
.ox-bh-art svg { width: 100%; height: 100%; display: block; }
.ox-bh-art .obh-gear { animation: obhGear 6s linear infinite; transform-box: fill-box; transform-origin: center; }
.ox-bh-art .obh-ult { animation: obhBob 1.8s ease-in-out infinite; }
.ox-bh-art .obh-spark { animation: obhTwinkle 1.4s ease-in-out infinite; }
.ox-bh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; position: relative; }
.ox-bh-txt b { font: 400 30px/1.05 Bungee, Impact, sans-serif; letter-spacing: .5px; color: #FEF3C7; text-shadow: 0 3px 0 #1E1A24, 0 0 14px rgba(250,204,21,.4); }
.ox-bh-txt small { font: 700 14px/1.3 Nunito, system-ui, sans-serif; color: #E0E7FF; }
.ox-bh-txt em { font: 800 13px Nunito, system-ui, sans-serif; font-style: normal; color: #FDE68A; }
.ox-bh-go { position: relative; flex: 0 0 auto; font: 400 22px Bungee, Impact, sans-serif; color: #3A2A00; padding: 12px 20px; border-radius: 16px; border: 3px solid #1E1A24;
  background: linear-gradient(180deg, #FEF08A, #EAB308); box-shadow: 0 5px 0 #854D0E; animation: obhGo 1.2s ease-in-out infinite; }
@keyframes obhPulse { 0%, 100% { box-shadow: 0 7px 0 #1E1A24, 0 0 0 3px rgba(250,204,21,.55), 0 12px 32px rgba(37,99,235,.45); } 50% { box-shadow: 0 7px 0 #1E1A24, 0 0 0 6px rgba(250,204,21,.9), 0 12px 40px rgba(250,204,21,.45); } }
@keyframes obhShine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes obhGear { to { transform: rotate(360deg); } }
@keyframes obhBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes obhTwinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes obhGo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ox-fh-row { position: relative; z-index: 40; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ox-fh-sp { flex: 1; }
.ox-dd { position: relative; }
.ox-dd-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: rgba(8,12,28,.75); color: #F1F5F9; border: 2.5px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 12px 5px 8px; font: 800 13px Nunito, system-ui, sans-serif; white-space: nowrap; }
.ox-dd-btn .ox-lg, .ox-dd-btn svg { width: 24px; height: 24px; }
.ox-dd-btn i { font-style: normal; opacity: .7; transition: transform .15s; }
.ox-dd.open .ox-dd-btn { border-color: #FACC15; }
.ox-dd.open .ox-dd-btn i { transform: rotate(180deg); }
.ox-dd-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 170px; display: flex; flex-direction: column; gap: 3px; padding: 6px; background: #0F172A; border: 3px solid #1E1A24; border-radius: 14px; box-shadow: 0 10px 26px rgba(0,0,0,.55); }
.ox-dd-menu[hidden] { display: none; }
.ox-dd-menu button { display: flex; align-items: center; gap: 8px; cursor: pointer; background: transparent; border: 0; border-radius: 9px; padding: 7px 10px; color: #E2E8F0; font: 800 13px Nunito, system-ui, sans-serif; text-align: left; white-space: nowrap; }
.ox-dd-menu button .ox-lg { width: 22px; height: 22px; }
.ox-dd-menu button:hover { background: rgba(255,255,255,.08); }
.ox-dd-menu button.on { background: linear-gradient(180deg, #FEF08A, #EAB308); color: #3A2A00; }
@media (orientation: landscape) and (max-height: 500px), (max-width: 700px) {
  .ox-build-hero { gap: 10px; padding: 6px 12px 6px 6px; margin-bottom: 8px; border-radius: 16px; }
  .ox-bh-art { width: 120px; height: 70px; border-radius: 10px; }
  .ox-bh-txt b { font-size: 20px; }
  .ox-bh-txt small { font-size: 11.5px; }
  .ox-bh-txt em { font-size: 11px; }
  .ox-bh-go { font-size: 15px; padding: 8px 12px; }
  .ox-fh-row { flex-wrap: nowrap; gap: 6px; margin-bottom: 6px; }
  .ox-dd-btn { padding: 3px 9px 3px 6px; font-size: 12px; }
  .ox-dd-btn .ox-lg, .ox-dd-btn svg { width: 20px; height: 20px; }
  .ox-fh-row .ox-fh-b { padding: 5px 9px; font-size: 12px; }
  .ox-fh-row .ox-fh-b span { display: none; }
  .ox-fh-row .ox-fh-id { flex: 0 1 160px; min-width: 120px; }
  .ox-fh-row .ox-fh-id .ox-in { padding: 5px 8px; font-size: 13px; letter-spacing: 1px; }
  .ox-fh-row .ox-fh-id .ox-btn { padding: 5px 10px; font-size: 12.5px; }
}
@media (max-width: 560px) { .ox-bh-go { display: none; } .ox-fh-row { flex-wrap: wrap; } }
.ox-fh-row .ox-fh-id .ox-in::placeholder { font: 800 13px Nunito, system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
.qc-bubble.qc-low { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }

/* ================= Duel: menu ringkas + CARI LAWAN (matchmaking) ================= */
.ox-mm-hero { position: relative; display: flex; align-items: stretch; width: 100%; margin: 4px 0 12px; padding: 0; cursor: pointer; text-align: left; color: #fff; border: 4px solid #1E1A24; border-radius: 22px; overflow: hidden;
  background: linear-gradient(90deg, #1E3A8A 0%, #312E81 45%, #7F1D1D 100%); box-shadow: 0 8px 0 #1E1A24, 0 0 0 3px rgba(250,204,21,.6), 0 14px 36px rgba(99,102,241,.45); animation: obhPulse 2.4s ease-in-out infinite; transition: transform .12s; }
.ox-mm-hero::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.25) 48%, transparent 60%); transform: translateX(-120%); animation: obhShine 3.2s ease-in-out infinite; pointer-events: none; }
.ox-mm-hero:hover { transform: translateY(-2px); }
.ox-mm-hero:active { transform: translateY(4px); }
.ox-mm-art { position: absolute; top: 0; bottom: 0; right: 0; width: 58%; opacity: .95; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.ox-mm-art .ox-art { width: 100%; height: 100%; display: block; }
.ox-mm-txt { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 18px 20px; min-height: 150px;
  background: linear-gradient(90deg, rgba(15,10,40,.55) 0%, rgba(15,10,40,.25) 60%, rgba(15,10,40,0) 100%); }
.ox-mm-txt b { font: 400 40px/1 Bungee, Impact, sans-serif; color: #FEF3C7; text-shadow: 0 4px 0 #1E1A24, 0 0 18px rgba(250,204,21,.45); letter-spacing: .5px; }
.ox-mm-txt small { font: 800 15px Nunito, system-ui, sans-serif; color: #E0E7FF; }
.ox-mm-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ox-mm-rules i { font: 800 11.5px Nunito, system-ui, sans-serif; font-style: normal; background: rgba(15,23,42,.85); border: 1.5px solid rgba(255,255,255,.22); border-radius: 999px; padding: 2px 9px; }
.ox-mm-go { position: relative; z-index: 1; align-self: center; margin-right: 18px; font: 400 26px Bungee, Impact, sans-serif; color: #3A2A00; padding: 14px 22px; border-radius: 18px; border: 3px solid #1E1A24;
  background: linear-gradient(180deg, #FEF08A, #EAB308); box-shadow: 0 6px 0 #854D0E; animation: obhGo 1.2s ease-in-out infinite; }
.ox-mm-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ox-mm-row .ox-btn { gap: 6px; }
.ox-mm-ic { font-size: 20px; padding: 8px 12px; }
.ox-mm-friends { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ox-mm-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px; cursor: default; color: #fff; font: inherit; }
button.ox-mm-card { cursor: pointer; border: 3px solid #1E1A24; }
button.ox-mm-card:hover { transform: translateY(-2px); }
.ox-mm-card b { font: 400 20px Bungee, Impact, sans-serif; color: #FEF3C7; }
.ox-mm-card small { color: #CBD5E1; font-weight: 700; }
.ox-mm-big { font-size: 34px; }
.ox-mm-card .ox-code-in { width: 170px; text-align: center; }
.ox-mm-lg { display: flex; justify-content: center; gap: 8px; margin: 2px 0 8px; }
.ox-mm-lg button { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; background: rgba(8,12,28,.75); color: #CBD5E1; border: 2.5px solid rgba(255,255,255,.2); border-radius: 999px; padding: 4px 12px 4px 6px; font: 800 13px Nunito, system-ui, sans-serif; }
.ox-mm-lg button .ox-lg { width: 24px; height: 24px; }
.ox-mm-lg button.on { background: linear-gradient(180deg, #FEF08A, #EAB308); color: #3A2A00; border-color: #1E1A24; box-shadow: 0 4px 0 #854D0E; }
.mm-radar { position: relative; width: 190px; height: 190px; margin: 6px auto; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.35), rgba(30,27,75,.9) 70%); border: 4px solid #1E1A24; box-shadow: 0 0 0 3px #818CF8, 0 0 40px rgba(129,140,248,.5); overflow: hidden; }
.mm-ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid rgba(165,180,252,.8); animation: mmRing 2.4s ease-out infinite; }
.mm-ring.r2 { animation-delay: .8s; }
.mm-ring.r3 { animation-delay: 1.6s; }
.mm-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(250,204,21,.55), rgba(250,204,21,0) 22%, transparent 100%); animation: mmSweep 2s linear infinite; }
.mm-me { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.mm-me .ox-av { width: 64px; height: 64px; }
.mm-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #FACC15; box-shadow: 0 0 10px #FACC15; opacity: 0; animation: mmDot 2s ease-in-out infinite; }
.mm-dot.d1 { left: 28%; top: 24%; }
.mm-dot.d2 { left: 72%; top: 36%; animation-delay: .7s; }
.mm-dot.d3 { left: 40%; top: 76%; animation-delay: 1.3s; }
.mm-status { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-top: 8px; }
.mm-status b { font: 400 24px Bungee, Impact, sans-serif; color: #FEF3C7; text-shadow: 0 3px 0 #1E1A24; }
.mm-dots::after { content: ''; animation: mmDots 1.2s steps(4) infinite; }
.mm-clock { font: 400 20px Bungee, Impact, sans-serif; color: #A5B4FC; }
.mm-info { text-align: center; color: #CBD5E1; font-weight: 700; margin: 4px 0 8px; }
.mm-info b { color: #FDE68A; }
.mm-bot { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; font-weight: 700; }
.mm-bot[hidden] { display: none; }
.mm-lobby-tag { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 8px 12px; font-weight: 700; color: #E0E7FF; }
.mm-lobby-tag b { color: #FDE68A; }
.mm-found { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 6px; }
.mm-fp { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: mmSlideL .45s cubic-bezier(.2,1.3,.4,1) both; }
.mm-fp.foe { animation-name: mmSlideR; }
.mm-fp .ox-player-av .ox-av { width: 84px; height: 84px; }
.mm-fp b { font: 400 20px Bungee, Impact, sans-serif; color: #fff; }
.mm-fp small { color: #FDE68A; font-weight: 800; }
.mm-fvs { display: flex; flex-direction: column; align-items: center; animation: mmVs .5s .25s cubic-bezier(.2,1.6,.4,1) both; }
.mm-fvs b { font: 400 44px Bungee, Impact, sans-serif; color: #F87171; text-shadow: 0 4px 0 #1E1A24; }
@keyframes mmRing { from { transform: scale(.4); opacity: 1; } to { transform: scale(5); opacity: 0; } }
@keyframes mmSweep { to { transform: rotate(360deg); } }
@keyframes mmDot { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes mmDots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@keyframes mmSlideL { from { transform: translateX(-120px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mmSlideR { from { transform: translateX(120px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mmVs { from { transform: scale(3); opacity: 0; } to { transform: none; opacity: 1; } }
@media (orientation: landscape) and (max-height: 500px), (max-width: 700px) {
  .ox-mm-hero { margin-bottom: 8px; border-radius: 16px; }
  .ox-mm-txt { min-height: 104px; padding: 10px 14px; }
  .ox-mm-txt b { font-size: 28px; }
  .ox-mm-txt small { font-size: 12.5px; }
  .ox-mm-rules i { font-size: 10.5px; padding: 1px 7px; }
  .ox-mm-go { font-size: 18px; padding: 9px 14px; margin-right: 12px; }
  .ox-mm-row .ox-btn { padding: 6px 12px; font-size: 13px; }
  .ox-mm-ic { font-size: 17px; padding: 5px 10px; }
  .mm-radar { width: 128px; height: 128px; margin: 2px auto; }
  .mm-me .ox-av { width: 46px; height: 46px; }
  .mm-status { margin-top: 4px; }
  .mm-status b { font-size: 18px; }
  .mm-clock { font-size: 16px; }
  .mm-info { margin: 2px 0 4px; font-size: 12.5px; }
  .ox-mm-lg { margin: 0 0 4px; }
  .ox-mm-lg button { padding: 2px 10px 2px 5px; font-size: 12px; }
  .mm-found { margin: 8px 0 4px; }
  .mm-fp .ox-player-av .ox-av { width: 60px; height: 60px; }
  .ox-mm-card { padding: 8px; gap: 3px; }
  .ox-mm-big { font-size: 24px; }
  .ox-mm-card b { font-size: 16px; }
}
@media (max-width: 560px) { .ox-mm-go { display: none; } .ox-mm-friends { grid-template-columns: 1fr; } }

/* ================= Aplikasi Android (Capacitor) ================= */
.native-app #fsBtn { display: none !important; }
.native-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 2147483000; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: rgba(15,23,42,.92); color: #fff; font: 800 14px Nunito, system-ui, sans-serif; padding: 9px 16px; border-radius: 999px; border: 2px solid rgba(250,204,21,.7); }
.native-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Toko Pasukan: nama lengkap, panel fungsi pasukan, peringatan tanpa pasukan, pemandu belanja ---------- */
/* Nama pasukan & skill tidak dipotong "...": boleh 2 baris */
.sh-main small, .ox-wrap:has(> .sh-steps) .sh-main small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.1; text-align: center; min-height: 2.2em; display: flex; align-items: center; }
.lo-tile small, .sh-skill .lo-tile small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.1; text-align: center; }
/* Penjelasan skill, ultimate, dan medan tampil utuh */
.lo-info span { display: block; -webkit-line-clamp: unset; overflow: visible; }
.sh-info { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 7px 12px; border-radius: 12px; background: rgba(2,6,23,.6); border-left: 3px solid #FACC15; }
.sh-info.in { animation: loInfo .25s ease-out; }
.sh-info-port { flex: 0 0 auto; width: 40px; height: 40px; }
.sh-info-port img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; display: block; }
.sh-info-main { flex: 1; min-width: 0; }
.sh-info-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.sh-info-h b { color: #FEF3C7; font: 800 14px Nunito, system-ui, sans-serif; }
.sh-info-h em { font-style: normal; font: 800 11px Nunito, system-ui, sans-serif; color: #3A2A00; background: #FACC15; border-radius: 8px; padding: 0 6px; }
.sh-info p { margin: 2px 0 0; font: 600 12.5px/1.35 Nunito, system-ui, sans-serif; color: #E2E8F0; }
@media (max-height: 460px) {
  .sh-info { margin-top: 4px; padding: 4px 10px; gap: 8px; }
  .sh-info-port { width: 32px; height: 32px; }
  .sh-info-h b { font-size: 13px; }
  .sh-info p { font-size: 11.5px; line-height: 1.3; }
}
.sh-card .sh-main.sh-nudge { animation: shNudge .9s ease-in-out 2; }
@keyframes shNudge { 0%, 100% { transform: none; box-shadow: none; } 50% { transform: scale(1.1); box-shadow: 0 0 0 3px #FACC15, 0 0 18px rgba(250,204,21,.7); } }
.sh-warn { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2,6,23,.72); }
.sh-warn-card { width: min(400px, 100%); padding: 14px 18px 16px; border-radius: 18px; text-align: center; color: #F8FAFC;
  background: linear-gradient(165deg, #3B0764, #1E1B4B); border: 2px solid #FACC15; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: oxPop .35s cubic-bezier(.2,1.5,.4,1); }
.sh-warn-ic { font-size: 30px; line-height: 1; }
.sh-warn-card b { display: block; margin-top: 4px; font: 400 18px Bungee, Impact, sans-serif; color: #FDE68A; }
.sheet .sh-warn-card p { margin: 6px 0 12px; font: 700 13.5px/1.4 Nunito, system-ui, sans-serif; color: #E2E8F0; }
.sh-warn-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.qc-layer.qc-shop { z-index: 120; }
.qc-shop .qc-bubble { width: min(320px, calc(100vw - 20px)); }
@media (max-height: 460px) { .qc-shop .qc-text { font-size: 12.5px; } .qc-shop .qc-bubble { padding: 6px 10px 8px; } }
/* HP landscape lebar: 13 pasukan dalam satu baris supaya panel fungsi pasukan tidak tertutup tombol bawah */
@media (max-height: 460px) and (min-width: 760px) {
  .ox-wrap:has(> .sh-steps) .sh-grid { grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px 4px; }
  .ox-wrap:has(> .sh-steps) .sh-main small { font-size: 9.5px; }
}
/* Pemandu belanja v2: kemajuan tugas, peringatan terkunci, isi otomatis */
.qc-prog { position: relative; margin-top: 7px; height: 18px; border-radius: 9px; background: rgba(255,255,255,.12); overflow: hidden; }
.qc-prog[hidden] { display: none; }
.qc-prog i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22C55E, #86EFAC); transition: width .25s; }
.qc-prog span { position: relative; display: block; text-align: center; font: 800 11.5px/18px Nunito, system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.qc-need { margin-top: 6px; font: 800 12.5px Nunito, system-ui, sans-serif; color: #FCA5A5; }
.qc-need[hidden] { display: none; }
.qc-bubble.shake { animation: loShake .4s; }
.ox-pill.sh-auto { border-color: #FACC15; color: #FEF3C7; background: linear-gradient(180deg, rgba(180,83,9,.85), rgba(120,53,15,.9)); }
.sh-warn-skip { display: block; margin: 10px auto 0; background: none; border: 0; color: #94A3B8; font: 700 12px Nunito, system-ui, sans-serif; text-decoration: underline; cursor: pointer; }
.ox-btn.off { opacity: .55; filter: grayscale(.6); }

/* ---------- Duel: layar hasil ronde & akhir muat satu layar (tanpa scroll) ---------- */
.ox-result-banner small b { font-family: inherit; font-weight: 800; font-size: 1.15em; color: #FEF08A; text-shadow: none; animation: none; }
.dm-final { display: flex; flex-direction: column; gap: 10px; }
.dm-final-l, .dm-final-r { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dm-r1 { display: flex; flex-direction: column; gap: 10px; }
@media (orientation: landscape) and (max-height: 520px) {
  .dm-final { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; align-items: start; }
  .dm-final .ox-result, .dm-r1 .ox-result { min-height: 0; border-radius: 16px; }
  .dm-final .ox-result-banner, .dm-r1 .ox-result-banner { padding: 8px 10px; }
  .dm-final .ox-result-ico { width: 34px; height: 34px; }
  .dm-final .ox-result-banner b, .dm-r1 .ox-result-banner b { font-size: 34px; line-height: 1.05; }
  .dm-final .ox-result-banner small, .dm-r1 .ox-result-banner small { font-size: 12px; }
  .dm-final .ox-rating { margin: 0; padding: 5px 8px; font-size: 13px !important; }
  .dm-final .ox-rounds { gap: 6px; }
  .dm-final .ox-round { padding: 5px 9px; gap: 7px; }
  .dm-final .ox-round em { font-size: 12px; }
  .dm-final .ox-why { margin: 0; font-size: 12px; line-height: 1.35; }
  .dm-r1 { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 14px; align-items: center; }
  .dm-r1 .ox-swap-card { padding: 6px 12px; }
  .dm-r1 .ox-swap-card svg { width: 34px; height: 34px; }
  .ox-actions.dm-actions { flex-wrap: nowrap; gap: 6px; }
  .ox-actions.dm-actions .ox-btn { padding-top: 7px; padding-bottom: 7px; }
  .ox-actions.dm-actions .ox-btn.big { font-size: 15px; padding-left: 16px; padding-right: 16px; }
}

/* ---------- Ulasan benteng ---------- */
.ox-reviews h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ox-rev-avg { display: inline-flex; align-items: center; gap: 5px; font: 800 13px Nunito, system-ui, sans-serif; color: #FDE68A; }
.ox-rev-avg small { color: #94A3B8; font-weight: 700; }
.ox-rev-write { margin-left: auto; border-color: #FACC15 !important; color: #FEF3C7 !important; }
.ox-rev-write[hidden] { display: none; }
.ox-stars { display: inline-flex; gap: 1px; font-size: 14px; line-height: 1; letter-spacing: 0; }
.ox-stars i { font-style: normal; color: rgba(255,255,255,.22); }
.ox-stars i.on { color: #FACC15; text-shadow: 0 0 6px rgba(250,204,21,.5); }
.ox-rev-list { display: flex; flex-direction: column; gap: 7px; max-height: 260px; overflow-y: auto; padding-right: 2px; }
.ox-rev { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(8,12,28,.6); border: 2px solid rgba(255,255,255,.1); }
.ox-rev.me { border-color: rgba(250,204,21,.55); }
.ox-rev-main { flex: 1; min-width: 0; }
.ox-rev-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ox-rev-h b { font-size: 13px; color: #F8FAFC; }
.ox-rev-h small { color: #94A3B8; font-size: 11px; margin-left: auto; }
.ox-rev p { margin: 3px 0 5px; font: 600 13px/1.4 Nunito, system-ui, sans-serif; color: #E2E8F0; overflow-wrap: anywhere; }
.ox-rev-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ox-rev-chip { font: 800 11px Nunito, system-ui, sans-serif; color: #CBD5E1; background: rgba(255,255,255,.08); border-radius: 8px; padding: 1px 7px; }
.ox-rev-chip.bad { color: #FCA5A5; background: rgba(248,113,113,.12); }
.ox-rev-chip.ok { color: #86EFAC; background: rgba(74,222,128,.12); }
.ox-rev-thanks { color: #86EFAC; font-weight: 800; }
/* Laporkan konten */
.rep-reasons { display: flex; flex-direction: column; gap: 4px; margin: 4px 0; }
.rep-opt { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(2,6,23,.55); border: 1.5px solid rgba(255,255,255,.14); cursor: pointer; font-size: 13px; color: #E2E8F0; }
.rep-opt input { accent-color: #FACC15; }
.rep-opt:has(input:checked) { border-color: #FACC15; background: rgba(120,53,15,.4); }
.ox-rev-flag { margin-left: auto; padding: 0 5px; border: 0; background: transparent; cursor: pointer; font-size: 13px; opacity: .45; }
.ox-rev-flag:hover { opacity: 1; }
@media (max-height: 520px) { .rep-opt { padding: 3px 8px; font-size: 12px; } .rep-reasons { gap: 2px; } }
.ox-rev-dlg { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 12px; background: rgba(2,6,23,.72); }
.ox-rev-card { width: min(420px, 100%); max-height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(165deg, #3B0764, #1E1B4B); border: 2px solid #FACC15; box-shadow: 0 10px 30px rgba(0,0,0,.6); color: #F8FAFC; animation: oxPop .3s cubic-bezier(.2,1.5,.4,1); }
.ox-rev-title { font: 400 16px Bungee, Impact, sans-serif; color: #FDE68A; }
.ox-rev-card > small { color: #CBD5E1; font-weight: 700; }
.ox-rev-pick { display: flex; justify-content: center; gap: 6px; }
.ox-rev-pick button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 34px; line-height: 1; color: rgba(255,255,255,.25); transition: transform .15s, color .15s; }
.ox-rev-pick button.on { color: #FACC15; text-shadow: 0 0 10px rgba(250,204,21,.7); }
.ox-rev-pick button:active { transform: scale(.85); }
.ox-rev-lbl { text-align: center; color: #FDE68A !important; }
.ox-rev-card textarea { resize: none; font-size: 14px; }
.ox-rev-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: #94A3B8; }
.ox-rev-foot .ol-msg { margin: 0; color: #FCA5A5; text-align: right; }
.ox-rev-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-height: 460px) {
  .ox-rev-card { padding: 10px 14px; gap: 4px; }
  .ox-rev-pick button { width: 38px; height: 38px; font-size: 28px; }
  .ox-rev-card textarea { min-height: 52px; }
}

/* ---------- Emote Duel Langsung ---------- */
.emo-btn { position: fixed; left: 10px; top: 96px; z-index: 61; width: 48px; height: 48px; padding: 0; border-radius: 50%; overflow: hidden; cursor: pointer;
  border: 3px solid #1E1A24; background: radial-gradient(circle at 35% 30%, #FDE68A, #F59E0B); box-shadow: 0 4px 0 rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.35); }
.emo-btn[hidden] { display: none; }
.emo-btn.on { box-shadow: 0 4px 0 rgba(0,0,0,.45), 0 0 0 3px #FACC15, 0 0 14px rgba(250,204,21,.7); }
.emo-btn:active { transform: scale(.92); }
.emo-btn-face { position: absolute; inset: 1px; display: block; }
.emo-btn-face svg { width: 100%; height: 100%; display: block; }
.emo-btn-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(15,23,42,.6); pointer-events: none; }
.emo-panel { position: fixed; left: 10px; top: 150px; z-index: 61; padding: 8px; border-radius: 16px; background: rgba(15,10,40,.94); border: 2px solid #FACC15; box-shadow: 0 8px 24px rgba(0,0,0,.55); animation: oxPop .25s cubic-bezier(.2,1.5,.4,1); }
.emo-panel[hidden] { display: none; }
.emo-grid { display: grid; grid-template-columns: repeat(4, 66px); gap: 6px; }
.emo-opt { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 3px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); cursor: pointer; color: #FEF3C7; }
.emo-opt svg { width: 48px; height: 48px; display: block; }
.emo-opt small { font: 800 10px Nunito, system-ui, sans-serif; white-space: nowrap; }
.emo-opt:active { transform: scale(.9); background: rgba(250,204,21,.25); }
.emo-mute { display: block; width: 100%; margin-top: 6px; border: 0; background: none; color: #A5B4FC; font: 800 11.5px Nunito, system-ui, sans-serif; cursor: pointer; }
@media (orientation: landscape) and (max-height: 500px) {
  .emo-btn { top: 90px; width: 42px; height: 42px; }
  .emo-panel { top: 138px; padding: 6px; }
  .emo-grid { grid-template-columns: repeat(4, 58px); gap: 4px; }
  .emo-opt svg { width: 40px; height: 40px; }
}

/* Gelembung emote di arena */
.emo-pop { position: fixed; z-index: 59; pointer-events: none; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; animation: emoLife 2.7s ease-in forwards; }
.emo-pop-body { width: 92px; height: 92px; padding: 4px; border-radius: 26px; background: #fff; border: 4px solid #1E1A24; box-shadow: 0 6px 0 rgba(0,0,0,.35); position: relative; animation: emoIn .45s cubic-bezier(.2,1.8,.4,1) both; }
.emo-pop.r-mek .emo-pop-body { background: #DBEAFE; }
.emo-pop.r-raja .emo-pop-body { background: #EDE9FE; }
.emo-pop-body::after { content: ""; position: absolute; left: 50%; bottom: -14px; margin-left: -9px; border: 9px solid transparent; border-top: 11px solid #1E1A24; }
.emo-pop-body svg { width: 100%; height: 100%; display: block; overflow: visible; }
.emo-pop-lbl { margin-top: 14px; font: 400 13px Bungee, Impact, sans-serif; color: #fff; padding: 2px 10px; border-radius: 10px; background: #1E1A24; white-space: nowrap; animation: emoIn .45s cubic-bezier(.2,1.8,.4,1) .12s both; }
.emo-pop.theirs .emo-pop-lbl { background: #B91C1C; }
@media (orientation: landscape) and (max-height: 500px) { .emo-pop-body { width: 74px; height: 74px; border-radius: 22px; } .emo-pop-lbl { font-size: 11px; margin-top: 12px; } }
@keyframes emoIn { 0% { transform: scale(0) rotate(-12deg); } 70% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes emoLife { 0%, 85% { opacity: 1; } 100% { opacity: 0; margin-top: -16px; } }

/* Animasi per ekspresi (berlaku di gelembung arena dan tombol pilihan) */
.emo-svg * { transform-box: fill-box; transform-origin: center; }
.emo-pop .emo-laugh, .emo-opt:hover .emo-laugh { animation: emoBounce .32s ease-in-out infinite; }
.emo-laugh .emo-tear { animation: emoTear .32s ease-in-out infinite; }
.emo-pop .emo-angry { animation: emoShake .12s linear infinite; }
.emo-angry .emo-steam { animation: emoSteam .7s ease-out infinite; }
.emo-angry .emo-vein { animation: emoPulse .4s ease-in-out infinite; }
.emo-pop .emo-cry { animation: emoWobble .9s ease-in-out infinite; transform-origin: 50% 90%; }
.emo-cry .emo-tears rect { animation: emoStream .5s linear infinite; transform-origin: 50% 0; }
.emo-pop .emo-wow { animation: emoPop .9s ease-in-out infinite; }
.emo-wow .emo-spark { animation: emoTwinkle .5s ease-in-out infinite alternate; }
.emo-thumb .emo-hand { animation: emoThumb .6s cubic-bezier(.2,1.6,.4,1) infinite alternate; transform-origin: 30% 100%; }
.emo-hi .emo-wave { animation: emoWave .35s ease-in-out infinite alternate; transform-origin: 20% 100%; }
.emo-think .emo-q { animation: emoFloat 1s ease-in-out infinite; }
.emo-pop .emo-think { animation: emoTilt 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
.emo-pop .emo-taunt { animation: emoWiggle .3s ease-in-out infinite; transform-origin: 50% 90%; }
.emo-taunt .emo-tongue { animation: emoTongue .3s ease-in-out infinite alternate; transform-origin: 50% 0; }
.emo-taunt .emo-notes { animation: emoFloat .8s ease-in-out infinite; }
@keyframes emoBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%) scale(1.03, .97); } }
@keyframes emoTear { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px) scale(1.15); } }
@keyframes emoShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2.5%); } 75% { transform: translateX(2.5%); } }
@keyframes emoSteam { 0% { transform: translateY(4px) scale(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px) scale(1.2); opacity: 0; } }
@keyframes emoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes emoWobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes emoStream { 0% { transform: scaleY(.3); opacity: .6; } 100% { transform: scaleY(1); opacity: 1; } }
@keyframes emoPop { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(.96); } }
@keyframes emoTwinkle { from { transform: scale(.7) rotate(0); opacity: .6; } to { transform: scale(1.2) rotate(25deg); opacity: 1; } }
@keyframes emoThumb { from { transform: rotate(-25deg) translateY(4px); } to { transform: rotate(8deg) translateY(-2px); } }
@keyframes emoWave { from { transform: rotate(-18deg); } to { transform: rotate(16deg); } }
@keyframes emoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes emoTilt { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(3deg); } }
@keyframes emoWiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes emoTongue { from { transform: scaleY(.8); } to { transform: scaleY(1.25); } }
/* Lencana jumlah ulasan di kartu benteng */
.ox-fort-map { position: relative; }
.ox-rev-badge { position: absolute; left: 6px; top: 6px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px;
  font: 800 12px Nunito, system-ui, sans-serif; font-style: normal; color: #fff; background: rgba(30,26,36,.88); border: 2px solid #FACC15; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.ox-rev-badge b { font-size: 13px; }
.ox-rev-badge span { color: #FDE047; font-size: 11.5px; }
.ox-rev-badge.none { border-color: rgba(255,255,255,.3); color: #CBD5E1; opacity: .85; }
/* Duel: bilah persiapan Mekanik di pojok kanan atas, di atas menara (di luar area bangun) supaya tidak menutupi grid */
body.duel-prep .duel-bar { top: 38px; left: auto; right: 8px; transform: none; flex-direction: column; align-items: stretch; gap: 4px; width: 112px;
  padding: 6px; border-radius: 14px; white-space: normal; text-align: center; }
body.duel-prep .duel-bar > b { font-size: 18px; }
body.duel-prep .duel-bar > span { font-size: 10.5px; line-height: 1.25; }
body.duel-prep .duel-bar .btn { padding: 5px 6px; font-size: 13px; }
@media (orientation: landscape) and (max-height: 500px) {
  body.duel-prep .duel-bar { top: 34px; right: 6px; width: 100px; padding: 5px; gap: 3px; }
  body.duel-prep .duel-bar > b { font-size: 15px; }
  body.duel-prep .duel-bar > span { font-size: 9.5px; }
}
/* Duel: lobby SIAP muat satu layar HP landscape */
.dl-mid, .dl-foot { display: flex; flex-direction: column; gap: 6px; }
@media (orientation: landscape) and (max-height: 520px) {
  .ox-wrap:has(#dlReady) { gap: 7px; }
  .ox-wrap:has(#dlReady) .ox-ticket { flex-direction: row; justify-content: center; gap: 14px; padding: 5px 12px; }
  .ox-wrap:has(#dlReady) .ox-ticket > b { font-size: 26px; letter-spacing: 6px; }
  .ox-wrap:has(#dlReady) .ox-ticket small { font-size: 9.5px; letter-spacing: 2px; }
  .ox-wrap:has(#dlReady) .ox-ticket-btns .ox-btn { padding: 5px 12px; }
  .mm-lobby-tag { flex-direction: row; justify-content: center; gap: 10px; padding: 5px 10px; }
  .ox-wrap:has(#dlReady) .ox-vs { gap: 8px; }
  .ox-wrap:has(#dlReady) .ox-player { min-height: 0; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 0; align-items: center; justify-items: start; text-align: left; padding: 8px 12px; }
  .ox-wrap:has(#dlReady) .ox-player-av { grid-row: 1 / span 2; }
  .ox-wrap:has(#dlReady) .ox-player-av .ox-av, .ox-wrap:has(#dlReady) .ox-player-av svg { width: 46px; height: 46px; }
  .ox-wrap:has(#dlReady) .ox-player b { font-size: 15px; align-self: end; }
  .ox-wrap:has(#dlReady) .ox-player small { align-self: start; }
  .ox-wrap:has(#dlReady) .ox-player > i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-height: 0; }
  .ox-wrap:has(#dlReady) .ox-vs-mid { width: 46px; height: 46px; }
  .ox-wrap:has(#dlReady) .ox-vs-mid b { font-size: 22px; }
  .dl-mid { flex-direction: row; align-items: center; gap: 10px; }
  .dl-mid .dl-net { flex: 1; min-width: 0; padding: 6px 8px; }
  .dl-mid .dl-emo { margin: 0; gap: 5px; }
  .sheet.ol-sheet .dl-mid .dl-emo button { width: 38px; height: 38px; font-size: 19px; border-radius: 11px; }
  .dl-foot { flex-direction: row; align-items: center; gap: 12px; }
  .dl-foot .ol-msg { flex: 1; margin: 0; text-align: left; font-size: 12px; }
  .dl-foot .ox-actions { margin: 0; padding: 0; }
  .dl-foot .ox-actions .ox-btn.big { padding: 8px 28px; font-size: 17px; }
}
/* Duel: bilah jeda rakit Mekanik (1 detik) di atas baki */
body.duel-mek #dock::before { content: ""; position: absolute; left: 10px; right: 10px; top: -6px; height: 4px; border-radius: 2px; background: #FACC15; box-shadow: 0 0 8px rgba(250,204,21,.7); transform-origin: left center; transform: scaleX(0); pointer-events: none; z-index: 5; }
body.duel-mek.duel-cd #dock::before { animation: duelRakitCd 1s linear forwards; }
@keyframes duelRakitCd { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* Duel: Benteng Siap Pakai */
.duel-tpl-btn { margin-top: 2px; font-size: 11.5px !important; padding: 4px 6px !important; }
body:not(.duel-prep) .duel-tpl-btn { display: none; }
.duel-tpl { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 10px; background: rgba(2,6,23,.55); }
.duel-tpl-card { width: min(720px, 100%); max-height: calc(100vh - 20px); overflow-y: auto; padding: 12px 14px; border-radius: 18px; color: #F8FAFC;
  background: linear-gradient(165deg, #1E3A8A, #172554); border: 2px solid #FACC15; box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: oxPop .3s cubic-bezier(.2,1.5,.4,1); }
.duel-tpl-h { display: flex; flex-direction: column; gap: 2px; text-align: center; margin-bottom: 8px; }
.duel-tpl-h b { font: 400 18px Bungee, Impact, sans-serif; color: #FDE68A; }
.duel-tpl-h small { font: 700 12px Nunito, system-ui, sans-serif; color: #CBD5E1; }
.duel-tpl-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.duel-tpl-opt { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 8px 8px 7px; border-radius: 14px; cursor: pointer; color: #F8FAFC;
  border: 2px solid rgba(255,255,255,.18); background: rgba(8,12,28,.6); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.duel-tpl-opt:hover { border-color: #FACC15; transform: translateY(-2px); }
.duel-tpl-opt:active { transform: scale(.96); }
.duel-tpl-ico { font-size: 26px; line-height: 1; }
.duel-tpl-opt b { font: 400 14px Bungee, Impact, sans-serif; color: #FEF3C7; }
.duel-tpl-opt small { font: 600 11.5px/1.3 Nunito, system-ui, sans-serif; color: #CBD5E1; }
.duel-tpl-items { display: flex; gap: 3px; justify-content: center; }
.duel-tpl-items svg { width: 22px; height: 22px; }
.duel-tpl-opt em { font: 800 11px Nunito, system-ui, sans-serif; font-style: normal; color: #86EFAC; }
.duel-tpl-own { display: block; margin: 9px auto 0; border: 0; border-radius: 10px; padding: 6px 14px; cursor: pointer; font: 800 13px Nunito, system-ui, sans-serif; color: #E0E7FF; background: rgba(255,255,255,.1); }
@media (orientation: landscape) and (max-height: 500px) {
  .duel-tpl-card { padding: 8px 10px; }
  .duel-tpl-h { margin-bottom: 5px; }
  .duel-tpl-h b { font-size: 15px; }
  .duel-tpl-h small { font-size: 11px; }
  .duel-tpl-opt { padding: 6px 6px 5px; gap: 2px; }
  .duel-tpl-ico { font-size: 22px; }
  .duel-tpl-opt small { font-size: 10.5px; }
  .duel-tpl-own { margin-top: 6px; padding: 5px 12px; }
}
@media (max-width: 560px) { .duel-tpl-list { grid-template-columns: 1fr; } }
body.duel-prep .duel-bar > span { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* Mode sentuh: perintah pasukan (Serbu/Tahan/Ikuti) bertumpuk di tepi kiri, tepat di atas joystick, dalam jangkauan
   jempol kiri (cukup naik dari joystick, tidak perlu menjangkau ke kiri atas). Kolom markas (0-1) tidak bisa dipasangi
   jebakan, jadi tumpukan ini tidak menutupi jebakan; dipasang di atas kepala Raja saat di markas. */
.rj-ord-lbl { display: none; }
.raja-ui.rj-touch .rj-top .rj-orders { position: fixed; left: 6px; bottom: 36vh; z-index: 6; flex-direction: column; gap: 6px; margin: 0; padding: 4px; border-radius: 14px; background: rgba(8,12,28,.35); }
.raja-ui.rj-touch .rj-ord { width: 52px; height: 44px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 18px; background: rgba(14,20,34,.82); border-width: 2px; }
.raja-ui.rj-touch .rj-ord kbd { display: none; }
.raja-ui.rj-touch .rj-ord-lbl { display: block; font: 800 9.5px Nunito, system-ui, sans-serif; font-style: normal; line-height: 1; white-space: nowrap; color: #E2E8F0; }
.raja-ui.rj-touch .rj-ord.on .rj-ord-lbl { color: #FDE68A; }
@media (orientation: landscape) and (max-height: 500px) {
  .raja-ui.rj-touch .rj-top .rj-orders { left: 5px; gap: 5px; padding: 3px; }
  .raja-ui.rj-touch .rj-ord { width: 50px; height: 40px; font-size: 16px; }
}
/* Tombol emote duel pindah ke samping tombol Menyerah supaya tidak bertabrakan dengan tumpukan perintah */
.emo-btn { left: 112px; top: 58px; }
.emo-panel { left: 112px; top: 112px; }
@media (orientation: landscape) and (max-height: 500px) { .emo-btn { left: 104px; top: 56px; } .emo-panel { top: 102px; left: 104px; } }

/* ---------- Pemilih hero Raja (di atas pemilih skill) ---------- */
.rj-hero-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 9px; }
.rj-hero-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #CBD5E1; }
.rj-hero-head b { font: 400 13px Bungee, Impact, sans-serif; color: #FDE68A; letter-spacing: .3px; }
.rj-hero-head i { color: #A5B4FC; }
.rj-hero-head em { font-style: normal; color: #FDE68A; font-weight: 800; }
.rj-hero-row { display: flex; gap: 7px; overflow-x: auto; padding: 6px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.rj-hero { --hc: #7C3AED; position: relative; flex: 0 0 auto; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 0 4px;
  border: 2px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(2,6,23,.5); color: #E2E8F0; cursor: pointer; scroll-snap-align: center;
  transition: transform .15s cubic-bezier(.3,1.6,.5,1), border-color .15s, box-shadow .15s; }
.rj-hero:hover { transform: translateY(-2px); border-color: rgba(253,230,138,.6); }
.rj-hero-por { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px 12px 8px 8px; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, rgba(255,255,255,.3), transparent 60%), linear-gradient(180deg, var(--hc), #0F172A); }
.rj-hero-por img { width: 100%; height: 100%; display: block; image-rendering: auto; }
.rj-hero small { font: 800 10.5px Nunito, system-ui, sans-serif; line-height: 1.1; text-align: center; white-space: nowrap; }
.rj-hero-sk { position: absolute; top: 40px; right: -4px; width: 24px; height: 24px; border-radius: 50%; padding: 2px; box-sizing: border-box;
  background: radial-gradient(circle at 35% 30%, #374151, #111827); border: 2px solid #FACC15; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.rj-hero-sk svg { width: 100%; height: 100%; display: block; }
.rj-hero.on { border-color: #FACC15; background: linear-gradient(180deg, rgba(250,204,21,.18), rgba(2,6,23,.6)); box-shadow: 0 0 0 2px rgba(250,204,21,.35), 0 0 18px var(--hc); }
.rj-hero.on small { color: #FDE68A; }
.rj-hero.pop { animation: loLand .45s cubic-bezier(.2,1.8,.4,1); }
.lo-tile.hero { border-color: rgba(250,204,21,.55); background: linear-gradient(180deg, rgba(250,204,21,.16), rgba(2,6,23,.5)); }
.lo-hero-tag { font: 800 8.5px Nunito, system-ui, sans-serif; font-style: normal; letter-spacing: .4px; color: #3A2A00; background: #FACC15; border-radius: 6px; padding: 0 4px; line-height: 13px; }
.lo-tile .lo-hero-tag { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.lo-info .lo-hero-tag { vertical-align: 2px; }

@media (max-height: 520px) {
  .rj-hero { width: 50px; border-radius: 11px; padding-bottom: 2px; }
  .rj-hero small { font-size: 8.5px; }
  .rj-hero-por { border-radius: 9px 9px 6px 6px; }
  .rj-hero-sk { top: 30px; right: -3px; width: 18px; height: 18px; padding: 1px; }
  .rj-hero-box { margin-bottom: 4px; gap: 3px; }
  .rj-hero-head { font-size: 11px; }
  .rj-hero-row { padding: 2px 2px 4px; gap: 5px; }
}
@media (max-height: 390px) {
  .rj-hero { width: 44px; border-radius: 9px; padding-bottom: 1px; }
  .rj-hero small { font-size: 7.5px; }
  .rj-hero-sk { top: 26px; width: 16px; height: 16px; }
  .rj-hero-head { font-size: 10px; }
  .rj-hero-head b { font-size: 11px; }
}

/* ================= Cerita: dialog & kartu hadiah ================= */
.sty { position: fixed; inset: 0; z-index: 200000; overflow: hidden; animation: styIn .28s ease-out; font-family: Nunito, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.sty.out { animation: styOut .26s ease-in forwards; }
@keyframes styIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes styOut { to { opacity: 0; } }
.sty-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.sty-star { animation: styTw 2.4s ease-in-out infinite alternate; }
@keyframes styTw { from { opacity: .25; } to { opacity: 1; } }
.sty-crown-g { animation: styFloat 4s ease-in-out infinite alternate; transform-origin: 480px 150px; }
.sty-rays { animation: stySpin 30s linear infinite; transform-origin: 480px 150px; }
.sty-win { animation: styTw 1.6s ease-in-out infinite alternate; }
@keyframes styFloat { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
@keyframes stySpin { to { transform: rotate(360deg); } }
.sty-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(30,20,60,.55), rgba(6,4,16,.82)); backdrop-filter: blur(2px); }
.sty-skip { position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top)); right: 14px; font: 800 13px Nunito, sans-serif; color: #E2E8F0; background: rgba(15,12,30,.7); border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.sty-por { position: absolute; z-index: 1; bottom: calc(3vh + clamp(96px, 23vh, 150px)); width: clamp(110px, 32vh, 230px); aspect-ratio: 1; opacity: 0; transform: translateY(24px) scale(.94); transition: opacity .25s, transform .3s cubic-bezier(.3,1.5,.5,1); filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); pointer-events: none; }
.sty-por.l { left: max(4vw, 18px); } .sty-por.r { right: max(4vw, 18px); }
.sty-por.on { opacity: 1; transform: none; }
.sty-por img, .sty-por svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.sty-por.r svg { transform: scaleX(-1); }
.sty-por.pop.on { animation: styPop .38s cubic-bezier(.3,1.7,.5,1); }
.sty-por.shake.on { animation: styShake .4s ease-in-out 2; }
@keyframes styPop { from { transform: translateY(18px) scale(.8); } to { transform: none; } }
@keyframes styShake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px) rotate(-2deg); } 75% { transform: translateX(6px) rotate(2deg); } }
.sty-box { position: absolute; z-index: 2; left: 50%; bottom: max(3vh, 12px); transform: translateX(-50%); width: min(880px, 92vw); min-height: clamp(84px, 21vh, 140px); box-sizing: border-box;
  padding: clamp(14px, 3vh, 22px) clamp(16px, 3vw, 26px) clamp(14px, 3vh, 20px); border-radius: 18px; color: #F8FAFC;
  background: linear-gradient(180deg, rgba(36,28,66,.97), rgba(18,14,36,.97)); border: 3px solid #FACC15; box-shadow: 0 0 0 3px #1E1A24, 0 14px 30px rgba(0,0,0,.55); }
.sty-box.mek { border-color: #38BDF8; } .sty-box.warga { border-color: #4ADE80; } .sty-box.nar { border-color: rgba(253,230,138,.55); text-align: center; }
.sty-name { position: absolute; top: -16px; left: 22px; font: 400 clamp(12px, 2.4vh, 16px) Bungee, Impact, sans-serif; letter-spacing: .3px; color: #2A1A00; background: #FACC15; padding: 3px 14px; border-radius: 10px; border: 2.5px solid #1E1A24; }
.sty-box.sr .sty-name { left: auto; right: 22px; }
.sty-box.mek .sty-name { background: #38BDF8; color: #082F49; } .sty-box.warga .sty-name { background: #4ADE80; color: #052E16; }
.sty-text { margin: 0; font: 700 clamp(14px, 3vh, 20px)/1.45 Nunito, system-ui, sans-serif; min-height: 2.9em; }
.sty-box.nar .sty-text { font-style: italic; color: #FDE68A; }
.sty-next { position: absolute; right: 16px; bottom: 8px; font-style: normal; color: #FDE68A; opacity: 0; }
.sty-box.ready .sty-next { opacity: 1; animation: styBob .7s ease-in-out infinite alternate; }
@keyframes styBob { to { transform: translateY(4px); } }
.sty-card { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(430px, 88vw); max-height: 92vh; overflow-x: hidden; overflow-y: auto; box-sizing: border-box; text-align: center; color: #F8FAFC; cursor: default;
  padding: clamp(30px, 6vh, 40px) 22px clamp(14px, 3vh, 20px); border-radius: 22px; background: radial-gradient(circle at 50% 18%, #3B2A6E, #1A1336 70%); border: 3px solid #FACC15; box-shadow: 0 0 0 3px #1E1A24, 0 0 50px rgba(250,204,21,.25), 0 18px 40px rgba(0,0,0,.6);
  animation: styCard .45s cubic-bezier(.3,1.6,.5,1); }
.sty-card.ult { border-color: #F472B6; box-shadow: 0 0 0 3px #1E1A24, 0 0 50px rgba(244,114,182,.35), 0 18px 40px rgba(0,0,0,.6); }
.sty-card.wide { width: min(560px, 92vw); }
@keyframes styCard { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.sty-card-head { font: 800 12px Nunito, sans-serif; color: #A5B4FC; letter-spacing: .6px; text-transform: uppercase; margin: -14px 0 8px; }
.sty-rib { display: inline-block; font: 400 clamp(14px, 3vh, 18px) Bungee, Impact, sans-serif; color: #fff; background: #DC2626; padding: 6px 26px; border: 2.5px solid #1E1A24;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%, 10px 50%); margin-bottom: 8px; }
.sty-card.ult .sty-rib { background: #DB2777; }
.sty-ico { position: relative; width: clamp(84px, 20vh, 124px); height: clamp(84px, 20vh, 124px); margin: 6px auto 8px; display: grid; place-items: center; }
.sty-ico > svg, .sty-ico > img { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); animation: styIco .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes styIco { from { transform: scale(.3) rotate(-20deg); } to { transform: none; } }
.sty-burst { position: absolute; inset: -46px; border-radius: 50%; background: repeating-conic-gradient(rgba(253,230,138,.28) 0 10deg, transparent 10deg 30deg); animation: stySpin 9s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
.sty-card.wide .sty-ico { width: auto; height: auto; }
.sty-heroes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sty-heroes img { width: clamp(44px, 10vh, 64px); aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,.08); border: 2px solid rgba(250,204,21,.6); }
.sty-emo { position: relative; z-index: 1; font-size: clamp(30px, 8vh, 46px); }
.sty-card-name { display: block; font: 400 clamp(18px, 4.4vh, 26px) Bungee, Impact, sans-serif; color: #FDE68A; margin: 4px 0 6px; }
.sty-card-desc { margin: 0 0 6px; font: 700 clamp(13px, 2.8vh, 16px)/1.4 Nunito, sans-serif; color: #E2E8F0; }
.sty-card-hint { display: block; font: 700 clamp(11px, 2.4vh, 13px)/1.35 Nunito, sans-serif; color: #A5B4FC; font-style: normal; margin-bottom: 10px; }
.sty-ok { font: 400 clamp(14px, 3vh, 17px) Bungee, Impact, sans-serif; color: #2A1A00; background: linear-gradient(180deg, #FDE68A, #F59E0B); border: 2.5px solid #1E1A24; border-radius: 14px; padding: 9px 26px; cursor: pointer; box-shadow: 0 4px 0 #92400E; }
.sty-ok:active { transform: translateY(3px); box-shadow: 0 1px 0 #92400E; }
.sty-count { display: block; margin-top: 8px; color: #94A3B8; font: 700 12px Nunito, sans-serif; }
/* Kampanye Raja: tombol yang belum terbuka disembunyikan */
.rj-no-ult .rj-ult, .rj-no-orders .rj-orders, .rj-no-troops .rj-cards, .rj-no-troops .rj-crown, .rj-no-troops .rj-log, .rj-no-troops .rj-log-btn:not(.rj-restart) { display: none !important; }
.lo-slot.lockd { opacity: .4; cursor: default; filter: grayscale(.6); }
.sty-prolog-card { margin-bottom: 8px; border-color: rgba(253,230,138,.6) !important; }
.sty-tools { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sty-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; width: clamp(56px, 12vh, 72px); padding: 6px 2px; border-radius: 12px; background: rgba(255,255,255,.07); border: 2px solid rgba(74,222,128,.55); }
.sty-tool svg { width: clamp(34px, 8vh, 46px); height: clamp(34px, 8vh, 46px); }
.sty-tool small { font: 800 10px/1.1 Nunito, sans-serif; color: #E2E8F0; text-align: center; }

/* Dialog konfirmasi di dalam game (pengganti confirm() browser) */
.ask { position: fixed; inset: 0; z-index: 210000; display: grid; place-items: center; animation: styIn .18s ease-out; font-family: Nunito, system-ui, sans-serif; }
.ask.out { animation: styOut .16s ease-in forwards; }
.ask-dim { position: absolute; inset: 0; background: rgba(6,4,16,.66); backdrop-filter: blur(2px); }
.ask-card { position: relative; width: min(420px, 88vw); box-sizing: border-box; padding: 22px 20px 16px; border-radius: 20px; text-align: center; color: #F8FAFC;
  background: radial-gradient(circle at 50% 0%, #3B2A6E, #1A1336 75%); border: 3px solid #FACC15; box-shadow: 0 0 0 3px #1E1A24, 0 18px 40px rgba(0,0,0,.6); animation: styCard .3s cubic-bezier(.3,1.6,.5,1); }
.ask-card.danger { border-color: #F87171; }
.ask-msg { margin: 0 0 16px; font: 700 clamp(14px, 3.2vh, 17px)/1.45 Nunito, sans-serif; }
.ask-btns { display: flex; gap: 10px; justify-content: center; }
.ask-btns button { flex: 1; max-width: 170px; font: 400 clamp(13px, 3vh, 16px) Bungee, Impact, sans-serif; border: 2.5px solid #1E1A24; border-radius: 14px; padding: 9px 12px; cursor: pointer; }
.ask-no { color: #E2E8F0; background: #3F3A56; box-shadow: 0 4px 0 #1E1A24; }
.ask-yes { color: #2A1A00; background: linear-gradient(180deg, #FDE68A, #F59E0B); box-shadow: 0 4px 0 #92400E; }
.ask-card.danger .ask-yes { color: #fff; background: linear-gradient(180deg, #F87171, #DC2626); box-shadow: 0 4px 0 #7F1D1D; }
.ask-btns button:active { transform: translateY(3px); box-shadow: 0 1px 0 #1E1A24; }

/* Jurus/hero/ultimate terkunci: siluet + gembok (buka lewat journey) */
.lo-tile.locked { cursor: help; background: rgba(15,12,30,.55) !important; border-style: dashed !important; }
.lo-tile.locked .lo-ico { filter: brightness(0) opacity(.55); }
.lo-tile.locked small { color: #94A3B8 !important; letter-spacing: 2px; }
.lo-tile.locked.focus { outline: 2px solid #FACC15; outline-offset: 1px; }
.lo-lock { position: absolute; right: 2px; top: 1px; font-style: normal; font-size: 11px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.lo-tile { position: relative; }
.lo-lock-t { display: block; margin-top: 2px; color: #FCA5A5; font-weight: 800; }
.lo-lock-src { display: block; color: #E2E8F0; }
.lo-lock-src em { color: #FDE68A; font-style: normal; font-weight: 800; }
.rj-hero { position: relative; }
.rj-hero.locked { cursor: help; }
.rj-hero.locked .rj-hero-por img { filter: brightness(0) opacity(.5); }
.rj-hero.locked small { color: #94A3B8; letter-spacing: 2px; }
.rj-hero.locked.peek { outline: 2px solid #FACC15; outline-offset: 1px; }
.rj-hero .lo-lock { top: 3px; right: 4px; }
.rj-hero-lock em { color: #FDE68A; font-style: normal; font-weight: 800; }
.u2-prev.locked video { filter: grayscale(.85) brightness(.6); }
/* Journey: strip hadiah tiap dunia & lencana hadiah di kartu tahap */
.jr-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -2px 2px 8px; }
.jr-strip > b { font: 800 11px Nunito, sans-serif; color: #FDE68A; letter-spacing: .5px; text-transform: uppercase; margin-right: 2px; }
.jr-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 999px; background: rgba(15,12,30,.55); border: 1.5px dashed rgba(253,230,138,.45); }
.jr-chip.have { border-style: solid; border-color: #4ADE80; background: rgba(22,101,52,.35); }
.jr-chip small { font: 800 10.5px Nunito, sans-serif; color: #E2E8F0; }
.jr-chip.mek small { font-size: 11px; }
.jr-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; font-style: normal; }
.jr-ico > svg, .jr-ico > img { width: 100%; height: 100%; display: block; }
.jr-chip.hero .jr-ico { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.12); }
.jr-chip:not(.have) .jr-ico { filter: brightness(0) opacity(.55); }
.jr-chip.hero:not(.have) { border-color: #FACC15; box-shadow: 0 0 10px rgba(250,204,21,.35); }
.lo-stage { position: relative; }
.jr-badge { position: absolute; right: -5px; top: -7px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #1E1A24; border: 1.5px solid #FACC15; font-style: normal; z-index: 1; }
.jr-badge > svg, .jr-badge > img { width: 17px; height: 17px; display: block; }
.jr-badge.hero > img { width: 20px; height: 20px; border-radius: 50%; }
.jr-badge:not(.have) > svg, .jr-badge:not(.have) > img { filter: brightness(0) invert(.85) opacity(.8); }
.jr-badge.have { border-color: #4ADE80; }
.jr-mekrw { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(15,12,30,.55); border: 1.5px dashed rgba(253,230,138,.5); }
.jr-mekrw.have { border-style: solid; border-color: #4ADE80; }
.jr-mekrw small { font: 800 11px Nunito, sans-serif; color: #FDE68A !important; text-shadow: none; }
.jr-mekrw:not(.have) .jr-ico { filter: brightness(0) opacity(.55); }
.st-sec.st-locked .lo-stages { opacity: .75; }
.sty-card.hero .sty-ico > img { border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); }
/* Kolom pemilih tidak boleh melebar karena baris hero/ultimate yang panjang (baris itu menggulir sendiri) */
@media (min-width: 640px) { .lo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.lo-grid > * { min-width: 0; }
.lo-lock-src, .lo-lock-t { white-space: normal; }
/* Warna kartu tahap per dunia journey */
.st-sec.th-gurun .lo-stage:not(.locked) { background: linear-gradient(180deg, #FBBF5A, #C2741E); }
.st-sec.th-salju .lo-stage:not(.locked) { background: linear-gradient(180deg, #7DD3FC, #2B7BB9); }
.st-sec.th-laut .lo-stage:not(.locked) { background: linear-gradient(180deg, #38BDF8, #0E5E9C); }
.st-sec.th-rimba .lo-stage:not(.locked) { background: linear-gradient(180deg, #34D399, #166534); }
.st-sec.th-madu .lo-stage:not(.locked) { background: linear-gradient(180deg, #FCD34D, #D97706); }
.st-sec.th-tambang .lo-stage:not(.locked) { background: linear-gradient(180deg, #A78BFA, #4C1D95); }
.st-sec.th-api .lo-stage:not(.locked) { background: linear-gradient(180deg, #F87171, #991B1B); }
.st-sec.th-pesta .lo-stage:not(.locked) { background: linear-gradient(180deg, #F472B6, #7E22CE); }
.st-sec[class*=' th-'] .lo-stage:not(.locked) .lo-stage-n { background: #FEF3C7; }
.st-classic-body .jr-mekrw { align-self: flex-start; margin-top: 3px; }
.sty-por.r img.flip { transform: scaleX(-1); }
/* Naga Celestial: tombol skill redup saat muatan semburan habis */
.rj-sk.rj-empty > span { filter: grayscale(.85) brightness(.65); }

/* ===== Halaman login (js/login-gate.js): login Google wajib ===== */
.menu.mn.lg { z-index: 100000; transition: opacity .35s ease; }
.menu.mn.lg.lg-out { opacity: 0; pointer-events: none; }
.lg-card { width: 100%; max-width: 460px; padding: clamp(12px, 3vh, 22px) clamp(14px, 2.4vw, 22px); border-radius: 18px;
  background: rgba(8, 14, 36, .8); border: 2px solid rgba(255,255,255,.2); box-shadow: 0 14px 34px rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lg-pane { display: flex; flex-direction: column; align-items: stretch; gap: clamp(6px, 1.5vh, 11px); text-align: center; }
.lg-pane[hidden] { display: none; }
.lg-pane h2 { margin: 0; font: 400 clamp(17px, 4.6vh, 25px)/1.1 Bungee, Impact, sans-serif; color: #FDE68A; text-shadow: 0 3px 0 rgba(30,26,36,.9); }
.lg-sub { margin: 0; font: 700 clamp(11px, 2.7vh, 14px)/1.35 Nunito, system-ui, sans-serif; color: #CBD5E1; }
.lg-google { display: flex; align-items: center; justify-content: center; gap: 12px; height: clamp(42px, 11vh, 54px); padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: #fff; color: #1F2937; border: 0; font: 800 clamp(14px, 3.6vh, 18px) Nunito, system-ui, sans-serif; box-shadow: 0 4px 0 #94A3B8, 0 8px 18px rgba(0,0,0,.35); transition: transform .12s; }
.lg-google:hover { transform: translateY(-2px); }
.lg-google:active { transform: translateY(3px); box-shadow: 0 1px 0 #94A3B8; }
.lg-google svg { width: clamp(20px, 4.8vh, 26px); height: clamp(20px, 4.8vh, 26px); flex: 0 0 auto; }
.lg-google:disabled, .lg-go:disabled { opacity: .6; cursor: default; }
.lg-err { margin: 0; min-height: 1.2em; font: 800 clamp(11px, 2.6vh, 13px)/1.3 Nunito, system-ui, sans-serif; color: #FCA5A5; }
.lg-err:empty { min-height: 0; }
.lg-legal { margin: 0; font: 600 clamp(10px, 2.3vh, 12px)/1.4 Nunito, system-ui, sans-serif; color: #94A3B8; }
.lg-legal a { color: #7DD3FC; }
.lg-link { background: none; border: 0; padding: 4px; cursor: pointer; font: 800 clamp(11px, 2.7vh, 14px) Nunito, system-ui, sans-serif; color: #7DD3FC; text-decoration: underline; }
.lg-in { height: clamp(40px, 10vh, 50px); border-radius: 12px; border: 2px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; padding: 0 14px; text-align: center;
  font: 800 clamp(15px, 3.8vh, 19px) Nunito, system-ui, sans-serif; outline: none; }
.lg-in:focus { border-color: #FACC15; background: rgba(255,255,255,.12); }
.lg-in.bad { border-color: #F87171; animation: lgShake .3s; }
@keyframes lgShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.lg-go { height: clamp(40px, 10.5vh, 52px); border-radius: 12px; border: 0; cursor: pointer; background: linear-gradient(180deg, #FDE68A, #FACC15 45%, #F59E0B); color: #3A2A00;
  font: 400 clamp(15px, 4vh, 21px) Bungee, Impact, sans-serif; box-shadow: 0 4px 0 #92400E; }
.lg-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #92400E; }
.lg-spin { width: clamp(28px, 7vh, 40px); height: clamp(28px, 7vh, 40px); margin: 0 auto; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: #FACC15; animation: lgSpin .9s linear infinite; }
@keyframes lgSpin { to { transform: rotate(360deg); } }
@media (orientation: landscape) and (max-height: 430px) { .lg-sub { display: none; } .lg-pane[data-st="nick"] .lg-sub, .lg-pane[data-st="wait"] .lg-sub { display: block; } }
@media (orientation: landscape) and (max-height: 500px) { .lg-card { max-width: 400px; } }
