/* Menu V2 — laman utama alternatif. v1.0.0
   Setiap nombor pada skrin ini datang daripada profil sebenar; tiada statistik
   direka. Ikatan pet menggunakan kemajuan Bond XP sebenar dalam koleksi teman. */
/* Menu V2 membawa kepalanya sendiri, jadi bar aplikasi disembunyikan —
   sama seperti yang dilakukan skrin Demo. */
body[data-screen="menuV2"] .appHeader{display:none}
.mv2Screen{position:relative;padding:0;overflow:hidden}
.mv2Screen.on{display:flex;flex-direction:column;height:100dvh;max-height:100dvh}

/* ---------- pentas hero terkunci (pinned hero stage) ---------- */
.mv2TopStage{
  position:relative;flex:none;width:100%;
  padding:calc(12px + env(safe-area-inset-top,0px)) 14px 4px;
  overflow:hidden;z-index:10
}


.mv2Sky{
  position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url("../assets/ui/menu-v2/hero-stage-v1.webp") center 58% / cover no-repeat
}
.mv2Sky::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(11,29,51,0) 58%,rgba(11,29,51,.65) 80%,#0b1d33 100%)
}

.mv2Scroll{
  position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-y:auto;
  padding:6px 14px calc(80px + env(safe-area-inset-bottom,0px));
  -webkit-overflow-scrolling:touch
}

/* ---------- kepala: pro mobile game hud (pilihan 1) ---------- */
.mv2Head{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;padding:0 2px}

