/* moscow.football — page layout on top of the FOOTBALL kit (kit.css, copied from /styleguide/football.css).
   Components come from the kit (fb-*); this file only lays pages out and restyles
   the classes still used by the older pages (Ramorot, History, Stats, Sbor, _Compare, Stat). */

/* ---------- page shell ---------- */
a, button { -webkit-tap-highlight-color: transparent; }
html { background: var(--fb-canvas); }
body.fb-theme {
  margin: 0;
  min-height: 100vh;
  background: var(--fb-page-gradient) fixed, var(--fb-canvas);
  touch-action: pan-x pan-y;
}
.fb-theme a { color: var(--fb-ink); }
.fb-theme h1, .fb-theme h2, .fb-theme h3 { margin: 0; font-family: var(--fb-font); }
.fb-theme h2 { font: 600 20px/1.2 var(--fb-font); }
.fb-theme h3 { font: 600 17px/1.2 var(--fb-font); }
.fb-theme p { margin: 0; }
.fb-theme select, .fb-theme input, .fb-theme button { font-family: var(--fb-font); }
.is-hidden { display: none !important; }

.site {
  display: grid;
  gap: var(--fb-space-5);
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px 16px 140px;
}
.site > * { min-width: 0; }

.site-header { display: flex; align-items: center; gap: 12px; }
.site-header__logo { display: block; width: 44px; height: 44px; flex: none; }
.site-header__logo img { width: 100%; height: 100%; object-fit: contain; }
.site-header .fb-header__title { font-weight: 700; letter-spacing: .02em; }

.section { display: grid; gap: var(--fb-space-3); min-width: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section__head h2 { margin: 0; }
.eyebrow { color: var(--fb-muted); font: 600 12px/1 var(--fb-font); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--fb-muted); }
.small { font-size: 13px; }
.lead { max-width: 72ch; color: var(--fb-ink-soft); }
.num { font-variant-numeric: tabular-nums; }
.good { color: var(--fb-win); }
.bad { color: var(--fb-loss); }
.empty {
  padding: 28px 16px;
  border: 1px dashed var(--fb-line-strong);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  color: var(--fb-muted);
  text-align: center;
}
.panel { padding: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fb-space-2); }

