/* ============================================================
   IMUNVERSE — styles/main.css
   DESIGN SYSTEM v2 — mengikuti reference UI user:
   • Palet cream / teal / coral / sage, ink hijau tua
   • Bentuk rounded bubbly (pill, lingkaran, kartu super-rounded)
   • Nav dock 4 tombol berlabel (Play · Heroes · Squad · Shop)
   • HUD pill cream di atas arena teal
   Semua screen UI adalah overlay HTML/CSS di atas canvas.
   ============================================================ */

:root {
  /* --- Palet inti (dari reference) --- */
  --cream: #fdf6e3;
  --cream-2: #f7edd9;
  --card: #fffdf4;
  --ink: #123f3a;
  --ink-soft: #41706a;
  --teal: #2f9c8f;
  --teal-deep: #1f7a70;
  --teal-dark: #14584f;
  --teal-light: #bfe3d8;
  --mint: #ddeec9;
  --mint-2: #eaf4dd;
  --sage: #a9d795;
  --green: #7cb86a;
  --coral: #f2825c;
  --coral-deep: #e96a4c;
  --coral-light: #f8b29a;
  --gold: #f5c64f;
  --gold-deep: #e0a72e;
  --heart: #f0685a;

  /* --- Token bentuk & bayangan --- */
  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;
  --pill: 999px;
  --shadow-card: 0 10px 24px rgba(31, 74, 66, 0.10), 0 2px 6px rgba(31, 74, 66, 0.08);
  --shadow-pop: 0 18px 44px rgba(20, 60, 54, 0.28);
  --shadow-dock: 0 12px 30px rgba(20, 60, 54, 0.22);

  --font: "Nunito", "Quicksand", "Varela Round", ui-rounded, "SF Pro Rounded",
    "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

#app { position: fixed; inset: 0; }

#game {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  background: #23857a; /* digambar ulang background.js (arena teal) */
}

/* Flash coral saat player kena hit */
#damage-vignette {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 110px 34px rgba(233, 106, 76, 0.5);
  opacity: 0; transition: opacity 0.5s ease;
  z-index: 5;
}
#damage-vignette.flash { opacity: 1; transition: opacity 0.05s ease; }

#ui { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

/* ---------------- Toast ---------------- */
#toasts {
  position: absolute; bottom: calc(160px + env(safe-area-inset-bottom)); left: 50%;
  transform: translateX(-50%);
  z-index: 60; display: flex; flex-direction: column-reverse; gap: 8px; align-items: center;
  pointer-events: none; width: min(86vw, 400px);
}
/* Di luar pertempuran: toast kecil di ATAS layar (bukan menutup konten tengah) */
body:not(.in-run) #toasts {
  top: auto; bottom: 122px; flex-direction: column; /* di atas dock — tidak menutupi topbar */
  width: min(72vw, 320px);
}
body:not(.in-run) .toast { font-size: 11px; padding: 6px 12px; opacity: .95; }
.toast {
  background: var(--card); color: var(--ink);
  border: 2px solid var(--teal-light); border-left: 6px solid var(--teal);
  border-radius: var(--r-md); padding: 10px 16px; font-size: 14px; font-weight: 800;
  box-shadow: var(--shadow-card); animation: toast-in 0.25s ease, toast-out 0.4s ease 2.6s forwards;
  max-width: 100%;
}
.toast.gold { border-left-color: var(--gold); }
.toast.danger { border-left-color: var(--coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* ---------------- Screen dasar ---------------- */
.screen {
  position: fixed; inset: 0; height: 100dvh; /* Fase 16: dinamis mengikuti URL-bar HP */
  bottom: auto; /* tinggi dari 100dvh, bukan bottom — aman address bar */
  display: none;
  flex-direction: column;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom));
  overflow-y: auto;
  pointer-events: auto;
  background: var(--cream);
}
@supports not (height: 100dvh) {
  .screen { height: 100vh; }
}
.screen.active { display: flex; animation: screen-in 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px); } }

.screen.modal {
  justify-content: center; align-items: center;
  background: rgba(18, 63, 58, 0.5);
  backdrop-filter: blur(5px);
  padding: 10px; /* modal tidak menempel tepi di layar pendek */
}

/* HUD tembus pandang ke canvas */
.screen.passive {
  background: none; backdrop-filter: none; pointer-events: none; overflow: hidden;
  padding: calc(10px + env(safe-area-inset-top)) 12px 12px;
}

h1, h2, h3 { letter-spacing: 0.2px; }

