/* leaderboard.css — 5.3: топ «Лучшие игроки» во вкладке поиска (leaderboard.js) */

/* переключатель «Соседи | Топ» */
.lb-seg{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 12px 12px 0; padding: 4px; border-radius: 14px;
  background: rgba(22,27,54,.92); border: 1px solid rgba(255,255,255,.1); }
.lb-seg[hidden]{ display: none; }
.lb-seg button{ height: 36px; border: 0; border-radius: 10px; background: none; color: #a9adc9; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; }
.lb-seg button.is-on{ background: #2f6fe4; color: #fff; }
#search-tab .nb-wrap[hidden]{ display: none; }

.lb-wrap{ padding: 12px 12px 84px; /* снизу — место под плашку «Ты» */ display: flex; flex-direction: column; gap: 10px; color: #fff; }
.lb-wrap[hidden]{ display: none; }
.lb-head{ display: flex; flex-direction: column; gap: 1px; margin: 0 4px; }
.lb-head h2{ margin: 0; font-size: 22px; font-weight: 900; line-height: 1.15; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.lb-head small{ font-size: 12px; font-weight: 800; color: #b7bdd8; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.lb-chips{ display: flex; gap: 6px; }
.lb-chip{ flex: 1; min-width: 0; height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(22,27,54,.88); color: #c9cde6; font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.lb-chip svg{ width: 15px; height: 15px; flex: none; }
.lb-chip.is-on{ border-color: #f5c542; background: rgba(245,197,66,.18); color: #ffe08a; }
.lb-empty{ padding: 22px 14px; border-radius: 16px; background: rgba(22,27,54,.9); text-align: center; font-size: 13.5px; font-weight: 800; color: #c9cde6; }

/* аватар: буква, сверху фото */
.lb-ava{ position: relative; flex: none; display: grid; place-items: center; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 900; font-size: 15px; }
.lb-ava img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-vip, .lb-crown{ display: inline-flex; color: #f5c542; font-style: normal; }
.lb-vip svg{ width: 13px; height: 13px; }

/* пьедестал */
.lb-pod{ display: flex; align-items: flex-end; gap: 8px; padding: 0 4px; }
.lb-pod.is-skel{ height: 170px; border-radius: 16px; background: rgba(22,27,54,.5); }
.lb-pd{ flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; }
.lb-pd.is-none{ visibility: hidden; }
.lb-pd .lb-ava{ font-size: 21px; }
.lb-pd--1 .lb-ava{ font-size: 26px; box-shadow: 0 0 0 3px #f5c542, 0 0 18px rgba(245,197,66,.55); }
.lb-pd--2 .lb-ava{ box-shadow: 0 0 0 3px #c9d1e6; }
.lb-pd--3 .lb-ava{ box-shadow: 0 0 0 3px #d08a4f; }
.lb-pd .lb-crown svg{ width: 30px; height: 24px; margin-bottom: -6px; filter: drop-shadow(0 0 6px rgba(245,197,66,.7)); }
.lb-pd b{ max-width: 100%; display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 900; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.lb-pd b > span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pd em{ font-style: normal; font-size: 12px; font-weight: 900; color: #ffe08a; background: rgba(0,0,0,.4); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.lb-step{ position: relative; width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; font-size: 20px; font-weight: 900; }
/* значок места на ступени (assets/top1–3.png) — чуть выше ступени */
.lb-step img{ width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }
.lb-pd--1 .lb-step img{ width: 58px; height: 58px; }
.lb-pd--2 .lb-step img{ width: 48px; height: 48px; }
.lb-pd--1 .lb-step{ height: 66px; background: linear-gradient(180deg,#ffd76a,#d39a16); color: #3a2800; }
.lb-pd--2 .lb-step{ height: 56px; background: linear-gradient(180deg,#c9d1e6,#8b93ad); color: #1c2140; }
.lb-pd--3 .lb-step{ height: 50px; background: linear-gradient(180deg,#e7a46c,#a8622c); color: #2e1606; }

/* список 4+ */
.lb-list{ border-radius: 18px; background: rgba(22,27,54,.94); border: 1px solid rgba(255,255,255,.1); overflow: hidden; }
.lb-list.is-skel{ margin-top: 0; height: 240px; background: rgba(22,27,54,.5); }
.lb-row{ width: 100%; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.06);
  background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.lb-row:last-child{ border-bottom: 0; }
.lb-row:active{ background: rgba(255,255,255,.05); }
.lb-pl{ width: 26px; flex: none; text-align: center; font-size: 14px; font-weight: 900; color: #a9adc9; }
.lb-nm{ flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 900; }
.lb-nm > span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-best{ width: 30px; height: 30px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.lb-val{ flex: none; min-width: 56px; text-align: right; font-size: 14px; font-weight: 900; color: #ffe08a; }
.lb-val small{ display: block; font-size: 10.5px; font-weight: 800; color: #a9adc9; }

/* моё место — прилипает к низу над панелью */
.lb-me{ position: fixed; left: 12px; right: 12px; max-width: 426px; margin: 0 auto; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px;
  border-radius: 16px; background: #1e346e; border: 1.5px solid rgba(110,160,255,.7); box-shadow: 0 8px 22px rgba(0,0,0,.4); }
.lb-me__top{ display: flex; align-items: center; gap: 10px; }
.lb-me .lb-pl{ width: 34px; color: #bfd3ff; font-size: 15px; }
.lb-me .lb-val small{ color: #bfd3ff; }
.lb-me__bot{ display: flex; align-items: center; gap: 8px; }
.lb-me__bot small{ flex: none; max-width: 62%; font-size: 11.5px; font-weight: 800; color: #dbe6ff; text-align: right; }
.lb-bar{ flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.lb-bar i{ display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#6ea0ff,#9fd0ff); }

/* окно «витрина игрока — только посмотреть» */
.lbv-layer{ position: fixed; inset: 0; z-index: 20000; display: flex; align-items: flex-end; justify-content: center; background: rgba(4,6,18,.7); opacity: 0; transition: opacity .18s; }
.lbv-layer.is-open{ opacity: 1; }
.lbv-sheet{ width: 100%; max-width: 450px; max-height: calc(100% - 10px); overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #161b36; border-top: 1px solid rgba(245,197,66,.45); color: #fff;
  transform: translateY(24px); transition: transform .2s; }
.lbv-layer.is-open .lbv-sheet{ transform: none; }
.lbv-sheet > *{ flex-shrink: 0; }
.lbv-top{ display: flex; align-items: center; gap: 12px; }
.lbv-ava{ position: relative; flex: none; }
.lbv-ava .lb-ava{ font-size: 24px; box-shadow: 0 0 0 3px #f5c542; }
.lbv-ava .lb-crown{ position: absolute; left: 50%; top: -15px; transform: translateX(-50%); }
.lbv-ava .lb-crown svg{ width: 26px; height: 20px; filter: drop-shadow(0 0 5px rgba(245,197,66,.7)); }
.lbv-who{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lbv-who b{ display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 900; }
.lbv-who b > span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbv-who small{ font-size: 12.5px; font-weight: 800; color: #ffe08a; }
.lbv-vip{ flex: none; font-style: normal; font-size: 11px; font-weight: 900; color: #2a1d00; background: #f5c542; border-radius: 999px; padding: 2px 7px; }
.lbv-x{ width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer; }
.lbv-stats{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lbv-stats > span{ display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 13px; background: rgba(255,255,255,.06); min-width: 0; }
.lbv-stats b{ font-size: 15px; font-weight: 900; white-space: nowrap; }
.lbv-stats b.is-gold{ color: #ffe08a; }
.lbv-stats small{ font-size: 11px; font-weight: 800; color: #a9adc9; text-align: center; }
.lbv-h{ display: flex; justify-content: space-between; align-items: center; margin: 2px 2px -4px; font-size: 12.5px; font-weight: 900; color: #a9adc9; text-transform: uppercase; letter-spacing: .5px; }
.lbv-eye{ text-transform: none; letter-spacing: 0; color: #9fd0ff; font-size: 12px; }
.lbv-stage{ position: relative; width: 100%; aspect-ratio: 390 / 372; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(rgba(10,12,30,.05),rgba(10,12,30,.25)), url("assets/bg_farm.webp?h=8abd061519") center 62% / cover no-repeat; }
.lbv-stage .lb-empty{ position: absolute; inset: 40% 12% auto; background: rgba(22,27,54,.85); }
/* голуби — в поле с отступами: сцена обрезает края, а звёзды тира стоят под лапками переднего ряда */
.lbv-field{ position: absolute; inset: 3% 3% 13%; }
.lbv-slot{ position: absolute; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transform: translate(-50%, 0) scale(.92); transform-origin: 50% 100%; }
/* дыхание — как у своих голубей на главной (profile.css: scIdle) */
.lbv-slot img{ width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none;
  transform-origin: 50% 95%; animation: scIdle 2.4s ease-in-out infinite; animation-delay: var(--sc-delay, 0s); }
.lbv-slot:active img{ transform: scale(1.06, .94); }
.lbv-slot.rarity-epic img{ filter: drop-shadow(0 0 7px rgba(178,76,255,.75)); }
.lbv-slot.rarity-legendary img{ filter: drop-shadow(0 0 8px rgba(255,200,60,.85)); }
.lbv-slot.rarity-mythical img{ filter: drop-shadow(0 0 9px rgba(63,224,154,.9)); }
.lbv-slot.rarity-exclusive img{ filter: drop-shadow(0 0 8px rgba(63,209,192,.9)); }
.lbv-note{ padding: 10px 12px; border-radius: 14px; background: rgba(110,160,255,.12); border: 1px solid rgba(110,160,255,.35); font-size: 12.5px; font-weight: 800; color: #dbe6ff; line-height: 1.35; }
.lbv-close{ height: 50px; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer; }

/* названия рейтингов: на узком экране — короткие («Ловец», «Воры») */
.lb-chip__s{ display: none; }
@media (max-width: 420px){ .lb-chip__l{ display: none; } .lb-chip__s{ display: inline; } }

/* 🎁 у заголовка — окно «Награды недели» */
.lb-head{ flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lb-head__t{ min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-gift{ flex: none; position: relative; width: 48px; height: 48px; margin-top: -2px; padding: 0; border-radius: 15px; cursor: pointer;
  border: 1.5px solid rgba(245,197,66,.75); background: linear-gradient(180deg, rgba(245,197,66,.28), rgba(245,197,66,.1));
  box-shadow: 0 0 14px rgba(245,197,66,.35); display: grid; place-items: center; animation: lbGift 2.6s ease-in-out infinite; }
.lb-gift img{ width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.lb-gift:active{ transform: scale(.94); }
@keyframes lbGift{ 0%,82%,100%{ transform: rotate(0); } 86%{ transform: rotate(-9deg) scale(1.06); } 90%{ transform: rotate(8deg) scale(1.06); } 94%{ transform: rotate(-4deg); } }

.lbr-sheet{ gap: 10px; }
.lbr-head{ display: flex; align-items: center; gap: 12px; }
.lbr-head img{ width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 0 10px rgba(245,197,66,.45)); }
.lbr-head span{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbr-head b{ font-size: 21px; font-weight: 900; }
.lbr-head small{ font-size: 12.5px; font-weight: 800; color: #a9adc9; }
.lbr-list{ display: flex; flex-direction: column; gap: 8px; }
.lbr-row{ display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.lbr-row.is-1{ background: linear-gradient(90deg, rgba(245,197,66,.2), rgba(255,255,255,.04)); border-color: rgba(245,197,66,.55); }
.lbr-row.is-2{ background: linear-gradient(90deg, rgba(201,209,230,.16), rgba(255,255,255,.04)); border-color: rgba(201,209,230,.4); }
.lbr-row.is-3{ background: linear-gradient(90deg, rgba(208,138,79,.18), rgba(255,255,255,.04)); border-color: rgba(208,138,79,.45); }
.lbr-medal{ flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; align-content: center; background: rgba(0,0,0,.25); font-size: 28px; line-height: 1; }
.lbr-medal img{ width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.lbr-medal.is-1, .lbr-medal.is-2, .lbr-medal.is-3{ background: none; }
.lbr-medal b{ font-size: 15px; font-weight: 900; color: #fff; }
.lbr-medal small{ font-size: 9.5px; font-weight: 800; color: #a9adc9; margin-top: 2px; }
.lbr-rw{ flex: 1; min-width: 0; }
.lbr-cup{ display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(245,197,66,.1); border: 1px solid rgba(245,197,66,.35); }
.lbr-cup > span{ flex: none; display: flex; }
.lbr-cup > span img{ width: 30px; height: 30px; object-fit: contain; margin-right: -8px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.lbr-cup > span img:last-child{ margin-right: 0; }
.lbr-cup b{ display: block; font-size: 13.5px; font-weight: 900; color: #ffe08a; }
.lbr-cup small{ display: block; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: #d9cfb0; line-height: 1.3; }
.lbr-card{ display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.lbr-card > b{ font-size: 13.5px; font-weight: 900; }
.lbr-pt{ display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: 13px; font-weight: 800; }
.lbr-pt em{ font-style: normal; color: #ffe08a; font-weight: 900; text-align: right; }
.lbr-pt small{ grid-column: 1 / -1; font-size: 11.5px; font-weight: 700; color: #a9adc9; }
.lbr-pt.is-zero{ color: #a9adc9; } .lbr-pt.is-zero em{ color: #a9adc9; }
.lbr-note{ font-size: 12px; font-weight: 700; color: #a9adc9; text-align: center; line-height: 1.35; }

/* кубок «Чемпион недели» у имени (топ, соседи, профиль) */
.champ-cup{ display: inline-block; flex: none; margin-left: 4px; font-style: normal; font-size: .95em; line-height: 1; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
img.champ-cup{ width: 1.45em; height: 1.45em; object-fit: contain; vertical-align: middle; margin-top: -.2em; margin-bottom: -.2em; }