/* links styled as pills */
.fb-btn, .fb-btn:visited { color: #fff; }
.fb-btn--ghost, .fb-btn--ghost:visited { color: var(--fb-ink); }
.fb-btn--sm { min-height: 38px; padding: 0 18px; font-size: 14px; }
.fb-btn--block { width: 100%; }
.fb-btn--win { background: var(--fb-win); box-shadow: 0 8px 24px #1fb36b40; }
.fb-btn--win:hover { background: #27c477; }
.fb-btn--loss { background: var(--fb-loss); box-shadow: 0 8px 24px #e5484d40; }
.fb-btn--loss:hover { background: #f05a5f; }
.fb-chip { display: inline-flex; align-items: center; color: var(--fb-ink); text-decoration: none; }

/* select in the kit's look */
.fb-select, .history-select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238b93a1' stroke-width='1.8'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center;
  color: var(--fb-ink);
  font: 400 15px/1 var(--fb-font);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.fb-select:focus, .history-select:focus { border-color: var(--fb-glow); }
.fb-select option, .history-select option { background: var(--fb-surface-1); color: var(--fb-ink); }

/* leader cards on the home page: three fb-hero in a row, player photo at its own size in the bottom-right corner */
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fb-space-3); }
.leaders .fb-hero > img { inset: auto 20px 20px auto; width: auto; height: auto; z-index: 1; }
.leaders .fb-hero__title { font-size: 26px; }
@media (max-width: 720px) { .leaders { grid-template-columns: 1fr; } }

/* quick links on the home page */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fb-space-3); }
.quick__item {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  color: var(--fb-ink);
  text-decoration: none;
  transition: border-color .15s;
}
.quick__item:hover { border-color: var(--fb-glow); }
.quick__item b { font-size: 17px; font-weight: 600; }
.quick__item span { color: var(--fb-muted); font-size: 13px; }
.quick__item .fb-icon { color: var(--fb-glow); margin-bottom: 6px; }

/* ---------- 3D & 2D pitch ---------- */
.section__head--lineup { align-items: center; }
.section__title-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.pitch-toggle {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-1);
}
.pitch-toggle__btn {
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: transparent;
  color: var(--fb-muted);
  font: 600 12px/1 var(--fb-font);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pitch-toggle__btn:hover:not(:disabled) { color: var(--fb-ink); background: var(--fb-surface-2); }
.pitch-toggle__btn.is-active { background: var(--fb-accent); color: #fff; box-shadow: 0 4px 14px #0f47f259; }
.pitch-toggle__btn:disabled { opacity: .4; cursor: default; }

.pitch3d {
  position: relative;
  height: clamp(340px, 62vw, 560px);
  overflow: hidden;
}
.pitch3d canvas { display: block; width: 100%; height: 100%; border-radius: inherit; corner-shape: squircle; cursor: grab; }
.pitch3d canvas:active { cursor: grabbing; }
.pitch3d__hud {
  position: absolute;
  inset: 14px 14px auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.pitch3d__team { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: #0b0e13b3; backdrop-filter: blur(6px); font-size: 13px; }
.pitch3d__team::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--team); }
.pitch3d__team--blue { --team: var(--fb-team-blue); }
.pitch3d__team--red { --team: var(--fb-team-red); }
.pitch3d__note { position: absolute; left: 14px; bottom: 12px; z-index: 2; padding: 4px 10px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: #0b0e13b3; color: var(--fb-muted); font-size: 12px; pointer-events: none; }
.pitch3d--2d .pitch3d__note { display: none; }
.pitch3d .fb-pitch { height: 100%; aspect-ratio: auto; border: 0; border-radius: inherit; corner-shape: squircle; }
.pitch3d__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fb-muted); }

.pitch2d {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  corner-shape: squircle;
  background:
    radial-gradient(80% 50% at 50% 0, #12308a66, transparent 72%),
    repeating-linear-gradient(90deg, #ffffff05 0 8.333%, transparent 8.333% 16.666%),
    #0d1118;
  overflow: hidden;
}
.pitch2d--portrait {
  background:
    radial-gradient(80% 45% at 50% 0, #12308a66, transparent 70%),
    repeating-linear-gradient(180deg, #ffffff05 0 8.333%, transparent 8.333% 16.666%),
    #0d1118;
}
.pitch2d__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--fb-line-strong);
  stroke-width: 1.4;
  pointer-events: none;
}
.pitch2d__lines * { vector-effect: non-scaling-stroke; }
.pitch2d__spot { fill: var(--fb-line-strong); stroke: none; }
.pitch2d__goal { stroke: var(--fb-line); stroke-dasharray: 2 2; }
.pitch2d__player {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fb-ink);
  font-family: var(--fb-font);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.pitch2d__player:hover,
.pitch2d__player:focus-visible { z-index: 3; }
.pitch2d__player .fb-avatar {
  --fb-avatar: 42px;
  border-width: 2px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pitch2d__player .fb-avatar img { position: absolute; inset: 0; }
.pitch2d__player .fb-avatar .fb-rating { z-index: 1; }
.pitch2d__player:hover .fb-avatar,
.pitch2d__player:focus-visible .fb-avatar {
  transform: scale(1.07);
  box-shadow: 0 0 0 3px #ffffff1f;
}
.pitch2d__initials { line-height: 1; }
.pitch2d__name {
  max-width: 112px;
  padding: 2px 8px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: #0b0e13d9;
  color: var(--fb-ink);
  font: 500 11px/1.25 var(--fb-font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pitch2d__stats {
  max-width: 120px;
  padding: 1px 6px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: #0b0e13b3;
  color: var(--fb-ink-soft);
  font: 500 10px/1.2 var(--fb-font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .pitch2d__player .fb-avatar { transition: none; }
}

/* ---------- signup (sbor) ---------- */
.sbor-groups { display: grid; gap: var(--fb-space-4); }
.sbor-group { display: grid; gap: 8px; }
.sbor-group__title { display: flex; align-items: center; gap: 8px; color: var(--fb-muted); font-size: 13px; }
.sbor-group__title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--fb-muted)); }
.sbor-group--blue { --dot: var(--fb-team-blue); }
.sbor-group--red { --dot: var(--fb-team-red); }
.sbor-group--wait { --dot: var(--fb-live); }
.sbor-group--skip { --dot: var(--fb-draw); }
.sbor-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sbor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 6px 0 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  font: 400 15px/1 var(--fb-font);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.sbor-chip:hover { background: var(--fb-surface-3); border-color: var(--fb-glow); }
.sbor-chip.blue { border-color: #3d7bff66; }
.sbor-chip.red { border-color: #ff4d5e66; }
.sbor-chip.skip { color: var(--fb-muted); }

/* ---------- live voting panel on home ---------- */
.voting-panel { display: grid; gap: var(--fb-space-3); }
.voting-panel .sbor-chip { padding: 0 14px; }
.voting-bar { height: 6px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: var(--fb-surface-3); overflow: hidden; }
.voting-bar span { display: block; height: 100%; border-radius: inherit; corner-shape: squircle; background: var(--fb-accent); box-shadow: 0 0 10px #1d5cff80; }

/* ---------- player card modal ---------- */
body.has-modal { overflow: hidden; }
.pcard-bg {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #05070acc;
  backdrop-filter: blur(6px);
  animation: pcard-fade .18s ease-out;
}
.pcard {
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: min(820px, calc(100vh - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  overflow: hidden;
  outline: none;
  animation: pcard-in .22s ease-out;
}
.pcard__head { display: flex; align-items: center; gap: 14px; padding: 20px 20px 14px; }
.pcard__who { display: grid; gap: 4px; flex: 1; min-width: 0; }
.pcard__who h2 { font: 600 22px/1.15 var(--fb-font); overflow-wrap: anywhere; }
.pcard__close { width: 40px; height: 40px; }
.pcard__body { display: grid; gap: 18px; padding: 4px 20px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--fb-surface-3) transparent; }
.pcard__loading { padding: 24px 0; text-align: center; }
.pcard__text { color: var(--fb-ink-soft); font-size: 14px; }
.pcard__rating { display: grid; gap: 12px; padding: 16px; border-radius: var(--fb-radius-md); corner-shape: squircle; background: var(--fb-surface-2); }
.pcard__big { display: flex; align-items: baseline; gap: 10px; }
.pcard__big .num { font: 700 44px/1 var(--fb-font); }
.pcard__parts { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard__part {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 4px 0 10px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-3);
  color: var(--fb-muted);
  font-size: 12px;
}
.pcard__part b { min-width: 22px; padding: 2px 6px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: var(--fb-canvas); color: var(--fb-ink); font-weight: 600; text-align: center; }
.pcard__sec { display: grid; gap: 10px; }
.pcard__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pcard__tiles .fb-stat { padding: 12px 10px; border: 1px solid var(--fb-line); border-radius: var(--fb-radius-sm); corner-shape: squircle; background: var(--fb-surface-2); }
.pcard__tiles .fb-stat__value { font-size: 22px; }
.pcard__tiles .fb-stat__label { font-size: 12px; }
.pcard__form { flex-wrap: wrap; }
.pcard__form .fb-form__dot { width: 28px; height: 28px; cursor: help; }
.pcard__goal { display: grid; gap: 6px; }
.pcard__bar { height: 6px; border-radius: 3px; corner-shape: squircle; background: var(--fb-surface-3); overflow: hidden; }
.pcard__bar span { display: block; height: 100%; border-radius: inherit; corner-shape: squircle; background: var(--fb-accent); box-shadow: 0 0 10px #1d5cff80; }
.pcard__foot { display: grid; gap: 10px; padding: 14px 20px 20px; border-top: 1px solid var(--fb-line); background: var(--fb-surface-1); }
.pcard__foot > .fb-btn--ghost { justify-self: center; }
.pcard__foot--signup .eyebrow { text-align: center; }
.pcard__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard__login { grid-column: 1 / -1; text-align: center; }

@keyframes pcard-fade { from { opacity: 0; } }
@keyframes pcard-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

@media (max-width: 560px) {
  .pcard-bg { place-items: end stretch; padding: 0; }
  .pcard { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: var(--fb-radius-lg) var(--fb-radius-lg) 0 0; corner-shape: squircle; animation-name: pcard-up; }
  .pcard__foot { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .pcard__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard__big .num { font-size: 38px; }
}
@keyframes pcard-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .pcard-bg, .pcard { animation: none; }
}

/* ---------- match list ---------- */
.games { display: grid; gap: var(--fb-space-5); padding-top: 18px; }
.game { padding-bottom: 14px; }
.game .fb-match { margin-top: 0; padding-bottom: 12px; border: 0; box-shadow: none; background: none; }
.game__toggle {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.game__no { color: var(--fb-muted); font-size: 13px; }
.game__vote { display: flex; justify-content: center; gap: 8px; color: var(--fb-muted); font-size: 13px; }
.game__vote b { color: var(--fb-ink); font-weight: 600; }
.game__open { justify-self: center; }
.game__body { display: grid; gap: 14px; padding: 4px 16px 6px; }
.lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lineup { display: grid; gap: 6px; align-content: start; min-width: 0; }
.lineup__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lineup__row .fb-avatar { --fb-avatar: 32px; font-size: 11px; }
.lineup__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.lineup__meta { display: block; color: var(--fb-muted); font-size: 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-accent);
  color: #fff;
  font: 700 10px/1 var(--fb-font);
  letter-spacing: .04em;
  vertical-align: 1px;
}
.tag--muted { background: var(--fb-surface-3); color: var(--fb-ink-soft); }
.chips-static { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-static span { padding: 4px 10px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: var(--fb-surface-2); color: var(--fb-ink-soft); font-size: 13px; }
.score--blue { color: var(--fb-team-blue); }
.score--red { color: var(--fb-team-red); }

@keyframes pulse { 50% { box-shadow: 0 0 0 6px #0f47f22e, var(--fb-shadow-glow); } }
.is-pulsing { animation: pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .is-pulsing { animation: none; } }

/* ---------- tables (rating, stats) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fb-table th, .fb-table td { padding: 10px 12px; border-bottom: 1px solid var(--fb-line); white-space: nowrap; text-align: left; }
.fb-table thead th { position: sticky; top: 0; background: var(--fb-surface-1); color: var(--fb-muted); font-weight: 500; font-size: 12px; }
.fb-table tbody tr:last-child td { border-bottom: 0; }
.fb-table .r { text-align: right; }
.fb-table .num { font-variant-numeric: tabular-nums; }
.fb-table tr.clickable { cursor: pointer; }
.fb-table tr.clickable:hover td { background: #ffffff08; }
.fb-table tr.idle td { color: var(--fb-muted); }
.fb-table th.sortable { cursor: pointer; user-select: none; }
.fb-table th.sortable::after { content: attr(data-arrow); margin-left: 4px; color: var(--fb-glow); }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who .fb-avatar { --fb-avatar: 32px; font-size: 11px; }
.who__name { font-weight: 500; }
.rbar { display: inline-block; height: 4px; margin-left: 8px; border-radius: 2px; corner-shape: squircle; background: var(--fb-accent); vertical-align: middle; }
.basis { display: block; color: var(--fb-muted); font-size: 11px; }
.delta { margin-left: 4px; font-size: 11px; }
.wdl b { font-weight: 500; }

.fb-board__row { color: var(--fb-ink); text-decoration: none; }
a.fb-board__row:hover { background: #ffffff06; }
.podium { display: grid; gap: var(--fb-space-3); }
@media (min-width: 720px) {
  .podium { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

.weights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fb-space-3); }
.weights .fb-stat__value { font-size: 26px; }
@media (max-width: 560px) {
  .weights { gap: 8px; }
  .weights .fb-stat { padding: 12px; }
  .weights .fb-stat__value { font-size: 22px; }
  .weights .fb-stat__label.small { display: none; }
  .fb-stats.fb-stats--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fb-stats--wide .fb-stat { padding: 10px; border-radius: var(--fb-radius-sm); corner-shape: squircle; }
  .fb-stats--wide .fb-stat__value { font-size: 20px; }
  .fb-stats--wide .fb-stat__label { font-size: 11px; }
  .fb-stats--wide .fb-stat .fb-icon { width: 16px; height: 16px; margin-bottom: 4px; }
}

.fb-stats--wide { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fb-stat .fb-icon { width: 20px; height: 20px; color: var(--fb-glow); margin-bottom: 8px; }

.year { display: grid; gap: var(--fb-space-3); }
.year__title { display: flex; align-items: baseline; gap: 10px; font: 700 22px/1 var(--fb-font); }
.year--all .year__title { color: var(--fb-glow); }
.leaders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--fb-space-3); }
.leaders .fb-board__row { grid-template-columns: 24px minmax(0, 1fr) auto; padding: 8px 14px; }
details > summary { cursor: pointer; color: var(--fb-muted); font-size: 14px; }
details[open] > summary { margin-bottom: 8px; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--fb-space-3); }
.info-cards .fb-card { padding: 16px; display: grid; gap: 6px; align-content: start; }
.info-cards .fb-card p { color: var(--fb-ink-soft); font-size: 14px; }
.info-cards b.w { color: var(--fb-glow); font-size: 18px; }

/* ---------- bottom navigation ---------- */
.site-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(560px, 100%);
  transform: translateX(-50%);
  padding-bottom: env(safe-area-inset-bottom);
}
.site-nav .fb-tabbar { padding-bottom: calc(14px + env(safe-area-inset-bottom) * 0); backdrop-filter: blur(12px); }
.site-nav .fb-tab { font-size: 12px; color: var(--fb-ink-soft); }
.site-nav .fb-tab.is-active { color: var(--fb-ink); }
.site-nav .fb-tab .fb-icon { width: 26px; height: 26px; }
.site-nav .fb-tab__fab { width: 60px; height: 60px; margin-top: -36px; }
.site-nav .fb-tab.is-active .fb-tab__fab .fb-icon { color: #fff; }
.nav-me { position: relative; display: grid; justify-items: center; }
.nav-me .fb-avatar { --fb-avatar: 28px; font-size: 10px; }
.nav-me .fb-rating { position: absolute; top: -8px; left: calc(50% + 6px); min-width: 0; height: 16px; padding: 0 4px; font-size: 9px; }
.nav-me__delta { position: absolute; top: 18px; left: calc(50% + 8px); font: 600 9px/1 var(--fb-font); }

/* ================= legacy pages (Ramorot, History, Stats, Sbor, Stat, _Compare) ================= */
.hr-text {
  position: relative;
  height: 1.5em;
  margin: 8px 0;
  border: 0;
  text-align: center;
  line-height: 1em;
  outline: 0;
}
.hr-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fb-glow), transparent);
}
.hr-text::after {
  content: attr(data-content);
  position: relative;
  display: inline-block;
  padding: 0 .8em;
  background: var(--fb-canvas);
  color: var(--fb-muted);
  font-size: 13px;
  line-height: 1.5em;
}

.play-btn {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 18px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background: var(--fb-surface-1);
  color: var(--fb-ink);
  font: 500 18px/1.3 var(--fb-font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.play-btn:hover { border-color: var(--fb-glow); }
.play-btn .date { color: var(--fb-muted); font-size: 13px; }
.columns { display: flex; flex-wrap: wrap; gap: 10px; }
.column { flex: 1 1 0; min-width: 0; }
.column-half { flex: 1 1 calc(50% - 10px); }
.columns.is-multiline .column.is-4 { flex: 1 1 calc(33.33% - 10px); min-width: 150px; }
.has-text-centered { text-align: center; }

.match-player {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: var(--fb-radius-sm);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  font-size: 14px;
}
.match-player p { color: var(--fb-muted); font-size: 12px; }
.match-player strong[style*="color:blue"], .color-blue { color: var(--fb-team-blue) !important; }
.match-player strong[style*="color:red"], .color-red { color: var(--fb-team-red) !important; }

.card {
  display: block;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background: var(--fb-card-glow), var(--fb-surface-1);
  color: var(--fb-ink);
}
.card h3 { display: flex; align-items: center; gap: 8px; font: 700 24px/1.1 var(--fb-font); font-variant-numeric: tabular-nums; }
.card p { margin-top: 4px; color: var(--fb-muted); font-size: 13px; }
.card .material-symbols-outlined { color: var(--fb-glow); }
.stat-block { display: grid; gap: 10px; margin-top: 16px; }
.stat-block > h3 { font: 700 22px/1 var(--fb-font); }
.material-symbols-outlined { font-size: 22px; vertical-align: middle; }

.ramorot-holder {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  background: var(--fb-surface-1);
}
.ramorot-name { font: 600 18px/1.2 var(--fb-font); }
.ramorot-rank { margin-left: 6px; color: var(--fb-glow); }
.ramorot, .ramorot-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ramorot .block, .ramorot .block-mini {
  min-width: 56px;
  padding: 8px 10px;
  border-radius: var(--fb-radius-sm);
  corner-shape: squircle;
  background: var(--fb-surface-2) !important;
  text-align: center;
}
.ramorot .block-mini:last-child { background: var(--fb-accent) !important; }
.ramorot .plus { color: var(--fb-muted); }
.ramorot-box p { color: var(--fb-muted); font-size: 12px; }
.ramorot-box .ramorot-percent { color: var(--fb-ink); font-weight: 600; font-size: 15px; }
.sbor { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* _Compare partial */
.compare { display: grid; gap: 12px; }
.compare-filters { display: grid; gap: 10px; }
.compare-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.compare-date { display: flex; gap: 4px; }
.compare-date .history-select { flex: 1; min-width: 0; padding: 0 28px 0 12px; background-position: right 10px center; }
.new-tariffs__switch { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0; }
.new-tariffs__switch-txt { color: var(--fb-muted); cursor: pointer; transition: color .2s; }
.new-tariffs__switch-txt.active { color: var(--fb-ink); }
.new-tariffs__switch-btn { position: relative; width: 40px; height: 24px; border: 0; border-radius: 12px; corner-shape: squircle; background: var(--fb-accent); cursor: pointer; }
.new-tariffs__switch-btn::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .25s; }
.new-tariffs__switch-btn.active::before { left: 19px; }
.compare-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-chip {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  font: 500 13px/1 var(--fb-font);
  cursor: pointer;
}
.compare-chip:hover { background: var(--fb-surface-3); }
.compare-chip.is-active { background: var(--fb-accent); }
.compare-message { padding: 20px 0; color: var(--fb-muted); text-align: center; }
.compare-result { display: grid; gap: 10px; transition: opacity .2s; }
.compare-result.is-loading { opacity: .5; }
.compare-card { padding: 16px; border: 1px solid var(--fb-line); border-radius: var(--fb-radius-md); corner-shape: squircle; background: var(--fb-surface-1); }
.compare-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.compare-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.compare-player-b { flex-direction: row-reverse; text-align: right; }
.compare-player img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--fb-surface-2); }
.compare-player strong { overflow-wrap: anywhere; }
.compare-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.compare-dot-a, .compare-bar-a span, .compare-split-a { background: var(--fb-team-blue); }
.compare-dot-b, .compare-bar-b span, .compare-split-b { background: var(--fb-team-red); }
.compare-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr) 56px; align-items: center; padding: 6px 0; }
.compare-label { grid-column: 1 / -1; color: var(--fb-muted); font-size: 12px; text-align: center; }
.compare-value { font-variant-numeric: tabular-nums; }
.compare-value-b { text-align: right; }
.compare-value.is-leader { font-weight: 700; }
.compare-bar { display: flex; height: 8px; }
.compare-bar-a { justify-content: flex-end; padding-right: 1px; }
.compare-bar-b { padding-left: 1px; }
.compare-bar-a span { border-radius: 4px 0 0 4px; corner-shape: squircle; }
.compare-bar-b span { border-radius: 0 4px 4px 0; corner-shape: squircle; }
.compare-title { margin-top: 10px; font-weight: 600; }
.compare-title:first-child { margin-top: 0; }
.compare-note, .compare-split-legend { color: var(--fb-muted); font-size: 12px; }
.compare-split { display: flex; gap: 2px; height: 8px; margin: 8px 0 4px; border-radius: 4px; corner-shape: squircle; overflow: hidden; }
.compare-split-draw { background: var(--fb-draw); }
.compare-split-legend { display: flex; justify-content: space-between; gap: 10px; }
.compare-chart { position: relative; height: 240px; }
.compare-table { margin-top: 10px; font-size: 12px; }
.compare-table table { width: 100%; margin-top: 6px; border-collapse: collapse; }
.compare-table th { color: var(--fb-muted); font-weight: 400; text-align: left; }
.compare-table td { font-variant-numeric: tabular-nums; }

.personal-settings { display: grid; gap: 10px; }

@media (max-width: 560px) {
  .site { padding-top: 16px; gap: var(--fb-space-4); }
  .pitch3d { height: min(520px, 125vw); }
  .pitch2d__player .fb-avatar { --fb-avatar: 34px; }
  .pitch2d__name { max-width: 88px; padding: 2px 6px; font-size: 10px; }
  .lineups { grid-template-columns: 1fr; }
  .fb-match__score { font-size: 34px; padding: 12px 20px; }
  .fb-crest { width: 52px; height: 52px; }
  .fb-crest svg { width: 28px; height: 28px; }
}

.stack { display: grid; gap: 8px; }
.pcard-bg[hidden] { display: none; }
.pcard__head .fb-avatar .fb-icon { width: 28px; height: 28px; color: var(--fb-glow); fill: var(--fb-accent-soft); }

/* ---------- fantasy (/fantasy) ---------- */
.fantasy-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 18px;
  border-radius: var(--fb-radius-md);
  corner-shape: squircle;
  color: var(--fb-ink);
  text-decoration: none;
  transition: border-color .15s;
}
.fantasy-badge:hover { border-color: var(--fb-live); }
.fantasy-badge .fb-icon { flex: none; color: var(--fb-live); }
.fantasy-badge__text { flex: 1; min-width: 180px; font-weight: 600; line-height: 1.3; }
.fantasy-badge__warn { color: var(--fb-loss); font-weight: 500; }
.fantasy-badge__go {
  flex: none;
  padding: 8px 16px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: var(--fb-live);
  color: var(--fb-live-ink);
  font-size: 14px;
  font-weight: 600;
}
.fantasy-budget { display: grid; gap: 10px; }
.fantasy-budget__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fantasy-budget__sum { font-size: 20px; color: var(--fb-ink-soft); }
.fantasy-budget__sum b { font-size: 32px; font-weight: 700; color: var(--fb-live); }
.fantasy-budget.is-over .fantasy-budget__sum b { color: var(--fb-loss); }
.fantasy-bar { height: 8px; border-radius: var(--fb-radius-pill); corner-shape: squircle; background: var(--fb-surface-3); overflow: hidden; }
.fantasy-bar span { display: block; height: 100%; border-radius: inherit; corner-shape: squircle; background: var(--fb-live); transition: width .2s; }
.fantasy-budget.is-over .fantasy-bar span { background: var(--fb-loss); }
.fantasy-note { color: var(--fb-ink-soft); font-size: 14px; line-height: 1.4; }
.fantasy-note a { color: var(--fb-glow); }
.fantasy-note--bad { color: var(--fb-loss); }
.fantasy-list { display: grid; gap: 2px; margin: 0; padding: 8px 16px; list-style: none; }
.fantasy-list .empty { margin: 8px 0; }
.fantasy-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--fb-line); }
.fantasy-row:last-child { border-bottom: 0; }
.fantasy-row .fb-avatar { --fb-avatar: 36px; flex: none; font-size: 12px; }
.fantasy-row .fb-avatar img { position: absolute; inset: 0; }
.fantasy-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fantasy-row.is-picked .fantasy-row__name { color: var(--fb-live); }
.fantasy-row .fb-btn { flex: none; min-width: 92px; }
.fantasy-place { flex: none; width: 22px; text-align: right; }
.fantasy-cost {
  flex: none;
  min-width: 40px;
  padding: 4px 10px;
  border-radius: var(--fb-radius-pill);
  corner-shape: squircle;
  background: #f5a70026;
  color: var(--fb-live);
  font-weight: 600;
  text-align: center;
}
.fantasy-table { overflow-x: auto; }
.fantasy-table .fb-avatar img { position: absolute; inset: 0; }

/* ---------- vote (/vote) ---------- */
.vote-state { display: grid; justify-items: center; gap: 14px; color: var(--fb-ink-soft); }
.vote-progress { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.vote-progress__item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid var(--fb-line);
  border-radius: var(--fb-radius-sm);
  corner-shape: squircle;
  background: var(--fb-surface-1);
  color: var(--fb-muted);
  font-size: 12px;
  min-width: 0;
}
.vote-progress__item b { font: 700 18px/1 var(--fb-font); color: var(--fb-ink-soft); }
.vote-progress__item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-progress__item.is-done { border-color: var(--fb-accent); background: var(--fb-accent-soft); color: var(--fb-ink); }
.vote-progress__item.is-done b { color: #fff; }
.vote-list { display: grid; gap: var(--fb-space-3); }
.vote-row { display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--fb-radius-md); corner-shape: squircle; transition: opacity .15s; }
.vote-row__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vote-row__who > span:nth-child(2) { flex: 1; }
.vote-row__name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 600; }
.vote-row__tag { flex: none; height: 22px; padding: 0 10px; font-size: 11px; }
.vote-row__tag:empty { display: none; }
.vote-marks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.vote-mark__input { position: absolute; opacity: 0; pointer-events: none; }
.vote-mark {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 52px;
  border: 1px solid var(--fb-line-strong);
  border-radius: var(--fb-radius-sm);
  corner-shape: squircle;
  background: var(--fb-surface-2);
  color: var(--fb-ink);
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s;
}
.vote-mark b { font: 700 20px/1 var(--fb-font); }
.vote-mark span { color: var(--fb-muted); font-size: 10px; line-height: 1; }
.vote-mark:hover { background: var(--fb-surface-3); border-color: var(--fb-glow); }
.vote-mark__input:focus-visible + .vote-mark { outline: 2px solid var(--fb-glow); outline-offset: 2px; }
.vote-mark__input:checked + .vote-mark { background: var(--fb-accent); border-color: transparent; box-shadow: var(--fb-shadow-glow); }
.vote-mark__input:checked + .vote-mark span { color: #ffffffb3; }
/* оценка уже отдана другому игроку */
.vote-mark__input.disabled:not(:checked) + .vote-mark { visibility: hidden; }
/* игрок уже получил оценку: остальные ему не поставить */
.vote-row.is-picked { opacity: .6; }
.vote-row.is-picked .vote-marks { pointer-events: none; }
.vote-row.is-picked .vote-mark__input:not(:checked) + .vote-mark { visibility: hidden; }
.vote-picks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vote-picks li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--fb-radius-sm); corner-shape: squircle; background: var(--fb-surface-2); font-weight: 500; }
.vote-picks b { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--fb-accent); color: #fff; font: 700 16px/1 var(--fb-font); }
