/* Controls surround existing cards; their artwork and aspect ratio are unchanged. */
.cl-cell { position: relative;display:flex;flex-direction:column;align-items:center; }
.social-heart { order:2;flex-shrink:0;margin:5px 0 0;width:40px;height:30px;border:1px solid #ffffff35;border-radius:12px;background:#151b2bea;color:#fff;font-size:16px; }
.social-heart.on { color:#ff668c;background:#401a32; }
.social-slots { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0; }
.social-slot { min-width:0;text-align:center; }
.social-slot>button { display:flex;align-items:center;justify-content:center;width:100%;min-height:132px;padding:0;border:1px solid #ffffff20;border-radius:14px;background:#151c2b;overflow:hidden; }
.social-slot .cc { --w:min(94px,25vw)!important;flex-shrink:0; }
.social-empty { font-size:36px;color:#7e899e; }
.social-order { display:flex;justify-content:center;gap:12px;margin-top:6px; }
.social-order button,.social-pages button { min-height:36px;min-width:36px;border-radius:10px;background:#283247;color:white;border:0; }
.social-note { font-size:13px;line-height:1.5;color:var(--muted,#a5afbf); }
.social-privacy { display:flex;align-items:center;gap:10px;min-height:44px; }
#social-profile { margin:16px 0;padding:16px;border:1px solid #ffffff20;border-radius:20px;background:#1b2436; }
.social-picker { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:52vh;overflow:auto;margin:12px 0; }
.social-picker>button { padding:0;border:0;background:none;display:flex;justify-content:center; }
.social-picker .cc { --w:min(84px,23vw)!important; }
.social-search { width:100%;box-sizing:border-box;padding:12px;border-radius:10px;background:#121b2a;color:white;border:1px solid #ffffff30; }
.social-pages { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.social-public { text-align:center; }
.social-avatar { font-size:48px; }
[data-profile] { cursor:pointer;color:inherit; }
button.bd-nick { background:none;border:0;text-align:left;font:inherit; }
/* Галерея рядом с боковым меню: три карточки и строка поиска всегда помещаются в ширину экрана */
.gl-tools { grid-template-columns: minmax(0,1fr) auto auto; }
.gl-fav { min-width: 46px; padding: 0 12px; font-size: 20px; line-height: 1; }
.gl-fav:not(.on) { color: #ff8fb0; }
.cl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); container-type: inline-size; }
.cl-cell { min-width: 0; }
.cl-cell .cc { --w: min(102px, calc((100cqw - 16px) / 3)) !important; }
/* сердечко — маленький значок на фото карточки, а не отдельная кнопка под ней */
.cl-cell .social-heart { position: absolute; z-index: 2; left: 4px; bottom: 33%; width: 26px; height: 26px; margin: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid #ffffff40; background: rgba(12,10,26,.72); color: rgba(255,255,255,.75); font-size: 13px; line-height: 1; }
.cl-cell .social-heart.on { color: #ff668c; background: rgba(64,26,50,.9); border-color: #ff668c80; }
.gl-cnt { margin: 0 0 8px; font-size: 13px; color: var(--muted, #a5afbf); }
.gl-pages { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 6px; font: 700 15px var(--font-body, sans-serif); }
.gl-pg { min-width: 52px; height: 42px; border: 0; border-radius: 14px; background: #283247; color: #fff; font-size: 18px; }
.gl-pg:disabled { opacity: .35; }
/* ---------- профиль: компоновка как в Brawl Stars, цвета панелей — от скина (.pc, .pc-st) ---------- */
.pc.pp { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: start; overflow: visible; margin-top: 30px; }
.pp-hero-host { min-width: 0; }
.pp-hero { position: relative; display: grid; justify-items: center; gap: 2px; width: 100%; margin-top: -40px; padding: 0; border: 0; background: none; color: inherit; text-align: center; cursor: pointer; }
.pp-hero .cc { transform: rotate(-4deg); filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)); transition: transform .2s; }
.pp-hero:active .cc { transform: rotate(-4deg) scale(.97); }
.pp-hero > small { margin-top: 6px; font: 800 10px var(--font-body); letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.pp-hero.empty { margin-top: 0; cursor: default; padding: 14px 6px; border-radius: 16px; background: rgba(0,0,0,.22); }
.pp-ph { font-size: 54px; line-height: 1; }
.pp-hero.empty > small { text-transform: none; letter-spacing: 0; }
.pp-side { display: grid; gap: 10px; min-width: 0; }
.pp-own .pc-who { grid-template-columns: auto minmax(0, 1fr) auto; }
.pp-own .pc-ava { width: 52px; height: 52px; font-size: 28px; }
.pp-own .pc-big { grid-template-columns: 1fr; gap: 8px; }
.pp-own .pc-meta { flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.pp-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pp-id .pc-ava { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; }
.pp-nm { display: grid; gap: 4px; min-width: 0; }
.pp-nm b { font: 900 19px/1.1 "Rubik", sans-serif; overflow-wrap: anywhere; }
.pp-nm .pc-rk { justify-self: start; }
.pp-big { grid-template-columns: 1fr !important; }
.pp-club { font: 800 13px var(--font-body); opacity: .9; }
.pp-stats { margin-top: 12px; }
.pp-h { margin: 18px 0 8px; }
.pp-ach { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-ach .pc-st { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.pp-ach .pc-st i { width: 18px; height: 18px; }
/* чужой профиль — слой на весь экран поверх игры; фон тот же, что у страницы (скин) */
.pp-layer { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; background: inherit; background-color: var(--night, #0d0b1e); animation: ppIn .2s ease-out; }
.pp-layer.out { opacity: 0; transition: opacity .2s; }
.pp-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: max(10px, calc(var(--safe-top, 0px) + 6px)) 12px 8px; }
.pp-top b { text-align: center; font: 900 18px "Rubik", sans-serif; }
.pp-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 520px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.pp-msg { display: grid; justify-items: center; gap: 8px; padding: 60px 16px; text-align: center; }
body.pp-open .tabbar { visibility: hidden; }
@keyframes ppIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pp-layer { animation: none; } .pp-hero .cc { transition: none; } }
@media (max-width: 359px) { .pc.pp { grid-template-columns: 108px minmax(0, 1fr); } .pp-hero .cc { transform: rotate(-4deg) scale(.84); transform-origin: top center; margin-bottom: -30px; } }
.pp-own { position: relative; }
.pp-own .pc-who { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
.pp-own .pc-nm b { display: block; font-size: 18px; line-height: 1.1; overflow-wrap: anywhere; padding-right: 30px; }
.pp-own .pc-nx { font-size: 11px; }
.pp-own .pf-edit { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; font-size: 15px; }
.pp-own #prof-badge.pc-ava { width: 52px !important; height: 52px !important; border-radius: 15px !important; font-size: 28px !important; }
.pp-own .pc-nm b { white-space: normal !important; text-overflow: clip !important; overflow: visible !important; }
#profile #social-profile.pc { display: block; }
.social-ver { display:block;margin-top:4px;font:700 10px/1.2 var(--font-body);color:#9aa4b8; } .social-ver.ok { color:#3ee66b; } .pp-vnote { margin-top:-6px;font-size:12px; }
