/* Лингора social 2026-09-30: tiers, leaderboards, friends, duel */
.so { position: fixed; inset: 0; z-index: 57; 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; }
.so.out { animation: onbOut .2s ease both; }
.so-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 0 16px; display: flex; flex-direction: column; gap: 12px; }
.so-body > * { animation: onbStep .3s var(--ease-out, ease) both; }
.so-av { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 14px; background: color-mix(in srgb, var(--iris) 14%, transparent); overflow: hidden; }
.so-av svg { width: 88%; height: 88%; overflow: visible; }
.so-av .wd-av-fr { width: 92%; height: 92%; }
.so-av.big { width: 88px; height: 88px; flex-basis: 88px; border-radius: 28px; }
.so-hero { display: flex; align-items: center; gap: 12px; min-width: 0; }
.so-hero .so-av { width: 60px; height: 60px; flex-basis: 60px; border-radius: 20px; }
.so-hero.big .so-av { width: 76px; height: 76px; flex-basis: 76px; border-radius: 24px; }
.so-hero-t { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.so-name { font-size: 18px; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; }
.so-tier { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: var(--grad, linear-gradient(90deg, #8B5CF6, #EC4899)); white-space: nowrap; }
.so-tier.t0 { background: #6B6390; } .so-tier.t1 { background: #7C6CE0; } .so-tier.t2 { background: linear-gradient(90deg, #7B6CFF, #A855F7); }
.so-tier.t3 { background: linear-gradient(90deg, #A855F7, #D946EF); } .so-tier.t4 { background: linear-gradient(90deg, #D946EF, #EC4899); }
.so-tier.t5 { background: linear-gradient(90deg, #EC4899, #F43F5E); } .so-tier.t6 { background: linear-gradient(90deg, #F43F5E, #F59E0B); }
.so-tier.t7 { background: linear-gradient(90deg, #F59E0B, #EAB308); color: #2A1B00; } .so-tier.t8 { background: linear-gradient(90deg, #FDE68A, #F472B6, #A78BFA); color: #2A1B3D; }
.so-next { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.so-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.so-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--grad, linear-gradient(90deg, #8B5CF6, #EC4899)); animation: soBar 1s var(--ease-out, ease) both; }
@keyframes soBar { from { width: 0; } }
.so-reqs { display: flex; flex-wrap: wrap; gap: 6px; }
.so-req { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--surface-2, rgba(255, 255, 255, .06)); color: var(--muted); border: 1px solid var(--line); }
.so-req.ok { color: #3EDBB0; border-color: rgba(62, 219, 176, .4); }
/* profile card */
.so-card { display: flex; flex-direction: column; gap: 12px; }
.so-card-top { display: flex; align-items: flex-start; gap: 8px; }
.so-card-top > div:first-child { flex: 1 1 auto; min-width: 0; }
.so-card-top .so-hero + .so-next, .so-card-top .so-reqs { flex-basis: 100%; }
.so-card-top { flex-wrap: wrap; }
.so-card-top .so-hero { flex: 1 1 calc(100% - 60px); }
.so-card-top .so-next, .so-card-top > .so-reqs { order: 3; flex: 1 1 100%; margin-top: 0; }
.so-edit { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; padding: 0; }
.so-card-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.so-card-btns .btn { min-height: 48px; }
.so-dot { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #FF3D8B; color: #fff; font-size: 12px; font-weight: 800; }
.so-hub { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-bottom: 10px; text-align: left; }
.so-hub .so-av { width: 48px; height: 48px; flex-basis: 48px; }
.so-hub-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-hub-t .xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* board */
.so-top { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.so-rules-btn { min-height: 48px; }
.so-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.so-seg button { min-height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 800; font-size: 14px; padding: 0 2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.so-seg button.on { background: var(--iris); color: #fff; }
.so-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.so-row, .so-msg { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); animation: onbStep .3s var(--ease-out, ease) both; }
.so-row.me { border-color: var(--pink, #EC4899); box-shadow: 0 0 0 3px rgba(236, 72, 153, .15); }
.so-rank { width: 28px; flex: 0 0 28px; text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--muted); }
.so-row.r1 .so-rank { color: #FFC940; font-size: 18px; } .so-row.r2 .so-rank { color: #C9D2E3; font-size: 17px; } .so-row.r3 .so-rank { color: #E3A06B; font-size: 16px; }
.so-row-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.so-row-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-row-t .xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-pts { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.so-gap { text-align: center; color: var(--muted); letter-spacing: .3em; }
.so-empty { text-align: center; padding: 18px 6px; }
.so-rules { display: flex; flex-direction: column; gap: 8px; }
.so-rule { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.so-rule.cur { border-color: var(--pink, #EC4899); }
.so-rule.done { opacity: .7; }
.so-note { margin: 4px 2px; }
/* friends */
.so-inbox { display: flex; flex-direction: column; gap: 8px; }
.so-inbox:empty { display: none; }
.so-msg { flex-wrap: wrap; border-color: color-mix(in srgb, var(--pink, #EC4899) 45%, transparent); }
.so-msg.duel_wait { border-color: var(--line); opacity: .8; }
.so-msg-btns { display: flex; gap: 6px; margin-left: auto; }
.so-msg-btns .btn { min-height: 48px; }
.so-no { width: 48px; min-width: 48px; height: 48px; padding: 0; display: inline-grid; place-items: center; }
.so-no.sure { color: #FF5C8A; border-color: #FF5C8A; }
.so-add { display: flex; gap: 8px; }
.so-in { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 14px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; }
.so-in:focus { outline: none; border-color: var(--iris); }
.so-go { flex: 0 0 auto; min-height: 52px; }
.so-share { min-height: 48px; }
.so-flist { display: flex; flex-direction: column; gap: 8px; }
.so-sw { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.so-sw-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.so-sw-k { flex: 0 0 48px; width: 48px; height: 28px; border-radius: 14px; background: var(--line-2); position: relative; transition: background .2s; }
.so-sw-k::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.so-sw[aria-checked="true"] .so-sw-k { background: linear-gradient(135deg, var(--iris, #8B5CF6), var(--pink, #EC4899)); }
.so-sw[aria-checked="true"] .so-sw-k::after { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .so-sw-k, .so-sw-k::after { transition: none; } }
.so-friend { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.so-friend-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.so-friend-btns { display: grid; grid-template-columns: 1fr 1fr 48px; gap: 6px; }
.so-friend-btns .btn { min-height: 48px; padding: 0 6px; }
.so-empty-f { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; text-align: center; }
/* profile editor */
.so-prof { display: flex; flex-direction: column; gap: 10px; }
.so-prof-av { display: flex; justify-content: center; padding: 4px 0; }
.so-prof-av .so-av { width: 110px; height: 110px; flex-basis: 110px; border-radius: 34px; }
.so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.so-pick { display: grid; place-items: center; min-height: 64px; padding: 6px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.so-pick .so-av { width: 48px; height: 48px; flex-basis: 48px; background: transparent; }
.so-pick.on { border-color: var(--pink, #EC4899); box-shadow: 0 0 0 3px rgba(236, 72, 153, .18); }
.so-ok { color: #3EDBB0; } .so-err { color: #FF5C8A; }
/* duel */
.so-duel-in, .so-res { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 10px; }
.so-vs { display: flex; align-items: center; justify-content: center; gap: 14px; }
.so-vs .so-av { width: 84px; height: 84px; flex-basis: 84px; border-radius: 26px; }
.so-vs-x { font-size: 22px; font-weight: 900; background: var(--grad, linear-gradient(90deg, #8B5CF6, #EC4899)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.so-duel-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.so-duel-rules span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.so-big { min-height: 56px; font-size: 16px; max-width: 420px; }
.so-duel { display: flex; flex-direction: column; gap: 14px; }
.so-timer { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.so-timer i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--grad, linear-gradient(90deg, #8B5CF6, #EC4899)); transition: width .2s linear; }
.so-timer i.low { background: #FF5C8A; }
.so-duel-meta { display: flex; justify-content: space-between; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.so-word { text-align: center; font-size: clamp(26px, 8vw, 36px); font-weight: 900; overflow-wrap: anywhere; padding: 14px 0; }
.so-opts { display: grid; gap: 8px; }
.so-opt { min-height: 56px; border-radius: 18px; border: 2px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 16px; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; padding: 8px 12px; }
.so-opt.ok { border-color: #3EDBB0; background: rgba(62, 219, 176, .16); }
.so-opt.bad { border-color: #FF5C8A; background: rgba(255, 92, 138, .14); animation: gmShake .3s; }
@media (max-width: 360px) { .so-seg button { font-size: 13px; } .so-card-btns { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .so, .so-body > *, .so-bar i, .so-row, .so-msg, .so-opt.bad { animation: none !important; } .so-timer i { transition: none; } }
/* VIP badge next to the name (running «VIP · все языки на год») */
.so-vip { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 1px 5px; border-radius: 6px; font-size: 9.5px; font-weight: 900; letter-spacing: .04em; line-height: 1.35;
  background: linear-gradient(135deg, #FFE27A, #F5B301); color: #5B3A00; box-shadow: inset 0 0 0 1px rgba(201, 138, 0, .45); }
.so-name .so-vip { font-size: 11px; vertical-align: 3px; }
