/* Mello Blocks page: a full-screen canvas plus the result card (kit classes .mj-panel/.mj-btn do the look). */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/fonts/fredoka.woff2) format('woff2'); }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1A0B36; overscroll-behavior: none; }
body { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; font-family: Fredoka, system-ui, sans-serif; }
#bg, #stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
#bg { pointer-events: none; }
#stage { touch-action: none; }
body.poster #bg { display: none; }
body.poster #stage { width: auto; height: auto; }

.bl-over { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(80% 60% at 50% 45%, rgba(26, 11, 54, 0.35), rgba(12, 4, 30, 0.72)); opacity: 0; transition: opacity .35s ease; }
.bl-over.show { opacity: 1; }
.bl-card { position: relative; width: min(100%, 400px); padding: 74px 20px 20px; text-align: center; transform: translateY(40px) scale(.9); opacity: 0; transition: transform .55s cubic-bezier(.2, 1.4, .4, 1), opacity .3s; }
.bl-over.show .bl-card { transform: none; opacity: 1; }
.bl-mello { position: absolute; left: 50%; top: -78px; width: 180px; height: 156px; transform: translateX(-50%); pointer-events: none; }
.bl-label { font: 600 17px/1.2 Fredoka, system-ui, sans-serif; color: rgba(255, 255, 255, .78); letter-spacing: .3px; }
.bl-score { margin: 4px 0 6px; font-size: 64px; background: linear-gradient(180deg, #fff 30%, #FFE27A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 4px 0 rgba(42, 18, 69, .55)); }
.bl-best { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 8px; border-radius: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font: 600 17px/1 Fredoka, system-ui, sans-serif; color: #fff; }
.bl-ic { display: inline-grid; width: 24px; height: 24px; }
.bl-ic svg { width: 24px; height: 24px; }
.bl-newbest { margin: 12px auto 0; display: inline-block; padding: 7px 16px 8px; border-radius: 16px; font: 700 20px/1 Fredoka, system-ui, sans-serif; color: #2A1245;
  background: linear-gradient(180deg, #FFF0A3, #FFD23F); box-shadow: inset 0 -3px 0 #E39B00, 0 6px 16px rgba(255, 210, 63, .35); animation: bl-wiggle 1.4s ease-in-out infinite; }
.bl-friend { margin: 12px auto 0; display: flex; align-items: center; justify-content: center; gap: 6px; font: 600 16px/1.2 Fredoka, system-ui, sans-serif; color: rgba(255, 255, 255, .88); }
.bl-friend svg { width: 22px; height: 22px; }
.bl-friend.won { color: #A8FFEC; }
.bl-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.bl-actions .mj-btn { min-height: 60px; padding-left: 16px; padding-right: 16px; white-space: nowrap; }
.bl-actions .mj-btn > span:not(.mj-badge) { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .bl-actions .mj-btn { font-size: 20px; gap: 6px; } .bl-actions .mj-btn .mj-badge { padding: 0 7px 0 3px; } }
.bl-actions .mj-btn.second { min-height: 54px; font-size: 20px; }
.bl-actions .mj-btn > svg { width: 26px; height: 26px; }
@keyframes bl-wiggle { 0%, 100% { transform: rotate(-2deg) scale(1); } 50% { transform: rotate(2deg) scale(1.06); } }

.bl-idle { position: fixed; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.bl-idle .mj-btn { pointer-events: auto; animation: bl-breathe 1.6s ease-in-out infinite; }
@keyframes bl-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .bl-newbest, .bl-idle .mj-btn { animation: none; } .bl-card { transition-duration: .01s; } }
@media (max-height: 640px) { .bl-card { padding-top: 64px; } .bl-score { font-size: 54px; } .bl-actions { margin-top: 14px; } }
