/* Тема «Кошелёк (B)»: рейтинг. Mobile-first, макет LK-Rating. */

html.dark.lk-theme-wallet .lk-b-rt {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding:16px 12px 24px !important;
  box-sizing: border-box;
  font-family:var(--lk-font, "Onest", system-ui, sans-serif) !important;
  color:#ececee !important;
}
html.dark.lk-theme-wallet .lk-b-rt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html.dark.lk-theme-wallet .lk-b-rt-title {
  margin: 0;
  font-family:var(--lk-display, "Unbounded", sans-serif) !important;
  font-size:24px !important;
  font-weight:700 !important;
  color:#ececee !important;
}
html.dark.lk-theme-wallet .lk-b-rt-servers {
  display: flex;
  gap: 4px;
  padding:4px !important;
  border-radius:12px !important;
  background:#1d1e23 !important;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
html.dark.lk-theme-wallet .lk-b-rt-servers::-webkit-scrollbar { display: none; }
html.dark.lk-theme-wallet .lk-b-rt-server {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding:0 14px !important;
  border-radius:9px !important;
  color: #a6a7ad !important;
  text-decoration: none !important;
  font-weight:600 !important;
  white-space: nowrap;
}
html.dark.lk-theme-wallet .lk-b-rt-server.is-active { background: #2c2d33; color: #ececee !important; }

/* Вкладки */
html.dark.lk-theme-wallet .lk-b-rt-board { display: flex; flex-direction: column; gap: 14px; }
html.dark.lk-theme-wallet .lk-b-rt-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -12px;
  padding:0 12px 2px !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
html.dark.lk-theme-wallet .lk-b-rt-tabs::-webkit-scrollbar { display: none; }
html.dark.lk-theme-wallet .lk-b-rt-tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding:0 16px !important;
  border-radius:999px !important;
  border:0 !important;
  background:#26272c !important;
  color:#ececee !important;
  font: inherit;
  font-weight:600 !important;
  white-space: nowrap;
  cursor: pointer;
}
html.dark.lk-theme-wallet .lk-b-rt-tab.is-active { background: #f2b94b; color: #1a1408; font-weight: 700; }
html.dark.lk-theme-wallet .lk-b-rt-tab:focus-visible { outline: 2px solid #f2b94b; outline-offset: 2px; }
html.dark.lk-theme-wallet .lk-b-rt-pane { display: flex; flex-direction: column; gap: 12px; }

/* Аватар, онлайн, герб */
html.dark.lk-theme-wallet .lk-b-rt-avatar { position: relative; flex: 0 0 auto; width: 34px; height: 34px; }
html.dark.lk-theme-wallet .lk-b-rt-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; display: block; }
html.dark.lk-theme-wallet .lk-b-rt-online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius:50% !important;
  background:#7fd6a3 !important;
  border:2px solid #1d1e23 !important;
}
html.dark.lk-theme-wallet .lk-b-rt-crest { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
html.dark.lk-theme-wallet .lk-b-rt-crest svg,
html.dark.lk-theme-wallet .lk-b-rt-crest img { width: 22px; height: 22px; }
html.dark.lk-theme-wallet .lk-b-rt-crest--sm svg,
html.dark.lk-theme-wallet .lk-b-rt-crest--sm img { width: 16px; height: 16px; }

/* Пьедестал */
html.dark.lk-theme-wallet .lk-b-rt-podium { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "place who metric" "place meta metric";
  align-items: center;
  gap: 2px 12px;
  padding:14px !important;
  border-radius:18px !important;
  border:1px solid #2c2d33 !important;
  background:#1d1e23 !important;
}
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-1 { background: #2a2416; border-color: #f2b94b; }
html.dark.lk-theme-wallet .lk-b-rt-podium__place {
  grid-area: place;
  width: 34px;
  height: 34px;
  border-radius:50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family:var(--lk-display, "Unbounded", sans-serif) !important;
  font-weight:700 !important;
  background:#26272c !important;
  color:#ececee !important;
}
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-1 .lk-b-rt-podium__place { background: #f2b94b; color: #1a1408; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-2 .lk-b-rt-podium__place { background: #c9cad0; color: #131417; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-3 .lk-b-rt-podium__place { background: #c98a5a; color: #131417; }
html.dark.lk-theme-wallet .lk-b-rt-podium__who { grid-area: who; display: flex; align-items: center; gap: 8px; min-width: 0; }
html.dark.lk-theme-wallet .lk-b-rt-podium__name { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dark.lk-theme-wallet .lk-b-rt-podium__meta { grid-area: meta; color: #a6a7ad; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dark.lk-theme-wallet .lk-b-rt-podium__metric { grid-area: metric; display: flex; flex-direction: column; align-items: flex-end; }
html.dark.lk-theme-wallet .lk-b-rt-podium__metric small { color: #a6a7ad; font-size: 11px; }
html.dark.lk-theme-wallet .lk-b-rt-podium__metric b { font-size: 18px; color: #f2b94b; font-variant-numeric: tabular-nums; }

/* Список: телефон — карточки строк */
html.dark.lk-theme-wallet .lk-b-rt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.dark.lk-theme-wallet .lk-b-rt-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  padding:10px 12px !important;
  border-radius:14px !important;
  background:#1d1e23 !important;
  border:1px solid #2c2d33 !important;
}
html.dark.lk-theme-wallet .lk-b-rt-row--head { display: none; }
html.dark.lk-theme-wallet .lk-b-rt-row.is-top { border-color: #5a4a20; }
html.dark.lk-theme-wallet .lk-b-rt-row.is-place-1 { background: #2a2416; border-color: #f2b94b; }
html.dark.lk-theme-wallet .lk-b-rt-rank { color: #a6a7ad; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
html.dark.lk-theme-wallet .lk-b-rt-row.is-top .lk-b-rt-rank { color: #f2b94b; }
html.dark.lk-theme-wallet .lk-b-rt-nick { display: flex; align-items: center; gap: 10px; min-width: 0; }
html.dark.lk-theme-wallet .lk-b-rt-nick__text { display: flex; flex-direction: column; min-width: 0; }
html.dark.lk-theme-wallet .lk-b-rt-nick__text b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dark.lk-theme-wallet .lk-b-rt-nick__text b a { color: #ececee !important; text-decoration: none; }
html.dark.lk-theme-wallet .lk-b-rt-nick__text small { color: #a6a7ad; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.dark.lk-theme-wallet .lk-b-rt-col-clan { display: none; min-width: 0; color: #a6a7ad; }
html.dark.lk-theme-wallet .lk-b-rt-col-clan .lk-rating__cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
html.dark.lk-theme-wallet .lk-b-rt-col-clan a { color: #ececee !important; text-decoration: none; }
html.dark.lk-theme-wallet .lk-b-rt-col-num { text-align: right; font-variant-numeric: tabular-nums; color: #a6a7ad; white-space: nowrap; }
html.dark.lk-theme-wallet .lk-b-rt-col-num.is-metric { color: #f2b94b; font-weight: 700; font-size: 15px; }
/* На телефоне: уровень прячем, если есть отдельная метрика — остаётся одно число справа */
html.dark.lk-theme-wallet .lk-b-rt-row:not(.is-level) > .lk-b-rt-col-num:not(.is-metric) { display: none; }
html.dark.lk-theme-wallet .lk-b-rt-list--clan .lk-b-rt-row > .lk-b-rt-col-num:not(.is-metric) { display: none; }

/* Замки */
html.dark.lk-theme-wallet .lk-b-rt-castles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
html.dark.lk-theme-wallet .lk-b-rt-castle {
  padding:16px !important;
  border-radius:18px !important;
  border:1px solid #2c2d33 !important;
  background:#1d1e23 !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.dark.lk-theme-wallet .lk-b-rt-castle__head { display: flex; align-items: center; gap: 8px; }
html.dark.lk-theme-wallet .lk-b-rt-castle__head b { font-size: 16px; flex: 1; }
html.dark.lk-theme-wallet .lk-b-rt-castle__tax { padding: 3px 10px; border-radius: 999px; background: #26272c; color: #a6a7ad; font-size: 12.5px; }
html.dark.lk-theme-wallet .lk-b-rt-castle__facts {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  font-size:14px !important;
}
html.dark.lk-theme-wallet .lk-b-rt-castle__facts dt { color: #a6a7ad; }
html.dark.lk-theme-wallet .lk-b-rt-castle__facts dd { margin: 0; text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
html.dark.lk-theme-wallet .lk-b-rt-castle__facts dd.is-metric { color: #f2b94b; font-weight: 700; }

/* Старые обёртки MoonShine вокруг блока */
html.dark.lk-theme-wallet .lk-b-rt .lk-rating__panel,
html.dark.lk-theme-wallet .lk-b-rt .box { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }

/* ---------- Планшет и шире: таблица ---------- */
@media (min-width: 640px) {
  html.dark.lk-theme-wallet .lk-b-rt { padding: 24px 20px 32px; }
  html.dark.lk-theme-wallet .lk-b-rt-title { font-size: 28px; }
  html.dark.lk-theme-wallet .lk-b-rt-tabs { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
  html.dark.lk-theme-wallet .lk-b-rt-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.dark.lk-theme-wallet .lk-b-rt-podium__card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "place metric" "who who" "meta meta";
    padding:18px !important;
    gap: 8px;
  }
  html.dark.lk-theme-wallet .lk-b-rt-castles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  html.dark.lk-theme-wallet .lk-b-rt-list {
    gap: 0;
    border-radius:18px !important;
    border:1px solid #2c2d33 !important;
    background:#1d1e23 !important;
    overflow: hidden;
  }
  html.dark.lk-theme-wallet .lk-b-rt-row,
  html.dark.lk-theme-wallet .lk-b-rt-list--clan .lk-b-rt-row {
    grid-template-columns: 44px minmax(0, 2fr) minmax(0, 1.4fr) 90px 110px;
    border-radius:0 !important;
    border:0 !important;
    border-top:1px solid #2c2d33 !important;
    background:transparent !important;
    padding:10px 14px !important;
  }
  html.dark.lk-theme-wallet .lk-b-rt-list--clan .lk-b-rt-row { grid-template-columns: 44px minmax(0, 2fr) minmax(0, 1.3fr) 80px 120px 100px; }
  html.dark.lk-theme-wallet .lk-b-rt-row.is-level { grid-template-columns: 44px minmax(0, 2fr) minmax(0, 1.4fr) 110px; }
  html.dark.lk-theme-wallet .lk-b-rt-row--head {
    display: grid;
    border-top:0 !important;
    color:#a6a7ad !important;
    font-size:12.5px !important;
    font-weight:600 !important;
  }
  html.dark.lk-theme-wallet .lk-b-rt-row.is-place-1 { background: #201d15; }
  html.dark.lk-theme-wallet .lk-b-rt-col-clan { display: block; }
  html.dark.lk-theme-wallet .lk-b-rt-row:not(.is-level) > .lk-b-rt-col-num:not(.is-metric),
  html.dark.lk-theme-wallet .lk-b-rt-list--clan .lk-b-rt-row > .lk-b-rt-col-num:not(.is-metric) { display: block; }
}
@media (min-width: 1024px) {
  html.dark.lk-theme-wallet .lk-b-rt-castles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Чистовая правка рейтинга ---------- */
html.dark.lk-theme-wallet .lk-b-rt-tab.is-active,
html.dark.lk-theme-wallet .lk-b-rt-tab[aria-selected="true"] {
  background: #f2b94b !important;
  border-color: #f2b94b !important;
  color: #1a1408 !important;
}
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-1 { border-color: #f2b94b !important; background: #2a2416 !important; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-1 .lk-b-rt-podium__place { background: #f2b94b !important; color: #1a1408 !important; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-2 .lk-b-rt-podium__place { background: #c9cad0 !important; color: #17181c !important; }
html.dark.lk-theme-wallet .lk-b-rt-podium__card.is-place-3 .lk-b-rt-podium__place { background: #c98a5a !important; color: #17181c !important; }
