/* ---------- MR. MESSAGE: Social's retro message box ---------- */
.mm-win { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 300px; box-sizing: border-box; background: #F4EEE3; color: #1E1A18; font-family: var(--font, Inter, system-ui, sans-serif); border: 2px solid #1E1A18; box-shadow: inset -3px -3px 0 #B9AD9C, inset 3px 3px 0 #FFFFFF, 6px 6px 0 rgba(30,26,24,.85); animation: mm-pop .28s steps(4) both; transform-origin: 100% 100%; }
.mm-bar { cursor: grab; touch-action: none; user-select: none; display: flex; align-items: center; justify-content: space-between; margin: 3px; padding: 3px 4px 3px 8px; background: linear-gradient(90deg, #8A3A22, #E0784F); color: #fff; font: 700 13px var(--font, Inter, system-ui, sans-serif); letter-spacing: .02em; }
.mm-x { width: 20px; height: 18px; display: grid; place-items: center; padding: 0; font: 700 15px/1 var(--font, Inter, system-ui, sans-serif); color: #1E1A18; background: #F4EEE3; border: 1px solid #1E1A18; box-shadow: inset -2px -2px 0 #B9AD9C, inset 2px 2px 0 #fff; cursor: pointer; }
.mm-body { display: flex; align-items: center; gap: 12px; padding: 16px 12px 12px; }
.mm-win .mm-body p { margin: 0; font-size: 14px; line-height: 1.45; }

/* his face: cartoon eyes and eyebrows */
.mm-face { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 4px; padding-top: 8px; }
.mm-eyewrap { position: relative; display: block; }
.mm-eye { position: relative; display: block; width: 26px; height: 32px; box-sizing: border-box; background: #fff; border: 2.5px solid #1E1A18; border-radius: 50%; overflow: hidden; animation: mm-blink 5s 2.4s infinite; transition: transform .15s; }
.mm-eye b { position: absolute; left: 50%; top: 50%; width: 11px; height: 13px; margin: -6.5px 0 0 -5.5px; border-radius: 50%; background: #1E1A18; transition: transform .12s ease-out; }
.mm-eye b::after { content: ""; position: absolute; left: 2px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.mm-brow { position: absolute; left: 1px; top: -13px; width: 24px; height: 9px; box-sizing: border-box; border-top: 4px solid #1E1A18; border-radius: 50% 50% 0 0 / 100% 100% 0 0; transition: transform .15s; }
.mm-eyewrap:first-child .mm-brow { transform: rotate(-6deg); }
.mm-eyewrap:nth-child(2) .mm-brow { transform: rotate(6deg); }
/* surprised: brows jump up and eyes go wide when he hits a side */
.mm-hit .mm-eyewrap:first-child .mm-brow { transform: translateY(-9px) rotate(-12deg); }
.mm-hit .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(-9px) rotate(12deg); }
.mm-hit .mm-eye { transform: scale(1.12); }
/* worried: on "No", brows tilt up in the middle and he looks down at the shredder */
.mm-sad .mm-eyewrap:first-child .mm-brow { transform: translateY(-2px) rotate(-24deg); }
.mm-sad .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(-2px) rotate(24deg); }
.mm-sad .mm-eye { animation: none; }
.mm-sad .mm-eye b { transform: translate(0, 7px) !important; }
/* happy: on "Yes", his eyes squint shut into smiles */
.mm-happy .mm-eye { animation: none; height: 15px; margin-top: 12px; background: transparent; border-bottom-color: transparent; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.mm-happy .mm-eye b { display: none; }
.mm-happy .mm-brow { transform: translateY(2px) !important; }
.mm-face { position: relative; cursor: pointer; }
.mm-eye::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 0; background: #F4EEE3; border-bottom: 0 solid #1E1A18; transition: height .5s ease; }
/* wink: one eye closes into a little arc after he lands */
.mm-wink .mm-eyewrap:nth-child(2) .mm-eye { animation: none; height: 15px; margin-top: 12px; background: transparent; border-bottom-color: transparent; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.mm-wink .mm-eyewrap:nth-child(2) .mm-eye b { display: none; }
.mm-wink .mm-eyewrap:first-child .mm-brow { transform: translateY(-5px) rotate(-10deg); }
/* hovering Yes: excited, brows up and big pupils */
.mm-yeshover .mm-eyewrap:first-child .mm-brow { transform: translateY(-6px) rotate(-8deg); }
.mm-yeshover .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(-6px) rotate(8deg); }
.mm-yeshover .mm-eye { transform: scale(1.08); }
.mm-yeshover .mm-eye b { transform: scale(1.2) !important; }
/* hovering No: big shiny puppy eyes looking up at you */
.mm-nohover .mm-eyewrap:first-child .mm-brow { transform: translateY(-3px) rotate(-18deg); }
.mm-nohover .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(-3px) rotate(18deg); }
.mm-nohover .mm-eye { animation: none; }
.mm-nohover .mm-eye b { transform: translate(0, -3px) scale(1.45) !important; }
.mm-nohover .mm-eye b::before { content: ""; position: absolute; right: 2px; bottom: 2px; width: 2px; height: 2px; border-radius: 50%; background: #fff; }
/* sleepy: eyelids droop, brows go flat, and the z's float up */
.mm-sleepy .mm-eye { animation: none; }
.mm-sleepy .mm-eye::before { height: 58%; border-bottom-width: 2.5px; }
.mm-sleepy .mm-eye b { transform: translate(0, 5px) !important; }
.mm-sleepy .mm-brow { transform: translateY(5px) !important; }
.mm-z { position: absolute; right: -12px; top: -8px; font: 700 13px var(--font, Inter, system-ui, sans-serif); color: #8A3A22; opacity: 0; pointer-events: none; }
.mm-z span { position: absolute; left: 8px; top: -6px; font-size: 11px; } .mm-z span span { left: 7px; top: -5px; font-size: 9px; }
.mm-sleepy .mm-z { animation: mm-snore 2.4s ease-in-out infinite; }
/* click his eyes: ouch, he squeezes them shut and frowns */
.mm-ouch .mm-eye { animation: none; height: 6px; margin: 13px 0; border-radius: 3px; background: #1E1A18; }
.mm-ouch .mm-eye b { display: none; }
.mm-ouch .mm-eyewrap:first-child .mm-brow { transform: translateY(6px) rotate(20deg) !important; }
.mm-ouch .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(6px) rotate(-20deg) !important; }
.mm-ouch .mm-face { animation: mm-shake .35s linear 2; }
/* shaken too fast: dizzy spinning eyes */
.mm-dizzy .mm-eye { animation: none; }
.mm-dizzy .mm-eye b { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; box-sizing: border-box; background: transparent; border: 3px solid #1E1A18; border-right-color: transparent; animation: mm-spin .45s linear infinite; transform: none !important; }
.mm-dizzy .mm-eyewrap:nth-child(2) .mm-eye b { animation-direction: reverse; }
.mm-dizzy .mm-eye b::after { left: 3px; top: 3px; width: 3px; height: 3px; background: #1E1A18; }
.mm-dizzy .mm-eyewrap:first-child .mm-brow { transform: translateY(-4px) rotate(14deg); }
.mm-dizzy .mm-eyewrap:nth-child(2) .mm-brow { transform: translateY(-1px) rotate(-6deg); }
.mm-happy .mm-eye::before { display: none; }
@keyframes mm-snore { 0% { opacity: 0; transform: translate(0, 6px); } 30%, 70% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }
@keyframes mm-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
@keyframes mm-spin { to { transform: rotate(360deg); } }
@keyframes mm-blink { 0%, 93%, 100% { transform: none; } 95.5% { transform: scaleY(.1); } }
.mm-btns { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; }
.mm-btn { min-width: 64px; text-align: center; font: 700 13px var(--font, Inter, system-ui, sans-serif); color: #1E1A18; background: #F4EEE3; border: 2px solid #1E1A18; padding: 6px 14px; box-shadow: inset -2px -2px 0 #B9AD9C, inset 2px 2px 0 #fff; cursor: pointer; }
.mm-btn:active { box-shadow: inset 2px 2px 0 #B9AD9C, inset -2px -2px 0 #fff; }
.mm-btn.mm-go { background: #E0784F; color: #fff; box-shadow: inset -2px -2px 0 #8A3A22, inset 2px 2px 0 #F7B193; }

.mm-win.mm-dragging { box-shadow: inset -3px -3px 0 #B9AD9C, inset 3px 3px 0 #FFFFFF, 12px 14px 0 rgba(30,26,24,.6); }
.mm-win.mm-dragging .mm-bar { cursor: grabbing; }

/* "Yes": folds down */
.mm-win.mm-fold { animation: mm-fold .26s steps(4) forwards; }

/* shred: the box feeds down into a shredder and comes out as strips */
.mm-shred { position: fixed; z-index: 61; pointer-events: none; }
.mm-copy { position: absolute !important; left: 0 !important; top: 0 !important; right: auto !important; bottom: auto !important; margin: 0; animation: none !important; box-shadow: inset -3px -3px 0 #B9AD9C, inset 3px 3px 0 #FFFFFF !important; }
.mm-above { position: absolute; inset: 0; overflow: hidden; }
.mm-above .mm-copy { animation: mm-feed 1.35s ease-in-out forwards !important; }
.mm-below { position: absolute; left: 0; right: 0; top: 100%; height: 900px; overflow: hidden; }
.mm-below .mm-strip { top: calc(-1 * var(--h)) !important; animation: mm-strip 1.6s cubic-bezier(.5,0,.6,1) .35s forwards !important; }
.mm-shredder { z-index: 2; position: absolute; left: -14px; right: -14px; top: calc(100% - 6px); height: 34px; border-radius: 6px; background: linear-gradient(180deg, #F2F0EC 0%, #CFC9C0 48%, #B6AFA4 52%, #E4E0D9 100%); border: 2px solid #1E1A18; box-shadow: 0 6px 0 rgba(30,26,24,.85); transform: translateY(40px); opacity: 0; animation: mm-machine 1.9s ease forwards; }
.mm-shredder::before { content: ""; position: absolute; left: 12px; right: 12px; top: 6px; height: 5px; border-radius: 3px; background: #1E1A18; }
.mm-shredder i { position: absolute; bottom: 7px; width: 8px; height: 8px; border-radius: 50%; background: #5DBB63; border: 1px solid #1E1A18; }
.mm-shredder i:nth-child(1) { right: 14px; } .mm-shredder i:nth-child(2) { right: 28px; background: #E0784F; } .mm-shredder i:nth-child(3) { right: 42px; background: #F2C94C; }

@keyframes mm-pop { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: none; } }
@keyframes mm-fold { 0% { transform: none; opacity: 1; } 100% { transform: scaleY(.05); opacity: 0; } }
@keyframes mm-machine { 0% { transform: translateY(40px); opacity: 0; } 15% { transform: none; opacity: 1; } 20%, 30%, 40%, 50%, 60% { transform: translateX(-1px); } 25%, 35%, 45%, 55%, 65% { transform: translateX(1px); } 85% { transform: none; opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes mm-feed { 0% { transform: translateY(var(--lift)); } 25% { transform: none; } 100% { transform: translateY(100%); } }
@keyframes mm-strip { 0% { transform: none; } 55% { transform: translate(calc((var(--i) - 4.5) * 4px), var(--h)); } 80% { opacity: 1; } 100% { transform: translate(calc((var(--i) - 4.5) * 9px), calc(var(--h) + 420px)) rotate(calc((var(--i) - 4.5) * 5deg)); opacity: 0; } }

@media (max-width: 640px) { .mm-win { right: 12px; left: 12px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .mm-win, .mm-eye { animation: none !important; } }

/* the × drawn as two lines so it sits dead centre in its box */
.mm-x { position: relative; font-size: 0 !important; }
.mm-x::before, .mm-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 2px; background: #1E1A18; transform: translate(-50%, -50%) rotate(45deg); }
.mm-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* his mouth: a little smile under the eyes that changes with his mood */
.mm-mouth { grid-column: 1 / -1; justify-self: center; display: block; width: 18px; height: 8px; margin-top: 5px; box-sizing: border-box; border: 2.5px solid #1E1A18; border-top: 0; border-radius: 0 0 12px 12px; background: transparent; transition: all .15s; }
/* big open smile: happy, excited, wink */
.mm-happy .mm-mouth, .mm-yeshover .mm-mouth, .mm-wink .mm-mouth { width: 24px; height: 12px; background: #8A3A22; border-top: 2.5px solid #1E1A18; border-radius: 3px 3px 14px 14px; }
/* surprised "o" when he hits a side or wakes up */
.mm-hit .mm-mouth { width: 12px; height: 12px; border-top: 2.5px solid #1E1A18; border-radius: 50%; background: #8A3A22; }
/* frown: worried or puppy eyes */
.mm-sad .mm-mouth, .mm-nohover .mm-mouth { width: 16px; height: 7px; margin-top: 8px; border: 2.5px solid #1E1A18; border-bottom: 0; border-radius: 12px 12px 0 0; }
/* sleepy: flat little line */
.mm-sleepy .mm-mouth { width: 10px; height: 0; margin-top: 9px; border: 0; border-top: 2.5px solid #1E1A18; border-radius: 2px; }
/* ouch: gritted teeth */
.mm-ouch .mm-mouth { width: 18px; height: 8px; margin-top: 6px; border: 2.5px solid #1E1A18; border-radius: 3px; background: linear-gradient(90deg, transparent 47%, #1E1A18 47% 53%, transparent 53%), #fff; }
/* dizzy: a wobbly little "o" */
.mm-dizzy .mm-mouth { width: 12px; height: 9px; border-top: 2.5px solid #1E1A18; border-radius: 50%; transform: rotate(-12deg); }
