/* BkL: конверт с приглашениями (inbox.js) и вкладки кабинета. Цвета только из переменных темы. */
.ixbtn { position: relative; flex: none; width: 44px; height: 44px; margin-right: 6px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.ixbtn[hidden] { display: none; }
.whdr + .ixbtn { margin-left: 0; }
.ixbtn svg, .ix-toast svg, .ix-empty svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ixbtn.has { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
:root[data-theme="light"] .ixbtn.has { color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.ixbadge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; box-shadow: 0 0 0 2px var(--bg); }
.ixbadge[hidden] { display: none; }
.ixbtn.pop { animation: ixpop .5s var(--ease); }
@keyframes ixpop { 0% { transform: scale(1); } 30% { transform: scale(1.18) rotate(-8deg); } 60% { transform: scale(.96) rotate(5deg); } 100% { transform: scale(1); } }

/* список */
.ix-sheet { position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, .5); }
.ix-card { position: absolute; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top, 0px)); max-width: 460px; margin: 0 auto; max-height: calc(100% - 90px); overflow-y: auto; box-sizing: border-box; padding: 14px 14px 12px; background: var(--surface); color: var(--text); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5), inset 0 2px 0 var(--gold); }
.ix-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ix-head h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.ix-x { width: 44px; height: 44px; margin: -6px -8px -6px 0; font-size: 30px; line-height: 1; color: var(--muted); }
.ix-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ix-list > .ix-row:first-child, .ix-head + .ix-list > .ix-row:first-child, .ix-box > .ix-row:first-child { border-top: 0; }
.ix-row.old .fr-who { opacity: .6; }
.ix-acts { flex: none; display: flex; gap: 6px; }
.ix-go { min-height: 44px; padding: 0 16px; font-size: 14px; white-space: nowrap; }
.ix-no { flex: none; width: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.ix-row .fr-nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ix-row .fr-who { flex: 1 1 0; }
.ix-go:disabled { opacity: .5; }
.ix-h { margin: 14px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ix-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 12px; color: var(--muted); }
.ix-empty svg { width: 34px; height: 34px; }
.ix-empty p { margin: 0; font-weight: 700; font-size: 15px; }

/* маленький конверт в игре */
.ix-toast { position: fixed; z-index: 140; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; max-width: calc(100% - 24px); box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--gold); font-weight: 800; font-size: 14px; pointer-events: none; opacity: 0; transform: translate(-50%, -140%); }
.ix-toast svg { flex: none; width: 22px; height: 22px; color: var(--gold); }
:root[data-theme="light"] .ix-toast svg { color: var(--red); }
.ix-toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-toast.show { animation: ixin 2s var(--ease) both; }
@keyframes ixin { 0% { opacity: 0; transform: translate(-50%, -140%); } 14% { opacity: 1; transform: translate(-50%, 0); } 84% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -140%); } }

/* отправитель: друг в игре */
.ix-wait { position: fixed; z-index: 135; top: calc(8px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; max-width: 440px; margin: 0 auto; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--gold); }
.ixw-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); animation: ixpulse 1.4s ease-in-out infinite; }
:root[data-theme="light"] .ixw-dot { background: var(--red); }
@keyframes ixpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.ixw-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ixw-t b { font-size: 16px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ixw-t span { font-size: 13px; color: var(--muted); font-weight: 700; }
.ixw-c { flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; }

/* вкладки кабинета */
.cabtabs { display: flex; gap: 6px; margin: 0 0 14px; padding: 4px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.cabtab { position: relative; flex: 1 1 0; overflow: hidden; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; font-weight: 800; font-size: 15px; color: var(--muted); }
.cabtab[data-tab=me] { flex-grow: .55; } .cabtab[data-tab=fr] { flex-grow: .95; } .cabtab[data-tab=inv] { flex-grow: 1.5; }
.cabtab.on { background: var(--gold); color: var(--gold-ink); }
.cabn { min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; line-height: 1; }
.cabn[hidden] { display: none; }
.cabpane > .ccard:last-child { margin-bottom: 0; }
.ix-box { }
@media (prefers-reduced-motion: reduce) {
  .ixbtn.pop, .ixw-dot { animation: none; }
  .ix-toast.show { animation: none; opacity: 1; transform: translate(-50%, 0); }
}
@media (max-width: 380px) { .ix-go { padding: 0 12px; } .cabtab { font-size: 14px; } }
/* запись «мы заметили проблему»: текст на всю ширину, кнопки ниже (длинный текст и «Сыграть заново» в одну строку не помещаются) */
.ix-row.fault { flex-wrap: wrap; }
.ix-row.fault .fr-who { flex: 1 1 100%; }
.ix-row.fault .fr-nm b { white-space: normal; }
.ix-row.fault .ix-acts { flex: 1 1 100%; }
.ix-row.fault .ix-go { flex: 1 1 0; }
/* «Сыграть заново» и «Играть»: ровная кнопка без среза угла (срез у общего .btn), высота не меньше 48 */
.ix-row .ix-go { clip-path: none; border-radius: 12px; }
.ix-row.fault .ix-go { min-height: 48px; }
