/* ---------- Online games (full screen shell) ---------- */
body.mp-open { overflow: hidden; }
.mp { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: radial-gradient(120% 80% at 50% 0%, #17325a 0%, #0b1220 60%); color: #fff; padding-top: var(--safe-t, 0px); padding-bottom: var(--safe-b, 0px); overscroll-behavior: contain; touch-action: manipulation; }
.mp .muted { color: rgba(255, 255, 255, .66); }
.mp__bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; flex: none; }
.mp__title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.mp__title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp__code { font-weight: 800; letter-spacing: .18em; padding: 3px 9px; border-radius: 10px; background: rgba(255, 255, 255, .14); font-size: .86rem; }
.mp__btn { position: relative; width: 42px; height: 42px; flex: none; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 1.15rem; cursor: pointer; }
.mp__btn:active { transform: scale(.94); }
.mp__btn.is-live { background: #16a34a; border-color: #4ade80; box-shadow: 0 0 14px rgba(74, 222, 128, .55); }
.mp__btn.is-muted { background: #b91c1c; border-color: #fca5a5; }
.mp__btn.has-dot::after { content: ""; position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: #ff4d5e; border: 2px solid #0b1220; }
.mp__btn--go { background: linear-gradient(135deg, var(--primary, #38bdf8), var(--primary-2, #0ea5e9)); color: #04121f; border-color: transparent; }

.mp__strip { display: flex; gap: 10px; padding: 2px 12px 8px; overflow-x: auto; flex: none; scrollbar-width: none; }
.mp__strip::-webkit-scrollbar { display: none; }
.mp__pl { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 48px; flex: none; }
.mp__av { position: relative; border-radius: 50%; padding: 2px; background: var(--ring, #fff); transition: box-shadow .15s, transform .15s; }
.mp__av .avatar { display: block; }
.mp__pl.is-speaking .mp__av { box-shadow: 0 0 0 3px #4ade80, 0 0 16px 4px rgba(74, 222, 128, .8); transform: scale(1.08); }
.mp__pl.is-watch { opacity: .5; }
.mp__nm { font-size: .66rem; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .85); }
.mp__mic { position: absolute; right: -4px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: #16a34a; display: flex; align-items: center; justify-content: center; border: 2px solid #0b1220; }
.mp__mic.is-off { background: #b91c1c; }
.mp__pop { position: absolute; left: 50%; top: 100%; width: 64px; height: 64px; margin-left: -32px; z-index: 5; pointer-events: none; animation: mpPop 2.6s ease-out forwards; }
@keyframes mpPop { 0% { transform: translateY(-10px) scale(.2); opacity: 0; } 12% { transform: translateY(6px) scale(1.15); opacity: 1; } 22% { transform: translateY(6px) scale(1); } 85% { opacity: 1; } 100% { transform: translateY(14px) scale(1); opacity: 0; } }

.mp__main { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.mp[data-phase="playing"] .mp__main { overflow: hidden; }
.mp__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.mp__canvas { display: block; border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none; }
.mp__ctrl { flex: none; padding: 8px 12px 12px; display: flex; gap: 12px; justify-content: center; }
.mp__ctrl .ghold { max-width: none; flex: 1; min-height: 78px; }
.mp__ctrl .gbtn { color: #fff; background: rgba(255, 255, 255, .1); }
.mp__ctrl .gbtn--primary { color: #04121f; background: linear-gradient(135deg, var(--primary, #38bdf8), var(--primary-2, #0ea5e9)); }

.mp__center { margin: auto; width: min(100%, 420px); padding: 14px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.mp__hero { width: 84px; height: 84px; border-radius: 26px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); }
.mp__meta { font-size: .8rem; color: rgba(255, 255, 255, .6); margin: 0; }
.mp__wide { width: 100%; }
.mp .gbtn:not(.gbtn--primary) { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.mp .gbtn--ghost { background: transparent !important; }
.mp .gbtn--primary { color: #04121f; background: linear-gradient(135deg, var(--primary, #38bdf8), var(--primary-2, #0ea5e9)); }
.mp__or { font-size: .8rem; color: rgba(255, 255, 255, .55); }
.mp__join { display: flex; gap: 10px; width: 100%; }
.mp__codein { flex: 1; min-width: 0; text-align: center; font-weight: 800; letter-spacing: .4em; font-size: 1.3rem; text-transform: uppercase; }
.mp .input { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.mp .input::placeholder { color: rgba(255, 255, 255, .45); }
.mp .field__error { color: #fca5a5; min-height: 1.1em; margin: 0; }
.mp__bigcode { font: inherit; font-weight: 900; font-size: 3.2rem; letter-spacing: .22em; padding: 6px 12px 6px 24px; border-radius: 20px; border: 2px dashed rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.mp__share { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mp__share .gbtn { display: inline-flex; align-items: center; gap: 4px; }
.mp__list { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mp__row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); text-align: left; }
.mp__row strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp__row.is-first { border-color: #facc15; box-shadow: 0 0 18px rgba(250, 204, 21, .3); }
.mp__rank { width: 28px; text-align: center; font-size: 1.4rem; font-weight: 800; }
.mp__score { font-weight: 800; color: #facc15; }
.mp__rowmic { color: #4ade80; display: inline-flex; }
.mp__wait { margin: 0; color: rgba(255, 255, 255, .75); animation: mpBlink 1.6s ease-in-out infinite; }
@keyframes mpBlink { 50% { opacity: .45; } }
.mp__spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: mpSpin .8s linear infinite; }
@keyframes mpSpin { to { transform: rotate(360deg); } }

/* chat */
.mp__ticker { position: absolute; left: 10px; top: calc(var(--safe-t, 0px) + 112px); z-index: 6; display: flex; flex-direction: column; gap: 4px; max-width: 72%; pointer-events: none; }
.mp.chat-open .mp__ticker { display: none; }
.mp__ticker .mpc { background: rgba(0, 0, 0, .55); border-radius: 14px; padding: 5px 10px; animation: mpIn .25s ease-out; }
@keyframes mpIn { from { opacity: 0; transform: translateX(-12px); } }
.mp__chat { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: 56%; display: flex; flex-direction: column; background: rgba(8, 14, 28, .96); border-top: 1px solid rgba(255, 255, 255, .2); border-radius: 22px 22px 0 0; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding-bottom: var(--safe-b, 0px); }
.mp__chat:empty { display: none; }
.mp__chathead { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0 16px; }
.mp__chatlist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; overscroll-behavior: contain; }
.mpc { display: flex; flex-direction: column; gap: 1px; font-size: .9rem; }
.mpc__who { font-size: .7rem; font-weight: 700; color: #7dd3fc; }
.mpc.is-me .mpc__who { color: #fde68a; }
.mpc__text { overflow-wrap: anywhere; }
.mpc__sticker { width: 78px; height: 78px; object-fit: contain; }
.mp__ticker .mpc__sticker { width: 54px; height: 54px; }
.mp__chatbar { display: flex; gap: 8px; padding: 8px 10px 10px; align-items: center; }
.mp__chatbar .input { flex: 1; min-width: 0; }
.mp__stickers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 6px 10px; max-height: 40%; overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .12); }
.mp__stickers[hidden] { display: none; }
.mp__stk { border: 0; background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 3px; cursor: pointer; }
.mp__stk img { width: 100%; height: auto; display: block; aspect-ratio: 1; object-fit: contain; }

/* mode chooser (before the full screen starts) */
.mp-hero { width: 84px; height: 84px; border-radius: 26px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-text, var(--text)); }
.mp__gname { font-size: .78rem; color: rgba(255, 255, 255, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
