/* Mafia Cup — новогодняя тема */
:root {
  --bg: #070b1a; --bg2: #0e1428; --card: #131a33; --card2: #18213f; --line: #253058;
  --text: #f3f4fb; --muted: #8f97b8; --red: #d61f33; --red2: #ff4d61;
  --gold: #f2c14e; --gold2: #ffe9a8; --green: #3ccf7a; --pine: #1d6b52; --ice: #bfe9ff; --blue: #4ea8ff;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; color: var(--text); overscroll-behavior: none;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at 50% -10%, #1b2a5c 0%, #0b1230 45%, var(--bg) 80%) fixed; }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
#app { height: 100%; position: relative; z-index: 2; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 12px; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--gold); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ic { display: inline-block; vertical-align: -0.2em; flex: none; }
.coin-svg { vertical-align: -0.22em; flex: none; }
.vip-ic { color: var(--gold); margin-left: 3px; vertical-align: -1px; }

/* ---------- кнопки ---------- */
.btn { border: 1px solid var(--line); background: var(--card2); padding: 12px 18px; border-radius: 14px;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #ff5a6c, var(--red) 60%, #a3101f); border-color: #ff8a96aa; color: #fff;
  box-shadow: 0 6px 22px #d61f3355, inset 0 1px 0 #ffffff44; }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, #c48f22); color: #2a1d00; border-color: #fff3; box-shadow: inset 0 1px 0 #fff8; }
.btn.danger { background: #3a0f16; border-color: var(--red); color: var(--red2); }
.btn.ghost { background: transparent; }
.btn.sel { border-color: var(--gold); color: var(--gold); }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; box-shadow: none; }
.big-btn { padding: 16px; font-size: 17px; margin: 14px 0 6px; }
.link { background: none; border: 0; color: var(--gold); font-size: 13px; text-transform: none; letter-spacing: 0; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row > * { flex: 1; }

/* ---------- заставка / регистрация ---------- */
.splash { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.logo-svg { filter: drop-shadow(0 6px 24px #d61f3366); max-width: 100%; height: auto; }
.reg-logo { text-align: center; margin-bottom: 4px; }
.register { max-width: 440px; margin: 0 auto; padding: calc(28px + var(--safe-t)) 22px 30px; }
.lbl { display: block; color: var(--muted); font-size: 13px; margin: 16px 0 6px; }
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.av { aspect-ratio: 1; border-radius: 50%; background: none; border: 3px solid transparent; padding: 0; display: grid; place-items: center; transition: transform .15s; }
.av svg { width: 100%; height: 100%; }
.av.sel { border-color: var(--gold); transform: scale(1.06); box-shadow: 0 0 16px #f2c14e66; }

/* ---------- главное меню ---------- */
.main { height: 100%; display: flex; flex-direction: column; }
.topbar { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: calc(16px + var(--safe-t)) 14px 10px; background: linear-gradient(180deg, #0d1736ee, #0b1230cc); border-bottom: 1px solid var(--line); }
.garland { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 2px); display: flex; justify-content: space-around; pointer-events: none; }
.garland::before { content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 8px; border-top: 1.5px solid #2b3a2a; border-radius: 50%; }
.garland i { width: 7px; height: 10px; border-radius: 50% 50% 45% 45%; margin-top: 6px; animation: blink 1.4s var(--d) infinite alternate; }
.garland .b0 { background: #ff4d61; box-shadow: 0 0 8px #ff4d61; }
.garland .b1 { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.garland .b2 { background: #3ccf7a; box-shadow: 0 0 8px #3ccf7a; }
.garland .b3 { background: #4ea8ff; box-shadow: 0 0 8px #4ea8ff; }
@keyframes blink { from { opacity: .35; box-shadow: none; } }
.me-chip { display: flex; align-items: center; gap: 9px; font-weight: 700; background: none; border: 0; padding: 0; min-width: 0; }
.me-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
.me-txt > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.clan-tag { color: var(--ice); font-weight: 700; font-size: 11px; letter-spacing: .5px; }
.clan-tag.big { font-size: 14px; }
.av-sm { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; }
.av-sm svg, .av-big svg, .pod-av svg { display: block; }
.tb-right { display: flex; gap: 8px; align-items: center; }
.crown-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid #5a4719; background: linear-gradient(160deg, #2b2210, #15120a); color: var(--gold); display: grid; place-items: center; }
.crown-btn.on { box-shadow: 0 0 14px #f2c14e66; border-color: var(--gold); }
.coins { display: flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 6px 8px 6px 8px; }
.coins .plus { width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #2a1d00; display: grid; place-items: center; }
.content { flex: 1; overflow-y: auto; padding: 14px 14px 26px; -webkit-overflow-scrolling: touch; }
.tabbar { display: flex; border-top: 1px solid var(--line); background: #0a1028f2; padding-bottom: var(--safe-b); backdrop-filter: blur(10px); }
.tabbar button { flex: 1; background: none; border: 0; padding: 9px 0 7px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.tabbar button.on { color: var(--gold); }
.tabbar button.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin: 22px 0 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; margin-top: 18px; padding: 12px; border-radius: 14px; background: #0e1428cc; border: 1px solid var(--line); }
.empty { text-align: center; color: var(--muted); padding: 30px 16px; border: 1px dashed var(--line); border-radius: 16px; background: #0e142888; }
.empty .ic { color: var(--ice); margin-bottom: 6px; }
.vip-mini { font-size: 9px; font-weight: 800; letter-spacing: 1px; background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2a1d00; padding: 1px 5px; border-radius: 4px; vertical-align: 1px; }

/* новогодний баннер */
.ny-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 16px; border-radius: 20px;
  background: linear-gradient(120deg, #8a1020, #c21a30 45%, #1d6b52 120%); border: 1px solid #ff8a9655; box-shadow: 0 10px 30px #0006; }
.ny-hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: radial-gradient(circle at 10px 0, #fff 9px, transparent 10px) 0 0 / 24px 14px repeat-x; opacity: .95; }
.ny-hero::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(#ffffff33, transparent 70%); }
.ny-kicker { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold2); font-weight: 800; }
.ny-title { font-size: 22px; font-weight: 900; }
.ny-sub { font-size: 13px; color: #ffe3e6; }
.shop-hero { background: linear-gradient(120deg, #123a6a, #1f5ea0 50%, #8a1020 130%); border-color: #bfe9ff55; }
.gift-ic { color: var(--gold); filter: drop-shadow(0 0 10px #f2c14e88); }
.premium-strip { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(120deg, #2b2210, #171206); border: 1px solid #5a4719; color: var(--gold); }
.premium-strip span { color: #d7c58e; font-size: 12px; }
.premium-strip > div { flex: 1; }
.premium-strip .arrow { font-size: 26px; color: var(--gold); }

.tables { display: flex; flex-direction: column; gap: 10px; }
.table-card { display: flex; align-items: center; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 14px; gap: 12px; }
.table-card:active { transform: scale(.99); }
.table-card.busy { opacity: .55; }
.tc-icon { width: 40px; height: 40px; border-radius: 12px; background: #d61f3322; color: var(--red2); display: grid; place-items: center; }
.tc-main { flex: 1; min-width: 0; }
.tc-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-sub { font-size: 13px; color: var(--muted); }
.tc-side { text-align: right; }
.tc-count { font-weight: 900; font-size: 20px; }
.tc-count small { color: var(--muted); font-size: 13px; }
.tc-status { font-size: 12px; color: var(--green); }
.busy .tc-status { color: var(--muted); }

/* ---------- турниры ---------- */
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: linear-gradient(180deg, #ff5a6c, var(--red)); color: #fff; }
.seg.big { margin-bottom: 14px; }
.cup-card { position: relative; border-radius: 22px; padding: 16px; overflow: hidden;
  background: linear-gradient(170deg, #2b2210, #120d04 70%); border: 1px solid #7a5a1a; box-shadow: 0 10px 30px #0008, inset 0 1px 0 #ffe9a833; }
.cup-card.clan-cup { background: linear-gradient(170deg, #0f2a4a, #050b16 70%); border-color: #2a5a8a; }
.cup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cup-title { font-size: 20px; font-weight: 900; color: var(--gold2); }
.clan-cup .cup-title { color: var(--ice); }
.cup-timer { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; background: #0008; padding: 6px 10px; border-radius: 10px; white-space: nowrap; }
.cup-note { font-size: 12px; color: #cfc5a5; margin-top: 12px; }
.clan-cup .cup-note { color: #a9c3dc; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 16px; }
.pod { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pod-av { border-radius: 50%; overflow: hidden; }
.empty-av { width: 52px; height: 52px; display: grid; place-items: center; background: #ffffff11; color: var(--muted); font-weight: 900; }
.pod-name { font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-pts { font-size: 11px; color: var(--muted); }
.pod-base { width: 100%; border-radius: 12px 12px 4px 4px; display: flex; flex-direction: column; align-items: center; padding: 8px 2px; gap: 2px; font-size: 12px; font-weight: 700; }
.pod-base b { font-size: 22px; font-weight: 900; }
.pod1 .pod-base { height: 92px; background: linear-gradient(180deg, var(--gold2), var(--gold) 50%, #a77412); color: #2a1d00; }
.pod2 .pod-base { height: 70px; background: linear-gradient(180deg, #f4f6fb, #b9c1d4); color: #1d2333; }
.pod3 .pod-base { height: 56px; background: linear-gradient(180deg, #f0b98a, #b06a32); color: #2a1306; }
.prize-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.prize { border-radius: 14px; padding: 10px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; font-weight: 800; font-size: 13px; }
.prize b { font-size: 22px; }
.prize small { font-size: 10px; opacity: .8; font-weight: 600; }
.prize.p1 { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2a1d00; }
.prize.p2 { background: linear-gradient(180deg, #f4f6fb, #b9c1d4); color: #1d2333; }
.prize.p3 { background: linear-gradient(180deg, #f0b98a, #b06a32); color: #2a1306; }
.my-place { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 900; }
.medal.m1 { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #2a1d00; }
.medal.m2 { background: linear-gradient(180deg, #fff, #b9c1d4); color: #1d2333; }
.medal.m3 { background: linear-gradient(180deg, #f0b98a, #b06a32); color: #2a1306; }
.hist { font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--card); margin-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.hist span { color: var(--muted); }

.top-list { display: flex; flex-direction: column; gap: 6px; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(160deg, var(--card2), var(--card)); border-radius: 14px; border: 1px solid transparent; }
.top-row.mine { border-color: var(--gold); }
.top-row[data-cjoin] { cursor: pointer; }
.place { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }
.tr-name { flex: 1; min-width: 0; }
.tr-rating { font-weight: 900; font-size: 17px; color: var(--gold2); }

/* ---------- кланы ---------- */
.clan-hero { text-align: center; padding: 20px 16px; border-radius: 22px; margin-bottom: 14px;
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--cc, #4ea8ff) 30%, transparent), transparent 70%), linear-gradient(170deg, var(--card2), var(--bg2));
  border: 1px solid var(--line); }
.clan-name { font-size: 22px; font-weight: 900; margin-top: 6px; }
.clan-stats { margin-top: 14px; }
.clan-preview { text-align: center; }
.em-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.em, .col { background: none; border: 2px solid transparent; border-radius: 10px; padding: 2px; }
.em.sel, .col.sel { border-color: var(--gold); }
.em svg { width: 100%; height: auto; }
.col-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.col { aspect-ratio: 1; border-radius: 50%; }

/* ---------- магазин ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-item { background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.si-name { font-weight: 700; font-size: 14px; }
.frame-demo { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; }
.pack { cursor: pointer; }
.pack.hot { border-color: var(--gold); box-shadow: 0 0 20px #f2c14e33; }
.pack-stack { display: flex; margin-top: 4px; }
.pack-stack svg + svg { margin-left: -12px; }
.pack-coins { font-size: 20px; font-weight: 900; color: var(--gold2); }
.bonus { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; z-index: 1; }
.bonus.ny { background: var(--pine); left: 8px; right: auto; }
.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card-item { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.card-art { position: relative; transition: transform .2s; }
.card-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 14px #0009); }
.card-count { position: absolute; top: -6px; right: -6px; background: var(--gold); color: #2a1d00; font-weight: 900; font-size: 12px; padding: 2px 7px; border-radius: 10px; }
.card-item .ri-sub { min-height: 32px; }
.row-item { display: flex; align-items: center; gap: 12px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; position: relative; }
.ri-ic { width: 40px; text-align: center; }
.gold-ic { color: var(--gold); }
.ri-main { flex: 1; }
.ri-name { font-weight: 800; }
.ri-sub { font-size: 12px; color: var(--muted); }

/* Premium-карта */
.vip-card { position: relative; overflow: hidden; aspect-ratio: 1.6; max-width: 380px; margin: 4px auto 16px; border-radius: 22px; padding: 18px 20px;
  background: linear-gradient(135deg, #3a2a08 0%, #1a1204 45%, #4a3510 100%); border: 1.5px solid #c9a24a;
  box-shadow: 0 16px 40px #000a, inset 0 1px 0 #ffe9a866; display: flex; flex-direction: column; color: var(--gold2); }
.vip-card.active { box-shadow: 0 0 40px #f2c14e55, 0 16px 40px #000a; }
.vip-shine { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, #ffffff22 50%, transparent 60%); animation: shine 4s infinite; }
@keyframes shine { from { transform: translateX(-40%); } to { transform: translateX(40%); } }
.vip-top { display: flex; justify-content: space-between; align-items: center; }
.vip-brand { font-weight: 900; letter-spacing: 3px; font-size: 13px; }
.vip-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--gold2), #b8821c); box-shadow: inset 0 0 0 1px #7a5410; }
.vip-crown { margin-top: 8px; color: var(--gold); filter: drop-shadow(0 0 12px #f2c14e88); }
.vip-title { font-size: 30px; font-weight: 900; letter-spacing: 6px; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vip-holder { margin-top: auto; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 14px; }
.vip-until { font-size: 12px; color: #cdb87a; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.perk { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.perk-ic { color: var(--gold); display: grid; place-items: center; }
.vip-offer.best { border-color: var(--gold); }

/* ---------- профиль ---------- */
.profile-head { text-align: center; margin: 8px 0 18px; }
.av-big { width: 100px; height: 100px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; }
.pname { font-size: 20px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 11px; color: var(--muted); }
.roles-mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rm { cursor: pointer; }
.rm svg { width: 100%; height: auto; display: block; }
.role-modal { text-align: center; }
.role-modal svg { filter: drop-shadow(0 10px 20px #000a); }
#logout { margin-top: 20px; color: var(--muted); }

/* ---------- рамки ---------- */
[class*="frame-"] { position: relative; }
.frame-gold { box-shadow: 0 0 0 3px var(--gold), 0 0 14px #f2c14e88 !important; }
.frame-neon { box-shadow: 0 0 0 3px #29f0ff, 0 0 16px #29f0ff !important; }
.frame-fire { box-shadow: 0 0 0 3px #ff7a1a, 0 0 18px #ff3d00 !important; animation: fire 1.4s infinite alternate; }
.frame-ice { box-shadow: 0 0 0 3px #bfe9ff, 0 0 16px #7fd0ff !important; }
.frame-blood { box-shadow: 0 0 0 3px #b0001a, 0 0 22px #ff0022 !important; }
.frame-snow { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #bfe9ff55, 0 0 18px #ffffff88 !important; }
.frame-garland { box-shadow: 0 0 0 3px #1d6b52, 0 0 0 5px #ff4d61, 0 0 16px #f2c14e !important; animation: garl 1.2s infinite alternate; }
.frame-champion { box-shadow: 0 0 0 3px var(--gold2), 0 0 0 6px #b8821c, 0 0 26px var(--gold) !important; }
.frame-premium { box-shadow: 0 0 0 3px #1a1204, 0 0 0 5px var(--gold), 0 0 20px #f2c14e99 !important; }
@keyframes fire { to { box-shadow: 0 0 0 3px #ffb21a, 0 0 26px #ff5a00; } }
@keyframes garl { to { box-shadow: 0 0 0 3px #ff4d61, 0 0 0 5px #3ccf7a, 0 0 20px #4ea8ff; } }

/* ---------- модалка / тост ---------- */
#modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; }
.modal-bg { position: absolute; inset: 0; background: #000b; }
.modal-card { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border-top-left-radius: 24px; border-top-right-radius: 24px;
  padding: 22px 18px calc(22px + var(--safe-b)); border: 1px solid var(--line); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.m-title { font-size: 19px; font-weight: 900; margin-bottom: 6px; }
.notice { text-align: center; }
#toast { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translate(-50%, -100px); background: #1a2347; border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 14px; z-index: 60; transition: transform .25s; max-width: 90%; text-align: center; font-weight: 700; }
#toast.show { transform: translate(-50%, 0); }
#toast.bad { border-color: var(--red); color: var(--red2); }

/* ---------- игра ---------- */
.game { height: 100%; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: background .6s; }
.game.night { background: radial-gradient(circle at 50% 0, #121a44, #04050c 70%); }
.g-head { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.g-title { flex: 1; min-width: 0; }
.g-title > div:first-child { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-phase { font-size: 13px; color: var(--gold); font-weight: 700; }
.night .g-phase { color: var(--ice); }
.g-timer { min-width: 48px; height: 40px; padding: 0 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 19px; font-variant-numeric: tabular-nums; }
.g-timer:empty { display: none; }
.g-timer.low { color: var(--red2); border-color: var(--red); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.banner { margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 14px; border-left: 3px solid var(--gold); }
.night .banner { border-left-color: var(--ice); background: #101a3a; }

.grid { flex: 1; display: grid; gap: 6px; padding: 0 8px; min-height: 0; align-content: center; }
.grid.g1 { grid-template-columns: 1fr; }
.grid.g2 { grid-template-columns: 1fr 1fr; }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
.tile { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #1b2448, #0d1330);
  box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s, transform .15s, opacity .3s; max-height: 100%; }
.g1 .tile, .g2 .tile { aspect-ratio: 4/5; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; background: #000; }
.tile.me video { transform: scaleX(-1); }
.tile.cam-on video { opacity: 1; }
.t-av { position: absolute; inset: 0; display: grid; place-items: center; }
.t-av svg { width: 58%; height: auto; }
.cam-on .t-av { display: none; }
.t-num { position: absolute; top: 5px; left: 5px; background: #000a; font-size: 11px; font-weight: 800; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; }
.t-role { position: absolute; top: 5px; right: 5px; font-size: 10px; padding: 2px 6px; border-radius: 6px; font-weight: 800; background: #000b; }
.r-mafia, .r-don { color: var(--red2); } .t-role.r-mafia, .t-role.r-don { background: #5a0b16; color: #fff; }
.r-doctor { color: var(--green); } .t-role.r-doctor { background: #0a3a2e; color: #fff; }
.r-sheriff { color: var(--blue); } .t-role.r-sheriff { background: #0f2a4a; color: #fff; }
.r-civilian { color: var(--ice); }
.t-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 12px; font-weight: 700;
  background: linear-gradient(transparent, #000d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-name small { color: var(--muted); font-weight: 600; }
.t-name .host { color: var(--gold); }
.t-mic { position: absolute; right: 6px; bottom: 6px; color: var(--muted); }
.t-mic .live { color: var(--green); }
.t-mark { position: absolute; left: 4px; right: 4px; top: 30px; display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; }
.mk { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #000c; }
.mk.kill { background: #8a1020; } .mk.bad { background: var(--red); } .mk.good { background: var(--pine); } .mk.sher { background: #1f5ea0; }
.t-dead { display: none; position: absolute; inset: 0; place-items: center; font-size: 13px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; color: #fffa; background: #000b; }
.tile.dead { opacity: .6; }
.tile.dead .t-dead { display: grid; }
.tile.speaker { box-shadow: 0 0 0 3px var(--green), 0 0 18px #3ccf7a88 !important; transform: scale(1.02); z-index: 2; }
.tile.targetable { cursor: pointer; box-shadow: 0 0 0 2px #ffffff55; }
.tile.targetable:active { transform: scale(.96); }
.tile.selected { box-shadow: 0 0 0 3px var(--red2), 0 0 20px #d61f33 !important; }
.night .tile.selected { box-shadow: 0 0 0 3px var(--ice), 0 0 20px #4ea8ff !important; }
.lobby .tile { aspect-ratio: 1; }
/* снег на плитках */
.tile::after { content: ''; position: absolute; left: -2px; right: -2px; top: -2px; height: 9px; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 6px 0, #fff 6px, transparent 7px) 0 0 / 13px 9px repeat-x; opacity: .9; }

.actions { padding: 8px 12px 0; }
.actions:empty { display: none; }
.feed-wrap { margin: 8px 12px 0; border-radius: 14px; background: #0e1428e6; border: 1px solid var(--line); display: flex; flex-direction: column;
  max-height: 92px; transition: max-height .25s; overflow: hidden; }
.feed-wrap.open { max-height: 46vh; }
.feed { flex: 1; overflow-y: auto; padding: 8px 10px; font-size: 13px; }
.msg { padding: 2px 0; }
.msg.sys { color: var(--muted); font-style: italic; }
.msg.mafia { color: #ff8a96; }
.msg.dead { color: #9aa; }
.msg .ch { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; background: #ffffff14; padding: 1px 5px; border-radius: 4px; }
.chat-form { display: none; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.feed-wrap.open .chat-form { display: flex; }
.chat-form input { padding: 9px 12px; }
.g-bottom { display: flex; justify-content: center; gap: 14px; padding: 10px 0 calc(10px + var(--safe-b)); }
.ctl { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); position: relative; display: grid; place-items: center; }
.ctl.off { background: #3a0f16; border-color: var(--red); color: var(--red2); }
.ctl.live { border-color: var(--green); color: var(--green); box-shadow: 0 0 14px #3ccf7a66; }
.unread { position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }
.unlock { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); z-index: 30; }

#overlay { position: absolute; inset: 0; display: none; place-items: center; background: #000d; z-index: 20; padding: 20px; }
#overlay.show { display: grid; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.role-reveal { text-align: center; max-width: 340px; }
.rr-card { animation: flip .7s cubic-bezier(.2,.8,.3,1.2); filter: drop-shadow(0 16px 40px #000); }
.team-mafia .rr-card svg { filter: drop-shadow(0 0 30px #d61f3388); }
.team-city .rr-card svg { filter: drop-shadow(0 0 30px #4ea8ff66); }
@keyframes flip { from { transform: rotateY(90deg) scale(.7); opacity: 0; } }
.rc-sub { color: var(--muted); text-transform: uppercase; letter-spacing: 3px; font-size: 12px; margin-bottom: 10px; }
.rc-name { font-size: 26px; font-weight: 900; }
.rc-desc { color: #c9cde0; margin-top: 10px; }
.rc-mates { margin-top: 12px; color: #ff8a96; font-weight: 700; }
.end-card { width: 100%; max-width: 360px; text-align: center; padding: 20px; border-radius: 24px; background: linear-gradient(170deg, var(--card2), var(--bg2)); border: 1px solid var(--line); }
.end-card.win { border-color: var(--gold); box-shadow: 0 0 50px #f2c14e44; }
.end-cards svg { filter: drop-shadow(0 10px 20px #000); }
.end-roles { text-align: left; margin: 14px 0; font-size: 14px; display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
.er { display: flex; align-items: center; gap: 8px; }
.er span { flex: 1; }
.er b { font-size: 13px; }

@media (min-width: 700px) {
  .main, .game { max-width: 760px; margin: 0 auto; }
  .avatars { grid-template-columns: repeat(4, 1fr); max-width: 420px; }
}
@media (max-height: 640px) {
  .feed-wrap { max-height: 60px; }
  .ctl { width: 44px; height: 44px; }
}
.vip-offer .bonus { right: auto; left: 12px; top: -8px; }

/* ---------- Telegram / модерация ---------- */
.tg-login { text-align: center; margin: 10px 0 4px; min-height: 60px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 10px 0 -4px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.radio { display: flex; align-items: center; gap: 10px; padding: 10px 2px; font-size: 14px; }
.radio input { width: 20px; height: 20px; accent-color: var(--red); flex: none; }
.sheet { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head .av-sm { width: 46px; height: 46px; }
.invite-btn { margin-top: 8px; }
.tile.blocked::before { content: 'заблокирован'; position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; background: #000c; font-size: 12px; font-weight: 800; color: var(--muted); }
.report { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.rep-top { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.report .row { margin-top: 2px; }
.in-tg .topbar { padding-top: calc(10px + var(--safe-t)); }
.tg-card { margin-top: 26px; padding: 20px 16px; border-radius: 22px; background: linear-gradient(170deg, var(--card2), var(--bg2)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.btn.tg { background: linear-gradient(180deg, #3fb5f0, #229ed9); color: #fff; border-color: #ffffff33; padding: 15px; font-size: 16px; box-shadow: 0 6px 20px #229ed955; }
.spinner { width: 34px; height: 34px; margin: 6px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: #229ed9; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- админ и спонсоры ---------- */
.admin-name { color: #ff6b7d; font-weight: 800; }
.admin-badge { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; padding: 1px 6px 1px 4px; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .8px;
  color: #fff; background: linear-gradient(180deg, #ff4d61, #b3122a); box-shadow: 0 0 10px #ff4d6188; vertical-align: 1px; }
.donor-badge { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; vertical-align: -2px; cursor: pointer;
  font: 900 10px/1 Georgia, serif; color: #0d3b1e; background: radial-gradient(circle at 35% 30%, #c9ffd9, #3ccf7a 55%, #178a4a); box-shadow: 0 0 0 1px #0d5c30, 0 0 8px #3ccf7a88; text-shadow: none; }
.donor-badge.dp1 { color: #4a2c00; background: radial-gradient(circle at 35% 30%, #fff6cf, #f2c14e 55%, #a8740f); box-shadow: 0 0 0 1px #6b4508, 0 0 10px #f2c14ecc; }
.donor-badge.dp2 { color: #2a2f3a; background: radial-gradient(circle at 35% 30%, #ffffff, #c9d1dc 55%, #7d8796); box-shadow: 0 0 0 1px #4a5260, 0 0 8px #c9d1dc99; }
.donor-badge.dp3 { color: #3a1d08; background: radial-gradient(circle at 35% 30%, #ffd9b8, #d08a4a 55%, #8a4f1c); box-shadow: 0 0 0 1px #5a3210, 0 0 8px #d08a4a99; }
.donate-card { padding: 16px; border-radius: 20px; background: linear-gradient(150deg, #2a1d3a, #131a33); border: 1px solid #5a3a7a; display: flex; flex-direction: column; gap: 10px; }
.donate-top { display: flex; gap: 12px; align-items: center; }
.donate-top span { font-size: 12px; color: var(--muted); }
.donate-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.donate-presets .btn { padding: 8px 0; }

/* ---------- Новогоднее обновление ---------- */
.frame-santa { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #d61f33, 0 0 0 8px #fff, 0 0 22px #ff4d61 !important; }
.music-btn { color: var(--ice); border-color: #2a5a8a; background: linear-gradient(160deg, #10203a, #0a1428); }
.music-btn.on { box-shadow: 0 0 12px #4ea8ff66; border-color: var(--blue); }
.tabbar button { font-size: 10px; }
.ny-strip { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(120deg, #0f3a2a, #123a6a); border: 1px solid #2a8a66; }
.ny-strip span { color: #a9d8c4; font-size: 12px; }
.ny-strip > div { flex: 1; }
.ny-strip .arrow { font-size: 26px; color: var(--gold); }
.ny-big { margin-bottom: 4px; }
.wheel-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 12px 14px; border-radius: 22px;
  background: radial-gradient(circle at 50% 30%, #2b2210, #0e0a04 75%); border: 1px solid #7a5a1a; }
.wheel-pointer { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; z-index: 2;
  border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid #fff; filter: drop-shadow(0 3px 4px #000a); }
#wheel { width: 280px; height: 280px; }
.wheel-svg { display: block; filter: drop-shadow(0 10px 30px #0009); }
.wl { animation: blink 0.9s infinite alternate; } .wl1 { animation-delay: .45s; }
.task, .quest { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); }
.task.done { opacity: .6; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.task-main small { color: var(--muted); font-size: 12px; }
.lvl-bar { height: 7px; border-radius: 4px; background: #ffffff14; overflow: hidden; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3ccf7a, #bfe9ff); border-radius: 4px; }
.lvl-bar.gold i { background: linear-gradient(90deg, #f2c14e, #ff4d61); }
.quest { border-color: #d61f33; background: linear-gradient(150deg, #3a0a12, #131a33); }
.quest-frame { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; }
.win-text { font-size: 20px; font-weight: 900; color: var(--gold2); }
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gift-grid.small { grid-template-columns: repeat(4, 1fr); }
.gift-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 11px; text-align: center; }
.gift-cell b { font-size: 11px; line-height: 1.15; }
.gift-cell small { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.gift-cell:active { transform: scale(.95); }
.gift-shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.small-empty { padding: 14px; font-size: 13px; }
.mini-frame { width: 40px; height: 40px; border-radius: 50%; background: var(--bg2); }
.mini-frame.big { width: 84px; height: 84px; margin: 0 auto 6px; overflow: hidden; display: grid; place-items: center; }
.gift-in .sticker { animation: pop .6s cubic-bezier(.2,.9,.3,1.4); }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
.react-bar { position: absolute; left: 10px; right: 10px; bottom: calc(76px + var(--safe-b)); z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  padding: 8px; border-radius: 18px; background: #0e1428f2; border: 1px solid var(--line); box-shadow: 0 10px 30px #000a; }
.react-bar button { background: none; border: 0; padding: 4px; border-radius: 12px; }
.react-bar button:active { background: #ffffff14; transform: scale(.9); }
.fly-react { position: absolute; left: 50%; top: 55%; z-index: 5; pointer-events: none; animation: flyup 1.8s ease-out forwards; }
@keyframes flyup { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -10px) scale(1.2); opacity: 1; } 100% { transform: translate(-50%, -110px) scale(1); opacity: 0; } }
.msg .sticker { vertical-align: middle; }
.gift-msg { color: var(--gold2); }
.clan-level { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.clan-level .lvl-bar { width: 120px; }
.clan-level small { color: var(--muted); font-size: 11px; }
.clan-decor { display: inline-block; vertical-align: middle; filter: drop-shadow(0 0 6px #f2c14e88); }
.clan-bank { background: linear-gradient(150deg, #2b2210, #131a33); border-color: #7a5a1a; }
.clan-log { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 3px; max-height: 140px; overflow-y: auto; }

/* ---------- Ивент «Наряди ёлку» ---------- */
.tree-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; background: linear-gradient(150deg, #0f3a2a, #131a33); border: 1px solid #2a8a66; }
.tree-score { text-align: right; }
.tree-score b { display: block; font-size: 28px; font-weight: 900; color: var(--gold2); line-height: 1; }
.tree-score span { font-size: 12px; color: var(--muted); }
.tree-stage { position: relative; display: flex; justify-content: center; margin: 12px 0 4px; padding: 14px 0 6px; border-radius: 22px;
  background: radial-gradient(circle at 50% 40%, #1b2a5c, #0a1028 70%); border: 1px solid var(--line); }
.tree-svg { max-width: 100%; height: auto; filter: drop-shadow(0 10px 24px #000a); }
.tree-likes { position: absolute; top: 10px; right: 14px; color: #ff6b9a; font-weight: 800; }
.tslot { cursor: pointer; }
.tslot:hover circle { stroke: #fff; }
.paints { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.paint { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 2px solid transparent; border-radius: 14px; padding: 6px 2px; }
.paint i { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 -4px 8px #0006; }
.paint small { font-size: 10px; color: var(--muted); }
.paint.on { border-color: var(--gold); }
.paint.locked { opacity: .4; }
.dig-field { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #1b2a5c, #0e1428); }
.snow-pile { aspect-ratio: 1.3; border: 0; border-radius: 50% 50% 14px 14px; background: radial-gradient(ellipse at 50% 30%, #fff, #cfe6f5 60%, #9ec4dc); box-shadow: inset 0 -6px 10px #7aa2c055, 0 4px 10px #0006;
  display: grid; place-items: center; transition: transform .15s; }
.snow-pile:not(.open):not(:disabled):active { transform: scale(.94); }
.snow-pile:disabled { opacity: .55; }
.snow-pile.open { background: radial-gradient(ellipse at 50% 70%, #3a4a6a, #1b2a48); box-shadow: inset 0 4px 10px #0008; }
.snow-pile.open small { color: var(--muted); font-size: 11px; }
.snow-pile.digging { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px) rotate(-3deg); } 75% { transform: translateX(4px) rotate(3deg); } }
.paint-dot { width: 30px; height: 30px; border-radius: 50%; display: block; box-shadow: 0 0 12px currentColor; }
.gift-cell.r-rare { border-color: #4ea8ff; }
.gift-cell.r-legendary { border-color: var(--gold); box-shadow: 0 0 12px #f2c14e44; }
.prizes-tree { display: flex; flex-direction: column; gap: 6px; }
.pt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card); }
.pt span { font-size: 12px; color: var(--muted); }
.trees-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tree-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 18px; background: radial-gradient(circle at 50% 30%, #1b2a5c, #0e1428); border: 1px solid var(--line); cursor: pointer; }
.tree-card.mine { border-color: var(--gold); }
.tc-place { position: absolute; top: 8px; left: 8px; font-weight: 800; color: var(--muted); }
.tc-who { font-size: 13px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pts { font-size: 12px; color: var(--muted); }
.tc-pts b { color: var(--gold2); font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-cell { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.badge-cell small { font-size: 10px; color: var(--gold2); font-weight: 700; }

/* ---------- Установка приложения ---------- */
.install-strip { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(120deg, #1a2a5a, #2a1a4a); border: 1px solid #4a5aa8; }
.install-strip > div { flex: 1; }
.install-strip span:not(.btn) { color: #b9c3e8; font-size: 12px; }
.app-ico { width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 12px #0008; flex: none; }
.app-ico.big { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 10px; display: block; }
.ios-steps { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ios-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.ios-step > div:not(.ios-ic) { flex: 1; }
.ios-step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #2a1d00; font-weight: 900; display: grid; place-items: center; flex: none; }
.ios-ic { display: grid; place-items: center; color: var(--blue); }
.ios-ic .app-ico { width: 30px; height: 30px; border-radius: 8px; }
.warn { padding: 10px 12px; border-radius: 12px; background: #3a2a08; border: 1px solid #7a5a1a; color: var(--gold2); font-size: 13px; }
.ios-arrow { text-align: center; font-size: 30px; color: var(--blue); animation: bounce 1s infinite; margin-top: 6px; }
@keyframes bounce { 50% { transform: translateY(6px); } }

/* ---------- Админ-панель ---------- */
.admin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #ff6b7d; }
.admin-head b { flex: 1; color: var(--text); font-size: 17px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 12px 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-size: 20px; font-weight: 900; }
.stat span { font-size: 11px; color: var(--muted); }
.stat.green b { color: var(--green); } .stat.gold b { color: var(--gold2); } .stat.red b { color: var(--red2); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 150px; align-items: end; padding: 10px; border-radius: 16px; background: var(--card); }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; font-size: 11px; }
.bar i { width: 70%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #ff6b7d, #b3122a); }
.bar b { font-size: 11px; } .bar small { color: var(--muted); font-size: 10px; } .bar em { font-style: normal; color: var(--green); font-size: 10px; }
.log-row { padding: 8px 12px; border-radius: 12px; background: var(--card); margin-bottom: 6px; font-size: 13px; display: flex; flex-direction: column; }
.log-row small { color: var(--muted); font-size: 11px; }
.adm-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.adm-btns { display: flex; flex-direction: column; gap: 6px; }
.promo-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); margin-bottom: 6px; }
.promo-item.off { opacity: .5; }
.promo-code { font-family: monospace; font-size: 16px; letter-spacing: 1px; color: var(--gold2); cursor: pointer; }
.contact-card { padding: 14px; border-radius: 18px; background: linear-gradient(150deg, #0f2a4a, #131a33); border: 1px solid #2a5a8a; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.promo-row input { flex: 1.4; }

/* ---------- Команда проекта ---------- */
.admin-badge.rb-owner { background: linear-gradient(180deg, #ffe9a8, #c9922a); color: #2a1d00; box-shadow: 0 0 10px #f2c14e88; }
.admin-badge.rb-head { background: linear-gradient(180deg, #ff4d61, #b3122a); }
.admin-badge.rb-cur { background: linear-gradient(180deg, #c084fc, #7a2aa8); box-shadow: 0 0 10px #c084fc66; }
.admin-badge.rb-inv { background: linear-gradient(180deg, #4ea8ff, #1f5ea0); box-shadow: 0 0 10px #4ea8ff66; }
.admin-badge.rb-sup { background: linear-gradient(180deg, #3ccf7a, #1d6b52); box-shadow: 0 0 10px #3ccf7a66; }
.rb-owner-n { color: var(--gold2) !important; } .rb-head-n { color: #ff6b7d !important; } .rb-cur-n { color: #d6a8ff !important; }
.rb-inv-n { color: #8cc8ff !important; } .rb-sup-n { color: #7ee6a8 !important; }
.admin-head .admin-badge { font-size: 10px; }
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: 0 0 auto; padding: 10px 12px; white-space: nowrap; }
.av-sm { position: relative; overflow: visible; }
.av-sm svg { border-radius: 50%; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--card); }
textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text); padding: 12px 14px; border-radius: 12px; font: inherit; outline: none; resize: vertical; margin-top: 8px; }
textarea:focus { border-color: var(--gold); }
.ticket-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; }
.ticket-row.waiting { border-color: var(--gold); box-shadow: 0 0 12px #f2c14e33; }
.tk-st { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.st-open { background: #8a1020; color: #fff; } .st-prog { background: #1f5ea0; color: #fff; } .st-closed { background: #ffffff14; color: var(--muted); }
.tk-chat { display: flex; flex-direction: column; gap: 8px; max-height: 45vh; overflow-y: auto; margin: 12px 0; padding: 4px; }
.tk-msg { max-width: 85%; padding: 10px 12px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.tk-msg small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.tk-msg.user { align-self: flex-end; background: #1f3a6a; border-bottom-right-radius: 4px; }
.tk-msg.staff { align-self: flex-start; background: #3a1a2a; border: 1px solid #8a2a44; border-bottom-left-radius: 4px; }
.tk-answer { padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin: 10px 0; text-align: left; white-space: pre-wrap; }
.support-hero { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 18px; background: linear-gradient(150deg, #0f3a2a, #131a33); border: 1px solid #2a8a66; color: var(--green); }
.support-hero span { color: var(--muted); font-size: 13px; }
.support-hero b { color: var(--text); }
.warn-modal { color: #ff6b7d; }
.warn-modal p { color: var(--text); }
.eye-mod { font-size: 10px; font-weight: 800; color: #8cc8ff; background: #1f3a6a; padding: 2px 6px; border-radius: 6px; vertical-align: 2px; }
.lang-pick{display:flex;gap:8px;justify-content:center;margin:10px 0}
.lang-pick .btn{flex:1;padding:8px 6px;font-size:14px}
.auth-tabs{display:flex;gap:6px;margin-top:18px;padding:4px;border-radius:16px;background:var(--bg2);border:1px solid var(--line)}
.auth-tabs button{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 6px;border:0;border-radius:12px;background:none;color:var(--muted,#9aa3c7);font:600 14px inherit;cursor:pointer}
.auth-tabs button.on{background:linear-gradient(180deg,var(--card2),var(--card,#1a2140));color:#fff;box-shadow:0 2px 10px #0006}
.tg-card input[type=text],.tg-card input:not([type]),.tg-card input[type=password],.pw-form input{width:100%;box-sizing:border-box}
.tg-card .check{display:flex;gap:8px;align-items:flex-start;font-size:14px}
.auth-links{display:flex;justify-content:space-between;gap:10px}
.pw-form{display:flex;flex-direction:column;gap:8px;margin:8px 0 6px}
.pw-show{margin:10px 0;padding:12px;border-radius:12px;background:var(--bg2);border:1px solid var(--line);font-size:16px;user-select:all}
.tg-card .check input{width:auto;flex:none;margin-top:2px}
.tg-card p.small{font-size:12px;margin:0}
/* иконки «Золото» */
.ic-gold { filter: drop-shadow(0 1px 1.5px #0007); }
.tabbar button .ic-gold { filter: saturate(.2) brightness(.7); opacity: .75; transition: .2s; }
.tabbar button.on .ic-gold { filter: drop-shadow(0 0 6px #f2c14e99); opacity: 1; transform: translateY(-1px) scale(1.08); }
.btn.gold .ic-gold { filter: brightness(.3) saturate(1.4); }
.ctl:not(.live) .ic-gold.live, .t-mic .ic-gold { filter: drop-shadow(0 1px 1px #000a); }
.admin-badge.rb-gold { background: linear-gradient(180deg, #ffd36e, #b57a12); color: #2a1d00; }
.admin-badge.rb-grey { background: linear-gradient(180deg, #94a3b8, #475569); }
.rb-gold-n { color: #ffd36e !important; } .rb-grey-n { color: #cbd5e1 !important; }
.color-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.color-pick label { display: flex; align-items: center; gap: 4px; }
.color-pick input, .perm-list input { width: auto; }
.color-pick .admin-badge { margin: 0; font-size: 11px; padding: 3px 8px; }
.perm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-bottom: 14px; font-size: 13px; }
.perm-list .check { display: flex; gap: 6px; align-items: center; }
#modal select { width: 100%; margin-bottom: 10px; }
.adm-btns:has([data-rup]) { display: grid; grid-template-columns: auto auto; gap: 6px; }
.adm-btns:has([data-rup]) [data-setrole] { grid-column: 1 / -1; }
.adm-btns [data-rup], .adm-btns [data-rdown] { min-width: 40px; padding-left: 0; padding-right: 0; }
.av-upload { border: 2px dashed #f2c14e66 !important; background: #f2c14e10; color: var(--gold); display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; font-size: 11px; font-weight: 700; }
.av-upload svg.ic { width: 38% !important; height: auto !important; max-width: 40px; }
.av-upload span { line-height: 1.1; text-align: center; padding: 0 4px; }
.avatars + input + .av-note, .av-note { margin: -8px 0 18px; line-height: 1.35; }
.small-note { font-size: 12px; }
.opt-check { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; font-size: 14px; text-align: left; }
.opt-check input { width: auto; flex: none; margin-top: 3px; }
.tc-host { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px #f2c14e88, 0 4px 10px #0008; }
.tc-host svg { width: 46px; height: 46px; display: block; }
.tc-lock { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #0a1028; display: grid; place-items: center; border: 1px solid #f2c14e66; }
/* ---------- Друзья, личные сообщения, звонки ---------- */
.friends-btn { position: relative; }
.fb-badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e0283e; color: #fff; font: 800 10px/17px Inter, sans-serif; font-style: normal; box-shadow: 0 0 8px #e0283e99; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #ffffff08; border: 1px solid var(--line); margin-bottom: 8px; }
.fr-row .av-sm { position: relative; flex: none; }
.fr-row .tr-name { flex: 1; min-width: 0; }
.fr-btns { display: flex; gap: 6px; flex: none; }
.fr-btns .btn.small { position: relative; min-width: 38px; padding: 7px 9px; }
.fr-unread { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 8px; background: #e0283e; font: 800 10px/16px Inter, sans-serif; font-style: normal; }
.fs { font-size: 12px; } .fs.on { color: #3ccf7a; } .fs.off { color: var(--muted); } .fs.game { color: var(--gold); } .fs.busy { color: #4ea8ff; }
.online-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #3ccf7a; border: 2px solid #0a1028; }
.dm-wrap { display: flex; flex-direction: column; height: calc(100vh - 170px); height: calc(100dvh - 170px); min-height: 360px; }
.dm-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dm-head .tr-name { flex: 1; min-width: 0; }
.dm-list { flex: 1; overflow-y: auto; padding: 12px 2px; display: flex; flex-direction: column; gap: 6px; }
.dm-msg { max-width: 78%; align-self: flex-start; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: #ffffff12; font-size: 15px; line-height: 1.35; word-wrap: break-word; white-space: pre-wrap; }
.dm-msg.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: linear-gradient(180deg, #b3122a, #7a0c1e); }
.dm-msg small { display: block; text-align: right; font-size: 10px; opacity: .6; margin-top: 2px; }
.dm-day { align-self: center; font-size: 11px; color: var(--muted); padding: 4px 10px; border-radius: 10px; background: #ffffff0a; margin: 6px 0; }
.dm-form { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.dm-form input { flex: 1; }
.inv-friends { max-height: 240px; overflow-y: auto; margin: 6px 0 10px; }
/* настройки устройств */
.ms-meter { height: 10px; border-radius: 6px; background: #ffffff12; overflow: hidden; margin: 8px 0 4px; }
.ms-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3ccf7a, #f2c14e, #e0283e); transition: width .06s linear; }
.ms-hint { font-size: 12px; margin-bottom: 8px; }
.ms-none { padding: 10px; border-radius: 10px; background: #e0283e18; color: #ff8a98; font-size: 13px; margin-bottom: 8px; }
.ms-video { position: relative; aspect-ratio: 4/3; max-height: 200px; margin: 6px auto 12px; border-radius: 14px; overflow: hidden; background: #000; display: grid; place-items: center; }
.ms-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.ms-video span { position: absolute; font-size: 13px; }
#modal select { margin-bottom: 4px; }
/* звонок */
#callLayer { display: none; }
#callLayer.show { display: block; position: fixed; inset: 0; z-index: 3000; background: radial-gradient(circle at 50% 30%, #2a0a14, #05060c 70%); }
.call-box { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#callRemote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
#callLayer.video #callRemote { display: block; }
#callLayer.video .call-peer { position: absolute; top: calc(18px + var(--safe-t, 0px)); left: 16px; flex-direction: row; gap: 10px; text-shadow: 0 1px 4px #000; }
#callLayer.video .call-av { display: none; }
.call-peer { display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 1; }
.call-av { width: 110px; height: 110px; border-radius: 50%; box-shadow: 0 0 0 3px #f2c14e88, 0 0 40px #e0283e55; animation: callPulse 1.6s infinite; }
.call-av svg { width: 100%; height: 100%; }
@keyframes callPulse { 50% { box-shadow: 0 0 0 10px #f2c14e22, 0 0 60px #e0283e88; } }
.call-name { font-size: 24px; font-weight: 800; }
.call-status { color: var(--muted); font-size: 15px; }
#callLocal { position: absolute; right: 14px; top: calc(14px + var(--safe-t, 0px)); width: 110px; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; border: 2px solid #f2c14e88; transform: scaleX(-1); z-index: 2; background: #000; }
.call-ctl { position: absolute; bottom: calc(34px + var(--safe-b, 0px)); left: 0; right: 0; display: flex; justify-content: center; gap: 18px; z-index: 2; }
.cbtn { width: 62px; height: 62px; border-radius: 50%; border: 0; background: #ffffff22; color: #fff; font-size: 24px; display: grid; place-items: center; backdrop-filter: blur(6px); cursor: pointer; }
.cbtn.off { background: #ffffffdd; }
.cbtn.accept { background: linear-gradient(180deg, #3ccf7a, #178a4a); animation: callPulse 1.2s infinite; }
.cbtn.decline { background: linear-gradient(180deg, #ff4d61, #b3122a); }
.diag-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; font-size: 14px; text-align: left; word-break: break-word; }
.tile.no-link::after { content: 'нет связи — переподключаем…'; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 3px 8px; border-radius: 8px; background: #b3122acc; font-size: 10px; font-weight: 700; white-space: nowrap; z-index: 5; }
html[lang=en] .tile.no-link::after { content: 'no connection — reconnecting…'; }
html[lang=hy] .tile.no-link::after { content: 'կապ չկա՝ վերամիանում ենք…'; }
.tile.me .t-mic { box-shadow: 0 0 0 calc(var(--lvl, 0) * 6px) #3ccf7a88; border-radius: 50%; transition: box-shadow .1s; }
.tile.me::before { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--lvl, 0) * 100%); background: #3ccf7a; z-index: 6; transition: width .1s; }
.tile.mic-dead::after { content: '🎤 микрофон не работает — нажми сюда'; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 4px 9px; border-radius: 8px; background: #b3122add; font-size: 10px; font-weight: 700; white-space: nowrap; z-index: 6; cursor: pointer; }
html[lang=en] .tile.mic-dead::after { content: '🎤 microphone not working — tap here'; }
html[lang=hy] .tile.mic-dead::after { content: '🎤 խոսափողը չի աշխատում՝ սեղմիր այստեղ'; }
.legal-links { margin: 18px 0 6px; text-align: center; font-size: 12px; color: var(--muted); }
.legal-links a { color: var(--muted); }
.danger-link { color: #ff7a8a !important; font-size: 12px; }
/* настройки стола, голоса, журнал */
.lobby-sum { font-size: 13px; text-align: center; padding: 8px 10px; border-radius: 12px; background: #ffffff08; border: 1px solid var(--line); margin: 6px 0; }
.ts-custom { padding: 10px; border-radius: 12px; background: #ffffff08; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.ts-custom.hidden { display: none; }
.ts-custom .row { align-items: center; justify-content: space-between; }
.stepper { display: flex; align-items: center; gap: 10px; } .stepper b { min-width: 18px; text-align: center; font-size: 18px; }
.ts-custom .check input, .opt-check input { width: auto; }
.t-votes { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; z-index: 4; }
.vt-out { padding: 2px 7px; border-radius: 8px; background: #000a; font-size: 11px; font-weight: 800; color: #ffd36e; }
.vt-in { min-width: 22px; height: 22px; border-radius: 11px; background: #e0283e; font-size: 12px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 0 10px #e0283e; }
.journal { max-height: 60vh; overflow-y: auto; text-align: left; margin-bottom: 10px; }
.jr-day { margin-bottom: 12px; } .jr-h { font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.jr-block { padding: 8px 10px; border-radius: 10px; background: #ffffff08; margin-bottom: 6px; font-size: 13px; }
.jr-t { font-weight: 700; margin-bottom: 4px; } .jr-v { color: #cfd5ee; } .jr-r { margin-top: 4px; color: #ff9aa8; }
#chatIn.dead-chat { border-color: #9aa3c7; background: #20243a; }
/* ---------- Авторские эффекты ника ---------- */
.nfx { position: relative; display: inline-block; font-weight: 800; -webkit-background-clip: text; background-clip: text; }
.nfx .ic, .nfx svg { -webkit-text-fill-color: initial; }
/* Пламя */
.nfx-fire { color: #ffb02e; background-image: linear-gradient(0deg, #ff2d0a 0%, #ff7a1a 35%, #ffd36e 70%, #fff6cf 100%); background-size: 100% 220%; -webkit-text-fill-color: transparent;
  animation: fxFire 1.1s ease-in-out infinite alternate, fxFlick 0.18s steps(2) infinite; filter: drop-shadow(0 0 4px #ff5a1fcc) drop-shadow(0 -2px 6px #ff2d0a88); }
.nfx-fire::after { content: ''; position: absolute; left: 12%; bottom: 55%; width: 2px; height: 2px; border-radius: 50%; background: #ffd36e; pointer-events: none;
  box-shadow: 8px -2px 0 0 #ff9a3c, 17px 3px 0 .5px #ffd36e, 27px -1px 0 0 #ff7a1a, 36px 2px 0 .5px #ffe9a8, 46px -3px 0 0 #ff9a3c, 55px 1px 0 0 #ffd36e;
  animation: fxSparks 1.3s ease-out infinite; }
@keyframes fxFire { from { background-position: 0 0; } to { background-position: 0 100%; } }
@keyframes fxFlick { 50% { filter: drop-shadow(0 0 6px #ff7a1aee) drop-shadow(0 -3px 8px #ff2d0aaa); } }
@keyframes fxSparks { 0% { transform: translateY(4px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-16px); opacity: 0; } }
/* Бриллиант */
.nfx-diamond { background-image: linear-gradient(110deg, #9fd8ff 0%, #e8f7ff 30%, #ffffff 45%, #b6e3ff 55%, #7cc4ff 80%, #e8f7ff 100%); background-size: 250% 100%; -webkit-text-fill-color: transparent;
  animation: fxShine 2.4s linear infinite; filter: drop-shadow(0 0 3px #bfe9ffcc) drop-shadow(0 0 8px #7cc4ff66); }
.nfx-diamond::after { content: '✦'; position: absolute; right: -9px; top: -7px; font-size: 9px; color: #fff; -webkit-text-fill-color: #fff; animation: fxTwinkle 1.6s ease-in-out infinite; }
@keyframes fxShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes fxTwinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(90deg); } }
/* Молния */
.nfx-storm { color: #d9f2ff; -webkit-text-fill-color: #d9f2ff; text-shadow: 0 0 4px #4ea8ff, 0 0 10px #4ea8ff, 0 0 18px #1f6fd1; animation: fxStorm 3.2s infinite; }
@keyframes fxStorm { 0%, 88%, 100% { text-shadow: 0 0 4px #4ea8ff, 0 0 10px #4ea8ff, 0 0 18px #1f6fd1; color: #d9f2ff; }
  90% { text-shadow: 0 0 2px #fff, 0 0 20px #bfe9ff, 0 0 40px #4ea8ff; -webkit-text-fill-color: #fff; } 91% { text-shadow: 0 0 2px #4ea8ff; } 93% { text-shadow: 0 0 2px #fff, 0 0 26px #fff, 0 0 46px #4ea8ff; -webkit-text-fill-color: #fff; } }
/* Неон */
.nfx-neon { background-image: linear-gradient(90deg, #ff4d9d, #c084fc, #4ea8ff, #3ccf7a, #ffd36e, #ff4d9d); background-size: 300% 100%; -webkit-text-fill-color: transparent;
  animation: fxNeon 4s linear infinite; filter: drop-shadow(0 0 4px #c084fcaa) drop-shadow(0 0 9px #ff4d9d66); }
@keyframes fxNeon { from { background-position: 0 0; } to { background-position: 300% 0; } }
/* Лёд */
.nfx-frost { background-image: linear-gradient(180deg, #ffffff 0%, #d4f1ff 45%, #7cc4ff 100%); -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #7cc4ffaa); }
.nfx-frost::before, .nfx-frost::after { content: '❄'; position: absolute; font-size: 8px; color: #e8f7ff; -webkit-text-fill-color: #e8f7ff; top: -6px; animation: fxSnow 3s linear infinite; opacity: 0; }
.nfx-frost::before { left: 15%; } .nfx-frost::after { left: 70%; animation-delay: 1.5s; }
@keyframes fxSnow { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(22px) rotate(180deg); opacity: 0; } }
/* Кровь */
.nfx-blood { background-image: linear-gradient(180deg, #ff4d61 0%, #b3122a 55%, #5a0612 100%); -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 1px #000) drop-shadow(0 0 5px #b3122a99); }
.nfx-blood::before, .nfx-blood::after { content: ''; position: absolute; top: 72%; width: 3px; height: 5px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: #b3122a; -webkit-text-fill-color: initial; animation: fxDrip 2.6s ease-in infinite; opacity: 0; }
.nfx-blood::before { left: 22%; } .nfx-blood::after { left: 64%; animation-delay: 1.3s; }
@keyframes fxDrip { 0% { transform: translateY(0) scaleY(.4); opacity: 0; } 20% { opacity: 1; transform: translateY(0) scaleY(1); } 80% { opacity: 1; } 100% { transform: translateY(14px) scaleY(1.3); opacity: 0; } }
/* витрина */
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.fx-card { padding: 12px; border-radius: 16px; background: linear-gradient(170deg, var(--card2), var(--bg2)); border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; gap: 6px; }
.fx-card.on { border-color: var(--gold); box-shadow: 0 0 14px #f2c14e44; }
.fx-prev { min-height: 44px; display: grid; place-items: center; font-size: 19px; padding: 8px 0 4px; overflow: visible; }
.fx-name { font-weight: 800; }
.fx-btns { display: flex; flex-direction: column; gap: 6px; }
.fx-btns .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.fx-gift { font-size: 12px; }
.fx-friends { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; text-align: left; }
.fx-friends .radio { display: flex; align-items: center; gap: 8px; } .fx-friends input { width: auto; }
/* энергия */
.energy-chip { display: inline-flex; align-items: center; gap: 2px; padding: 5px 9px; border-radius: 12px; background: #1d2a4a; border: 1px solid #4ea8ff55; color: #9fd0ff; font-size: 13px; }
.energy-chip b { color: #fff; font-size: 13px; }
.energy-chip.empty { border-color: #e0283e; color: #ff7a8a; animation: enPulse 1.2s infinite; }
.energy-chip.inf { border-color: #f2c14e88; color: var(--gold); }
@keyframes enPulse { 50% { box-shadow: 0 0 10px #e0283e88; } }
.en-bar { display: flex; justify-content: center; gap: 6px; margin: 8px 0; font-size: 22px; }
.en-bar i { font-style: normal; filter: grayscale(1) brightness(.5); transition: .2s; }
.en-bar i.on { filter: drop-shadow(0 0 6px #4ea8ffcc); }
.en-bar.inf { font-size: 14px; color: var(--gold); }
.en-big { font-size: 46px; filter: drop-shadow(0 0 14px #4ea8ff); }
.energy-card { padding: 12px; border-radius: 16px; background: linear-gradient(170deg, var(--card2), var(--bg2)); border: 1px solid var(--line); text-align: center; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
/* верхняя панель: ничего не налезает друг на друга */
.topbar .me-chip { flex: 1 1 auto; overflow: hidden; }
.tb-right { flex: 0 0 auto; }
@media (max-width: 480px) {
  .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .tb-right { gap: 5px; }
  .crown-btn { width: 34px; height: 34px; border-radius: 10px; }
  .crown-btn svg { width: 16px; height: 16px; }
  .energy-chip { padding: 5px 7px; font-size: 12px; }
  .coins { padding: 5px 6px; gap: 4px; }
  .coins b { font-size: 14px; }
  .me-txt { display: none; }
  .fb-badge { top: -5px; right: -5px; }
}
@media (max-width: 360px) {
  .music-btn { display: none; }
}

/* ================= «Дурак» ================= */
.game-switch { margin-bottom: 12px; }
.koz-strip { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #1d2a1d, #13241c); border: 1px solid #2f6b4c; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.koz-strip span { color: var(--muted); font-size: 13px; }
.tc-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.backs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.back-opt { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.back-opt.on { border-color: var(--gold); box-shadow: 0 0 12px #f2c14e44; }
.back-opt small { color: var(--muted); }
.back-opt .dcard { width: 38px; height: 54px; }
.opt-check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; font-size: 14px; }
.opt-check input { width: auto; margin-top: 3px; }

.dcard { --w: 58px; width: var(--w); height: calc(var(--w) * 1.42); border-radius: 7px; background: linear-gradient(160deg, #fff, #f1ede2); color: #16181f;
  position: relative; box-shadow: 0 3px 10px #0008, inset 0 0 0 1px #0002; flex: none; user-select: none; font-weight: 800; }
.dcard.red { color: #c8102e; }
.dcard .dc-tl, .dcard .dc-br { position: absolute; font-size: calc(var(--w) * .24); line-height: .95; display: flex; flex-direction: column; align-items: center; }
.dcard .dc-tl { left: 4px; top: 4px; } .dcard .dc-br { right: 4px; bottom: 4px; transform: rotate(180deg); }
.dcard i { font-style: normal; font-size: .9em; }
.dcard .dc-mid { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * .55); }
.dcard.back { background: repeating-linear-gradient(45deg, #8b1426 0 5px, #6d0f1e 5px 10px); border: 3px solid #f3efe4; }
.dcard.back-red { background: repeating-linear-gradient(45deg, #b0122b 0 4px, #e0314c 4px 8px); }
.dcard.back-gold { background: radial-gradient(circle at 50% 50%, #ffe9a8 0 12%, transparent 13%) 0 0/14px 14px, linear-gradient(135deg, #b98a1d, #f2c14e, #9a6d0c); border-color: #fff4cf; }
.dcard.back-noir { background: repeating-linear-gradient(-45deg, #111 0 3px, #262626 3px 6px); border-color: #f2c14e; }
.dcard.back-classic { background: repeating-linear-gradient(45deg, #1f3c88 0 5px, #16306e 5px 10px); }
.dcard.mini { --w: 16px; border-width: 1px; border-radius: 3px; margin-left: -9px; box-shadow: 0 1px 3px #0008; }

.durak { height: 100%; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 8px) 10px calc(var(--safe-b) + 8px); position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #1b5a3d 0%, #0f3a28 55%, #08180f 100%); }
.d-head { display: flex; align-items: center; gap: 10px; }
.d-title { flex: 1; min-width: 0; } .d-title > div { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-title small { color: #b8d6c4; font-size: 12px; }
.d-timer { min-width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #0006; border: 2px solid #ffffff33; }
.d-timer:empty { visibility: hidden; }
.d-timer.warn { border-color: var(--red2); color: var(--red2); animation: pulse .6s infinite alternate; }
.d-opps { display: flex; justify-content: space-around; gap: 6px; margin: 8px 0 4px; min-height: 110px; }
.d-seat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; flex: 1; max-width: 140px; cursor: pointer; }
.d-seat.off { opacity: .45; }
.d-av { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: visible; border: 2px solid #ffffff44; background: #0005; }
.media .d-opps .d-av { width: 96px; height: 72px; border-radius: 14px; }
.d-av video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: none; transform: scaleX(-1); }
.d-av audio { display: none; }
.d-av.has-vid video { display: block; } .d-av.has-vid .d-avimg { visibility: hidden; }
.d-avimg { width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; overflow: hidden; }
.d-avimg > * { width: 100% !important; height: 100% !important; object-fit: cover; }
.d-seat.wait .d-av { border-color: var(--gold); box-shadow: 0 0 16px #f2c14e88; }
.d-clown { position: absolute; top: -14px; right: -8px; font-size: 26px; filter: drop-shadow(0 2px 3px #000a); }
.d-name { font-size: 12px; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.d-cards { display: flex; align-items: center; padding-left: 9px; } .d-cards b { margin-left: 5px; font-size: 12px; }
.d-role { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #0007; color: #cfe; }
.d-role.att { background: #a3101f; color: #fff; } .d-role.def { background: #1f4fa0; color: #fff; }
.d-center { flex: 1; display: flex; align-items: center; gap: 6px; min-height: 0; }
.d-deck { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.deck-stack { position: relative; z-index: 2; } .deck-stack b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-shadow: 0 1px 3px #000; font-size: 18px; }
.deck-stack .dcard { --w: 48px; }
.trump { margin-top: -30px; transform: rotate(90deg) translate(14px, -16px); z-index: 1; }
.trump .dcard .dc-mid { font-size: 20px; } .trump .dcard { --w: 44px; } .trump.used { opacity: .35; }
.trump-suit { font-size: 22px; margin-top: 10px; background: #fff; color: #111; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; }
.trump-suit.red { color: #c8102e; }
.d-table { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 10px 14px; min-height: 160px; }
.pair { position: relative; width: 58px; height: 100px; }
.pair .dcard.def { position: absolute; left: 12px; top: 18px; transform: rotate(12deg); }
.pair.target .dcard.att { box-shadow: 0 0 0 3px var(--gold), 0 0 18px var(--gold); }
.d-empty { text-align: center; }
.d-discard { width: 50px; } .discard { display: flex; flex-direction: column; align-items: center; } .discard .dcard { --w: 40px; transform: rotate(-14deg); opacity: .8; } .discard small { color: #b8d6c4; font-size: 10px; }
.d-lobby { background: #0008; border: 1px solid #ffffff22; border-radius: 18px; padding: 16px; text-align: center; width: 100%; max-width: 340px; }
.d-lobby-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.d-lobby-list span { display: inline-flex; align-items: center; gap: 6px; background: #ffffff12; padding: 4px 10px 4px 4px; border-radius: 20px; font-size: 13px; }
.d-lobby-list span > svg, .d-lobby-list span > img { width: 26px; height: 26px; border-radius: 50%; }
.d-status { text-align: center; font-size: 13px; color: #e1f3e8; min-height: 18px; margin: 4px 0; }
.d-me .d-seat { flex-direction: row; max-width: none; justify-content: center; gap: 8px; }
.d-me .d-av { width: 44px; height: 44px; } .media .d-me .d-av { width: 56px; height: 44px; border-radius: 10px; }
.ctl.small { width: 38px; height: 38px; }
.d-actions { display: flex; justify-content: center; gap: 10px; min-height: 46px; align-items: center; }
.d-actions .btn { min-width: 110px; }
.d-hand { display: flex; justify-content: center; padding: 10px 0 4px; min-height: 100px; }
.d-hand .dcard { --w: 62px; margin-left: -22px; transform: rotate(var(--r)) translateY(calc(var(--i) * 0px)); transform-origin: 50% 100%; transition: transform .15s; cursor: pointer; }
.d-hand .dcard:first-child { margin-left: 0; }
.d-hand .dcard.no { filter: brightness(.6); }
.d-hand .dcard.ok:hover, .d-hand .dcard.sel { transform: rotate(var(--r)) translateY(-18px); }
.d-hand .dcard.sel { box-shadow: 0 0 0 3px var(--gold), 0 0 20px var(--gold); }
.d-chat-btn { position: absolute; right: 10px; bottom: calc(var(--safe-b) + 120px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff33; background: #000a; font-size: 20px; z-index: 6; }
.d-chat-btn i { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-style: normal; font-size: 11px; border-radius: 9px; padding: 0 5px; }
.d-chat-btn i:empty { display: none; }
.d-chat { position: absolute; left: 10px; right: 64px; bottom: calc(var(--safe-b) + 112px); background: #000d; border: 1px solid #ffffff22; border-radius: 14px; padding: 8px; z-index: 5; display: none; }
.d-chat.open { display: block; }
.d-chat-list { max-height: 180px; overflow-y: auto; font-size: 13px; margin-bottom: 6px; }
.d-log { color: #9fbfae; font-size: 12px; } .d-msg b { color: var(--gold2); }
.d-chat-form { display: flex; gap: 6px; } .d-chat-form input { padding: 8px 10px; }
.dgifts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.dgift { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; font-size: 13px; }
.dgift .dg-e { font-size: 30px; display: block; } .dgift .row { margin-top: 6px; gap: 4px; } .dgift .btn { padding: 6px 8px; flex: 1; }
.gift-fly { position: absolute; font-size: 34px; z-index: 20; pointer-events: none; transition: transform .9s cubic-bezier(.3,.7,.4,1); margin: -17px 0 0 -17px; }
.gift-fly.hit { animation: giftHit 1.2s forwards; }
@keyframes giftHit { 0% { opacity: 1; } 30% { filter: drop-shadow(0 0 20px #fff); } 100% { opacity: 0; } }
.d-seat.splat .d-av::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; background: radial-gradient(circle, #e2231acc 30%, transparent 70%); animation: giftHit 1.3s forwards; }
.d-res { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.d-res > div { display: flex; gap: 10px; align-items: center; background: var(--card2); border-radius: 12px; padding: 8px 12px; }
.d-res b { flex: 1; text-align: left; } .d-res .fool { background: #3a0f16; } .d-res .me { outline: 1px solid var(--gold); }
@media (max-height: 680px) { .d-hand .dcard { --w: 52px; } .dcard { --w: 50px; } .d-opps { min-height: 90px; } }

/* --- Дурак v2: крупнее карты, спокойный фон --- */
.durak { --cw: clamp(64px, min(20vw, 11.5vh), 104px); --tw: clamp(60px, min(16vw, 10vh), 92px);
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(ellipse at 50% 120%, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 60%),
    repeating-radial-gradient(circle at 30% 30%, rgba(255,255,255,.012) 0 2px, rgba(0,0,0,.012) 2px 4px),
    linear-gradient(180deg, #2c4f47 0%, #24453e 45%, #1c3731 100%); }
.durak::before { content: ''; position: absolute; inset: 14% 4% 24%; border-radius: 50%; border: 1px solid rgba(255,255,255,.06); pointer-events: none; }
.dcard { background: linear-gradient(165deg, #fbf9f3, #efeadf); color: #1d2230; border-radius: calc(var(--w) * .1);
  box-shadow: 0 2px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.12); }
.dcard.red { color: #c0262d; }
.dcard .dc-tl, .dcard .dc-br { font-size: calc(var(--w) * .27); font-weight: 800; letter-spacing: -.5px; }
.dcard .dc-tl { left: calc(var(--w) * .07); top: calc(var(--w) * .06); } .dcard .dc-br { right: calc(var(--w) * .07); bottom: calc(var(--w) * .06); }
.dcard .dc-mid { font-size: calc(var(--w) * .6); }
.d-hand { min-height: calc(var(--cw) * 1.5); padding-top: 18px; }
.d-hand .dcard { --w: var(--cw); }
.d-hand .dcard.no { filter: brightness(.72) saturate(.8); }
.d-table .dcard, .pair .dcard { --w: var(--tw); }
.pair { width: calc(var(--tw) + 14px); height: calc(var(--tw) * 1.42 + 22px); }
.pair .dcard.def { left: 14px; top: 22px; transform: rotate(10deg); }
.d-table { gap: 12px 18px; }
.deck-stack .dcard { --w: calc(var(--tw) * .8); }
.trump .dcard { --w: calc(var(--tw) * .78); }
.trump { margin-top: calc(var(--tw) * -.55); transform: rotate(90deg) translate(18px, -20px); }
.d-deck { width: calc(var(--tw) * 1.15); }
.trump-suit { width: 38px; height: 38px; font-size: 24px; }
.d-status { font-size: 15px; color: #eef6f2; }
.d-name { font-size: 13px; }
.d-role { font-size: 12px; }
.d-actions .btn { min-width: 120px; padding: 13px 20px; font-size: 16px; }
.d-timer { background: rgba(0,0,0,.25); }
@media (min-width: 900px) { .durak { max-width: 1100px; margin: 0 auto; border-radius: 0; } }
.d-rules { padding-left: 20px; margin: 10px 0 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; }