/* ---------------- Buttons ---------------- */
.btn {
  appearance: none; border: none; border-radius: var(--pill);
  background: var(--card); color: var(--ink);
  font-family: var(--font); font-weight: 900; font-size: 16px;
  padding: 13px 24px; cursor: pointer; pointer-events: auto;
  box-shadow: var(--shadow-card);
  transition: transform var(--press, 0.08s) ease, filter 0.15s ease, opacity 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--teal), var(--teal-deep));
  color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 20px rgba(31, 122, 112, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.btn-danger {
  background: linear-gradient(180deg, var(--coral), var(--coral-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(233, 106, 76, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.btn-gold {
  background: linear-gradient(180deg, #f9d97a, var(--gold-deep));
  color: #5c430e;
  box-shadow: 0 8px 20px rgba(224, 167, 46, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4);
}
.btn-xl { font-size: 19px; padding: 17px 40px; width: min(100%, 430px); min-height: 58px; }
.btn-back {
  width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%;
  background: var(--card); color: var(--teal-dark); font-size: 24px; font-weight: 900;
  box-shadow: var(--shadow-card); flex: 0 0 auto;
}
.btn-back img { width: 26px; height: 26px; object-fit: contain; }
.btn-link {
  background: none; border: none; color: var(--ink-soft); font-family: var(--font);
  font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: underline;
  pointer-events: auto; padding: 8px;
}
.btn-row { display: flex; gap: 12px; width: 100%; max-width: 430px; }
.btn-row .btn { flex: 1; }

/* Fokus keyboard terlihat jelas (aksesibilitas) */
.btn:focus-visible, .dock-btn:focus-visible, .icon-btn:focus-visible,
.choice-card:focus-visible, .hero-card:focus-visible {
  outline: 3px solid rgba(47, 156, 143, 0.6); outline-offset: 2px;
}

.icon-btn img { width: 28px; height: 28px; object-fit: contain; }
.icon-btn {
  width: 48px; height: 48px; min-height: 48px; border: none; border-radius: 50%;
  background: var(--card); color: var(--teal-dark); font-size: 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card); transition: transform 0.08s ease; pointer-events: auto;
}
.icon-btn:active { transform: scale(0.92); }

/* ---------------- Topbar ---------------- */
.topbar {
  width: 100%; max-width: 520px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.currency-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--pill);
  padding: 7px 18px 7px 8px; font-weight: 900; font-size: 17px; color: var(--ink);
  box-shadow: var(--shadow-card);
}
.currency-chip .coin {
  width: 32px; height: 32px; object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(31, 74, 66, 0.25));
}
.currency-chip.small { padding: 4px 13px 4px 6px; font-size: 13.5px; }
.currency-chip.small .coin { width: 26px; height: 26px; font-size: 12px; }

/* ---------------- LOADING ---------------- */
#screen-loading { justify-content: center; }
.load-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.load-emblem {
  width: min(52vw, 240px); aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(31, 74, 66, 0.22));
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
.load-title { font-size: 30px; font-weight: 900; color: var(--teal-dark); letter-spacing: 2px; }
.load-title span { color: var(--coral); }
.progress-track {
  width: min(64vw, 300px); height: 16px; border-radius: var(--pill); margin-top: 10px;
  background: #efe3c8; overflow: hidden; box-shadow: inset 0 2px 3px rgba(31, 74, 66, 0.12);
}
.progress-fill {
  height: 100%; width: 0%; border-radius: var(--pill);
  background: linear-gradient(180deg, #37ab9c, var(--teal-deep));
  transition: width 0.15s ease;
}
.loading-label { color: var(--ink-soft); font-size: 13px; font-weight: 700; }

/* ---------------- DASHBOARD ---------------- */
.dash-scroll {
  width: 100%; max-width: 520px; flex: 1;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; padding-bottom: 8px;
}

/* Kartu panggung hero ala mockup: pastel mint + blob organik */
.hero-stage {
  position: relative; border-radius: var(--r-xl); min-height: 300px;
  background:
    radial-gradient(circle at 82% 16%, rgba(169, 215, 149, 0.55) 0 46px, transparent 47px),
    radial-gradient(circle at 12% 30%, rgba(169, 215, 149, 0.4) 0 30px, transparent 31px),
    radial-gradient(circle at 85% 62%, rgba(47, 156, 143, 0.16) 0 58px, transparent 59px),
    radial-gradient(circle at 20% 78%, rgba(191, 227, 216, 0.7) 0 40px, transparent 41px),
    radial-gradient(circle at 55% 90%, rgba(169, 215, 149, 0.35) 0 34px, transparent 35px),
    linear-gradient(160deg, var(--mint-2), #d8ecd0);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 18px;
}
.stage-hero {
  width: min(46vw, 210px); aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(31, 74, 66, 0.3));
  animation: bob 3.6s ease-in-out infinite;
}
.stage-info {
  position: absolute; left: 18px; bottom: 14px; text-align: left;
  background: rgba(255, 253, 244, 0.9); border-radius: var(--r-md);
  padding: 8px 14px; box-shadow: var(--shadow-card);
}
.stage-info b { display: block; font-size: 15px; color: var(--teal-dark); }
.stage-info span { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.stage-badge {
  position: absolute; right: 14px; top: 14px;
  background: var(--teal-deep); color: #fff; font-size: 12px; font-weight: 900;
  border-radius: var(--pill); padding: 7px 13px; box-shadow: var(--shadow-card);
}

/* Strip statistik kecil */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-cell {
  background: var(--card); border-radius: var(--r-md); text-align: center;
  padding: 10px 6px; box-shadow: var(--shadow-card);
}
.stat-cell b { display: block; font-size: 17px; color: var(--teal-deep); }
.stat-cell span { font-size: 10.5px; color: var(--ink-soft); font-weight: 800; }

/* Kartu generik */
.card {
  width: 100%; background: var(--card); border-radius: var(--r-lg);
  padding: 15px 17px; box-shadow: var(--shadow-card);
}
.card-title { font-size: 13.5px; color: var(--teal-deep); margin-bottom: 10px; font-weight: 900; letter-spacing: 0.4px; }

.daily-card { display: flex; align-items: center; gap: 12px; }
.daily-card .daily-info { flex: 1; }
.daily-card .daily-info b { display: block; font-size: 14.5px; }
.daily-card .daily-info span { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.daily-card .btn { min-height: 44px; padding: 10px 18px; font-size: 13.5px; }

.mission-list { display: flex; flex-direction: column; gap: 11px; }
.mission-item { display: flex; flex-direction: column; gap: 5px; }
.mission-item .m-row { display: flex; justify-content: space-between; font-size: 12.5px; }
.mission-item .m-name { font-weight: 900; }
.mission-item .m-reward { color: var(--gold-deep); font-weight: 900; }
.mission-item.done .m-name { color: var(--teal); }
.mission-item.done .m-reward::after { content: " ✓"; color: var(--teal); }
.mission-track { height: 9px; background: #efe3c8; border-radius: var(--pill); overflow: hidden; }
.mission-fill { height: 100%; background: linear-gradient(90deg, var(--sage), var(--teal)); border-radius: var(--pill); }
.mission-more { font-size: 11px; color: var(--ink-soft); font-weight: 700; }

/* Dock navigasi bawah ala mockup */
.dock {
  width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  padding: 10px 4px calc(4px + env(safe-area-inset-bottom));
  margin-top: 6px;
}
.dock-btn {
  appearance: none; border: none; background: none; cursor: pointer; pointer-events: auto;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-family: var(--font); padding: 0;
}
.dock-btn .dock-ico {
  width: 62px; height: 62px; border-radius: 21px;
  background: var(--card); color: var(--teal-deep);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.08s ease;
}
.dock-btn:active .dock-ico { transform: scale(0.9); }
.dock-btn.primary .dock-ico {
  background: linear-gradient(180deg, var(--teal), var(--teal-deep)); color: #fff;
  box-shadow: 0 10px 22px rgba(31, 122, 112, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.dock-btn .dock-ico img { width: 32px; height: 32px; object-fit: contain; }
.dock-btn span { font-size: 13px; font-weight: 900; color: var(--ink); }

/* ---------------- Header sub-screen ---------------- */
.screen-header {
  width: 100%; max-width: 560px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
}
.screen-header h2 { flex: 1; text-align: center; font-size: 21px; color: var(--teal-dark); font-weight: 900; }
.screen-header .spacer { width: 48px; flex: 0 0 auto; }
.screen-subtitle {
  width: 100%; max-width: 560px; text-align: center;
  color: var(--ink-soft); font-size: 12px; font-weight: 700; margin-bottom: 14px;
}
.screen-footer { padding: 18px 0 8px; display: flex; justify-content: center; width: 100%; }

/* ---------------- ROSTER — lingkaran avatar ala mockup ---------------- */
.roster-grid {
  width: 100%; max-width: 560px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px;
  padding: 20px; background: var(--card); border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.hero-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; border-radius: var(--r-lg); padding: 6px 4px 10px;
  transition: transform 0.1s ease;
}
.hero-card:active { transform: scale(0.95); }
.avatar-wrap {
  position: relative; width: min(38vw, 150px); aspect-ratio: 1;
  border-radius: 50%; border: 3px solid var(--teal-light);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.hero-card.selected .avatar-wrap {
  border-color: #35e0c8;
  box-shadow: 0 0 0 4px rgba(53, 224, 200, 0.35), 0 0 26px rgba(53, 224, 200, 0.75);
}
.hero-sprite { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(31, 74, 66, 0.25)); }
.hero-name { font-weight: 900; font-size: 14px; text-align: center; color: var(--ink); }
.hero-pattern { font-size: 10.5px; color: var(--ink-soft); font-weight: 800; text-align: center; }
.roster-equity{width:100%;display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:1px}
.roster-eq-chip{font-size:8.5px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#123f3a;background:color-mix(in srgb,var(--eq) 24%,#fffdf7);border:1.4px solid color-mix(in srgb,var(--eq) 72%,#fff 28%);border-radius:999px;padding:2px 8px;max-width:94%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.roster-eq-dots{display:flex;gap:4px;justify-content:center}
.roster-eq-dot{width:7px;height:7px;border-radius:50%;background:#d8cfbd;border:1px solid #fff;box-shadow:0 0 0 1px rgba(18,63,58,.08)}
.roster-eq-dot.on{background:var(--eq);box-shadow:0 0 0 1px color-mix(in srgb,var(--eq) 70%,#fff 30%)}
.roster-eq-dot.active{transform:scale(1.32);box-shadow:0 0 0 1px #fff,0 0 7px color-mix(in srgb,var(--eq) 65%,transparent)}
.roster-equity small{font-size:8.5px;line-height:1.15;color:#6c8179;font-weight:800;text-align:center;max-width:112px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Hero terkunci: siluet redup + badge gembok (ala mockup) */
.hero-card.locked { cursor: default; }
.hero-card.locked .avatar-wrap { border-color: #e4d9bf; }
.hero-card.locked .hero-sprite { opacity: 0.28; filter: grayscale(1) contrast(0.8); }
.hero-card.locked .hero-name { color: var(--ink-soft); }
.lock-badge {
  position: absolute; right: 2%; bottom: 2%;
  width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: var(--teal-deep); border: 3px solid var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; box-shadow: var(--shadow-card);
}
.hero-card.locked .lock-badge { background: #9db3ae; }
.lock-cond {
  font-size: 10px; color: var(--coral-deep); font-weight: 800; text-align: center;
  line-height: 1.3; max-width: 92%;
}
.lock-buy-note { font-size: 10.5px; color: var(--gold-deep); font-weight: 900; text-align: center; }

/* ---------------- UPGRADE SQUAD — slider ala mockup ---------------- */
.upgrade-list { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 13px; }
.upg-row {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border-radius: var(--r-lg); padding: 15px 17px;
  box-shadow: var(--shadow-card);
}
.upg-head { display: flex; align-items: center; gap: 12px; }
.upg-icon {
  width: 46px; height: 46px; border-radius: 16px; flex: 0 0 auto;
  background: linear-gradient(160deg, var(--mint-2), var(--teal-light));
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.upg-info { flex: 1; }
.upg-info b { font-size: 15px; color: var(--teal-dark); }
.upg-info .upg-desc { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; margin-top: 1px; }
/* slider level: track + knob (meniru mockup Attack/Army Size) */
.upg-slider { position: relative; height: 26px; border-radius: var(--pill); background: #f3e8cf; overflow: visible; }
.upg-slider .upg-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--teal-light), var(--teal));
  min-width: 0;
}
.upg-slider .upg-knob {
  position: absolute; top: 50%; width: 34px; height: 34px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #6cc4b6, var(--teal-deep));
  border: 4px solid #fff; box-shadow: 0 3px 8px rgba(31, 74, 66, 0.35);
}
.upg-slider.maxed .upg-fill { background: linear-gradient(90deg, #f9d97a, var(--gold-deep)); }
.upg-slider.maxed .upg-knob { background: radial-gradient(circle at 35% 30%, #fbe08a, var(--gold-deep)); }
.upg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.upg-count { font-size: 11.5px; color: var(--ink-soft); font-weight: 900; }
.btn-buy { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.btn-buy.maxed {
  background: none; box-shadow: none; color: var(--gold-deep);
  font-weight: 900; cursor: default; transform: none;
}

/* ---------------- TOKO — kartu 3 kolom ala mockup ---------------- */
.shop-sections { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 16px; }
.shop-section h3 { font-size: 13.5px; color: var(--teal-deep); margin-bottom: 9px; font-weight: 900; letter-spacing: 0.4px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.shop-card {
  position: relative; border-radius: var(--r-lg); padding: 13px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-card); overflow: visible;
}
.shop-card.c-teal { background: linear-gradient(170deg, #d7ece4, #b9ddD2); }
.shop-card.c-green { background: linear-gradient(170deg, #e7f2d8, #cfe6b8); }
.shop-card.c-coral { background: linear-gradient(170deg, #fbe3d8, #f6c8b4); }
.shop-sprite { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(31, 74, 66, 0.22)); }
.shop-card b { font-size: 12px; color: var(--teal-dark); text-align: center; line-height: 1.2; }
.shop-card .s-desc { font-size: 10px; color: var(--ink-soft); font-weight: 700; text-align: center; line-height: 1.35; flex: 1; }
.price-tag {
  position: absolute; top: -10px; right: -6px;
  background: linear-gradient(180deg, #f9d97a, var(--gold-deep)); color: #5c430e;
  font-size: 11px; font-weight: 900; border-radius: var(--pill); padding: 4px 9px;
  box-shadow: 0 4px 10px rgba(224, 167, 46, 0.45);
}
.shop-card .lock-badge { width: 26px; height: 26px; font-size: 11px; right: 6px; bottom: 6px; }
.shop-card .s-owned { font-size: 10.5px; color: var(--teal-deep); font-weight: 900; }
.shop-card .btn { width: 100%; min-height: 36px; font-size: 12px; padding: 7px 8px; }
.shop-card .icon-sprite { font-size: 40px; line-height: 64px; }

/* ---------------- HUD ---------------- */
.hud-top { width: 100%; max-width: 640px; margin: 0 auto; }
.hud-xp-track {
  position: relative; width: 100%; height: 10px; border-radius: var(--pill);
  background: rgba(255, 253, 244, 0.55); overflow: visible;
  box-shadow: inset 0 1px 3px rgba(20, 88, 79, 0.25);
}
.hud-xp-fill {
  height: 100%; width: 0%; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--sage), var(--green));
  transition: width 0.15s linear;
}
.hud-level-chip {
  position: absolute; right: 0; top: 50%; transform: translate(2px, -50%);
  background: var(--teal-dark); color: #fff; font-size: 9.5px; font-weight: 900;
  border-radius: var(--pill); padding: 2px 7px;
}
.hud-row { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 10px; gap: 8px; }

/* Pill HP ala mockup (hearts) */
.hp-pill {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 253, 244, 0.92); border-radius: var(--pill);
  padding: 5px 12px 5px 6px; box-shadow: var(--shadow-card);
}
.hp-pill .heart { width: 20px; height: 20px; object-fit: contain; }
.hud-portrait {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mint-2); border: 2px solid var(--teal-light);
  object-fit: contain; padding: 2px;
}
.hud-hp-track {
  width: clamp(70px, 22vw, 150px); height: 10px; border-radius: var(--pill);
  background: #e9ddc2; overflow: hidden;
}
.hud-hp-fill {
  height: 100%; width: 100%; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--coral-light), var(--heart));
  transition: width 0.15s linear;
}
.hud-hp-text { font-size: 11px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.hp-pill.low { animation: hp-pulse 0.7s ease-in-out infinite; }
@keyframes hp-pulse {
  0%, 100% { box-shadow: var(--shadow-card); }
  50% { box-shadow: 0 0 0 5px rgba(240, 104, 90, 0.35), var(--shadow-card); }
}

.hud-center { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.wave-pill {
  background: var(--teal-dark); color: #fff; font-weight: 900; font-size: 12.5px;
  letter-spacing: 0.8px; border-radius: var(--pill); padding: 7px 14px;
  box-shadow: var(--shadow-card); white-space: nowrap; max-width: 34vw;
  overflow: hidden; text-overflow: ellipsis;
}
.timer-chip {
  background: rgba(255, 253, 244, 0.85); color: var(--ink);
  font-size: 11px; font-weight: 900; border-radius: var(--pill); padding: 3px 12px;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 5px;
}
.timer-chip img { width: 13px; height: 13px; object-fit: contain; }
.hud-boss-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(40vw, 220px); margin-top: 2px; }
.hud-boss-track {
  width: 100%; height: 10px; background: rgba(255, 253, 244, 0.5);
  border-radius: var(--pill); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.hud-boss-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--coral-light), var(--coral-deep)); transition: width 0.15s linear; }
.hud-boss-name { font-size: 9.5px; letter-spacing: 2px; color: #fff; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }

.hud-right { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.hud-kills, .hud-currency-run {
  font-size: 11.5px; font-weight: 900; color: var(--ink);
  background: rgba(255, 253, 244, 0.92); padding: 4px 11px; border-radius: var(--pill);
  box-shadow: var(--shadow-card); font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 5px;
}
.hud-kills img, .hud-currency-run img { width: 14px; height: 14px; object-fit: contain; }
.hud-minimap {
  position: absolute; top: 118px; right: 14px;
  width: 74px; height: 74px; border-radius: 50%;
  border: 3px solid rgba(255, 253, 244, 0.75);
  background: rgba(20, 88, 79, 0.55); box-shadow: var(--shadow-card);
  z-index: 3; pointer-events: none;
}
.btn-pause { pointer-events: auto; /* klikable di HUD passive */
  width: 46px; height: 46px; min-height: 46px; padding: 0; font-size: 17px; border-radius: 50%;
  background: rgba(255, 253, 244, 0.92); color: var(--teal-dark);
}
.btn-pause img { width: 22px; height: 22px; object-fit: contain; }

.hud-announce {
  position: absolute; top: 30%; left: 50%; transform: translateX(-50%);
  font-size: clamp(22px, 6vw, 36px); font-weight: 900; letter-spacing: 3px;
  color: #fff; background: var(--teal-deep); border-radius: var(--pill);
  padding: 12px 34px; box-shadow: var(--shadow-pop);
  pointer-events: none; animation: announce 1.8s ease forwards; white-space: nowrap;
}
.hud-announce.boss { background: var(--coral-deep); }
@keyframes announce {
  0% { opacity: 0; transform: translateX(-50%) scale(0.6); }
  15% { opacity: 1; transform: translateX(-50%) scale(1.06); }
  30% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1); }
}
.hud-hint {
  position: absolute; bottom: calc(128px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 11.5px; font-weight: 800; pointer-events: none;
  background: rgba(20, 88, 79, 0.6); border-radius: var(--pill); padding: 6px 16px;
  white-space: nowrap;
}
.hud-hint .k {
  display: inline-block; background: rgba(255,253,244,0.92); color: var(--teal-dark);
  border-radius: 6px; padding: 0 6px; margin: 0 2px; font-weight: 900;
}

/* ---------------- Modal umum ---------------- */
.modal-box {
  width: min(92vw, 440px); background: var(--cream); border-radius: var(--r-xl);
  padding: 20px 18px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  animation: pop-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100dvh - 20px); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
/* Layar pendek (portrait kecil): padatkan modal agar tombol aksi selalu terlihat */
@media (max-height: 780px) {
  .modal-box { gap: 7px; padding: 14px 16px 16px; }
  .modal-box h2 { font-size: 20px; }
  .modal-sub { font-size: 11px; }
  .go-stars { margin-top: -30px; }
  .go-stars .star { width: 44px !important; height: 44px !important; }
  .summary-grid { gap: 5px !important; }
  .btn-xl { min-height: 48px; }
}
@media (max-height: 680px) {
  .go-stars { display: none; }
}
.modal-box.wide { width: min(94vw, 500px); }
.modal-box h2 { font-size: 23px; font-weight: 900; color: var(--teal-dark); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.85); } }

/* Bintang dekorasi ala mockup victory */
.go-stars { display: flex; gap: 6px; margin-top: -46px; }
.go-stars .star {
  width: 34px; height: 34px; object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s;
}
.go-stars .star.on { filter: drop-shadow(0 0 10px rgba(245, 198, 79, 0.9)); }
.go-stars .star.on:nth-child(2) { transform: scale(1.3) translateY(-4px); }

/* Level-up */
.lu-stars { display: flex; gap: 8px; align-items: center; }
.lu-stars img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(245, 198, 79, 0.7)); }
.lu-stars img:nth-child(2) { width: 38px; height: 38px; }
.levelup-title { color: var(--coral); font-size: 27px; }
.levelup-title::before, .levelup-title::after { content: "—"; color: var(--coral-light); margin: 0 8px; }
.levelup-sub { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.choice-grid { display: flex; flex-direction: column; gap: 11px; width: 100%; margin-top: 2px; }
.choice-card {
  display: flex; align-items: center; gap: 13px; text-align: left; width: 100%;
  border: none; font-family: var(--font);
  border-radius: var(--r-lg); padding: 13px 15px; cursor: pointer;
  color: var(--ink); box-shadow: var(--shadow-card);
  transition: transform 0.08s ease, filter 0.15s;
  opacity: 0; animation: choice-in 0.35s ease forwards;
}
.choice-card:nth-child(1) { background: linear-gradient(160deg, #e2f1ea, #cde7dc); animation-delay: 0.05s; }
.choice-card:nth-child(2) { background: linear-gradient(160deg, #ecf4dc, #dbecc4); animation-delay: 0.13s; }
.choice-card:nth-child(3) { background: linear-gradient(160deg, #fdeade, #f9d4c0); animation-delay: 0.21s; }
@keyframes choice-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
.choice-card:active { transform: scale(0.96); }
.choice-icon {
  font-size: 24px; width: 48px; height: 48px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 253, 244, 0.9); border-radius: 16px; box-shadow: var(--shadow-card);
}
.choice-info { flex: 1; }
.choice-info b { font-size: 15px; color: var(--teal-dark); }
.choice-info p { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.choice-stack { font-size: 10.5px; color: var(--teal-deep); font-weight: 900; }

/* Pause & revive */
.pause-summary { font-size: 13px; color: var(--ink-soft); line-height: 1.8; font-weight: 700; }
.modal-box .btn { width: 100%; }
.revive-title { color: var(--coral); }
.revive-title::before, .revive-title::after { content: "—"; color: var(--coral-light); margin: 0 8px; }
.revive-sub { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; }
.revive-count { font-size: 12px; color: var(--gold-deep); font-weight: 900; }

/* Game over */
.gameover-title { color: var(--coral); }
.gameover-title.win { color: var(--teal); }
.gameover-title::before, .gameover-title::after { content: "—"; color: rgba(31, 74, 66, 0.25); margin: 0 8px; }
.gameover-sub { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; width: 100%; }
.summary-cell { background: var(--card); border-radius: var(--r-md); padding: 10px 4px; box-shadow: var(--shadow-card); }
.summary-cell b { display: block; font-size: 17px; color: var(--teal-deep); }
.summary-cell span { font-size: 10px; color: var(--ink-soft); font-weight: 800; }
.summary-reward { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 900; color: var(--ink-soft); }
.summary-reward strong { color: var(--gold-deep); font-size: 22px; font-variant-numeric: tabular-nums; }

/* ---------------- Responsif & aksesibilitas ---------------- */
@media (max-width: 420px) {
  .roster-grid { gap: 18px 10px; padding: 16px 12px; }
  .shop-grid { gap: 8px; }
  .dock-btn .dock-ico { width: 56px; height: 56px; border-radius: 19px; }
  .hud-minimap { width: 68px; height: 68px; }
}
/* Semua target sentuh kritikal ≥ 44px dijamin oleh ukuran komponen di atas
   (dock 62, btn 48, back 48, pause 46, choice 48 icon, buy 44). */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .load-emblem, .stage-hero { animation: none !important; }
}

.summary-reward .coin-sm { width: 22px; height: 22px; object-fit: contain; vertical-align: -4px; }
img.lock-badge {
  position: absolute; right: 2%; bottom: 2%;
  width: 34%; height: auto; aspect-ratio: 1;
  border-radius: 50%; background: var(--teal-deep); border: 3px solid var(--card);
  padding: 9%; object-fit: contain; box-shadow: var(--shadow-card);
}
.hero-card.locked img.lock-badge { background: #9db3ae; }
.shop-card img.lock-badge { width: 26px; right: 6px; bottom: 6px; padding: 6px; }

/* Inline ikon aset dalam teks */
.inline-coin { width: 15px; height: 15px; object-fit: contain; vertical-align: -2px; margin: 0 2px; }
.badge-ico { width: 15px; height: 15px; object-fit: contain; }
.stage-badge { display: inline-flex; align-items: center; gap: 6px; }
.ico-title { display: flex; align-items: center; gap: 7px; }
.t-ico { width: 17px; height: 17px; object-fit: contain; }
.claim-line b { color: var(--gold-deep); }
.m-reward { display: inline-flex; align-items: center; gap: 3px; }
.lock-buy-note { display: flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: wrap; }
.btn-buy { gap: 6px; }

/* Utilitas sembunyi (wajib — dipakai boss bar & announce) */
.hidden { display: none !important; }

/* Ikon dalam tombol */
.btn-ico { width: 19px; height: 19px; object-fit: contain; }

/* HUD dua baris: baris 1 = HP + kolom kanan; baris 2 = wave+timer+boss tengah */
.hud-row { flex-wrap: wrap; }
.hud-center { order: 3; width: 100%; flex-direction: row; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.hud-boss-wrap { width: min(36vw, 190px); margin-top: 0; }
.wave-pill { max-width: none; font-size: 14px; padding: 8px 20px; }

/* =====================================================================
   COMPOSITION LAYER (stage 9) — aura, kuman melayang, dekor victory,
   weed sudut, banner upgrade, chip musuh panggung. Ala mockup 12.
   ===================================================================== */
.deco { position: absolute; pointer-events: none; }

/* -- Loading: kuman lucu melayang di sekitar emblem -- */
.load-stage { position: relative; display: inline-block; }
.load-stage .germ { width: 44px; opacity: 0.95; filter: drop-shadow(0 3px 0 rgba(31,74,68,0.12)); }
.load-stage .germ.g1 { top: -30px; left: -52px; animation: floaty 3.4s ease-in-out infinite; }
.load-stage .germ.g2 { bottom: -18px; left: -30px; width: 34px; animation: floaty 2.9s 0.5s ease-in-out infinite reverse; }
.load-stage .germ.g3 { top: -14px; right: -48px; width: 38px; animation: floaty 3.8s 0.9s ease-in-out infinite; }
.load-stage .dot { width: 54px; right: -40px; bottom: -26px; opacity: 0.8; animation: floaty 3.1s 0.3s ease-in-out infinite; }

/* -- Dashboard: aura + chip musuh di gelembung (ala mockup stage) -- */
.stage-aura {
  position: absolute; left: 50%; bottom: 6%; width: 340px; max-width: 92%;
  transform: translateX(-50%); pointer-events: none; opacity: 0.95;
}
.stage-enemies { position: absolute; inset: 0; pointer-events: none; }
.stage-enemy { position: absolute; width: 64px; height: 64px; }
.stage-enemy .se-bubble { position: absolute; inset: 0; width: 100%; }
.stage-enemy .se-sprite { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; animation: floaty 3s ease-in-out infinite; }
.stage-enemy.se1 { left: 7%; top: 16%; animation: floaty 4.2s ease-in-out infinite; }
.stage-enemy.se2 { right: 6%; top: 10%; width: 72px; height: 72px; animation: floaty 3.4s 0.6s ease-in-out infinite reverse; }
.stage-enemy.se3 { left: 12%; bottom: 14%; width: 52px; height: 52px; animation: floaty 3.8s 1s ease-in-out infinite; }

/* -- Game over: hiasan victory (koin, bintang, siluet monster) -- */
.go-card { overflow: hidden; }
.go-deco { position: absolute; pointer-events: none; }
.go-deco.monster { width: 62px; opacity: 0.18; }
.go-deco.monster.m1 { top: -10px; left: -14px; transform: rotate(-14deg); }
.go-deco.monster.m2 { bottom: 74px; right: -16px; transform: rotate(12deg); }
.go-deco.coin { width: 30px; filter: drop-shadow(0 2px 0 rgba(224,167,46,0.4)); }
.go-deco.coin.c1 { top: 6px; right: 58px; animation: floaty 2.8s ease-in-out infinite; }
.go-deco.coin.c2 { top: 34px; left: 20px; width: 22px; animation: floaty 3.2s 0.4s ease-in-out infinite reverse; }
.go-deco.coin.c3 { bottom: 150px; right: 14px; width: 24px; animation: floaty 3.5s 0.8s ease-in-out infinite; }
.go-deco.starpop { width: 34px; top: -6px; left: 42%; transform: translateX(-50%) rotate(-10deg); animation: floaty 3s 0.2s ease-in-out infinite; }
.go-chest { width: 40px; margin-left: auto; animation: floaty 3.4s ease-in-out infinite; }

/* -- Banner upgrade ala mockup: tile hero besar + mini musuh -- */
.upg-banner { display: flex; gap: 10px; justify-content: center; align-items: stretch; margin-bottom: 14px; }
.ub-tile { border-radius: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ub-tile.big { width: 128px; height: 118px; background: #bfe3d8; box-shadow: inset 0 -5px 0 rgba(20,88,79,0.18), 0 4px 0 rgba(31,74,68,0.15); }
.ub-tile.big img { width: 86%; }
.ub-side { display: flex; flex-direction: column; gap: 10px; }
.ub-tile.mini { width: 66px; height: 54px; background: #f8c9b8; box-shadow: inset 0 -4px 0 rgba(233,106,76,0.25); }
.ub-tile.mini.light { background: #fbdcd0; }
.ub-tile.mini img { width: 74%; animation: floaty 3s ease-in-out infinite; }

/* -- Shop: badge kategori pojok kiri-atas kartu -- */
.corner-deco {
  position: absolute; top: -10px; left: -10px; width: 34px; transform: rotate(-8deg);
  filter: drop-shadow(0 2px 0 rgba(31,74,68,0.18)); pointer-events: none;
}

/* -- Pola kuman melayang di latar layar DOM (ala mockup dashboard).
      Screen dijadikan stacking context (z-index:0) supaya ::before
      ber-z-index -1 muncul DI ATAS bg cream tapi DI BAWAH konten. -- */
#screen-dashboard, #screen-roster, #screen-shop, #screen-upgrade, #screen-gameover { z-index: 0; }
#screen-dashboard::before, #screen-roster::before, #screen-shop::before,
#screen-upgrade::before, #screen-gameover::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image:
    url('../assets/sprites/deco_germ_teal.png'),
    url('../assets/sprites/deco_germ_coral.png'),
    url('../assets/sprites/deco_germ_sage.png'),
    url('../assets/sprites/deco_dots.png');
  background-size: 64px, 46px, 52px, 58px;
  background-repeat: no-repeat;
  background-position: 6% 12%, 92% 20%, 10% 78%, 88% 84%;
  opacity: 0.16;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}

/* -- Pause: baris ringkasan dengan ikon PNG inline -- */
.pause-line { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pause-ico { width: 15px; height: 15px; object-fit: contain; }

/* -- Roster: nafas lebih longgar antar kartu (ala mockup grid hero) -- */
.roster-grid { gap: 30px 18px; padding: 24px 20px; }
.hero-card { gap: 10px; }
.avatar-wrap { width: min(34vw, 132px); }
.hero-name { font-size: 15px; }

/* =====================================================================
   FASE 5.2/5.3 — KEMAMPUAN AKTIF, EVOLUSI HERO, ARENA, PETI BOSS
   ===================================================================== */

/* -- Bar kemampuan aktif: 4 tombol bulat di kanan (1 senjata + 3 kekuatan) -- */


/* -- Kartu evolusi hero di dashboard (selalu ada yang dikejar) -- */
.evo-card { display: flex; flex-direction: column; gap: 10px; }
.evo-head { display: flex; align-items: center; gap: 10px; }
.evo-stage-chip {
  min-width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; color: var(--cream); background: var(--teal);
}
.evo-title { display: flex; flex-direction: column; }
.evo-title b { font-size: 15px; color: var(--ink); }
.evo-tier { font-size: 11px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.evo-parts { display: flex; gap: 8px; flex-wrap: wrap; }
.evo-part {
  display: flex; align-items: center; gap: 5px; padding: 5px 9px;
  background: var(--cream-deep, #f6ecd4); border-radius: 14px;
  font-size: 12px; font-weight: 800; color: var(--ink);
}
.evo-part img { width: 22px; height: 22px; }
.evo-part.need { outline: 2px dashed var(--coral); border-radius: 14px; }
.evo-progress { font-size: 12px; color: var(--ink-soft); font-weight: 700; }

/* -- Overlay evolusi di panggung hero dashboard -- */
#stage-evo { position: absolute; left: 50%; bottom: 6%; width: 340px; max-width: 92%; aspect-ratio: 1; transform: translateX(-50%); pointer-events: none; }
#stage-evo img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#stage-evo .ov-silia { width: 34%; margin-top: -26%; animation: floaty 3s ease-in-out infinite; }
#stage-evo .ov-pseudopodia { width: 30%; margin-top: 30%; }
#stage-evo .ov-pedang { width: 38%; margin-left: 22%; rotate: 18deg; }
#stage-evo .ov-inti { width: 72%; animation: floaty 4s ease-in-out infinite reverse; }

/* -- Kartu arena dashboard + modal pilih arena -- */
.arena-card { display: flex; align-items: center; gap: 12px; }
.arena-card img.arena-thumb { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow-card); }
.arena-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.arena-info b { color: var(--ink); }
.arena-info span { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.arena-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.arena-item {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  border-radius: 18px; background: var(--cream); cursor: pointer;
  border: 3px solid transparent; text-align: left; width: 100%;
}
.arena-item.selected { border-color: var(--teal); background: var(--teal-light); }
.arena-item.locked { opacity: 0.6; cursor: default; }
.arena-item img { width: 56px; height: 56px; border-radius: 14px; }
.arena-item .ai-name { font-weight: 900; color: var(--ink); }
.arena-item .ai-bonus { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.arena-item .ai-unlock { font-size: 11px; color: var(--coral); font-weight: 800; }
.arena-item .ai-check { margin-left: auto; font-weight: 900; color: var(--teal); font-size: 18px; }

/* -- Modal peti boss -- */
.chest-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.chest-img { width: 86px; animation: floaty 2.6s ease-in-out infinite; }
.chest-loot { display: flex; gap: 10px; margin: 4px 0 8px; }
.chest-loot .loot {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  background: var(--cream); border-radius: 16px; font-weight: 900; color: var(--ink);
}
.chest-loot .loot img { width: 24px; height: 24px; }
.btn-gold {
  background: linear-gradient(180deg, #f7d272, #e0a72e); color: #5c3d0e;
  box-shadow: 0 4px 0 #b98a20, 0 8px 18px rgba(224, 167, 46, 0.35);
}
.btn-gold:disabled { opacity: 0.5; }
.modal-title.coral { color: var(--coral); }

/* -- Gameover: baris bagian evolusi -- */
.go-parts { font-size: 13px; font-weight: 800; color: var(--teal-dark, #14584f); }

/* -- Baris terkunci dengan ikon gembok PNG (bukan emoji) -- */
.lock-line { display: inline-flex; align-items: center; gap: 4px; }
.lock-ico, .arena-item img.lock-ico { width: 15px; height: 15px; border-radius: 0; object-fit: contain; flex: 0 0 auto; }

/* -- Kolom teks item arena (nama + bonus + status unlock) -- */
.ai-mid { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-unlock.lock-line { margin-top: 2px; }

.lock-line span { line-height: 14px; }
.arena-item .ai-unlock.lock-line { display: flex; align-items: center; }

/* =====================================================================
   META-LAYER KONDISI TUBUH (Fase 6) — tubuh = organisme yang dikelola
   ===================================================================== */

/* -- Kartu kondisi tubuh di dashboard -- */
.body-card { display: flex; flex-direction: column; gap: 10px; }
.body-head { display: flex; align-items: center; gap: 10px; }
.body-title-wrap { flex: 1; display: flex; flex-direction: column; }
.body-title { color: var(--ink); font-size: 15px; }
.body-sub { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; }
.btn-sm { padding: 8px 14px; font-size: 12px; }

.body-rows { display: flex; flex-direction: column; gap: 7px; }
.body-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 14px; background: var(--cream);
}
.body-row.critical { background: #fde4d8; animation: crit-pulse 1.4s ease-in-out infinite; }
@keyframes crit-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 130, 92, 0); }
  50% { box-shadow: 0 0 0 4px rgba(242, 130, 92, 0.35); }
}
.body-ico { width: 26px; height: 26px; }
.body-name { width: 84px; font-size: 12.5px; font-weight: 900; color: var(--ink); }
.body-track {
  position: relative; flex: 1; height: 14px; border-radius: 8px;
  background: #e9dfc0; overflow: hidden;
}
.body-fill { height: 100%; border-radius: 8px; transition: width 0.4s ease; }
.body-val {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: var(--ink);
}
.body-crit { width: 22px; height: 22px; animation: floaty 2s ease-in-out infinite; }

.body-meters { display: flex; gap: 8px; }
.meter {
  flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: var(--cream); border-radius: 14px; font-size: 12px; font-weight: 800; color: var(--ink);
}
.meter img { width: 22px; height: 22px; }
.meter.danger { background: #fde4d8; color: var(--coral); }

.body-foot { display: flex; flex-direction: column; gap: 8px; }
.body-milestone { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.body-milestone.done { color: var(--gold-dark, #b98a20); }

/* -- Modal fokus run -- */

/* -- Dampak tubuh di game over -- */
.go-body { font-size: 12.5px; }

/* =====================================================================
   WORKFLOW UI v2 — CTA primer + Battle Prep + Tas (riset: 1 primary CTA,
   pre-run choices dalam 1 alur, bottom nav 3-5, bag terpisah)
   ===================================================================== */

/* -- Tombol MULAI besar di dashboard (CTA primer, selalu terlihat) -- */
.btn-play-big {
  width: 100%; max-width: 560px; margin: 12px 0 4px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border: none; border-radius: 24px; cursor: pointer;
  background: linear-gradient(180deg, #37b3a2, #1f7a70);
  box-shadow: 0 5px 0 #14584f, 0 10px 22px rgba(31, 122, 112, 0.4);
  transition: transform 0.1s ease;
}
.btn-play-big:active { transform: translateY(3px); box-shadow: 0 2px 0 #14584f; }
.btn-play-big img { width: 30px; height: 30px; }
.btn-play-big span {
  font-size: 22px; font-weight: 900; letter-spacing: 0.04em; color: var(--cream);
}
.btn-play-big small { margin-left: auto; font-size: 11px; font-weight: 800; color: #bfe3d8; }

/* -- Battle prep -- */
/* =========================================================
   FASE 18 — PROGRESSION CURVE & GATEKEEPER
   ========================================================= */

/* Fase 18 XP BANK: chip "XP ditahan" di dalam pill gerbang */
.hud-gate-bank {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 217, 61, 0.92);
  color: #5b4200;
  font-size: 11px;
  font-weight: 800;
}
.hud-gate-bank.hidden { display: none; }

/* Pill GERBANG DITUTUP — tampil saat boss penjaga masih hidup */
.hud-gate {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(180deg, #ff8a80, #e5484d); color: #fffdf4;
  font-size: 12px; font-weight: 900; letter-spacing: 0.08em;
  padding: 7px 16px; border-radius: 999px; border: 2px solid #fffdf4;
  box-shadow: 0 4px 12px rgba(165, 30, 30, 0.4);
  animation: gate-throb 1.1s ease-in-out infinite;
  pointer-events: none; z-index: 5;
}
.hud-gate.hidden { display: none; }
@keyframes gate-throb {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.06); }
}

/* =========================================================
   FASE 17 — RETENTION TRIGGER (dokumen pemilik)
   ========================================================= */

/* Chip Imun Coin live di HUD kanan-atas + pulse saat bertambah */
.hud-imu-run img { width: 16px; height: 16px; }
.hud-imu-run.imu-pulse { animation: imu-pulse 0.35s ease; }
@keyframes imu-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); filter: brightness(1.25); }
  100% { transform: scale(1); }
}

/* HP bar halus (lerp visual) — bukan lompatan instan (trigger 5C) */
#hud-hp-fill { transition: width 0.18s ease-out; }
#hud-xp-fill { transition: width 0.12s linear; }

/* Roster: tombol BUKA hero dengan Imun Coin */
.lock-unlock-btn {
  margin-top: 5px; font-size: 10.5px; padding: 7px 10px; min-height: 32px;
  border-radius: 12px; width: 100%;
}
.lock-unlock-btn.poor { filter: grayscale(0.55); opacity: 0.75; }

/* Tab GLOBAL: upgrade permanen Imun Coin */
.upg-note { font-size: 11px; color: var(--ink-soft); font-weight: 700; margin: 4px 0 10px; }
.upg-layer.global { background: linear-gradient(180deg, #d9f6f1, #bfeae2); color: #0f6b60; }
.upg-now { font-size: 10.5px; font-weight: 800; color: var(--teal-deep); }
.global-row .btn-buy { background: linear-gradient(180deg, #ffd76a, #e8a614); color: #4a3305; }

/* Badge sinergi di pilihan level-up (trigger 3C) */
.syn-badge {
  margin-left: 7px; font-size: 9px; font-weight: 900; letter-spacing: 0.06em;
  color: #8a6d00; background: linear-gradient(180deg, #ffe9a8, #ffd76a);
  padding: 2.5px 8px; border-radius: 9px; vertical-align: middle;
  animation: syn-glow 1.6s ease-in-out infinite;
}
@keyframes syn-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 205, 90, 0.5); }
  50% { box-shadow: 0 0 10px 2px rgba(255, 205, 90, 0.65); }
}
.choice-card.synergy { border-color: #ffcd5a; box-shadow: 0 6px 18px rgba(232, 166, 20, 0.25); }

/* Overlay perayaan HERO BARU (trigger 1B) */
#hero-notice {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center;
  background: rgba(24, 68, 60, 0.45); backdrop-filter: blur(3px);
  pointer-events: none;
}
#hero-notice.show { display: flex; animation: hn-fade 3.2s ease forwards; }
@keyframes hn-fade {
  0% { opacity: 0; } 8% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; }
}
.hn-box {
  position: relative; text-align: center; padding: 26px 44px 22px;
  background: linear-gradient(170deg, #fffdf4, #e7f7ee);
  border: 4px solid #ffd93d; border-radius: 26px;
  box-shadow: 0 18px 50px rgba(24, 68, 60, 0.4);
  animation: hn-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes hn-pop { from { transform: scale(0.55); opacity: 0; } }
.hn-sprite { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(35, 30, 22, 0.25)); }
.hn-kicker {
  font-size: 15px; font-weight: 900; letter-spacing: 0.18em; color: #b98a20;
  animation: hn-zoom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes hn-zoom { from { transform: scale(0.2); } }
.hn-name { display: block; font-size: 26px; color: var(--teal-dark); margin-top: 2px; }
.hn-title { font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.hn-stars { position: absolute; inset: 0; pointer-events: none; }
.hn-star {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  background: #ffd93d; clip-path: polygon(50% 0, 63% 35%, 100% 50%, 63% 65%, 50% 100%, 37% 65%, 0 50%, 37% 35%);
  opacity: 0;
  animation: hn-burst 1.1s ease-out forwards;
}
@keyframes hn-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(220deg); }
}

/* Fase 16: modal Jeda padat — Lanjutkan/Akhiri SELALU terlihat tanpa scroll */
#screen-pause .modal-box { max-height: calc(100dvh - 16px); gap: 8px; padding: 14px 16px 16px; }
#screen-pause .pause-summary { font-size: 12px; }
#screen-pause .btn-xl { min-height: 50px; }
#screen-pause .btn-danger { min-height: 44px; }

/* Fase 16 — Battle Prep konsisten dgn home: langkah kiri, kartu LOADOUT kanan */
.prep-scroll {
  width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; min-height: 0; scrollbar-width: thin; padding-right: 2px;
}
.prep-main { display: flex; flex-direction: column; gap: 4px; }
.prep-step { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 12.5px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
.prep-step b {
  width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  box-shadow: 0 2px 6px rgba(31, 122, 112, 0.25);
}
.prep-hint { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; text-transform: none; letter-spacing: 0; }

.prep-hero-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.prep-hero {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; border: 3px solid transparent; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform 0.12s;
}
.prep-hero:active { transform: scale(0.95); }
.prep-hero.selected {
  border-color: var(--teal);
  background: linear-gradient(170deg, #eafaf4, #cdeee3);
  box-shadow: 0 4px 12px rgba(53, 179, 160, 0.28);
}
.prep-hero.locked { opacity: 0.55; }
.prep-hero.locked .ph-sprite { filter: grayscale(1); }
.prep-hero .ph-sprite { width: 68%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(35, 30, 22, 0.18)); }
.prep-hero .ph-name { font-size: 11px; font-weight: 900; color: var(--ink); }
.prep-hero .ph-stage {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px;
  border-radius: 11px; font-size: 10px; font-weight: 900; color: var(--cream);
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
  box-shadow: 0 2px 5px rgba(35, 30, 22, 0.25);
}
.prep-hero .ph-lock {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
}

.prep-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.prep-chip {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 3px solid transparent; border-radius: 18px; background: var(--card);
  box-shadow: var(--shadow-card); cursor: pointer; font-size: 12px; font-weight: 800; color: var(--ink);
  transition: transform 0.12s;
}
.prep-chip:active { transform: scale(0.96); }
.prep-chip.selected { border-color: var(--teal); background: linear-gradient(170deg, #eafaf4, #cdeee3); }
.prep-chip.locked { opacity: 0.5; }
.prep-chip img { width: 26px; height: 26px; border-radius: 8px; }
.prep-chip.arena img { width: 30px; height: 30px; }

/* Panel LOADOUT — satu kartu besar ala campaign-card di home */
.prep-aside {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 18px 18px; border-radius: 24px; text-align: center;
  background:
    radial-gradient(circle at 84% 12%, rgba(169, 215, 149, 0.45) 0 40px, transparent 41px),
    radial-gradient(circle at 10% 88%, rgba(191, 227, 216, 0.6) 0 34px, transparent 35px),
    linear-gradient(165deg, #f2f8e8, #dcefe6);
  box-shadow: var(--shadow-card);
}
.pa-tag { font-size: 11px; font-weight: 900; letter-spacing: 0.14em; color: var(--teal-deep); }
.prep-summary { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.prep-summary .ps-hero { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(35, 30, 22, 0.22)); }
.prep-summary .ps-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.prep-summary .ps-mid b { font-size: 19px; color: var(--ink); }
.prep-summary .ps-tier {
  font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(255, 253, 244, 0.85); padding: 4px 12px; border-radius: 12px;
}
.prep-summary .ps-abilities { display: flex; gap: 7px; margin-top: 3px; }
.prep-summary .ps-skill-dot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fffdf4; box-shadow: 0 2px 5px rgba(35, 30, 22, 0.22); }
.prep-summary .ps-noab { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; }
.prep-summary .ps-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.prep-summary .ps-meta > div {
  display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; color: var(--ink-soft);
  background: rgba(255, 253, 244, 0.9); border-radius: 12px; padding: 5px 9px; box-shadow: 0 1px 4px rgba(35, 30, 22, 0.08);
}
.prep-summary .ps-meta img { width: 18px; height: 18px; border-radius: 5px; }
.prep-start {
  width: 100%; margin: 4px 0 0; font-size: 17px; letter-spacing: 0.06em; min-height: 54px; border-radius: 18px;
  background: linear-gradient(180deg, #3ec2ae, #1f7a70); border: none;
  box-shadow: 0 6px 16px rgba(31, 122, 112, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.prep-start:disabled { filter: grayscale(0.6); opacity: 0.7; }

/* Lanskap: 2 kolom — langkah kiri, loadout kanan (sticky) */
@media (orientation: landscape) and (min-width: 700px) {
  .prep-scroll { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
  .prep-main { grid-column: 1; }
  .prep-aside { grid-column: 2; position: sticky; top: 0; }
  #screen-prep .screen-header, #screen-prep .topbar { flex: 0 0 auto; }
  /* Fase 17: layar pendek (HP) — ringkasan scroll, CTA MULAI SELALU terlihat */
  @media (max-height: 500px) {
    .prep-aside { max-height: calc(100dvh - 104px); padding: 12px 14px 14px; gap: 8px; }
    .prep-aside .prep-summary { overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: thin; }
    .prep-aside .ps-hero { width: 76px; height: 76px; }
    .prep-aside .prep-start { flex: 0 0 auto; min-height: 48px; font-size: 15px; }
  }
}

/* -- Bag / inventory -- */
.bag-scroll { width: 100%; max-width: 560px; }
.bag-section-title { margin: 10px 0 8px; font-size: 13px; letter-spacing: 0.05em; color: var(--ink-soft); text-transform: uppercase; }
.bag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bag-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px;
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-card); text-align: center;
}
.bag-card.short { outline: 2px dashed var(--coral); }
.bag-card.empty { opacity: 0.55; }
.bag-card .bag-sprite { width: 44px; height: 44px; object-fit: contain; }
.bag-card b { font-size: 11.5px; color: var(--ink); }
.bag-card .bag-count { font-size: 15px; font-weight: 900; color: var(--ink); }
.bag-card .bag-count.ok { color: var(--teal); }
.bag-card small { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.bag-hint { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.bag-evo-next { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.bag-evo-next b { color: var(--ink); }
.bag-evo-next p { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin: 0; }
.bag-evo-next .bag-ready { color: var(--teal); font-weight: 800; }
.bag-design-panel{margin-top:9px;padding-top:10px;border-top:2px dashed rgba(53,208,186,.35);display:flex;flex-direction:column;gap:9px}
.bag-design-head{display:flex;flex-direction:column;gap:2px}
.bag-design-kicker{width:max-content;font-size:8.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#0f5f56;background:#dff3ec;border-radius:999px;padding:2px 8px;border:1px solid rgba(53,208,186,.55)}
.bag-design-head b{font-size:13px;color:#123f3a}
.bag-design-head small{font-size:10.5px;color:#5b7d74;font-weight:800;line-height:1.3}
.bag-design-list{display:flex;flex-direction:column;gap:6px}
.bag-design-row{display:grid;grid-template-columns:28px 48px 1fr;gap:8px;align-items:center;border:1.5px solid #e8dfc8;background:#fff8ea;border-radius:14px;padding:8px}
.bag-design-row.done,.bag-design-row.active{border-color:color-mix(in srgb,var(--eq) 68%,#fff 32%);background:linear-gradient(90deg,#fffdf7,color-mix(in srgb,var(--eq) 12%,#fffdf7))}
.bag-design-row.active{box-shadow:0 0 0 2px color-mix(in srgb,var(--eq) 38%,transparent)}
.bag-design-node{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--eq);color:#fffdf4;font-size:11px;font-weight:900;border:2px solid #fff;box-shadow:0 1px 5px rgba(35,30,22,.18)}
.bag-design-preview{width:46px;height:46px;border-radius:14px;border:1.4px solid color-mix(in srgb,var(--eq) 62%,#fff 38%);background:#fffdf7}
.bag-design-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.bag-design-copy b{font-size:11.5px;color:#123f3a}
.bag-design-copy span{font-size:10.5px;line-height:1.3;color:#526e66;font-weight:800}
.bag-design-copy small{font-size:9.5px;color:#8b6e32;font-weight:900}

.back-btn img { width: 20px; height: 20px; }

/* -- Prep: judul tidak wrap -- */
#screen-prep .screen-title { font-size: 22px; white-space: nowrap; }

/* =====================================================================
   TUTORIAL ONBOARDING (run pertama) — bubble + jari virtual
   ===================================================================== */
#tutorial-layer {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
}
.tut-bubble {
  position: absolute; left: 50%; top: 26%; transform: translateX(-50%);
  max-width: 78%; padding: 12px 18px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-card);
  border: 3px solid var(--teal);
  font-size: 14px; font-weight: 800; color: var(--ink); text-align: center;
  animation: tut-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.tut-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--teal);
}
@keyframes tut-pop { from { transform: translateX(-50%) scale(0.6); opacity: 0; } }
.tut-finger { position: absolute; width: 26px; height: 26px; border-radius: 50%; }
.tut-finger.tut-move {
  left: 70px; bottom: 150px; background: rgba(53, 224, 200, 0.85);
  animation: tut-tap 1.1s ease-in-out infinite;
}
.tut-finger.tut-attack {
  left: 50%; top: 48%; background: rgba(242, 130, 92, 0.9);
  animation: tut-tap 0.8s ease-in-out infinite;
}
.tut-finger.tut-collect { left: 55%; top: 52%; background: rgba(245, 198, 79, 0.95); animation: tut-tap 0.8s 0.2s ease-in-out infinite; }
@keyframes tut-tap {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(53, 224, 200, 0.5); }
  50% { transform: scale(1.25); box-shadow: 0 0 0 14px rgba(53, 224, 200, 0); }
}
.tut-skip {
  position: absolute; top: 150px; right: 14px; pointer-events: auto;
  background: var(--card); color: var(--ink-soft); font-size: 11px;
}

/* =====================================================================
   FASE 7 — AUDIO & JUICE: combo pill, tombol suara, ghost button
   ===================================================================== */
.btn-ghost {
  background: transparent; border: 3px solid var(--teal-light);
  color: var(--ink-soft); box-shadow: none;
}
.btn-sm-sound { padding: 8px 16px; font-size: 12px; margin-top: 10px; }

/* =====================================================================
   FASE 7 — KONTEN & LIVEOPS: chip mode, papan rekor, judul menang
   ===================================================================== */
.prep-chip.mode { min-width: 118px; }
.prep-chip .chip-sub {
  display: block; width: 100%;
  font-size: 9px; font-weight: 800; color: var(--ink-soft);
  text-align: center; line-height: 1.2;
}
.prep-chip .chip-sub.lock { color: #c46a4a; }
.lb-card .lb-empty { font-size: 12px; color: var(--ink-soft); margin: 4px 0 2px; }
.lb-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream-2, #f6efe2); border-radius: 12px;
  padding: 7px 12px; font-size: 12px;
}
.lb-row.best { background: #fdf3d8; border: 2px solid #f5c64f; }
.lb-rank { color: #b98a20; min-width: 26px; }
.lb-hero { font-weight: 800; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-wave { font-weight: 900; color: var(--teal, #2f9c8f); }
.lb-time { color: var(--ink-soft); font-size: 11px; min-width: 52px; text-align: right; }
.go-mode-line {
  text-align: center; font-size: 13px; font-weight: 900;
  color: #b98a20; margin-top: -6px; margin-bottom: 8px;
}

/* =====================================================================
   FASE "PERANG SANG TUBUH" — Peta Kampanye, Sinematik, Mission HUD,
   Ability Banner, Coach
   ===================================================================== */

/* ---------- PETA KAMPANYE ---------- */
.campaign-scroll { padding: 14px 16px 96px; }
.camp-intro { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); text-align: center; margin: 4px 0 14px; }
.campaign-path { display: flex; flex-direction: column; align-items: stretch; margin-bottom: 14px; }
.camp-node {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border: 3px solid transparent; border-radius: 18px;
  padding: 10px 14px; box-shadow: var(--shadow-card); cursor: pointer;
}
.camp-node.locked { opacity: 0.55; cursor: default; }
.camp-node.current { border-color: var(--teal, #2f9c8f); animation: camp-pulse 1.6s infinite; }
.camp-node.selected { border-color: var(--coral, #f2825c); }
.camp-node.cleared { border-color: #bfe8d2; }
@keyframes camp-pulse {
  0%, 100% { box-shadow: var(--shadow-card), 0 0 0 0 rgba(47,156,143,0.35); }
  50% { box-shadow: var(--shadow-card), 0 0 0 10px rgba(47,156,143,0); }
}
.camp-ico-wrap { position: relative; width: 52px; height: 52px; flex: 0 0 52px; }
.camp-ico { width: 52px; height: 52px; border-radius: 14px; }
.camp-check {
  position: absolute; right: -6px; top: -6px; width: 20px; height: 20px;
  background: #2f9c8f; color: #fff; border-radius: 50%; font-size: 12px;
  font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.camp-lock { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; }
.camp-here {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -7px;
  background: var(--coral, #f2825c); color: #fff; font-size: 8px; font-weight: 900;
  padding: 1px 6px; border-radius: 8px; letter-spacing: 0.06em;
}
.camp-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.camp-organ { font-size: 14px; }
.camp-title { font-size: 11px; color: var(--teal, #2f9c8f); font-weight: 900; }
.camp-obj { font-size: 10px; color: var(--ink-soft); }
.camp-line { width: 4px; height: 18px; background: #d8cfc0; margin-left: 38px; border-radius: 2px; }
.camp-line.done { background: #2f9c8f; }
.camp-brief { padding: 14px 16px; }
.camp-brief-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.camp-badge { font-size: 9px; font-weight: 900; padding: 2px 8px; border-radius: 8px; }
.camp-badge.done { background: #def3e9; color: #1f7a70; }
.camp-badge.now { background: #ffe9d6; color: #c46a4a; }
.camp-badge.lock { background: #eee6d8; color: #8b8175; }
.camp-story { font-size: 12.5px; line-height: 1.55; color: var(--ink-soft); margin: 8px 0; font-style: italic; }
.camp-brief-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.btn-camp-go { width: 100%; }

/* ---------- SINEMATIK ---------- */
#cinematic-layer {
  position: fixed; inset: 0; z-index: 90; background: #000;
  display: flex; align-items: flex-end; justify-content: center;
}
#cinematic-layer.hidden { display: none; }
#cinematic-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cine-text {
  position: relative; z-index: 2; margin-bottom: 7%;
  max-width: 82%; text-align: center; color: #274; 
  font-size: 15px; font-weight: 800; line-height: 1.5;
  background: rgba(255,252,245,0.92); border: 3px solid #2f9c8f;
  border-radius: 14px; padding: 10px 16px;
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.cine-text.visible { opacity: 1; transform: translateY(0); }
.cine-skip {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  background: rgba(255,252,245,0.9); border: 2px solid #d8cfc0;
  border-radius: 12px; padding: 6px 14px; font-size: 12px; font-weight: 900;
  color: #6b6156; cursor: pointer;
}

/* ---------- MISSION HUD (kampanye) ---------- */
.hud-mission {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%);
  width: 210px; background: rgba(255,252,245,0.94); border: 2.5px solid var(--teal, #2f9c8f);
  border-radius: 14px; padding: 6px 10px 8px; z-index: 5; text-align: center;
}
.hud-mission.hidden { display: none; }
.hud-mission-text { font-size: 11.5px; font-weight: 900; color: #1f5f57; }
.hud-mission-bar { height: 7px; background: #e8dfcf; border-radius: 4px; margin-top: 4px; overflow: hidden; }
#hud-mission-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #2f9c8f, #7fd8c8); border-radius: 4px; transition: width 0.3s; }

/* ---------- ABILITY BANNER ---------- */
.ability-banner {
  position: absolute; top: 26%; left: 50%; z-index: 6;
  transform: translateX(-50%) scale(0.4); opacity: 0;
  font-size: 26px; font-weight: 900; letter-spacing: 0.04em;
  color: #2f9c8f; text-shadow: 0 2px 0 #fff, 0 0 18px rgba(255,255,255,0.8);
  border-bottom: 3px solid currentColor; padding: 0 14px; pointer-events: none;
}
.ability-banner.show { animation: abil-banner 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes abil-banner {
  0% { transform: translateX(-50%) scale(0.4) rotate(-4deg); opacity: 0; }
  18% { transform: translateX(-50%) scale(1.25) rotate(2deg); opacity: 1; }
  30% { transform: translateX(-50%) scale(1); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 0; }
}

/* ---------- COACH ---------- */
#coach-layer { position: fixed; inset: 0; z-index: 80; display: none; }
#coach-layer.active { display: block; }
#coach-spot {
  position: fixed; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 200vmax rgba(35, 30, 22, 0.66);
  border: 3px dashed #ffd93d;
  animation: coach-spot 1.4s infinite;
  transition: top 0.35s, left 0.35s, width 0.35s, height 0.35s;
}
@keyframes coach-spot {
  0%, 100% { border-color: #ffd93d; }
  50% { border-color: #fff3c2; }
}
.coach-tip {
  position: fixed; width: 250px; background: var(--card, #fffdf7);
  border: 3px solid #ffd93d; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(35,30,22,0.35);
  animation: coach-tip-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.coach-tip.above { transform: translateY(calc(-100% - 18px)); }
.coach-tip b { font-size: 13px; color: #b98a20; letter-spacing: 0.04em; }
.coach-tip p { font-size: 12px; color: var(--ink-soft); margin: 6px 0 10px; line-height: 1.5; }
.coach-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coach-skip { background: none; border: none; font-size: 11px; font-weight: 800; color: #a89e90; text-decoration: underline; cursor: pointer; }
.coach-next { font-size: 12px; padding: 8px 14px; }
@keyframes coach-tip-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =====================================================================
   AKUN & FRAKSI — auth screen, chip akun, kartu fraksi
   ===================================================================== */
.auth-topbar { justify-content: center; }
.auth-scroll { padding: 10px 18px 30px; overflow-y: auto; height: 100%; }
.auth-lead { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); text-align: center; line-height: 1.5; margin: 2px 0 14px; }
.auth-tabs { display: flex; background: #efe7d8; border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.auth-tab {
  flex: 1; padding: 9px 0; border-radius: 11px; border: none;
  font-weight: 900; font-size: 13px; color: #8b8175; background: transparent; cursor: pointer;
}
.auth-tab.active { background: var(--teal, #2f9c8f); color: #fff; box-shadow: 0 3px 10px rgba(47,156,143,0.35); }
.auth-card { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 11px; font-weight: 900; color: var(--ink-soft); letter-spacing: 0.04em; margin-top: 6px; }
.auth-input {
  border: 2.5px solid #e0d6c4; border-radius: 12px; padding: 11px 14px;
  font-size: 14px; font-weight: 800; background: #fffdf7; color: var(--ink, #3a342c);
  outline: none; font-family: inherit;
}
.auth-input:focus { border-color: var(--teal, #2f9c8f); }
.auth-error {
  display: none; font-size: 11.5px; font-weight: 800; color: #c0392b;
  background: #fdeae7; border: 2px solid #f5b7ae; border-radius: 10px; padding: 7px 10px;
}
.auth-error.show { display: block; animation: coach-tip-in 0.25s; }
.auth-submit { margin-top: 12px; }
.auth-resume { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.auth-resume-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #e7f6ee; border: 2.5px solid #7fd8c8; border-radius: 12px;
  padding: 10px 14px; cursor: pointer; text-align: left;
}
.auth-resume-btn b { display: block; font-size: 13px; color: #1f5f57; }
.auth-resume-btn small { font-size: 10.5px; color: var(--ink-soft); font-weight: 700; }
.auth-logout {
  background: none; border: none; font-size: 11px; font-weight: 800;
  color: #b0654a; text-decoration: underline; cursor: pointer; padding: 4px 0; text-align: left;
}
/* (UI/UX Task 4: CSS kartu fraksi auth dihapus — elemen sudah tidak ada sejak E1) */

/* Chip akun di topbar dashboard */
.account-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--card, #fffdf7); border: 2.5px solid var(--teal, #2f9c8f);
  border-radius: 999px; padding: 4px 6px 4px 12px; cursor: pointer;
  box-shadow: var(--shadow-card); font-family: inherit;
}
.account-chip.hidden { display: none; }
.account-chip #account-name { font-size: 11.5px; font-weight: 900; color: var(--ink, #3a342c); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =====================================================================
   PHAGOS — tombol PULSE (SATU TOMBOL, bible §2.3). Basis teal; ukuran final
   dioverride rule #screen-hud di bawah + dashboard-focus.css (kaskade).
   ===================================================================== */
.pulse-btn {
  position: absolute; right: 16px; bottom: 64px; z-index: 7;
  pointer-events: auto; /* .screen.passive = none — tombol wajib diopt-in */
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(170deg, #3ec9b5, #1f8f80);
  border: 4px solid #fff; box-shadow: 0 6px 0 #14655c, 0 10px 22px rgba(0,0,0,0.28);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 12px; letter-spacing: 0.04em;
  cursor: pointer; touch-action: none; user-select: none;
  animation: pulse-breath 1.6s ease-in-out infinite;
}
.pulse-btn img { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.2)); }
.pulse-btn:active, .pulse-btn.held {
  transform: scale(0.92); box-shadow: 0 2px 0 #14655c, 0 4px 10px rgba(0,0,0,0.25);
}
@keyframes pulse-breath {
  0%, 100% { box-shadow: 0 6px 0 #14655c, 0 0 0 0 rgba(62,201,181,0.45); }
  50% { box-shadow: 0 6px 0 #14655c, 0 0 0 12px rgba(62,201,181,0); }
}

/* Layer upgrade: badge kategori per baris */
.upg-name-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upg-layer {
  font-size: 8.5px; font-weight: 900; letter-spacing: 0.07em;
  color: #fff; background: var(--teal, #2f9c8f);
  border-radius: 6px; padding: 2px 7px;
}

/* =====================================================================
   FASE 7.8 — XP TERASA: ghost trail, shine, chip siap-naik
   ===================================================================== */
.hud-xp-track { height: 12px; }
.hud-xp-ghost {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  border-radius: var(--pill); background: rgba(255, 236, 160, 0.55);
  transition: width 0.1s linear;
}
.hud-xp-fill {
  background: linear-gradient(90deg, #4adbc0, #f5c64f);
  position: relative; overflow: hidden;
}
.hud-xp-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: xp-shine 1.8s linear infinite;
}
@keyframes xp-shine {
  from { background-position: 120% 0; }
  to { background-position: -80% 0; }
}
.hud-xp-ico {
  position: absolute; left: -7px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(20,88,79,0.4));
}
.hud-level-chip.ready {
  background: #f5c64f; color: #6b4d00;
  animation: chip-ready 0.8s ease-in-out infinite;
}
@keyframes chip-ready {
  0%, 100% { transform: translate(2px, -50%) scale(1); }
  50% { transform: translate(2px, -50%) scale(1.18); }
}

/* =====================================================================
   FASE 8.1 — LAB PASUKAN: tab HERO/PASUKAN/TIM + kartu level hero
   ===================================================================== */
.upg-tabs { display: flex; gap: 6px; padding: 0 18px; margin: 4px 0 10px; }
.upg-tab {
  flex: 1; padding: 9px 0; border-radius: 12px; border: 2.5px solid transparent;
  background: #efe7d8; color: #8b8175; font-weight: 900; font-size: 12px; cursor: pointer;
}
.upg-tab.active { background: #fffdf7; border-color: var(--teal, #2f9c8f); color: #1f5f57; }
.hero-lab-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px; margin: 0 18px 14px; }
.hl-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.hl-count { font-size: 11px; font-weight: 900; color: var(--ink-soft); }
.hl-level { color: #fff; font-size: 12px; font-weight: 900; border-radius: 10px; padding: 3px 12px; }
.hl-level.ally { background: #4aa3e0; }
.hl-sprite { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(35,30,22,0.18)); }
.hl-name { font-size: 18px; }
.hl-title { font-size: 11px; color: var(--ink-soft); font-weight: 800; }
.hl-stats { display: flex; gap: 10px; font-size: 11px; font-weight: 900; color: #1f7a70; background: #e7f6ee; border-radius: 10px; padding: 5px 12px; }
.hl-slider { width: 100%; }
.btn-hl-up { width: 100%; font-size: 14px; padding: 12px; }
.hl-nav { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.hl-owned { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); }
.hl-ally-row { display: flex; gap: 10px; }
.hl-ally { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(35,30,22,0.15)); }
.hl-hint { font-size: 10px; color: var(--ink-soft); text-align: center; line-height: 1.4; }

/* =====================================================================
   FASE 8 — PREMIUM: bundle cards + modal pembayaran (simulasi)
   ===================================================================== */
.premium-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.premium-card {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  background: var(--card, #fffdf7); border: 3px solid var(--pc, #2f9c8f);
  border-radius: 16px; padding: 12px 12px 10px; box-shadow: var(--shadow-card);
}
.prem-badge {
  position: absolute; top: -9px; right: 8px; color: #fff;
  font-size: 8.5px; font-weight: 900; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 8px;
}
.prem-name { font-size: 13.5px; }
.prem-value { font-size: 10px; font-weight: 700; color: var(--ink-soft); line-height: 1.35; flex: 1; }
.btn-prem { font-size: 13px; padding: 9px 0; color: #fff; border: none; border-radius: 12px; cursor: pointer; font-weight: 900; }
.prem-receipts { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; }
.pr-title { font-size: 10px; font-weight: 900; color: var(--ink-soft); }
.pr-row { font-size: 9.5px; color: #a89e90; font-weight: 700; }

.pay-modal {
  position: fixed; inset: 0; z-index: 95; background: rgba(35,30,22,0.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.pay-box {
  width: 100%; max-width: 330px; background: var(--card, #fffdf7);
  border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3); text-align: center;
}
.pay-title { font-size: 18px; }
.pay-note { font-size: 10px; color: #b0654a; font-weight: 800; background: #fdf3ee; border-radius: 8px; padding: 5px 8px; }
.pay-summary { display: flex; flex-direction: column; gap: 2px; background: #f6efe2; border-radius: 12px; padding: 10px; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }
.pay-price { font-size: 20px; color: #1f5f57; }
.pay-methods { display: flex; gap: 8px; }
.pay-method {
  flex: 1; padding: 10px 0; border-radius: 12px; border: 2.5px solid #e0d6c4;
  background: #fff; font-weight: 900; font-size: 12px; color: #8b8175; cursor: pointer;
}
.pay-method.selected { border-color: var(--teal, #2f9c8f); color: #1f5f57; background: #e7f6ee; }
.pay-cancel { background: none; border: none; font-size: 11px; font-weight: 800; color: #a89e90; text-decoration: underline; cursor: pointer; }
.pay-ok-ico { width: 52px; height: 52px; object-fit: contain; margin: 0 auto; }
.pay-granted { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pg-item { font-size: 11px; font-weight: 900; color: #1f7a70; background: #e7f6ee; border-radius: 8px; padding: 4px 10px; }
.pay-receipt { font-size: 9.5px; color: #a89e90; font-weight: 700; }

/* =====================================================================
   FASE 8.1 — badge level terhubung: panggung dashboard, roster chip
   ===================================================================== */
.stage-badge.lvl {
  cursor: pointer; background: #fffdf7; color: #1f5f57;
  border: 2.5px solid var(--teal, #2f9c8f); top: 10px; left: 10px; right: auto;
  font-size: 10.5px;
}
.stage-badge.lvl:active { transform: scale(0.96); }
.hero-lvl-chip {
  background: #1f7a70; color: #fff; font-size: 9px; font-weight: 900;
  border-radius: 8px; padding: 1px 7px; margin-left: 6px;
}
.ph-stage { font-variant-numeric: tabular-nums; }

/* Chip level in-run (terhubung Lab) */
.hud-lvls { position: absolute; left: 14px; top: 74px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.hud-lvl-chip {
  width: fit-content; font-size: 9.5px; font-weight: 900; letter-spacing: 0.03em;
  padding: 3px 10px; border-radius: var(--pill); background: rgba(255,253,244,0.92);
  color: #1f5f57; border: 2px solid var(--teal, #2f9c8f); box-shadow: 0 2px 6px rgba(20,88,79,0.18);
}
.hud-lvl-chip.ally { border-color: #4aa3e0; color: #16558f; }

/* Tombol HUD interaktif: .screen.passive menonaktifkan pointer — opt-in eksplisit */
#screen-hud .ability-btn { pointer-events: auto; }
#screen-hud #btn-pause { pointer-events: auto; }

/* Detail hero (menu Heroes → klik kartu) */
.hero-detail-body { padding: 10px 18px 24px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; height: 100%; }
.btn-hl-lab { background: #fffdf7; color: #1f5f57; border: 2.5px solid var(--teal, #2f9c8f); font-size: 12px; padding: 11px; }

/* Character Agent: jalur equity terlihat di detail hero, bukan cuma di arena. */
.hl-equity-card{align-items:stretch;border:2.5px solid rgba(53,208,186,.35);background:linear-gradient(180deg,rgba(53,208,186,.13),#fffdf7 44%);gap:10px}
.hl-equity-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;width:100%}
.hl-equity-titlewrap{display:flex;flex-direction:column;gap:2px;min-width:0}
.hl-equity-title{font-size:14px;color:#123f3a;letter-spacing:.02em}
.hl-equity-sub{font-size:10.5px;line-height:1.35;color:#5b7d74;font-weight:800}
.hl-equity-current{flex:0 0 auto;border-radius:999px;background:linear-gradient(180deg,#fff1b8,#f5c64f);color:#6a4b00;font-size:9.5px;font-weight:900;padding:4px 9px;border:1.5px solid rgba(185,138,32,.3);max-width:118px;text-align:center}
.hl-equity-ladder{display:grid;grid-template-columns:1fr;gap:7px;width:100%}
.hl-equity-step{display:grid;grid-template-columns:30px 12px 56px 1fr;align-items:center;gap:7px;padding:7px 9px;border-radius:14px;background:#f6efe2;border:1.8px solid #e3dcc6;position:relative;overflow:hidden}
.hl-equity-step.done,.hl-equity-step.active{background:linear-gradient(90deg,rgba(255,253,247,.96),rgba(53,208,186,.1));border-color:color-mix(in srgb,var(--eq) 65%,#fff 35%)}
.hl-equity-step.locked{opacity:.72;filter:saturate(.68)}
.hl-equity-step.active{box-shadow:0 0 0 2px rgba(255,253,247,.95),0 0 0 4px color-mix(in srgb,var(--eq) 45%,transparent);transform:translateX(1px)}
.hl-equity-node{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--eq);color:#123f3a;font-size:12px;font-weight:900;border:2px solid rgba(255,253,247,.9);box-shadow:0 2px 6px rgba(35,30,22,.18)}
.hl-equity-step.active .hl-equity-node{color:#fffdf4;text-shadow:0 1px 2px rgba(0,0,0,.35)}
.hl-equity-line{width:8px;height:2px;border-radius:999px;background:var(--eq);opacity:.7}
.character-preview{display:block;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(35,30,22,.16))}
.hl-equity-preview{width:54px;height:54px;border-radius:16px;background:#fffdf7;border:1.5px solid color-mix(in srgb,var(--eq) 62%,#fff 38%)}
.hl-equity-copy{display:flex;flex-direction:column;gap:1px;min-width:0}
.hl-equity-copy b{font-size:11.5px;color:#123f3a}
.hl-equity-copy small{font-size:9.5px;color:#2f7d73;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hl-equity-copy em{font-size:9.5px;line-height:1.25;color:#6f7f79;font-style:normal;font-weight:700}

/* ==== Fase 8.4: chip buff tempur di HUD (dokumen entitas) ==== */
.hud-buffs{position:absolute;top:124px;left:0;right:0;display:flex;justify-content:center;gap:6px;pointer-events:none;z-index:6}
.hud-buff-chip{display:inline-flex;align-items:center;gap:4px;background:rgba(18,42,40,.82);color:#fff8ea;border:2px solid #35d0ba;border-radius:999px;padding:2px 9px 2px 3px;font-size:11px;font-weight:800;letter-spacing:.02em;box-shadow:0 2px 6px rgba(20,40,38,.25)}
.hud-buff-chip img{width:18px;height:18px;border-radius:50%;background:#fff8ea}

/* ==== i18n: pil toggle bahasa ==== */
.lang-pill{border:2px solid #35d0ba;background:#fff8ea;color:#0f4c46;border-radius:999px;font-weight:800;font-size:12px;padding:5px 11px;cursor:pointer;font-family:inherit}
.lang-pill:active{transform:scale(.96)}
.lang-pill-pause{align-self:center;margin-top:6px}

/* ==== Fase 11: Kodex Sel (Bio-Pedia) ==== */
.codex-progress{font-size:12px;font-weight:800;color:#0f4c46;background:#dff3ec;border:2px solid #35d0ba;border-radius:999px;padding:4px 10px;white-space:nowrap}
.codex-body{padding:10px 14px 90px;overflow-y:auto}
.codex-cat{font-weight:900;letter-spacing:.06em;font-size:12px;color:#3f6b62;margin:14px 2px 8px;text-transform:uppercase}
.codex-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.codex-card{display:flex;flex-direction:column;align-items:center;gap:6px;background:#fff8ea;border:2px solid #e8dfc8;border-radius:18px;padding:12px 6px 10px;cursor:pointer;font-family:inherit;min-height:108px;justify-content:center}
.codex-card.seen{border-color:#35d0ba;box-shadow:0 3px 10px rgba(53,208,186,.16)}
.codex-card.seen:active{transform:scale(.96)}
.codex-img{width:52px;height:52px;object-fit:contain}
.codex-q{font-size:30px;font-weight:900;color:#b9c7bd;line-height:1;filter:grayscale(1)}
.codex-name{font-size:11px;font-weight:800;color:#2f5a52;text-align:center;line-height:1.2}
.codex-card:not(.seen) .codex-name{color:#a8b5ab}
.codex-detail{position:absolute;inset:0;background:rgba(15,42,40,.55);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:18px;z-index:30}
.codex-detail.hidden{display:none}
.codex-detail-box{background:#fff8ea;border-radius:22px;padding:18px;width:100%;max-height:70%;overflow-y:auto;border:3px solid #35d0ba;margin-bottom:10px}
.cxd-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.cxd-img{width:64px;height:64px;object-fit:contain}
.cxd-titlewrap{display:flex;flex-direction:column}
.cxd-name{font-size:18px;color:#123f3a}
.cxd-real{font-size:11px;font-style:italic;color:#7d938c}
.cxd-kicker{font-size:11px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#35d0ba;margin-top:8px}
.cxd-kid{font-size:14px;font-weight:600;color:#2f5a52;margin:4px 0 0}
.cxd-fact{font-size:13px;color:#41625b;margin:4px 0 0}
.codex-design-tag{font-size:8px;font-weight:900;letter-spacing:.08em;color:#0f5f56;background:#dff3ec;border:1px solid rgba(53,208,186,.55);border-radius:999px;padding:2px 7px;margin-top:1px}
.cxd-mutation-panel{margin-top:6px;background:linear-gradient(180deg,#f5fff9,#fff6e5);border:2px solid rgba(53,208,186,.35);border-radius:16px;padding:11px;display:flex;flex-direction:column;gap:8px}
.cxd-family-head{display:flex;flex-direction:column;gap:2px}
.cxd-family-head b{font-size:13px;color:#123f3a}
.cxd-family-head span{font-size:11px;line-height:1.35;color:#4f7068;font-weight:800}
.cxd-mutation-focus{margin:0;font-size:11px;line-height:1.45;color:#87513f;background:rgba(255,233,215,.72);border-radius:11px;padding:7px 9px;font-weight:800}
.cxd-tier-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.cxd-tier-chip{min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:13px;background:#fffdf7;border:1.8px solid color-mix(in srgb,var(--tier) 62%,#fff 38%);padding:7px 5px;box-shadow:0 2px 5px rgba(35,30,22,.06)}
.cxd-tier-chip .cxd-preview{width:44px;height:44px;border-radius:14px;border:1.3px solid color-mix(in srgb,var(--tier) 58%,#fff 42%);background:#fffdf7;margin-bottom:1px}
.cxd-tier-chip .cxd-tier-no{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--tier);color:#fffdf4;font-size:11px;font-weight:900;box-shadow:0 1px 4px rgba(35,30,22,.18)}
.cxd-tier-chip b{font-size:8.5px;color:#123f3a;text-align:center;line-height:1.1;text-transform:uppercase}
.cxd-tier-chip small{font-size:8px;color:#7b8c86;font-weight:900;text-align:center;line-height:1.1}
.cxd-tier-chip em{font-size:8.5px;line-height:1.2;color:#4e625d;font-style:normal;text-align:center;font-weight:700;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.cxd-equity-panel{background:linear-gradient(180deg,#f8fff9,#fff8e8);border-color:rgba(245,198,79,.38)}
.cxd-equity-chip .cxd-tier-no{color:#123f3a;text-shadow:0 1px 0 rgba(255,255,255,.55)}
@media (max-width:390px){.cxd-tier-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hl-equity-head{flex-direction:column}.hl-equity-current{max-width:none}}

/* Fase 12: chip skill hero di ringkasan prep */
.ps-abilities{display:flex;gap:5px;align-items:center}
.ps-skill-dot{width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,253,244,.85);box-shadow:0 1px 3px rgba(0,0,0,.25)}
.ps-skill-dot.ult{width:20px;height:20px;border-color:#f5c64f}
/* Fase 12 v2: ikon skill + keyframes rounded (yang lama memaksa radius 50%) */
@keyframes hudSkillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,198,79,.55); }
  50% { box-shadow: 0 0 0 7px rgba(245,198,79,0); }
}
#screen-hud .ability-btn.ready{animation:hudSkillPulse 1.6s ease-in-out infinite}
#screen-hud .ability-btn .sk-ico{width:26px;height:26px;object-fit:contain;z-index:2;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}
#screen-hud .ability-btn.ult .sk-ico{width:30px;height:30px}
#screen-hud .ability-btn .sk-name{bottom:4px}

/* =====================================================================
   FASE 12c — HUD MLBB PALET TERANG (glass putih-biru langit + aksen emas)
   ===================================================================== */
#screen-hud .glass{background:linear-gradient(170deg,rgba(255,255,255,.86),rgba(224,244,240,.82));border:1.5px solid rgba(255,255,255,.95);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-radius:14px;box-shadow:0 3px 10px rgba(31,95,87,.16)}
#screen-hud .hud-top{position:absolute;top:8px;left:8px;right:8px;display:flex;justify-content:space-between;align-items:flex-start;gap:8px;z-index:5;pointer-events:none}
#screen-hud .hud-stat-left,#screen-hud .hud-stat-right{display:flex;align-items:center;gap:8px;padding:6px 10px}
#screen-hud .hud-stat-right{pointer-events:auto}
#screen-hud .hud-center{display:flex;flex-direction:column;align-items:center;gap:2px;padding:5px 16px;min-width:132px}
#screen-hud .hud-center .wave-pill{background:linear-gradient(180deg,#2fb3a2,#1f7a70);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:900;letter-spacing:.08em;font-size:14px}
#screen-hud .hud-center .timer-chip{background:none;border:none;gap:4px;color:#16554e;font-weight:800}
#screen-hud .hud-kills{display:flex;align-items:center;gap:4px;font-weight:900;color:#e05563;font-size:14px}
#screen-hud .hud-kills img{width:15px;height:15px}
#screen-hud .hud-currency-run{display:flex;align-items:center;gap:4px;font-weight:900;color:#c99013;font-size:14px}
#screen-hud .hud-currency-run img{width:15px;height:15px}
#screen-hud .btn-pause{background:linear-gradient(180deg,#2fb3a2,#1f7a70);border:none;width:clamp(40px,9.5vh,48px);height:clamp(40px,9.5vh,48px);min-height:clamp(40px,9.5vh,48px);border-radius:13px;box-shadow:0 3px 8px rgba(31,122,112,.3);flex:0 0 auto}
#screen-hud .btn-pause img{filter:none}
#screen-hud .hud-minimap{top:96px;right:12px;border-color:#fff;width:84px;height:84px;background:rgba(20,88,79,.5)}
#screen-hud .hud-buffs{top:84px}
#screen-hud .hud-lvls{flex-direction:column;gap:3px;align-items:flex-start}
#screen-hud .hud-lvl-chip{background:rgba(255,255,255,.92);border:1.5px solid #35d0ba;font-size:9px;padding:2px 8px;color:#16554e;box-shadow:0 1px 4px rgba(31,95,87,.14)}
#screen-hud .hud-lvl-chip.ally{border-color:#4aa3e0;color:#16558f}

/* BOTTOM LEFT — panel status hero (putih bersih + emas avatar) */
#screen-hud .hud-hero-status{position:absolute;left:10px;bottom:12px;display:flex;align-items:center;gap:10px;padding:8px 14px 8px 8px;z-index:6;pointer-events:none}
#screen-hud .avatar-wrap{position:relative;width:56px;height:56px;flex:0 0 56px}
#screen-hud .hud-portrait{width:56px;height:56px;border-radius:50%;border:3px solid #fff;background:#eaf6f2;box-shadow:0 0 0 2.5px #f0c04f,0 3px 8px rgba(31,95,87,.22);object-fit:cover}
#screen-hud .level-badge{position:absolute;bottom:-5px;right:-9px;background:linear-gradient(180deg,#ffdf7e,#f0b428);color:#5a3d00;font-size:9px;font-weight:900;padding:2px 7px;border-radius:10px;border:1.5px solid #fff;white-space:nowrap;box-shadow:0 1px 4px rgba(160,110,20,.4)}
#screen-hud .hud-equity-stage{position:absolute;left:50%;top:-9px;transform:translateX(-50%);max-width:78px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(180deg,#fffdf7,color-mix(in srgb,var(--eq,#35d0ba) 24%,#fffdf7));border:1.5px solid color-mix(in srgb,var(--eq,#35d0ba) 70%,#fff 30%);color:#123f3a;border-radius:999px;padding:1px 7px;font-size:7.8px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;box-shadow:0 2px 6px rgba(35,30,22,.16)}
#screen-hud .status-bars{width:168px;display:flex;flex-direction:column;gap:5px}
#screen-hud .hp-row{display:flex;align-items:center;gap:6px}
#screen-hud .hp-row .heart{width:14px;height:14px}
#screen-hud .hud-hp-track{flex:1;height:14px;background:rgba(12,60,54,.16);border:1px solid rgba(12,60,54,.22);border-radius:8px;overflow:hidden}
#screen-hud .hud-hp-fill{height:100%;width:100%;background:linear-gradient(180deg,#4ede9a,#26b568);border-radius:8px;box-shadow:inset 0 -2px 0 rgba(0,0,0,.12);transition:width .18s ease}
#screen-hud .hp-pill.low .hud-hp-fill{background:linear-gradient(180deg,#ff8496,#e14a5e)}
#screen-hud .hud-hp-text{font-size:10px;font-weight:900;color:#123f38;min-width:46px;text-align:right}
#screen-hud .xp-row{display:flex;align-items:center;gap:6px}
#screen-hud .hud-xp-track{flex:1;height:7px;background:rgba(12,60,54,.14);border:1px solid rgba(12,60,54,.2);border-radius:5px;overflow:hidden;position:static}
#screen-hud .hud-xp-fill{height:100%;width:0%;background:linear-gradient(90deg,#58c7f3,#2e86d6);border-radius:5px}
#screen-hud .hud-xp-ghost{background:rgba(46,134,214,.35)}
#screen-hud .hud-xp-ico{width:12px;height:12px}

/* BOTTOM RIGHT — grid skill 2x2 + SERANG (terang, ikon jelas) */
#screen-hud .hud-controls{position:absolute;right:10px;bottom:12px;display:flex;align-items:flex-end;gap:10px;z-index:6}
#screen-hud .ability-bar{position:static;display:grid;grid-template-columns:repeat(2,62px);gap:8px;background:none;border:none;box-shadow:none;padding:0;bottom:auto;right:auto}
#screen-hud .ability-btn{pointer-events:auto;position:relative;width:62px;height:62px;border-radius:18px;border:2.5px solid var(--sk,#35d0ba);background:linear-gradient(170deg,#ffffff,#d9f2ec);display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer;transition:transform .08s ease;padding:0;box-shadow:0 3px 8px rgba(31,95,87,.18)}
#screen-hud .ability-btn.character-skill{border-color:color-mix(in srgb,var(--sk,#35d0ba) 58%,var(--eq,#35d0ba) 42%);background:radial-gradient(circle at 78% 18%,color-mix(in srgb,var(--eq,#35d0ba) 28%,transparent) 0 18px,transparent 20px),linear-gradient(170deg,#ffffff,color-mix(in srgb,var(--hero,#35d0ba) 16%,#d9f2ec))}
#screen-hud .ability-btn .sk-bio-accent{position:absolute;inset:6px;border-radius:15px;opacity:.28;z-index:1;pointer-events:none;background:repeating-conic-gradient(from 20deg,color-mix(in srgb,var(--eq,#35d0ba) 80%,#fff 20%) 0 8deg,transparent 8deg 30deg)}
#screen-hud .ability-btn[data-archetype="antibody"] .sk-bio-accent{background:linear-gradient(60deg,transparent 38%,var(--eq,#35d0ba) 39% 43%,transparent 44%),linear-gradient(-60deg,transparent 38%,var(--eq,#35d0ba) 39% 43%,transparent 44%),linear-gradient(0deg,transparent 45%,var(--eq,#35d0ba) 46% 51%,transparent 52%)}
#screen-hud .ability-btn[data-archetype="dendritic"] .sk-bio-accent,#screen-hud .ability-btn[data-archetype="net"] .sk-bio-accent{background:repeating-linear-gradient(35deg,transparent 0 7px,color-mix(in srgb,var(--eq,#35d0ba) 85%,#fff 15%) 8px 10px),repeating-linear-gradient(-35deg,transparent 0 8px,color-mix(in srgb,var(--hero,#35d0ba) 70%,#fff 30%) 9px 10px)}
#screen-hud .ability-btn[data-archetype="phagocyte"] .sk-bio-accent{border:4px solid var(--eq,#35d0ba);border-left-color:transparent;background:transparent;border-radius:50%}
#screen-hud .ability-btn[data-archetype="nk_spike"] .sk-bio-accent,#screen-hud .ability-btn[data-archetype="cytotoxic"] .sk-bio-accent,#screen-hud .ability-btn[data-archetype="granule_lance"] .sk-bio-accent{background:conic-gradient(from 12deg,var(--eq,#35d0ba) 0 8deg,transparent 8deg 28deg);border:1px solid color-mix(in srgb,var(--eq,#35d0ba) 55%,transparent)}
#screen-hud .ability-btn:active{transform:scale(.92)}
#screen-hud .ability-btn.ready{box-shadow:0 0 0 2px rgba(53,208,186,.35),0 3px 10px rgba(31,95,87,.22)}
#screen-hud .ability-btn .sk-name{position:absolute;bottom:3px;left:0;right:0;text-align:center;font-size:7.5px;font-weight:900;letter-spacing:.02em;color:#123f38;text-transform:uppercase;z-index:2;padding:0 2px}
#screen-hud .ability-btn .cd-fill{position:absolute;inset:0;height:auto;background:transparent;z-index:1;border-radius:inherit}
#screen-hud .ability-btn .cd-num{position:absolute;inset:0;display:grid;place-items:center;font-size:21px;font-weight:900;color:#0d3833;text-shadow:0 1px 0 rgba(255,255,255,.8);z-index:3}
#screen-hud .ability-btn .key-tag{position:absolute;top:3px;left:5px;font-size:8px;font-weight:900;color:#fff;background:var(--sk,#35d0ba);border-radius:6px;padding:0 4px;z-index:3}
#screen-hud .ability-btn.ult{grid-column:span 2;width:100%;height:50px;border-color:#f0b428}
#screen-hud .ability-btn.ult .sk-name{font-size:10px;bottom:5px}
#screen-hud .ability-btn .sk-ico{width:28px;height:28px;object-fit:contain;z-index:2}
#screen-hud .ability-btn.ult .sk-ico{width:32px;height:32px}
#screen-hud .pulse-btn{position:static;width:90px;height:90px;min-height:90px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:linear-gradient(170deg,#3ec9b5,#1f8f80);border:3.5px solid #fff;color:#fff;font-weight:900;font-size:12px;letter-spacing:.05em;box-shadow:0 5px 14px rgba(26,140,125,.42),inset 0 -4px 0 rgba(0,0,0,.12);cursor:pointer;pointer-events:auto;transition:transform .08s ease}
#screen-hud .pulse-btn:active{transform:scale(.93)}
#screen-hud .pulse-btn img{width:27px;height:27px;filter:brightness(0) invert(1)}
#screen-hud .ability-btn.ready{animation:hudSkillPulse 1.6s ease-in-out infinite}
@media (max-width:390px){
  #screen-hud .ability-btn{width:56px;height:56px}
  #screen-hud .ability-bar{grid-template-columns:repeat(2,56px)}
  #screen-hud .pulse-btn{width:80px;height:80px;min-height:80px}
  #screen-hud .status-bars{width:150px}
  #screen-hud .hud-minimap{width:72px;height:72px}
}

/* =====================================================================
   FASE 12c — DETAIL HERO: layout ala referensi (panggung karakter + chips)
   ===================================================================== */
/* Fase 16: banner nama + panah ganti hero ala kartu hero MLBB */
.hl-banner{display:flex;align-items:center;gap:9px;justify-content:center;width:100%;padding:7px 10px;border-radius:14px;background:linear-gradient(180deg,rgba(53,179,160,.16),rgba(53,179,160,.05));border:2px solid rgba(53,179,160,.35)}
.hl-banner-role{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;color:#fffdf4;font-weight:900;font-size:11px;letter-spacing:.04em;box-shadow:0 3px 7px rgba(35,30,22,.25);flex:0 0 auto}
.hl-banner-name{font-size:19px;font-weight:900;color:var(--ink);letter-spacing:.02em}
.hl-banner-tier{margin-left:auto;font-size:10px;font-weight:900;color:#fffdf4;padding:4px 10px;border-radius:10px;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 2px 5px rgba(35,30,22,.22)}
.hl-arrow{width:40px;height:56px;border:none;border-radius:13px;background:rgba(255,253,244,.9);color:var(--teal-deep);font-size:19px;font-weight:900;cursor:pointer;box-shadow:var(--shadow-card);flex:0 0 auto;transition:transform .12s}
.hl-arrow:active{transform:scale(.92)}
.hl-hero-panel .hl-stage{display:flex;align-items:center;justify-content:center;gap:18px;width:100%}
.hl-hero-panel .hl-sprite{width:128px;height:128px;filter:drop-shadow(0 10px 16px rgba(35,30,22,.22))}
.hl-skill-col{display:flex;flex-direction:column;gap:8px}
.hl-skill{display:flex;align-items:center;gap:6px;background:#fffdf7;border:2px solid #e3dcc6;border-radius:12px;padding:5px 9px;box-shadow:0 2px 5px rgba(35,30,22,.08)}
.hl-skill.ult{border-color:#f0b428;background:linear-gradient(170deg,#fff8e2,#ffedb3)}
.hl-skill-key{font-size:9px;font-weight:900;color:#8a7f5f;min-width:20px}
.hl-skill.ult .hl-skill-key{color:#a97a10}
.hl-skill-dot{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.9);box-shadow:0 1px 3px rgba(0,0,0,.2)}
.hl-chips{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.hl-chip{display:flex;align-items:center;gap:5px;border-radius:12px;padding:5px 12px;font-weight:900;font-size:12px}
.hl-chip img{width:14px;height:14px}
.hl-chip.atk{background:#ffe9ec;color:#b3323f;border:1.5px solid #ffc9d1}
.hl-chip.atk img{filter:hue-rotate(-20deg) saturate(2)}
.hl-chip.hp{background:#e3f8ec;color:#1d7a4d;border:1.5px solid #c2ecd6}
.hl-chip.spd{background:#e7f3ff;color:#1a5b9e;border:1.5px solid #c5e0fa}
.hl-chip i{font-style:normal;font-weight:800;font-size:10px;color:inherit;opacity:.72}
.hl-ally-cell{display:flex;flex-direction:column;align-items:center;gap:3px}
.hl-ally-tag{font-size:9px;font-weight:900;color:#16558f;background:#e7f3ff;border-radius:8px;padding:1px 8px;border:1px solid #c5e0fa}
.hl-ally-cell .hl-ally{width:58px;height:58px;background:#eef7fb;border-radius:50%;border:2px solid #d8ecf7;padding:6px}

/* =========================================================
   FASE 13 — DASHBOARD ALA MLBB (layout referensi pemilik)
   Sidebar kiri + banner carousel + quick menu + baris PLAY
   (kartu bab besar + kolom mode) + grid duo. Palet pastel.
   ========================================================= */

/* --- Kerangka: sidebar + konten --- */
.dash-body {
  width: 100%; max-width: 560px; flex: 1; min-height: 0;
  display: flex; gap: 10px;
}
.side-nav {
  flex: 0 0 62px; display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border-radius: 20px; padding: 8px 6px;
  box-shadow: var(--shadow-card); align-self: flex-start;
  position: sticky; top: 0;
}
.side-btn {
  appearance: none; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: 14px; font-family: var(--font);
  transition: background 0.15s ease, transform 0.08s ease;
}
.side-btn img { width: 24px; height: 24px; object-fit: contain; opacity: 0.75; }
.side-btn span { font-size: 8.5px; font-weight: 900; color: var(--ink-soft); letter-spacing: 0.02em; }
.side-btn:active { transform: scale(0.94); }
.side-btn.active { background: var(--teal); box-shadow: 0 4px 10px rgba(31, 122, 112, 0.35); }
.side-btn.active img { filter: brightness(0) invert(1); opacity: 1; }
.side-btn.active span { color: #fff; }

.dash-scroll { flex: 1; min-width: 0; max-width: none; display: flex; flex-direction: column; gap: 10px; }

/* --- Topbar: identitas pemain (avatar + nama) --- */
.account-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: none; border-radius: var(--pill);
  padding: 4px 12px 4px 5px; cursor: pointer; box-shadow: var(--shadow-card);
  font-family: var(--font);
}
.dash-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: var(--mint); border: 2px solid var(--teal-light);
}
.acct-id { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.acct-id b { font-size: 11.5px; color: var(--ink); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-id small { font-size: 9px; color: var(--ink-soft); font-weight: 800; }

/* --- Banner carousel --- */
.banner-carousel {
  position: relative; height: 285px; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-card);
  flex: 0 0 auto; /* jangan menyusut di flex-column yang scroll (isi slide absolut) */
}
.banner-track, .banner-slide { position: absolute; inset: 0; }
.banner-slide { opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }
.banner-slide.on { opacity: 1; pointer-events: auto; }
.banner-slide .hero-stage { height: 100%; min-height: 0; border-radius: 0; }
.banner-slide:nth-child(2) {
  background:
    radial-gradient(circle at 85% 20%, rgba(169, 215, 149, 0.5) 0 44px, transparent 45px),
    radial-gradient(circle at 12% 72%, rgba(191, 227, 216, 0.7) 0 40px, transparent 41px),
    linear-gradient(160deg, #eaf4dd, #cfe9df);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 16px;
}
.banner-slide.bn-danger {
  background:
    radial-gradient(circle at 82% 24%, rgba(242, 130, 92, 0.35) 0 46px, transparent 47px),
    radial-gradient(circle at 14% 70%, rgba(248, 178, 154, 0.45) 0 34px, transparent 35px),
    linear-gradient(160deg, #fdeadd, #f9d7c4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 16px;
}
.bn-organ { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(31, 74, 66, 0.25)); animation: bob 3.4s ease-in-out infinite; }
.bn-tag { font-size: 9.5px; font-weight: 900; letter-spacing: 0.14em; color: var(--teal-deep); background: rgba(255, 253, 244, 0.8); border-radius: var(--pill); padding: 3px 10px; }
.bn-danger .bn-tag { color: #b3542f; }
.bn-title { font-size: 21px; font-weight: 900; color: var(--teal-dark); }
.bn-danger .bn-title { color: #7c3a1d; }
.bn-sub { font-size: 11px; font-weight: 700; color: var(--ink-soft); max-width: 250px; }
.bn-cta { margin-top: 5px; min-width: 150px; }
.banner-dots {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 3;
}
.b-dot {
  width: 7px; height: 7px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(18, 63, 58, 0.25); padding: 0;
}
.b-dot.on { background: var(--gold-deep); width: 16px; border-radius: 6px; }

/* --- Quick menu 5 tile --- */
.quick-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.quick-tile {
  position: relative; appearance: none; border: none; cursor: pointer; font-family: var(--font);
  background: var(--card); border-radius: 17px; padding: 9px 3px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--shadow-card); transition: transform 0.08s ease;
}
.quick-tile:active { transform: scale(0.93); }
.quick-tile img { width: 27px; height: 27px; object-fit: contain; }
.qt-label { font-size: 8.6px; font-weight: 900; color: var(--ink); text-align: center; line-height: 1.05; }
.qt-badge {
  position: absolute; top: -4px; right: -2px; min-width: 16px; height: 16px;
  background: var(--coral); color: #fff; border-radius: 9px; font-size: 9px;
  font-weight: 900; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--cream); padding: 0 3px;
}

/* =========================================================
   FASE 21 — GAMEPLAY-FIRST: TITLE SCREEN, LEVEL-UP SCENE,
   DASHBOARD BERTAHAP (GATE), DOCK RAMPING, HALAMAN FULL-BLEED
   Feedback pemilik: 90% game indie menyambut pemain dengan GAMEPLAY
   langsung (cerita → main), bukan dashboard. Menu muncul bertahap.
   ========================================================= */

/* --- Layar judul --- */
#screen-title.active {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(169, 215, 149, 0.5) 0 120px, transparent 121px),
    radial-gradient(circle at 82% 80%, rgba(63, 217, 194, 0.35) 0 140px, transparent 141px),
    linear-gradient(165deg, #f2f8e8, #bfeae2);
  overflow: hidden;
}
.title-bg { position: absolute; inset: 0; pointer-events: none; }
.title-blob {
  position: absolute; border-radius: 50%; opacity: 0.5; filter: blur(2px);
  animation: blob-float 9s ease-in-out infinite;
}
.tb1 { width: 190px; height: 190px; left: -50px; top: -60px; background: rgba(255, 217, 61, 0.4); }
.tb2 { width: 150px; height: 150px; right: -40px; bottom: -50px; background: rgba(63, 217, 194, 0.45); animation-delay: 1.6s; }
.tb3 { width: 90px; height: 90px; right: 18%; top: 12%; background: rgba(242, 130, 92, 0.35); animation-delay: 3.1s; }
@keyframes blob-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-16px) scale(1.06); } }
.title-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 26px 34px; border-radius: 30px;
  background: rgba(255, 253, 247, 0.82); box-shadow: var(--shadow-pop);
  backdrop-filter: blur(4px); animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.title-logo { text-align: center; }
.title-star { font-size: 40px; color: var(--teal); filter: drop-shadow(0 4px 6px rgba(31, 74, 66, 0.3)); animation: blob-float 5s ease-in-out infinite; display: block; }
.title-logo h1 {
  font-size: clamp(34px, 9vh, 52px); font-weight: 900; letter-spacing: 0.06em;
  color: var(--teal-dark); margin: 2px 0 0;
  text-shadow: 0 3px 0 #fff, 0 6px 12px rgba(31, 74, 66, 0.25);
}
.title-tag { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin: 4px 0 0; }
.title-start { min-width: 230px; font-size: 19px; animation: title-pulse 2.2s ease-in-out infinite; }
@keyframes title-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.title-login { min-width: 200px; font-size: 12px; }
.title-lang { position: absolute; right: 14px; bottom: -20px; }

/* --- LEVEL-UP jadi SCENE (bukan modal tiba-tiba) --- */
#screen-levelup .lu-scene {
  position: relative; width: min(94vw, 560px); height: calc(100dvh - 16px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 14px 18px;
  border-radius: 26px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 217, 61, 0.28) 0 120px, transparent 160px),
    linear-gradient(170deg, rgba(242, 248, 232, 0.96), rgba(191, 234, 226, 0.96));
  box-shadow: var(--shadow-pop);
}
#screen-levelup .lu-scene.anim .lu-hero { animation: lu-hero-in 0.6s cubic-bezier(0.2, 1.5, 0.4, 1); }
#screen-levelup .lu-scene.anim .levelup-title { animation: lu-title-in 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.12s backwards; }
#screen-levelup .lu-scene.anim .choice-card { animation: lu-card-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; } /* forwards: kartu tetap tampil setelah animasi (dasar opacity:0) */
#screen-levelup .lu-scene.anim .choice-card:nth-child(1) { animation-delay: 0.28s; }
#screen-levelup .lu-scene.anim .choice-card:nth-child(2) { animation-delay: 0.4s; }
#screen-levelup .lu-scene.anim .choice-card:nth-child(3) { animation-delay: 0.52s; }
.lu-glow {
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, rgba(255, 217, 61, 0.16), transparent 25%, rgba(63, 217, 194, 0.16) 50%, transparent 75%, rgba(255, 217, 61, 0.16));
  animation: lu-spin 14s linear infinite; pointer-events: none;
}
@keyframes lu-spin { to { transform: rotate(360deg); } }
.lu-hero {
  width: clamp(90px, 24vh, 140px); height: auto; z-index: 1;
  filter: drop-shadow(0 10px 16px rgba(31, 74, 66, 0.35));
}
@keyframes lu-hero-in { 0% { transform: scale(0.3) translateY(40px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes lu-title-in { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes lu-card-in { 0% { transform: translateY(30px) scale(0.85); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
#screen-levelup .levelup-title { z-index: 1; margin: 0; }
#screen-levelup .levelup-sub { z-index: 1; margin: 0; }
#screen-levelup .choice-grid { z-index: 1; max-height: 44vh; }

/* F23: Pengaturan di Profil (suara & reset) — pola umum: settings tinggal di profil */
.profile-settings {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-lg);
  background: rgba(255, 253, 244, 0.6); box-shadow: var(--shadow-card);
}
.profile-settings-title { font-size: 12px; font-weight: 900; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.profile-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.profile-setting-row .ps-label { font-size: 13px; font-weight: 800; color: var(--ink); }
.profile-setting-row .btn { min-width: 84px; min-height: 34px; font-size: 12px; }
.profile-reset { align-self: flex-end; min-height: 34px; font-size: 12px; }

/* --- Gerbang menu bertahap (F21) --- */
.gate-lock {
  position: absolute; top: -6px; right: -4px; z-index: 3;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(42, 31, 20, 0.78); color: #ffe9ad;
  font-size: 8.4px; font-weight: 900; text-align: center; letter-spacing: 0.03em;
  box-shadow: 0 2px 6px rgba(42, 31, 20, 0.35);
  white-space: nowrap;
}
.side-btn .gate-lock { top: -5px; right: -6px; padding: 1px 4px; border-radius: 999px; font-size: 6.5px; } /* pojok kanan-atas kecil: tumpukan sidebar rapat */
.side-btn.gated, .quick-tile.gated, .dock-btn.gated { position: relative; }
.side-btn.gated img, .quick-tile.gated img, .dock-btn.gated .dock-ico img { opacity: 0.35; filter: grayscale(0.7); }
.side-btn.gated span, .quick-tile.gated .qt-label { opacity: 0.55; }

/* Fase 20: badge TIER rarity hero (common–legend, tetap selamanya) */
.tier-badge {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  padding: 2px 7px; border-radius: 999px;
  color: #fff; font-size: 7.6px; font-weight: 900; letter-spacing: 0.08em;
  text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 5px rgba(31, 74, 66, 0.25);
}

/* Fase 20 feedback #2: tombol hasil run SELALU terlihat — ringkasan yang scroll */
.go-card #gameover-summary {
  overflow-y: auto; min-height: 0; flex: 0 1 auto; max-height: 30vh;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.go-card .btn-row, .go-card #btn-double-currency, .go-card .summary-reward { flex: 0 0 auto; }

/* --- Baris PLAY: kartu bab + kolom mode --- */
.play-row { display: grid; grid-template-columns: 1.12fr 1fr; gap: 10px; align-items: stretch; }
.campaign-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  background:
    radial-gradient(circle at 84% 14%, rgba(169, 215, 149, 0.45) 0 34px, transparent 35px),
    radial-gradient(circle at 10% 84%, rgba(191, 227, 216, 0.6) 0 30px, transparent 31px),
    linear-gradient(165deg, #f2f8e8, #dcefe6);
  padding: 13px 13px 15px;
}
.cc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.cc-count { font-size: 10px; font-weight: 900; color: var(--teal-deep); background: rgba(255, 253, 244, 0.85); padding: 2px 9px; border-radius: var(--pill); }
.cc-organ { width: 74px; height: 74px; object-fit: contain; margin-top: 2px; filter: drop-shadow(0 8px 10px rgba(31, 74, 66, 0.22)); }
.cc-name { font-size: 16.5px; font-weight: 900; color: var(--teal-dark); }
.cc-title { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.cc-obj { font-size: 10px; font-weight: 700; color: var(--ink-soft); opacity: 0.85; }
.campaign-card .btn-play-big {
  width: 100%; margin: 8px 0 0; padding: 11px 16px;
}
.campaign-card .btn-play-big span { font-size: 17px; }
.campaign-card .btn-play-big small { font-size: 9.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mode-stack { display: flex; flex-direction: column; gap: 10px; }
.mode-card {
  display: flex; align-items: center; gap: 9px; padding: 10px 11px;
  background: var(--card); flex: 1;
}
.mode-card.locked { opacity: 0.75; }
.mc-ico { width: 34px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.mc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.mc-body b { font-size: 12.5px; color: var(--ink); }
.mc-body span { font-size: 9.3px; font-weight: 700; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-btn { font-size: 10.5px; padding: 8px 12px; min-height: 0; flex: 0 0 auto; }

/* --- Duo grid: evolusi+misi, rekor+tubuh --- */
.duo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.duo-row .card { margin: 0; }
.duo-row .daily-card, .duo-row .arena-card { display: flex; }
.duo-row .lb-list { font-size: 10px; }
.duo-row .body-card .bar-track { height: 8px; }

/* Stat strip lebih ramping */
.stat-strip { gap: 8px; }
.stat-cell { padding: 8px 4px; border-radius: 15px; }
.stat-cell b { font-size: 15px; }

/* Arena card dalam kolom mode: ramping */
#arena-card { padding: 10px 11px; display: flex; align-items: center; gap: 8px; flex: 1; }
#arena-card .card-title { margin-bottom: 0; font-size: 11px; }

@media (max-width: 355px) {
  .side-nav { flex-basis: 54px; }
  .play-row { grid-template-columns: 1fr; }
  .duo-row { grid-template-columns: 1fr; }
}

/* =========================================================
   FASE 13.1 — de-dup navigasi + konsistensi halaman lain
   ========================================================= */

/* Chip informasi kecil di header/subtitle halaman (roster/bag/dll) */
.count-chip {
  display: inline-block; margin-left: 8px; padding: 2px 10px;
  background: var(--teal); color: #fff; border-radius: var(--pill);
  font-size: 10px; font-weight: 900; letter-spacing: 0.03em;
  vertical-align: middle; box-shadow: 0 2px 6px rgba(31, 122, 112, 0.3);
}
.topbar .count-chip { margin-left: 0; }

/* Footer roster: MULAI selalu terlihat saat menggulung koleksi */
#screen-roster .screen-footer {
  position: sticky; bottom: 0; z-index: 5;
  padding: 12px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(253, 246, 227, 0) 0%, var(--cream) 38%);
}
#screen-roster .screen-footer .btn { min-width: min(78vw, 340px); }

/* Ikon sidebar aktif tetap terbaca untuk ikon sprite berwarna */
.side-btn img { filter: saturate(0.25) opacity(0.75); }
.side-btn.active img { filter: brightness(0) invert(1); opacity: 1; }

/* =========================================================
   FASE 13.2 — (diperbarui UI-REBUILD): PORTRAIT-FIRST.
   Overlay wajib-lanskap dicabut — game mendukung portrait (primer,
   standar genre mobile) & landscape (tetap didukung penuh).
   Aturan landscape di bawah blok ini TIDAK diubah.
   ========================================================= */

/* --- Dashboard lanskap: grid 2 kolom (banner+kampanye | menu+info) --- */
@media (orientation: landscape) {
  .screen { padding-left: 14px; padding-right: 14px; }
  /* Fase 15 AUDIT: hanya konten tengah yang scroll — topbar & dock tidak pernah bergeser */
  #screen-dashboard { overflow: hidden; }
  .topbar, .dock { flex: 0 0 auto; }
  .dash-body { max-width: 1040px; gap: 12px; min-height: 0; overflow: hidden; }
  .dash-scroll {
    display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    align-items: start; gap: 10px;
    overflow-y: auto; min-height: 0; align-content: start;
    scrollbar-width: thin; padding-right: 2px;
  }
  /* Fase 16: baris eksplisit — kartu TIDAK mungkin saling menabrak walau
     urutan DOM/kolom berubah (bug user: stats menimpa kartu Endless) */
  #dash-banner { grid-area: 1 / 1; height: 200px; }
  .banner-slide .hero-stage .stage-hero { width: min(24vh, 150px); }
  #quick-row { grid-area: 1 / 2; }
  #quick-row .qt-label { white-space: nowrap; }
  .play-row { grid-area: 2 / 1; }
  #dash-stats { grid-area: 2 / 2; align-self: end; }
  #daily-card { grid-area: 3 / 1 / 4 / -1; } /* baris penuh — tanpa lubang grid */
  #duo-evo { grid-area: 4 / 1; }
  #duo-lb { grid-area: 4 / 2; }
  /* Toast di luar-run lanskap: kanan, di ATAS dock (dock 299..376) — zona kosong */
  body:not(.in-run) #toasts {
    top: auto; bottom: 102px; right: 12px; left: auto; transform: none;
    width: min(28vw, 240px);
  }
  /* Dock ramping agar sisa tinggi untuk konten */
  .dock { max-width: 640px; padding-top: 7px; gap: 6px; }
  .dock-btn .dock-ico { width: 46px; height: 46px; border-radius: 15px; }
  .dock-btn .dock-ico img { width: 24px; height: 24px; }
  .dock-btn span { font-size: 11px; }
  .screen-header h2, .screen-title { font-size: 17px; }
  .duo-row { grid-template-columns: 1fr; }
  /* Kartu-kartu tidak menumpuk teks di kolom lebar */
  .evo-head .evo-progress, .cc-obj, .mc-body span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .acct-id b { max-width: 130px; }
  .stat-cell span { white-space: nowrap; }

  /* F21: halaman non-home memakai FULL lebar landscape (auto-fill, tanpa max-width) */
  .roster-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); max-width: none; margin: 0; width: 100%; }
  .premium-grid, .shop-grid { max-width: none; margin: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .upg-list { max-width: none; margin: 0; width: 100%; }
  .bag-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-width: none; width: 100%; }
  .bp-body { max-width: none; }
  .free-grid { max-width: none; }
  .skin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: none; margin: 0; }
  .codex-scroll, .shop-sections { max-width: none; width: 100%; }

  /* --- HUD gameplay lanskap: sebar ke samping, jangan tumpuk --- */
  #screen-hud .hud-top { max-width: 780px; }
  #screen-hud .hud-minimap { top: 10px; right: 10px; width: 74px; height: 74px; }
  #screen-hud .hud-mission { top: 60px; width: 250px; }
  body.in-run #toasts {
    top: 96px; bottom: auto; right: 10px; left: auto; transform: none;
    flex-direction: column; width: min(38vw, 300px);
  }
  .hud-hint { bottom: 108px; font-size: 10.5px; }
  #screen-hud .hud-hero-status { left: 12px; bottom: 10px; }
  #screen-hud .hud-controls { right: 12px; bottom: 10px; }
  /* Modal pendek di lanskap: dua kolom pilihan level-up bila muat */
  .choice-grid { max-height: 46vh; }
}

/* =========================================================
   FASE 19 — TUJUAN PEMAIN: PANGKAT PENJAGA + LAYOUT HOME FULL-BLEED
   Feedback pemilik (2026-09-06):
   1) tutup ruang kosong di bawah kartu battle pass/quests
   2) carousel full-bleed kiri-kanan (mentok) — lebih enak dilihat
   3) dock & topbar dilebarkan sampai penuh (layar landscape)
   ========================================================= */

/* --- (2) Carousel full-bleed: mentok kiri & kanan layar --- */
@media (orientation: landscape) {
  .dash-scroll { overflow-x: hidden; }
  #dash-banner {
    grid-area: 1 / 1 / 2 / -1;          /* penuh kedua kolom */
    height: clamp(176px, 46vh, 236px);  /* baris Play tetap mengintip di fold */
    margin: 0 calc(-1 * var(--screen-pad, 14px)); /* tembus padding layar */
    border-radius: 0;
    box-shadow: none;
  }
  #dash-banner .banner-track, #dash-banner .banner-slide { border-radius: 0; }

  /* --- (1) Tutup ruang kosong: quick-menu pindah ke samping play-row --- */
  /* 6 tile = 2×3 KOMPAK (feedback pemilik: tile jangan terlalu besar/tumpuk) */
  #quick-row {
    grid-area: 2 / 2; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto); gap: 8px; align-self: start;
  }
  #quick-row .quick-tile { padding: 9px 3px 7px; }
  #quick-row .quick-tile img { width: 30px; height: 30px; }
  #quick-row .qt-label { font-size: 9.3px; }
  /* Kolom kanan: tiles kompak + strip statistik mengisi sisa — TANPA lubang */
  .play-row {
    grid-area: 2 / 1 / 4 / 2;
    /* F20 fix (screenshot pemilik): min-content kartu Arena meluber ke kolom
       tile → paksa track bisa menyusut; kartu memotong isi, bukan menimpa */
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  }
  .play-row .campaign-card, .play-row .mode-stack, .play-row .mode-card, .play-row .arena-card { min-width: 0; overflow: hidden; }
  #dash-stats { grid-area: 3 / 2; align-self: stretch; }
  #daily-card { grid-area: 4 / 1 / 5 / -1; }
  #duo-evo { grid-area: 5 / 1; }
  #duo-lb { grid-area: 5 / 2; }

  /* --- (3) Dock & topbar melebar penuh (ala MLBB landscape) --- */
  #screen-dashboard .topbar { max-width: none; }
  .dock {
    max-width: none; padding: 4px 10px calc(3px + env(safe-area-inset-bottom)); gap: 5px;
  }
  .dock-btn { gap: 2px; }
  .dock-btn .dock-ico { width: 42px; height: 42px; border-radius: 12px; }
  .dock-btn .dock-ico img { width: 20px; height: 20px; }
  .dock-btn span { font-size: 9.5px; }
}

/* Layar landscape pendek (ponsel): sidebar 6 tombol tetap muat */
@media (orientation: landscape) and (max-height: 500px) {
  .side-nav { flex: 0 0 56px; gap: 2px; padding: 4px; }
  .side-btn { padding: 2px; gap: 0; border-radius: 11px; }
  .side-btn img { width: 17px; height: 17px; }
  .side-btn span { font-size: 7px; }
}

/* Fase 20 feedback #2: kartu hasil run ringkas di layar pendek */
@media (max-height: 500px) {
  .go-card { padding: 12px 16px 12px; gap: 6px; }
  .go-stars .star { width: 32px !important; height: 32px !important; }
  .gameover-title { font-size: 19px; }
  .gameover-sub { font-size: 10.5px; margin: 0 0 2px; }
  #gameover-summary { max-height: 24vh; }
  .summary-grid { gap: 5px; }
  .summary-cell { padding: 5px 6px; }
  .summary-cell b { font-size: 14px; }
  .summary-cell span { font-size: 8.4px; }
  .go-parts { font-size: 9.6px; margin: 1px 0; }
  .summary-reward { padding: 6px 10px; margin: 2px 0 0; }
  .go-chest { width: 32px; }
  .go-rankup { padding: 6px 14px; gap: 10px; }
  .go-rankup .rank-emblem.big { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
  .go-rankup-text b { font-size: 13px; }
  .go-rankup-text span { font-size: 10px; }
  .go-deco { display: none; }
  .go-card .btn-row .btn { padding: 10px 12px; font-size: 14px; }
  #btn-double-currency { padding: 9px 12px; font-size: 12.5px; }
}

/* Modal pangkat kompak di layar pendek — ladder tetap terbaca */
@media (max-height: 500px) {
  .rank-box { gap: 7px; padding: 12px 18px 14px; }
  .rank-hero { padding: 8px 12px; gap: 10px; }
  .rank-emblem.big { width: 52px; height: 52px; border-radius: 16px; font-size: 20px; }
  .rank-hero-meta b { font-size: 15px; }
  .rank-gp b { font-size: 16px; }
  .rank-row { padding: 4px 8px; }
  .rank-row b { font-size: 11.5px; }
  .rank-ladder { flex: 0 0 auto; max-height: 178px; }
}

/* --- Chip pangkat di topbar dashboard --- */
.rank-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: none; border-radius: var(--pill);
  padding: 4px 12px 4px 5px; cursor: pointer; box-shadow: var(--shadow-card);
  font-family: var(--font); text-align: left;
  transition: transform 0.08s ease;
}
.rank-chip:active { transform: scale(0.95); }
.rank-chip.hidden { display: none; }
.rank-emblem {
  width: 34px; height: 34px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 0.02em;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 3px 8px rgba(31, 74, 66, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.rank-emblem.big { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; }
.rank-emblem.sm { width: 22px; height: 22px; border-radius: 8px; font-size: 10px; vertical-align: middle; }
.rank-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rank-meta b { font-size: 11.5px; font-weight: 900; color: var(--ink); white-space: nowrap; }
.rank-bar {
  width: 96px; height: 6px; border-radius: 4px; background: rgba(31, 122, 112, 0.14);
  overflow: hidden; margin: 2px 0 1px;
}
.rank-bar i { display: block; height: 100%; width: 0%; border-radius: 4px; background: var(--teal); transition: width 0.4s ease; }
.rank-bar.lg { width: 100%; height: 10px; margin: 6px 0 4px; }
.rank-meta small { font-size: 9px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }

/* --- Modal PANGKAT PENJAGA --- */
.rank-box { display: flex; flex-direction: column; gap: 10px; max-height: calc(100dvh - 32px); }
.rank-title { color: var(--teal-dark); letter-spacing: 0.06em; }
.rank-season-line { font-size: 11px; font-weight: 800; color: var(--ink-soft); text-align: center; margin-top: -6px; }
.rank-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(165deg, #f2f8e8, #dcefe6);
  border-radius: 18px; padding: 12px 14px;
}
.rank-hero-meta { flex: 1; min-width: 0; }
.rank-hero-meta b { font-size: 17px; font-weight: 900; color: var(--teal-dark); }
.rank-hero-meta small { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); }
.rank-gp {
  display: flex; flex-direction: column; align-items: center;
  background: var(--card); border-radius: 14px; padding: 8px 14px; box-shadow: var(--shadow-card);
}
.rank-gp b { font-size: 19px; font-weight: 900; color: var(--teal-dark); }
.rank-gp span { font-size: 9px; font-weight: 900; color: var(--ink-soft); letter-spacing: 0.08em; }
.rank-ladder-title { font-size: 11px; letter-spacing: 0.12em; color: var(--ink-soft); font-weight: 900; margin: 2px 0 -2px; }
.rank-ladder {
  list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 5px;
  overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin;
}
.rank-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 9px; border-radius: 12px; background: rgba(31, 122, 112, 0.05);
}
.rank-row .rank-row-left { display: inline-flex; align-items: center; gap: 9px; }
.rank-row b { font-size: 12.5px; font-weight: 900; color: var(--ink); }
.rank-row .rank-row-right { font-size: 11px; font-weight: 900; color: var(--ink-soft); }
.rank-row.reached .rank-row-right { color: var(--teal-deep); }
.rank-row.current { background: linear-gradient(165deg, #fff6d8, #ffe9ad); outline: 2px solid var(--gold-deep, #f2b93e); }
.rank-row.current b { color: var(--teal-dark); }
.rank-earn { font-size: 10px; font-weight: 800; color: var(--ink-soft); text-align: center; }

/* --- Ceremony NAIK PANGKAT di kartu gameover --- */
.go-rankup {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 2px auto 6px; padding: 10px 22px;
  background: linear-gradient(165deg, #ffe9ad, #ffd93d);
  border-radius: 18px; box-shadow: 0 6px 0 #d9a51f, var(--shadow-card);
  animation: rankup-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.go-rankup.hidden { display: none; }
.go-rankup-text { display: flex; flex-direction: column; line-height: 1.2; }
.go-rankup-text b { font-size: 17px; font-weight: 900; color: #7a5205; letter-spacing: 0.08em; }
.go-rankup-text span { font-size: 12px; font-weight: 900; color: var(--teal-dark); }
.go-rankup .rank-emblem.big.pulse { animation: rankup-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1), rankup-bob 1.6s ease-in-out 0.5s infinite; }
@keyframes rankup-pop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rankup-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.go-parts.go-rank { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; color: var(--teal-dark); }

/* =========================================================
   FASE 14 — IMUN COIN, BATTLE PASS, OFFERWALL, KOSMETIK
   ========================================================= */

/* Chip Imun (permata teal) */
.imu-chip { background: linear-gradient(180deg, #d9f6f1, #bfeae2); }
.imu-chip .coin { filter: none; }

/* --- Layar Battle Pass --- */
.bp-body { width: 100%; max-width: 1020px; display: flex; flex-direction: column; gap: 8px; }
.bp-head { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.bp-level-wrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.bp-level-ring {
  width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(180deg, #ffe28a, #f2b93e);
  border: 3px solid #fff; box-shadow: 0 3px 0 #a86f14;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bp-level-ring b { font-size: 20px; color: #4a2f05; line-height: 1; }
.bp-level-ring small { font-size: 7.5px; font-weight: 900; color: #7a4d09; }
.bp-xp-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bp-xp-wrap b { font-size: 13.5px; color: var(--teal-dark); }
.bp-xp-track { height: 12px; border-radius: var(--pill); background: #efe3c8; overflow: hidden; box-shadow: inset 0 2px 3px rgba(31, 74, 66, 0.12); }
.bp-xp-fill { height: 100%; width: 0%; border-radius: var(--pill); background: linear-gradient(90deg, #4adbc0, #f5c64f); transition: width 0.3s ease; }
.bp-xp-text { font-size: 10px; font-weight: 900; color: var(--ink-soft); }
.bp-hint { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); text-align: center; }
.bp-track-title { font-size: 11px; font-weight: 900; letter-spacing: 0.1em; color: var(--ink-soft); margin: 2px 4px; }
.bp-track-title.gold { color: #a97a10; }
.bp-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
}
.bp-cell {
  position: relative; scroll-snap-align: start; cursor: pointer;
  flex: 0 0 128px; min-height: 64px; border: 2px solid #e3dcc6; border-radius: 14px;
  background: var(--card); font-family: var(--font); text-align: left;
  padding: 6px 9px 6px 30px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  transition: transform 0.08s ease;
}
.bp-cell:active { transform: scale(0.95); }
.bp-lv {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 900; color: var(--teal-deep); min-width: 20px;
}
.bp-reward { font-size: 9.6px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.bp-cell.prem .bp-lv, #bp-prem .bp-lv { color: #a97a10; }
#bp-prem .bp-cell { border-color: #f0d79a; background: linear-gradient(180deg, #fffaf0, #fdf2d2); }
.bp-cell.claimable { border-color: var(--teal); box-shadow: 0 0 0 2.5px rgba(47, 156, 143, 0.35), var(--shadow-card); animation: bpPulse 1.6s ease-in-out infinite; }
@keyframes bpPulse { 50% { box-shadow: 0 0 0 6px rgba(47, 156, 143, 0), var(--shadow-card); } }
.bp-cell.claimed { opacity: 0.6; }
.bp-cell.claimed .bp-reward { text-decoration: line-through; }
.bp-cell.locked { opacity: 0.55; }
.bp-state { position: absolute; right: 7px; top: 6px; width: 15px; height: 15px; object-fit: contain; }
.bp-state.lock { width: 12px; height: 12px; }

/* --- Offerwall & kosmetik (shop) --- */
.free-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.free-tile {
  background: var(--card); border: 2px solid #d9f6f1; border-radius: 16px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: var(--shadow-card);
}
.free-tile.wide { grid-column: span 3; }
.free-tile b { font-size: 12px; color: var(--teal-dark); }
.free-tile span { font-size: 10px; font-weight: 700; color: var(--ink-soft); }
.ft-btn { font-size: 11px; min-height: 34px; padding: 6px 14px; align-self: flex-start; }
.rf-code { color: var(--teal-deep); letter-spacing: 0.06em; }
.rf-row { display: flex; gap: 7px; }
.rf-input {
  flex: 1; min-width: 0; border: 2px solid var(--teal-light); border-radius: 12px;
  padding: 7px 11px; font-family: var(--font); font-weight: 900; font-size: 11.5px;
  color: var(--ink); background: #fff; letter-spacing: 0.05em; text-transform: uppercase;
}
.rf-input:focus { outline: 2px solid var(--teal); }
.ad-count { font-size: 34px; font-weight: 900; color: var(--teal-dark); }

.skin-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.skin-card {
  background: var(--card); border: 2px solid #e3dcc6; border-radius: 16px;
  padding: 9px 10px; display: flex; flex-direction: column; align-items: center;
  gap: 3px; text-align: center; box-shadow: var(--shadow-card);
}
.skin-card.on { border-color: var(--teal); box-shadow: 0 0 0 2.5px rgba(47, 156, 143, 0.3), var(--shadow-card); }
.skin-preview { width: 52px; height: 52px; object-fit: contain; }
.skin-preview.acc { filter: drop-shadow(0 0 6px rgba(122, 215, 255, 0.8)); }
.skin-card b { font-size: 11px; color: var(--teal-dark); }
.skin-desc { font-size: 8.8px; font-weight: 700; color: var(--ink-soft); line-height: 1.25; min-height: 22px; }
.skin-card .ft-btn { align-self: center; font-size: 10px; min-height: 30px; padding: 5px 12px; }

/* Baris Imun di ringkasan run */
.go-imu { color: #0e7a6a; font-weight: 900; font-size: 12px; }

@media (orientation: landscape) {
  .free-grid { max-width: 900px; margin: 0 auto; width: 100%; }
  .free-tile.wide { grid-column: span 3; }
  .skin-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; width: 100%; }
  .bp-body { max-width: 1000px; margin: 0 auto; }
}

/* =========================================================
   FASE 15 — CINEMATIC BANNER (video battle di home) + audit
   ========================================================= */
.stage-cine {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: inherit; display: block;
}
.banner-slide .hero-stage { padding: 0; }
.banner-slide .hero-stage .stage-info { z-index: 3; }
.banner-slide .hero-stage .stage-badge { z-index: 3; }

/* Gameplay HUD v2: combat-first final composition. Keep this as the single
   final override while the older experimental HUD rules remain documented. */
#screen-hud .hud-top{top:10px;left:12px;right:12px;max-width:none;align-items:flex-start;pointer-events:none}
#screen-hud .hud-stat-left,#screen-hud .hud-stat-right{padding:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;gap:8px}
#screen-hud .hud-stat-left{min-width:34px}
#screen-hud .hud-stat-right{margin-right:42px}
#screen-hud .hud-stat-right .hud-currency-run{font-size:11px;padding:4px 6px;border-radius:8px;background:rgba(255,253,244,.78);box-shadow:0 2px 6px rgba(31,95,87,.1)}
#screen-hud .hud-stat-right .hud-currency-run img{width:12px;height:12px}
#screen-hud .hud-stat-right .btn-pause{width:32px;height:32px;min-height:32px;border-radius:9px}
#screen-hud .hud-stat-right .btn-pause img{width:15px;height:15px}
#screen-hud .hud-kills{font-size:11px;padding:4px 6px;border-radius:8px;background:rgba(255,253,244,.78);box-shadow:0 2px 6px rgba(31,95,87,.1)}
#screen-hud .hud-kills img{width:12px;height:12px}
#screen-hud .hud-center{min-width:0;padding:2px 7px;gap:0;background:rgba(255,253,244,.66);border:0;border-radius:8px;box-shadow:none}
#screen-hud .hud-center .wave-pill{font-size:9px;letter-spacing:.06em;line-height:12px}
#screen-hud .hud-center .timer-chip{font-size:9px;line-height:11px}
#screen-hud .hud-center .timer-chip img{width:10px;height:10px}
#screen-hud .hud-hero-status{left:12px;bottom:14px;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;gap:6px}
#screen-hud .hud-hero-status .avatar-wrap{width:40px;height:40px;flex-basis:40px}
#screen-hud .hud-hero-status .hud-portrait{width:40px;height:40px;border-width:2px;box-shadow:0 0 0 1px #f0c04f,0 2px 5px rgba(31,95,87,.2)}
#screen-hud .hud-hero-status .level-badge{font-size:7px;padding:1px 4px;bottom:-4px;right:-5px}
#screen-hud .hud-hero-status .status-bars{width:124px;padding:3px 5px;background:rgba(255,253,244,.72);border-radius:7px}
#screen-hud .hud-hero-status .hp-row{gap:4px}
#screen-hud .hud-hero-status .hp-row .heart{width:11px;height:11px}
#screen-hud .hud-hero-status .hud-hp-track{height:8px}
#screen-hud .hud-hero-status .hud-hp-text{font-size:8px;min-width:32px}
#screen-hud .hud-hero-status .xp-row{gap:4px}
#screen-hud .hud-hero-status .hud-xp-track{height:4px}
#screen-hud .hud-hero-status .hud-xp-ico{width:9px;height:9px}
#screen-hud .hud-controls{right:12px;bottom:14px;gap:6px}
#screen-hud .ability-bar{grid-template-columns:repeat(2,48px);gap:4px}
#screen-hud .ability-btn{width:48px;height:48px;border-radius:12px;border-width:1.5px}
#screen-hud .ability-btn .sk-ico{width:22px;height:22px}
#screen-hud .ability-btn.ult{height:38px}
#screen-hud .ability-btn.ult .sk-ico{width:24px;height:24px}
#screen-hud .ability-btn .sk-name{font-size:6px;bottom:2px}
#screen-hud .pulse-btn{width:68px;height:68px;min-height:68px;border-width:2px;font-size:9px}
#screen-hud .pulse-btn img{width:22px;height:22px}
#screen-hud .hud-minimap{top:72px;right:12px;width:64px;height:64px;opacity:.72}
#screen-hud .hud-buffs{top:72px;left:80px;right:80px}
#screen-hud .hud-announce{max-width:220px;font-size:12px}
@media (max-width:390px){
  #screen-hud .hud-top{left:7px;right:7px}
  #screen-hud .hud-stat-right{margin-right:38px}
  #screen-hud .hud-hero-status{left:7px;bottom:8px}
  #screen-hud .hud-controls{right:7px;bottom:8px}
  #screen-hud .ability-bar{grid-template-columns:repeat(2,42px)}
  #screen-hud .ability-btn{width:42px;height:42px}
  #screen-hud .ability-btn.ult{height:34px}
  #screen-hud .pulse-btn{width:58px;height:58px;min-height:58px}
  #screen-hud .hud-hero-status .status-bars{width:106px}
  #screen-hud .hud-minimap{right:7px;width:54px;height:54px}
}

/* Event HUD: readable but never a permanent card wall. */
#screen-hud .hud-mission{top:58px;width:auto;max-width:min(230px,62vw);padding:4px 8px 5px;border:1px solid rgba(47,156,143,.7);border-radius:8px;background:rgba(255,252,245,.86);box-shadow:0 2px 8px rgba(31,95,87,.12)}
#screen-hud .hud-mission-text{font-size:9px;line-height:12px}
#screen-hud .hud-mission-bar{height:4px;margin-top:3px}
#screen-hud .hud-gate{top:58px;font-size:9px;padding:5px 10px;border-width:1px;letter-spacing:.05em}
#screen-hud .hud-gate-bank{font-size:8px;padding:1px 5px;margin-left:3px}
#screen-hud .hud-hint{bottom:92px;max-width:70vw;overflow:hidden;text-overflow:ellipsis;font-size:9px;padding:4px 9px;background:rgba(20,88,79,.48)}
@media (max-width:390px){#screen-hud .hud-hint{bottom:74px}}

/* V2 Phase 4 — rarity kartu level-up + kartu evolusi senjata */
.choice-card.rar-rare { border-color: #7fdbff; box-shadow: 0 0 12px rgba(127,219,255,0.35); }
.choice-card.rar-epic { border-color: #c39bd3; box-shadow: 0 0 14px rgba(195,155,211,0.45); }
.choice-card.evo-card {
  border-color: #c39bd3;
  background: linear-gradient(135deg, rgba(195,155,211,0.18), rgba(255,217,61,0.12));
  box-shadow: 0 0 18px rgba(195,155,211,0.6);
  animation: evoPulse 1.1s ease-in-out infinite alternate;
}
@keyframes evoPulse { from { box-shadow: 0 0 10px rgba(195,155,211,0.4); } to { box-shadow: 0 0 22px rgba(195,155,211,0.8); } }

/* ===== R2 (Rebuild): bark RIA — toast dua-lapis naratif ===== */
.toast.ria {
  border-left-color: #2f9c8f;
  background: linear-gradient(135deg, rgba(47,156,143,0.12), rgba(53,208,186,0.06)), var(--card, #fffef8);
  font-style: italic;
}
.toast.ria::before { content: '⚡ '; font-style: normal; }

/* ===== R3 Modul A: chip memori antigen (kiri-bawah, di atas HP) ===== */
.hud-antigen {
  position: absolute;
  left: 12px;
  bottom: 86px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 40, 36, 0.55);
  color: #e8fff8;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.hud-antigen .ag-bar {
  width: 54px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.2); overflow: hidden;
}
.hud-antigen .ag-fill { height: 100%; background: #c39bd3; border-radius: 3px; }
.hud-antigen.tiered { box-shadow: 0 0 10px rgba(195,155,211,0.55); }


/* ===== R4 Modul B: meter fagositosis — kanan-bawah dekat tombol skill ===== */
.phago-meter {
  position: absolute;
  right: 96px;
  bottom: 148px;
  width: 84px;
  height: 8px;
  border-radius: 4px;
  background: rgba(20, 40, 36, 0.5);
  overflow: hidden;
  pointer-events: none;
}
.phago-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffd93d, #ffb300); border-radius: 4px; transition: width 0.25s ease; }

/* ============================================================
   E1 poin 2 — TOMBOL BERKARAKTER → digantikan UI/UX BUILD 43
   (pelat HEX SVG + ikon per-skill + SERANG antibodi-Y). Rule-nya
   ada di styles/dashboard-focus.css blok "BUILD 43" (dimuat terakhir).
   ============================================================ */
#screen-hud .pulse-btn{ position:relative; overflow:visible; } /* kalahkan position:static di atas */
#screen-hud .pulse-btn img{display:none} /* ikon lama (img) diganti svg inline .pulse-claw */

/* ============================================================
   E1 poin 1+7 — MINIMAL HOME (fokus feel: stage + PLAY + 1-2 menu)
   Kartu sekunder disembunyikan via CSS — UI tetap ada di DOM dan
   muncul otomatis begitu trigger unlock tercapai (totalRuns >= 3).
   ============================================================ */
#screen-dashboard.minimal-home .play-row,
#screen-dashboard.minimal-home #dash-stats,
#screen-dashboard.minimal-home #daily-card,
#screen-dashboard.minimal-home #duo-evo,
#screen-dashboard.minimal-home #duo-lb,
#screen-dashboard.minimal-home .banner-dots,
#screen-dashboard.minimal-home .side-nav,
#screen-dashboard.minimal-home .secondary-dock,
#screen-dashboard.minimal-home #rank-chip{ display:none !important; }
#screen-dashboard.minimal-home .dash-scroll{ overflow:hidden; }
#screen-dashboard.minimal-home .banner-carousel{ height: calc(100% - 8px); }

/* ============================================================
   E1 poin 8 — PRESENTER: karakter naratif hidup (RIA & Amara)
   Karakter BESAR berdiri di kiri, teks DI SAMPING (bukan bawah),
   pose idle/talk bergantian = mulut & tangan bergerak.
   ============================================================ */
#presenter-layer{position:fixed;inset:0;z-index:340;pointer-events:none;opacity:0;transition:opacity .28s ease}
#presenter-layer.on{opacity:1}
/* RONDE-7: bark JANGAN mengambil pointer seluruh layar — dulu layer .on
   pointer-events:auto inset:0 (z 340) menelan tap tombol SERANG/skill
   (terasa "SERANG lemot/mati"). Hanya panggung bark yang bisa disentuh;
   area lain tembus ke HUD/canvas. */
#presenter-layer.on .presenter-panel{pointer-events:auto}
/* RONDE-7: GAMBAR presenter (karakter RIA di kiri-bawah) TIDAK BOLEH
   menelan sentuhan gameplay — dulu area drag di zona panel Misi mati total
   saat bark tampil (terasa sebagai "joystick gagal / SERANG lemot").
   Dismiss tetap mudah: ketuk PANEL bark (hint "ketuk untuk lanjut"). */
#presenter-layer .presenter-img{pointer-events:none}
#presenter-layer.soft .presenter-panel, #presenter-layer.soft .presenter-img{pointer-events:none} /* onboarding soft: drag tembus */
#presenter-layer .presenter-stage{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;gap:0;padding:0 14px;filter:drop-shadow(0 10px 26px rgba(10,40,36,.35))}
#presenter-layer .presenter-img{
  height:min(62vh,300px);width:auto;margin-bottom:-4px;flex:0 0 auto;
  transform-origin:50% 100%;
  animation:presenterBob 2.6s ease-in-out infinite;
}
@keyframes presenterBob{0%,100%{transform:translateY(0) rotate(-.6deg)}50%{transform:translateY(-6px) rotate(.6deg)}}
#presenter-layer .presenter-panel{
  position:relative;flex:1;max-width:520px;margin:0 0 30px -6px;
  background:linear-gradient(165deg,#fffdf6,#f2fbf7);
  border:3px solid var(--pr-accent,#35d0ba);border-radius:20px;
  padding:12px 16px 20px;
}
#presenter-layer .presenter-panel::before{ /* ekor balon ke arah karakter */
  content:"";position:absolute;left:-13px;bottom:38px;width:0;height:0;
  border-top:11px solid transparent;border-bottom:11px solid transparent;
  border-right:13px solid var(--pr-accent,#35d0ba);
}
#presenter-layer .presenter-head{display:flex;align-items:baseline;gap:8px;margin-bottom:4px}
#presenter-layer .presenter-head b{font-size:15px;font-weight:900;color:var(--pr-accent,#35d0ba);letter-spacing:.04em}
#presenter-layer .presenter-head small{font-size:10px;font-weight:800;color:#6b8a82;text-transform:uppercase;letter-spacing:.06em}
#presenter-layer #presenter-text{margin:0;font-size:13.5px;line-height:1.5;font-weight:700;color:#173f39}
#presenter-layer .presenter-hint{position:absolute;right:12px;bottom:6px;font-size:9px;font-weight:800;color:#9ab5ad;text-transform:uppercase;letter-spacing:.06em}
@media (max-width:700px){
  #presenter-layer .presenter-img{height:min(54vh,220px)}
  #presenter-layer #presenter-text{font-size:12px}
}

/* ============================================================
   E2 poin 6 — CINEMATIC KEMENANGAN WAVE PENTING (overlay full)
   ============================================================ */
#wave-cine-layer{position:fixed;inset:0;z-index:350;background:#000;opacity:1;transition:opacity .25s ease}
#wave-cine-layer.out{opacity:0}
#wave-cine-layer canvas{position:absolute;inset:0;width:100%;height:100%}
#wave-cine-layer .wave-cine-title{
  position:absolute;left:0;right:0;top:11%;text-align:center;
  font:900 clamp(14px,3.4vw,24px)/1.3 var(--font);color:#ffe9c2;
  letter-spacing:.14em;text-shadow:0 2px 14px rgba(0,0,0,.7);
  animation:waveCineTitle .5s ease both;pointer-events:none;padding:0 16px;
}
@keyframes waveCineTitle{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
#wave-cine-layer .wave-cine-skip{
  position:absolute;right:16px;bottom:12%;z-index:2;
  border:2px solid rgba(255,255,255,.5);border-radius:999px;
  background:rgba(0,0,0,.35);color:#fff;font:900 11px var(--font);
  letter-spacing:.1em;padding:8px 18px;cursor:pointer;
}

/* =====================================================================
   UI/UX WORK ORDER #3 (BUILD 44) — bahasa visual menu terpadu:
   header satu pola, ikon bespoke (assets/icons/*.svg + js/ui/menu-icons.js),
   Shop dengan chip-nav bagian, kartu hero berperan/tier, Lab bertab berikon.
   ===================================================================== */

/* ---- Ikon inline SVG (menu-icons.js): mengikuti ukuran kontainer ---- */
.mi { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; line-height: 0; flex: 0 0 auto; }
.mi svg, .mi img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* ---- Header terpadu: [kembali] [ikon modul] [judul] [chip mata uang] ---- */
.ui-head { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; min-height: 48px; flex: 0 0 auto; }
.ui-head .btn-back, .ui-head .back-btn { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-card); border: 2px solid rgba(47, 156, 143, .25); }
.ui-head .btn-back img, .ui-head .back-btn img { width: 26px; height: 26px; }
.ui-head-ico { width: 40px; height: 40px; border-radius: 13px; background: var(--card); box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ui-head-ico img { width: 30px; height: 30px; object-fit: contain; }
.ui-head h1, .ui-head h2 { flex: 1; min-width: 0; text-align: left; font-size: 19px; color: var(--teal-dark); font-weight: 900; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.ui-head-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 44px; justify-content: flex-end; }
.ui-head .currency-chip.small { font-size: 13px; padding: 4px 12px 4px 5px; gap: 6px; }
.ui-head .currency-chip.small .coin { width: 24px; height: 24px; filter: none; }
.ui-head .codex-progress { font-size: 11px; padding: 5px 10px; }
.ui-head .count-chip { font-size: 10px; }
.currency-chip .coin[src$=".svg"] { filter: none; }
.ui-modal-title { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ui-modal-title img { width: 30px; height: 30px; object-fit: contain; }
.modal-title.rank-title { display: flex; }

/* ---- Roster: badge peran di avatar + footer tidak menutupi baris terakhir ---- */
.role-badge {
  position: absolute; left: -2%; top: -2%; width: 30%; max-width: 36px; aspect-ratio: 1; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--role, var(--teal)); padding: 3px; object-fit: contain;
  box-shadow: 0 3px 8px rgba(31, 74, 66, .25); z-index: 2;
}
.hero-card.locked .role-badge { filter: grayscale(.8); opacity: .7; }
#screen-roster .screen-footer { margin-top: -66px; } /* footer menumpang di padding-bottom grid (dashboard-focus.css) */
/* Gembok SVG krem di lingkaran krem: padding piksel tetap (persen = relatif lebar avatar → gambar hilang) */
#screen-roster .lock-badge { padding: 4px; box-sizing: border-box; background: var(--card); border-color: #e4d9bf; }
#screen-roster .hero-card.locked .lock-badge { background: var(--card); }

/* ---- Shop: chip-nav bagian (sticky) ---- */
.shop-nav {
  position: sticky; top: 0; z-index: 4; width: 100%; max-width: 620px; flex: 0 0 auto; /* flex item overflow:auto → min-height 0; jangan biarkan menyusut */
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px;
  background: linear-gradient(var(--cream) 78%, transparent); -webkit-overflow-scrolling: touch;
}
.shop-nav::-webkit-scrollbar { display: none; }
.shop-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 5px 12px 5px 7px; border-radius: 999px; border: 2px solid transparent;
  background: var(--card); color: var(--ink-soft); font-family: var(--font); font-weight: 900; font-size: 11.5px;
  box-shadow: var(--shadow-card); cursor: pointer; transition: transform .1s, border-color .15s, color .15s;
}
.shop-chip img { width: 22px; height: 22px; object-fit: contain; }
.shop-chip.active { border-color: var(--teal); color: var(--teal-dark); background: #fff; }
.shop-chip:active { transform: scale(.95); }

/* ---- Shop: kepala bagian dengan ikon bespoke ---- */
.shop-section { scroll-margin-top: 56px; }
.ss-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.ss-ico { width: 34px; height: 34px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 3px rgba(31, 74, 66, .18)); }
.ss-text { display: flex; flex-direction: column; min-width: 0; }
#screen-shop .shop-section .ss-text h3, .shop-section .ss-text h3 { margin: 0; line-height: 1.15; }
.ss-sub { font-size: 10px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }

/* ---- Shop: kartu — ikon bespoke, harga berikon, badge peran & pill tier ---- */
.shop-ico { width: 56px; height: 56px; font-size: 56px; filter: drop-shadow(0 5px 7px rgba(31, 74, 66, .2)); }
#screen-shop .shop-ico { width: 48px; height: 48px; font-size: 48px; }
.price { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.price .inline-coin { width: 14px; height: 14px; margin: 0; }
.price-tag { display: inline-flex; align-items: center; }
.price-tag.imu { background: linear-gradient(180deg, #d9f6f1, #bfeae2); color: var(--teal-dark); box-shadow: 0 4px 10px rgba(47, 156, 143, .35); }
.shop-card .role-badge { width: 30px; max-width: 30px; left: -8px; top: -8px; }
.shop-card .tier-pill { font-size: 7.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 2px 8px; border-radius: 999px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.shop-card .s-owned.has { color: var(--teal-deep); }
.shop-card.owned .shop-sprite { filter: drop-shadow(0 0 8px rgba(53, 224, 200, .55)); }
.shop-card img.lock-badge { width: 30px; height: 30px; padding: 3px; box-sizing: border-box; background: var(--card); border: 2px solid #e4d9bf; }
/* gembok kecil (prep/kampanye): tanpa lingkaran, ukuran cukup agar detail terbaca */
.prep-hero .ph-lock { width: 26px; height: 26px; top: -8px; right: -8px; filter: drop-shadow(0 1px 1px rgba(18,63,58,.25)); }
.camp-lock { width: 24px; height: 24px; right: -8px; top: -8px; filter: drop-shadow(0 1px 1px rgba(18,63,58,.25)); }
.shop-card.c-gold { background: linear-gradient(170deg, #fbefcf, #f6dd9c); }

/* Skin: swatch warna + ikon aksesori */
.skin-card { position: relative; }
.skin-swatch { position: absolute; top: 7px; right: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--swatch, var(--teal)); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.skin-preview.acc-ico { display: flex; align-items: center; justify-content: center; }
.skin-preview.acc-ico img { width: 44px; height: 44px; object-fit: contain; }
.ft-btn .price .inline-coin { width: 13px; height: 13px; }

/* Gratis: kepala tile berikon */
.ft-head { display: flex; align-items: center; gap: 7px; }
.ft-ico { width: 24px; height: 24px; object-fit: contain; }

/* Premium: tombol harga SELALU berwarna (sebelumnya .btn menimpa → kotak putih kosong) */
.premium-card .btn-prem, .btn.btn-prem {
  background: linear-gradient(180deg, var(--pc, #2f9c8f), color-mix(in srgb, var(--pc, #2f9c8f) 78%, #123f3a)) !important;
  color: #fff !important; text-shadow: 0 1px 0 rgba(0, 0, 0, .18); font-size: 13px; padding: 9px 0; min-height: 40px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--pc, #2f9c8f) 45%, transparent), inset 0 2px 0 rgba(255, 255, 255, .25);
}
@supports not (color: color-mix(in srgb, red, blue)) {
  .premium-card .btn-prem, .btn.btn-prem { background: var(--pc, #2f9c8f) !important; box-shadow: var(--shadow-card); }
}
.premium-card .btn-prem:disabled { filter: grayscale(.6); opacity: .7; }
.prem-badge { background: var(--pc, #2f9c8f); }
.prem-ico { width: 30px; height: 30px; object-fit: contain; align-self: flex-start; }
.premium-card { border-width: 2.5px; }

/* ---- Lab Pasukan: tab berikon + ikon baris bespoke ---- */
.upg-tab { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.ut-ico { width: 20px; height: 20px; display: inline-flex; line-height: 0; }
.ut-ico svg { width: 100%; height: 100%; }
.upg-tab:not(.active) .ut-ico { filter: grayscale(.7); opacity: .65; }
.upg-icon { font-size: 30px; }
.upg-icon .mi { width: 32px; height: 32px; }
.upg-icon.global { background: linear-gradient(160deg, #fdf0c8, #f7dd9a); }
.hl-chip .mi { width: 16px; height: 16px; }
.hl-banner-role img { width: 24px; height: 24px; object-fit: contain; }
.hl-banner-role { padding: 0; }
.btn-hl-up .inline-coin { width: 16px; height: 16px; margin: 0 3px; }

/* Level-up & Tas memakai ikon bespoke yang sama */
.choice-icon .mi { width: 32px; height: 32px; }
.bag-card .bag-sprite.mi { width: 44px; height: 44px; font-size: 44px; }

/* Ikon SVG di tempat PNG lama (ukuran mengikuti class lama; drop-shadow PNG dibuang) */
.lock-badge[src$=".svg"], .camp-lock[src$=".svg"], .ph-lock[src$=".svg"], .lock-ico[src$=".svg"], .bp-state[src$=".svg"] { object-fit: contain; }

/* ================= PHAGOS EXPERIMENT =================
 * Gaya satu-tombol PULSE, Bio-Point, membran hidup, kartu mutasi.
 * Semua class diawali pulse-/hud-bio/hud-living/mutation- agar mudah dicabut. */

/* --- Tombol PULSE (#btn-pulse) + overlay cooldown radial --- */
#screen-hud .pulse-btn { overflow: hidden; }
#screen-hud .pulse-btn .pulse-cd {
  position: absolute; inset: 0; border-radius: 50%;
  pointer-events: none;
}
#screen-hud .pulse-btn .pulse-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none;
}
#screen-hud .pulse-btn .pulse-label {
  font-size: 11px; font-weight: 900; letter-spacing: .12em; color: #eafff8;
  text-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none; z-index: 1;
}
#screen-hud .pulse-btn.pulse-ready {
  animation: pulse-ready-glow 1.1s ease-in-out infinite;
  border-color: #eafff8;
}
@keyframes pulse-ready-glow {
  0%, 100% { box-shadow: 0 5px 14px rgba(26,140,125,.42), 0 0 0 0 rgba(141,247,210,.55); }
  50% { box-shadow: 0 5px 14px rgba(26,140,125,.42), 0 0 0 10px rgba(141,247,210,0); }
}
#screen-hud .pulse-btn.pulse-meta {
  background: linear-gradient(170deg, #b366d9, #7b2fa0) !important;
}

/* --- Chip Bio-Point + mutasi aktif --- */
.hud-bio-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(20, 90, 80, .85); color: #eafff8;
  font-size: 12px; font-weight: 800; pointer-events: auto;
  border: 1.5px solid rgba(141, 247, 210, .5);
}
.hud-bio-chip .bio-dot { color: #8df7d2; font-size: 13px; }
.hud-bio-chip small { font-size: 9px; opacity: .75; font-weight: 700; }
.hud-bio-chip .bio-muts { margin-left: 6px; font-size: 11px; color: #ffd93d; }
.hud-bio-chip.rich { border-color: #ffd93d; box-shadow: 0 0 8px rgba(255, 217, 61, .5); }
.hud-bio-chip.richer { background: linear-gradient(160deg, #6b3fa0, #3d2066); border-color: #e0aaff; }

/* --- Bar membran hidup --- */
.hud-living-wrap {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  pointer-events: none;
}
.hud-living-wrap.hidden { display: none; }
.hud-living-label {
  font-size: 8px; font-weight: 900; letter-spacing: .1em; color: #0e6e62;
}
.hud-living-track {
  width: 90px; height: 7px; border-radius: 999px; overflow: hidden;
  background: rgba(14, 110, 98, .2); border: 1px solid rgba(14, 110, 98, .4);
}
.hud-living-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #8df7d2, #2fb3a2);
  transition: width .2s ease;
}
.hud-living-wrap.down .hud-living-fill { background: linear-gradient(90deg, #ff8496, #d7263d); }
.hud-living-wrap.down .hud-living-label { color: #d7263d; animation: hp-pulse .6s infinite; }

/* --- Kartu mutasi level-up --- */
.choice-card.mutation-card { text-align: left; border-width: 3px; }
.choice-card.mutation-card.tier-1 { border-color: #8df7d2; background: linear-gradient(160deg, #e6fbf3, #c8f2e2) !important; }
.choice-card.mutation-card.tier-2 { border-color: #7fdbff; background: linear-gradient(160deg, #e8f7ff, #c9ecff) !important; }
.choice-card.mutation-card.tier-3 { border-color: #c39bd3; background: linear-gradient(160deg, #f4e9fa, #e4cff0) !important; }
.choice-card.mutation-card.locked { filter: grayscale(.6); opacity: .72; cursor: not-allowed; }
.mutation-icon { font-size: 34px !important; line-height: 1; }
.mut-tier { background: #0e6e62; color: #eafff8; }
.bio-cost { background: #ffd93d; color: #5b4303; }
.bio-cost.locked { background: #d7263d; color: #fff; }
.bio-free { background: #8df7d2; color: #0b3d33; }
.mut-lore { font-style: italic; opacity: .75; font-size: 11px; margin-top: 2px; }
.choice-card.safety-card { border-style: dashed; }
.safety-badge { background: #8a8a8a; color: #fff; }

/* PHAGOS: ikon sprite mutasi di kartu level-up */
.choice-mut-sprite {
  width: 52px; height: 52px; object-fit: contain; flex: none;
  filter: drop-shadow(0 2px 3px rgba(14,110,98,.35));
  animation: mut-sprite-bob 2.2s ease-in-out infinite;
}
@keyframes mut-sprite-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}
.choice-card.mutation-card.locked .choice-mut-sprite { filter: grayscale(.8); opacity: .7; animation: none; }

/* ADDENDUM §1.4: layar buka Kapsul Membran */
#screen-capsule .capsule-box { position: relative; text-align: center; background: radial-gradient(ellipse at 50% 30%, #16484a 0%, #0b2224 70%); border: 2px solid #2c7a78; max-width: 420px; }
#screen-capsule.epic-shake .capsule-box { animation: capsule-quake .9s linear; }
@keyframes capsule-quake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 3px) rotate(-1deg); }
  40% { transform: translate(5px, -4px) rotate(1deg); }
  60% { transform: translate(-4px, -3px); }
  80% { transform: translate(4px, 3px); }
}
.capsule-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: #9fd8cc; font-size: 18px; cursor: pointer; }
.capsule-title { color: #8df7d2; letter-spacing: 2px; margin: 4px 0 0; font-size: 22px; }
.capsule-sub { color: #9fd8cc; margin: 2px 0 8px; font-size: 13px; }
.capsule-stage { position: relative; width: 360px; max-width: 100%; height: 320px; margin: 0 auto; }
#capsule-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.capsule-ball { position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(141,247,210,.55), rgba(44,122,120,.55) 45%, rgba(20,60,62,.85) 75%);
  border: 3px solid rgba(141,247,210,.8); box-shadow: 0 0 40px rgba(141,247,210,.35), inset 0 0 40px rgba(141,247,210,.25);
  animation: capsule-pulse 1.6s ease-in-out infinite; transition: transform .3s, opacity .3s; }
@keyframes capsule-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.capsule-ball.shaking { animation: capsule-shake .12s linear infinite; border-color: #ffd166; }
@keyframes capsule-shake { 0% { transform: translate(-4px, 2px) rotate(-4deg); } 50% { transform: translate(4px, -2px) rotate(4deg); } 100% { transform: translate(-3px, -3px) rotate(-2deg); } }
.capsule-ball.cracked { animation: capsule-crackflash .9s ease-out; border-color: #fff; }
@keyframes capsule-crackflash { 0% { transform: scale(1); filter: brightness(1); } 30% { transform: scale(1.15); filter: brightness(2.2); } 100% { transform: scale(1.3); filter: brightness(1.4); } }
.capsule-ball.gone { transform: scale(0); opacity: 0; pointer-events: none; }
.capsule-shine { position: absolute; left: 22px; top: 16px; width: 44px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.35); transform: rotate(-25deg); }
.capsule-silhouette { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 900; color: rgba(6,26,28,.85); }
.capsule-reveal { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.capsule-reveal.pop-in { animation: capsule-pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes capsule-pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.capsule-hero-img { width: 130px; height: 130px; object-fit: contain; }
.capsule-hero-name { font-size: 30px; font-weight: 900; color: #fff; }
.capsule-hero-tier { font-size: 13px; font-weight: 900; letter-spacing: 3px; color: #08181a; padding: 3px 14px; border-radius: 20px; margin: 4px 0; }
.capsule-hero-field { font-size: 14px; color: #8df7d2; }
.capsule-hero-count { font-size: 12px; color: #9fd8cc; }
.capsule-hint { color: #ffd166; min-height: 20px; font-weight: 700; }
.capsule-btns { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.capsule-share-note { color: #9fd8cc; font-size: 12px; min-height: 16px; }
.linklike { background: none; border: none; color: #6fa9a2; text-decoration: underline; cursor: pointer; font-size: 13px; }

/* ADDENDUM §3.5: banner Strain of the Week */
.strain-banner { display: flex; align-items: center; gap: 10px; margin: 8px 12px; padding: 8px 12px;
  background: linear-gradient(90deg, rgba(195,155,211,.18), rgba(44,122,120,.18));
  border: 1px solid #c39bd3; border-radius: 10px; color: #eafff7; font-size: 13px; }
.strain-banner .strain-tag { font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: #0b2224;
  background: #c39bd3; padding: 3px 8px; border-radius: 12px; white-space: nowrap; }
.strain-banner b { color: #ffd166; font-size: 15px; }
.strain-banner small { color: #9fd8cc; margin-left: auto; text-align: right; }

/* ADDENDUM §3.3: modal challenge */
.challenge-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(4,18,20,.72); }
.challenge-box { max-width: 380px; text-align: center; }
.challenge-box h2 { color: #ffd166; margin: 4px 0; }
.challenge-sub { color: #9fd8cc; font-size: 13px; margin: 0 0 8px; }

/* ADDENDUM P2 §6.6: modal build share */
.build-hero { color: #ffd166; font-weight: 800; margin: 6px 0; }
.build-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0; }
.build-chip { font-size: 12px; font-weight: 700; color: #0b2224; background: #7fe3d0; padding: 3px 10px; border-radius: 12px; }
.build-note { color: #9fd8cc; font-size: 11px; display: block; margin-bottom: 8px; }
