/* meta 模組的樣式：天賦樹捲動、標題畫面區塊、金湯匙商店、轉生、儀式、紀念冊、提示 */
:root { --spoon: #e8a317; --plum: #b86bd6; }

/* ---------- 天賦樹：長高就捲動 ---------- */
.tscroll { max-height: 900px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; margin: 6px -44px 20px; padding: 0 44px; scrollbar-width: thin; scrollbar-color: #d9c4ad transparent; }
.tscroll .tree { margin: 0; overflow: hidden; transition: height .6s var(--ease); }
.tree-box .th { display: flex; align-items: center; gap: 20px; }
.tree-box .th h2 { margin-right: auto; }
.mth { display: flex; gap: 14px; order: 3; }
.mth .b { height: 88px; padding: 0 22px; font-size: 34px; box-shadow: 0 6px 0 var(--ink); }

/* ---------- 標題畫面的 meta 區 ---------- */
.mfac { text-align: left; }
.mfac { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 22px; background: #fff; border: 5px solid var(--line); border-radius: 38px; padding: 18px 22px; }
.mfac .mi { font-size: 66px; width: 100px; height: 100px; border-radius: 30px; background: #fff1dc; display: grid; place-items: center; }
.mfac b { font-size: 38px; display: block; }
.mfac small { font-size: 27px; color: var(--sub); display: block; }
.mfac i { display: block; height: 14px; border-radius: 8px; margin-top: 8px; background: linear-gradient(90deg, var(--gold) calc(var(--p) * 100%), #f1e5d5 0); }
.mfac .b { height: 100px; font-size: 34px; }
.mfac .b.gold { animation: mbob 1.6s var(--ease) infinite; }
@keyframes mbob { 50% { transform: translateY(-6px); } }


.ts-more .b small { font-size: 28px; }
.mnew { position: relative; }
.mnew::after { content: ""; position: absolute; top: -6px; right: -6px; width: 30px; height: 30px; border-radius: 50%; background: var(--pink); border: 4px solid var(--ink); }
.mfly { position: absolute; z-index: 30; font-size: 56px; pointer-events: none; animation: mfly 1.1s var(--ease) forwards; }
@keyframes mfly { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), var(--y)) scale(1.1); opacity: 0; } }

/* ---------- 結算畫面 ---------- */
.mend { margin-top: 26px; display: grid; gap: 14px; }
.mendpre { height: 110px; width: 100%; font-size: 40px; animation: mpulse 1.2s var(--ease) infinite alternate; }
@keyframes mpulse { to { transform: scale(1.03); } }
.msmall { font-size: 30px; color: var(--sub); margin-top: 6px; }

/* ---------- 金湯匙商店 ---------- */
.mshop { padding: 40px 40px 44px; }
.mshop .th { display: flex; align-items: center; justify-content: space-between; }
.mspoon { font: 800 54px/1 "Arial Rounded MT Bold", "PingFang TC", sans-serif; background: linear-gradient(#fff4c2, #ffd36b); border: 5px solid var(--ink); border-radius: 40px; padding: 14px 28px; }
.mshop .sub { font-size: 30px; text-align: left; margin: 14px 0 0; }
.mlist { display: grid; gap: 16px; margin-top: 24px; max-height: 1180px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 4px 14px; }
.msp { display: grid; grid-template-columns: 96px 1fr 230px; gap: 20px; align-items: center; text-align: left; background: #fff; border: 5px solid var(--line); border-radius: 34px; padding: 16px 20px; }
.msp.own { border-color: color-mix(in srgb, var(--spoon) 55%, var(--line)); }
.msp .mi { width: 96px; height: 96px; border-radius: 28px; background: #fff1dc; display: grid; place-items: center; font-size: 56px; }
.msp b { font-size: 36px; }
.msp b small { font-size: 26px; color: var(--sub); margin-left: 6px; }
.msp p { font-size: 27px; color: var(--sub); line-height: 1.3; }
.msp p b { font-size: inherit; color: var(--ink); }
.msp .b { height: 96px; font-size: 34px; padding: 0 12px; box-shadow: 0 6px 0 var(--ink); }

/* ---------- 轉生確認 ---------- */
.mpre .mcake { font-size: 150px; line-height: 1; animation: mwob 2.4s ease-in-out infinite; }
@keyframes mwob { 50% { transform: rotate(-5deg) scale(1.04); } }
.mbig { font: 800 110px/1.1 "Arial Rounded MT Bold", "Arial Black", "PingFang TC", sans-serif; color: var(--gold); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; margin: 18px 0 0; }
.mpre .kv { margin: 22px 30px 10px; font-size: 36px; }
.mpre .kv dd b { color: #e27b00; }

/* ---------- 轉生儀式 ---------- */
.mrebake { position: absolute; inset: 0; z-index: 40; display: grid; justify-items: center; align-content: center; gap: 22px; text-align: center; overflow: hidden;
  background: radial-gradient(70% 45% at 50% 34%, #fff6d6 0%, #ffd27a 38%, #e98c4d 72%, #8a4a2a 100%); animation: fade .5s var(--ease); }
.mrebake.out { animation: mout .4s var(--ease) forwards; }
@keyframes mout { to { opacity: 0; } }
.mrays { position: absolute; left: 50%; top: 34%; width: 2400px; height: 2400px; margin: -1200px 0 0 -1200px; border-radius: 50%; opacity: .35;
  background: repeating-conic-gradient(from 0deg, #fff8 0 7deg, transparent 7deg 18deg); animation: mspin 16s linear infinite; }
@keyframes mspin { to { transform: rotate(1turn); } }
.moven { position: relative; width: 560px; height: 520px; display: grid; place-items: center; }
.mglow { position: absolute; width: 440px; height: 440px; border-radius: 50%; background: radial-gradient(#fffbe6 0%, #ffe28a55 50%, transparent 70%); animation: mglow 1.6s var(--ease) both; }
@keyframes mglow { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); } }
.mcake2 { position: relative; font-size: 300px; line-height: 1; filter: drop-shadow(0 18px 0 #6b3a20aa); animation: mrise 1.6s var(--spring) .3s both; }
@keyframes mrise { 0% { transform: scale(.15, .05) translateY(300px); } 55% { transform: scale(1.2, .85); } 75% { transform: scale(.92, 1.1); } 100% { transform: none; } }
.moven i { position: absolute; left: 50%; top: 50%; font-style: normal; font-size: 70px; opacity: 0; animation: mspoon 1.3s var(--ease) calc(1.3s + var(--d)) forwards; }
@keyframes mspoon { 0% { transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(.3); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(calc(-1 * var(--a))) scale(1); opacity: 0; } }
.mrebake h2 { position: relative; font-size: 104px; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; animation: pop .6s var(--spring) 1.1s both; }
.mcount { position: relative; display: flex; align-items: center; gap: 18px; background: #fffaf2; border: 6px solid var(--ink); border-radius: 60px; padding: 10px 44px; font: 800 96px/1.1 "Arial Rounded MT Bold", sans-serif; animation: pop .6s var(--spring) 1.5s both; }
.mcmp { position: relative; background: #fffaf2e8; border: 5px solid var(--ink); border-radius: 40px; padding: 26px 40px; margin: 0; width: 820px; font-size: 38px; animation: pop .6s var(--spring) 2.4s both; }
.mcmp dd b { color: #e27b00; }
.mrebake .b { position: relative; width: 820px; height: 124px; font-size: 44px; animation: pop .6s var(--spring) 2.9s both; }

/* ---------- 紀念冊 ---------- */
.malbum { padding: 44px 36px; }
.malbum .sub { font-size: 30px; }
.mgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 28px; max-height: 1300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.mach { display: grid; justify-items: center; align-content: start; gap: 2px; background: #f4ebe0; border: 4px solid transparent; border-radius: 28px; padding: 14px 6px 12px; min-height: 236px; }
.mach .mi { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 56px; background: #e9dccb; filter: grayscale(1) brightness(0); opacity: .22; }
.mach b { font-size: 25px; line-height: 1.25; margin-top: 4px; color: #b9a38c; }
.mach small { font-size: 21px; line-height: 1.25; color: var(--sub); }
.mach em { font-style: normal; font-size: 19px; color: #b9a38c; margin-top: 2px; }
.mach.got { background: #fff; border-color: var(--gold); }
.mach.got .mi { filter: none; opacity: 1; background: radial-gradient(#fff 50%, #ffe6a6); box-shadow: 0 0 0 4px var(--ink); }
.mach.got b { color: var(--ink); }
.mach.got em { color: #e27b00; font-weight: 700; }

/* ---------- 得到紀念章的提示 ---------- */
.mtoasts { position: absolute; left: 0; right: 0; top: 16px; display: grid; justify-items: center; gap: 14px; pointer-events: none; z-index: 35; }
.mtoast { pointer-events: auto; appearance: none; display: flex; align-items: center; gap: 22px; text-align: left; background: #fffaf2; border: 5px solid var(--ink); border-radius: 50px; padding: 14px 40px 14px 16px;
  box-shadow: 0 10px 0 var(--ink), 0 20px 40px -10px #6b3a2066; animation: min .55s var(--spring) both; }
.mtoast.out { animation: mtout .45s var(--ease) forwards; }
@keyframes min { from { transform: translateY(-160px) scale(.8); opacity: 0; } }
@keyframes mtout { to { transform: translateY(-120px); opacity: 0; } }
.mtoast .mi { width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; font-size: 60px; background: radial-gradient(#fff 50%, #ffe6a6); box-shadow: 0 0 0 4px var(--ink); animation: pop2 .7s var(--spring) .2s both; }
.mtoast small { display: block; font-size: 26px; color: #e27b00; font-weight: 800; }
.mtoast b { display: block; font-size: 42px; line-height: 1.15; }
.mtoast em { display: block; font-style: normal; font-size: 26px; color: var(--sub); }

@media (prefers-reduced-motion: reduce) {
  .mrays, .moven i { display: none; }
  .tscroll .tree { transition: none; }
}
