/* Страницы «Топ», «Профиль», «Как играть» (.top- .prof- .faq-). Только токены base.css;
   свои цвета — медали топ-3 и оттенок баннера профиля (из цвета аватарки). */

/* =========================== ТОП =========================== */

.top-page { align-items: start; }
.top-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* «ты» в топе */
.top-me { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px 22px; }
.top-me > .eyebrow { align-self: stretch; text-align: left; }
.top-me-id { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.top-me-txt { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.top-me-link { display: inline-block; border-radius: 50%; transition: transform .2s var(--ease-pop); }
.top-me-link:hover { transform: rotate(-4deg) scale(1.04); }
.top-me-call { display: flex; flex-direction: column; gap: 6px; }
.top-me-call h2 { color: var(--orange-2); }
.top-me-score { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.top-me-rank small { font-size: .45em; color: rgba(42, 22, 0, .65); }
.top-me-val { display: flex; align-items: baseline; gap: 8px; }
.top-me-val b { font: 400 24px/1 var(--font-logo); color: var(--text); letter-spacing: -.02em; word-spacing: -.35em; }
.top-me-val small { font: 700 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.top-me-note { max-width: 26ch; }
.top-me-skel { width: 100%; height: 108px; }
.top-me .btn { margin-top: 2px; }

/* «как попасть в топ» */
.top-how { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.top-how-txt { color: var(--muted); line-height: 1.5; }
.top-how-cta { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font: 700 12px/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--orange-2); text-decoration: none; }
.top-how-cta:hover { color: var(--orange); }
.top-how-cta:hover svg { transform: translateX(3px); }
.top-how-cta svg { transition: transform .15s; }
.top-leagues { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.top-leagues li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; }

/* правая колонка: вкладки-клетки, заголовок, строки */
.top-main { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.top-tabs { gap: 6px; }
.top-tabs .tab { flex: 1 1 0; min-width: fit-content; flex-direction: column; gap: 7px; min-height: 68px; padding: 0 12px; font-size: 12px; }
.top-tabs .tab svg { width: 20px; height: 20px; }
.top-head-in { padding: 0 4px; min-height: 30px; }
.top-head-in h2 { color: var(--text); }
.top-head .pill b { font-weight: 800; color: var(--text); }

.top-list { gap: 8px; }
.top-skel { height: 66px; border-radius: 16px; }

.top-row { position: relative; isolation: isolate; overflow: hidden; min-height: 66px; padding-right: 18px; }
.top-row .who { gap: 14px; }
.top-nm { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.top-row .name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; }
.top-you {
  flex: none;
  padding: 3px 7px 2px;
  border-radius: 6px;
  background: var(--lit-face);
  color: var(--orange-ink);
  font: 400 9.5px/1 var(--font-logo);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.top-sub { display: flex !important; align-items: center; gap: 8px; }
.top-sub .tier { min-height: 20px; padding: 1px 7px 1px 6px; font-size: 10px; }
.top-sub .tier::before { width: 7px; height: 7px; }
.top-grid { letter-spacing: .12em; font-size: 13px !important; line-height: 1.2; }
.top-rk { display: inline-block; min-width: 2ch; }
.top-row .val { position: relative; z-index: 1; font-size: 19px; }

.top-gap { display: flex; justify-content: center; gap: 6px; padding: 2px 0; }
.top-gap i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }

.top-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 0 6px; }
.top-empty .empty { width: 100%; padding: 40px 20px; }

/* топ-3: строки горят как призовые клетки, справа — табло из лампочек */
.top-prize { --medal: var(--gold); --medal-hi: #FFF1B0; --medal-lo: #B8860B; min-height: 76px; }
.top-prize.r2 { --medal: #C9D3E2; --medal-hi: #FFFFFF; --medal-lo: #7C8798; }
.top-prize.r3 { --medal: #E0985E; --medal-hi: #FFD2A8; --medal-lo: #8E4E1F; }
.top-prize {
  border-color: color-mix(in srgb, var(--medal) 42%, transparent);
  background:
    radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--medal) 20%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent),
    var(--card-2);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--medal-hi) 25%, transparent), 0 8px 22px rgba(0, 0, 0, .22);
}
a.top-prize:hover { background-color: var(--card-3); border-color: color-mix(in srgb, var(--medal) 60%, transparent); }
.top-prize .top-rk {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--medal-hi) 0%, var(--medal) 48%, var(--medal-lo) 100%);
  color: #2A1600;
  font-size: 17px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 color-mix(in srgb, var(--medal-lo) 80%, #000), 0 0 18px color-mix(in srgb, var(--medal) 45%, transparent);
}
.top-prize.r1 .val { font-size: 22px; color: var(--gold); text-shadow: 0 0 16px rgba(255, 210, 63, .45); }
.top-prize .name { font-size: 17px; }
/* две фазы лампочек в шахматном порядке (как у .card.marquee): при наведении бегут */
.top-prize::before,
.top-prize::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 10px;
  bottom: 10px;
  right: 124px;
  width: min(38%, 360px);
  pointer-events: none;
  background-size: 26px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 70%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 70%, transparent 100%);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--medal) 80%, transparent));
  transition: opacity .25s;
}
.top-prize::before {
  background-image:
    radial-gradient(circle 3px at 25% 25%, #FFFDF2 0 30%, var(--medal-hi) 55%, var(--medal) 85%, transparent 100%),
    radial-gradient(circle 3px at 75% 75%, #FFFDF2 0 30%, var(--medal-hi) 55%, var(--medal) 85%, transparent 100%);
  opacity: .9;
}
.top-prize::after {
  background-image:
    radial-gradient(circle 3px at 75% 25%, #FFFDF2 0 30%, var(--medal-hi) 55%, var(--medal) 85%, transparent 100%),
    radial-gradient(circle 3px at 25% 75%, #FFFDF2 0 30%, var(--medal-hi) 55%, var(--medal) 85%, transparent 100%);
  opacity: .35;
}
.top-prize.r2::before, .top-prize.r3::before { opacity: .65; }
.top-prize.r2::after, .top-prize.r3::after { opacity: .28; }
@media (prefers-reduced-motion: no-preference) {
  .top-prize:hover::before { animation: bulbs 1.1s ease-in-out infinite; }
  .top-prize:hover::after { animation: bulbs 1.1s ease-in-out infinite -.55s; opacity: .9; }
}

/* =========================== ПРОФИЛЬ =========================== */

.prof-page { align-items: start; }
.prof-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* шапка: табло, подкрашенное цветом аватарки */
.prof-hero { --tint: var(--orange); padding: 0; overflow: hidden; }
.prof-banner {
  position: relative;
  height: 172px;
  background:
    radial-gradient(70% 160% at 18% -10%, color-mix(in srgb, var(--tint) 48%, transparent), transparent 70%),
    radial-gradient(50% 120% at 92% 0%, rgba(255, 157, 28, .2), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 20%, var(--card)) 0%, var(--card) 100%);
  border-bottom: 1px solid var(--line);
}
/* клетки табло поверх оттенка */
.prof-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .26) 0 5px, transparent 5px) 0 0 / 74px 46px,
    linear-gradient(0deg, rgba(0, 0, 0, .26) 0 5px, transparent 5px) 0 0 / 74px 46px,
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 40%) 0 0 / 74px 46px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 60%, transparent 100%);
}
/* прожектор сверху */
.prof-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 120% at 50% -30%, rgba(255, 244, 214, .18), transparent 70%);
}
.prof-banner .bulbs-row { position: absolute; left: 24px; right: 24px; bottom: 9px; z-index: 1; opacity: .7; }
.prof-acts { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; gap: 8px; }
.prof-acts .icon-btn.ghost { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.prof-id {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(240px, 300px);
  align-items: center;
  gap: 8px 26px;
  padding: 18px 30px 26px;
}
/* над баннером торчит только аватарка, текст — уже под ним */
.prof-ava { align-self: start; margin-top: -86px; border-radius: 50%; box-shadow: 0 0 0 7px var(--card), 0 14px 30px rgba(0, 0, 0, .4); line-height: 0; }
.prof-who { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prof-name { overflow-wrap: anywhere; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.prof-chips { min-height: 26px; }
.prof-nolg { color: var(--muted); }
.prof-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.prof-meta i { font-style: normal; color: var(--dim); }
.prof-tg { display: inline-flex; align-items: center; gap: 5px; color: #8FD3FF; }
.prof-tg svg { color: var(--tg); }
.prof-lvl { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: var(--r-lg); background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 10px rgba(0, 0, 0, .2); }
.prof-lvl-top { gap: 14px; }
.prof-xp { display: flex; flex-direction: column; gap: 4px; }
.prof-xp b { font: 400 20px/1 var(--font-logo); letter-spacing: -.02em; word-spacing: -.35em; }
.prof-xp small { font: 700 10.5px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* статистика: строки-группы, числа на клетках табло */
.prof-stats { display: flex; flex-direction: column; gap: 10px; }
.prof-sg { display: grid; grid-template-columns: 112px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.prof-sg-h { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 4px; color: var(--muted); font: 700 11px/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }
.prof-sg-h svg { color: var(--orange); }
.prof-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 86px;
  min-width: 0;
  padding: 13px 14px 12px;
  border-radius: var(--r-md);
  background: var(--cell-face);
  box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge);
}
.pc-v { display: flex; align-items: baseline; gap: 4px; font: 400 26px/1 var(--font-logo); color: var(--orange); letter-spacing: -.02em; word-spacing: -.35em; text-shadow: 0 0 14px rgba(255, 157, 28, .45), 0 2px 0 rgba(0, 0, 0, .3); white-space: nowrap; }
.pc-v small { font-size: .5em; color: var(--muted); text-shadow: none; }
.pc-v svg { align-self: center; color: var(--orange); margin-right: 2px; }
.pc-l { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: #CDE7C8; }
.prof-cell.zero { background: var(--cell-used); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .3); }
.prof-cell.zero .pc-v { color: rgba(255, 157, 28, .3); text-shadow: none; }
.prof-cell.zero .pc-l { color: var(--dim); }
.prof-cell.hot { background: var(--lit-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--orange-edge), 0 0 22px rgba(255, 157, 28, .35); }
.prof-cell.hot .pc-v, .prof-cell.hot .pc-v svg { color: var(--orange-ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.prof-cell.hot .pc-l { color: rgba(42, 22, 0, .78); }

/* ачивки */
.prof-ach-n { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; }
.prof-ach-n b { font: 400 18px/1 var(--font-logo); }
.prof-ach-bar { margin: -4px 0 16px; }
.prof-achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.prof-ach { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line); }
.prof-ach.on { background: linear-gradient(180deg, rgba(255, 157, 28, .09), rgba(0, 0, 0, .12)); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .3); }
.pa-ico {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 25px;
  line-height: 1;
  background: var(--cell-used);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35);
  filter: grayscale(1);
  opacity: .55;
}
.prof-ach.on .pa-ico { background: var(--lit-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--orange-edge), 0 0 18px rgba(255, 157, 28, .35); filter: none; opacity: 1; }
.pa-lock { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--card), inset 0 0 0 1px var(--line-2); color: var(--muted); }
.pa-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pa-txt b { font-size: 14.5px; line-height: 1.2; }
.prof-ach:not(.on) .pa-txt b { color: #BFD9BA; }
.pa-d { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.pa-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12px; font-weight: 700; }
.pa-m > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.pa-fr { min-height: 20px; padding: 1px 7px; font-size: 10.5px; }

/* последние дейлики */
.prof-days { display: flex; flex-direction: column; gap: 6px; }
.prof-day {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 14px 7px 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: inherit;
  text-decoration: none;
  transition: background-color .15s, box-shadow .15s;
}
a.prof-day:hover { color: inherit; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line-2); }
.prof-day .price { min-width: 0; width: 100%; padding-left: 0; padding-right: 0; }
.pd-mid { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pd-grid { font-size: 17px; letter-spacing: .1em; line-height: 1.1; white-space: nowrap; }
.pd-date { font-size: 12px; font-weight: 600; color: var(--dim); }
.pd-pts { font: 400 18px/1 var(--font-logo); color: var(--orange); word-spacing: -.35em; white-space: nowrap; }
.pd-pts small { font-size: .6em; color: var(--muted); }
.prof-day.max { box-shadow: inset 0 0 0 1px rgba(255, 210, 63, .45); background: linear-gradient(90deg, rgba(255, 210, 63, .1), rgba(0, 0, 0, .2)); }
.prof-day.max .pd-pts { color: var(--gold); text-shadow: 0 0 12px rgba(255, 210, 63, .5); }
.prof-cta { margin-top: 12px; }

/* последние игры */
.prof-matches { display: flex; flex-direction: column; gap: 6px; }
.prof-match {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.prof-match.win { background: linear-gradient(90deg, rgba(255, 157, 28, .12), rgba(0, 0, 0, .2) 70%); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .35); }
.pm-place { min-width: 0; width: 100%; padding-left: 0; padding-right: 0; }
.pm-mid { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.pm-res { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; }
.pm-res.win { color: var(--orange-2); }
.pm-res svg { color: var(--gold); }
.pm-mode { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--dim); white-space: nowrap; }
.pm-avas { display: flex; align-items: center; padding-left: 4px; }
.pm-avas > a, .pm-avas > span:not(.pm-vs) { margin-left: -6px; line-height: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--card); transition: transform .15s var(--ease-pop); }
.pm-avas > a:hover { transform: translateY(-2px); }
.pm-vs { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pm-score { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pm-score b { font: 400 17px/1 var(--font-logo); color: var(--orange); word-spacing: -.35em; white-space: nowrap; }
.pm-score small { font: 800 11px/1 var(--font-ui); letter-spacing: .06em; color: var(--muted); }
.pm-score small.good { color: var(--good); }
.pm-score small.bad { color: var(--bad); }

/* гость */
.prof-guest { padding: 34px 36px; }
.prof-guest-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.prof-guest-txt .lead { margin-top: 2px; }
.prof-guest-cta { margin-top: 10px; }
.prof-perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.prof-perks li { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); }
.prof-perks li > span:last-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prof-perks b { font-size: 15px; }
.prof-perks li > span:last-child > span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.pp-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cell-face); color: var(--orange); box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge); }
.prof-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* настройки */
.prof-set { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.prof-set-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 20px; border-radius: var(--r-lg); background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px var(--line); }
.prof-set-col > h3 { color: var(--orange-2); }
.prof-set-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* «Сменить аватарку» сжимается и переносится, а не вылезает за карточку */
.prof-set-row .btn { flex: 0 1 auto; min-width: 0; white-space: normal; }
.prof-set-row .grow { display: flex; flex-direction: column; gap: 2px; }
/* @username в Telegram бывает до 32 символов без пробелов — режем многоточием, а не раздвигаем страницу */
.prof-set-row .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-set-blk { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.prof-set-blk .label { margin: 0; }
.prof-set-blk .form-err:empty { display: none; }
.prof-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.prof-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 12px 4px 10px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: center;
  transition: background .15s, box-shadow .15s, transform .12s var(--ease-pop);
}
.prof-frame:hover:not(:disabled) { background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.prof-frame.on { background: rgba(255, 157, 28, .14); box-shadow: inset 0 0 0 2px var(--orange), 0 0 18px rgba(255, 157, 28, .25); }
.prof-frame:disabled { cursor: not-allowed; }
.prof-frame:disabled .ava { filter: grayscale(.9); opacity: .45; }
.pf-nm { font-size: 13px; font-weight: 700; }
.prof-frame:disabled .pf-nm { color: var(--dim); }
.pf-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; line-height: 1.2; color: var(--muted); }
.prof-tg-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(180deg, #4CC0F7, var(--tg)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 0 var(--tg-edge); }
.prof-remind { font-weight: 600; }
.prof-code { display: flex; flex-wrap: wrap; gap: 5px; }
.prof-code .price { width: 34px; min-width: 0; padding-left: 0; padding-right: 0; font-size: 15px; }
.prof-out { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 4px; }

.prof-skel .prof-banner { opacity: .5; }
.prof-nf .lead { overflow-wrap: anywhere; }

/* =========================== КАК ИГРАТЬ =========================== */

.faq-page { align-items: start; }
.faq-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 36px; padding: 44px 48px; }
.faq-hero-txt { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.faq-hero-txt .row { margin-top: 8px; }
.faq-board { display: grid; grid-template-columns: repeat(4, 74px); gap: 8px; transform: rotate(-3deg); }
.faq-board .price { width: 100%; min-width: 0; height: 54px; padding: 0; align-items: center; font-size: 17px; }

.faq-side { position: sticky; top: 16px; min-width: 0; }
.faq-toc { padding: 20px 14px 14px; }
.faq-toc > .eyebrow { padding: 0 8px 10px; }
.faq-toc ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.faq-toc a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: 14.5px; text-decoration: none; transition: background .15s, color .15s; }
.faq-toc a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.faq-toc-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--cell-face); color: var(--orange); box-shadow: var(--cell-bevel), 0 2px 0 var(--cell-edge); transition: background .15s, color .15s, box-shadow .2s; }
.faq-toc a.on { color: var(--text); background: rgba(255, 157, 28, .08); }
.faq-toc a.on .faq-toc-ico { background: var(--lit-face); color: var(--orange-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 0 var(--orange-edge), 0 0 14px rgba(255, 157, 28, .4); }

.faq-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.faq-sec { padding: 26px 26px 22px; scroll-margin-top: 16px; }
.faq-sec-h { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.faq-sec-h > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.faq-sec-ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--lit-face); color: var(--orange-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--orange-edge), 0 0 22px rgba(255, 157, 28, .3); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }

