/* Mello Match page: full-screen canvas + DOM panels (kit classes from /kit/mj.css). */
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: #1A0B36; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
#bg, #game { position: fixed; left: 0; top: 0; display: block; touch-action: none; }
#bg { z-index: 0; pointer-events: none; }
#game { z-index: 1; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#ui > * { pointer-events: auto; }
body.poster .mj-hud, body.poster #ui { display: none; }

.mm-mapbtn, .mm-closebtn { position: fixed; z-index: 31; width: 46px; height: 46px; }
.mm-playbtn { position: fixed; z-index: 32; transform: translate(-50%, -50%); animation: mm-breathe 1.6s ease-in-out infinite; }
@keyframes mm-breathe { 50% { transform: translate(-50%, -50%) scale(1.06); } }

.mm-res { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; padding: 70px 16px 16px; background: rgba(12, 2, 32, 0.5); opacity: 0; transition: opacity .25s ease; }
.mm-res.show { opacity: 1; }
.mm-card { position: relative; width: min(100%, 360px); padding: 66px 18px 18px; text-align: center; transform: translateY(40px) scale(.86); transition: transform .5s var(--spring); }
.mm-res.show .mm-card { transform: none; }
.mm-mello { position: absolute; left: 50%; top: -62px; width: 128px; height: 120px; transform: translateX(-50%); }
.mm-lv { font: 600 13px/1 var(--font); letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255, 255, 255, .7); margin-bottom: 6px; }
.mm-card .mj-title { font-size: 27px; }
.mm-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 10px 0 0; height: 74px; }
.mm-star { width: 58px; height: 58px; display: inline-block; transform: scale(0); }
.mm-star.s1 { width: 72px; height: 72px; margin-bottom: 8px; }
.mm-star svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(42, 18, 69, .45)); }
.mm-star.on { animation: mm-star .6s var(--spring) var(--d) forwards; }
.mm-star.on svg { filter: drop-shadow(0 0 10px rgba(255, 210, 63, .75)) drop-shadow(0 3px 0 rgba(122, 51, 0, .5)); }
.mm-star.off { animation: mm-star-off .35s ease var(--d) forwards; }
@keyframes mm-star { 0% { transform: scale(0) rotate(-50deg); } 60% { transform: scale(1.35) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes mm-star-off { to { transform: scale(1); } }
.mm-score { margin: 8px 0 4px; font-size: 46px; }
.mm-btns { display: grid; gap: 10px; margin-top: 12px; }
.mm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.mm-row .mj-btn { min-width: 0; padding-left: 16px; padding-right: 16px; }
.mm-row .mm-mapgo { width: 58px; padding: 0 0 4px; }
.mm-btns .mj-btn span { white-space: nowrap; }
@media (max-height: 640px) { .mm-res { padding-top: 56px; } .mm-card { padding-top: 54px; } .mm-mello { top: -52px; width: 104px; height: 98px; } .mm-stars { height: 62px; } .mm-star { width: 48px; height: 48px; } .mm-star.s1 { width: 60px; height: 60px; } .mm-score { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .mm-playbtn { animation: none; } }
.mm-missed { display: flex; justify-content: center; gap: 14px; margin: 12px 0 2px; }
.mm-miss { display: inline-flex; align-items: center; gap: 4px; font: 700 22px/1 var(--font); color: #fff; text-shadow: 0 2px 0 rgba(42, 18, 69, .6); }
.mm-miss img { width: 46px; height: 46px; object-fit: contain; }
.mm-miss .mm-pts svg { width: 34px; height: 34px; display: block; }
