* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #07060c; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
.mg-top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: linear-gradient(#07060ce6, #07060c00); pointer-events: none; }
.mg-top > * { pointer-events: auto; }
.mg-back, .mg-trophy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07);
  color: #fff; text-decoration: none; font-size: 13px; font-weight: 800; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.mg-title { font-size: 15px; font-weight: 900; letter-spacing: -.2px; text-align: center; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 22px; border-radius: 16px; border: 0; font-size: 17px; font-weight: 900; letter-spacing: .2px;
  background: linear-gradient(135deg, #ff2a5f, #b44bff); color: #fff; box-shadow: 0 12px 30px -12px rgba(255,42,95,.9); }
.mg-btn:active { transform: scale(.97); }
.mg-btn.ghost { background: rgba(255,255,255,.08); box-shadow: none; border: 1px solid rgba(255,255,255,.14); }
.mg-btn.gold { background: linear-gradient(135deg, #ffd23f, #ff8a00); color: #1a0f00; box-shadow: 0 12px 30px -12px rgba(255,170,0,.9); }
.mg-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(4,3,8,.7); backdrop-filter: blur(4px); }
.mg-modal[hidden] { display: none; }
.mg-sheet { width: 100%; max-width: 440px; max-height: 86vh; display: flex; flex-direction: column; background: linear-gradient(170deg, #1a1226, #0d0a14); border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 16px); animation: mgup .25s ease both; }
@media (min-width: 620px) { .mg-modal { align-items: center; } .mg-sheet { border-radius: 22px; } }
@keyframes mgup { from { transform: translateY(30px); opacity: 0; } }
.mg-sheet h3 { margin: 0 0 12px; font-size: 20px; font-weight: 900; display: flex; justify-content: space-between; align-items: center; }
.mg-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); font-size: 15px; }
.mg-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); margin-bottom: 10px; }
.mg-tabs button { flex: 1; padding: 8px; border: 0; border-radius: 9px; background: none; color: rgba(255,255,255,.6); font-size: 13.5px; font-weight: 900; }
.mg-tabs button.on { background: rgba(255,255,255,.14); color: #fff; }
.mg-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.mg-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(255,255,255,.035); font-size: 14px; }
.mg-row.me { background: rgba(255,42,95,.18); outline: 1px solid rgba(255,42,95,.5); }
.mg-row .r { width: 26px; text-align: center; font-weight: 900; opacity: .7; }
.mg-row .n { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-row .s { font-weight: 900; color: #ffd76a; font-variant-numeric: tabular-nums; }
.mg-empty { text-align: center; opacity: .5; padding: 30px 0; font-size: 14px; }
.mg-sub { font-size: 12px; opacity: .55; margin: 8px 2px 0; text-align: center; }
.mg-toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 80; padding: 10px 16px; border-radius: 14px; background: #1b1426;
  border: 1px solid rgba(255,255,255,.16); font-size: 14px; font-weight: 800; box-shadow: 0 14px 34px -14px #000; animation: mgup .25s ease both; max-width: 90vw; text-align: center; }
.mg-banner { position: fixed; left: 50%; top: 42%; z-index: 93; transform: translate(-50%, -50%); text-align: center; pointer-events: none; white-space: nowrap; animation: mgban 1.4s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.mg-banner b { display: block; font-size: clamp(40px, 13vw, 72px); font-weight: 900; letter-spacing: -2px; line-height: 1; text-shadow: 0 5px 0 rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.55); }
.mg-banner small { display: block; margin-top: 6px; font-size: 17px; font-weight: 900; color: #fff; text-shadow: 0 3px 12px rgba(0,0,0,.7); }
@keyframes mgban { from { transform: translate(-50%, -50%) scale(.3) rotate(-10deg); opacity: 0; } 22% { transform: translate(-50%, -50%) scale(1.12) rotate(-3deg); opacity: 1; } 35% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); } 80% { opacity: 1; } to { transform: translate(-50%, -62%) scale(1) rotate(-3deg); opacity: 0; } }
.mg-bump { animation: mgbump .3s ease; display: inline-block; }
@keyframes mgbump { 40% { transform: scale(1.35); } }
.mg-name { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 13px; font-weight: 800; }
