/* Раздел «Шахматисты»: страницы игроков и список. Гамма основной версии и магазина; шапка-пилюля, кнопки и доска из base.css */
:root { --bg: #f5f3ef; --bg2: #ebe7e1; --line: #e2ddd5; --ink: #1b1916; --muted: #6b655d; --accent: #1b1916; --accent-ink: #f7f3ec; --accent-soft: #ebe7e1;
  --sq-l: #eadbc0; --sq-d: #a8794f; --sq-last: rgba(240, 170, 60, .4); --sq-sel: rgba(27, 25, 22, .2); --arrow-g: #8a4b22; --wood: #8a4b22; --head: 84px; }
@media (max-width: 860px) { :root { --head: 0px; } }
.nw { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pl-story a, .pl-facts a, .pl-photo a, .pl-foot a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color .2s; }
.pl-story a:hover, .pl-facts a:hover, .pl-photo a:hover, .pl-foot a:hover { text-decoration-color: currentColor; }

/* Тёмная полоса заголовка: тот же тёплый свет, что на главной и в магазине; светлая часть наезжает скруглённым краем */
.band { position: relative; color: #f3e9dc; background: radial-gradient(ellipse 70% 130% at 78% 20%, #3a2618 0%, #1d130c 55%, #0f0a07 100%); padding: 116px 0 92px; --muted: rgba(243, 233, 220, .62); --line: rgba(243, 233, 220, .18); }
.band::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; border-radius: 40px 40px 0 0; background: var(--bg); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: center; font-size: 15px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a:hover { color: #f3e9dc; }

/* Страница игрока */
.pl-hero { display: grid; grid-template-columns: minmax(0, 1fr) clamp(240px, 27vw, 360px); gap: clamp(28px, 5vw, 80px); align-items: end; }
.pl-hero.np { grid-template-columns: minmax(0, 1fr); }
.pl-hero h1 { font-size: clamp(42px, 6vw, 84px); line-height: .98; letter-spacing: -.04em; margin-top: 6px; max-width: 12em; }
.pl-sub { margin-top: 18px; font-size: clamp(17px, 1.5vw, 20px); color: rgba(243, 233, 220, .8); max-width: 36em; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 18px clamp(28px, 3.4vw, 48px); margin-top: clamp(28px, 4vw, 44px); }
.facts b { display: block; font-size: clamp(26px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.facts span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); max-width: 14em; line-height: 1.35; }
.pl-photo { margin: 0; }
.pl-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; border-radius: 24px; background: #2a1d14; }
.pl-photo figcaption { margin-top: 10px; font-size: 12.5px; line-height: 1.4; color: rgba(243, 233, 220, .5); overflow-wrap: anywhere; }

.pl-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(8px, 2vw, 24px); }
.pl-story p { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.62; max-width: 36em; }
.pl-story p + p { margin-top: .9em; }
.pl-facts { margin: 0; }
.pl-facts div { display: grid; grid-template-columns: minmax(7.5em, 2fr) minmax(0, 5fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; }
.pl-facts div:last-child { border-bottom: 1px solid var(--line); }
.pl-facts dt { color: var(--muted); }
.pl-facts dd { margin: 0; overflow-wrap: anywhere; }
.pl-sec { margin-top: clamp(64px, 9vw, 112px); }
.pl-sec h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: clamp(20px, 2.6vw, 32px); }

/* График рейтинга: линия тянется по ширине, подписи обычным текстом */
.ch { padding-left: 48px; }
.ch-plot { position: relative; height: clamp(200px, 24vw, 280px); }
.ch-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-g { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ch-a { fill: color-mix(in srgb, var(--wood) 10%, transparent); }
.ch-l { fill: none; stroke: var(--wood); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ch-y { position: absolute; left: -48px; translate: 0 -50%; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-pk { position: absolute; translate: -50% calc(-100% - 12px); white-space: nowrap; font-size: 14px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 8px; }
.ch-pk b { color: var(--ink); font-weight: 700; }
.ch-pk::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--wood); box-shadow: 0 0 0 4px var(--bg); translate: 0 50%; }
.ch-pk.r { translate: calc(-100% + 14px) calc(-100% - 12px); } .ch-pk.r::after { left: auto; right: 8.5px; }
.ch-pk.l { translate: -14px calc(-100% - 12px); } .ch-pk.l::after { left: 14px; }
.ch-x { position: relative; height: 32px; margin-top: 8px; }
.ch-x span { position: absolute; top: 0; translate: -50% 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-x span:first-child { translate: 0 0; }
.ch-x span:last-child:not(:first-child) { translate: -100% 0; }

/* Партии: доска на мягкой тени, нотация на белом — как уроки на главной */
.pl-games .ls-board { border-radius: 14px; overflow: hidden; box-shadow: 0 34px 60px -30px rgba(52, 30, 12, .45), 0 10px 24px -12px rgba(52, 30, 12, .22); }
.pl-games .ls-note { background: #fff; }
.pl-games .ls-tabs { width: fit-content; max-width: calc(100% + 32px); padding: 4px; gap: 2px; border-radius: 999px; background: rgba(27, 25, 22, .06); margin-inline: 0; }
.pl-games .ls-tabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: none; display: flex; align-items: center; }
.pl-games .ls-tabs button span { display: none; }
.pl-games .ls-tabs:has(button:only-child) { display: none; }

/* Карточки игроков: в списке и «та же эпоха» */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 32px; }
.pc { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 76px; padding: 12px 0; border-top: 1px solid var(--line); }
.pc[hidden] { display: none; }
.pc img, .pc .ini { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--bg2); }
.pc .ini { display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--muted); }
.pc b { display: block; font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.pc small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc em { font-style: normal; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--muted); }
.pc:hover b { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* Призыв к занятиям: тёмная плитка, как «Дебют на заказ» на главной */
.pl-cta { margin-top: clamp(72px, 10vw, 128px); }
.pl-cta-t { display: grid; justify-items: center; text-align: center; padding: clamp(40px, 6vw, 72px) clamp(22px, 5vw, 64px); border-radius: 32px; color: #f3e9dc; background: radial-gradient(ellipse 70% 120% at 70% 0%, #3a2618 0%, #1d130c 55%, #0f0a07 100%); }
.pl-cta-t h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 14px; }
.pl-cta-t p { color: rgba(243, 233, 220, .75); max-width: 32em; }
.pl-cta-b { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.pl-cta .btn { background: #f3e6d4; color: #1d140e; }
.pl-cta .btn.ghost { background: transparent; color: #f3e6d4; box-shadow: inset 0 0 0 1.5px rgba(243, 230, 212, .4); }
.pl-foot { margin-top: 56px; padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pl-foot .wrap { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }
.pl-foot nav { display: flex; gap: 20px; }

/* Список */
.cat-head { display: grid; justify-items: center; text-align: center; }
.cat-head h1 { font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -.035em; }
.cat-head .lead { color: rgba(243, 233, 220, .78); margin: 16px auto 0; }
.search { position: relative; display: block; width: min(560px, 100%); margin-top: 28px; }
.search input { width: 100%; height: 54px; border-radius: 14px; border: 1.5px solid rgba(243, 233, 220, .22); background: rgba(243, 233, 220, .08); padding: 0 16px 0 48px; font: 16px var(--font); color: #f3e9dc; outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: rgba(243, 233, 220, .5); }
.search input:focus { border-color: #f3e9dc; }
.search svg { position: absolute; left: 15px; top: 16px; width: 22px; height: 22px; fill: none; stroke: rgba(243, 233, 220, .6); stroke-width: 2; stroke-linecap: round; }
.chips { position: sticky; top: 84px; z-index: 20; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%; margin: -26px auto 0; padding: 4px; border-radius: 999px; background: #e9e5df; box-shadow: 0 10px 26px -14px rgba(52, 30, 12, .35); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 8px; color: var(--muted); font-size: 15px; }
.sel { position: relative; }
.sel select { appearance: none; -webkit-appearance: none; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; padding: 0 40px 0 14px; font: 500 16px var(--font); color: var(--ink); cursor: pointer; }
.sel::after { content: ''; position: absolute; right: 16px; top: 16px; width: 7px; height: 7px; border: 2px solid var(--ink); border-top: 0; border-left: 0; rotate: 45deg; pointer-events: none; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }

@media (max-width: 860px) {
  .band { padding-top: 24px; padding-bottom: 76px; }
  .band::after { height: 28px; border-radius: 28px 28px 0 0; }
  .pl-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .pl-photo img { aspect-ratio: 4 / 3; object-position: 50% 18%; border-radius: 20px; }
  .pl-main { grid-template-columns: minmax(0, 1fr); }
  .chips { top: calc(8px + env(safe-area-inset-top)); margin-top: -22px; }
  .pl-cta-t { border-radius: 24px; }
  .pl-cta-b .btn { flex: 1 1 100%; }
  .pl-games .ls-tabs { margin-inline: 0; }
  .ch { padding-left: 42px; }
  .ch-y { left: -42px; font-size: 12px; }
  .ch-x span { font-size: 12px; }
}

/* Фото в одном стиле: чёрно-белые, с тёплым оттенком сайта. Фильтр, а не перерисовка: лица остаются настоящими, файлы с Commons не меняются */
.pl-photo img, .pc img { filter: grayscale(1) sepia(.14) contrast(1.06); }
