/* ============================================================
   PromptFight :: кабинет / магазин / профиль / вход
   Общий стиль «бумажных» страниц поверх style.css.
   ============================================================ */

/* --- монета (заглушка) --------------------------------------------------- */
.coin {
  width: 18px; height: 18px;
  flex: none;
  vertical-align: -3px;
}
.coin.big { width: 26px; height: 26px; }

.coin-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  background: var(--gold-soft);
  border: var(--bw) solid var(--gold-edge);
  border-radius: var(--r-ctl);
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
}
.coin-chip b { font-family: "Golos Text", system-ui, sans-serif; font-size: 16px; }

/* --- вход ---------------------------------------------------------------- */
.auth-wrap {
  flex: 1 0 auto;
  display: flex; justify-content: center;
  padding: 40px 20px 56px;
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  padding: 26px 26px 22px;
}
.auth-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 24px;
  margin-bottom: 18px;
}
.auth-title .lucide { color: var(--accent); }

/* --- повторная отправка письма подтверждения ----------------------------- */
.resend-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.resend-row .lucide { width: 15px; height: 15px; color: var(--gold); flex: none; }
.resend-row .btn { margin-left: auto; }

.tabs {
  display: flex; gap: 8px;
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  height: 40px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 800; font-size: 14px;
  color: var(--ink-soft);
  background: var(--raised);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-ctl);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.tab:hover { border-color: var(--ink); color: var(--ink); }
.tab.sel {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--on-accent);
  box-shadow: var(--sh-ctl);
}

.auth-form .field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px; font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 600; font-size: 14.5px;
  color: var(--ink);
  background: var(--raised);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 10px 13px;
  outline: none;
  transition: border-color .15s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 84px; resize: vertical; }
.field .counter {
  text-align: right; font-size: 11.5px; font-weight: 700;
  color: var(--muted); margin-top: 3px;
}
.field .counter.over { color: var(--red); font-weight: 800; }

.btn.wide { width: 100%; }

.auth-switch {
  text-align: center;
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  margin-top: 14px;
}
.auth-switch a { color: var(--accent); font-weight: 800; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-ok, .auth-err {
  display: flex; align-items: flex-start; gap: 10px;
  border-radius: var(--r-ctl);
  padding: 12px 14px;
  font-size: 14px; font-weight: 600;
  margin-bottom: 16px;
  border: var(--bw) solid;
}
.auth-ok { background: var(--a-soft); border-color: var(--a-edge); color: var(--ink); }
.auth-err { background: var(--red-soft); border-color: var(--red-edge); color: var(--ink); }
.auth-ok .lucide { color: var(--a); flex: none; }
.auth-err .lucide { color: var(--red); flex: none; }

.auth-note {
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.45;
}

.oauth { margin-top: 20px; border-top: 2px dashed var(--line-strong); padding-top: 16px; }
.oauth-lbl {
  font-size: 12px; font-weight: 800; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 10px;
}
.oauth-row { display: flex; flex-wrap: wrap; gap: 8px; }
.oauth-btn { flex: 1 1 130px; }

/* --- кабинет --------------------------------------------------------------- */
.cab-wrap {
  flex: 1 0 auto;
  max-width: 1120px; width: 100%;
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: var(--raised);
  border-bottom: var(--bw) solid var(--ink);
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 18px;
}
.panel-head .lucide { color: var(--accent); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px 18px; }

.cab-rooms { position: sticky; top: 16px; }

.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--raised);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 10px 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.room-item:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.room-item .r-ico {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: var(--bw) solid var(--ink);
  background: var(--surface);
}
.room-item .r-ico .lucide { width: 19px; height: 19px; }
.room-item.done  .r-ico { background: var(--a-soft); border-color: var(--a-edge); color: var(--a); }
.room-item.fight .r-ico { background: var(--b-soft); border-color: var(--b-edge); color: var(--b); }
.room-item.judge .r-ico { background: var(--gold-soft); border-color: var(--gold-edge); color: var(--gold); }
.room-item.lobby .r-ico { background: var(--red-soft); border-color: var(--red-edge); color: var(--red); }
.room-item .r-main { flex: 1; min-width: 0; }
.room-item .r-title {
  font-weight: 800; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.room-item .r-sub {
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.room-item .r-verdict {
  flex: none;
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--surface);
}
.r-verdict.win  { background: var(--a-soft); border-color: var(--a-edge); }
.r-verdict.loss { background: var(--red-soft); border-color: var(--red-edge); }
.r-verdict.draw { background: var(--gold-soft); border-color: var(--gold-edge); }

.empty-rooms {
  text-align: center;
  padding: 26px 14px;
  color: var(--muted);
  font-weight: 600; font-size: 13.5px;
  line-height: 1.5;
}
.empty-rooms .lucide { width: 30px; height: 30px; margin-bottom: 8px; color: var(--line-strong); }

.quota-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
}
.quota-bar {
  flex: 1; height: 10px;
  background: var(--paper-deep);
  border: 2px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}
