/* ---- Оболочка сайта: шапка, лобби, профиль, стол ---- */

/* страница всегда по высоте экрана: прокручивается только содержимое */
body{height:100vh; margin:0; display:flex; flex-direction:column; overflow:hidden}
.top{flex:none}
.screen{flex:1; height:auto; min-height:0; width:auto; overflow:auto}
#scr-game{overflow:hidden}
.center-screen{display:flex; align-items:center; justify-content:center; padding:24px}

/* ---------- шапка ---------- */
.top{position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:18px;
  padding:11px 20px; background:rgba(10,15,24,.88); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line)}
.brand{display:flex; align-items:center; gap:9px; font-weight:900; letter-spacing:2px; font-size:17px}
.brand .mark{width:26px; height:26px; font-size:15px}
.nav{display:flex; gap:6px}
.nav-btn{background:none; color:var(--dim); padding:7px 13px; border-radius:9px;
  transition:background .2s, color .2s}
.nav-btn:hover{background:#1b2740; color:var(--ink)}
.nav-btn.on{background:#213052; color:var(--ink)}
.top-right{margin-left:auto; display:flex; align-items:center; gap:12px}
.top-user{font-weight:600; font-size:13px; display:flex; align-items:center; gap:8px}
.mini-ava{width:26px; height:26px; border-radius:50%; object-fit:cover; display:block;
  box-shadow:0 0 0 2px rgba(255,255,255,.12)}
.mini-ava.letter{display:grid; place-items:center; background:#2f6fd0; color:#06121f; font-weight:800}
.net-status{width:8px; height:8px; border-radius:50%; background:#5b6980; transition:background .3s}
.net-status.online{background:var(--acc); box-shadow:0 0 8px var(--acc)}
.net-status.offline{background:var(--warn); box-shadow:0 0 8px var(--warn)}
.ghost.sm,.primary.sm{padding:7px 12px; font-size:12px}

/* ---------- страницы ---------- */
.page{padding:22px clamp(14px,4vw,40px) 40px}
.page-grid{display:grid; grid-template-columns:1fr 330px; gap:20px; max-width:1240px; margin:0 auto}
.col{min-width:0}
.col h2{margin:0 0 14px; font-size:17px; font-weight:700}
.col-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px}
.col-head h2{margin:0}
.card{background:linear-gradient(180deg,#182236,#111827); border:1px solid var(--line);
  border-radius:18px; padding:26px 28px; box-shadow:0 30px 80px rgba(0,0,0,.55)}
.empty{color:var(--dim); padding:22px; text-align:center; background:var(--panel);
  border:1px dashed var(--line); border-radius:12px}

/* ---------- вход ---------- */
/* экран входа: мягкие световые пятна на фоне */
#scr-auth.center-screen{position:relative; overflow:hidden}
#scr-auth::before,#scr-auth::after{content:''; position:absolute; border-radius:50%; filter:blur(70px);
  pointer-events:none; z-index:0}
#scr-auth::before{width:420px; height:420px; top:-120px; left:-80px; background:rgba(57,217,138,.16);
  animation:authOrb 12s ease-in-out infinite}
#scr-auth::after{width:460px; height:460px; bottom:-140px; right:-90px; background:rgba(78,168,255,.14);
  animation:authOrb 14s ease-in-out infinite reverse}
@keyframes authOrb{0%,100%{transform:translate(0,0)}50%{transform:translate(40px,30px)}}

.auth-card{position:relative; z-index:1; width:min(440px,100%); padding:30px 32px; border-radius:22px;
  background:linear-gradient(180deg,#1b2438,#131a29); border:1px solid var(--line);
  box-shadow:0 34px 90px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04);
  animation:authIn .5s cubic-bezier(.2,1.05,.3,1) both}
@keyframes authIn{from{opacity:0; transform:translateY(18px) scale(.97)}to{opacity:1; transform:none}}
.auth-head{display:flex; gap:16px; align-items:center; margin-bottom:22px}
.auth-mascot{width:76px; flex:none; animation:heroFloat 5s ease-in-out infinite}
.auth-mascot svg{width:100%; height:auto; display:block; filter:drop-shadow(0 8px 16px rgba(0,0,0,.5))}
.auth-card .sub{margin-top:6px}

.tabs2{display:flex; gap:0; margin-bottom:18px; padding:4px; border-radius:13px;
  background:rgba(8,12,20,.5); border:1px solid var(--line)}
.t2{flex:1; background:none; color:var(--dim); border:0; padding:10px; border-radius:10px;
  font-weight:700; font-size:14px; cursor:pointer; transition:all .2s}
.t2:hover{color:var(--ink)}
.t2.active{background:linear-gradient(180deg,#26365a,#1d2a46); color:var(--ink);
  box-shadow:0 4px 12px rgba(0,0,0,.35)}
.field{display:block; margin-bottom:14px}
.field span{display:block; font-size:12px; color:var(--dim); margin-bottom:6px; font-weight:600}
.field input{width:100%; padding:11px 13px; border-radius:11px; font-size:14px}
.primary.big{width:100%; padding:13px; font-size:15px; font-weight:800; border-radius:13px; margin-top:4px}
.form-error{background:#3a1a1c; border:1px solid #6b2b2f; color:#ffb0ae;
  padding:9px 12px; border-radius:9px; font-size:13px; margin-bottom:12px}

/* ---------- главная: приветствие, мини-правила, цифры ---------- */
.mt{margin-top:22px}

/* ---------- главная ---------- */
.lobby{max-width:1180px; margin:0 auto; display:flex; flex-direction:column; gap:36px}
.lobby > .page-grid{margin:0; gap:26px; max-width:none}

/* приветствие */
.hero{position:relative; overflow:hidden; display:flex; gap:32px; align-items:center;
  padding:36px 42px; border-radius:24px; border:1px solid var(--line);
  background:
    radial-gradient(620px 320px at 88% -40%, rgba(57,217,138,.16), transparent 62%),
    radial-gradient(520px 340px at 8% 140%, rgba(78,168,255,.13), transparent 60%),
    linear-gradient(135deg,#1b2843 0%,#121a2b 55%,#161f33 100%);
  box-shadow:0 34px 80px rgba(0,0,0,.5);
  animation:heroIn .65s cubic-bezier(.2,.9,.3,1) both}
.hero::after{content:''; position:absolute; right:-70px; top:-90px; width:300px; height:300px;
  border-radius:50%; background:radial-gradient(circle, rgba(57,217,138,.22), transparent 70%);
  filter:blur(22px); animation:heroGlow 8s ease-in-out infinite; pointer-events:none}
.hero-art{width:124px; flex:none; position:relative; z-index:1; animation:heroFloat 5.5s ease-in-out infinite}
.hero-art svg{width:100%; height:auto; display:block; filter:drop-shadow(0 14px 26px rgba(0,0,0,.5))}
.hero-txt{min-width:0; position:relative; z-index:1; flex:1}
.hero h1{margin:0 0 12px; font-size:clamp(24px,3.2vw,32px); font-weight:800; letter-spacing:-.02em; line-height:1.08}
.hero p{margin:0 0 22px; color:var(--dim); font-size:15px; line-height:1.6; max-width:600px}
.hero-acts{display:flex; gap:12px; flex-wrap:wrap; margin-bottom:24px}
.hero-acts .primary,.hero-acts .ghost{padding:12px 24px; font-size:14px; font-weight:800; border-radius:13px}
.hero-stats{display:flex; gap:12px; flex-wrap:wrap}
.hstat{display:flex; flex-direction:column; gap:3px; padding:11px 20px; border-radius:15px;
  background:rgba(8,12,20,.42); border:1px solid var(--line); min-width:92px}
.hstat b{font-size:26px; font-weight:800; color:var(--acc); font-variant-numeric:tabular-nums; line-height:1}
.hstat span{font-size:11px; color:var(--dim); text-transform:uppercase; letter-spacing:.06em}

/* заголовки секций */
.section-title{position:relative; margin:0 0 20px; padding-left:16px;
  font-size:21px; font-weight:800; letter-spacing:-.01em}
.section-title::before{content:''; position:absolute; left:0; top:2px; bottom:2px; width:4px;
  border-radius:4px; background:linear-gradient(180deg,var(--acc),#2f9d68)}
.lobby-sec{animation:cardUp .55s cubic-bezier(.2,.9,.3,1) both}

/* колонки */
.col-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:18px}
.col-head h2{margin:0; font-size:20px; font-weight:800; letter-spacing:-.01em}
.narrow{display:flex; flex-direction:column; gap:20px}
.side-card{background:linear-gradient(180deg,#182236,#121a29); border:1px solid var(--line);
  border-radius:18px; padding:20px 22px; box-shadow:0 18px 44px rgba(0,0,0,.32)}
.side-title{margin:0 0 15px; font-size:16px; font-weight:700}

/* пустой список столов */
.empty.big{display:flex; flex-direction:column; align-items:center; gap:12px; padding:46px 26px;
  border-radius:18px; border:1px dashed var(--line); background:rgba(20,28,43,.5)}
.empty.big b{color:var(--ink); font-size:18px}
.empty.big span{max-width:440px; line-height:1.5}
.empty.big button{margin-top:8px; padding:11px 24px; font-weight:800; border-radius:12px}

/* мини-правила */
.howto{display:grid; grid-template-columns:repeat(2,1fr); gap:14px}
.how{position:relative; padding:20px 22px 20px 60px; border-radius:16px;
  background:linear-gradient(180deg,#1a2337,#141c2b); border:1px solid var(--line);
  transition:transform .25s, border-color .25s, box-shadow .25s;
  animation:cardUp .55s cubic-bezier(.2,.9,.3,1) both}
.how:hover{transform:translateY(-3px); border-color:#33445f; box-shadow:0 18px 40px rgba(0,0,0,.42)}
.how i{position:absolute; left:18px; top:20px; width:30px; height:30px; border-radius:10px;
  display:grid; place-items:center; font-style:normal; font-weight:800; font-size:14px;
  background:linear-gradient(150deg,var(--acc),#2f9d68); color:#07200f;
  box-shadow:0 7px 16px rgba(57,217,138,.32)}
.how b{display:block; font-size:15px; margin-bottom:6px}
.how span{font-size:13px; color:var(--dim); line-height:1.5}
.how:nth-child(1){animation-delay:.04s}
.how:nth-child(2){animation-delay:.09s}
.how:nth-child(3){animation-delay:.14s}
.how:nth-child(4){animation-delay:.19s}

/* «что в игре» */
.feats{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:13px}
.feat{padding:17px 19px; border-radius:15px; background:linear-gradient(180deg,#1a2337,#141c2b);
  border:1px solid var(--line); transition:transform .25s, border-color .25s, box-shadow .25s;
  animation:cardUp .55s cubic-bezier(.2,.9,.3,1) both}
.feat:hover{transform:translateY(-3px); border-color:#33445f; box-shadow:0 16px 34px rgba(0,0,0,.42)}
.feat b{display:block; font-size:14px; margin-bottom:5px}
.feat span{font-size:12.5px; color:var(--dim); line-height:1.5}
.feat:nth-child(2){animation-delay:.05s}
.feat:nth-child(3){animation-delay:.1s}
.feat:nth-child(4){animation-delay:.15s}
.feat:nth-child(5){animation-delay:.2s}
.feat:nth-child(6){animation-delay:.25s}

@keyframes heroIn{from{opacity:0; transform:translateY(22px)}to{opacity:1; transform:none}}
@keyframes heroFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-11px)}}
@keyframes heroGlow{0%,100%{opacity:.55; transform:scale(1)}50%{opacity:1; transform:scale(1.18)}}
@keyframes cardUp{from{opacity:0; transform:translateY(16px)}to{opacity:1; transform:none}}

@media (max-width:900px){
  .lobby{gap:26px}
  .hero{flex-direction:column; text-align:center; padding:26px 20px}
  .hero-art{width:94px}
  .hero p{max-width:none}
  .hero-acts,.hero-stats{justify-content:center}
  .howto{grid-template-columns:1fr}
}

/* ---------- список столов ---------- */
.tables{display:flex; flex-direction:column; gap:12px}
.table-row{position:relative; overflow:hidden; display:flex; align-items:center; gap:16px;
  background:linear-gradient(180deg,#1a2337,#141c2b); border:1px solid var(--line);
  border-radius:16px; padding:16px 20px;
  transition:border-color .25s, transform .25s, box-shadow .25s;
  animation:cardUp .5s cubic-bezier(.2,.9,.3,1) both}
.table-row::before{content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background:linear-gradient(180deg,var(--acc),#2f9d68); opacity:0; transition:opacity .25s}
.table-row:hover{border-color:#33445f; transform:translateY(-2px); box-shadow:0 16px 36px rgba(0,0,0,.42)}
.table-row:hover::before{opacity:1}
.table-row:nth-child(2){animation-delay:.05s}
.table-row:nth-child(3){animation-delay:.1s}
.table-row:nth-child(4){animation-delay:.15s}
.table-row:nth-child(5){animation-delay:.2s}
.tr-main{flex:1; min-width:0}
.tr-name{font-weight:700; font-size:15px}
.tr-meta{font-size:12.5px; color:var(--dim); margin-top:3px}
.tr-players{display:flex; gap:6px; flex-wrap:wrap; margin-top:9px}
.pill{font-size:11px; padding:3px 9px; border-radius:20px; background:#26344d; color:var(--dim)}

/* ---------- рейтинг и история ---------- */
.top-list{display:flex; flex-direction:column; gap:6px}
.top-row{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:11px;
  background:rgba(20,28,43,.55); font-size:13px; transition:background .2s}
.top-row:hover{background:#1e2a41}
.top-row .rank{width:20px; color:var(--dim); font-variant-numeric:tabular-nums}
.top-row .who{flex:1; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.top-row .val{font-variant-numeric:tabular-nums; color:var(--acc)}
.top-row .val.muted{color:var(--dim)}
.top-list.wide{max-width:640px}

/* ---------- профиль ---------- */
.profile{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:20px}
.pf-head{display:flex; gap:14px; align-items:center; margin-bottom:20px}
.pf-ava{position:relative; width:76px; height:76px; border-radius:50%; display:grid;
  place-items:center; overflow:hidden; cursor:pointer; flex:none;
  font-size:30px; font-weight:800; background:linear-gradient(150deg,#4ea8ff,#2f6fd0); color:#06121f;
  box-shadow:0 0 0 3px rgba(255,255,255,.08); transition:box-shadow .25s}
.pf-ava:hover{box-shadow:0 0 0 3px var(--acc)}
.pf-ava img{width:100%; height:100%; object-fit:cover; display:block}
.pf-ava-edit{position:absolute; left:0; right:0; bottom:0; padding:4px 0; font-size:10px;
  font-weight:600; color:#fff; background:rgba(6,12,22,.78); text-align:center;
  opacity:0; transition:opacity .25s}
.pf-ava:hover .pf-ava-edit{opacity:1}
.pf-name{font-size:18px; font-weight:700}
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px}
.stat{background:#1b2539; border-radius:11px; padding:14px}
.s-val{font-size:20px; font-weight:800; color:var(--acc); font-variant-numeric:tabular-nums}
.s-lab{font-size:11.5px; color:var(--dim); margin-top:3px}

/* ---------- стол ---------- */
.table-info{display:flex; gap:7px; flex-wrap:wrap; margin-bottom:16px}
.table-players{display:flex; flex-direction:column; gap:7px; margin-bottom:18px}
.tp{display:flex; align-items:center; gap:10px; background:var(--panel);
  border:1px solid var(--line); border-radius:11px; padding:11px 14px; font-size:13.5px}
.tp.bot{opacity:.6}
.tp-dot{width:13px; height:13px; border-radius:50%;
  box-shadow:inset 0 -24% 24% -12% rgba(0,0,0,.4), inset 0 20% 20% -14% rgba(255,255,255,.6)}
.table-actions{display:flex; align-items:center; gap:14px}

/* ---------- чат ---------- */
.chat-box{background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:11px; height:340px; overflow:auto; font-size:12.5px; display:flex;
  flex-direction:column; gap:5px}
.chat-box.in-game{flex:1; height:auto; min-height:0}
.cm{color:#c6d3e8; line-height:1.4; word-break:break-word}
.cm b{color:var(--acc); margin-right:4px}
.cm.sys{color:var(--dim); font-style:italic}
.chat-form{display:flex; gap:7px; margin-top:9px}
.chat-form input{flex:1}

/* ---------- уведомление ---------- */
.toast{position:fixed; left:50%; bottom:26px; transform:translateX(-50%); z-index:90;
  background:#2a1c20; border:1px solid #6b2b2f; color:#ffc9c6; padding:11px 18px;
  border-radius:11px; font-size:13px; box-shadow:0 16px 40px rgba(0,0,0,.5);
  animation:btnIn .25s ease-out both}

/* игровой экран занимает всё место под шапкой */
#scr-game #game{height:100%; padding:10px}

@media (max-width:900px){
  .page-grid{grid-template-columns:1fr}
  .top{flex-wrap:wrap; gap:10px}
  .nav{order:3; width:100%}
  .chat-box{height:220px}
}

/* ---- карточка клетки по клику ---- */
.deed{background:#f6f1e4; border-radius:12px; overflow:hidden; margin-bottom:14px;
  box-shadow:0 14px 36px rgba(0,0,0,.45)}
.deed{color:#16202f}
.deed .tt-head{padding:11px 14px; font-size:15px; gap:9px}
.deed .tt-emblem{width:30px; height:30px}
.deed .tt-rows{padding:11px 15px 13px; max-height:52vh; overflow:auto}
.deed .tt-row{font-size:12.5px; padding:3px 0}
.deed .tt-note{font-size:11.5px; line-height:1.5}
.deed .tt-card{font-size:11.5px; line-height:1.4; padding:3px 0 3px 12px}
.deed.wide .tt-rows{column-count:2; column-gap:18px}
@media (max-width: 760px){ .deed.wide .tt-rows{column-count:1} }
#deed-acts{flex-wrap:wrap; justify-content:center}

/* ---- лотерея на парковке ---- */
.lotto-picks{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:14px 0}
.lotto-die{width:56px; height:56px; padding:0; border-radius:12px; background:#1b2539;
  border:1px solid var(--line); display:grid; place-items:center; cursor:pointer;
  transition:background .18s, box-shadow .18s, transform .18s}
.lotto-die:hover{background:#22304a; transform:translateY(-2px)}
.lotto-die.on{background:#f6f1e4; box-shadow:0 0 0 2px var(--acc), 0 8px 20px rgba(0,0,0,.45)}
.lotto-die .die-face{display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr);
  width:36px; height:36px; gap:2px; padding:3px}
.lotto-die .die-face i{width:8px; height:8px; border-radius:50%; background:#cfd8e6; place-self:center}
.lotto-die.on .die-face i{background:#16202f}
.lotto-info{background:#151e30; border:1px solid var(--line); border-radius:12px; padding:10px 14px}
.lotto-info .tt-row{display:flex; justify-content:space-between; gap:10px; padding:3px 0;
  font-size:13px; color:var(--dim)}
.lotto-info .tt-row b{color:var(--ink); font-variant-numeric:tabular-nums}
.lotto-info .tt-row.hi b{color:var(--acc)}
/* кость живёт по тем же переменным, что и в центре доски, иначе у неё нулевой размер */
.lotto-roll{--d:66px; display:grid; place-items:center; min-height:120px; margin:8px 0;
  perspective:720px; perspective-origin:50% 40%}
.lotto-result{text-align:center; font-size:15px; padding:6px 0 2px}
.lotto-result.win{color:var(--acc); font-weight:700}
.lotto-result.lose{color:var(--warn)}

/* ---- карточка игрока по клику ---- */
.pp-head{display:flex; align-items:center; gap:12px; margin-bottom:12px}
.pp-ava{width:52px; height:52px; border-radius:50%; flex:none; display:grid; place-items:center;
  background:var(--c); color:#0b1119; font-weight:800; font-size:21px; overflow:hidden;
  box-shadow:0 0 0 3px rgba(255,255,255,.1)}
.pp-ava img{width:100%; height:100%; object-fit:cover; display:block}
.pp-name{font-weight:700; font-size:17px}
.pp-head .ptags{justify-content:flex-start; margin-top:4px}
.pp-money{margin-left:auto; font-weight:800; font-size:20px; color:var(--acc);
  font-variant-numeric:tabular-nums}
.pp-list{margin-top:12px; max-height:38vh; overflow:auto; display:flex; flex-direction:column; gap:10px}
.pp-grp{background:#151e30; border:1px solid var(--line); border-radius:12px; padding:8px 11px}
.pp-ghead{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--dim);
  margin-bottom:5px; text-transform:uppercase; letter-spacing:.05em}
.pp-row{display:flex; justify-content:space-between; gap:10px; font-size:13px; padding:2px 0}
.pp-row b{color:var(--ink); font-variant-numeric:tabular-nums}
.pp-row.m{opacity:.5}

/* Кнопка выхода из партии — отличаем цветом, чтобы не нажать её случайно. */
.modal-actions .ghost.danger{color:#ff9a9a; border-color:rgba(255,120,120,.35)}
.modal-actions .ghost.danger:hover{background:rgba(255,90,90,.14); border-color:rgba(255,120,120,.6)}

/* Итог сделки: крупными цифрами, сколько кладёт на стол каждая сторона. */
.trade-sum{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px;
  margin:12px 0 2px; padding:12px 14px; border-radius:12px;
  background:rgba(12,20,36,.55); box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.ts-side{display:flex; flex-direction:column; gap:2px; min-width:0; text-align:center}
.ts-side span{font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#8ea0bf;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ts-side b{font-size:clamp(19px,2.4vw,28px); line-height:1.1; font-weight:800;
  font-variant-numeric:tabular-nums; color:#eaf1ff}
.ts-side i{font-style:normal; font-size:11px; color:#7c8ca8; min-height:14px}
.ts-eq{font-size:22px; line-height:1; color:#6f8098; font-weight:700}
/* перевес в чью-то сторону подсвечиваем: зелёное — тому, кто получает больше */
.ts-eq.over{color:#ff8f8f}
.ts-eq.under{color:#5fd08a}
.ts-warn{min-height:16px; margin:6px 2px 0; font-size:12px; line-height:1.35; color:#ff9a9a; text-align:center}

/* Переключатель языка в шапке — узкая кнопка с кодом языка. */
.top-right .lang{min-width:38px; padding:5px 8px; font-weight:800; letter-spacing:.06em}

/* creator и админские кнопки в лобби */
.tag.creator{background:linear-gradient(180deg,#ffe27a,#e0a41f); color:#3a2a06; box-shadow:0 0 10px rgba(245,196,81,.45); font-weight:800}
.tr-acts2{display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.tr-acts2 .ghost.danger{color:#ff9a9a; border-color:rgba(255,120,120,.35)}

/* приглашение по ссылке */
.auth-quick{display:flex; flex-direction:column; gap:10px; margin-bottom:6px}
.aq-title{font-weight:800; font-size:15px; text-align:center}
.auth-quick .muted{font-size:12px; text-align:center; margin:0}
.auth-quick #quick-login{align-self:center}
.invite{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:8px 0 12px;
  padding:9px 12px; border-radius:10px; background:var(--panel); border:1px solid var(--line)}
.inv-lbl{font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim)}
.invite code{font-size:13px; font-weight:700; color:var(--acc); user-select:all; overflow-wrap:anywhere}
.invite button{margin-left:auto}
#top-user .tag{margin-left:6px}

/* ---------- бейджи режима на карточке стола ---------- */
.tag.rank{background:linear-gradient(180deg,#f5c451,#d99b1f); color:#20160a; font-weight:800}
.tag.team{background:linear-gradient(180deg,#5aa0ff,#3f7fe0); color:#08101f; font-weight:800}
.tr-name .tag{font-size:10px; padding:2px 8px; margin-left:6px; vertical-align:middle}

/* ---------- переключатель рейтинга ---------- */
.board-tabs{display:flex; gap:8px; margin-bottom:14px}
.bt{padding:8px 16px; border-radius:11px; background:var(--panel); color:var(--dim);
  border:1px solid var(--line); font-weight:700; font-size:13px; transition:all .2s}
.bt:hover{color:var(--ink); border-color:#33445f}
.bt.on{background:linear-gradient(180deg,#223050,#1a2740); color:var(--ink); border-color:#3a4d70}

/* ---------- скелетоны загрузки ---------- */
.skel-list{display:flex; flex-direction:column; gap:10px}
.skeleton{position:relative; overflow:hidden; background:var(--panel); border:1px solid var(--line);
  border-radius:14px}
.skeleton::after{content:''; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation:shimmer 1.3s infinite}
@keyframes shimmer{100%{transform:translateX(100%)}}
.skel-row{height:74px}
.skel-line{height:44px}
.skel-hero{height:184px; border-radius:24px}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.fade-in{animation:fadeIn .4s ease-out both}

/* пустое место за столом «только люди» */
.tp.empty{opacity:.5}
.tp.empty .tp-dot{background:transparent; box-shadow:inset 0 0 0 2px var(--line)}

/* ---------- шапка: кликабельный юзер ---------- */
.top-user-btn{display:flex; align-items:center; gap:8px; background:none; border:0; cursor:pointer;
  padding:4px 8px; border-radius:99px; color:var(--ink); font:inherit; font-weight:600;
  transition:background .18s}
.top-user-btn:hover{background:#1b2740}
.top-user-btn .tu-name{max-width:26vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

/* ---------- профиль ---------- */
.pf-card{background:linear-gradient(180deg,#182236,#121a29); border:1px solid var(--line);
  border-radius:18px; padding:22px 24px; box-shadow:0 24px 60px rgba(0,0,0,.4)}
.pf-card .pf-head{margin-bottom:16px}
.pf-id{min-width:0; flex:1}
.pf-id .pf-name{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.pf-ava.static{cursor:default}
.pf-ava.static:hover{box-shadow:0 0 0 3px rgba(255,255,255,.08)}
.pf-rating{flex:none; text-align:center; padding:8px 16px; border-radius:14px;
  background:rgba(57,217,138,.1); border:1px solid rgba(57,217,138,.25)}
.pf-rating b{display:block; font-size:26px; font-weight:800; color:var(--acc); line-height:1;
  font-variant-numeric:tabular-nums}
.pf-rating span{font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:var(--dim)}
.pf-note{margin:0 0 16px; padding:12px 14px; border-radius:12px; font-size:13px; line-height:1.45;
  background:rgba(245,196,81,.1); border:1px solid rgba(245,196,81,.3); color:#f5d98a}
.pf-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:18px}
.pf-actions .ghost{padding:10px 18px; font-weight:700; border-radius:11px}
.pad{padding:14px}

/* ---------- красивый лидерборд ---------- */
.lb-head{display:grid; grid-template-columns:34px 34px 1fr auto auto; gap:12px; align-items:center;
  padding:4px 14px 10px; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim)}
.lb-head span:nth-child(4),.lb-head span:nth-child(5){text-align:right}
.lb-list{display:flex; flex-direction:column; gap:7px}
.lb-row{display:grid; grid-template-columns:34px 34px 1fr auto auto; gap:12px; align-items:center;
  width:100%; text-align:left; padding:10px 14px; border-radius:13px; cursor:pointer;
  background:linear-gradient(180deg,#1a2337,#141c2b); border:1px solid var(--line); color:var(--ink);
  font:inherit; transition:transform .18s, border-color .18s, box-shadow .18s}
.lb-row:hover{transform:translateY(-2px); border-color:#33445f; box-shadow:0 12px 28px rgba(0,0,0,.4)}
.lb-rank{width:30px; height:30px; display:grid; place-items:center; border-radius:9px;
  font-weight:800; font-size:13px; color:var(--dim); background:rgba(255,255,255,.04)}
.lb-rank.m1{background:linear-gradient(180deg,#f6d066,#d9a521); color:#3a2a06}
.lb-rank.m2{background:linear-gradient(180deg,#d4dbe6,#9aa7ba); color:#232a36}
.lb-rank.m3{background:linear-gradient(180deg,#e0a06a,#b7743d); color:#2e1a0b}
.lb-ava{width:32px; height:32px; border-radius:50%; object-fit:cover; display:block;
  box-shadow:0 0 0 2px rgba(255,255,255,.1)}
.lb-ava.letter{display:grid; place-items:center; background:#2f6fd0; color:#06121f; font-weight:800; font-size:14px}
.lb-name{font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.lb-main{font-weight:800; color:var(--acc); font-variant-numeric:tabular-nums; text-align:right}
.lb-sub{font-size:12px; color:var(--dim); font-variant-numeric:tabular-nums; text-align:right; min-width:52px}
/* компактный лидерборд в лобби: те же строки в узкой колонке */
#top-list .lb-row{padding:8px 11px; gap:9px; grid-template-columns:26px 28px 1fr auto}
#top-list .lb-sub{display:none}
#top-list .lb-rank{width:26px; height:26px; font-size:12px}
#top-list .lb-ava{width:28px; height:28px}
@media (max-width:520px){ .lb-sub{display:none} .lb-head span:nth-child(5){display:none}
  .lb-head,.lb-row{grid-template-columns:30px 30px 1fr auto} }

/* ---------- прогресс: уровень и цели ---------- */
.lvl{display:flex; align-items:center; gap:14px; margin:4px 0 16px}
.lvl-badge{flex:none; width:46px; height:46px; border-radius:50%; display:grid; place-items:center;
  font-weight:800; font-size:19px; color:#07200f;
  background:linear-gradient(150deg,#ffe27a,#f5b21f); box-shadow:0 6px 16px rgba(245,178,31,.35)}
.lvl-body{flex:1; min-width:0}
.lvl-top{display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:6px}
.lvl-bar{height:10px; border-radius:6px; background:rgba(255,255,255,.07); overflow:hidden}
.lvl-bar i{display:block; height:100%; border-radius:6px;
  background:linear-gradient(90deg,#5fd08a,#39d98a); transition:width .5s cubic-bezier(.2,.9,.3,1)}

.goals-panel{background:linear-gradient(180deg,#182236,#121a29); border:1px solid var(--line);
  border-radius:18px; padding:18px 20px; box-shadow:0 20px 50px rgba(0,0,0,.32)}
.goals-list{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:10px}
.goal{display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:13px;
  background:#1a2337; border:1px solid var(--line); transition:border-color .2s}
.goal.done{border-color:rgba(57,217,138,.4); background:rgba(57,217,138,.07)}
.goal-check{flex:none; width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
  font-weight:800; font-size:14px; color:#07200f; background:#2a3650}
.goal.done .goal-check{background:linear-gradient(150deg,#5fd08a,#34a765); color:#07200f}
.goal-main{flex:1; min-width:0}
.goal-title{font-size:13.5px; font-weight:700; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap}
.goal-rew{font-size:11px; font-weight:700; color:var(--acc)}
.goal-bar{height:6px; border-radius:4px; background:rgba(255,255,255,.07); margin-top:6px; overflow:hidden}
.goal-bar i{display:block; height:100%; border-radius:4px; background:linear-gradient(90deg,#4ea8ff,#2f6fd0)}
.goal.done .goal-bar i{background:linear-gradient(90deg,#5fd08a,#34a765)}
.goal-num{flex:none; font-size:12.5px; font-weight:700; font-variant-numeric:tabular-nums}
@media (max-width:640px){ .goals-list{grid-template-columns:1fr} }

/* ---------- золотая карточка создателя ---------- */
.pf-card.creator{border:1px solid #f0c14b; position:relative; overflow:hidden;
  background:linear-gradient(135deg,#2a2413 0%,#171a24 45%,#241d0e 100%);
  box-shadow:0 26px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(245,196,81,.4), inset 0 0 46px rgba(245,196,81,.09)}
.pf-card.creator::before{content:''; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:linear-gradient(120deg, transparent 32%, rgba(255,228,150,.16) 50%, transparent 68%);
  background-size:250% 100%; animation:goldSweep 4.5s linear infinite}
@keyframes goldSweep{from{background-position:160% 0}to{background-position:-160% 0}}
.pf-card.creator > *{position:relative; z-index:1}
.pf-card.creator .pf-name{color:#ffe9a8; text-shadow:0 0 14px rgba(245,196,81,.45)}
.pf-card.creator .pf-ava{box-shadow:0 0 0 3px #f0c14b, 0 0 18px rgba(245,196,81,.5)}
.pf-card.creator .pf-rating{background:rgba(245,196,81,.14); border-color:rgba(245,196,81,.45)}
.pf-card.creator .pf-rating b{color:#ffe27a}

/* ---------- панель инструментов создателя ---------- */
.cr-list{display:flex; flex-direction:column; gap:8px; max-height:52vh; overflow:auto; margin:10px 0}
.cr-row{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding:9px 12px; border-radius:11px; background:var(--panel); border:1px solid var(--line)}
.cr-row.dead{opacity:.5}
.cr-who{display:flex; align-items:center; gap:8px; font-weight:600; font-size:13px}
.cr-who .chip{width:12px; height:12px; border-radius:50%; flex:none}
.cr-who b{color:var(--acc); font-variant-numeric:tabular-nums; margin-left:4px}
.cr-acts{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.cr-amt{width:96px}

/* компактный блок целей под приветствием */
.goals-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px}
.link-btn{background:none; border:0; color:var(--acc); font:inherit; font-weight:700; cursor:pointer; padding:4px 6px}
.link-btn:hover{text-decoration:underline}

/* разделитель и кнопка Google на входе */
.auth-or{display:flex; align-items:center; gap:12px; margin:16px 0; color:var(--dim); font-size:12px}
.auth-or::before,.auth-or::after{content:''; flex:1; height:1px; background:var(--line)}
.gbtn{display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:12px;
  border-radius:13px; background:#fff; color:#1f2430; font:inherit; font-weight:700; font-size:14px;
  border:0; cursor:pointer; transition:filter .18s, transform .12s}
.gbtn:hover{filter:brightness(.97)}
.gbtn:active{transform:translateY(1px)}
.gicon{width:20px; height:20px; flex:none}