/* вопрос-аккордеон: клетка, которая «открывается» */
.faq-q { border-radius: 16px; background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, box-shadow .15s; scroll-margin-top: 16px; }
.faq-q:hover { background: rgba(0, 0, 0, .26); box-shadow: inset 0 0 0 1px var(--line-2); }
.faq-q[open] { background: linear-gradient(180deg, rgba(255, 157, 28, .07), rgba(0, 0, 0, .2) 120px); box-shadow: inset 0 0 0 1px rgba(255, 157, 28, .38); }
.faq-q > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 12px 14px 12px 18px; cursor: pointer; list-style: none; border-radius: 16px; font-weight: 700; font-size: 16px; }
.faq-q > summary::-webkit-details-marker { display: none; }
.faq-q > summary::marker { content: ''; }
.faq-q > summary:focus-visible { outline-offset: -3px; }
.faq-q[open] > summary { color: var(--orange-2); }
.faq-chev { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--cell-face); color: var(--muted); box-shadow: var(--cell-bevel), 0 2px 0 var(--cell-edge); transition: transform .22s var(--ease-out), background .15s, color .15s; }
.faq-q[open] .faq-chev { transform: rotate(180deg); background: var(--lit-face); color: var(--orange-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 -2px 0 var(--orange-edge); }
.faq-a { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; color: #CFE6CA; font-size: 15px; line-height: 1.55; }
.faq-a p { max-width: 72ch; }
.faq-a b { color: var(--text); }
.faq-a a { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .faq-q[open] > .faq-a { animation: faq-open .22s var(--ease-out); }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } }

.faq-ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.faq-ul li { position: relative; padding-left: 20px; }
.faq-ul li::before { content: ''; position: absolute; left: 4px; top: .6em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--orange); box-shadow: 0 0 6px rgba(255, 157, 28, .6); }
.faq-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.faq-steps li { display: flex; align-items: flex-start; gap: 12px; }
.faq-steps .price { flex: none; min-width: 32px; margin-top: -1px; }