.quota-bar i {
  display: block; height: 100%;
  background: var(--accent);
  transition: width .3s var(--ease);
}

/* --- статистика ------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-cell {
  background: var(--raised);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 12px 8px;
  text-align: center;
}
.stat-cell .n {
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 24px;
  line-height: 1;
}
.stat-cell .l {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--ink-soft);
  margin-top: 5px;
}
.stat-cell.win  .n { color: var(--a); }
.stat-cell.draw .n { color: var(--gold); }
.stat-cell.loss .n { color: var(--red); }

/* --- профиль в кабинете ------------------------------------------------------- */
.me-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.me-avatar {
  width: 84px; height: 84px; flex: none;
  border: var(--bw) solid var(--ink);
  border-radius: 14px;
  background: var(--raised);
  overflow: hidden;
  box-shadow: var(--sh-ctl);
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.me-title h3 {
  font-family: "Golos Text", system-ui, sans-serif; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.me-sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 3px; }

.skin-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.skin-pick .sp {
  width: 74px;
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-card);
  background: var(--raised);
  padding: 6px;
  text-align: center;
  cursor: pointer;
  font-size: 10.5px; font-weight: 700; color: var(--ink-soft);
  transition: all .15s var(--ease);
}
.skin-pick .sp img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--line-strong);
  margin-bottom: 4px;
  background: var(--surface);
}
.skin-pick .sp:hover { border-color: var(--ink); }
.skin-pick .sp.sel {
  border-color: var(--ink);
  background: var(--b-soft);
  box-shadow: var(--sh-ctl);
  color: var(--ink);
}
.skin-pick .sp.sel img { border-color: var(--ink); }

.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --- магазин ------------------------------------------------------------------ */
.shop-wrap {
  flex: 1 0 auto;
  max-width: 1120px; width: 100%;
  margin: 0 auto;
  padding: 26px 20px 60px;
}
.shop-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.shop-head h2 {
  font-family: "Golos Text", system-ui, sans-serif; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.shop-head h2 .lucide { color: var(--accent); }
.shop-head .spacer { flex: 1; }

.shop-controls {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 18px;
}
.search-box {
  position: relative; flex: 1 1 220px; max-width: 320px;
}
.search-box .lucide {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 34px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 600; font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-ctl);
  outline: none;
}
.search-box input:focus { border-color: var(--ink); }

.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-chip {
  height: 34px;
  padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 800; font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.cat-chip:hover { border-color: var(--ink); }
.cat-chip.sel {
  background: var(--ink); color: var(--paper);
  border-color: var(--ink);
}

.sort-sel {
  height: 40px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 13.5px;
  color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--line-strong);
  border-radius: var(--r-ctl);
  padding: 0 10px;
  cursor: pointer;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.skin-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: transform .16s var(--ease);
}
.skin-card:hover { transform: translate(-2px, -2px); }
.skin-card .sc-img {
  aspect-ratio: 1;
  background: var(--raised);
  border-bottom: var(--bw) solid var(--ink);
  position: relative;
}
.skin-card .sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.skin-card .sc-badge {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--gold);
  text-transform: uppercase;
}
.skin-card .sc-badge.excl { background: #e5d8ff; color: #241b12; }
.skin-card .sc-badge.owned { background: var(--a); color: #12291c; }
.skin-card .sc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.skin-card .sc-name { font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 16.5px; }
.skin-card .sc-cat {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--muted);
}
.skin-card .sc-desc { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.45; flex: 1; }
.skin-card .sc-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.skin-card .sc-price {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 17px;
}
.skin-card .sc-foot .btn { margin-left: auto; }
.skin-card.is-owned .sc-img { opacity: 0.96; }

.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted); font-weight: 600;
  padding: 40px 0;
}

