:root {
  --bg: #110a28;
  --panel: #20164a;
  --panel2: #2c1f62;
  --line: #3a2b80;
  --wood: linear-gradient(180deg, rgba(42,26,98,.96) 0%, rgba(26,16,66,.96) 100%);
  --wood-edge: rgba(110,220,255,.22);
  --felt: radial-gradient(ellipse at 50% 38%, #4f2fae 0%, #2e1a78 52%, #160c40 100%);
  --gold: #6ee7ff;
  --gold2: #8b6cff;
  --pearl: linear-gradient(115deg, #fbf3ff 0%, #d9c8ff 28%, #a9e9ff 55%, #f1d6ff 80%, #fdf6ff 100%);
  --cyan: #45d9ff;
  --text: #f3f0ff;
  --muted: #a69cd6;
  --red: #ff5a7a;
  --green: #2fc6ff;
  --blue: #4c7dff;
  --card-w: 56px;
  --card-h: 80px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow: hidden; }
body { user-select: none; -webkit-user-select: none; }
#app { display: flex; flex-direction: column; height: 100dvh; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font: inherit; }
h3 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hidden { display: none !important; }

/* ---------- верхняя панель ---------- */
#topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(6px + var(--safe-top)) 10px 6px; background: var(--wood); border-bottom: 2px solid var(--wood-edge); box-shadow: 0 2px 8px rgba(0,0,0,.4); z-index: 5; }
.tb-user { display: flex; align-items: center; gap: 8px; }
.tb-name { line-height: 1.15; }
#tb-nick { font-weight: 700; font-size: 15px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-lvl { font-size: 11px; color: #c9c0f5; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.coins { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.35); border: 1px solid var(--gold2); border-radius: 20px; padding: 4px 8px 4px 5px; font-size: 14px; }
.coins .plus { background: var(--gold); color: #2a1366; border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; line-height: 1; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #f4fff8 0 28%, transparent 30% 42%, #1f8a4a 44% 70%, #0d5a30 72%); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #0d5a30; display: inline-block; flex: 0 0 auto; }
.coin.big { width: 22px; height: 22px; }
.online { font-size: 12px; color: #6ef0ff; }

/* ---------- аватары ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #2c1f62 center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 16px; position: relative; flex: 0 0 auto; border: 2px solid #5a4aa8; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 84px; height: 84px; font-size: 32px; }
.avatar.frame-silver { border: 3px solid #cfd8dc; box-shadow: 0 0 0 1px #7a8a90, 0 0 8px #cfd8dc88; }
.avatar.frame-gold { border: 3px solid var(--gold); box-shadow: 0 0 0 1px #8a6a1f, 0 0 10px #f2c14e88; }
.avatar.frame-fire { border: 3px solid #ff7a1a; box-shadow: 0 0 0 1px #7a2a00, 0 0 14px #ff5a00aa; }

/* ---------- экраны ---------- */
#screens { flex: 1; position: relative; overflow: hidden; }
.screen { position: absolute; inset: 0; overflow-y: auto; padding: 10px 12px 16px; display: none; -webkit-overflow-scrolling: touch; }
.screen.active { display: block; }
#s-game { padding: 0; overflow: hidden; }

/* ---------- кнопки ---------- */
.btn { border-radius: 12px; padding: 10px 14px; font-weight: 700; background: var(--panel2); color: var(--text); box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .08s; font-size: 14px; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.btn.big { padding: 14px; font-size: 16px; flex: 1; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.gold { background: linear-gradient(180deg, #ffd977, #e0a92e); color: #2a1366; }
.btn.green { background: linear-gradient(180deg, #4dbb6c, #2e8b48); }
.btn.red { background: linear-gradient(180deg, #e46a5e, #b93a2e); }
.btn.blue { background: linear-gradient(180deg, #5b9cff, #2c6fd6); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px #5a4aa8; }
.btn:disabled { opacity: .45; }
.link { color: var(--gold); font-size: 13px; }

/* ---------- лобби ---------- */
.lobby-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--panel); border: 1px solid #43338f; border-radius: 20px; padding: 6px 11px; font-size: 12px; white-space: nowrap; color: #e1dbff; }
.chip.on { background: #3b2f8f; border-color: #6ee7ff; color: #fff; }
.chip.reset { border-color: #8a3a6a; color: #ff9ec0; }
.list-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.rooms { display: flex; flex-direction: column; gap: 8px; }
.room { background: var(--panel); border-radius: 14px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; border: 1px solid #3a2b80; position: relative; }
.room.full { opacity: .6; }
.room .r-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.room .r-bet { display: flex; align-items: center; gap: 5px; font-weight: 800; color: var(--gold); font-size: 15px; justify-content: flex-end; }
.room .r-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { background: rgba(0,0,0,.3); border-radius: 6px; padding: 2px 6px; font-size: 11px; color: #d6ceff; }
.tag.t { background: #4a3a70; color: #e0d0ff; }
.tag.c { background: #6b2f2f; color: #ffd0d0; }
.room .r-seats { display: flex; gap: 3px; justify-content: flex-end; align-items: center; }
.seat { width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.35); border: 1.5px dashed #6b5bd0; }
.seat.busy { border: 1.5px solid #6ef0ff; background: #3b2f8f center/cover; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }

/* ---------- модальные окна ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .15s; }
.modal-bg.center { align-items: center; padding: 16px; }
.modal { background: var(--panel); width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 14px 14px calc(14px + var(--safe-bottom)); border-top: 3px solid var(--gold2); }
.modal-bg.center .modal { border-radius: 18px; border: 2px solid var(--gold2); }
.modal h2 { margin: 0 0 12px; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.modal h2 .x { font-size: 22px; color: var(--muted); padding: 0 6px; }
.frow { margin-bottom: 12px; }
.frow label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; gap: 4px; background: rgba(0,0,0,.3); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { flex: 1; padding: 8px 6px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #c3bcf0; min-width: 44px; }
.seg button.on { background: var(--green); color: #fff; }
.seg button.on.gold { background: var(--gold); color: #2a1366; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #3a2b80; font-size: 14px; }
.toggle small { display: block; color: var(--muted); font-size: 11px; }
.sw { width: 44px; height: 26px; border-radius: 13px; background: #3a4d42; position: relative; transition: .15s; flex: 0 0 auto; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .15s; }
.sw.on { background: var(--green); }
.sw.on::after { left: 21px; }
.inp { width: 100%; background: rgba(0,0,0,.3); border: 1px solid #43338f; border-radius: 10px; padding: 10px; color: var(--text); outline: none; }
.mrow { display: flex; gap: 8px; margin-top: 10px; }
.mrow .btn { flex: 1; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ---------- тосты ---------- */
#toasts { position: fixed; top: calc(60px + var(--safe-top)); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 100; pointer-events: none; }
.toast { background: rgba(20,30,25,.95); border: 1px solid var(--gold2); color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 13px; max-width: 90%; animation: fade .2s; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.toast.err { border-color: var(--red); }
#connecting { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 200; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 4px solid #3a2b80; border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- навигация ---------- */
#nav { display: flex; background: var(--wood); border-top: 2px solid var(--wood-edge); padding-bottom: var(--safe-bottom); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7px 0 5px; gap: 1px; color: #9d92d6; font-size: 10px; position: relative; }
.nav-btn i { font-style: normal; font-size: 20px; }
.nav-btn.active { color: var(--gold); }
.badge { position: absolute; top: 4px; right: calc(50% - 20px); background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 5px; font-style: normal; }

/* ---------- списки игроков ---------- */
.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 10px; background: var(--panel); border-radius: 12px; padding: 8px 10px; }
.prow .pn { flex: 1; min-width: 0; }
.prow .pn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pn small { color: var(--muted); font-size: 11px; }
.prow .rank { width: 26px; text-align: center; font-weight: 800; color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #666; display: inline-block; margin-right: 4px; }
.dot.on { background: #4ade80; }
.search-row { display: flex; gap: 6px; margin-bottom: 8px; }
.search-row input { flex: 1; background: rgba(0,0,0,.3); border: 1px solid #43338f; border-radius: 10px; padding: 9px; color: var(--text); outline: none; }

/* ---------- профиль ---------- */
.prof-head { display: flex; gap: 14px; align-items: center; background: var(--panel); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.prof-head .pi { flex: 1; min-width: 0; }
.prof-head .pi h1 { margin: 0; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-head .pi .st { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.lvl-bar { height: 8px; background: rgba(0,0,0,.4); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.stat { background: var(--panel); border-radius: 12px; padding: 8px 4px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat small { color: var(--muted); font-size: 10px; }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { background: var(--panel); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 10px; color: var(--muted); }
.ach i { display: block; font-size: 26px; font-style: normal; filter: grayscale(1); opacity: .35; }
.ach.got { border: 1px solid var(--gold2); color: var(--text); }
.ach.got i { filter: none; opacity: 1; }
.gifts { display: flex; gap: 6px; flex-wrap: wrap; }
.gift { font-size: 26px; background: var(--panel); border-radius: 10px; padding: 4px 6px; }
.prof-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.prof-actions .btn { flex: 1; min-width: 100px; }

/* ---------- магазин ---------- */
.tabs { display: flex; background: rgba(0,0,0,.3); border-radius: 12px; padding: 3px; margin-bottom: 10px; }
.tab { flex: 1; padding: 8px; border-radius: 9px; font-size: 13px; color: #c3bcf0; font-weight: 600; }
.tab.active { background: var(--panel2); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shop-item { background: var(--panel); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid transparent; }
.shop-item.eq { border-color: var(--gold); }
.shop-item .nm { font-size: 12px; font-weight: 600; }
.shop-item .pr { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--gold); }
.shop-item .btn { width: 100%; padding: 6px; font-size: 12px; }
.coin-pack { display: flex; align-items: center; gap: 12px; background: var(--panel); border-radius: 14px; padding: 12px; margin-bottom: 8px; }
.coin-pack .cp-n { flex: 1; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 6px; }
.coin-pack .cp-b { color: #6ef0ff; font-size: 11px; }

/* ---------- карты ---------- */
.card { width: var(--card-w); height: var(--card-h); border-radius: 7px; background: #fff; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,.45); color: #111; font-weight: 800; flex: 0 0 auto; transition: transform .12s; overflow: hidden; }
.card.red { color: #d0202a; }
.card .tl, .card .br { position: absolute; font-size: 13px; line-height: 1; text-align: center; }
.card .tl { top: 4px; left: 4px; }
.card .br { bottom: 4px; right: 4px; transform: rotate(180deg); }
.card .ctr { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.card .tl small, .card .br small { display: block; font-size: 11px; }
/* лицевые стили */
.face-large .card .ctr { font-size: 26px; }
.face-large .card .tl, .face-large .card .br { font-size: 16px; }
.face-vintage .card { background: #f4ecd6; font-family: Georgia, serif; border: 1px solid #c8b78a; }
.face-vintage .card .ctr { opacity: .75; }
.face-minimal .card .ctr { display: none; }
.face-minimal .card .tl { font-size: 22px; top: 8px; left: 8px; }
.face-minimal .card .br { font-size: 22px; bottom: 8px; right: 8px; }
/* рубашки */
.card.back { background: #fff; padding: 4px; }
.card.back::before { content: ''; position: absolute; inset: 4px; border-radius: 4px; }
.back-classic::before { background: repeating-linear-gradient(45deg, #b83a2e 0 4px, #8e2a20 4px 8px), #b83a2e; border: 2px solid #f0e2c8; }
.back-blue::before { background: repeating-linear-gradient(-45deg, #2f5fd3 0 4px, #1f3f95 4px 8px); border: 2px solid #dfe8ff; }
.back-red::before { background: radial-gradient(circle, #ff8c7a 1px, transparent 1.5px) 0 0/8px 8px, #c0392b; border: 2px solid #ffe0d8; }
.back-gold::before { background: repeating-conic-gradient(#e5b740 0 25%, #b9871b 0 50%) 0 0/12px 12px; border: 2px solid #fff3c4; }
.back-emerald::before { background: linear-gradient(135deg, #0f7a4a 25%, #0b5c37 25% 50%, #0f7a4a 50% 75%, #0b5c37 75%) 0 0/14px 14px; border: 2px solid #c9f5dc; }
.back-night::before { background: radial-gradient(circle at 30% 30%, #fff 1px, transparent 1.5px) 0 0/10px 10px, radial-gradient(circle at 70% 60%, #fff 0.8px, transparent 1.3px) 0 0/14px 14px, #101a3a; border: 2px solid #8da0e0; }
.back-royal::before { background: repeating-linear-gradient(0deg, #4a1c6b 0 3px, #6a2b93 3px 6px), #4a1c6b; border: 2px solid var(--gold); box-shadow: inset 0 0 0 4px #4a1c6b, inset 0 0 0 5px var(--gold); }
.back-ornament::before { background: radial-gradient(circle, transparent 60%, #7a4a1a 61%) 0 0/12px 12px, #c98a3c; border: 2px solid #f5e0b8; }

/* ---------- игровой стол ---------- */
#game-root { position: absolute; inset: 0; background: var(--felt); display: flex; flex-direction: column; overflow: hidden; }
.g-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: rgba(0,0,0,.35); font-size: 12px; }
.g-top .g-info { display: flex; gap: 8px; align-items: center; }
.g-top .g-bank { color: var(--gold); font-weight: 800; display: flex; align-items: center; gap: 4px; }
.g-opps { display: flex; justify-content: space-around; align-items: flex-start; padding: 8px 6px 0; min-height: 88px; flex-wrap: wrap; gap: 4px; }
.opp { display: flex; flex-direction: column; align-items: center; width: 82px; position: relative; }
.opp .avatar { width: 46px; height: 46px; }
.opp .on { font-size: 11px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; text-align: center; }
.opp .oc { position: absolute; top: -4px; right: 8px; background: #fff; color: #111; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 5px; border: 1px solid #999; }
.opp .role { font-size: 9px; padding: 1px 6px; border-radius: 6px; margin-top: 2px; background: rgba(0,0,0,.4); color: #ddd; }
.opp .role.att { background: var(--red); color: #fff; }
.opp .role.def { background: var(--blue); color: #fff; }
.opp.out .avatar { opacity: .45; }
.opp .mini-hand { display: flex; margin-top: -8px; height: 14px; }
.opp .mini-hand i { width: 10px; height: 14px; background: #fff; border-radius: 2px; border: 1px solid #aaa; margin-left: -4px; display: block; }
.opp.turn .avatar { box-shadow: 0 0 0 3px var(--gold), 0 0 14px var(--gold); }
.timer-ring { position: absolute; top: -3px; left: 50%; transform: translateX(-50%); width: 52px; height: 52px; border-radius: 50%; pointer-events: none; }
.g-mid { flex: 1; display: flex; align-items: center; padding: 6px 8px; gap: 8px; min-height: 0; }
.g-deck { width: 74px; position: relative; height: 96px; flex: 0 0 auto; }
.g-deck .trump { position: absolute; left: 14px; top: 8px; transform: rotate(90deg) translate(0, -10px); }
.g-deck .pile { position: absolute; left: 0; top: 0; }
.g-deck .pile.p2 { transform: translate(2px, -2px); }
.g-deck .pile.p3 { transform: translate(4px, -4px); }
.g-deck .cnt { position: absolute; bottom: -18px; left: 0; width: 60px; text-align: center; font-size: 12px; color: #e4f8ff; }
.g-deck .trumpsuit { position: absolute; top: -22px; left: 0; width: 56px; text-align: center; font-size: 20px; }
.g-table { flex: 1; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; align-content: center; min-height: 100px; }
.pair { position: relative; width: calc(var(--card-w) + 18px); height: calc(var(--card-h) + 18px); }
.pair .card { position: absolute; }
.pair .a { top: 0; left: 0; }
.pair .d { top: 16px; left: 18px; }
.pair.target .a { box-shadow: 0 0 0 3px var(--gold), 0 0 12px var(--gold); }
.pair .cheat-q { position: absolute; top: -8px; right: -4px; background: var(--red); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.g-discard { width: 60px; position: relative; height: 96px; flex: 0 0 auto; }
.g-discard .card { position: absolute; left: 0; top: 4px; }
.g-discard .cnt { position: absolute; bottom: -18px; left: 0; width: 56px; text-align: center; font-size: 12px; color: #e4f8ff; }
.g-status { text-align: center; font-size: 13px; padding: 4px; color: #fff; text-shadow: 0 1px 2px #000; min-height: 24px; }
.g-status b { color: var(--gold); }
.g-actions { display: flex; gap: 8px; justify-content: center; padding: 4px 10px; min-height: 48px; align-items: center; }
.g-actions .btn { padding: 9px 16px; font-size: 14px; }
.g-me { display: flex; align-items: flex-end; padding: 4px 8px calc(6px + var(--safe-bottom)); gap: 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)); }
.g-me .me-info { display: flex; flex-direction: column; align-items: center; width: 56px; flex: 0 0 auto; font-size: 10px; gap: 2px; position: relative; }
.g-me .me-info .avatar { width: 40px; height: 40px; }
.me-timer { font-size: 13px; font-weight: 800; color: var(--gold); }
.me-timer.low { color: #ff6b5b; }
.hand { flex: 1; display: flex; justify-content: center; min-height: calc(var(--card-h) + 16px); align-items: flex-end; padding: 0 10px; overflow: visible; }
.hand .card { margin-left: var(--overlap, -18px); cursor: pointer; }
.hand .card:first-child { margin-left: 0; }
.hand .card.sel { transform: translateY(-16px); box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0,0,0,.5); z-index: 2; }
.hand .card.can { box-shadow: 0 0 0 2px #6ef0ff, 0 2px 5px rgba(0,0,0,.45); }
.hand .card.dim { opacity: .55; }
.hand .card.trump-mark::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); }
.g-chat-btn { position: absolute; right: 8px; bottom: calc(130px + var(--safe-bottom)); background: rgba(0,0,0,.5); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 18px; z-index: 3; }
.g-chat-btn .badge { top: -2px; right: -2px; }
.g-emo { position: absolute; left: 8px; bottom: calc(130px + var(--safe-bottom)); background: rgba(0,0,0,.5); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 18px; z-index: 3; }
.bubble { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); background: #fff; color: #111; border-radius: 10px; padding: 4px 8px; font-size: 12px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; z-index: 4; animation: fade .2s; }
.bubble::before { content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #fff; }

/* ожидание */
.wait { flex: 1; display: flex; flex-direction: column; padding: 14px; gap: 10px; overflow-y: auto; }
.wait .w-head { background: rgba(0,0,0,.35); border-radius: 14px; padding: 12px; }
.wait .w-head h2 { margin: 0 0 6px; font-size: 18px; }
.wait .w-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wait .w-seat { background: rgba(0,0,0,.3); border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; min-height: 96px; justify-content: center; border: 1.5px dashed #6b5bd0; }
.wait .w-seat.busy { border-style: solid; border-color: #6ef0ff; }
.wait .w-seat .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wait .w-seat small { color: #b9e9ff; }
.wait .w-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wait .w-actions .btn { flex: 1; }
.chat-box { background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px; font-size: 13px; max-height: 140px; overflow-y: auto; }
.chat-box .cm b { color: var(--gold); }
.chat-box .cm.sys { color: #b9e9ff; font-style: italic; }
.chat-in { display: flex; gap: 6px; }
.chat-in input { flex: 1; background: rgba(0,0,0,.35); border: 1px solid #43338f; border-radius: 10px; padding: 8px; color: #fff; outline: none; }

/* результаты */
.res-title { font-size: 22px; text-align: center; margin: 6px 0 10px; }
.res-row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid #3a2b80; font-size: 14px; }
.res-row.me { color: var(--gold); font-weight: 700; }
.res-delta.pos { color: #6ef0ff; } .res-delta.neg { color: #ff8b7b; }
.emo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emo-grid button { font-size: 26px; padding: 6px; background: rgba(0,0,0,.3); border-radius: 10px; }
.quick-phrases { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-phrases button { background: rgba(0,0,0,.3); border-radius: 10px; padding: 6px 10px; font-size: 13px; }

@media (min-width: 480px) { :root { --card-w: 64px; --card-h: 92px; } }
@media (max-height: 640px) { :root { --card-w: 48px; --card-h: 70px; } .g-opps { min-height: 76px; } }

/* ---------- выбор игры (хаб) ---------- */
.game-hub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 8px; }
.gcard { position: relative; aspect-ratio: 1 / 1.05; border-radius: 22px; padding: 16px 14px 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .12s; }
.gcard:active { transform: scale(.97); }
.gcard.purple { background: radial-gradient(120% 90% at 50% 0%, #3a2b7d 0%, #241b56 55%, #1a1340 100%); }
.gcard.green { background: radial-gradient(120% 90% at 50% 0%, #1b6b4c 0%, #124a36 55%, #0d3327 100%); }
.gcard .gc-icon { font-size: 64px; line-height: 1; margin: auto 0 10px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
.gcard .gc-title { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.gcard .gc-sub { font-size: 12px; color: #cfd6ea; }
.gcard .gc-online { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.35); border-radius: 14px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #fff; }
.gcard .gc-online i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.lobby-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lobby-head .back { width: 38px; height: 38px; border-radius: 12px; background: var(--panel); font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; color: var(--gold); padding-bottom: 4px; }
.lobby-head .lh-title b { display: block; font-size: 18px; }
.lobby-head .lh-title small { color: var(--muted); font-size: 12px; }

/* ---------- 21 ---------- */
.bj { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px; overflow-y: auto; }
.bj-opps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.bj-opp { display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px; min-width: 110px; position: relative; }
.bj-opp.turn { box-shadow: 0 0 0 2px var(--gold); }
.bj-opp .bj-cards { display: flex; --card-w: 34px; --card-h: 48px; }
.bj-opp .bj-cards .card { margin-left: -12px; } .bj-opp .bj-cards .card:first-child { margin-left: 0; }
.bj-opp .bj-cards .card .ctr { font-size: 16px; } .bj-opp .bj-cards .card .tl, .bj-opp .bj-cards .card .br { font-size: 9px; }
.bj-score { font-weight: 800; font-size: 14px; color: var(--gold); }
.bj-score.bust { color: #ff8b7b; }
.bj-me { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; padding-bottom: calc(10px + var(--safe-bottom)); }
.bj-me .hand { --overlap: -20px; }
.bj-big { font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.bj-big.bust { color: #ff8b7b; }
.bj-big small { font-size: 13px; color: #d6ceff; font-weight: 500; display: block; }
.pill { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.4); color: #ddd; }
.pill.att { background: var(--red); color: #fff; } .pill.ok { background: var(--green); color: #fff; } .pill.bad { background: #7a2a2a; color: #ffd0d0; }

/* ---------- КНБ ---------- */
.rps { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; }
.rps-score { display: flex; align-items: center; gap: 16px; font-size: 16px; }
.rps-score .big { font-size: 40px; font-weight: 900; color: var(--gold); }
.rps-score .who { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; max-width: 100px; }
.rps-arena { display: flex; align-items: center; gap: 24px; min-height: 120px; }
.rps-hand { width: 96px; height: 96px; border-radius: 50%; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 54px; border: 3px solid transparent; }
.rps-hand.win { border-color: var(--gold); box-shadow: 0 0 18px var(--gold); }
.rps-hand.lose { opacity: .55; }
.rps-hand.wait { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7 } }
.rps-pick { display: flex; gap: 10px; }
.rps-pick button { width: 92px; height: 92px; border-radius: 18px; background: var(--panel); font-size: 40px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid #3a2b80; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.rps-pick button span { font-size: 11px; color: #d6ceff; }
.rps-pick button.on { border-color: var(--gold); background: #3b2f8f; }
.rps-pick button:disabled { opacity: .5; }
.rps-hist { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.rps-hist span { background: rgba(0,0,0,.3); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.rps-msg { font-size: 15px; text-align: center; min-height: 22px; }

/* ---------- морской бой ---------- */
.bs { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 8px calc(10px + var(--safe-bottom)); overflow-y: auto; }
.bs-boards { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.bs-board { --cell: min(30px, calc((100vw - 60px) / 10)); display: grid; grid-template-columns: repeat(10, var(--cell)); grid-auto-rows: var(--cell); gap: 1px; background: #13204f; border: 2px solid #5a7dff; border-radius: 6px; padding: 2px; position: relative; }
.bs-board.small { --cell: min(16px, calc((100vw - 60px) / 20)); }
.bs-board.active { border-color: var(--gold); box-shadow: 0 0 14px rgba(242,193,78,.5); }
.bs-cell { background: #1f3a86; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cell) * .6); position: relative; }
.bs-cell.ship { background: #7fb3d5; box-shadow: inset 0 0 0 2px #2d5f80; }
.bs-cell.miss::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: #e4f8ff; }
.bs-cell.hit { background: #c0392b; } .bs-cell.hit::after { content: '✕'; color: #fff; font-weight: 900; }
.bs-cell.last { outline: 2px solid var(--gold); z-index: 1; }
.bs-cell.can { cursor: pointer; }
.bs-cell.can:active { background: #2c56c9; }
.bs-label { display: flex; justify-content: space-between; width: 100%; max-width: 320px; font-size: 12px; color: #d6ceff; }
.bs-fleet { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bs-fleet i { display: inline-flex; gap: 1px; } .bs-fleet i b { width: 10px; height: 10px; background: #7fb3d5; border-radius: 1px; } .bs-fleet i.sunk b { background: #c0392b; }
.bs-hint { font-size: 13px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; min-height: 20px; }

/* ---------- переключатель REAL / DEMO ---------- */
.mode-sw { display: flex; background: rgba(0,0,0,.45); border: 1px solid #4b3a9a; border-radius: 20px; padding: 2px; gap: 2px; flex: 0 0 auto; }
.mode-sw button { padding: 5px 10px; border-radius: 16px; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #a99fe0; }
.mode-sw button.on { background: linear-gradient(180deg, #ffd977, #e0a92e); color: #2a1366; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
body.demo .mode-sw button.on { background: linear-gradient(180deg, #7fd0ff, #2f8fd6); color: #06243a; }
body.demo .coins { border-color: #4aa8e6; }
body.demo .coin { background: radial-gradient(circle, #eaf7ff 0 28%, transparent 30% 42%, #2f8fd6 44% 70%, #16507e 72%); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #16507e; }
body.demo .coins .plus { background: #7fd0ff; color: #06243a; }
.demo-badge { display: inline-block; background: #2f8fd6; color: #fff; border-radius: 6px; padding: 1px 6px; font-size: 10px; font-weight: 800; letter-spacing: .05em; vertical-align: 2px; }
.demo-banner { background: linear-gradient(90deg, #16507e, #2f8fd6); color: #fff; border-radius: 12px; padding: 8px 12px; font-size: 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.demo-banner b { font-size: 13px; }
.demo-banner .btn { margin-left: auto; padding: 5px 10px; font-size: 12px; }
@media (max-width: 360px) { .mode-sw button { padding: 5px 7px; font-size: 10px; } }

/* широкая карточка (дурак) */
.gcard.wide { grid-column: 1 / -1; aspect-ratio: auto; height: 150px; flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 18px; }
.gcard.wide .gc-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.gcard.wide .gc-title { font-size: 28px; }
.gcard.wide .gc-icon { font-size: 84px; margin: 0; }
/* кубик */
.dice-arena { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px; overflow-y: auto; }
.dice-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; }
.dice-p { display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px; min-width: 100px; }
.dice-p.win { box-shadow: 0 0 0 2px var(--gold), 0 0 14px var(--gold); }
.dice-p.out { opacity: .45; }
.dice-p .dn { font-size: 11px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dice-row { display: flex; gap: 6px; }
.die { width: 34px; height: 34px; border-radius: 8px; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 2px 5px rgba(0,0,0,.45); }
.die.big { width: 64px; height: 64px; font-size: 50px; border-radius: 14px; }
.die.q { background: rgba(255,255,255,.15); color: #fff; font-size: 20px; }
.dice-sum { font-weight: 800; color: var(--gold); font-size: 14px; }
.dice-me { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; padding-bottom: calc(10px + var(--safe-bottom)); }
.dice-me .btn.roll { padding: 16px 40px; font-size: 20px; }
@keyframes shake { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-12deg) } 75% { transform: rotate(12deg) } }
.die.rolling { animation: shake .4s ease-in-out 2; }

/* ---------- фишка (демо-валюта) ---------- */
.chip-ic { display: inline-block; width: 15px; height: 15px; border-radius: 50%; vertical-align: -2px; margin-left: 2px; background: radial-gradient(circle, #eaf7ff 0 30%, #2f8fd6 32% 62%, #eaf7ff 64% 70%, #2f8fd6 72%); box-shadow: inset 0 0 0 1px #16507e, 0 1px 2px rgba(0,0,0,.4); background-clip: padding-box; }
.chip-ic::before { content: ''; position: absolute; }
.chip-ic.lg { width: 22px; height: 22px; }
.demo-chip-row { display: flex; align-items: center; gap: 6px; }

/* ===== карточки игр: своя палитра и иллюстрация ===== */
.gcard { isolation: isolate; border: 1px solid rgba(255,255,255,.10); }
.gcard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 45% at 50% 34%, rgba(255,255,255,.22), transparent 70%); }
.gcard::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(255,255,255,.10), transparent 35%), var(--pat, none); opacity: 1; pointer-events: none; }
.gcard .gc-icon { width: 78%; max-width: 150px; margin: auto 0 8px; font-size: 0; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
.gcard .gc-svg { width: 100%; height: auto; display: block; overflow: visible; }
.gcard .gc-title { text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.gcard .gc-sub { color: rgba(255,255,255,.78); }
.gcard.wide .gc-icon { width: 48%; max-width: 200px; margin: 0 -4px -10px 0; align-self: flex-end; }
.gcard.wide::before { background: radial-gradient(45% 80% at 78% 50%, rgba(255,255,255,.22), transparent 70%); }

.gcard[data-g="durak"] { background: radial-gradient(130% 120% at 85% 10%, #d8445a 0%, #8e1a36 45%, #420b1f 100%); box-shadow: 0 10px 28px rgba(142,26,54,.45), inset 0 1px 0 rgba(255,255,255,.14);
  --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Ctext x='4' y='18' font-size='14' fill='white' fill-opacity='.06'%3E%E2%99%A0%3C/text%3E%3Ctext x='26' y='40' font-size='14' fill='white' fill-opacity='.06'%3E%E2%99%A5%3C/text%3E%3C/svg%3E"); }
.gcard[data-g="blackjack"] { background: radial-gradient(130% 110% at 50% 0%, #22c48f 0%, #0e7359 48%, #06362d 100%); box-shadow: 0 10px 28px rgba(14,115,89,.4), inset 0 1px 0 rgba(255,255,255,.14); }
.gcard[data-g="rps"] { background: radial-gradient(130% 110% at 50% 0%, #ffab40 0%, #d0621a 48%, #5a2308 100%); box-shadow: 0 10px 28px rgba(208,98,26,.4), inset 0 1px 0 rgba(255,255,255,.16); }
.gcard[data-g="battleship"] { background: radial-gradient(130% 110% at 50% 0%, #3aa0ff 0%, #1a5cae 48%, #0a2350 100%); box-shadow: 0 10px 28px rgba(26,92,174,.45), inset 0 1px 0 rgba(255,255,255,.14); }
.gcard[data-g="dice"] { background: radial-gradient(130% 110% at 50% 0%, #b36bff 0%, #6a25b8 48%, #2b0c5a 100%); box-shadow: 0 10px 28px rgba(106,37,184,.45), inset 0 1px 0 rgba(255,255,255,.14); }
.gcard[data-g="rps"] .gc-sub { color: rgba(255,245,230,.85); }

/* ---------- приветственный бонус (REAL) ---------- */
.welcome-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(100deg, #ffe08a 0%, #f2c14e 45%, #d1951f 100%); color: #2a1366; border: 1px solid #ffe9a8;
  box-shadow: 0 6px 18px rgba(242,193,78,.35), inset 0 1px 0 rgba(255,255,255,.6); position: relative; overflow: hidden; }
.welcome-banner::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); animation: wbShine 3.2s ease-in-out infinite; }
@keyframes wbShine { 0%, 60% { left: -50% } 100% { left: 130% } }
.welcome-banner .wb-gift { font-size: 26px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.welcome-banner .wb-text { flex: 1; min-width: 0; line-height: 1.2; }
.welcome-banner .wb-text b { display: block; font-size: 14px; font-weight: 800; }
.welcome-banner .wb-text small { font-size: 12px; color: #5a3500; font-weight: 600; }
.welcome-banner .wb-timer { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 18px; font-weight: 800; letter-spacing: .03em;
  color: #22e07a; background: #160d38; padding: 5px 9px; border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(34,224,122,.35), 0 0 10px rgba(34,224,122,.25); text-shadow: 0 0 6px rgba(34,224,122,.6); }
.welcome-banner .wb-timer.low { color: #ff6b5b; box-shadow: inset 0 0 0 1px rgba(255,107,91,.4); text-shadow: 0 0 6px rgba(255,107,91,.6); }
.wb-shop { margin-bottom: 10px; }

/* =====================================================================
   ТЕМА «Перламутр»: глубокий фиолетовый + голубой неон + перламутр
   ===================================================================== */
html, body { background: var(--bg); }
body { background:
  radial-gradient(70% 45% at 100% 0%, rgba(69,217,255,.16), transparent 70%),
  radial-gradient(80% 55% at 0% 100%, rgba(155,92,255,.22), transparent 70%),
  linear-gradient(180deg, #150c34 0%, #0e0824 100%) fixed; }
#app { background: transparent; }

/* верх и низ — стекло */
#topbar { background: var(--wood); border-bottom: 1px solid var(--wood-edge); box-shadow: 0 6px 24px rgba(10,4,40,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#nav { background: var(--wood); border-top: 1px solid var(--wood-edge); box-shadow: 0 -6px 24px rgba(10,4,40,.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-btn { color: #9d92d6; }
.nav-btn.active { color: var(--cyan); text-shadow: 0 0 10px rgba(69,217,255,.6); }
.nav-btn.active i { filter: drop-shadow(0 0 8px rgba(69,217,255,.55)); }
.tb-lvl { color: #c9c0f5; }
.online { color: #6ef0ff; }
.avatar { border-color: #6b5bd0; background-color: #2c1f62; }

/* баланс */
.coins { background: rgba(10,4,40,.45); border: 1px solid rgba(110,220,255,.45); box-shadow: 0 0 12px rgba(69,217,255,.15); }
.coins .plus { background: var(--pearl); color: #2a1366; }

/* переключатель REAL / DEMO */
.mode-sw { background: rgba(10,4,40,.5); border: 1px solid #4b3a9a; }
.mode-sw button { color: #a99fe0; }
.mode-sw button.on { background: var(--pearl); color: #2a1366; box-shadow: 0 0 12px rgba(217,200,255,.45); }
body.demo .mode-sw button.on { background: linear-gradient(180deg, #7fe6ff, #2f8fd6); color: #06243a; box-shadow: 0 0 12px rgba(69,217,255,.5); }

/* кнопки */
.btn { background: var(--panel2); box-shadow: 0 3px 0 rgba(8,3,30,.55); }
.btn.gold { background: var(--pearl); color: #2a1366; box-shadow: 0 3px 0 #7a63c9, 0 6px 18px rgba(201,182,255,.25); }
.btn.green { background: linear-gradient(180deg, #56e4ff 0%, #2a8cff 100%); color: #fff; box-shadow: 0 3px 0 #1d5bb8, 0 6px 18px rgba(69,217,255,.25); text-shadow: 0 1px 2px rgba(0,40,90,.35); }
.btn.blue { background: linear-gradient(180deg, #8f7bff, #5b3fe0); }
.btn.red { background: linear-gradient(180deg, #ff7a98, #d9375e); }
.btn.ghost { box-shadow: inset 0 0 0 1.5px #5a4aa8; }
.link { color: var(--cyan); }

/* панели и списки */
.room, .prow, .stat, .ach, .shop-item, .coin-pack, .gift, .chip, .gt { background: linear-gradient(180deg, rgba(48,33,110,.75), rgba(32,22,74,.75)); border: 1px solid rgba(124,104,230,.28); }
.room { box-shadow: 0 4px 16px rgba(8,3,30,.35); }
.chip.on { background: linear-gradient(180deg, #3e7fff, #2b4fd0); border-color: #6ee7ff; }
.tag { background: rgba(10,4,40,.45); color: #d6ceff; }
.tag.t { background: rgba(139,108,255,.35); color: #efe9ff; }
.r-bet { color: var(--cyan) !important; }
.seat.busy { border-color: #6ee7ff; background-color: #3b2f8f; }
.tabs { background: rgba(10,4,40,.45); }
.tab.active { background: var(--panel2); box-shadow: inset 0 0 0 1px rgba(110,220,255,.3); }
.ach.got { border-color: var(--cyan); box-shadow: 0 0 10px rgba(69,217,255,.2); }
.shop-item.eq { border-color: var(--cyan); box-shadow: 0 0 12px rgba(69,217,255,.25); }
.lvl-bar i { background: linear-gradient(90deg, #8b6cff, #45d9ff); }
.modal { background: linear-gradient(180deg, #2a1d62 0%, #1c1348 100%); border-top-color: var(--cyan); }
.modal-bg.center .modal { border-color: rgba(110,220,255,.55); box-shadow: 0 0 30px rgba(69,217,255,.15); }
.seg { background: rgba(10,4,40,.5); }
.seg button.on { background: linear-gradient(180deg, #56e4ff, #2a8cff); color: #fff; }
.seg button.on.gold { background: var(--pearl); color: #2a1366; }
.sw.on { background: linear-gradient(90deg, #8b6cff, #45d9ff); }
.inp, .search-row input, .chat-in input { background: rgba(10,4,40,.45); border-color: #43338f; }
.toast { background: rgba(28,18,72,.96); border-color: var(--cyan); }
.toast.err { border-color: var(--red); }
#connecting { background: var(--bg); }
.spinner { border-color: #3a2b80; border-top-color: var(--cyan); }
.lobby-head .back { background: var(--panel2); color: var(--cyan); }
.demo-banner { background: linear-gradient(95deg, #2b4fd0, #2fb6ff); }

/* игровой стол */
#game-root { background: var(--felt); }
.g-top { background: rgba(10,4,40,.45); }
.g-top .g-bank { color: var(--cyan); }
.opp.turn .avatar, .bj-opp.turn { box-shadow: 0 0 0 3px var(--cyan), 0 0 14px var(--cyan); }
.hand .card.sel { box-shadow: 0 0 0 3px var(--cyan), 0 6px 14px rgba(0,0,0,.5); }
.hand .card.can { box-shadow: 0 0 0 2px #b59cff, 0 2px 5px rgba(0,0,0,.45); }
.hand .card.trump-mark::after { background: var(--cyan); }
.pair.target .a { box-shadow: 0 0 0 3px var(--cyan), 0 0 12px var(--cyan); }
.me-timer, .bj-score, .dice-sum, .rps-score .big { color: var(--cyan); }
.chat-box .cm b { color: var(--cyan); }
.wait .w-seat { border-color: #6b5bd0; } .wait .w-seat.busy { border-color: var(--cyan); }
.bs-board { background: #13204f; border-color: #5a7dff; }
.bs-board.active { border-color: var(--cyan); box-shadow: 0 0 14px rgba(69,217,255,.5); }

/* ---------- карточки игр в новой гамме ---------- */
.gcard[data-g="durak"] { background: radial-gradient(130% 130% at 85% 0%, #b98bff 0%, #6a35d8 40%, #2a1170 100%); box-shadow: 0 10px 30px rgba(106,53,216,.45), inset 0 1px 0 rgba(255,255,255,.22); }
.gcard[data-g="durak"]::after { background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.10) 38%, rgba(170,240,255,.12) 50%, transparent 66%), var(--pat, none); }
.gcard[data-g="blackjack"] { background: radial-gradient(130% 110% at 50% 0%, #4af0e0 0%, #1798c9 46%, #0c2c66 100%); box-shadow: 0 10px 28px rgba(23,152,201,.4), inset 0 1px 0 rgba(255,255,255,.2); }
.gcard[data-g="rps"] { background: radial-gradient(130% 110% at 50% 0%, #ff8fe0 0%, #a53fe0 46%, #36106e 100%); box-shadow: 0 10px 28px rgba(165,63,224,.4), inset 0 1px 0 rgba(255,255,255,.2); }
.gcard[data-g="rps"] .gc-sub { color: rgba(255,240,255,.85); }
.gcard[data-g="battleship"] { background: radial-gradient(130% 110% at 50% 0%, #52c8ff 0%, #2b5ee8 46%, #101d63 100%); box-shadow: 0 10px 28px rgba(43,94,232,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.gcard[data-g="dice"] { background: radial-gradient(130% 110% at 50% 0%, #a99bff 0%, #5a40e6 46%, #1c1366 100%); box-shadow: 0 10px 28px rgba(90,64,230,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.gcard { border: 1px solid rgba(200,220,255,.18); }
.gcard .gc-online { background: rgba(10,4,40,.4); backdrop-filter: blur(6px); }
.sw { background: #3a2f6e; }
.sw.on { background: linear-gradient(90deg, #8b6cff, #45d9ff); }
/* монета реального баланса — перламутрово-голубая */
.coin { background: radial-gradient(circle, #ffffff 0 26%, transparent 28% 40%, #45d9ff 42% 66%, #6a4fe0 70%); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #4b36b8, 0 0 6px rgba(69,217,255,.45); }

/* иллюстрации игр (сгенерированы GPT-Image 2.5) */
.gcard .gc-icon picture, .gcard .gc-icon img { display: block; width: 100%; height: auto; }
.gcard .gc-icon { width: 74%; max-width: 160px; filter: drop-shadow(0 12px 18px rgba(8,3,40,.55)); }
.gcard.wide .gc-icon { width: 44%; max-width: 210px; margin: -6px 0 -6px 0; align-self: center; }
.gcard .gc-online { z-index: 3; }

/* ===== графика v2 (GPT-Image 2.5 Sunburst) ===== */
.nav-btn i { display: flex; align-items: center; justify-content: center; height: 28px; }
.nav-ic { width: 28px; height: 28px; object-fit: contain; opacity: .55; filter: saturate(.5) brightness(.9); transition: .15s; }
.nav-btn.active .nav-ic { opacity: 1; filter: drop-shadow(0 0 8px rgba(69,217,255,.65)); transform: translateY(-1px) scale(1.08); }
.welcome-banner .wb-gift { display: flex; }
.welcome-banner .wb-gift img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(90,50,0,.35)); }
.coin, body.demo .coin { background: url(img/ui/coin.webp) center/contain no-repeat !important; box-shadow: none !important; border-radius: 50%; }
body.demo .coin, .chip-ic { background: url(img/ui/chip_demo.webp) center/contain no-repeat !important; box-shadow: none !important; }
.chip-ic { width: 16px; height: 16px; }
.chip-ic.lg { width: 24px; height: 24px; }
/* рубашки карт */
.card.back { padding: 0; background: #fff; }
.card.back::before { inset: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: inherit; background: var(--bk) center/cover no-repeat !important; }
.back-classic { --bk: url(img/backs/classic.webp); } .back-blue { --bk: url(img/backs/blue.webp); } .back-red { --bk: url(img/backs/red.webp); }
.back-gold { --bk: url(img/backs/gold.webp); } .back-emerald { --bk: url(img/backs/emerald.webp); } .back-night { --bk: url(img/backs/night.webp); }
.back-royal { --bk: url(img/backs/royal.webp); } .back-ornament { --bk: url(img/backs/ornament.webp); }
.lh-ic { width: 30px; height: 30px; object-fit: contain; vertical-align: -7px; margin-right: 6px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }

/* ===== Дурак — рубиновый, в гармонии с фиолетово-голубой темой ===== */
.gcard[data-g="durak"] {
  background:
    radial-gradient(60% 90% at 82% 30%, rgba(255,140,170,.35), transparent 70%),
    radial-gradient(130% 140% at 85% 0%, #ff4d6d 0%, #d01f4b 34%, #8a1240 64%, #3a0b33 100%);
  border-color: rgba(255,170,195,.28);
  box-shadow: 0 12px 32px rgba(208,31,75,.42), 0 0 0 1px rgba(255,120,160,.08), inset 0 1px 0 rgba(255,255,255,.22);
}
.gcard[data-g="durak"]::after { background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.12) 36%, rgba(255,200,220,.10) 48%, transparent 64%), var(--pat, none); }
.gcard[data-g="durak"] .gc-sub { color: rgba(255,228,236,.85); }
.gcard[data-g="durak"] .gc-icon { filter: drop-shadow(0 12px 18px rgba(60,5,30,.6)) drop-shadow(0 0 18px rgba(255,120,160,.25)); }
/* КНБ чуть смещаем в маджента-фиолет, чтобы не спорил с красным */
.gcard[data-g="rps"] { background: radial-gradient(130% 110% at 50% 0%, #e98bff 0%, #9b3fe6 46%, #330f72 100%); box-shadow: 0 10px 28px rgba(155,63,230,.4), inset 0 1px 0 rgba(255,255,255,.2); }

/* ===== Квадратики: каждый своим драгоценным цветом, основа уходит в общий тёмный фиолет ===== */
.gcard[data-g="blackjack"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(140,255,210,.30), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #3dffb4 0%, #10b57e 32%, #0a6a5a 60%, #0d2a44 100%);
  border-color: rgba(150,255,215,.28);
  box-shadow: 0 12px 30px rgba(16,181,126,.38), inset 0 1px 0 rgba(255,255,255,.22);
}
.gcard[data-g="blackjack"] .gc-sub { color: rgba(225,255,242,.85); }
.gcard[data-g="rps"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(255,225,140,.32), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #ffd45a 0%, #ff9124 32%, #d4442e 62%, #4a0f3c 100%);
  border-color: rgba(255,215,150,.30);
  box-shadow: 0 12px 30px rgba(255,145,36,.36), inset 0 1px 0 rgba(255,255,255,.25);
}
.gcard[data-g="rps"] .gc-sub { color: rgba(255,244,225,.9); }
.gcard[data-g="battleship"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(150,235,255,.32), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #5ee6ff 0%, #1e93ec 32%, #1d47b0 62%, #15124e 100%);
  border-color: rgba(160,230,255,.30);
  box-shadow: 0 12px 30px rgba(30,147,236,.4), inset 0 1px 0 rgba(255,255,255,.22);
}
.gcard[data-g="battleship"] .gc-sub { color: rgba(228,247,255,.88); }
.gcard[data-g="dice"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(225,190,255,.32), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #d39bff 0%, #9a48f2 32%, #5a22b8 62%, #1d0c4e 100%);
  border-color: rgba(220,190,255,.30);
  box-shadow: 0 12px 30px rgba(154,72,242,.42), inset 0 1px 0 rgba(255,255,255,.22);
}
.gcard[data-g="dice"] .gc-sub { color: rgba(244,236,255,.88); }
.gcard:not(.wide)::after { background: linear-gradient(125deg, transparent 22%, rgba(255,255,255,.10) 40%, rgba(255,255,255,.04) 52%, transparent 66%); }

/* ===== Рулетка: золотая карточка ===== */
.gcard.gold { background:
    radial-gradient(55% 90% at 80% 35%, rgba(255,240,180,.45), transparent 70%),
    radial-gradient(130% 140% at 85% 0%, #ffe27a 0%, #f5b62a 30%, #c9761a 58%, #5a1f3c 100%);
  border-color: rgba(255,230,160,.45); box-shadow: 0 12px 34px rgba(245,182,42,.42), inset 0 1px 0 rgba(255,255,255,.4); }
.gcard.gold::after { background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,.22) 36%, rgba(255,250,220,.12) 48%, transparent 64%); animation: goldShine 4s ease-in-out infinite; background-size: 220% 100%; }
@keyframes goldShine { 0%, 55% { background-position: 120% 0 } 100% { background-position: -120% 0 } }
.gcard.gold .gc-title { color: #fff; text-shadow: 0 2px 10px rgba(120,50,0,.55); }
.gcard.gold .gc-sub { color: rgba(255,248,225,.95); }
.gcard.gold .gc-tag { margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5a2a00; background: linear-gradient(180deg, #fff6c9, #ffd45a); padding: 3px 9px; border-radius: 8px; box-shadow: 0 2px 6px rgba(120,60,0,.35); }
.gcard.gold .gc-icon { filter: drop-shadow(0 12px 18px rgba(90,30,0,.55)); }

/* ===== Экран рулетки ===== */
#s-roulette { --g1: #ffe27a; --g2: #f5b62a; --g3: #c9761a; }
#s-roulette .lh-title b { color: var(--g1); text-shadow: 0 0 12px rgba(255,200,80,.35); }
.rl-hist { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.rl-hist::-webkit-scrollbar { display: none; }
.rl-lbl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rl-last { display: flex; gap: 6px; }
.rl-dot { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #1a0c3a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 2px 6px rgba(0,0,0,.35); }
.rl-reel-wrap { position: relative; border-radius: 18px; padding: 18px 0; margin-bottom: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(40,24,90,.85), rgba(20,12,52,.9)); border: 1px solid rgba(255,210,120,.25); box-shadow: inset 0 0 30px rgba(0,0,0,.45), 0 8px 24px rgba(8,3,30,.45); }
.rl-reel { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.rl-track { display: flex; gap: 8px; will-change: transform; padding: 0 4px; }
.rl-tile { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 14px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: radial-gradient(80% 80% at 30% 20%, rgba(255,255,255,.35), transparent 60%), var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 4px 10px rgba(0,0,0,.35); }
.rl-tile .ti { width: 46px; height: 46px; border-radius: 50%; background: rgba(15,8,40,.55) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 20px; box-shadow: 0 0 0 2px rgba(255,255,255,.65); }
.rl-tile.win { animation: rlWin 1s ease-in-out infinite alternate; box-shadow: 0 0 0 3px #fff, 0 0 24px var(--c), 0 0 48px var(--c); z-index: 2; }
@keyframes rlWin { from { transform: scale(1) } to { transform: scale(1.1) } }
.rl-reel-wrap.dim .rl-tile:not(.win) { filter: brightness(.45) saturate(.6); }
.rl-marker { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 3px; margin-left: -1.5px; background: linear-gradient(180deg, var(--g1), var(--g2)); box-shadow: 0 0 12px rgba(255,200,80,.9); border-radius: 2px; z-index: 3; pointer-events: none; }
.rl-marker::before, .rl-marker::after { content: ''; position: absolute; left: 50%; margin-left: -8px; border: 8px solid transparent; }
.rl-marker::before { top: -8px; border-top-color: var(--g1); }
.rl-marker::after { bottom: -8px; border-bottom-color: var(--g1); }
.rl-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 4; pointer-events: none; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.8); background: radial-gradient(40% 70% at 50% 50%, rgba(10,4,30,.75), transparent 75%); }
.rl-overlay.hide { display: none; }
.rl-overlay small { font-size: 14px; font-weight: 700; color: #fff; }
.rl-overlay b { font-size: 40px; font-weight: 900; color: #fff; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rl-overlay .win-name { font-size: 22px; color: var(--g1); }
.rl-overlay .win-sub { font-size: 13px; color: #e8ddff; }
.rl-pot { background: linear-gradient(180deg, rgba(48,33,110,.75), rgba(32,22,74,.75)); border: 1px solid rgba(255,210,120,.22); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.rl-pot-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.rl-pot-row b { font-size: 22px; color: var(--g1); text-shadow: 0 0 10px rgba(255,200,80,.35); }
.rl-pot-row .rl-pc { margin-left: auto; }
.rl-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(10,4,40,.5); }
.rl-bar i { display: block; height: 100%; transition: width .4s; }
.rl-betbox { background: linear-gradient(180deg, rgba(70,45,20,.35), rgba(32,22,74,.7)); border: 1px solid rgba(255,210,120,.3); border-radius: 14px; padding: 10px; margin-bottom: 6px; }
.rl-inrow { display: flex; gap: 6px; margin-bottom: 8px; }
.rl-inrow input { flex: 1; min-width: 0; background: rgba(10,4,40,.55); border: 1px solid rgba(255,210,120,.35); border-radius: 10px; padding: 9px 10px; color: #fff; font-size: 16px; font-weight: 700; outline: none; }
.rl-inrow .btn { padding: 7px 9px; }
.rl-actrow { display: flex; gap: 8px; }
#rl-bet { background: linear-gradient(180deg, #ffe58a, #f5b62a 60%, #d98a1c); color: #3a1a00; box-shadow: 0 3px 0 #a65d0e, 0 6px 18px rgba(245,182,42,.3); }
#rl-bet:disabled { filter: grayscale(.6); }
.rl-hint { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; min-height: 16px; }
.rl-hint b { color: var(--g1); }
.rl-prow { display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, rgba(48,33,110,.75), rgba(32,22,74,.75)); border: 1px solid rgba(124,104,230,.28); border-radius: 12px; padding: 8px 10px; position: relative; overflow: hidden; }
.rl-prow .sw-c { width: 6px; align-self: stretch; border-radius: 3px; }
.rl-prow .pn { flex: 1; min-width: 0; }
.rl-prow .pn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-prow .pn small { color: var(--muted); font-size: 11px; }
.rl-prow .pc { font-weight: 900; font-size: 16px; color: var(--g1); min-width: 56px; text-align: right; }
.rl-prow .fill { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--c); opacity: .9; }
.rl-prow.me { border-color: rgba(255,210,120,.6); }
.rl-records { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rl-rec { background: linear-gradient(180deg, rgba(48,33,110,.75), rgba(32,22,74,.75)); border: 1px solid rgba(124,104,230,.28); border-radius: 12px; padding: 10px; font-size: 12px; color: var(--muted); }
.rl-rec b { display: block; font-size: 18px; color: var(--g1); margin: 2px 0; }
.rl-fair { font-size: 10.5px; color: #8f86c2; margin: 12px 0 4px; word-break: break-all; line-height: 1.45; }
.rl-fair b { color: #c9c0f5; }

.rl-reel-wrap { padding-bottom: 46px; }
.rl-overlay { bottom: 28px; }
.rl-overlay.bottom { top: auto; bottom: 0; height: 50px; justify-content: center; background: linear-gradient(0deg, rgba(10,4,30,.85), transparent); flex-direction: row; gap: 10px; flex-wrap: wrap; padding: 0 10px; }
.rl-overlay.bottom .win-name { font-size: 17px; line-height: 1.1; }
.rl-overlay.bottom .win-sub { font-size: 12px; }
.rl-marker { top: 10px; bottom: 38px; }

/* ===================== ШРИФТЫ =====================
   Unbounded — заголовки и цифры, Rubik — основной текст */
:root { --f-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --f-display: 'Unbounded', 'Rubik', system-ui, sans-serif; }
html, body, button, input, textarea, select { font-family: var(--f-body); }
body { font-feature-settings: 'tnum' 0; -webkit-font-smoothing: antialiased; }

/* заголовки */
.gc-title, .lobby-head .lh-title b, .modal h2, .res-title, .prof-head .pi h1, .wait .w-head h2,
.rl-overlay small, .welcome-banner .wb-text b, .demo-banner b, #tb-nick
  { font-family: var(--f-display); letter-spacing: -.01em; }
.gc-title { font-weight: 800; }
.gcard:not(.wide) .gc-title { font-size: 19px; letter-spacing: -.02em; }
.gcard.wide .gc-title { font-size: 30px; font-weight: 900; }
.gcard .gc-sub { font-weight: 500; }
.gcard.gold .gc-tag { font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; }
.lobby-head .lh-title b { font-size: 19px; font-weight: 700; }
.modal h2 { font-size: 17px; font-weight: 700; }
#tb-nick { font-size: 14px; font-weight: 700; }
.welcome-banner .wb-text b { font-size: 13px; font-weight: 700; }

/* подписи разделов */
h3 { font-family: var(--f-display); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; }

/* цифры: баланс, ставки, банк, счёт, таймеры, шансы */
#tb-coins-val, .r-bet, .g-bank, .bj-big, .rps-score .big, .dice-sum, .rl-overlay b, .rl-pot-row b, .rl-prow .pc,
.stat b, .rl-rec b, .me-timer, .res-delta, .opp .oc, .shop-item .pr, .coin-pack .cp-n, .prow .rank, .rl-dot
  { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
#tb-coins-val { font-weight: 700; font-size: 14px; }
.stat b { font-weight: 700; font-size: 17px; }
.rl-overlay b { font-weight: 900; }
.bj-big, .rps-score .big { font-weight: 900; }

/* кнопки и переключатели */
.btn { font-weight: 600; letter-spacing: .01em; }
.btn.big, #rl-bet { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: 0; }
.mode-sw button { font-family: var(--f-display); font-weight: 700; font-size: 10.5px; letter-spacing: .08em; }
.tab, .seg button, .chip { font-weight: 500; }
.nav-btn span { font-weight: 500; font-size: 10.5px; }
.tag { font-weight: 500; }

/* игральные карты: чёткие индексы */
.card { font-family: var(--f-body); font-weight: 700; }
.card .tl, .card .br { font-weight: 800; letter-spacing: -.03em; }
:root { --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji'; --f-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif, var(--emoji); --f-display: 'Unbounded', 'Rubik', system-ui, sans-serif, var(--emoji); }
/* верхняя панель — компактнее */
#tb-nick { font-family: var(--f-body); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.tb-lvl { white-space: nowrap; font-size: 11px; }
#tb-coins-val { font-size: 13px; }
.mode-sw button { font-size: 9.5px; padding: 5px 9px; letter-spacing: .06em; }
.online { white-space: nowrap; font-size: 11px; }
/* баннер бонуса — в одну строку */
.welcome-banner .wb-text b { font-family: var(--f-body); font-size: 14px; font-weight: 800; letter-spacing: 0; }
/* квадратные карточки — название в одну строку */
.gcard:not(.wide) .gc-title { font-size: 17px; white-space: nowrap; }

/* ===== ШРИФТЫ v2: Unbounded только в названиях игр, остальное — Rubik ===== */
#tb-coins-val, .r-bet, .g-bank, .bj-big, .rps-score .big, .dice-sum, .rl-overlay b, .rl-pot-row b, .rl-prow .pc,
.stat b, .rl-rec b, .me-timer, .res-delta, .opp .oc, .shop-item .pr, .coin-pack .cp-n, .prow .rank, .rl-dot,
.lobby-head .lh-title b, .modal h2, .res-title, .prof-head .pi h1, .wait .w-head h2, .rl-overlay small,
.welcome-banner .wb-text b, .demo-banner b, #tb-nick, h3, .btn.big, #rl-bet, .mode-sw button, .gcard.gold .gc-tag
  { font-family: var(--f-body); letter-spacing: 0; }
#tb-coins-val { font-size: 15px; font-weight: 700; }
.mode-sw button { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 5px 10px; }
.welcome-banner .wb-text b { font-size: 14px; font-weight: 700; white-space: nowrap; }
.welcome-banner .wb-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.lobby-head .lh-title b { font-size: 18px; font-weight: 700; }
.modal h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.btn.big, #rl-bet { font-size: 16px; font-weight: 700; }
.stat b { font-size: 18px; font-weight: 700; }
.rl-pot-row b { font-size: 22px; font-weight: 800; }
.rl-prow .pc { font-size: 16px; font-weight: 800; }
.rl-overlay small { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.rl-overlay b { font-size: 38px; font-weight: 800; }
.rl-overlay.bottom .win-name { font-size: 17px; font-weight: 800; }
.bj-big, .rps-score .big { font-weight: 800; }
.gcard.gold .gc-tag { font-weight: 800; letter-spacing: .08em; }
/* названия игр — Unbounded, но аккуратнее */
.gc-title { font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; }
.gcard.wide .gc-title { font-size: 26px; font-weight: 700; }
.gcard:not(.wide) .gc-title { font-size: 16px; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; }
.gcard .gc-sub { font-size: 12px; font-weight: 500; }
@media (max-width: 370px) { .gcard.wide .gc-title { font-size: 23px; } .gcard:not(.wide) .gc-title { font-size: 15px; } .mode-sw button { padding: 5px 8px; } }
/* узкие экраны (≤ 380px): ничего не переносится и не наезжает */
.welcome-banner .wb-text { min-width: 0; }
.welcome-banner .wb-text b { overflow: hidden; text-overflow: ellipsis; }
.gcard .gc-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 380px) {
  .online { display: none; }
  #topbar { padding-left: 8px; padding-right: 8px; }
  .tb-user { gap: 6px; } .avatar.sm { width: 32px; height: 32px; }
  .mode-sw button { padding: 5px 7px; font-size: 10px; }
  #tb-coins-val { font-size: 14px; }
  .welcome-banner { gap: 8px; padding: 9px 10px; }
  .welcome-banner .wb-gift img { width: 32px; height: 32px; }
  .welcome-banner .wb-text b { font-size: 13px; }
  .welcome-banner .wb-text small { font-size: 11px; }
  .welcome-banner .wb-timer { font-size: 15px; padding: 4px 7px; }
  .gcard:not(.wide) .gc-sub { font-size: 11px; }
  .gcard.wide .gc-sub { font-size: 11.5px; }
}
.gcard .gc-sub { line-height: 1.35; padding-bottom: 1px; }
.gcard .gc-title { line-height: 1.2; }
@media (max-width: 380px) { .gcard:not(.wide) .gc-icon { width: 62%; margin-bottom: 6px; } .gcard:not(.wide) { padding: 12px 10px 12px; } }

/* ===== Звания ===== */
.rk { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; white-space: nowrap; }
.rk .rk-em { flex: 0 0 auto; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); overflow: visible; }
.rk b { font-weight: 700; font-size: inherit; letter-spacing: .01em; }
.rk-silver b { color: #dfe6f1; } .rk-selite b { color: #cfe0ff; } .rk-gold b { color: #ffd66b; } .rk-mg b { color: #8cc8ff; }
.rk-dmg b { color: #c6b0ff; } .rk-le b { color: #ffb27a; } .rk-smfc b { color: #ff9dcb; } .rk-ge b { color: #ffe27a; text-shadow: 0 0 8px rgba(255,200,60,.6); }
.tb-lvl { display: flex; align-items: center; font-size: 11.5px; max-width: 120px; overflow: hidden; }
.tb-lvl .rk b { overflow: hidden; text-overflow: ellipsis; }
.prof-rank { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin: 2px 0 2px; }
.prof-rank .prof-bal { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.rk-next { font-size: 11px; color: var(--muted); margin-top: 4px; }
.rk-change { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.rk-change.up { color: #6ef0b0; } .rk-change.down { color: #ff9eb0; }
.prow .pn small .rk { font-size: 11px; vertical-align: -3px; }
.w-seat small .rk { font-size: 11px; }
/* только значок звания, без подписи; онлайн сверху скрыт */
.online { display: none !important; }
.tb-lvl { margin-top: 2px; }
.prof-rank .rk-em { filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

/* плашки званий */
.rk-img { display: block; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.tb-lvl { max-width: none; }

/* звание в профиле + список званий */
.rk-open { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; margin-left: -4px; border-radius: 10px; background: rgba(255,255,255,.04); max-width: 100%; text-align: left; }
.rk-open:active { background: rgba(255,255,255,.1); }
.rk-full { font-size: 13px; font-weight: 700; line-height: 1.15; color: #fff; }
.rk-chev { font-style: normal; color: var(--muted); font-size: 18px; margin-left: 2px; }
.prof-rank { align-items: center; }
.rkl-hint { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.rkl { display: flex; flex-direction: column; gap: 6px; }
.rkl-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: rgba(10,4,40,.35); border: 1px solid rgba(124,104,230,.2); }
.rkl-row img { height: 40px; width: 120px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.rkl-row:not(.done):not(.cur) img { filter: grayscale(.85) brightness(.7); }
.rkl-row:not(.done):not(.cur) .rkl-n b { color: var(--muted); }
.rkl-n { flex: 1; min-width: 0; }
.rkl-n b { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.rkl-n small { font-size: 11px; color: var(--muted); }
.rkl-row.cur { border-color: var(--cyan); background: linear-gradient(90deg, rgba(69,217,255,.16), rgba(139,108,255,.12)); box-shadow: 0 0 14px rgba(69,217,255,.2); }
.rkl-row.cur small { color: var(--cyan); font-weight: 600; }
.rkl-k { font-size: 12px; color: var(--muted); font-weight: 700; min-width: 18px; text-align: right; }

/* плашка звания: фиксированный размер, без сдвигов вёрстки */
.rk-img { object-fit: contain; flex: 0 0 auto; }
#tb-rank { height: 18px; width: 52px; flex: 0 0 auto; }
.rkl-row img { width: 114px; height: 40px; object-fit: fill; }

/* плюсик пополнения: зелёно-фиолетовый */
.coins .plus, body.demo .coins .plus {
  width: 22px; height: 22px; font-size: 17px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2ee59d 0%, #22c7a8 35%, #8b5cf6 75%, #a855f7 100%);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.35), 0 0 10px rgba(46,229,157,.45), 0 0 14px rgba(139,92,246,.45);
  text-shadow: 0 1px 2px rgba(20,0,60,.45);
}
/* плюсик — обратно компактный */
.coins .plus, body.demo .coins .plus { width: 18px; height: 18px; font-size: 14px; line-height: 1; box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 0 6px rgba(46,229,157,.35), 0 0 8px rgba(139,92,246,.35); }
.coins .plus, body.demo .coins .plus { width: 15px; height: 15px; font-size: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.28), 0 0 5px rgba(46,229,157,.3), 0 0 6px rgba(139,92,246,.3); }
.coins .plus, body.demo .coins .plus { width: 17px; height: 17px; font-size: 13px; }

/* ===== приглашение друзей ===== */
.friends-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 10px; padding: 10px 14px; background: linear-gradient(135deg, #5b3fe0, #2f8fd6); }
.friends-cta .fc-ic { font-size: 24px; }
.friends-cta span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.15; }
.friends-cta b { font-size: 15px; } .friends-cta small { font-size: 11.5px; opacity: .85; font-weight: 500; }
.friends-cta i { font-style: normal; font-size: 22px; opacity: .8; }
.w-seat.free { cursor: pointer; border-color: rgba(69,217,255,.55); background: rgba(69,217,255,.06); }
.w-seat.free .w-plus { font-size: 28px; color: var(--cyan); line-height: 1; }
.w-seat.free small { color: var(--cyan); }
.w-seat.ghost { border-style: dashed; border-color: rgba(255,255,255,.35); opacity: .75; cursor: pointer; }
.w-seat.ghost .avatar { filter: grayscale(.4); animation: pulse 1.6s infinite; }
.fp-list { max-height: 40dvh; overflow-y: auto; margin: 10px 0 6px; }
.fp-list h3 { margin: 10px 0 6px; }
.fp-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; margin-bottom: 6px; background: rgba(10,4,40,.35); border: 1px solid rgba(124,104,230,.2); cursor: pointer; }
.fp-row .pn { flex: 1; min-width: 0; } .fp-row .pn b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fp-row .pn small { color: var(--muted); font-size: 11px; }
.fp-row .fp-chk { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #5a4aa8; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #06243a; flex: 0 0 auto; }
.fp-row.on { border-color: var(--cyan); background: rgba(69,217,255,.12); }
.fp-row.on .fp-chk { background: var(--cyan); border-color: var(--cyan); }
.fp-foot { display: flex; gap: 8px; } .fp-foot .btn.big { flex: 1.4; } .fp-foot .btn.ghost { flex: 1; font-size: 13px; padding: 10px 6px; }
.fp-hint { font-size: 11px; color: var(--muted); margin-top: 8px; text-align: center; }
.iv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.iv-head img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.iv-head small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.iv-head b { font-size: 20px; }
.gpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gpick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: rgba(10,4,40,.4); border: 1px solid rgba(124,104,230,.25); font-size: 12px; font-weight: 600; }
.gpick img { width: 56px; height: 56px; object-fit: contain; }
/* дурак: веер карт шире и левее */
.gcard.wide[data-g="durak"] .gc-icon { width: 54%; max-width: 236px; margin: -8px 10px -10px 0; }
.gcard.wide[data-g="durak"] { padding-right: 10px; }
/* КНБ: графит с серебром — под камень/бумагу/ножницы, нейтрально между рубином и изумрудом */
.gcard[data-g="rps"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(255,255,255,.22), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #9aa3b8 0%, #4a5168 32%, #262a3f 62%, #120c2e 100%);
  border-color: rgba(220,228,245,.32);
  box-shadow: 0 12px 30px rgba(74,81,104,.45), inset 0 1px 0 rgba(255,255,255,.3);
}
.gcard[data-g="rps"] .gc-sub { color: rgba(226,230,242,.85); }
.gcard[data-g="rps"] .gc-icon { filter: drop-shadow(0 12px 18px rgba(0,0,0,.6)) drop-shadow(0 0 16px rgba(170,140,255,.25)); }
/* КНБ: графит с фиолетовым отливом */
.gcard[data-g="rps"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(230,215,255,.24), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #a99ccb 0%, #5a4f86 32%, #332a5c 62%, #150d38 100%);
  border-color: rgba(214,200,245,.34);
  box-shadow: 0 12px 30px rgba(90,79,134,.48), inset 0 1px 0 rgba(255,255,255,.3);
}
.gcard[data-g="rps"] .gc-sub { color: rgba(232,224,250,.88); }

/* КНБ: тёмный графит под чёрно-бело-фиолетовую иконку */
.gcard[data-g="rps"] {
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(170,140,255,.22), transparent 70%),
    radial-gradient(130% 130% at 70% 0%, #6b6a84 0%, #3a394f 32%, #22213a 62%, #120c2e 100%);
  border-color: rgba(200,190,235,.3);
  box-shadow: 0 12px 30px rgba(58,57,79,.5), inset 0 1px 0 rgba(255,255,255,.25);
}
.gcard[data-g="rps"] .gc-icon { filter: drop-shadow(0 12px 18px rgba(0,0,0,.65)) drop-shadow(0 0 18px rgba(124,58,237,.35)); }

/* КНБ: тёмная основа с красным и зелёным свечением */
.gcard[data-g="rps"] {
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(255,64,96,.55), transparent 70%),
    radial-gradient(60% 55% at 92% 30%, rgba(40,220,140,.45), transparent 70%),
    radial-gradient(70% 60% at 50% 32%, rgba(140,120,255,.22), transparent 70%),
    linear-gradient(180deg, #2a2440 0%, #1c1830 55%, #120c2e 100%);
  border-color: rgba(220,210,255,.28);
  box-shadow: 0 12px 30px rgba(20,12,50,.55), inset 0 1px 0 rgba(255,255,255,.22);
}

/* дурак: веер чуть ниже по высоте */
.gcard.wide[data-g="durak"] .gc-icon { width: 50%; max-width: 214px; margin: -2px 10px -4px 0; }

/* КНБ: красный, зелёный и фиолетовый снизу */
.gcard[data-g="rps"] {
  background:
    radial-gradient(60% 55% at 12% 8%, rgba(255,64,96,.55), transparent 70%),
    radial-gradient(60% 55% at 92% 30%, rgba(40,220,140,.45), transparent 70%),
    radial-gradient(90% 55% at 50% 105%, rgba(150,80,255,.65), transparent 72%),
    radial-gradient(70% 60% at 50% 32%, rgba(140,120,255,.18), transparent 70%),
    linear-gradient(180deg, #2a2440 0%, #1c1830 55%, #160c3a 100%);
}

/* дурак: все 4 масти вразнобой на фоне, веер меньше и левее */
.gcard[data-g="durak"] { --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Ctext x='8' y='20' font-size='13' fill='white' fill-opacity='.10' transform='rotate(-16 8 20)'%3E%E2%99%A6%3C/text%3E%3Ctext x='48' y='14' font-size='15' fill='white' fill-opacity='.10' transform='rotate(-21 48 14)'%3E%E2%99%A3%3C/text%3E%3Ctext x='92' y='26' font-size='15' fill='white' fill-opacity='.10' transform='rotate(-2 92 26)'%3E%E2%99%A6%3C/text%3E%3Ctext x='26' y='52' font-size='11' fill='white' fill-opacity='.10' transform='rotate(7 26 52)'%3E%E2%99%A5%3C/text%3E%3Ctext x='70' y='48' font-size='13' fill='white' fill-opacity='.10' transform='rotate(-20 70 48)'%3E%E2%99%A0%3C/text%3E%3Ctext x='112' y='58' font-size='11' fill='white' fill-opacity='.10' transform='rotate(-21 112 58)'%3E%E2%99%A6%3C/text%3E%3Ctext x='10' y='88' font-size='13' fill='white' fill-opacity='.10' transform='rotate(10 10 88)'%3E%E2%99%A6%3C/text%3E%3Ctext x='54' y='84' font-size='11' fill='white' fill-opacity='.10' transform='rotate(11 54 84)'%3E%E2%99%A5%3C/text%3E%3Ctext x='96' y='96' font-size='15' fill='white' fill-opacity='.10' transform='rotate(15 96 96)'%3E%E2%99%A5%3C/text%3E%3Ctext x='34' y='118' font-size='15' fill='white' fill-opacity='.10' transform='rotate(11 34 118)'%3E%E2%99%A3%3C/text%3E%3Ctext x='78' y='122' font-size='11' fill='white' fill-opacity='.10' transform='rotate(-22 78 122)'%3E%E2%99%A5%3C/text%3E%3Ctext x='118' y='112' font-size='11' fill='white' fill-opacity='.10' transform='rotate(10 118 112)'%3E%E2%99%A5%3C/text%3E%3C/svg%3E"); }
.gcard.wide[data-g="durak"] .gc-icon { width: 44%; max-width: 188px; margin: 0 34px 0 0; }

/* ===== ставки фишками ===== */
.bchips { display: flex; flex-wrap: wrap; gap: 10px 8px; justify-content: center; padding: 4px 0 2px; }
.bchip { --c: #2f7bf6; --t: #fff; --s: #fff; width: 54px; height: 54px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.4), transparent 46%), var(--c);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), 0 6px 12px rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(255,255,255,.25); transition: transform .14s, box-shadow .14s; }
.bchip::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(var(--s) 0 13deg, transparent 13deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent 0 63%, #000 64% 100%); mask: radial-gradient(circle, transparent 0 63%, #000 64% 100%); opacity: .92; }
.bchip::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--s) 75%, transparent);
  background: radial-gradient(circle at 40% 32%, rgba(255,255,255,.25), transparent 62%), var(--c); box-shadow: inset 0 2px 5px rgba(0,0,0,.35); }
.bchip span { position: relative; z-index: 1; color: var(--t); font-weight: 800; font-size: 12.5px; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.bchip.on { transform: translateY(-6px) scale(1.08); box-shadow: 0 0 0 3px var(--cyan), 0 0 16px rgba(69,217,255,.55), 0 10px 18px rgba(0,0,0,.5); }
.bchip.dis { opacity: .35; filter: grayscale(.5); }
.bchip:active { transform: scale(.94); }
.bchip.pop { animation: chipPop .28s ease-out; }
@keyframes chipPop { 40% { transform: translateY(-8px) scale(1.12); } }
.rl-chips { margin: 2px 0 10px; }
.rl-chips .bchip { width: 46px; height: 46px; } .rl-chips .bchip::after { inset: 7px; } .rl-chips .bchip span { font-size: 11px; }
@media (max-width: 370px) { .bchip { width: 48px; height: 48px; } .bchip::after { inset: 8px; } .bchip span { font-size: 11px; } }
.rl-chips { flex-wrap: nowrap; gap: 5px; } .rl-chips .bchip { width: 42px; height: 42px; } .rl-chips .bchip::after { inset: 6px; } .rl-chips .bchip span { font-size: 10.5px; }

/* фишки — картинки Sunburst */
.bchip { background: var(--img) center/contain no-repeat !important; box-shadow: 0 6px 10px rgba(0,0,0,.4) !important; border-radius: 50%; }
.bchip::before, .bchip::after { display: none !important; }
.bchip span { color: var(--t); font-size: 13px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.bchip.on { box-shadow: 0 0 0 3px var(--cyan), 0 0 18px rgba(69,217,255,.6), 0 10px 18px rgba(0,0,0,.5) !important; }
.rl-chips .bchip span { font-size: 10.5px; }
/* ставки — все фишки в одну строку */
#c-bet, #fp-bet { flex-wrap: nowrap; gap: 4px; justify-content: space-between; padding: 6px 0 2px; }
#c-bet .bchip, #fp-bet .bchip { flex: 1 1 0; width: auto; height: auto; aspect-ratio: 1; max-width: 50px; min-width: 0; }
#c-bet .bchip span, #fp-bet .bchip span { font-size: clamp(9px, 2.7vw, 12px); }
#c-bet .bchip.on, #fp-bet .bchip.on { transform: translateY(-4px) scale(1.06); }

/* ===== Пополнение: своя сумма ===== */
.dep-card { background: linear-gradient(180deg, rgba(48,33,110,.75), rgba(32,22,74,.75)); border: 1px solid rgba(124,104,230,.28); border-radius: 16px; padding: 14px; }
.dep-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.dep-input { display: flex; align-items: center; gap: 6px; background: rgba(10,6,30,.55); border: 1.5px solid rgba(160,140,255,.35); border-radius: 12px; padding: 0 14px; height: 54px; transition: border-color .15s, box-shadow .15s; }
.dep-input:focus-within { border-color: #8f7bff; box-shadow: 0 0 0 3px rgba(143,123,255,.2); }
.dep-input span { font-size: 24px; font-weight: 800; color: #f5d27a; }
.dep-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-family: inherit; font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.dep-input input::placeholder { color: rgba(255,255,255,.25); }
.dep-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.dep-q { height: 34px; border-radius: 10px; border: 1px solid rgba(160,140,255,.3); background: rgba(124,104,230,.14); color: #e9e4ff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.dep-q.on { background: linear-gradient(180deg, #f7d77e, #d9a63b); color: #2a1a00; border-color: transparent; }
.dep-sum { min-height: 20px; margin: 10px 2px 8px; font-size: 13px; color: #d9d2ff; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dep-sum .cp-b { color: #6ef0ff; font-size: 12px; font-weight: 700; }
.dep-err { color: #ff7a8a; font-weight: 600; }
.dep-go { width: 100%; height: 46px; font-size: 15px; }
.dep-go:disabled { opacity: .45; filter: grayscale(.4); }

/* ===== Своя ставка в игре с друзьями ===== */
.fp-own { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.fp-own > span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fp-own-in { flex: 1; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(10,6,30,.55); border: 1.5px solid rgba(160,140,255,.3); transition: border-color .15s, box-shadow .15s; }
.fp-own-in:focus-within, .fp-own-in.on { border-color: #f2c96a; box-shadow: 0 0 0 3px rgba(242,201,106,.18); }
.fp-own-in b { color: #f5d27a; font-size: 17px; font-weight: 800; }
.fp-own-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-family: inherit; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fp-own-in input::placeholder { color: rgba(255,255,255,.22); }
.fp-own-err { min-height: 0; font-size: 12px; color: #ff7a8a; font-weight: 600; margin-top: 4px; }
.fp-own-err:empty { display: none; }
.fp-own-in { box-sizing: border-box; min-width: 0; }
.fp-own { width: 100%; box-sizing: border-box; padding-right: 2px; }

/* ===== Крупные карты: размер от ширины экрана ===== */
:root { --card-w: clamp(54px, 16.5vw, 84px); --card-h: calc(var(--card-w) * 1.42); --hand-w: clamp(62px, 20vw, 100px); --hand-h: calc(var(--hand-w) * 1.42); }
@media (max-height: 640px) { :root { --card-w: clamp(46px, 13vw, 64px); --hand-w: clamp(54px, 16vw, 76px); } }
.card { --w: var(--card-w); border-radius: calc(var(--w) * .12); }
.hand .card { --w: var(--hand-w); width: var(--hand-w); height: var(--hand-h); }
.hand { min-height: calc(var(--hand-h) + 16px); }
.card .tl, .card .br { font-size: calc(var(--w) * .26); }
.card .tl small, .card .br small { font-size: calc(var(--w) * .22); }
.card .tl { top: calc(var(--w) * .07); left: calc(var(--w) * .08); }
.card .br { bottom: calc(var(--w) * .07); right: calc(var(--w) * .08); }
.card .ctr { font-size: calc(var(--w) * .56); }
.face-large .card .ctr { font-size: calc(var(--w) * .48); }
.face-large .card .tl, .face-large .card .br { font-size: calc(var(--w) * .32); }
.face-minimal .card .tl, .face-minimal .card .br { font-size: calc(var(--w) * .4); }
.pair { width: calc(var(--card-w) * 1.32); height: calc(var(--card-h) * 1.22); }
.pair .d { top: calc(var(--card-h) * .2); left: calc(var(--card-w) * .32); }
.g-deck { width: calc(var(--card-w) + 20px); height: calc(var(--card-h) + 16px); }
.g-deck .trump { left: calc(var(--card-w) * .28); top: calc(var(--card-h) * .1); transform: rotate(90deg) translate(0, calc(var(--card-w) * -.18)); }
.g-deck .cnt, .g-deck .trumpsuit { width: var(--card-w); }
.g-discard { width: calc(var(--card-w) + 6px); height: calc(var(--card-h) + 16px); }
.g-mid { padding: 6px 6px; gap: 6px; }
.g-table { gap: 10px 12px; }
.g-chat-btn { bottom: calc(var(--hand-h) + 70px + var(--safe-bottom)); }
.g-emo { bottom: calc(var(--hand-h) + 70px + var(--safe-bottom)); }
.hand { min-width: 0; }

/* ===== Серия «до N побед» ===== */
.match-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 10px 0; padding: 5px 10px; border-radius: 12px; background: rgba(20,12,52,.7); border: 1px solid rgba(160,140,255,.28); font-size: 12px; color: #cfc6ff; flex: 0 0 auto; position: relative; z-index: 3; }
.match-bar .mb-sc { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.match-bar .mb-sc b { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 8px; border-radius: 9px; background: rgba(255,255,255,.06); color: #e9e4ff; font-weight: 600; white-space: nowrap; }
.match-bar .mb-sc b.me { background: rgba(110,240,255,.14); color: #fff; }
.match-bar .mb-sc b.left { opacity: .45; text-decoration: line-through; }
.match-bar .mb-sc em { font-style: normal; font-weight: 800; min-width: 20px; height: 20px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #f7d77e, #d9a63b); color: #2a1a00; font-size: 12px; }
.match-bar .mb-t, .match-bar .mb-r { white-space: nowrap; opacity: .85; }
.match-next { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 20; min-width: 230px; text-align: center; padding: 16px 20px; border-radius: 18px; background: rgba(22,12,58,.94); border: 1.5px solid rgba(160,140,255,.45); box-shadow: 0 12px 40px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 6px; animation: mnIn .25s ease-out; }
.match-next b { font-size: 20px; color: #fff; }
.match-next.win b { color: #7dffb0; } .match-next.lose b { color: #ff9aa8; }
.match-next small { font-size: 13px; color: #cfc6ff; }
@keyframes mnIn { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ===== Друзья: новый экран ===== */
.fr-invite { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; margin-bottom: 12px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(110,240,255,.22), transparent 55%), linear-gradient(135deg, #5b3fd6 0%, #3a2a9a 55%, #2a1c70 100%);
  border: 1px solid rgba(190,170,255,.35); box-shadow: 0 10px 28px rgba(40,20,120,.45), inset 0 1px 0 rgba(255,255,255,.15); }
.fri-art { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.fri-art img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.fri-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fri-text b { font-size: 16px; color: #fff; }
.fri-text small { font-size: 12px; color: #d7d0ff; line-height: 1.3; }
.fri-btns { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 auto; }
.fri-btns .btn.gold { padding: 9px 14px; font-size: 14px; }
.fri-btns .btn.small { padding: 5px; font-size: 14px; }
.fr-search { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 14px; background: rgba(10,6,30,.5); border: 1.5px solid rgba(160,140,255,.28); margin-bottom: 14px; transition: border-color .15s; }
.fr-search:focus-within { border-color: #8f7bff; }
.fr-search .frs-ic { font-size: 15px; opacity: .7; }
.fr-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-family: inherit; font-size: 14px; padding: 9px 0; }
.fr-search input::placeholder { color: rgba(255,255,255,.35); }
.fr-h { display: flex; align-items: center; gap: 8px; margin: 14px 2px 8px; font-size: 13px; font-weight: 700; color: #cfc6ff; text-transform: uppercase; letter-spacing: .04em; }
.fr-h em { font-style: normal; font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(160,140,255,.22); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.fr-h em:empty { display: none; }
.fr-h .fr-on { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: #7dffb0; font-size: 12px; }
.fr-clear { margin-left: auto; background: none; border: 0; color: #cfc6ff; font-size: 14px; cursor: pointer; }
.fr-list { display: flex; flex-direction: column; gap: 8px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(48,33,110,.7), rgba(32,22,74,.7)); border: 1px solid rgba(124,104,230,.25); }
.fr-row.is-on { border-color: rgba(125,255,176,.28); }
.fr-av { position: relative; flex: 0 0 auto; }
.fr-av .avatar { width: 46px; height: 46px; }
.fr-dot { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #6b6590; border: 2px solid #22175a; }
.fr-row.is-on .fr-dot { background: #3ef08f; box-shadow: 0 0 8px rgba(62,240,143,.7); }
.fr-row .pn { flex: 1; min-width: 0; }
.fr-row .pn b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-row .pn small { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; color: #a99fe0; }
.fr-row.is-on .fr-st { color: #7dffb0; }
.fr-act { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.fr-act .btn.small { padding: 7px 12px; font-size: 13px; border-radius: 11px; }
.fr-act .fr-ic, .fr-act .fr-x { padding: 7px 9px; }
.fr-tag { font-size: 11px; color: #cfc6ff; background: rgba(255,255,255,.08); padding: 5px 9px; border-radius: 9px; white-space: nowrap; }
.fr-empty { text-align: center; padding: 26px 16px; border-radius: 18px; border: 1.5px dashed rgba(160,140,255,.3); display: flex; flex-direction: column; align-items: center; gap: 6px; color: #cfc6ff; }
.fr-empty.small { padding: 14px; font-size: 13px; }
.fr-empty .fe-ic { font-size: 40px; }
.fr-empty b { color: #fff; font-size: 16px; }
.fr-empty small { font-size: 13px; max-width: 260px; }
.fr-empty .btn { margin-top: 8px; }

/* ===== Баннер «Пополнение через CryptoBot» ===== */
.cb-banner { position: relative; display: flex; align-items: center; min-height: 138px; padding: 14px 8px 14px 16px; margin-bottom: 10px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 50%, rgba(110,240,255,.35), transparent 60%), linear-gradient(120deg, #1f3fbf 0%, #3b2fc9 45%, #6a3bd6 100%);
  border: 1px solid rgba(160,210,255,.45); box-shadow: 0 12px 30px rgba(30,40,160,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.cb-banner::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); pointer-events: none; }
.cb-text { position: relative; flex: 1; min-width: 0; z-index: 1; }
.cb-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #cfe8ff; background: rgba(0,0,0,.22); padding: 4px 9px; border-radius: 20px; }
.cb-kicker b { color: #fff; }
.cb-logo { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.cb-title { font-family: var(--f-title, inherit); font-size: 22px; font-weight: 800; color: #fff; margin: 7px 0 3px; text-shadow: 0 2px 8px rgba(0,0,40,.4); }
.cb-sub { font-size: 12px; color: #dfeaff; }
.cb-coins { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.cb-coins span { font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 8px; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.cb-art { position: relative; z-index: 1; width: 118px; height: 118px; object-fit: contain; flex: 0 0 auto; margin-right: -6px; filter: drop-shadow(0 8px 16px rgba(0,0,60,.5)); animation: cbFloat 3.2s ease-in-out infinite; }
@keyframes cbFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
.cb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.cb-steps div { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 12px; font-size: 11px; line-height: 1.2; color: #d7d0ff; background: rgba(48,33,110,.55); border: 1px solid rgba(124,104,230,.25); }
.cb-steps i { font-style: normal; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #1a1050; background: linear-gradient(180deg, #8ff3ff, #4fb8ff); }
@media (max-width: 360px) { .cb-art { width: 96px; height: 96px; } .cb-title { font-size: 19px; } }

/* ===== Друзья: красочный баннер и счётчики ===== */
.fr-invite { display: none; }
.fr-banner { position: relative; display: flex; align-items: center; min-height: 150px; padding: 14px 6px 14px 16px; margin-bottom: 10px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 40%, rgba(255,140,220,.38), transparent 60%), linear-gradient(120deg, #7a2fd0 0%, #a23bc9 45%, #e0569f 100%);
  border: 1px solid rgba(255,190,240,.45); box-shadow: 0 12px 30px rgba(120,30,140,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.fr-banner::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); pointer-events: none; }
.frb-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.fr-banner .cb-kicker { color: #ffe3f6; }
.fr-banner .cb-sub { color: #ffe6f6; max-width: 210px; }
.frb-btns { display: flex; gap: 6px; margin-top: 11px; }
.frb-btns .btn.gold { padding: 9px 18px; font-size: 14px; }
.frb-copy { padding: 9px 12px; font-size: 13px; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; }
.frb-art { position: relative; z-index: 1; width: 128px; height: 128px; object-fit: contain; flex: 0 0 auto; margin-right: -8px; filter: drop-shadow(0 8px 16px rgba(60,0,60,.45)); animation: cbFloat 3.4s ease-in-out infinite; }
.fr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.fr-stats > div { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); }
.fr-stats b { font-size: 22px; font-weight: 800; color: #fff; line-height: 1.1; }
.fr-stats small { font-size: 11px; color: rgba(255,255,255,.75); }
.fr-stats .fs-a { background: linear-gradient(160deg, rgba(110,90,255,.55), rgba(60,40,160,.55)); }
.fr-stats .fs-b { background: linear-gradient(160deg, rgba(40,200,140,.5), rgba(20,110,90,.5)); }
.fr-stats .fs-c { background: linear-gradient(160deg, rgba(255,110,170,.5), rgba(150,40,110,.5)); }
.fr-h { color: #e9e4ff; }
.fr-h::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #6ef0ff, #b28cff); }
.fr-row { background: linear-gradient(120deg, rgba(70,48,160,.75), rgba(36,24,84,.8)); }
.fr-row.is-on { background: linear-gradient(120deg, rgba(40,120,120,.55), rgba(36,24,84,.85)); }
.fr-row .avatar { box-shadow: 0 0 0 2px rgba(178,140,255,.6); }
.fr-row.is-on .avatar { box-shadow: 0 0 0 2px rgba(62,240,143,.75), 0 0 12px rgba(62,240,143,.35); }
.fr-empty { background: linear-gradient(160deg, rgba(122,47,208,.25), rgba(224,86,159,.18)); border-color: rgba(255,190,240,.35); }

/* ===== Пополнение: низ ===== */
.dep-q { font-size: 14px; }
.dep-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.dep-info > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: linear-gradient(160deg, rgba(48,33,110,.7), rgba(28,20,70,.7)); border: 1px solid rgba(124,104,230,.25); }
.dep-info i { font-style: normal; font-size: 20px; line-height: 1; margin-bottom: 3px; }
.dep-info b { font-size: 12px; color: #fff; }
.dep-info small { font-size: 10px; color: #a99fe0; line-height: 1.25; }
.dep-limits { text-align: center; font-size: 11px; color: #8f86c4; margin: 10px 0 4px; }

/* ===== Всплывающие уведомления ===== */
#toasts { top: calc(10px + var(--safe-top)); padding: 0 12px; gap: 8px; z-index: 200; }
.toast { --ac: #8f7bff; --ac2: #b9a8ff; position: relative; overflow: hidden; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 12px; width: min(420px, 100%); max-width: none; padding: 11px 14px 13px 12px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(40,26,96,.97), rgba(22,14,58,.97)); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.08); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: ttIn .32s cubic-bezier(.2,1.3,.4,1); }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ac2), var(--ac)); }
.toast .tt-ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900;
  background: linear-gradient(160deg, var(--ac2), var(--ac)); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--ac) 45%, transparent); }
.toast .tt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.toast .tt-body b { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ac2); }
.toast .tt-body span { font-size: 14px; line-height: 1.3; color: #f2efff; word-wrap: break-word; }
.toast .tt-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--ac), var(--ac2)); opacity: .7; transform-origin: left; animation: ttBar linear forwards; }
.toast.t-err { --ac: #ff3d63; --ac2: #ff8aa0; }
.toast.t-ok { --ac: #19c37d; --ac2: #7dffb0; }
.toast.t-money { --ac: #e0a62a; --ac2: #ffd978; }
.toast.t-money .tt-ic { color: #3a2500; }
.toast.t-friend { --ac: #d04aa8; --ac2: #ff9ad8; }
.toast.t-gold { --ac: #c98a1a; --ac2: #ffe08a; }
.toast.t-info { --ac: #4f7cff; --ac2: #8fd8ff; }
.toast.err { border-color: rgba(255,255,255,.1); }
.toast.out { animation: ttOut .26s ease-in forwards; }
.toast.bump { animation: ttBump .3s ease; }
@keyframes ttIn { from { opacity: 0; transform: translateY(-24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ttOut { to { opacity: 0; transform: translateY(-20px) scale(.96); } }
@keyframes ttBump { 0%, 100% { transform: none; } 40% { transform: scale(1.03); } }
@keyframes ttBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.frb-art { width: 120px; height: 120px; margin-right: 12px; margin-left: -6px; }
.frb-text { z-index: 2; }
.fr-banner .cb-sub { max-width: 185px; }
.frb-copy { white-space: nowrap; }

/* ===== Рубашки, лицевые, рамки (новые рисунки) ===== */
.back-classic { --bk: url(img/backs/classic.webp?v=3); } .back-blue { --bk: url(img/backs/blue.webp?v=3); } .back-red { --bk: url(img/backs/red.webp?v=3); }
.back-gold { --bk: url(img/backs/gold.webp?v=3); } .back-emerald { --bk: url(img/backs/emerald.webp?v=3); } .back-night { --bk: url(img/backs/night.webp?v=3); }
.back-royal { --bk: url(img/backs/royal.webp?v=3); } .back-ornament { --bk: url(img/backs/ornament.webp?v=3); } .back-neon { --bk: url(img/backs/neon.webp?v=3); }

/* рамки аватара — картинка-кольцо поверх аватарки */
.avatar[class*="frame-"]:not(.frame-none) { border-color: transparent; box-shadow: none; }
.avatar[class*="frame-"]:not(.frame-none)::after { content: ''; position: absolute; left: 50%; top: 50%; width: calc(100% * var(--fr, 1.25) + 4px); height: calc(100% * var(--fr, 1.25) + 4px);
  transform: translate(-50%, -50%); background: var(--fimg) center/contain no-repeat; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.avatar.frame-silver { --fimg: url(img/frames/silver.webp?v=1); --fr: 1.209; }
.avatar.frame-gold { --fimg: url(img/frames/gold.webp?v=1); --fr: 1.258; }
.avatar.frame-fire { --fimg: url(img/frames/fire.webp?v=1); --fr: 1.231; }
.avatar.frame-ice { --fimg: url(img/frames/ice.webp?v=1); --fr: 1.317; }
.avatar.frame-neon { --fimg: url(img/frames/neon.webp?v=1); --fr: 1.354; }
.avatar.frame-royal { --fimg: url(img/frames/royal.webp?v=1); --fr: 1.3; }
.avatar.frame-fire::after { animation: frPulse 1.6s ease-in-out infinite; }
.avatar.frame-neon::after { animation: frGlow 2.2s ease-in-out infinite; }
@keyframes frPulse { 0%, 100% { filter: drop-shadow(0 0 3px rgba(255,120,0,.5)); } 50% { filter: drop-shadow(0 0 9px rgba(255,140,0,.9)); } }
@keyframes frGlow { 0%, 100% { filter: drop-shadow(0 0 3px rgba(110,240,255,.5)); } 50% { filter: drop-shadow(0 0 10px rgba(255,80,220,.8)); } }

/* лицевые стороны */
.face-neon .card:not(.back) { background: radial-gradient(120% 90% at 50% 0%, #1d1650, #0b0820); color: #6ef0ff; border: 1px solid #6ef0ff; box-shadow: 0 0 8px rgba(110,240,255,.45), 0 2px 5px rgba(0,0,0,.5); }
.face-neon .card:not(.back) .tl, .face-neon .card:not(.back) .br, .face-neon .card:not(.back) .ctr { text-shadow: 0 0 6px currentColor; }
.face-neon .card.red:not(.back) { color: #ff5ad8; border-color: #ff5ad8; box-shadow: 0 0 8px rgba(255,90,216,.45), 0 2px 5px rgba(0,0,0,.5); }
.face-gold .card:not(.back) { background: linear-gradient(160deg, #2a2110, #0d0a05 70%); color: #f5d27a; border: 1px solid #c9a24a; box-shadow: inset 0 0 0 2px rgba(201,162,74,.25), 0 2px 5px rgba(0,0,0,.5); }
.face-gold .card.red:not(.back) { color: #ff9b85; }
.face-gold .card:not(.back) .ctr { filter: drop-shadow(0 1px 0 #7a5a12); }
.shop-item .avatar.lg { margin: 10px auto 6px; }
/* лицевые: чтобы стили заметно отличались */
.card .ctr .rk { display: none; }
.face-large .card:not(.back) .tl, .face-large .card:not(.back) .br { font-size: calc(var(--w) * .42); }
.face-large .card:not(.back) .tl small, .face-large .card:not(.back) .br small { font-size: calc(var(--w) * .34); }
.face-large .card:not(.back) .ctr { font-size: calc(var(--w) * .5); opacity: .22; }
.face-large .card:not(.back) { background: linear-gradient(180deg, #ffffff, #eef2ff); }
.face-minimal .card:not(.back) { background: linear-gradient(160deg, #f6f3ff, #e6e0ff); border: 1px solid #c9bdf5; }
.face-minimal .card:not(.back) .tl, .face-minimal .card:not(.back) .br { display: none; }
.face-minimal .card:not(.back) .ctr { display: flex; flex-direction: column; line-height: .95; }
.face-minimal .card:not(.back) .ctr .rk { display: block; font-size: calc(var(--w) * .6); font-weight: 900; letter-spacing: -.04em; }
.face-minimal .card:not(.back) .ctr .st { font-size: calc(var(--w) * .34); }
.face-vintage .card:not(.back) { background: radial-gradient(circle at 50% 40%, #fbf3dc, #e8d6a8); border: 1px solid #a8864a; box-shadow: inset 0 0 0 3px #f7ecd0, inset 0 0 0 4px #b8955a, 0 2px 5px rgba(0,0,0,.45); color: #3a2a14; }
.face-vintage .card.red:not(.back) { color: #9a2a1a; }