.faq-pts { display: flex; gap: 8px; }
.faq-pts .price { width: 56px; min-width: 0; padding-left: 0; padding-right: 0; }
.faq-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.faq-legend li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; }
.faq-sq { font-size: 18px; line-height: 1; }

.faq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.faq-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.faq-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.faq-card { position: relative; display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 14px 14px 13px; border-radius: 14px; background: var(--cell-face); box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge); }
.faq-card b { font: 400 13px/1.2 var(--font-logo); text-transform: uppercase; letter-spacing: .01em; word-spacing: -.3em; color: var(--orange); text-shadow: 0 0 10px rgba(255, 157, 28, .35); }
.faq-card > span:last-child { font-size: 13.5px; line-height: 1.45; color: #D7F0D2; }
.faq-mark { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.faq-cards.four .faq-card:nth-child(3) { background: var(--lit-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 0 var(--orange-edge), 0 0 18px rgba(255, 157, 28, .3); }
.faq-cards.four .faq-card:nth-child(3) b, .faq-cards.four .faq-card:nth-child(3) > span:last-child { color: var(--orange-ink); text-shadow: none; }
.faq-cards.four .faq-card:nth-child(4) { background: var(--red-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 3px 0 var(--red-edge); }
.faq-cards.four .faq-card:nth-child(4) b { color: #FFE2B0; }
.faq-cards.four .faq-card:nth-child(4) > span:last-child { color: #FFE9E4; }
.faq-cards.mods .faq-card:last-child { background: var(--red-face); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 3px 0 var(--red-edge); }
.faq-cards.mods .faq-card:last-child b { color: #FFE2B0; }
.faq-h4 { margin: 6px 0 -2px; font: 700 11px/1.3 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.faq-leagues { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.faq-leagues li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); }
.faq-leagues .num { font: 400 13px/1 var(--font-logo); color: var(--text); word-spacing: -.3em; }

.faq-achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.faq-achs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line); }
.faq-achs li > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.faq-achs b { font-size: 14px; color: var(--text); }
.faq-ach-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 21px; background: var(--cell-face); box-shadow: var(--cell-bevel), 0 2px 0 var(--cell-edge); }

.faq-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.faq-frame { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px 14px; border-radius: 14px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.faq-frame .ava { margin-bottom: 4px; }
.faq-frame b { font-size: 14px; color: var(--text); }
.faq-frame > span:last-child { font-size: 12.5px; line-height: 1.3; color: var(--muted); }

/* «за что — сколько»: строки-клетки с ценой справа */
.faq-tbl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.faq-tbl li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px 9px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); }
.faq-tbl-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.faq-tbl-t b { font-size: 14px; line-height: 1.3; }
.faq-tbl-t small { font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.faq-tbl-v { flex: none; white-space: nowrap; }

.faq-soon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.faq-sec.soon { padding: 22px; }
.faq-sec.soon .faq-sec-h { margin: 0; }
.faq-sec.soon .faq-sec-ico { width: 44px; height: 44px; border-radius: 13px; background: var(--cell-face); color: var(--orange); box-shadow: var(--cell-bevel), 0 3px 0 var(--cell-edge); }
.faq-foot { text-align: center; padding: 8px 0 0; }

/* =========================== адаптив =========================== */

@media (max-width: 1200px) {
  /* восемь досок в ряд уже не влезают — раскладываем табло 4×2 */
  .top-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-tabs .tab { min-width: 0; }
  .prof-id { grid-template-columns: auto minmax(0, 1fr); }
  .prof-lvl { grid-column: 1 / -1; }
  .prof-sg { grid-template-columns: 92px repeat(4, minmax(0, 1fr)); }
  .faq-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-leagues { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) and (min-width: 900px) {
  .top-side { position: static; }
  .faq-board { display: none; }
  .faq-hero { grid-template-columns: 1fr; }
}

@media (max-width: 899px) {
  /* топ: сначала «ты», потом табло, подсказка — в конце */
  .top-side { display: contents; }
  .top-me { order: 1; }
  .top-main { order: 2; }
  .top-how { order: 3; }
  .top-me {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    text-align: left;
    padding: 18px;
  }
  .top-me > .eyebrow { grid-column: 1 / -1; }
  .top-me-id { flex-direction: row; gap: 12px; }
  .top-me-id .ava { --s: 56px !important; }
  .top-me-txt { align-items: flex-start; }
  .top-me-txt .display.m { font-size: 17px; }
  .top-me-score { flex-direction: row-reverse; gap: 12px; }
  .top-me-rank { font-size: 26px !important; }
  .top-me-val { flex-direction: column; align-items: flex-end; gap: 4px; }
  .top-me-val b { font-size: 18px; }
  .top-me-note, .top-me-call { grid-column: 1 / -1; max-width: none; }
  .top-me .btn { grid-column: 1 / -1; }
  .top-me-skel { grid-column: 1 / -1; height: 52px; }
  .top-me-txt .muted.small { display: none; }
  .top-me .top-me-txt p.muted.small { display: block; }

  .top-main { padding: 12px; gap: 12px; }
  .top-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 5px; }
  .top-tabs .tab { min-height: 58px; padding: 0 2px; gap: 6px; font-size: 9.5px; letter-spacing: 0; }
  .top-tabs .tab svg { width: 18px; height: 18px; }
  .top-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px 8px 6px; min-height: 60px; }
  .top-row .who { gap: 10px; }
  .top-row .who .ava { --s: 38px !important; }
  .top-prize { min-height: 66px; }
  .top-prize .who .ava { --s: 42px !important; }
  .top-prize .top-rk { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
  .top-row .name { font-size: 15px; }
  .top-prize .name { font-size: 15.5px; }
  .top-row .val { font-size: 16px; }
  .top-prize.r1 .val { font-size: 18px; }
  /* на телефоне лампочки уходят на кромки строки, чтобы не лезть под имя */
  .top-prize::before, .top-prize::after {
    top: 3px; bottom: 3px; left: 14px; right: 14px; width: auto;
    background-size: 18px 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
  .top-prize::before {
    background-image:
      radial-gradient(circle 2.2px at 25% 2.5px, #FFFDF2 0 30%, var(--medal) 80%, transparent 100%),
      radial-gradient(circle 2.2px at 75% calc(100% - 2.5px), #FFFDF2 0 30%, var(--medal) 80%, transparent 100%);
  }
  .top-prize::after {
    background-image:
      radial-gradient(circle 2.2px at 75% 2.5px, #FFFDF2 0 30%, var(--medal) 80%, transparent 100%),
      radial-gradient(circle 2.2px at 25% calc(100% - 2.5px), #FFFDF2 0 30%, var(--medal) 80%, transparent 100%);
  }

  /* профиль */
  .prof-banner { height: 128px; }
  .prof-acts { top: 12px; right: 12px; }
  .prof-id { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 0 18px 22px; }
  .prof-ava { margin-top: -62px; align-self: center; }
  .prof-ava .ava { --s: 112px !important; }
  /* телефон: статистика → дейлики → игры → ачивки */
  .prof-col { display: contents; }
  .prof-stats-card { order: 1; }
  .prof-days-card { order: 2; }
  .prof-games-card { order: 3; }
  .prof-ach-card { order: 4; }
  .prof-settings { order: 5; }
  .prof-achs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prof-ach { flex-direction: column; gap: 10px; padding: 12px 10px; }
  .pa-ico { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; }
  .pa-txt b { font-size: 13.5px; }
  .pa-d { font-size: 12px; }
  .prof-who { align-items: center; }
  .prof-chips, .prof-meta { justify-content: center; }
  .prof-lvl { width: 100%; text-align: left; }
  .prof-sg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof-stats { gap: 6px; }
  .prof-sg { gap: 6px; }
  .prof-sg-h { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; padding: 8px 2px 2px; }
  .prof-cell { min-height: 0; gap: 6px; padding: 10px 12px; border-radius: 12px; }
  .pc-v { font-size: 20px; }
  .pc-l { font-size: 12px; }
  .prof-guest { padding: 28px 22px; }
  .prof-guest-in { grid-template-columns: 1fr; gap: 20px; }
  .prof-guest-cta .btn { width: 100%; }
  .prof-start { grid-template-columns: 1fr; }
  .prof-set { grid-template-columns: 1fr; }
  .prof-set-col { padding: 16px; }
  /* имя — на всю ширину, «Сохранить» под ним */
  .prof-set-blk[data-rename] .row { flex-wrap: wrap; }
  .prof-set-blk[data-rename] .btn { flex: 1 1 100%; }

  /* FAQ: оглавление — лентой чипов */
  .faq-hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .faq-hero-txt .row .btn { flex: 1 1 auto; }
  .faq-board { display: none; }
  .faq-side { position: static; }
  .faq-toc { padding: 12px; }
  .faq-toc > .eyebrow { display: none; }
  .faq-toc ul { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px; padding: 2px; }
  .faq-toc ul::-webkit-scrollbar { display: none; }
  .faq-toc li { flex: none; }
  .faq-toc a { gap: 8px; padding: 5px 12px 5px 5px; background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; white-space: nowrap; }
  .faq-toc-ico { width: 28px; height: 28px; border-radius: 8px; }
  .faq-toc-ico svg { width: 15px; height: 15px; }
  .faq-sec { padding: 20px 16px 16px; }
  .faq-sec-h { gap: 12px; }
  .faq-sec-ico { width: 44px; height: 44px; border-radius: 13px; }
  .faq-q > summary { padding: 10px 10px 10px 14px; font-size: 15px; min-height: 52px; }
  .faq-a { padding: 0 14px 16px; font-size: 14.5px; }
  .faq-cards, .faq-cards.two, .faq-cards.four { grid-template-columns: 1fr; }
  .faq-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-leagues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-frames { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .faq-frame { padding: 14px 6px 12px; }
  .faq-tbl { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .prof-perks { grid-template-columns: 1fr; }
  .faq-cards.four { grid-template-columns: 1fr; }
  .faq-pts .price { width: 48px; }
}