.howto {
  margin-top: 26px;
  border: var(--bw) dashed var(--line-strong);
  border-radius: var(--r-panel);
  background: var(--surface);
}
.howto summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  font-family: "Golos Text", system-ui, sans-serif; font-weight: 700; font-size: 16px;
  cursor: pointer;
  color: var(--ink);
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary .lucide { color: var(--accent); }
.howto .howto-body {
  padding: 0 18px 18px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.6;
}
.howto ol { margin: 8px 0 10px; padding-left: 20px; }
.howto li { margin-bottom: 6px; }
.howto code {
  font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12px;
  background: var(--raised);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

/* --- публичный профиль ---------------------------------------------------------- */
/* Карточки (профиль, история боёв, 404) идут колонкой по центру с отступом между
   собой — иначе история боёв встаёт в один ряд с профилем и прижимается к нему. */
.prof-wrap {
  flex: 1 0 auto;
  display: flex; flex-direction: column; align-items: center;
  gap: 28px;
  padding: 36px 20px 60px;
}
.prof-card {
  width: 100%; max-width: 720px;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.prof-banner {
  height: 86px;
  background: repeating-linear-gradient(-45deg,
    var(--accent) 0 26px, var(--ink) 26px 30px, var(--a) 30px 56px, var(--ink) 56px 60px);
  border-bottom: var(--bw) solid var(--ink);
}
.prof-head {
  display: flex; align-items: flex-end; gap: 18px;
  padding: 0 26px 18px;
  margin-top: -34px;
}
.prof-avatar {
  width: 108px; height: 108px; flex: none;
  border: var(--bw) solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--raised);
  box-shadow: var(--sh-card);
}
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { padding-bottom: 6px; min-width: 0; }
.prof-name h2 {
  font-family: "Golos Text", system-ui, sans-serif; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  overflow-wrap: anywhere;
}
.prof-name .p-sub { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.prof-desc {
  padding: 0 26px 20px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.55;
}
.prof-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: var(--bw) solid var(--ink);
  background: var(--raised);
}
.prof-stats .ps {
  padding: 16px 6px;
  text-align: center;
  border-right: 2px solid var(--line);
}
.prof-stats .ps:last-child { border-right: none; }
.prof-stats .ps .n {
  font-family: "Golos Text", system-ui, sans-serif; font-size: 24px; font-weight: 700; line-height: 1;
}
.prof-stats .ps .l {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--ink-soft);
  margin-top: 5px;
}
.prof-stats .ps.win .n { color: var(--a); }
.prof-stats .ps.draw .n { color: var(--gold); }
.prof-stats .ps.loss .n { color: var(--red); }
.prof-stats .ps.rating .n { color: var(--gold); }
.prof-stats .ps.coins .n { color: var(--accent); }

.prof-note {
  padding: 12px 26px 20px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}

.prof-404 { text-align: center; padding: 50px 30px; }
.prof-404 .lucide { width: 44px; height: 44px; color: var(--red); margin-bottom: 12px; }
.prof-404 b { font-family: "Golos Text", system-ui, sans-serif; font-size: 20px; display: block; margin-bottom: 6px; }

