/* ───── v3.0: кабинет, профиль, магазин, казино ───── */
:root { --coin: #e0a93b; --coin2: #f6d98a; --neg: #c0605c; --pos: #4f9a6c; }
@media (prefers-color-scheme: dark) { :root { --neg: #d6807b; --pos: #6fbf8d; } }

@keyframes v3in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes v3pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes v3glow { 0%,100% { box-shadow: 0 0 6px rgba(255,200,80,.55); } 50% { box-shadow: 0 0 16px rgba(255,200,80,.95); } }
@keyframes v3ring { to { filter: hue-rotate(360deg); } }
@keyframes v3shift { to { background-position: 200% 0; } }
@keyframes v3shine { 0% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(260%) skewX(-20deg); } }
.v3-in { animation: v3in .28s ease both; }
.v3-pop { animation: v3pop .32s ease both; }
@media (prefers-reduced-motion: reduce) { .v3-in, .v3-pop { animation: none; } }

/* значки валют */
.coin { color: var(--coin); font-weight: 800; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.nowrap { white-space: nowrap; }

/* рамка аватара */
.frm { display: inline-flex; padding: 3px; border-radius: 50%; flex: none; position: relative; }
.frm.glow { animation: v3glow 2.2s ease-in-out infinite; }
.frm.spinring { animation: v3ring 5s linear infinite; }
.frm > .ava, .frm > img.ava { border: 2px solid var(--card); }
.frm.lgf > .ava { border-width: 3px; }

/* ник: шрифт, цвет, значок */
.nick { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; }
.nick .nm { overflow-wrap: anywhere; }
.nick .nm.grad { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; background-size: 200% 100%; }
.nick .nm.shift { animation: v3shift 4s linear infinite; }
.nick .nm.small { font-size: .72em; letter-spacing: -.02em; }
.nick .bdg { font-size: .95em; }
.realname { color: var(--hint); font-size: 12px; font-weight: 500; }
[data-uid] { cursor: pointer; }

/* шапка кабинета и профиля */
.cab-hero { color: #fff; padding: 18px 16px 20px; border-radius: 0 0 28px 28px; position: relative; overflow: hidden; text-align: center; background: var(--grad); }
.cab-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.38)); }
.cab-hero > * { position: relative; }
.cab-hero .nm-big { font-size: 24px; font-weight: 800; margin-top: 8px; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.cab-hero .realname { color: rgba(255,255,255,.8); }
.cab-hero .st { margin-top: 4px; color: rgba(255,255,255,.92); font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.cab-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.cab-chip { background: rgba(255,255,255,.22); backdrop-filter: blur(6px); border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 700; }
.cab-chip.coin-chip { background: rgba(255,214,120,.3); }
.cab-back { text-align: left; font-weight: 700; opacity: .95; margin-bottom: 6px; padding: 4px 0; display: inline-block; }
.lvl-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 6px; }
.lvl-bar > i { display: block; height: 100%; border-radius: 8px; background: var(--grad); transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* внутреннее меню кабинета */
.cab-menu { display: flex; gap: 6px; margin: 0 12px 12px; padding: 5px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); position: sticky; top: 6px; z-index: 5; }
.cab-menu button { flex: 1; border: 0; background: transparent; color: var(--hint); padding: 8px 2px; border-radius: 13px; font-weight: 700; font-size: 12px; line-height: 1.2; transition: background .2s, color .2s, transform .1s; }
.cab-menu button span { display: block; font-size: 18px; }
.cab-menu button.on { background: var(--accent); color: #fff; }
.cab-menu button:active { transform: scale(.95); }

/* карточки-блоки */
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow > .btn { flex: 1; min-width: 120px; text-align: center; }
.btn.coin-btn { background: linear-gradient(135deg, #e0a93b, #c98a2a); }
.btn.sm2 { padding: 7px 12px; font-size: 13px; border-radius: 12px; }
.btn[disabled] { opacity: .5; }

/* достижения */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach { background: var(--bg); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: 12px; position: relative; }
.ach .e { font-size: 26px; filter: grayscale(1); opacity: .45; }
.ach.done .e { filter: none; opacity: 1; }
.ach.done { box-shadow: inset 0 0 0 1.5px var(--gold); }
.ach .bar2 { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.ach .bar2 i { display: block; height: 100%; background: var(--accent); }
.ach .rw { color: var(--coin); font-weight: 800; }

/* история */
.chips-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.fchip { border: 0; background: var(--bg); color: var(--text); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.fchip.on { background: var(--accent); color: #fff; }
.bal-box { display: flex; gap: 8px; margin-bottom: 10px; }
.bal-box .stat { flex: 1; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hrow:last-child { border-bottom: 0; }
.hrow .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.hrow .amt { font-weight: 800; white-space: nowrap; }
.seg2 { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 14px; margin-bottom: 10px; }
.seg2 button { flex: 1; border: 0; background: transparent; color: var(--hint); padding: 8px; border-radius: 11px; font-weight: 700; }
.seg2 button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* переключатели */
.tgl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tgl:last-child { border-bottom: 0; }
.sw { width: 46px; height: 28px; border-radius: 28px; background: var(--line); position: relative; flex: none; transition: background .2s; border: 0; padding: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw.on { background: var(--ok); }
.sw.on::after { transform: translateX(18px); }

/* участники */
.mem { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mem:last-child { border-bottom: 0; }
.mem .meta { color: var(--hint); font-size: 12.5px; }
.online { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; margin-left: 4px; }

/* профиль участника: баннер */
.banner { height: 118px; border-radius: 0 0 26px 26px; background: var(--grad) center/cover; position: relative; overflow: hidden; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 40%, rgba(0,0,0,.25)); }
.banner .back { position: absolute; top: 12px; left: 14px; z-index: 2; color: #fff; font-weight: 700; background: rgba(0,0,0,.28); padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.prof-head { text-align: center; margin-top: -52px; position: relative; z-index: 2; padding: 0 12px; }
.prof-head .nm-big { font-size: 23px; font-weight: 800; margin-top: 6px; }
.crownfx { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 22px; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.trophy-shelf { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.tcard { flex: none; width: 108px; border-radius: 16px; padding: 10px 8px; text-align: center; background: var(--bg); position: relative; overflow: hidden; }
.tcard.p1 { background: linear-gradient(160deg, #fff3c9, #f2c25a); color: #5b4310; }
.tcard.p2 { background: linear-gradient(160deg, #f1f3f5, #c4cad0); color: #3d4146; }
.tcard.p3 { background: linear-gradient(160deg, #f6e1cc, #d09c6b); color: #55341a; }
.tcard .pl { font-size: 28px; }
.tcard .sm { font-size: 11.5px; opacity: .85; }
.tcard.p1::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); animation: v3shine 3.5s ease-in-out infinite; }
.gift-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.gift-chip { flex: none; text-align: center; background: var(--bg); border-radius: 14px; padding: 8px 10px; min-width: 64px; }
.gift-chip .e { font-size: 28px; }
.wall-post { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.wall-post:last-child { border-bottom: 0; }
.wall-post .x { margin-left: auto; border: 0; background: transparent; color: var(--hint); font-size: 16px; }

/* модальное окно-шторка */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; animation: v3fade .2s ease both; }
@keyframes v3fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--card); width: 100%; border-radius: 24px 24px 0 0; padding: 16px 16px calc(18px + var(--sab)); max-height: 88vh; overflow-y: auto; animation: v3up .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes v3up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 4px; font-size: 18px; }
.sheet input, .sheet select { width: 100%; }
.fee-line { font-size: 13px; color: var(--hint); margin: 4px 0 10px; min-height: 20px; }
.quick { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }

/* магазин */
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item { background: var(--bg); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.item .prev { height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background-size: cover; background-position: center; }
.item .nm { font-weight: 700; font-size: 13.5px; }
.item .price { font-size: 13px; font-weight: 800; color: var(--coin); }
.item .price s { color: var(--hint); font-weight: 500; margin-right: 4px; }
.item .tag { position: absolute; top: 6px; right: 6px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; z-index: 2; }
.item.eq { box-shadow: inset 0 0 0 2px var(--ok); }
.item .btn { padding: 7px 8px; font-size: 13px; }
.prev-card { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 12px; margin-bottom: 12px; position: relative; overflow: hidden; background: var(--grad) center/cover; color: #fff; }
.prev-card > * { position: relative; z-index: 1; }
.prev-card::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.28); z-index: 0; }
.disc-note { background: linear-gradient(135deg, rgba(224,169,59,.2), rgba(224,169,59,.06)); border-radius: 14px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; }

/* рулетка */
.roul-wrap { position: relative; width: 262px; height: 262px; margin: 6px auto 10px; }
.roul-wheel { width: 100%; height: 100%; border-radius: 50%; border: 6px solid var(--card); box-shadow: 0 6px 22px rgba(0,0,0,.25), inset 0 0 0 3px var(--coin); transition: transform 5.2s cubic-bezier(.12,.7,.1,1); position: relative; overflow: hidden; }
.roul-wheel .lbl { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; font-weight: 800; font-size: 15px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); white-space: nowrap; }
.roul-pin { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 30px; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.roul-hub { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 10px rgba(0,0,0,.3); z-index: 2; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.prize-pop { text-align: center; font-size: 30px; font-weight: 900; color: var(--coin); animation: v3pop .5s ease both; margin: 4px 0 8px; }
.prize-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.prize-row:last-child { border-bottom: 0; }

/* покер: лобби */
.tbl-card { background: var(--bg); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.seats-row { display: flex; gap: 4px; align-items: center; margin: 6px 0; }
.seat-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--hint); }
.seat-dot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* покерный стол */
.pk { position: fixed; inset: 0; z-index: 40; background: #0e2a22; color: #fff; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); animation: v3fade .2s ease both; }
.pk-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; gap: 8px; }
.pk-top .btn { background: rgba(255,255,255,.14); padding: 7px 12px; font-size: 13px; }
.pk-felt { flex: 1; margin-bottom: 4px; position: relative; margin: 0 10px; border-radius: 120px / 150px; background: radial-gradient(ellipse at 50% 45%, #1e6b4e 0%, #124a37 65%, #0c3326 100%); box-shadow: inset 0 0 0 5px #3a2a1a, inset 0 0 40px rgba(0,0,0,.5); min-height: 340px; }
.pk-board { position: absolute; top: 40%; left: 0; right: 0; display: flex; gap: 5px; justify-content: center; }
.pk-pot { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pk-status { position: absolute; top: 54%; left: 0; right: 0; text-align: center; font-size: 13px; opacity: .9; padding: 0 20px; }
.pcard { width: 38px; height: 54px; border-radius: 6px; background: #fff; color: #222; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 5px rgba(0,0,0,.4); animation: v3pop .3s ease both; }
.pcard.red { color: #c92a2a; }
.pcard.back { background: repeating-linear-gradient(45deg, #1d4ed8 0 4px, #1e40af 4px 8px); border: 2px solid #fff; }
.pcard.empty { background: rgba(255,255,255,.08); box-shadow: none; border: 1px dashed rgba(255,255,255,.25); animation: none; }
.pcard.win { box-shadow: 0 0 0 2px #ffd24a, 0 0 12px #ffd24a; }
.pk-seat { position: absolute; width: 92px; margin: -34px 0 0 -46px; text-align: center; font-size: 11.5px; transition: opacity .3s; }
.pk-seat .pn { background: rgba(0,0,0,.55); border-radius: 10px; padding: 3px 6px; margin-top: 2px; }
.pk-seat .sk { font-weight: 800; color: #ffe29a; }
.pk-seat.fold { opacity: .45; }
.pk-seat.turn .pn { box-shadow: 0 0 0 2px #ffd24a; }
.pk-seat .cards { display: flex; gap: 2px; justify-content: center; margin-bottom: 2px; }
.pk-seat .cards .pcard { width: 26px; height: 37px; font-size: 11px; border-radius: 4px; }
.pk-seat .bet { position: absolute; font-size: 11px; font-weight: 800; background: #ffd24a; color: #3a2a00; border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.pk-seat .dbtn { position: absolute; right: 2px; top: -4px; background: #fff; color: #222; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.pk-seat .timer { height: 3px; border-radius: 3px; background: #ffd24a; margin-top: 2px; transform-origin: left; }
.pk-me { padding: 8px 12px calc(10px + var(--sab)); background: rgba(0,0,0,.25); }
.pk-me .hand { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.pk-me .hand .pcard { width: 48px; height: 68px; font-size: 19px; }
.pk-acts { display: flex; gap: 6px; }
.pk-acts .btn { flex: 1; padding: 11px 4px; font-size: 14px; }
.pk-acts .btn.fold { background: #8a3a3a; } .pk-acts .btn.call { background: #2f7d5a; } .pk-acts .btn.raise { background: #b8801f; }
.pk-raise { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pk-raise input[type=range] { flex: 1; }
.pk-log { font-size: 11.5px; opacity: .8; max-height: 48px; overflow: hidden; margin: 22px 12px 0; text-align: center; }
.pk-hand-name { font-size: 12px; color: #ffe29a; text-align: center; margin-bottom: 4px; }
.lock-note { text-align: center; font-size: 12px; opacity: .8; margin-top: 4px; }

/* ───── v3.1 ───── */
.cn { display: inline-block; width: 1.05em; height: 1.05em; border-radius: 50%; vertical-align: -.17em; margin: 0 .04em;
      background: radial-gradient(circle at 35% 30%, #fff0a8 0%, #f6c933 42%, #c88a0c 100%);
      box-shadow: inset 0 0 0 .1em #b9800a, inset 0 0 0 .17em #ffe58a; position: relative; }
.cn::after { content: ""; position: absolute; left: 50%; top: 50%; width: .34em; height: .5em; transform: translate(-50%, -50%);
             border-radius: .12em; background: #b9800a; opacity: .55; }
.btncol { display: flex; flex-direction: column; gap: 8px; }
.btncol > .btn { width: 100%; text-align: center; white-space: normal; }
.btn { overflow-wrap: anywhere; }
.btnrow > .btn { min-width: 0; }
.cab-hero .nm-big, .prof-head .nm-big { overflow-wrap: anywhere; max-width: 100%; }
.cab-chip { white-space: nowrap; }
.ach-head { cursor: pointer; }
.ach-mini { display: flex; flex-wrap: wrap; gap: 6px; font-size: 24px; margin-top: 4px; }
.gift-list { display: flex; flex-direction: column; gap: 8px; }
.gift-item { display: flex; align-items: center; gap: 10px; }
.gift-item .e { font-size: 30px; flex: none; }
.wall-card { margin-bottom: 8px; }

/* ═════════ v4 ═════════ */
.ava.xl { width: 104px; height: 104px; font-size: 42px; border: 4px solid var(--bg); }
/* профиль как в соцсети */
.prof-cover { height: 150px; position: relative; background-size: cover !important; background-position: center !important; }
.prof-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,0) 40%, rgba(0,0,0,.25)); }
.prof-cover .cab-back { position: absolute; left: 12px; top: 10px; z-index: 2; color: #fff; background: rgba(0,0,0,.35); border-radius: 12px; padding: 6px 12px; }
.prof-head { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -56px; position: relative; z-index: 2; }
.prof-ava { position: relative; display: inline-block; }
.prof-ava .crownfx { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 28px; }
.ava-like { position: absolute; right: -6px; bottom: 2px; border: 0; border-radius: 999px; padding: 5px 9px; font-weight: 800; font-size: 13px;
  background: var(--card); color: var(--hint); box-shadow: 0 2px 8px rgba(0,0,0,.25); min-height: 30px; }
.ava-like.on { background: #ff4f7b; color: #fff; }
.prof-online { padding-bottom: 8px; font-size: 12.5px; color: var(--hint); display: flex; align-items: center; gap: 6px; }
.on-dot { width: 9px; height: 9px; border-radius: 50%; background: #4cd471; display: inline-block; box-shadow: 0 0 0 3px rgba(76,212,113,.2); }
.prof-id { padding: 8px 16px 0; }
.prof-id .nm-big { font-size: 25px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.prof-id .st { margin-top: 4px; font-size: 14.5px; }
.pbadges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pbadge { font-size: 12px; font-weight: 700; border-radius: 9px; padding: 4px 9px; background: var(--card); white-space: nowrap; }
.pbadge.gold { background: #3a3324; color: #f6c933; } .pbadge.green { background: #213528; color: #9be29b; }
.pbadge.purple { background: #2f2640; color: #d6b8ff; } .pbadge.lvl { color: var(--text); }
.pmeta { color: var(--hint); font-size: 12.5px; margin-top: 8px; }
.pcount { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border-radius: 16px; padding: 10px 0; margin: 0 12px 10px; box-shadow: var(--shadow); }
.pcount > div { text-align: center; cursor: pointer; } .pcount > div + div { border-left: 1px solid var(--line); }
.pcount b { display: block; font-size: 17px; font-weight: 800; } .pcount span { font-size: 11.5px; color: var(--hint); }
.pact { display: flex; gap: 8px; margin: 0 12px 12px; } .pact .btn { flex: 1; min-height: 42px; } .pact .btn.coin-btn, .pact .btn[aria-label] { flex: 0 0 48px; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 12px; overflow: hidden; }
.pgrid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: pointer; }
.lnk { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 13px; padding: 4px; }
.gstrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.gtile { width: 54px; height: 54px; flex: none; border-radius: 14px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.fr-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.fr-num { font-size: 30px; font-weight: 900; color: var(--text); } .fr-num.hi { color: #4cd471; } .fr-num.lo { color: #ff6b5b; }
.fr-bar { flex: 1; height: 9px; border-radius: 6px; background: var(--line); overflow: hidden; }
.fr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4cd471, #9be29b); border-radius: 6px; }
.fam-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
/* v5.2: горизонтальные ленты листаются пальцем, полоса прокрутки не нужна */
.fam-row::-webkit-scrollbar, .gstrip::-webkit-scrollbar, .trophy-shelf::-webkit-scrollbar, .gift-row::-webkit-scrollbar { display: none; }
.fam { width: 66px; flex: none; text-align: center; font-size: 12px; cursor: pointer; }
.fam > div { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam .ava { width: 52px; height: 52px; }
/* аватарка в ленте */
.ava-post { display: flex; justify-content: center; padding: 6px 0 10px; }
.ava-post img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 24px rgba(0,0,0,.25); border: 4px solid var(--card); }
/* выборы */
.vote-confirm { text-align: center; } .vote-confirm h3 { margin: 10px 0 4px; }
.warn-note { background: #3a2e1f; color: #f0c98a; border-radius: 12px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.rw-row { display: flex; gap: 8px; margin-bottom: 12px; }
.rw-row > div { flex: 1; background: var(--bg); border-radius: 12px; padding: 10px; } .rw-row b { display: block; font-size: 20px; color: #f6c933; } .rw-row span { font-size: 12px; color: var(--hint); }
/* баннеры v4 */
.v4-alert { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 12px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); }
.v4-alert .ic { font-size: 26px; } .v4-alert .sub { color: inherit; opacity: .85; }
.v4-alert .go { font-weight: 800; font-size: 13px; border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,.2); white-space: nowrap; }
.v4-alert.check { background: linear-gradient(135deg, #b8452c, #e0803a); color: #fff; animation: v4pulse 2s ease-in-out infinite; }
.v4-alert.review { background: linear-gradient(135deg, #1f5a35, #3a8a55); color: #fff; }
@keyframes v4pulse { 50% { box-shadow: 0 0 0 6px rgba(224,128,58,.25); } }
.chk-sheet, .rv-sheet { text-align: center; }
.chk-kicker { color: #f0a05a; font-weight: 800; font-size: 13px; }
.chk-ring { --p: 100; width: 170px; height: 170px; margin: 14px auto; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#f0a05a calc(var(--p) * 1%), var(--line) 0); }
.chk-ring > div { width: 140px; height: 140px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.chk-ring b { font-size: 20px; } .chk-ring span { font-size: 12px; color: var(--hint); }
.chk-rw { display: flex; gap: 8px; margin: 10px 0; text-align: left; font-size: 12px; font-weight: 700; }
.chk-rw > div { flex: 1; border-radius: 12px; padding: 10px; } .chk-rw b { display: block; font-size: 14px; margin-top: 3px; }
.chk-rw .ok { background: #1d2a22; color: #9be29b; } .chk-rw .bad { background: #2e1e20; color: #ff8a80; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.chk-hist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.chk-hist span:first-child { font-weight: 700; } .chk-hist img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.rv-stats { display: flex; gap: 8px; margin: 12px 0; } .rv-stats > div { flex: 1; background: var(--bg); border-radius: 12px; padding: 8px; }
.rv-stats b { display: block; font-size: 20px; } .rv-stats span { font-size: 11.5px; color: var(--hint); }
.rv-stars { display: flex; justify-content: center; gap: 8px; margin: 8px 0 12px; }
.rv-stars button { width: 50px; height: 50px; border: 0; border-radius: 14px; background: var(--bg); color: var(--line); font-size: 28px; }
.rv-stars button.on { background: #3a3324; color: #f6c933; }
/* итоги недели — сторис */
.wk { position: fixed; inset: 0; z-index: 60; color: #fff; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(ellipse at 50% 15%, #5a2f86 0%, #2a1742 55%, #120b1d 100%); padding: calc(10px + env(safe-area-inset-top)) 16px calc(16px + var(--sab, 0px)); }
.wk-bars { display: flex; gap: 4px; } .wk-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); }
.wk-bars i.done { background: #fff; } .wk-bars i.now { background: linear-gradient(90deg, #fff 50%, rgba(255,255,255,.28) 50%); background-size: 200% 100%; animation: wkbar 6s linear forwards; }
@keyframes wkbar { from { background-position: 100% 0; } to { background-position: 0 0; } }
.wk-x { position: absolute; right: 12px; top: calc(20px + env(safe-area-inset-top)); border: 0; background: rgba(255,255,255,.14); color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; z-index: 2; }
.wk-conf i { position: absolute; top: -10px; width: 8px; height: 5px; border-radius: 1px; animation: wkfall 5s linear infinite; opacity: .9; }
@keyframes wkfall { to { transform: translateY(110vh) rotate(540deg); } }
.wk-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; position: relative; animation: wkin .45s ease-out; overflow-y: auto; }
@keyframes wkin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.wk-kick { color: #cdb8ea; font-size: 13px; font-weight: 700; }
.wk-h { font-size: 32px; font-weight: 900; line-height: 1.08; text-wrap: balance; }
.wk-ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: #6b4a9a; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.wk-ava img { width: 100%; height: 100%; object-fit: cover; }
.wk-ava.big { width: 116px; height: 116px; font-size: 44px; border: 5px solid #f6c933; box-shadow: 0 0 40px rgba(246,201,51,.5); margin-top: 8px; }
.wk-name { font-size: 26px; font-weight: 900; } .wk-val { color: #cdb8ea; font-weight: 700; }
.wk-prize { background: rgba(246,201,51,.15); border: 1px solid rgba(246,201,51,.5); color: #f6c933; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 14px; }
.wk-post { width: 100%; max-width: 340px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 10px; text-align: left; margin-top: 6px; }
.wk-post img { width: 100%; max-height: 190px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; }
.wk-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 340px; margin-top: 10px; }
.wk-nums.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wk-nums > div { background: rgba(255,255,255,.08); border-radius: 14px; padding: 12px 6px; font-size: 12.5px; color: #cdb8ea; }
.wk-nums b { display: block; font-size: 26px; color: #fff; }
.wk-top { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.wk-top > div { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.07); border-radius: 12px; padding: 8px 10px; text-align: left; }
.wk-top > div.me { box-shadow: inset 0 0 0 2px #f6c933; } .wk-top span { width: 18px; font-weight: 900; color: #f6c933; }
.wk-top .wk-ava { width: 34px; height: 34px; } .wk-top b { flex: 1; } .wk-top i { font-style: normal; color: #cdb8ea; font-weight: 700; }
.wk-nav { display: flex; gap: 8px; position: relative; } .wk-nav button { flex: 1; height: 48px; border: 0; border-radius: 14px; background: rgba(255,255,255,.14); color: #fff; font-weight: 800; font-size: 15px; }
.wk-nav button.main { flex: 2; background: #f6c933; color: #2b1d00; } .wk-nav button:disabled { opacity: .35; }

/* ═════════ покер v4 ═════════ */
.lb-table { border-radius: 18px; padding: 14px; margin-bottom: 10px; color: #fff; background: radial-gradient(ellipse at 50% 0%, #237a4f, #0f3a26); box-shadow: inset 0 0 0 1px #2c8a5a; }
.lb-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lb-name { font-weight: 800; font-size: 16px; } .lb-sub { font-size: 12px; color: #b5e0c6; margin-top: 2px; }
.lb-state { font-size: 11.5px; font-weight: 700; background: rgba(0,0,0,.3); border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.lb-state.live { background: #f6c933; color: #2b1d00; }
.lb-seats { display: flex; gap: 6px; margin: 12px 0; }
.lb-seat { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: #3a6a52; display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; }
.lb-seat img { width: 100%; height: 100%; object-fit: cover; } .lb-seat.free { border-style: dashed; border-color: #8fd1ab; background: transparent; color: #8fd1ab; }
.lb-btns { display: flex; gap: 8px; } .lb-btns .btn { min-height: 42px; }
.lb-main { flex: 1; background: #f1efe9 !important; color: #0f3a26 !important; font-weight: 800; }
.lb-ghost { background: rgba(255,255,255,.14) !important; color: #fff !important; }
.pk2 { position: fixed; inset: 0; z-index: 40; color: #fff; display: flex; flex-direction: column; overflow: hidden; user-select: none;
  background: radial-gradient(ellipse at 50% 40%, #1b2a24 0%, #0a0f0d 75%); padding-top: env(safe-area-inset-top); }
.pk2-wait { margin: auto; opacity: .8; }
.pk2-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.pk2-top button { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: rgba(255,255,255,.09); color: #fff; font-size: 18px; font-weight: 700; }
.pk2-title { flex: 1; text-align: center; min-width: 0; } .pk2-title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk2-title span { font-size: 11.5px; color: #9fc7b0; }
.pk2-wallet { text-align: center; font-size: 12px; color: #9fc7b0; }
.pk2-stage { position: relative; flex: 1; min-height: 300px; margin: 4px 6px 0; }
.pk2-rim { position: absolute; left: 9%; right: 9%; top: 8%; bottom: 8%; border-radius: 50% / 46%; background: linear-gradient(160deg, #7a5230, #4a2f18);
  box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.15); padding: 11px; }
.pk2-felt { width: 100%; height: 100%; border-radius: 50% / 46%; background: radial-gradient(ellipse at 50% 40%, #2f9a62 0%, #1d6e43 60%, #145534 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,.45), inset 0 0 0 8px rgba(255,255,255,.04); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.pk2-pot { background: rgba(0,0,0,.35); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; min-height: 26px; }
.chip { width: 14px; height: 14px; border-radius: 50%; display: inline-block; background: #e74c3c; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #e74c3c, inset 0 0 0 5px rgba(255,255,255,.6); flex: none; }
.pk2-board { display: flex; gap: 4px; }
.pc { width: 40px; height: 56px; border-radius: 7px; background: #fff; color: #1a1a1a; position: relative; box-shadow: 0 3px 8px rgba(0,0,0,.45); overflow: hidden; flex: none; }
.pc .r { position: absolute; left: 4px; top: 2px; font-weight: 900; font-size: 16px; line-height: 1; }
.pc .s { position: absolute; left: 4px; top: 18px; font-size: 13px; line-height: 1; }
.pc .big { position: absolute; right: 3px; bottom: 0; font-size: 24px; line-height: 1; opacity: .9; }
.pc.red { color: #d0261c; }
.pc.back { background: repeating-linear-gradient(45deg, #3b4fa0 0 5px, #2c3c80 5px 10px); border: 2px solid #fff; }
.pc.slot { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.pc.sm { width: 26px; height: 36px; border-radius: 4px; } .pc.sm .r { font-size: 11px; left: 2px; top: 1px; } .pc.sm .s { font-size: 9px; left: 2px; top: 12px; } .pc.sm .big { display: none; }
.pc.lg { width: 64px; height: 90px; border-radius: 10px; } .pc.lg .r { font-size: 26px; left: 6px; top: 4px; } .pc.lg .s { font-size: 20px; left: 6px; top: 31px; } .pc.lg .big { font-size: 40px; right: 5px; }
.pc.deal { animation: pkdeal .45s cubic-bezier(.2,.8,.2,1) both; } .pc.d1 { animation-delay: .15s; }
@keyframes pkdeal { from { transform: translateY(-60px) rotate(-20deg) scale(.6); opacity: 0; } }
.pk2-st, .pk2-turn, .pk2-win { font-size: 13px; text-align: center; padding: 0 30px; }
.pk2-turn { color: #f6c933; font-weight: 900; font-size: 15px; animation: v4pulse2 1.2s ease-in-out infinite; }
@keyframes v4pulse2 { 50% { opacity: .6; } }
.pk2-win { background: rgba(0,0,0,.45); color: #ffe29a; border-radius: 12px; padding: 6px 12px; font-weight: 800; animation: wkin .4s ease-out; }
.pk2-seat { position: absolute; width: 84px; margin-left: -42px; margin-top: -42px; text-align: center; transition: opacity .3s; z-index: 2; }
.pk2-seat.fold { opacity: .42; }
.pk2-cards { display: flex; gap: 2px; justify-content: center; margin-bottom: -10px; position: relative; z-index: 0; }
.pk2-ava { position: relative; width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; z-index: 1; }
.pk2-ava img, .pk2-ava > span { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; object-fit: cover; background: #4a6a5a;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.pk2-ava .ring { position: absolute; inset: 0; border-radius: 50%; background: #fff; }
.pk2-seat.turn .ring { background: conic-gradient(#f6c933 calc(var(--p) * 1%), rgba(255,255,255,.15) 0); box-shadow: 0 0 18px rgba(246,201,51,.6); }
.pk2-seat.win .ring { background: #f6c933; box-shadow: 0 0 24px #f6c933; }
.pk2-ava .dbtn { position: absolute; right: -6px; top: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: #111; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.pk2-plate { margin-top: 3px; background: rgba(0,0,0,.65); border-radius: 9px; padding: 3px 4px; font-size: 11.5px; line-height: 1.25; }
.pk2-plate .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pk2-plate .st { color: #f6c933; font-weight: 800; }
.pk2-hn { font-size: 10.5px; color: #ffe29a; margin-top: 2px; font-weight: 700; }
.pk2-bet { position: absolute; left: 50%; top: 50%; margin-left: -24px; width: 48px; display: flex; align-items: center; justify-content: center; gap: 3px;
  background: rgba(0,0,0,.5); border-radius: 999px; padding: 2px 6px; font-size: 11.5px; font-weight: 800; transition: transform .3s; }
.pk2-log { text-align: center; font-size: 11.5px; color: #9fc7b0; padding: 0 16px; min-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk2-panel { padding: 8px 12px calc(12px + var(--sab, 0px)); }
.pk2-me { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.pk2-hand { display: flex; gap: 6px; } .pk2-hand .pc:first-child { transform: rotate(-6deg); } .pk2-hand .pc:last-child { transform: rotate(6deg); }
.pk2-hand.empty { width: 0; }
.pk2-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pk2-myhand { background: #f6c933; color: #2b1d00; border-radius: 999px; padding: 4px 12px; font-weight: 900; font-size: 13px; }
.pk2-timer { font-size: 13px; color: #9fc7b0; font-weight: 700; }
.pk2-note { font-size: 13px; color: #9fc7b0; text-align: center; }
.pk2-rebuy { border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; padding: 8px 10px; font-weight: 700; }
.pk2-presets { display: flex; gap: 6px; margin-bottom: 6px; }
.pk2-presets button { flex: 1; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; padding: 7px 2px; font-weight: 700; font-size: 12.5px; }
.pk2-raise { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .pk2-raise input { flex: 1; accent-color: #f6c933; } .pk2-raise b { min-width: 56px; text-align: right; }
.pk2-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pk2-acts button { height: 54px; border: 0; border-radius: 14px; font-weight: 900; font-size: 16px; color: #fff; }
.pk2-acts .a-fold { background: #3a2226; color: #ff8a80; } .pk2-acts .a-call { background: #2b3a4a; } .pk2-acts .a-raise { background: linear-gradient(#f8d454, #e0a91b); color: #2b1d00; }
.pk2-acts button:active { transform: scale(.97); }

/* v5.5.1: «Меню» в стиле ВК */
.mm { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.mm-me, .mm-it { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--text); text-align: left; padding: 10px 12px; }
.mm-me { background: var(--bg); border-radius: 18px; padding: 12px; }
.mm-me .av, .mm-me img, .mm-me > :first-child { width: 48px !important; height: 48px !important; flex: none; }
.mm-gr { background: var(--bg); border-radius: 18px; overflow: hidden; }
.mm-it + .mm-it { box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.mm-it:active, .mm-me:active { background: rgba(255,255,255,.05); }
.mm-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.mm-ic svg { width: 20px; height: 20px; }
.mm-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mm-tx b { font-size: 15.5px; font-weight: 700; }
.mm-tx i { font-style: normal; font-size: 12.5px; color: var(--hint); margin-top: 1px; }
.mm-ar { color: var(--hint); font-size: 22px; line-height: 1; opacity: .6; }
.mm-n { font-style: normal; min-width: 22px; padding: 2px 7px; border-radius: 11px; background: #3f8ae0; color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.mm-new { font-style: normal; padding: 2px 7px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10.5px; font-weight: 900; letter-spacing: .4px; }
