/* Лингора 2026-10-08: online rooms (UNO / billiards with friends) + shared reactions */
.mp { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg);
  background-image: radial-gradient(120% 60% at 100% 0%, var(--bg-glow-2), transparent 60%), radial-gradient(100% 50% at 0% 100%, var(--bg-glow-1), transparent 60%);
  padding: max(8px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom)); animation: onbIn .3s var(--ease-out, ease) both; overflow: hidden; }
.mp.out { animation: onbOut .2s ease both; }
.mp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.mp-lobby, .mp-wait { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: safe center; align-items: stretch; gap: 14px; padding: 8px 2px 4px; text-align: center; }
.mp-wait { align-items: center; }
.mp-lori { width: 110px; height: 110px; align-self: center; }
.mp-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mp-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 20px; background: var(--surface); border: 2px dashed var(--line-2); min-height: 132px; justify-content: center; position: relative; }
.mp-seat.on { border-style: solid; border-color: rgba(201,139,255,.55); box-shadow: 0 6px 18px rgba(80,30,140,.25); animation: mpPop .35s var(--ease-out, ease) both; }
.mp-seat b { font-size: 15px; white-space: nowrap; max-width: 100%; overflow-wrap: normal; }
.mp-av { width: 64px; height: 64px; display: grid; place-items: center; }
.mp-av.empty { border-radius: 50%; background: var(--surface-2); font-size: 28px; font-weight: 900; color: var(--muted); animation: mpPulse 1.6s ease-in-out infinite; }
.mp-host { white-space: nowrap; position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,196,92,.2); color: var(--saffron, #FFC45C); }
.mp-code-box { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 18px; background: var(--surface-2); }
.mp-code { font-size: 34px; font-weight: 900; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.mp-big { min-height: 56px; font-size: 17px; }
.mp-size { align-self: stretch; }
.mp-hint { min-height: 1.2em; }
.mp-in { text-align: center; font-size: 26px; letter-spacing: .14em; text-transform: uppercase; min-height: 56px; }
@keyframes mpPop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mpPulse { 50% { transform: scale(.92); opacity: .6; } }

/* reaction button + picker + bubbles */
.mp-rbtn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; border: 0; background: var(--surface-2); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.mp-rbtn.cool { animation: mpCool 2s linear; }
@keyframes mpCool { 0% { opacity: .45; } 95% { opacity: .45; } 100% { opacity: 1; } }
.mp-picker { position: fixed; z-index: 95; display: grid; grid-template-columns: repeat(5, 48px); gap: 6px; padding: 8px; border-radius: 20px;
  background: var(--surface, #241a3d); box-shadow: 0 12px 34px rgba(0,0,0,.45); border: 1px solid var(--line-2); animation: mpPop .18s var(--ease-out, ease) both; }
.mp-pick { width: 48px; height: 48px; border: 0; border-radius: 14px; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mp-pick:active { background: var(--surface-2); transform: scale(.92); }
.mp-emo { font-size: 28px; line-height: 1; }
.mp-stk { position: relative; width: 40px; height: 40px; display: inline-block; }
.mp-stk .mascot { position: absolute; inset: 0; }
.mp-stk i { position: absolute; right: -4px; bottom: -4px; font-style: normal; font-size: 16px; line-height: 1; }
.mp-bub { position: fixed; z-index: 96; pointer-events: none; padding: 8px 10px; border-radius: 22px 22px 22px 6px; background: #fff; color: #1B1633;
  box-shadow: 0 10px 26px rgba(0,0,0,.35); animation: mpBub 2.6s cubic-bezier(.2,.9,.3,1.2) both; }
.mp-bub .mp-emo.big { font-size: 40px; }
.mp-bub .mp-stk.big { width: 64px; height: 64px; }
.mp-bub .mp-stk.big i { font-size: 24px; }
.mp-bub.out { opacity: 0; transition: opacity .35s; }
@keyframes mpBub { 0% { transform: translateY(14px) scale(.4); opacity: 0; } 14% { transform: translateY(-4px) scale(1.12); opacity: 1; } 24% { transform: none; } 80% { transform: translateY(-6px); } 100% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .mp-bub, .mp-seat.on, .mp-av.empty { animation: none; } }

/* UNO online: timer + lobby buttons */
.uno-timer { width: auto; min-width: 68px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 12px; background: var(--surface-2); font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; box-sizing: border-box; }
.uno-timer:empty { display: none; }
.uno-topbar { gap: 8px; flex-wrap: nowrap; }
.uno-topbar .gm-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.uno-timer.low { background: #E5484D; color: #fff; animation: mpPulse 1s ease-in-out infinite; }
.uno-topbar .mp-rbtn { width: 40px; height: 36px; flex-basis: 40px; border-radius: 12px; font-size: 20px; }
.uno-online { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uno-on-b { min-height: 52px; font-size: 15px; white-space: nowrap; padding: 0 8px; }
.uno-opp.off .uno-avw { opacity: .45; filter: grayscale(.6); }

/* billiards online */
.pool-timer { min-width: 40px; height: 36px; padding: 0 8px; display: grid; place-items: center; border-radius: 12px; background: rgba(20,12,36,.72); color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pool-timer:empty { display: none; }
.pool-timer.low { background: #E5484D; }
.pool-react.mp-rbtn { width: 40px; height: 40px; flex-basis: 40px; background: rgba(20,12,36,.72); }
.pool-start { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(10,6,20,.45); backdrop-filter: blur(2px); }
.pool-start-card { width: min(100%, 360px); display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 16px; border-radius: 26px; background: var(--surface, #241a3d); box-shadow: 0 18px 44px rgba(0,0,0,.5); text-align: center; animation: mpPop .3s var(--ease-out, ease) both; }
.pool-start-card .btn { min-height: 54px; font-size: 16px; white-space: nowrap; }
.pool-start-lori { width: 84px; height: 84px; align-self: center; margin-top: -54px; }

/* rd5: stakes in искры ✦ */
.mp-stake-box { width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.mp-stake-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mp-bal-s { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mp-bal-s b { color: #FFD66B; font-weight: 900; }
.mp-stakes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mp-stake { min-height: 44px; padding: 0 2px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; white-space: nowrap; line-height: 1.1; }
.mp-stake:first-child { font-size: 11.5px; white-space: normal; }
.mp-stake.on { border-color: #FFC45C; background: linear-gradient(135deg, rgba(255, 196, 92, .28), rgba(255, 120, 80, .2)); color: #FFE3A3; }
.mp-stake:disabled { opacity: .4; cursor: default; }
.mp-stake-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mp-stake-chip, .mp-pot { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 12px; border-radius: 999px; font-weight: 900; font-size: 14px; white-space: nowrap; }
.mp-stake-chip { background: rgba(255, 196, 92, .16); color: #FFD66B; border: 1px solid rgba(255, 196, 92, .4); }
.mp-stake-chip.big { min-height: 48px; font-size: 22px; padding: 0 20px; }
.mp-pot { background: linear-gradient(135deg, #FFB547, #FF6A5E); color: #fff; box-shadow: 0 4px 14px rgba(255, 106, 94, .35); }
.gm-top .mp-pot, .uno-topbar .mp-pot, .pool-top .mp-pot { min-height: 30px; padding: 0 10px; font-size: 13px; flex: 0 0 auto; }
.mp-rule { text-align: center; line-height: 1.35; }
.mp-err { color: #FF8A94; font-weight: 800; text-align: center; }
.mp-res-st { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 900; }
.mp-res-st.win b { font-size: 40px; line-height: 1; background: linear-gradient(135deg, #FFE07A, #FFB547); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: mpWin .7s cubic-bezier(.2, .9, .3, 1.3) both; }
.mp-res-st.win span { font-size: 14px; color: #FFD66B; }
.mp-res-st.lose { font-size: 24px; color: var(--muted); }
.mp-res-st.ref { font-size: 16px; color: var(--muted); }
@keyframes mpWin { from { transform: scale(.3); opacity: 0; } }
.mp-confirm .h3 { text-align: center; }
.mp-sparks { gap: 12px; }
.mp-bal { font-size: 44px; font-weight: 900; color: #FFD66B; line-height: 1; }
.mp-hist { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.mp-hist-i { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); text-align: left; }
.mp-hist-i span { display: flex; flex-direction: column; min-width: 0; }
.mp-hist-i b { font-size: 14px; }
.mp-hist-i i { font-style: normal; font-size: 12px; color: var(--muted); }
.mp-hist-i em { font-style: normal; font-weight: 900; font-size: 16px; white-space: nowrap; }
.mp-hist-i em.plus { color: #4FE0A0; } .mp-hist-i em.minus { color: #FF8A94; }
.ck-stake { margin: 2px 0; }
@media (max-width: 370px) { .mp-stake { font-size: 13px; } .mp-stake:first-child { font-size: 10.5px; } }
/* rd7 polish: no empty bands — seats grow, big Lori, buttons sit at the bottom (thumb reach) */
.mp-lobby { justify-content: flex-start; }
.mp-lobby .mp-seats { flex: 1 1 auto; min-height: 0; max-height: 52vh; grid-auto-rows: minmax(132px, 1fr); }
.mp-lobby .mp-seats .mp-seat { min-height: 0; }
.mp-seat .mp-av { width: clamp(56px, 9vh, 104px); height: clamp(56px, 9vh, 104px); }
.mp-seat .mp-av.empty { font-size: clamp(28px, 4vh, 44px); }
.mp-seat b { font-size: 16px; }
.mp-lobby > #mpShare { margin-top: auto; }
.mp-confirm > .mp-lori, .mp-sparks > .mp-lori { margin-top: auto; width: clamp(120px, 32vh, 290px); height: clamp(120px, 32vh, 290px); flex: 0 1 auto; min-height: 96px; }
.mp-confirm > #mpYes, .mp-sparks > #mpDone { margin-top: auto; }
.mp-confirm .h3 { font-size: 22px; }
.mp-today { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.mp-today > div { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 6px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.mp-today b { font-size: 20px; font-weight: 900; white-space: nowrap; }
.mp-today span { font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2; }
@media (max-height: 700px) {
  .mp-lobby { gap: 10px; }
  .mp-code-box { padding: 8px 12px; }
  .mp-code { font-size: 30px; }
  .mp-lobby .mp-seats { grid-auto-rows: minmax(112px, 1fr); }
}
/* 3–4 seats in one row so the whole lobby (incl. «Начать») fits without scrolling */
.mp-lobby .mp-seats.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(104px, 1fr); gap: 8px; }
.mp-lobby .mp-seats.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(104px, 1fr); gap: 6px; }
.mp-seats.n3 .mp-seat, .mp-seats.n4 .mp-seat { padding: 18px 4px 10px; border-radius: 16px; }
.mp-seats.n3 .mp-seat b, .mp-seats.n4 .mp-seat b { font-size: 13px; max-width: 100%; white-space: nowrap; }
.mp-seats.n4 .mp-av { width: clamp(44px, 7vh, 72px); height: clamp(44px, 7vh, 72px); }
.mp-seats.n3 .mp-host, .mp-seats.n4 .mp-host { top: 4px; left: 50%; right: auto; transform: translateX(-50%); font-size: 10px; padding: 1px 6px; white-space: nowrap; }
@media (max-height: 700px) {
  .mp-lobby .mp-seats.n3, .mp-lobby .mp-seats.n4 { grid-auto-rows: minmax(92px, 1fr); }
  .mp-stake-box { padding: 10px; gap: 8px; }
  .mp-lobby:has(#mpStart) .mp-hint { display: none; }
}
@media (max-height: 700px) {
  .mp-code-box { flex-direction: row; align-items: center; justify-content: center; gap: 12px; padding: 8px 12px; }
  .mp-code { font-size: 26px; }
  .mp-size button { min-height: 44px; }
  .mp-lobby .mp-big { min-height: 52px; }
}