/* --- адаптив --------------------------------------------------------------------- */
@media (max-width: 860px) {
  .cab-wrap { grid-template-columns: 1fr; }
  .cab-rooms { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .prof-stats { grid-template-columns: repeat(3, 1fr); }
  .prof-stats .ps:nth-child(3n) { border-right: none; }
  .prof-stats .ps { border-bottom: 2px solid var(--line); }
  .prof-head { flex-direction: column; align-items: center; text-align: center; }
  .prof-name h2 { justify-content: center; }
}

/* --- ежедневная крутка ------------------------------------------------------------ */
.daily-row { display: flex; align-items: center; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.daily-row > div:first-child { flex: 1 1 260px; min-width: 0; }
/* К3: зелёная точка у статуса крутки убрана — смысла в ней не было.
   К2: подсказка «Раз в сутки» выровнена по левому краю блока. */
.daily-state { font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.daily-row .hint { text-align: left; margin: 6px 0 0; }
#btn-daily { flex: none; }

/* --- фон зала суда на второстепенных страницах (кабинет, магазин, профиль, вход) --- */
.cab-wrap, .shop-wrap, .prof-wrap, .auth-wrap { position: relative; z-index: 1; }
.footer { position: relative; z-index: 1; }

/* --- крутка монет: барабан ---------------------------------------------------------- */
.daily-game { display: flex; align-items: center; gap: 16px; flex: none; }
.spin-reel {
  position: relative;
  width: 118px; height: 52px;
  overflow: hidden;
  border-radius: 10px;
  background: #10151d;
  border: 1px solid #3a4453;
  box-shadow: inset 0 10px 14px -10px rgba(0,0,0,.85), inset 0 -10px 14px -10px rgba(0,0,0,.85);
}
.spin-strip { display: flex; flex-direction: column; will-change: transform; }
.spin-cell {
  height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 21px; font-weight: 800; color: #e8ebef;
  border-bottom: 1px solid #232c39;
}
.spin-cell img.coin, .spin-cell .coin { width: 18px; height: 18px; }
.spin-cell img { width: 18px; height: 18px; }
.spin-cell.jackpot { color: #ffce67; text-shadow: 0 0 14px rgba(255, 206, 103, .45); }
.spin-cell.win { color: #9fe0c6; }
.spin-cell.jackpot.win { color: #ffd98a; }
.spin-pin {
  position: absolute; left: 0; right: 0; top: 50%; height: 0;
  border-top: 2px solid #d6b36a;
  pointer-events: none;
}
.spin-reel.spinning .spin-pin { animation: reel-pulse .5s ease-in-out infinite alternate; }
@keyframes reel-pulse { from { opacity: .5; } to { opacity: 1; } }
.spin-reel.jackpot { border-color: #d6b36a; box-shadow: 0 0 18px rgba(214, 179, 106, .35), inset 0 10px 14px -10px rgba(0,0,0,.85); }

/* --- история боёв в профиле ---------------------------------------------------- */
.pb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-bottom: var(--bw) solid var(--ink);
  background: var(--raised);
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 17px; font-weight: 700;
}
.pb-head .lucide { color: var(--accent); }
.pb-body { padding: 16px 18px 8px; }
.pager {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
  padding: 12px 0 16px;
}
.pager button:disabled { opacity: .4; cursor: default; }
#pg-label {
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  min-width: 48px; text-align: center;
}

/* --- ТОП-100: зал славы ---------------------------------------------------------- */
.top-wrap {
  flex: 1 0 auto;
  display: flex; justify-content: center;
  padding: 36px 20px 60px;
  position: relative; z-index: 1;
}
.top-panel {
  width: 100%; max-width: 980px;
  background: var(--surface);
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.top-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 26px;
  border-bottom: var(--bw) solid var(--ink);
  background: var(--raised);
}
.top-head > .lucide { width: 30px; height: 30px; color: var(--gold); flex: none; }
.top-head h2 {
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 24px; font-weight: 700; line-height: 1.15;
}
.top-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.table-scroll { overflow-x: auto; }
.top-table { width: 100%; border-collapse: collapse; min-width: 660px; }
.top-table thead th {
  position: sticky; top: 0;
  background: var(--surface-deep, var(--raised));
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 10px 12px;
  border-bottom: var(--bw) solid var(--ink);
  text-align: left;
}
.top-table thead th.num { text-align: center; }
.top-table td {
  padding: 9px 12px;
  border-bottom: 2px solid var(--line);
  font-size: 14px; font-weight: 600;
  background: var(--surface);
}
.top-table tbody tr:last-child td { border-bottom: none; }
.top-table tbody tr:hover td { background: var(--raised); }
.top-table .num {
  text-align: center;
  font-family: "Golos Text", system-ui, sans-serif;
  font-weight: 700;
  white-space: nowrap;
}
.place-cell { width: 74px; }
.place-cell .place { color: var(--ink-soft); }
.medal {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--ink);
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 14px; font-weight: 800;
  box-shadow: 2px 2px 0 rgba(0,0,0,.18);
}
/* контрастный текст: золото 7.1:1, серебро 11.5:1, бронза 7.8:1 (WCAG AAA) */
.medal.gold   { background: #ffd76b; color: rgb(133 0 85); }
.medal.silver { background: #e3eaf2; color: rgb(30 45 66); }
.medal.bronze { background: #f0b48a; color: rgb(74 31 7); }
.tp-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-ava {
  width: 38px; height: 38px; flex: none;
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--raised);
}
.tp-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-name {
  font-weight: 800; color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tp-name:hover { color: var(--accent); text-decoration: underline; }
.rating-cell { font-size: 15px; font-weight: 800; }
.win-num  { color: var(--a); }
.draw-num { color: var(--gold); }
.loss-num { color: var(--red); }
.top-empty {
  text-align: center;
  padding: 46px 30px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface);
}
.top-empty .lucide { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 10px; }
.top-empty b { font-family: "Golos Text", system-ui, sans-serif; font-size: 19px; display: block; margin-bottom: 6px; color: var(--ink); }
.top-empty .hint { display: block; }

@media (max-width: 640px) {
  .top-head { padding: 14px 18px; }
  .top-head h2 { font-size: 20px; }
}