.mv2ProfileCapsule{
  display:flex;align-items:center;gap:10px;
  background:rgba(11,29,51,.85);border:1.5px solid rgba(255,208,54,.45);
  border-radius:999px;padding:4px 14px 4px 5px;
  box-shadow:0 8px 20px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.15);
  backdrop-filter:blur(8px);cursor:pointer;
  transition:transform .1s ease,border-color .2s ease
}
.mv2ProfileCapsule:active{transform:scale(.97);border-color:#ffd036}
.mv2AvatarBox{position:relative;width:40px;height:40px;flex:none}
.mv2AvatarRing{
  width:40px;height:40px;border-radius:50%;border:2px solid #ffd036;
  background:#0f243d;box-shadow:0 3px 8px rgba(0,0,0,.5);
  overflow:hidden;display:flex;align-items:center;justify-content:center
}
.mv2AvatarImg{
  width:100%;height:100%;object-fit:contain;object-position:center;
  transform:none;display:block
}
.mv2AvatarBadge{
  position:absolute;bottom:-3px;right:-4px;
  background:linear-gradient(180deg,#ffde6a 0%,#e09f1a 100%);
  border:1.5px solid #081424;color:#3b2803;font-size:9px;font-weight:950;
  border-radius:999px;padding:0 5px;line-height:13px;box-shadow:0 2px 4px rgba(0,0,0,.4)
}
.mv2PlayerName{
  font-size:14px;font-weight:950;color:#fff;line-height:1;
  padding-right:4px;white-space:nowrap;text-shadow:0 1px 3px rgba(0,0,0,.6)
}

.mv2HeadRight{display:flex;align-items:center;gap:8px;flex:none}
.mv2Coins{
  height:40px;display:inline-flex;align-items:center;gap:6px;
  padding:0 12px 0 8px;border-radius:999px;
  background:rgba(11,29,51,.85);border:1.5px solid rgba(255,208,54,.45);
  color:#ffe5a6;font-weight:950;font-size:13.5px;
  box-shadow:0 6px 18px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(8px);font-variant-numeric:tabular-nums
}
.mv2Coins img{width:22px;height:22px;filter:drop-shadow(0 2px 4px rgba(255,200,50,.4))}
.mv2Gear{
  width:40px;height:40px;flex:none;border-radius:50%;
  border:1.5px solid rgba(255,229,166,.4);background:rgba(11,29,51,.85);
  display:grid;place-items:center;cursor:pointer;padding:0;
  box-shadow:0 6px 18px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.15);
  backdrop-filter:blur(8px);transition:transform .12s ease,border-color .2s ease
}
.mv2Gear:active{transform:rotate(30deg) scale(.95);border-color:#ffd036}
.mv2Gear svg{width:20px;height:20px;fill:none;stroke:#ffe5a6;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---------- pentas hero & pet (enjin animasi sprite sebenar) ---------- */
.mv2Stage{
  position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:center;gap:0;
  height:clamp(165px,24vh,210px);margin:0 0 2px;padding-bottom:2px
}
.mv2Actor{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;
  cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent
}
.mv2Actor:active{transform:scale(.96)}
.mv2HeroSlot{height:100%;width:175px;max-width:52%}
.mv2PetSlot{height:78px;width:90px;max-width:28%;margin-bottom:4px;margin-left:-44px}

/* bayang-bayang tanah menambat watak ke lantai */
.mv2ActorShadow{
  position:absolute;bottom:2px;left:50%;transform:translateX(-50%);
  width:65%;height:12px;border-radius:50%;
  background:radial-gradient(ellipse at center,rgba(3,10,22,.75) 0%,rgba(3,10,22,0) 72%);
  pointer-events:none;z-index:1;filter:blur(1.5px)
}
.petShadow{bottom:1px;width:72%;height:9px}
#wiraSlot .mv2ActorShadow{left:36%;width:58%}

/* bingkai sprite frame-by-frame */
.mv2HeroSprite{
  position:relative;z-index:2;width:100%;height:100%;object-fit:contain;object-position:bottom center;
  filter:drop-shadow(0 10px 15px rgba(6,20,38,.55));pointer-events:none
}
.mv2PetSprite{
  position:relative;z-index:2;width:100%;height:100%;object-fit:contain;object-position:bottom center;
  filter:drop-shadow(0 7px 11px rgba(6,20,38,.48));pointer-events:none
}
.mv2Pet.hidden,.mv2PetFace.hidden{display:none}

/* gelembung dialog interaktif */
.mv2SpeechBubble{
  position:absolute;top:auto;bottom:100px;left:calc(100% - 32px);transform:translateY(6px) scale(.94);
  background:rgba(13,33,58,.95);border:1.5px solid #ffd036;color:#fff;
  font-size:11px;font-weight:850;padding:7px 10px;border-radius:14px;width:min(190px,70vw);min-height:2.4em;display:grid;place-items:center;line-height:1.2;text-align:center;white-space:normal;
  box-shadow:0 6px 16px rgba(0,0,0,.5),0 0 10px rgba(255,208,54,.25);
  opacity:0;pointer-events:none;transition:all .22s cubic-bezier(.34,1.56,.64,1);z-index:20
}
.mv2SpeechBubble::after{
  content:"";position:absolute;bottom:9px;left:-8px;transform:none;
  border-width:5px 8px 5px 0;border-style:solid;border-color:transparent #ffd036 transparent transparent
}
.mv2SpeechBubble.show{opacity:1;transform:translateY(0) scale(1)}
.petBubble{top:-16px;bottom:auto;left:50%;transform:translateX(-50%) translateY(-6px) scale(.9);border-color:#5fcdf5;color:#e0f2fe}
.petBubble::after{bottom:-5px;left:50%;border-width:5px 5px 0;border-color:#5fcdf5 transparent transparent}
.petBubble.show{transform:translateX(-50%) translateY(0) scale(1)}

/* animasi reaksi hop & pop */
.actorHop{animation:actorHopAnim .45s ease}
@keyframes actorHopAnim{
  0%{transform:translateY(0)}
  35%{transform:translateY(-14px) scale(1.04)}
  65%{transform:translateY(-3px) scale(.98)}
  100%{transform:translateY(0) scale(1)}
}
.posePop{animation:posePopAnim .35s ease}
@keyframes posePopAnim{
  0%{transform:scale(1)}
  50%{transform:scale(1.025)}
  100%{transform:scale(1)}
}

/* ---------- pengalaman (pulse animation) ---------- */
.mv2Xp{
  position:relative;z-index:2;display:flex;align-items:center;gap:10px;margin:2px 4px 6px;
  padding:7px 14px;border-radius:999px;
  background:rgba(11,29,51,.85);border:1.5px solid rgba(255,229,166,.4);
  box-shadow:0 8px 20px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.15);
  backdrop-filter:blur(8px)
}
.mv2Lv{flex:none;font-size:12.5px;font-weight:950;color:#ffe5a6}
.mv2XpBar{flex:1 1 auto;height:10px;border-radius:99px;background:#050f1c;overflow:hidden;
  position:relative;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}
.mv2XpBar i{
  display:block;height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,#38bdf8,#0ea5e9,#60a5fa,#38bdf8);
  background-size:200% 100%;position:relative;overflow:hidden;
  box-shadow:0 0 10px rgba(56,189,248,.7);
  animation:xpFillPulse 2.4s ease-in-out infinite,xpGradSweep 3s linear infinite;
  transition:width .5s ease
}
.mv2XpBar i::after{
  content:"";position:absolute;top:0;left:-100%;width:60%;height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);
  animation:xpShimmer 2.4s ease-in-out infinite
}
@keyframes xpFillPulse{
  0%,100%{filter:brightness(1) drop-shadow(0 0 3px rgba(56,189,248,.5))}
  50%{filter:brightness(1.3) drop-shadow(0 0 8px rgba(56,189,248,.95))}
}
@keyframes xpGradSweep{
  0%{background-position:100% 0}
  100%{background-position:-100% 0}
}
@keyframes xpShimmer{
  0%{left:-80%}
  55%,100%{left:140%}
}
.mv2Xp small{flex:none;font-size:11px;font-weight:800;color:#d6e6f5;font-variant-numeric:tabular-nums}

/* ---------- kad utama (aligned text boxes - Gaya A) ---------- */
.mv2Card{
  position:relative;display:grid;grid-template-columns:136px minmax(0,1fr) 20px;align-items:center;gap:12px;width:100%;
  margin-bottom:12px;padding:12px 14px;min-height:136px;border-radius:22px;cursor:pointer;
  text-align:left;overflow:hidden;font-family:inherit;
  box-shadow:0 10px 24px rgba(0,0,0,.5);transition:transform .12s ease
}
.mv2Card:active{transform:translateY(2px)}
.mv2Chev{
  grid-column:3;justify-self:end;align-self:center;width:18px;height:18px;fill:none;
  stroke:#2b4970;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;
  position:relative;z-index:2
}
.mv2Learn .mv2Chev{stroke:#1b4b7e}

.mv2Quest{
  background:linear-gradient(160deg,#fffcf0 0%,#f6ecd2 60%,#eedeb5 100%);
  border:2px solid #caa055;
  box-shadow:0 10px 24px rgba(0,0,0,.45),inset 0 2px 0 rgba(255,255,255,.9),inset 0 -2px 0 rgba(160,110,25,.25)
}
.mv2QuestArt{
  grid-column:1;justify-self:center;align-self:center;
  width:min(100%,132px);max-height:102px;object-fit:contain;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.22))
}

.mv2Learn{
  /* Scale the decorative artwork down and fade it before the text column. */
  background:
    linear-gradient(90deg,transparent 15%,rgba(230,246,255,.65) 24%,#e6f6ff 31%,#edf9ff 100%),
    url("../assets/ui/menu-v2/cikgu-card-v2.webp") left center / 80% 100% no-repeat,
    linear-gradient(160deg,#d1effc,#edf9ff);
  border:0;box-shadow:0 10px 26px rgba(0,0,0,.5);padding:12px 14px
}
.mv2LearnCikgu{
  grid-column:1;justify-self:center;align-self:center;position:relative;z-index:3;
  display:block;width:136px;height:120px;object-fit:contain;object-position:center;
  transform:none;image-rendering:auto
}
.mv2Learn .mv2CardBody{position:relative;z-index:2}

.mv2CardBody{grid-column:2;min-width:0;display:flex;flex-direction:column;justify-content:center;position:relative;z-index:2}
.mv2CardBody b{display:block;font-size:clamp(15px,4.1vw,17.5px);font-weight:950;line-height:1.18;color:#123158;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mv2CardBody small{display:block;margin-top:3px;font-size:11.5px;line-height:1.35;color:#38567c;min-height:31px}

.mv2Cta{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  align-self:flex-start;min-height:38px;padding:0 16px;border-radius:12px;
  white-space:nowrap;font-size:13.5px;font-weight:950;transition:all .1s ease
}
.mv2Cta svg{width:15px;height:15px;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.mv2Cta.gold{background:linear-gradient(180deg,#f7d57f 0%,#ebb644 100%);border:2px solid #bf8a25;color:#3b2b07;box-shadow:0 3px 0 #9c6c13,0 5px 10px rgba(0,0,0,.18)}
.mv2Cta.gold svg{stroke:#3b2b07}
.mv2Cta.navy{
  background:linear-gradient(180deg,#24578f 0%,#133863 100%);
  border:2px solid #59c8ff;color:#ffffff;
  box-shadow:0 3px 0 #09274c,0 5px 12px rgba(9,111,224,.3);
  text-shadow:0 1px 2px rgba(0,0,0,.4);
  margin-top:16px
}
.mv2Cta.navy svg{stroke:#59c8ff}

/* ---------- dua kad statistik ---------- */
.mv2Stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:10px;width:auto;margin:0 10px 10px;box-sizing:border-box}
.mv2Stat{
  min-width:0;height:100%;box-sizing:border-box;display:flex;flex-direction:column;
  padding:12px 13px;border-radius:18px;background:#fffdf4;
  box-shadow:0 8px 18px #0005,inset 0 0 0 1.5px #e7d9b7
}
.mv2ActionCard{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,inset .16s ease}
.mv2ActionCard:hover{transform:translateY(-2px);box-shadow:0 10px 22px #0006,inset 0 0 0 2px #2f8fd0}
.mv2ActionCard:focus-visible{outline:3px solid #59c8ff;outline-offset:3px}
.mv2ActionCard:active{transform:translateY(0)}
.mv2Stat h3{
  display:flex;align-items:center;gap:6px;margin:0 0 7px;
  font-size:13px;font-weight:950;color:#14335c
}
.mv2Stat h3 svg{width:17px;height:17px;flex:none;fill:none;stroke:#2f6ea8;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.mv2StatTop{display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin-bottom:6px}
.mv2StatTop span{font-size:12px;font-weight:800;color:#3d5c82;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mv2StatTop b{flex:none;font-size:18px;font-weight:950;color:#14335c;font-variant-numeric:tabular-nums}
.mv2Bar{display:block;height:8px;border-radius:99px;background:#e2e8f0;overflow:hidden}
.mv2Bar i{display:block;height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,#59c8ff,#0b6fe0);transition:width .5s ease}
.mv2Bar.pet i{background:linear-gradient(90deg,#ff8fb1,#e2566c)}
.mv2Stat p{margin:7px 0 0;font-size:11px;line-height:1.35;color:#5b74a0}

.mv2PetRow{display:flex;align-items:flex-start;gap:7px;min-width:0}
.mv2PetFace{flex:none;width:40px;height:40px;border-radius:50%;object-fit:cover;
  background:#e8f2fb;box-shadow:0 0 0 2px #e7d9b7}
.mv2PetCopy{flex:1 1 auto;min-width:0}
.mv2PetCopy b{display:block;font-size:12.5px;font-weight:950;color:#14335c;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mv2PetTags{display:flex;align-items:center;gap:5px;margin:3px 0 6px;min-width:0}
.mv2Chip{flex:none;padding:2px 6px;border-radius:8px;background:#eef3f9;
  font-size:10px;font-weight:900;color:#3d5c82}
.mv2PetTags small{font-size:10.5px;font-weight:800;color:#3d5c82;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- pemilih menu ---------- */
.mv2Pick{
  position:fixed;inset:0;z-index:2147483200;display:grid;place-items:center;
  /* Pembungkus renderHub menahan lukisan sehingga murid memilih, jadi skrin
     di belakang mungkin masih skrin log masuk — tutup penuh. */
  padding:20px;background:#050e1a
}
.mv2Pick[hidden]{display:none}
.mv2PickCard{
  width:min(100%,340px);padding:20px;border-radius:20px;text-align:center;
  background:linear-gradient(#1b3354,#122744);border:2px solid #b78b47;
  box-shadow:0 18px 40px #000a
}
.mv2PickCard b{display:block;font-size:19px;font-weight:950;color:#ffe5a6}
.mv2PickCard p{margin:7px 0 16px;font-size:13px;line-height:1.45;color:#cfe0f0}
.mv2PickBtns{display:grid;gap:10px}
.mv2PickBtns button{
  min-height:50px;border-radius:14px;cursor:pointer;font-family:inherit;
  font-size:15px;font-weight:950;border:2px solid #b78b47
}
.mv2PickBtns .v2{background:#f2cd78;color:#3a2f10}
.mv2PickBtns .asal{background:linear-gradient(#17325c,#0e2142);color:#fff6df}

/* ---------- skrin lebar ---------- */
@media (min-width:720px){
  .mv2Scroll{width:min(100%,560px);margin:0 auto}
}
@media (max-height:680px){
  .mv2Stage{height:clamp(140px,24vh,190px)}
  .mv2Crest b{font-size:18px}
  .mv2CardBody b{font-size:17px}
}
@media (prefers-reduced-motion:reduce){
  .mv2XpBar i,.mv2Bar i{transition:none}
}


/* ---------- Jejak Pet safe frame overlay trial ---------- */
.mv2Quest{position:relative;isolation:isolate}
.mv2Quest::before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:0;
  pointer-events:none;
  background:url("../assets/ui/menu-v2/jejak-pet-frame-v2.webp") center / 100% 100% no-repeat;
}
.mv2Quest > *{position:relative;z-index:1}


/* ---------- Jejak Pet overlay refinement v2 ---------- */
.mv2Quest{
  grid-template-columns:120px minmax(0,1fr) 16px;
  gap:10px;
  padding:12px 22px 12px 24px;
  min-height:132px;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  overflow:visible;
}
.mv2Quest::after{
  content:"";
  position:absolute;
  inset:8px 10px 7px;
  z-index:0;
  pointer-events:none;
  border-radius:18px;
  background:linear-gradient(160deg,#fffcf0 0%,#f6ecd2 60%,#eedeb5 100%);
  box-shadow:0 10px 24px rgba(0,0,0,.44);
}
.mv2Quest::before{
  inset:0;
  z-index:1;
  background-size:100% 100%;
}
.mv2Quest > *{z-index:2}
.mv2QuestArt{
  width:min(100%,116px);
  max-height:94px;
  transform:translateX(4px);
}
.mv2Quest .mv2CardBody b{
  font-size:clamp(15px,4vw,17px);
}
.mv2Quest .mv2CardBody small{
  min-height:28px;
}
.mv2Quest .mv2Cta.gold{
  min-height:36px;
  padding:0 14px;
}


/* ---------- Kembara Dimensi frame refinement v1 ---------- */
.mv2Learn{
  position:relative;
  isolation:isolate;
  grid-template-columns:120px minmax(0,1fr) 16px;
  gap:10px;
  width:calc(100% - 20px);
  margin-left:10px;
  margin-right:10px;
  box-sizing:border-box;
  padding:12px 22px 12px 24px;
  min-height:132px;
  border:0;
  border-radius:22px;
  overflow:hidden;
  box-shadow:
    0 10px 26px rgba(0,0,0,.50),
    0 0 0 1px rgba(91,205,255,.28);
}
.mv2Learn::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  border-radius:22px;
  box-shadow:
    inset 0 0 0 2px #d6a83d,
    inset 0 0 0 4px #1d5f9b,
    inset 0 0 0 6px rgba(112,214,255,.88),
    inset 0 0 0 8px rgba(12,57,104,.34);
}
.mv2Learn::after{
  content:"";
  position:absolute;
  inset:7px;
  z-index:0;
  pointer-events:none;
  border-radius:17px;
  border:1px solid rgba(255,236,169,.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 0 14px rgba(61,180,255,.18);
}
.mv2Learn > *{position:relative;z-index:1}
.mv2LearnCikgu{
  width:132px;
  height:116px;
  transform:translateX(2px);
}
.mv2Learn .mv2CardBody{
  padding-right:0;
}
.mv2Learn .mv2Cta.navy{
  margin-top:13px;
  min-width:0;
  max-width:100%;
  width:100%;
  box-sizing:border-box;
  padding-inline:8px;
  gap:4px;
}

@media (max-width:360px){
  .mv2Learn{grid-template-columns:72px minmax(0,1fr) 16px;gap:6px;padding:10px 12px;min-height:112px}
  .mv2LearnCikgu{width:72px;height:82px}
  .mv2Learn .mv2Cta.navy{font-size:11.5px;padding-inline:4px;gap:3px}
}


/* ---------- Header HUD refinement v1 ---------- */
.mv2Head{
  margin:0 0 8px;
  padding:6px 8px;
  gap:8px;
  min-height:54px;
  border:1px solid rgba(240,196,87,.48);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(14,35,61,.94),rgba(7,20,38,.92));
  box-shadow:
    0 8px 20px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(218,164,54,.16);
  backdrop-filter:blur(10px);
}
.mv2ProfileCapsule{
  gap:8px;
  min-width:0;
  padding:0 6px 0 0;
  background:transparent;
  border:0;
  box-shadow:none;
  backdrop-filter:none;
}
.mv2AvatarBox{
  width:42px;
  height:42px;
}
.mv2AvatarRing{
  width:42px;
  height:42px;
  border:2px solid #e8bb4d;
  box-shadow:
    0 0 0 2px rgba(5,18,34,.75),
    0 3px 8px rgba(0,0,0,.36);
}
.mv2AvatarBadge{
  bottom:-2px;
  right:-5px;
  line-height:13px;
  padding:0 5px;
  font-size:9px;
  border:1px solid #081424;
}
.mv2PlayerName{
  max-width:92px;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:15px;
  letter-spacing:.1px;
  padding-right:2px;
}
.mv2HeadRight{
  gap:7px;
}
.mv2Coins{
  height:38px;
  min-width:88px;
  padding:0 11px 0 7px;
  border:1px solid rgba(232,187,77,.66);
  background:linear-gradient(180deg,rgba(24,51,82,.96),rgba(9,28,50,.96));
  color:#ffe7a4;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 3px 8px rgba(0,0,0,.22);
}
.mv2Coins img{
  width:21px;
  height:21px;
}
.mv2Gear{
  width:38px;
  height:38px;
  border:1px solid rgba(232,187,77,.58);
  background:linear-gradient(180deg,rgba(24,51,82,.96),rgba(9,28,50,.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 3px 8px rgba(0,0,0,.22);
  backdrop-filter:none;
}
.mv2Gear svg{
  width:19px;
  height:19px;
  stroke:#f7dda0;
}
@media (max-width:360px){
  .mv2Head{padding-inline:6px}
  .mv2PlayerName{max-width:72px;font-size:14px}
  .mv2Coins{min-width:80px;padding-right:9px;font-size:13px}
  .mv2HeadRight{gap:5px}
}

/* ---------- skrin lebar web/tablet ----------
   The two primary destinations share the wide screen; stats remain a pair
   underneath. This keeps the same cards and handlers while avoiding a long
   single column on desktop. */
@media (min-width:720px) and (max-width:959px){
  .mv2Scroll{
    width:min(100%,680px);box-sizing:border-box;padding-inline:clamp(18px,3vw,34px)
  }
}
@media (min-width:960px){
  .mv2Scroll{
    width:min(100%,1000px);box-sizing:border-box;padding-inline:clamp(18px,3vw,34px);
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start;gap:16px
  }
  .mv2Scroll>.mv2Card{width:100%;margin:0;min-width:0}
  .mv2Scroll>.mv2Stats{grid-column:1 / -1;width:auto;margin:0}
  .mv2Quest,.mv2Learn{grid-template-columns:132px minmax(0,1fr) 18px}
  .mv2QuestArt{width:min(100%,124px);max-height:102px}
  .mv2LearnCikgu{width:140px;height:120px}
  .mv2CardBody b{font-size:18px;white-space:normal;overflow-wrap:break-word}
  .mv2PlayerName{max-width:220px}
}
/* Mobile home: shorter hero, full cards above the fixed navigation.
   Keep scrolling available for short windows and enlarged accessibility text. */
@media (max-width:719px){
  body[data-screen="menuV2"]{height:100dvh;overflow:hidden}
  body[data-screen="menuV2"] .app{height:100dvh;min-height:0;padding-bottom:0}
  .mv2TopStage{padding:calc(8px + env(safe-area-inset-top,0px)) 12px 2px}
  .mv2Head{min-height:54px;margin-bottom:4px}
  .mv2Stage{height:clamp(100px,18dvh,145px)}
  .mv2Scroll{padding:4px 12px calc(var(--nav-h,72px) + env(safe-area-inset-bottom,0px) + 12px)}
  .mv2Quest,.mv2Learn{
    grid-template-columns:minmax(64px,26%) minmax(0,1fr) 12px;
    gap:8px;min-height:114px;padding:10px 18px;
    margin-bottom:10px;
  }
  .mv2QuestArt{width:100%;max-height:86px;transform:none}
  .mv2LearnCikgu{width:100%;height:86px;transform:none}
  .mv2CardBody b,.mv2Quest .mv2CardBody b{
    font-size:clamp(14px,3.8vw,17px);white-space:normal;
    overflow:visible;text-overflow:clip;
  }
  .mv2CardBody small,.mv2Quest .mv2CardBody small{min-height:0;margin-top:3px}
  .mv2Cta,.mv2Quest .mv2Cta.gold{min-height:44px;padding-inline:12px;font-size:13px;margin-top:5px}
  .mv2Learn .mv2Cta.navy{margin-top:5px}
  .mv2Stats{gap:10px;margin-bottom:0}
  .mv2Stat{padding:10px;min-height:112px}
  .mv2Stat h3{font-size:12px;gap:4px}
  .mv2Stat h3 svg{width:15px;height:15px}
  .mv2PetRow{gap:7px}
  .mv2PetCopy b{font-size:12px}
}
@media (max-width:719px) and (max-height:700px){
  .mv2Stage{height:90px}
  .mv2Quest,.mv2Learn{min-height:108px;padding-block:8px;margin-bottom:8px}
  .mv2QuestArt{max-height:74px}
  .mv2LearnCikgu{height:74px}
}

/* The frame clips a separate face composition for each pet/appearance.
   Full-body stage art keeps its original scale. */
.mv2PetPortrait{
  position:relative;display:block;flex:none;width:44px;height:44px;
  overflow:hidden;border-radius:50%;background:#e8f2fb;
  box-shadow:0 0 0 2px #e7d9b7;
}
.mv2PetPortrait .mv2PetFace{
  position:absolute;display:block;border-radius:0;box-shadow:none;background:transparent;
  max-width:none;width:calc(100% * var(--pet-face-zoom,1));
  height:calc(100% * var(--pet-face-zoom,1));
  left:calc(50% - var(--pet-face-x,.5) * var(--pet-face-zoom,1) * 100%);
  top:calc(50% - var(--pet-face-y,.5) * var(--pet-face-zoom,1) * 100%);
  object-fit:contain;
}
.mv2PetPortrait .mv2PetFace.hidden{display:none}


/* Classic RPG dialogue: a compact, centered box above the actors.
   Keep the typewriter effect while preventing the old side bubble clipping. */
.mv2HeroDialogueSlot{
  position:relative;z-index:20;height:48px;margin:4px 4px 2px;
  display:grid;place-items:center;
}
#wiraBubble,#petBubble{
  position:relative;grid-area:1 / 1;inset:auto;width:fit-content;max-width:calc(100% - 16px);height:auto;min-height:42px;
  box-sizing:border-box;padding:7px 11px;border:5px double #253047;
  border-radius:4px;background:#fff;color:#111827;
  font-family:inherit;font-size:13px;font-weight:750;line-height:1.35;
  text-align:left;white-space:normal;overflow-wrap:anywhere;
  display:flex;align-items:center;justify-content:flex-start;
  box-shadow:0 3px 0 #0b1729,0 5px 12px rgba(0,0,0,.2);
  transform:translateY(3px);transition:opacity .15s ease,transform .15s ease;
}
#wiraBubble::after,#petBubble::after{content:none}
#wiraBubble.show,#petBubble.show{transform:translateY(0)}
@media (prefers-reduced-motion:reduce){
  #wiraBubble{transition:none;transform:none}
}

section.mv2Card{cursor:default}button.mv2Cta{font-family:inherit;cursor:pointer;min-height:44px}button.mv2Cta:focus-visible{outline:3px solid #fff;outline-offset:4px}
