/* 🎓 新手任務卡（js/newbie.js）：小地圖正下方（手機橫式在小地圖左邊）的一張小卡，點一下展開 8 步清單。
   位置（top／right／width／max-height）由 newbie.js place() 量版面設；放在 #game 裡；收起來時壓在 #lmui-hud 下面（z-index 49）→ 開了視窗、確認框都蓋得過它 */
#newbie-card { position: fixed; z-index: 49; box-sizing: border-box; top: calc(var(--orig-bar-h, 0px) + 200px); right: 6px; width: 208px; padding: 6px 9px 7px;
  border: 1px solid rgba(214,180,110,.75); border-radius: 8px; background: rgba(12,10,8,.84); box-shadow: 0 2px 8px rgba(0,0,0,.6);
  color: #f1e6cf; font: 13px/1.35 "Microsoft JhengHei", system-ui, sans-serif; text-shadow: 0 1px 0 #000; cursor: pointer; pointer-events: auto;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#newbie-card.open { display: flex; flex-direction: column; z-index: 55; }   /* 展開時壓在介面上面（點卡片以外的地方收回去） */   /* 展開：卡有 max-height（newbie.js），清單吃剩下的高度、超過在清單裡捲 */
#newbie-card[hidden] { display: none; }
#newbie-card .nb-hd { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#newbie-card .nb-hd b { color: #f2d58a; font-size: 13px; letter-spacing: .5px; }
#newbie-card .nb-hd i { font-style: normal; color: #cdb98a; font-size: 12px; }
#newbie-card .nb-task { margin-top: 2px; color: #fff; font-weight: 700; font-size: 14px; line-height: 1.3; }
#newbie-card .nb-reward { margin-top: 2px; color: #a9d8a2; font-size: 12px; }
#newbie-card .nb-prog { position: relative; margin-top: 5px; height: 14px; border: 1px solid #6b5636; border-radius: 7px; background: rgba(0,0,0,.55); overflow: hidden; }
#newbie-card .nb-prog span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#e9c46a, #b98a2a); }
#newbie-card .nb-prog em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; line-height: 1; color: #fff; text-shadow: 0 1px 1px #000, 0 0 3px #000; }
#newbie-card .nb-list { list-style: none; margin: 6px 0 0; padding: 5px 0 0; border-top: 1px solid rgba(214,180,110,.35); flex: 0 1 auto; min-height: 52px; overflow-y: auto; overscroll-behavior: contain; }
#newbie-card.open > :not(.nb-list) { flex: none; }
#newbie-card .nb-list li { display: flex; gap: 5px; align-items: baseline; padding: 1px 0; color: #8d8574; font-size: 12px; line-height: 1.35; }
#newbie-card .nb-list li u { flex: none; width: 13px; text-align: center; text-decoration: none; }
#newbie-card .nb-list li.ok { color: #cfc6ac; }
#newbie-card .nb-list li.ok u { color: #8fd08a; }
#newbie-card .nb-list li.cur { color: #fff; }
#newbie-card .nb-list li.cur u { color: #f2d58a; }
/* 完成一步：卡片金光一閃、跳出「✓ 完成」往上飄；全部完成：同樣的光，再收起來 */
#newbie-card.pop, #newbie-card.bye { animation: nbPop .9s ease-out; }
#newbie-card .nb-spark { position: absolute; right: 8px; top: -9px; padding: 1px 8px; border: 1px solid #e9c46a; border-radius: 9px; background: rgba(40,28,8,.95);
  color: #ffe38a; font-weight: 700; font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 0 #000; animation: nbSpark 1.8s ease-out forwards; }
@keyframes nbPop { 0% { transform: scale(1); box-shadow: 0 2px 8px rgba(0,0,0,.6); } 30% { transform: scale(1.05); box-shadow: 0 0 16px 3px rgba(255,214,100,.85); } 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(0,0,0,.6); } }
@keyframes nbSpark { 0% { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { #newbie-card.pop, #newbie-card.bye { animation: none; } #newbie-card .nb-spark { animation: none; opacity: 1; } }
