/* WNI Lite · gaya prototipe M1. Gaya visual final ditentukan di M7. */
:root {
  --bg: #12192b;
  --bg-2: #0d1322;
  --panel: #1c2540;
  --panel-2: #26304f;
  --line: #2f3a5c;
  --ink: #f3f1ea;
  --muted: #9aa3bd;
  --accent: #f0b93a;
  --danger: #e2484d;
  --good: #34c27a;
  --paper: #fbf5e6;
  --paper-ink: #1a1f2e;

  --duit: #2fb872;
  --ngeles: #4f8cff;
  --orangdalam: #a873f5;
  --nekat: #ff5a45;
  --netral: #8f98b3;
  --beban: #7a4a33;
  --shield: #5aa9ff;
  --viral: #ff4fa3;

  --card-w: 96px;
  --card-h: 142px;
  --hand-h: 178px;

  --font-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; }
body {
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.app {
  position: relative;
  height: 100%;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

/* Aliran: warna dipakai kartu, chip, dll */
.flow-duit { --flow: var(--duit); }
.flow-ngeles { --flow: var(--ngeles); }
.flow-orangdalam { --flow: var(--orangdalam); }
.flow-nekat { --flow: var(--nekat); }
.flow-netral { --flow: var(--netral); }
.flow-beban { --flow: var(--beban); }

/* ---------- Layar judul ---------- */
.title {
  height: 100%;
  overflow-y: auto;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.title h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 16vw, 68px);
  line-height: .88;
  margin: 0;
  letter-spacing: -.03em;
}
.title h1 span { color: var(--accent); display: block; }
.tagline { margin: 0; line-height: 1.5; color: var(--muted); max-width: 36ch; }
.build {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  align-self: flex-start;
}
.versus {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.versus-art { width: 104px; flex: none; }
.versus-art svg { width: 100%; height: auto; display: block; }
.versus-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.versus-info > b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.versus-tag { font-family: var(--font-mono); font-size: 11px; color: var(--danger); text-transform: uppercase; letter-spacing: .08em; }
.versus-hp { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.howto { margin: 0; padding: 0 0 0 20px; display: grid; gap: 6px; color: var(--muted); line-height: 1.45; font-size: 14px; }
.howto b { color: var(--ink); }
.seed-field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
}
.seed-field span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.seed-field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  outline: none;
  padding: 8px 0;
}
.seed-field button { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); display: grid; place-items: center; color: var(--accent); }
.title-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.btn-primary, .btn-ghost {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .01em;
}
.btn-primary { background: var(--accent); color: #1a1406; box-shadow: 0 4px 0 #a87a14; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #a87a14; }
.btn-ghost { border: 2px solid var(--line); color: var(--ink); font-size: 16px; padding: 12px 18px; }

/* ---------- Pertarungan ---------- */
.combat {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto var(--hand-h);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(120% 60% at 50% 18%, #233058 0%, transparent 70%),
    var(--bg);
}
.combat::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px 10px rgba(226, 72, 77, 0);
  transition: box-shadow .4s;
  z-index: 90;
}
.combat.hurt::after { animation: hurtFlash .45s ease-out; }
.combat.lost::after { box-shadow: inset 0 0 140px 40px rgba(226, 72, 77, .55); }
.combat.hitstop { filter: contrast(1.4) brightness(1.3); }
@keyframes hurtFlash {
  0% { box-shadow: inset 0 0 90px 24px rgba(226, 72, 77, .7); }
  100% { box-shadow: inset 0 0 90px 10px rgba(226, 72, 77, 0); }
}

.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 4px;
}
.hud-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; color: var(--muted); flex: none; }
.hud-mid { flex: 1; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hud-act { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hud-turn { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.hud-duit {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
}
.duit-label { font-family: var(--font-mono); font-size: 11px; color: var(--duit); text-transform: uppercase; letter-spacing: .06em; }
.hud-duit b { font-family: var(--font-mono); font-size: 17px; color: var(--ink); }

.arena { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.enemies { display: flex; justify-content: center; width: 100%; padding: 0 64px 0 12px; }
.enemy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 300px;
  border-radius: 18px;
  padding: 4px 4px 8px;
  transition: background .2s, box-shadow .2s;
}
.enemy.targetable { background: rgba(240, 185, 58, .06); box-shadow: 0 0 0 2px rgba(240, 185, 58, .45); cursor: pointer; }
.intent {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 14px;
  padding: 7px 12px 8px;
  text-align: center;
  max-width: 100%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.intent::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: var(--paper);
}
.intent-name { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #6a6f80; }
.intent-line { font-weight: 700; font-size: 14px; line-height: 1.25; }
.intent-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 3px; }
.pill { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #e7e0cf; }
.pill-atk { background: var(--danger); color: #fff; }
.pill-debuff { background: #7d4bd6; color: #fff; }
.pill-beban { background: var(--beban); color: #fff; }

.enemy-art { width: min(200px, 52vw); aspect-ratio: 220 / 210; transform-origin: 50% 100%; }
.enemy-art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.art .part { transition: opacity .35s, transform .5s cubic-bezier(.5, 0, .9, .4); transform-box: fill-box; transform-origin: center; }
.art .part.gone { opacity: 0; transform: translateY(40px) rotate(25deg); }
.art .eye { animation: blink 2.6s infinite; }
.art .glow { animation: glow 1.6s ease-in-out infinite alternate; }
.art .legs { opacity: 0; }
.art .collector { transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); transform-box: view-box; }
.enemy.phase2 .art .pile { opacity: 0; transition: opacity .5s; }
.enemy.phase2 .art .legs { opacity: 1; }
.enemy.phase2 .art .collector { transform: translateY(26px); }
.enemy.collapse .art .pile { opacity: 0; transform: translateY(30px) scaleY(.6); transition: transform .5s, opacity .6s; transform-box: view-box; transform-origin: 50% 100%; }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .2; } }
@keyframes glow { from { opacity: .4; } to { opacity: 1; } }
.enemy-art.hit { animation: hit .28s ease-out; }
@keyframes hit {
  0% { filter: brightness(3) saturate(0); transform: scale(.94) skewX(-3deg); }
  100% { filter: none; transform: none; }
}
.enemy-art.lunge { animation: lunge .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes lunge { 40% { transform: translateY(14px) scale(1.12); } 100% { transform: none; } }
.enemy.dead .enemy-art { filter: grayscale(1) brightness(.6); transition: filter .6s; }
.enemy.dead .intent { visibility: hidden; }

.enemy-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1; display: flex; align-items: center; gap: 6px; }
.role { font-family: var(--font-mono); font-size: 10px; font-weight: 700; background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; }
.affinity { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.aff {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1.5px solid;
  line-height: 1.2;
}
.aff b { color: var(--flow); }
.aff-weak { border-color: var(--good); color: var(--good); background: rgba(52, 194, 122, .1); }
.aff-resist { border-color: var(--danger); color: #ff8a8d; background: rgba(226, 72, 77, .1); }
.aff-resist b { opacity: .85; }

.bar {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #0b0f1c;
  border: 2px solid #0b0f1c;
  overflow: hidden;
}
.bar-enemy { width: min(230px, 62vw); }
.bar-fill, .bar-ghost { position: absolute; inset: 0 auto 0 0; border-radius: 999px; transition: width .25s ease-out; }
.bar-ghost { background: #ffd9a1; transition: width .5s ease-in; }
.bar-enemy .bar-fill { background: linear-gradient(#ff6a5c, #d63a3e); }
.bar-text { position: relative; display: block; text-align: center; font-family: var(--font-mono); font-size: 11.5px; line-height: 14px; color: #fff; text-shadow: 0 1px 2px #000; }
.bar-text b { font-size: 12.5px; }

.statuses { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 22px; }
.chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  line-height: 1.4;
}
.chip b { font-family: var(--font-mono); }
.chip-debuff { border-color: #7d4bd6; color: #d5c2ff; }
.chip-buff { border-color: #a35a1e; color: #ffc48a; }
.st-viral.chip { border-color: var(--viral); color: #ff9fcd; }
.chip.pop { animation: chipPop .35s ease-out; }
@keyframes chipPop { 40% { transform: scale(1.35); } }

/* Meter Combo */
.combo {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0;
  border-radius: 16px;
  background: var(--panel);
  border: 2px solid var(--line);
  --c: var(--ink);
  cursor: pointer;
}
.combo[data-level="1"] { --c: var(--accent); border-color: #6d5520; }
.combo[data-level="2"] { --c: #ff9a3c; border-color: #7a4317; }
.combo[data-level="3"] { --c: #ff5a45; border-color: #8a2a22; box-shadow: 0 0 18px rgba(255, 90, 69, .35); }
.combo[data-level="4"], .combo[data-level="5"] { --c: #ff4fa3; border-color: #8c2459; box-shadow: 0 0 26px rgba(255, 79, 163, .55); }
.combo-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--muted); }
.combo-val { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; color: var(--c); }
.combo-next { font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.15; padding: 0 3px; }
.combo-next.streak { color: var(--accent); }
.combo.jump .combo-val { animation: comboJump .3s cubic-bezier(.3, 1.8, .5, 1); }
.combo.jump-big .combo-val { animation: comboJumpBig .42s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes comboJump { 40% { transform: scale(1.45) translateY(-4px); } }
@keyframes comboJumpBig { 35% { transform: scale(1.9) rotate(-8deg); } 70% { transform: scale(.95) rotate(3deg); } }

/* Pemain */
.me { padding: 4px 16px 2px; display: flex; flex-direction: column; gap: 4px; }
.me-row { display: flex; align-items: center; gap: 8px; }
.bar-me { flex: 1; height: 22px; }
.bar-me .bar-fill { background: linear-gradient(#4fd68f, #23a35f); }
.bar-me .bar-text { line-height: 18px; font-size: 12.5px; }
.me.low .bar-me .bar-fill { background: linear-gradient(#ff8a5c, #e2484d); animation: lowPulse 1s infinite alternate; }
@keyframes lowPulse { to { filter: brightness(1.35); } }
.shield { position: relative; width: 34px; height: 38px; color: var(--shield); flex: none; display: grid; place-items: center; cursor: pointer; }
.shield svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 2px 0 #1b3d6a); }
.shield b { position: relative; font-family: var(--font-mono); font-size: 14px; color: #0b1a33; }
.shield.pop { animation: chipPop .35s ease-out; }
.me .statuses { justify-content: flex-start; min-height: 0; }

/* Kontrol */
.controls { display: flex; align-items: center; gap: 8px; padding: 6px 12px 4px; }
.energy {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--accent) 55%, #a87a14);
  color: #2a1d02;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 11px;
  box-shadow: 0 0 0 3px #3a2c0c, 0 0 18px rgba(240, 185, 58, .35);
  flex: none;
  cursor: pointer;
}
.energy b { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; }
.energy span { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.energy i { font-style: normal; }
.energy.empty { filter: grayscale(1) brightness(.6); box-shadow: 0 0 0 3px #2a2a2a; }
.pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 56px;
}
.pile span { font-family: var(--font-mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pile b { font-family: var(--font-mono); font-size: 15px; }
.pile.pop { animation: chipPop .35s ease-out; }
.end-btn {
  margin-left: auto;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 4px 0 #8e8a7c;
}
.end-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8e8a7c; }
.end-btn.nudge { background: var(--accent); box-shadow: 0 4px 0 #a87a14; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.06); } }
.combat.busy .end-btn { opacity: .5; }

/* Tangan kartu */
.hand { position: relative; touch-action: none; overflow: visible; z-index: 20; }
.card {
  position: absolute;
  left: var(--x, 0);
  bottom: 12px;
  width: var(--card-w);
  height: var(--card-h);
  transform: translateY(var(--y, 0)) rotate(var(--r, 0));
  transform-origin: 50% 100%;
  transition: transform .2s cubic-bezier(.3, 1.3, .5, 1), left .22s ease-out, opacity .2s, filter .2s;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 11px;
  border: 2px solid #0b0f1c;
  box-shadow: 0 3px 0 #0b0f1c, 0 8px 14px rgba(0, 0, 0, .35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.card.selected { transform: translateY(var(--y)) scale(1.14); box-shadow: 0 0 0 3px var(--accent), 0 12px 24px rgba(0, 0, 0, .5); }
.card.dragging { transition: none; transform: translate(var(--dx, 0), var(--dy, 0)) scale(1.14); }
.card.disabled { filter: grayscale(.75) brightness(.8); }
.card.disabled.selected { box-shadow: 0 0 0 3px var(--muted), 0 12px 24px rgba(0, 0, 0, .5); }
.card.leaving { pointer-events: none; transition: transform .3s cubic-bezier(.5, 0, .9, .5), opacity .3s; transform: translateY(-260px) scale(.6) rotate(-6deg); opacity: 0; }
.card.discarding { transition: transform .25s ease-in, opacity .25s; transform: translateY(120px) rotate(var(--r)); opacity: 0; }
.card.dealt { animation: deal .32s cubic-bezier(.3, 1.3, .5, 1) backwards; }
@keyframes deal { from { opacity: 0; transform: translate(-140px, 60px) rotate(-30deg) scale(.6); } }

.card-top {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 5px;
  background: var(--flow);
}
.card-cost {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--accent);
  color: #2a1d02;
  border: 2px solid #0b0f1c;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}
.card-pay {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  background: #0b0f1c;
  color: #8ff0b8;
  padding: 2px 5px;
  border-radius: 5px;
}
.card-name { font-family: var(--font-display); font-weight: 800; font-size: 13px; line-height: 1.05; padding: 5px 6px 0; }
.card-kind { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; color: #6a6f80; padding: 2px 6px 0; }
.card-text { flex: 1; min-height: 0; overflow: hidden; font-size: 10px; line-height: 1.25; padding: 4px 6px 0; color: #2c3245; }
.card-badge {
  flex: none;
  align-self: center;
  margin: 2px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 8px;
  background: #0b0f1c;
  color: #fff;
  white-space: nowrap;
}
.card-badge b { font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1; }
.card-badge i { font-style: normal; font-family: var(--font-mono); font-size: 8.5px; color: var(--muted); text-transform: uppercase; }
.card-badge.good b { color: #6cf0a6; }
.card-badge.bad b { color: #ff8a8d; }
.card-badge.shd b { color: var(--shield); }
.card-badge.duit b { color: #8ff0b8; }
.card.type-beban { background: #2a1d17; color: #f0d9c9; border-style: dashed; border-color: #c27a4e; }
.card.type-beban .card-top { background: repeating-linear-gradient(45deg, #7a4a33 0 6px, #5d3626 6px 12px); }
.card.type-beban .card-kind { color: #c9a58e; }
.card.type-beban .card-text { color: #f0d9c9; }

/* Detail kartu terpilih */
.detail {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(var(--hand-h) + env(safe-area-inset-bottom, 0px) + 60px);
  z-index: 30;
  background: #0d1322;
  border: 1px solid var(--line);
  border-left: 5px solid var(--flow);
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
  animation: detailIn .18s ease-out;
}
@keyframes detailIn { from { opacity: 0; transform: translateY(8px); } }
.detail-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.detail-head b { font-family: var(--font-display); font-size: 17px; }
.detail-head span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.detail p { margin: 4px 0 0; line-height: 1.35; }
.detail-text { font-size: 14px; }
.detail-flavor { font-size: 12.5px; color: var(--muted); font-style: italic; }
.detail-hint { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.detail-hint.warn { color: #ff8a8d; }

/* Getar */
.shaking { animation: shake .4s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translate(calc(var(--shake) * -.3), 0); }
  20%, 80% { transform: translate(calc(var(--shake) * .6), calc(var(--shake) * .2)); }
  30%, 50%, 70% { transform: translate(calc(var(--shake) * -1), calc(var(--shake) * -.3)); }
  40%, 60% { transform: translate(var(--shake), calc(var(--shake) * .3)); }
}
.card.shaking { animation: cardShake .35s; }
@keyframes cardShake { 25% { margin-left: -6px; } 75% { margin-left: 6px; } }

/* ---------- Efek ---------- */
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.fx { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; }
.fx-num {
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  -webkit-text-stroke: 2px #0b0f1c;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #0b0f1c;
  animation: numFly .95s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
.fx-num.fx-weak { color: #6cf0a6; }
.fx-num.fx-resist { color: #b9bfd1; }
.fx-num.fx-viral { color: var(--viral); }
.fx-num.fx-trend-num { color: #ff4fa3; }
.fx-num.fx-hurt { color: #ff6a5c; }
.fx-num.fx-self { color: #ffb26b; }
@keyframes numFly {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; }
  18% { transform: translate(-50%, -80%) scale(1.3); opacity: 1; }
  35% { transform: translate(-50%, -85%) scale(1); }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(.9); opacity: 0; }
}
.fx-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  text-shadow: 0 2px 0 #0b0f1c, 0 0 8px rgba(0, 0, 0, .6);
  animation: tagFly 1.1s ease-out forwards;
}
@keyframes tagFly {
  0% { transform: translate(-50%, -30%) scale(.7); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -130%); opacity: 0; }
}
.fx-mempan { font-size: 26px; color: #6cf0a6; transform-origin: center; animation-duration: 1.2s; }
.fx-nggak { font-size: 17px; color: #b9bfd1; font-style: italic; }
.fx-streak { font-size: 18px; color: var(--accent); }
.fx-shield { color: var(--shield); }
.fx-duit { color: #8ff0b8; font-size: 15px; }
.fx-duit-minus { color: #ffb26b; font-size: 15px; }
.fx-status { font-size: 15px; color: #d5c2ff; }
.fx-status.st-viral { color: #ff9fcd; }
.fx-status.st-atk { color: #ffb26b; }
.fx-beban { color: #f0b48e; font-size: 15px; }
.fx-info, .fx-blocked { color: var(--muted); font-size: 13px; }
.fx-warn { color: #ff8a8d; font-size: 14px; }
.fx-overkill { color: var(--accent); font-size: 18px; }
.fx-action {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  background: var(--danger);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  text-shadow: none;
}
.fx-banner {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  text-align: center;
  color: var(--ink);
  text-shadow: 0 3px 0 #0b0f1c;
  animation: bannerIn 1s ease-out forwards;
}
.fx-banner small { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); text-shadow: none; }
.fx-turn { font-size: 28px; animation-duration: .8s; }
.fx-enemy-turn { color: #ff8a8d; }
.fx-trending { font-size: 54px; color: var(--viral); -webkit-text-stroke: 2px #0b0f1c; paint-order: stroke fill; animation-duration: 1.1s; }
.fx-speech {
  white-space: normal;
  width: min(320px, 86%);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  background: var(--paper);
  color: var(--paper-ink);
  text-shadow: none;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .4);
  animation: speechIn 1.9s ease-out forwards;
}
@keyframes bannerIn {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}
@keyframes speechIn {
  0% { transform: translate(-50%, -40%) scale(.8); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
.fx-coin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #f2c14e 50%, #b88a1c);
  border: 1.5px solid #7d5c10;
  animation: coin .9s cubic-bezier(.3, -.4, .7, 1) forwards;
}
@keyframes coin {
  0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; }
}
.fx-stamp {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 5;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 46px;
  letter-spacing: .04em;
  color: var(--danger);
  border: 5px solid var(--danger);
  border-radius: 10px;
  padding: 2px 16px;
  background: rgba(251, 245, 230, .08);
  transform: translate(-50%, -50%) rotate(-14deg);
  mix-blend-mode: screen;
  animation: stampIn .35s cubic-bezier(.2, 1.6, .4, 1);
  pointer-events: none;
}
@keyframes stampIn {
  0% { transform: translate(-50%, -50%) rotate(-14deg) scale(3); opacity: 0; }
  100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; }
}

/* Lembar info */
.sheet { position: absolute; inset: 0; z-index: 95; background: rgba(5, 8, 16, .6); display: flex; align-items: flex-end; }
.sheet-card {
  width: 100%;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 70%;
  overflow-y: auto;
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 20px; }
.sheet-card p { margin: 0; line-height: 1.5; color: var(--muted); }
.sheet-close { margin-top: 14px !important; font-family: var(--font-mono); font-size: 11px; text-align: center; }
.pile-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.pile-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel-2); }
.pile-list .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--flow); flex: none; }
.pile-list b { flex: 1; font-weight: 600; }
.pile-list span:last-child { font-family: var(--font-mono); color: var(--muted); }

/* Overlay menu dan hasil */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(5, 8, 16, .78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .25s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.menu-card, .result-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-card h3 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.menu-seed, .result-seed { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.menu-seed b, .result-seed b { color: var(--ink); }
.result-card { position: relative; text-align: center; padding-top: 28px; animation: resultIn .4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes resultIn { from { transform: translateY(30px) scale(.95); opacity: 0; } }
.result-stamp {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .05em;
  color: var(--danger);
  border: 5px solid var(--danger);
  border-radius: 10px;
  padding: 0 14px;
  white-space: nowrap;
  transform: rotate(-8deg);
  animation: resultStamp .4s .1s cubic-bezier(.2, 1.6, .4, 1) backwards;
}
@keyframes resultStamp { from { transform: rotate(-8deg) scale(3); opacity: 0; } }
.result.won .result-stamp { color: var(--good); border-color: var(--good); }
.result-card h2 { margin: 6px 0 0; font-family: var(--font-display); font-size: 26px; }
.result-line { margin: 0; color: var(--muted); line-height: 1.45; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.result-stats div { background: var(--panel-2); border-radius: 10px; padding: 8px; }
.result-stats dt { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.result-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; }

/* Layar pendek */
@media (max-height: 720px) {
  :root { --card-w: 92px; --card-h: 130px; --hand-h: 162px; }
  .enemy-art { width: min(160px, 44vw); }
  .intent-line { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-coin { display: none; }
  .card.dealt { animation: none; }
}

/* Pop kecil untuk elemen HUD */
.hud-duit.pop, .intent.pop { animation: chipPop .35s ease-out; }

/* ---------- M2 ---------- */
:root { --jajan: #f0b93a; --healing: #ff7ab0; --koneksi: #a873f5; }

/* Titik progres run */
.dots, .run-dots { display: inline-flex; gap: 4px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.dot.done { background: var(--good); }
.dot.now { background: var(--accent); box-shadow: 0 0 0 3px rgba(240, 185, 58, .25); }
.dot-elite { border-radius: 2px; transform: rotate(45deg); }
.run-dots { justify-content: center; gap: 8px; }
.run-dots .dot { width: 11px; height: 11px; }

/* Baris Self Reward + Deck di bawah HUD */
.subhud { display: flex; align-items: center; gap: 8px; padding: 0 12px 2px; }
.sr-slots { display: flex; gap: 6px; flex: 1; min-width: 0; }
.sr-slot {
  flex: 1;
  min-width: 0;
  max-width: 104px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  background: var(--panel);
  border: 1.5px solid var(--line);
}
.sr-slot b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-slot.empty { border-style: dashed; opacity: .55; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.sr-slot.empty::after { content: "Self Reward"; }
.sr-slot.tier-jajan { border-color: var(--jajan); color: #ffe2a0; background: rgba(240, 185, 58, .1); }
.sr-slot.tier-healing { border-color: var(--healing); color: #ffc2dc; background: rgba(255, 122, 176, .1); }
.deck-btn {
  display: flex;
  align-items: baseline;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.deck-btn span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; }
.deck-btn b { font-family: var(--font-mono); font-size: 14px; }

/* Koneksi */
.koneksi { display: flex; gap: 6px; flex-wrap: wrap; cursor: pointer; }
.kon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  background: rgba(168, 115, 245, .14);
  border: 1.5px solid var(--koneksi);
  color: #dcc8ff;
}
.kon b { font-family: var(--font-mono); color: #fff; }
.kon-face { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 50% 38%, #d79c70 0 34%, transparent 35%), radial-gradient(circle at 50% 100%, #3a2a5c 0 48%, transparent 49%), #2a2140; }
.kon.pop-in { animation: chipPop .4s ease-out; }
.kon.jab { animation: jab .25s ease-out; }
.kon.leaving { opacity: 0; transform: scale(.6); transition: .2s; }
@keyframes jab { 50% { transform: translateY(-6px) scale(1.1); background: rgba(168, 115, 245, .5); } }

/* Shield musuh */
.enemy-bar { display: flex; align-items: center; gap: 6px; }
.shield-enemy { width: 30px; height: 34px; }
.shield-enemy b { font-size: 12.5px; }
.pill-buff { background: #a35a1e; color: #fff; }
.pill-shield { background: var(--shield); color: #0b1a33; }
.pill-steal { background: var(--duit); color: #062615; }
.role-masalah .role { background: #4b5576; }

/* Biaya kartu turun */
.card-cost.discount { background: #6cf0a6; }
.card.rarity-uncommon .card-name { color: #1d4fb8; }
.card.rarity-rare .card-name { color: #a3361a; }
.card.rarity-rare { box-shadow: 0 3px 0 #0b0f1c, 0 0 0 2px #f0b93a inset, 0 8px 14px rgba(0, 0, 0, .35); }

/* Efek M2 */
.fx-energy { color: var(--accent); }
.fx-heal { color: #6cf0a6; font-size: 18px; }
.fx-koneksi { color: #dcc8ff; font-size: 15px; }
.fx-num.fx-kon-num { color: #dcc8ff; }
.fx-sr { color: #ffc2dc; }

/* Lembar Self Reward */
.sheet-tag { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sheet-tag.tier-jajan { color: var(--jajan); }
.sheet-tag.tier-healing { color: var(--healing); }
.sheet-text { color: var(--ink) !important; font-size: 15px; }
.sheet-flavor { font-style: italic; font-size: 13px; }
.sheet-btn { margin-top: 14px; }
.sheet-btn:disabled { opacity: .5; }
.sheet-note { font-family: var(--font-mono); font-size: 11px; margin-top: 6px !important; text-align: center; }

/* Layar judul: lineup */
.lineup { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lineup-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.lineup-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lineup-m { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: 10.5px; line-height: 1.15; color: var(--muted); }
.lineup-m.elite { color: #ff8a8d; font-weight: 700; }
.lineup-art { width: 100%; aspect-ratio: 220 / 210; }
.lineup-art svg { width: 100%; height: 100%; display: block; }
.lineup-note { margin: 0; font-size: 12px; color: var(--muted); }

/* Layar antara (pembuka & reward) */
.screen {
  height: 100%;
  overflow-y: auto;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.screen h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.05; }
.screen .btn-primary { margin-top: auto; }
.intro { justify-content: flex-start; }
.intro-tag { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.intro-tag.elite { color: #fff; background: var(--danger); border-color: var(--danger); }
.intro-art { width: min(240px, 64vw); aspect-ratio: 220 / 210; animation: introIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.intro-art svg { width: 100%; height: 100%; display: block; }
@keyframes introIn { from { transform: translateY(30px) scale(.8); opacity: 0; } }
.intro-hp { margin: -6px 0 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.run-hud { display: flex; gap: 8px; width: 100%; }
.run-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7px 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); line-height: 1.15; }
.run-stat span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; }
.run-stat b { font-family: var(--font-mono); font-size: 16px; }
.run-stat.duit span { color: var(--duit); }
.run-stat.deck { cursor: pointer; border-color: #4b5576; }
.run-sr { width: 100%; }
.run-sr .sr-slot { max-width: none; }

/* Reward */
.reward-stamp {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: .05em;
  color: var(--good);
  border: 4px solid var(--good);
  border-radius: 10px;
  padding: 0 12px;
  transform: rotate(-6deg);
  animation: resultStamp .4s cubic-bezier(.2, 1.6, .4, 1) backwards;
}
.reward-loot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.loot { display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.loot span { font-size: 12px; color: var(--muted); }
.loot b { font-family: var(--font-mono); font-size: 16px; }
.loot-duit b { color: #8ff0b8; }
.loot-minus b { color: #ffb26b; }
.sr-offer {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  padding: 10px 44px 10px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 2px dashed var(--line);
}
.sr-offer-tag { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sr-offer b { font-family: var(--font-display); font-size: 17px; }
.sr-offer > span:not(.sr-offer-tag) { font-size: 13px; color: var(--muted); }
.sr-offer .sr-check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); font-style: normal; }
.sr-offer.taken { border-style: solid; }
.sr-offer.taken.tier-jajan { border-color: var(--jajan); }
.sr-offer.taken.tier-healing { border-color: var(--healing); }
.sr-offer.taken .sr-check { background: var(--good); border-color: var(--good); }
.sr-offer.taken .sr-check::after { content: "✓"; color: #062615; font-weight: 800; font-size: 14px; line-height: 20px; display: block; text-align: center; }
.sr-offer.full { opacity: .6; }
.sr-offer.full .sr-check { position: static; transform: none; width: auto; height: auto; border: 0; font-family: var(--font-mono); font-size: 11px; color: #ff8a8d; }
.reward-pick { margin: 4px 0 0; font-weight: 700; }
.reward-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.reward-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: transform .2s, opacity .2s; }
.reward-card .card, .deck-grid .card { position: relative; left: auto; bottom: auto; transform: none; width: 100%; max-width: 116px; height: auto; aspect-ratio: 96 / 142; }
.reward-card.picked { transform: translateY(-8px); }
.reward-card.picked .card { box-shadow: 0 0 0 3px var(--accent), 0 12px 24px rgba(0, 0, 0, .5); }
.reward-card.dim { opacity: .45; }
.rarity { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rarity-uncommon { color: #7fa8ff; }
.rarity-rare { color: var(--accent); }
.reward-detail { min-height: 38px; font-size: 13px; line-height: 1.4; color: var(--muted); max-width: 40ch; }
.reward-detail b { color: var(--ink); }

/* Lihat deck */
.deck-view { align-items: stretch; padding: 12px; }
.deck-card { width: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.deck-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.deck-head h3 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.btn-close { width: 36px; height: 36px; border-radius: 10px; background: var(--panel-2); font-size: 22px; line-height: 1; }
.deck-grid { flex: 1; overflow-y: auto; display: grid; align-content: start; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; justify-items: center; }
.result-lead { margin: 0; font-weight: 700; }

/* ---------- M3 ---------- */
/* Layar pertarungan tidak boleh melebar karena isi HUD */
.combat { grid-template-columns: minmax(0, 1fr); }
.hud-act { overflow: hidden; }
.hud-act .dots { gap: 3px; flex: none; }
.hud-act .dot { width: 7px; height: 7px; }
.hud-act .dot-boss { width: 9px; height: 9px; border-width: 1.5px; }
:root { --elite: #e2484d; --boss: #9b5de5; --rest: #4f8cff; }

/* Titik progres per bulan */
.dot-boss { width: 13px; height: 13px; background: transparent; border: 2px solid var(--boss); }
.dot-boss.done, .dot-boss.now { background: var(--boss); }
.dot-rebahan.done { background: var(--rest); }
.dot-elite.done { background: var(--elite); }
.run-dots .dot-boss { width: 14px; height: 14px; }

.intro-tag.boss { color: #fff; background: var(--boss); border-color: var(--boss); }
.intro-tag.rebahan { color: #cfe0ff; border-color: var(--rest); }
.role-boss .role { background: var(--boss); }

/* Layar judul: pemeran babak 1 */
.lineup-row { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
.lineup-m i { display: block; font-style: normal; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.lineup-m.boss { color: #d9c2ff; font-weight: 700; }

/* Gambar gabungan (Grup WA) */
.art-group { position: relative; width: 100%; height: 100%; }
.art-group-item { position: absolute; width: 62%; aspect-ratio: 220 / 210; }
.art-group-item svg { width: 100%; height: 100%; display: block; }
.art-group.n3 .art-group-item:nth-child(1) { left: 0; top: 4%; }
.art-group.n3 .art-group-item:nth-child(2) { right: 0; top: 0; }
.art-group.n3 .art-group-item:nth-child(3) { left: 19%; top: 34%; }
.intro-art.multi { width: min(260px, 70vw); }

/* Gurita: mata merah di fase 2 */
.art-gurita .rage { opacity: 0; transition: opacity .5s; }
.enemy.phase2 .art-gurita .rage { opacity: 1; }

/* Pertarungan dengan beberapa musuh */
.enemies.multi { gap: 2px; padding: 0 58px 0 6px; align-items: flex-end; }
.enemies.multi .enemy { flex: 1 1 0; min-width: 0; gap: 3px; padding: 3px 2px 6px; border-radius: 14px; }
.enemies.multi .enemy-art { width: 100%; max-width: 110px; }
.enemies.multi .intent { padding: 4px 5px 5px; border-radius: 10px; width: 100%; }
.enemies.multi .intent::after { border-width: 5px; bottom: -5px; margin-left: -5px; }
.enemies.multi .intent-line { display: none; }
.enemies.multi .intent-name { font-size: 9.5px; color: var(--paper-ink); font-weight: 700; letter-spacing: .02em; text-transform: none; line-height: 1.15; }
.enemies.multi .pill { font-size: 10.5px; padding: 1px 5px; }
.enemies.multi .enemy-name { font-size: 13px; text-align: center; justify-content: center; line-height: 1.05; }
.enemies.multi .enemy-name .role { display: none; }
.enemies.multi .affinity { gap: 3px; }
.enemies.multi .aff { font-size: 9px; padding: 1px 5px; }
.enemies.multi .enemy-bar { width: 100%; gap: 3px; }
.enemies.multi .bar-enemy { width: 100%; }
.enemies.multi .shield-enemy { width: 24px; height: 27px; }
.enemies.multi .shield-enemy b { font-size: 11px; }
.enemies.multi .statuses { min-height: 18px; }
.enemies.multi .chip { font-size: 10px; padding: 1px 5px; }
.enemy.aimed { background: rgba(240, 185, 58, .1); box-shadow: 0 0 0 2px var(--accent); }
.enemy.aimed::after {
  content: "TARGET";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #1a1406;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 5px;
}
.fx-energy-minus { color: #ff8a8d; }

/* Peta */
.mapscreen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(12px, env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(120% 50% at 50% 0%, #2a2350 0%, transparent 70%),
    var(--bg);
}
.map-head { display: flex; align-items: center; gap: 10px; }
.map-title { display: flex; flex-direction: column; line-height: 1.1; }
.map-title span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.map-title b { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.mapscreen .run-hud .run-stat { padding: 5px 4px; }
.run-sr { flex: none; }
.mapscreen .run-sr .sr-slot { height: 26px; }
.map-scroll { flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; scrollbar-width: none; border-radius: 16px; background: rgba(13, 19, 34, .55); border: 1px solid var(--line); }
.map-scroll::-webkit-scrollbar { display: none; }
.map-canvas {
  --lane-top: 58px;
  --lane-bot: 32px;
  position: relative;
  height: 100%;
  min-height: 250px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(var(--col-w) - 1px), rgba(255, 255, 255, .03) calc(var(--col-w) - 1px) var(--col-w)) var(--pad-x) 0 / var(--grid-w) 100% no-repeat;
}
.map-lines { position: absolute; left: 0; top: var(--lane-top); height: calc(100% - var(--lane-top) - var(--lane-bot)); overflow: visible; }
.map-lines line { stroke: #46527a; stroke-width: 3; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.map-lines line.walked { stroke: var(--good); stroke-dasharray: none; stroke-width: 4; }
.map-lines line.open { stroke: var(--accent); stroke-dasharray: 6 5; stroke-width: 3.5; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -22; } }
.map-month {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.1;
  color: #5f6a8c;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.map-month.boss { color: #b893f0; }
.map-node {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border: 3px solid var(--k);
  color: var(--k);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .4);
  transition: transform .15s, opacity .2s;
  z-index: 2;
}
.map-node.kind-masalah { --k: #c9a35a; }
.map-node.kind-elite { --k: var(--elite); border-radius: 12px; transform: rotate(45deg); }
.map-node.kind-elite .node-icon { transform: rotate(-45deg); }
.map-node.kind-rebahan { --k: var(--rest); }
.map-node.kind-boss { --k: var(--boss); width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 26px; background: #241a3d; overflow: hidden; }
.node-icon { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: -.04em; }
.node-boss-art { width: 92%; aspect-ratio: 220 / 210; display: block; }
.node-boss-art svg { width: 100%; height: 100%; display: block; }
.map-node.st-gone { opacity: .25; }
.map-node.st-ahead { opacity: .85; }
.map-node.st-visited { background: var(--k); color: var(--bg-2); filter: saturate(.55) brightness(.8); }
.map-node.st-current { background: var(--k); color: var(--bg-2); box-shadow: 0 0 0 4px rgba(255, 255, 255, .2), 0 3px 0 rgba(0, 0, 0, .4); }
.map-node.st-open { background: #2f3a5e; box-shadow: 0 0 0 4px rgba(240, 185, 58, .35), 0 3px 0 rgba(0, 0, 0, .4); animation: nodePulse 1.2s ease-in-out infinite; }
.map-node.kind-elite.st-open { animation-name: nodePulseElite; }
.map-node.picked { box-shadow: 0 0 0 5px var(--accent), 0 6px 14px rgba(0, 0, 0, .5); animation: none; }
.map-node.kind-elite.picked { transform: rotate(45deg) scale(1.12); }
.map-node.picked:not(.kind-elite) { transform: scale(1.12); }
/* Layar pendek: jalur peta lebih rapat, kotak sedikit lebih kecil */
@media (max-height: 720px) {
  .map-canvas { --lane-top: 46px; --lane-bot: 24px; }
  .map-node { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .map-node .node-icon svg { width: 22px; height: 22px; }
  .map-node.kind-boss { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
}
@keyframes nodePulse { 50% { transform: scale(1.1); } }
@keyframes nodePulseElite { 50% { transform: rotate(45deg) scale(1.1); } }
.map-foot { min-height: 104px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.map-foot .btn-primary { width: 100%; }
.map-hint { margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.map-legend { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.lg i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--k); color: var(--k); display: grid; place-items: center; font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 10px; }
.lg.kind-masalah { --k: #c9a35a; }
.lg.kind-elite { --k: var(--elite); }
.lg.kind-elite i { border-radius: 5px; }
.lg.kind-rebahan { --k: var(--rest); }
.lg.kind-boss { --k: var(--boss); }
.lg.kind-boss i { border-radius: 6px; background: var(--boss); }
.map-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--k); }
.map-info.kind-masalah { --k: #c9a35a; }
.map-info.kind-elite { --k: var(--elite); }
.map-info.kind-rebahan { --k: var(--rest); }
.map-info.kind-boss { --k: var(--boss); }
.map-info-tag { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.map-info b { font-family: var(--font-display); font-size: 18px; color: var(--k); }
.map-info p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink); }

/* Rebahan */
.rest-art { width: min(220px, 60vw); animation: introIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.rest-art svg { width: 100%; height: auto; display: block; }
.rest-line { margin: -4px 0 0; color: var(--muted); max-width: 34ch; line-height: 1.45; }
.rest-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.rest-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid var(--rest);
  text-align: center;
}
.rest-opt b { font-family: var(--font-display); font-size: 18px; }
.rest-opt span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.rest-opt i { font-style: normal; font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: #6cf0a6; }
.rest-opt.taken { background: rgba(79, 140, 255, .18); }
.rest-opt.locked { border-color: var(--line); border-style: dashed; opacity: .6; }
.rest-opt.locked i { color: var(--muted); font-size: 11px; }
.run-stat.pop { animation: chipPop .4s ease-out; }
.loot-heal b { color: #6cf0a6; }
.reward-boss .reward-stamp { color: #d9c2ff; border-color: var(--boss); }

/* ---------- M4 ---------- */
:root { --warung: #2fb872; --kejadian: #ff9a3c; --jr-common: #9aa3bd; --jr-uncommon: #5aa9ff; --jr-rare: #f0b93a; --jr-boss: #b893f0; --jr-awal: #ff8fb1; }

/* Jimat */
.jimat {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: -.02em;
  color: var(--bg-2);
  background: var(--jr);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .25);
}
.jr-awal { --jr: var(--jr-awal); }
.jr-common { --jr: var(--jr-common); }
.jr-uncommon { --jr: var(--jr-uncommon); }
.jr-rare { --jr: var(--jr-rare); }
.jr-boss { --jr: var(--jr-boss); }
.jr-text-awal { color: var(--jr-awal); }
.jr-text-common { color: var(--jr-common); }
.jr-text-uncommon { color: var(--jr-uncommon); }
.jr-text-rare { color: var(--jr-rare); }
.jr-text-boss { color: var(--jr-boss); }
.jimat.used { filter: grayscale(1) brightness(.55); }
.jimat.jimat-flash { animation: jimatFlash .5s ease-out; }
@keyframes jimatFlash { 40% { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(255, 255, 255, .35); } }
.jimat-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; }
.jimat-bar-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.jimat-strip { position: absolute; top: 6px; left: 12px; right: 12px; display: flex; gap: 5px; flex-wrap: wrap; z-index: 5; }
.jimat-strip .jimat { width: 26px; height: 26px; font-size: 10.5px; border-radius: 8px; }
.jimat-big { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--bg-2); background: var(--jr); box-shadow: 0 3px 0 rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .25); }
.jimat-card { align-items: center; text-align: center; }
.jimat-card h3 { margin: 0; }
.jimat-text { margin: 0; color: var(--ink); line-height: 1.45; }
.jimat-flavor { margin: 0; font-style: italic; font-size: 13px; color: var(--muted); }
.jimat-used { margin: 0; font-family: var(--font-mono); font-size: 11px; color: #ff8a8d; }
.fx-jimat { color: #fff1c2; font-size: 14px; }
.fx-revive { color: var(--jr-awal); }
.mapscreen .jimat-bar { flex: none; }

/* Reward Jimat */
.jimat-offer { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 2px solid var(--jr-rare); text-align: left; }
.jimat-offer-row { display: flex; gap: 10px; align-items: center; }
.jimat-offer-row .jimat { width: 44px; height: 44px; font-size: 16px; border-radius: 12px; }
.jimat-offer-row b { display: block; font-family: var(--font-display); font-size: 17px; }
.jimat-offer-row span { font-size: 13px; color: var(--muted); }
.jimat-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.jimat-choice { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); text-align: center; }
.jimat-choice b { font-size: 13px; line-height: 1.15; }
.jimat-choice span:not(.jimat-big) { font-size: 11px; color: var(--muted); line-height: 1.3; }
.jimat-choice.picked { border-color: var(--jr-boss); background: rgba(184, 147, 240, .14); transform: translateY(-4px); }

/* Peta: Warung dan Kejadian */
.map-node.kind-warung { --k: var(--warung); border-radius: 12px; }
.map-node.kind-warung .node-icon { font-size: 15px; }
.map-node.kind-kejadian { --k: var(--kejadian); }
.lg.kind-warung { --k: var(--warung); }
.lg.kind-warung i { border-radius: 5px; font-size: 8px; }
.lg.kind-kejadian { --k: var(--kejadian); }
.map-info.kind-warung { --k: var(--warung); }
.map-info.kind-kejadian { --k: var(--kejadian); }
.map-legend { gap: 8px 12px; }
.intro-tag.warung { color: #b8f5d2; border-color: var(--warung); }
.intro-tag.kejadian { color: #ffd2a8; border-color: var(--kejadian); }
.dot-warung.done { background: var(--warung); }
.dot-kejadian.done { background: var(--kejadian); }

/* Kartu upgrade */
.card.upgraded .card-name { color: #0f8a4a; }
.card.upgraded { box-shadow: 0 3px 0 #0b0f1c, 0 0 0 2px #34c27a inset, 0 8px 14px rgba(0, 0, 0, .35); }

/* Rebahan: Belajar */
.rest-opt.learn { border-color: var(--good); }
.rest-opt:disabled:not(.taken) { opacity: .5; }

/* Pilih kartu dari deck */
.pick-view .deck-card { max-height: 100%; }
.pick-card { width: 100%; display: flex; justify-content: center; border-radius: 10px; cursor: pointer; transition: transform .15s; }
.pick-card.picked { transform: translateY(-6px); }
.pick-card.picked .card { box-shadow: 0 0 0 3px var(--accent), 0 12px 24px rgba(0, 0, 0, .5); }
.pick-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.pick-detail { min-height: 36px; font-size: 13px; line-height: 1.4; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pick-detail b { color: var(--ink); }
.up-to b { color: #6cf0a6; }
.up-arrow { color: var(--accent); font-weight: 800; }
.pick-foot .btn-primary:disabled { opacity: .5; }

/* Warung */
.shop { gap: 10px; }
.shop-sec { width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.shop-sec h3 { margin: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.shop-row { display: grid; gap: 8px; }
.shop-cards { grid-template-columns: repeat(3, 1fr); }
.shop-jimat, .shop-selfRewards { grid-template-columns: repeat(3, 1fr); }
.shop-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 4px 8px; border-radius: 12px; background: rgba(28, 37, 64, .6); border: 2px solid transparent; transition: transform .15s; }
.shop-item .card { position: relative; left: auto; bottom: auto; transform: none; width: 100%; max-width: 108px; height: auto; aspect-ratio: 96 / 142; }
.shop-item .sr-slot { width: 100%; max-width: none; height: 40px; }
.shop-name { font-size: 12px; line-height: 1.15; text-align: center; }
.shop-item.picked { border-color: var(--accent); transform: translateY(-3px); }
.shop-item.sold { opacity: .35; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: #ffe2a0; font-style: normal; }
.price.short { color: #ff8a8d; }
.shop-remove { width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 2px dashed var(--danger); text-align: left; }
.shop-remove b { font-family: var(--font-display); font-size: 16px; }
.shop-remove span { grid-column: 1; font-size: 12px; color: var(--muted); }
.shop-remove .price { grid-row: 1 / 3; grid-column: 2; font-size: 15px; }
.shop-remove:disabled { opacity: .5; }
.shop-bar { position: sticky; bottom: -24px; width: calc(100% + 32px); margin: 4px -16px -24px; padding: 10px 16px max(14px, env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 14px); display: flex; flex-direction: column; gap: 8px; z-index: 10; }
.shop-detail { width: 100%; min-height: 44px; }
.shop-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn-leave { padding: 12px 18px; border-radius: 12px; font-weight: 800; font-size: 16px; border: 2px solid var(--line); }
.shop-info { text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.shop-info b { font-family: var(--font-display); font-size: 16px; }
.shop-info p { margin: 2px 0; font-size: 13px; line-height: 1.35; }
.shop-info { padding: 8px 12px; }
.shop-info i { font-size: 12px; color: var(--muted); }
.btn-buy { width: 100%; padding: 12px; border-radius: 12px; font-weight: 800; font-size: 16px; background: var(--warung); color: #062615; box-shadow: 0 4px 0 #1b6e45; }
.btn-buy:disabled { background: var(--panel-2); color: var(--muted); box-shadow: none; }

/* Kejadian */
.ev-mark { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 40px; color: var(--bg-2); background: var(--kejadian); box-shadow: 0 4px 0 #8a4a14; animation: introIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.ev-text { margin: 0; max-width: 36ch; line-height: 1.5; font-size: 15.5px; background: var(--paper); color: var(--paper-ink); padding: 12px 14px; border-radius: 14px; text-align: left; }
.ev-opts { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ev-opt { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 11px 14px; border-radius: 12px; background: var(--panel); border: 2px solid var(--kejadian); text-align: left; }
.ev-opt b { font-family: var(--font-display); font-size: 17px; }
.ev-cost { font-family: var(--font-mono); font-size: 11.5px; color: #ffe2a0; }
.ev-hint { font-size: 12.5px; color: var(--muted); }
.ev-why { font-family: var(--font-mono); font-size: 11px; color: #ff8a8d; }
.ev-opt:disabled { opacity: .5; border-color: var(--line); }
.ev-result { width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--panel); border-left: 4px solid var(--kejadian); text-align: left; animation: introIn .4s ease-out; }
.ev-result p { margin: 0; line-height: 1.45; }
.chgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chg { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.chg.up { background: rgba(52, 194, 122, .18); color: #8ff0b8; }
.chg.down { background: rgba(226, 72, 77, .18); color: #ff9a9d; }

/* ---------- M5: babak 2–3, SISTEM ---------- */
:root { --sistem: #f0b93a; }

/* Layar judul: pemeran tiga babak + SISTEM */
.lineup-tag i { font-style: normal; color: var(--muted); margin-left: 4px; }
.lineup-row.n5 { grid-template-columns: repeat(5, 1fr); }
.lineup-row.n6 { grid-template-columns: repeat(6, 1fr); }
.lineup-row.n6 .lineup-m, .lineup-row.n5 .lineup-m { font-size: 9.5px; }
.lineup-row + .lineup-tag { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.lineup-m.boss { color: #c9a6ff; font-weight: 700; }
.lineup-sistem { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; margin-top: 6px; padding: 8px; border-radius: 12px; background: rgba(240, 185, 58, .07); border: 1px solid rgba(240, 185, 58, .35); }
.lineup-sistem > div:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lineup-sistem b { font-family: var(--font-display); font-size: 20px; letter-spacing: .04em; line-height: 1; }
.lineup-sistem span:last-child { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Pergantian babak */
.act-screen { justify-content: flex-start; }
.act-big { display: flex; flex-direction: column; align-items: center; line-height: .85; animation: introIn .5s cubic-bezier(.3, 1.4, .5, 1); }
.act-big span { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.act-big b { font-family: var(--font-display); font-weight: 800; font-size: 96px; color: var(--accent); }
.act-cast { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.act-cast-m { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 11px; line-height: 1.15; color: var(--muted); }
.act-cast-m.elite { border-color: var(--elite); color: #ff9a9d; }
.act-cast-m.boss { border-color: var(--boss); color: #d9c2ff; font-weight: 700; }
.act-cast-m .lineup-art { width: 72px; }
.act-note { margin: 0; font-size: 12.5px; color: var(--muted); max-width: 36ch; }

/* Pembuka SISTEM */
.intro-tag.sistem { color: var(--bg-2); background: var(--sistem); border-color: var(--sistem); font-weight: 700; }
.sistem-intro h2 { font-size: 40px; letter-spacing: .06em; }
.sistem-rules { margin: 0; padding: 10px 14px 10px 30px; text-align: left; font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 100%; }
.art-sistem .spin { transform-box: fill-box; transform-origin: center; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* SISTEM di pertarungan: HP ∞ dan penghitung skor */
.enemy.infinite .bar-enemy .bar-fill { background: repeating-linear-gradient(45deg, #b8860b 0 10px, #f0b93a 10px 20px); }
.enemy.infinite .bar-text b { font-size: 18px; line-height: 1; }
.sistem-score { display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 6px 14px; border-radius: 12px; background: rgba(13, 19, 34, .85); border: 2px solid var(--sistem); margin-bottom: 2px; }
.sistem-score span { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sistem-score b { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--sistem); font-variant-numeric: tabular-nums; }
.sistem-score.jump { animation: comboJump .3s ease-out; }
.fx-stamp.stamp-sistem { font-size: 28px; top: 48%; white-space: nowrap; color: var(--sistem); border-color: var(--sistem); }

/* Sifat monster, niat baru, monster pergi */
.aff-passive { border-color: var(--muted); color: var(--ink); background: rgba(154, 163, 189, .12); }
.aff-passive b { color: var(--accent); }
.pill-give { background: var(--accent); color: #2a1d02; }
.pill-flee { background: #3a4466; color: #fff; }
.enemy.fled .enemy-art { opacity: 0; transform: translateX(80px) scale(.8); transition: opacity .8s, transform .8s; }
.enemy.fled .enemy-name, .enemy.fled .affinity, .enemy.fled .enemy-bar, .enemy.fled .statuses { opacity: .3; }
.fx-hurt-text { color: #ff8a8d; }
.reward-stamp.stamp-bad { color: var(--danger); border-color: var(--danger); }

/* Akhir run: skor besar */
.result-score { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 2px solid var(--accent); }
.result-score span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.result-score b { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--accent); }
.result-score i { font-style: normal; font-size: 12px; color: var(--muted); }
.result-stamp.long { font-size: 24px; letter-spacing: .03em; padding: 0 10px; }
.result.ended .result-stamp { color: var(--sistem); border-color: var(--sistem); }
/* Label HUD lebih rapat supaya "Bulan 12 · Masalah" + titik progres muat di layar 360–390px */
.hud-act { letter-spacing: .02em; gap: 6px; }
.hud-act .dots { gap: 2px; }
.hud-act .dot { width: 6px; height: 6px; }
.hud-act .dot-boss { width: 8px; height: 8px; }
/* Penghitung SISTEM di bawah bar HP (bagian atas arena dipakai strip Jimat) */
.sistem-score { flex-direction: row; gap: 10px; margin: 6px 0 0; padding: 6px 16px; }
.sistem-score b { font-size: 34px; }
.intro-passive { margin: 0; max-width: 34ch; font-size: 13px; line-height: 1.4; color: var(--ink); background: var(--panel); border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; }

/* ---------- M6: Kabur Aja Dulu, ending, kartu share, Harian ---------- */
:root { --jr-kabur: #3ad1c4; --kabur: #3ad1c4; }
.jr-kabur { --jr: var(--jr-kabur); }
.jr-text-kabur { color: var(--jr-kabur); }
.kabur-chip { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--kabur); color: var(--kabur); margin-left: 2px; }
.kabur-chip.full { background: var(--kabur); color: var(--bg-2); }

/* Tombol Harian di judul */
.btn-daily { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--kabur); background: rgba(58, 209, 196, .08); text-align: left; }
.btn-daily b { font-family: var(--font-display); font-size: 18px; color: var(--kabur); }
.btn-daily span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* Warung: setor Tabungan */
.shop-deposit { border-color: var(--kabur); }
.shop-deposit b { color: var(--kabur); }

/* Bandara */
.bandara-box { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--kabur); background: rgba(58, 209, 196, .08); text-align: left; }
.bandara-box b { color: var(--kabur); font-size: 14.5px; }
.bandara-box span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.btn-kabur { display: block; width: 100%; padding: 14px 18px; border-radius: 14px; font-family: var(--font-display); font-weight: 800; font-size: 19px; background: var(--kabur); color: #062a27; box-shadow: 0 4px 0 #1f8a80; }
.screen .btn-primary + .btn-kabur { margin-top: 0; }
.cross-doors { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cross-door { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 14px; background: var(--panel); border: 2px solid var(--sistem); }
.cross-door.kabur { border-color: var(--kabur); }
.cross-door .lineup-art { width: 96px; }
.cross-door b { font-family: var(--font-display); font-size: 18px; }
.cross-door span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.intro-tag.bandara { color: #062a27; background: var(--kabur); border-color: var(--kabur); font-weight: 700; }
.jimat-offer.kabur { border-color: var(--kabur); }

/* Akhir run: gambar ending, rekor, kartu share */
.result-art { width: 100%; max-width: 280px; align-self: center; margin-bottom: -6px; }
.result-art svg { width: 100%; height: auto; display: block; }
.result-record { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.result.won .result-score { border-color: var(--good); }
.result.won .result-score b { color: var(--good); }
.share-box { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); text-align: left; }
.share-title { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.share-stats { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.share-build { margin: 0; font-size: 13px; color: var(--muted); }
.share-build b { color: var(--ink); }
.share-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.share-actions button { padding: 10px 6px; font-size: 13.5px; border-radius: 10px; }
.btn-share { font-family: var(--font-display); font-weight: 800; background: var(--kabur); color: #062a27; }
.share-text { width: 100%; min-height: 150px; font-family: var(--font-mono); font-size: 12px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* Toast */
.toast { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 200; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: #0d1322; border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); animation: fadeIn .2s ease-out; }

/* ---------- M7: gaya stiker, ikon, suara ---------- */
/* Gambar monster jadi stiker: outline putih tebal + bayangan. Bayangan tanah bawaan SVG disembunyikan. */
.art { filter: drop-shadow(3px 0 0 #fbf5e6) drop-shadow(-3px 0 0 #fbf5e6) drop-shadow(0 3px 0 #fbf5e6) drop-shadow(0 -3px 0 #fbf5e6) drop-shadow(0 7px 6px rgba(0, 0, 0, .45)); }
.art ellipse[fill="#000"] { display: none; }
.lineup-art .art, .node-boss-art .art, .act-cast-m .art, .art-group .art { filter: drop-shadow(1.6px 0 0 #fbf5e6) drop-shadow(-1.6px 0 0 #fbf5e6) drop-shadow(0 1.6px 0 #fbf5e6) drop-shadow(0 -1.6px 0 #fbf5e6) drop-shadow(0 3px 3px rgba(0, 0, 0, .4)); }
.result-art svg, .ending-svg { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); transform: rotate(-2deg); }

/* Logo judul seperti stiker */
.title h1 { color: var(--bg); text-shadow: 3px 0 0 #fbf5e6, -3px 0 0 #fbf5e6, 0 3px 0 #fbf5e6, 0 -3px 0 #fbf5e6, 2px 2px 0 #fbf5e6, -2px -2px 0 #fbf5e6, 2px -2px 0 #fbf5e6, -2px 2px 0 #fbf5e6, 0 9px 0 rgba(0, 0, 0, .35); transform: rotate(-2deg); transform-origin: left center; }
.title h1 span { color: var(--accent); }
.title-top { display: flex; align-items: center; justify-content: space-between; }
.sound-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }

/* Ikon Jimat */
.jimat svg, .jimat-big svg { width: 82%; height: 82%; display: block; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.jimat, .jimat-big { display: grid; place-items: center; }

/* Ikon aliran di kartu */
.card-top { position: relative; }
.card-flow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; filter: drop-shadow(1px 0 0 #fbf5e6) drop-shadow(-1px 0 0 #fbf5e6) drop-shadow(0 1px 0 #fbf5e6) drop-shadow(0 -1px 0 #fbf5e6); }
.card-flow svg { width: 100%; height: 100%; display: block; }
.card-pay + .card-flow { display: none; }

/* Ikon kotak peta */
.node-icon svg { width: 26px; height: 26px; display: block; }
.lg i svg { width: 14px; height: 14px; display: block; }
.lg i { border-width: 0; }

/* Menu: suara dan kecepatan animasi */
.menu-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.toggle { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 12px; border: 2px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.toggle.on { border-color: var(--accent); color: var(--ink); background: rgba(240, 185, 58, .1); }
