/* ── Медиа → Фото: сетка превью + полноэкранный просмотр (gallery.js) ── */
.ph-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ph-card { display: block; padding: 0; border: 0; width: 100%; background: #e8eef9; -webkit-tap-highlight-color: transparent; }
.ph-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease, cubic-bezier(.2,.8,.2,1)); }
.ph-card:hover img { transform: scale(1.06); }
.ph-card:focus-visible { outline: 3px solid var(--blue-500, #3b82f6); outline-offset: 2px; }
.ph-zoom { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.88); color: var(--blue-700, #1d4ed8); opacity: 0; transform: scale(.8); transition: opacity .3s, transform .3s; }
.ph-zoom svg { width: 18px; height: 18px; }
.ph-card:hover .ph-zoom, .ph-card:focus-visible .ph-zoom { opacity: 1; transform: none; }
@media (hover: none) { .ph-zoom { opacity: 1; transform: none; } }
.ph-more-wrap { display: flex; justify-content: center; margin-top: 24px; }

.lb-ph { position: fixed; inset: 0; z-index: 10060; background: rgba(6,10,24,.94); display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; transition: opacity .25s ease; -webkit-user-select: none; user-select: none; }
.lb-ph.show { opacity: 1; }
.lb-ph[hidden] { display: none; }
.lb-ph-top { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 8px; color: rgba(255,255,255,.85); font: 600 .9rem var(--font-body); }
.lb-ph-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lb-ph-stage { position: relative; display: grid; place-items: center; overflow: hidden; min-height: 0; touch-action: pan-y; }
.lb-ph-img { max-width: min(94vw, 1400px); max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.lb-ph-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14);
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background .2s; }
.lb-ph-nav:hover { background: rgba(255,255,255,.26); }
.lb-ph-nav.prev { left: 18px; } .lb-ph-nav.next { right: 18px; }
.lb-ph-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.lb-ph-strip::-webkit-scrollbar { display: none; }
.lb-ph-strip button { flex: 0 0 auto; width: 64px; height: 44px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; opacity: .45; cursor: pointer;
  background: #1e293b; transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: -2px; }
.lb-ph-strip button.on { opacity: 1; outline-color: #fff; }
.lb-ph-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 760px) {
  .lb-ph-nav { display: none; }                 /* на телефоне — свайп */
  .lb-ph-img { max-width: 100vw; border-radius: 0; box-shadow: none; }
  .lb-ph-strip button { width: 52px; height: 38px; }
}

/* ── Подвал: наш логотип, Telegram, школа Liberated School (Cambridge International School) ── */
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-mark { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.footer-tg { width: auto; padding: 0 14px 0 10px; gap: 8px; font: 600 .85rem var(--font-body); text-decoration: none; }
.footer-tg svg { width: 18px; height: 18px; }
.footer-school { max-width: 1200px; margin: 24px auto 0; display: flex; align-items: center; gap: 28px; padding: 22px 26px; border-radius: 22px;
  background: linear-gradient(120deg, #1d4ed8 0%, #2563eb 60%, #3b82f6 100%); color: #fff; text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s; }
.footer-school:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,47,115,.22); }
.fs-logos { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
.fs-school { display: flex; align-items: center; gap: 10px; }
.fs-school img { width: 40px; height: 40px; }
.fs-school b { font: 800 .82rem/1.05 var(--font-display); letter-spacing: .12em; text-transform: uppercase; }
.fs-sep { width: 1px; height: 46px; background: rgba(255,255,255,.3); }
.fs-cam { height: 56px; width: auto; display: block; }
.fs-cam-txt { font: 700 1rem/1.1 var(--font-display); letter-spacing: .02em; }
.fs-cam-txt small { font-weight: 500; font-size: .72rem; opacity: .85; }
.fs-text { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: rgba(255,255,255,.82); line-height: 1.45; }
.fs-text b { font: 700 1rem var(--font-display); color: #fff; }
.fs-go { margin-top: 2px; font-weight: 700; color: #93c5fd; }
.nav-logo { display: inline-flex; align-items: center; white-space: nowrap; }
.nav-logo .nav-mark { width: 30px; height: 30px; border-radius: 50%; margin-right: 9px; flex: 0 0 auto; }
.nav-logo span { margin-right: .28em; }
@media (max-width: 760px) {
  .footer { padding: 28px 16px 16px; }
  .footer-inner { justify-content: space-between; }
  .footer-school { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; margin-top: 18px; }
  .fs-logos { gap: 14px; }
  .fs-cam { height: 46px; }
}

/* ── Капитан команды ── */
.cap-tag { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 3px 10px 3px 3px; border-radius: 99px;
  background: linear-gradient(135deg, #fff7e0, #ffe9b0); color: #8a5a00; font: 700 .7rem var(--font-body); letter-spacing: .04em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(214,158,46,.45); width: fit-content; }
.cap-tag i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-weight: 900; font-size: .68rem;
  background: linear-gradient(135deg, #f6c453, #d99a1e); color: #fff; }
.player-card.is-captain { box-shadow: inset 0 0 0 1.5px rgba(214,158,46,.45), var(--glass-shadow); }
.fas-pl-head .cap-tag { margin-top: 6px; }
.lbc-cap { display: inline-grid !important; place-items: center; width: 1.6em; height: 1.6em; padding: 0 !important; border-radius: 50%;
  background: linear-gradient(135deg, #f6c453, #d99a1e) !important; color: #fff !important; font-weight: 900; }
.roster-card .player-top { margin-bottom: 0; }
@media (max-width: 760px) {
  .pl-tabs .tab-btn { padding: 10px 6px; font-size: .74rem; }
  .player-card.is-captain { box-shadow: inset 0 0 0 1.5px rgba(214,158,46,.45), 0 4px 14px rgba(15,23,42,.07) !important; }
}
/* лента состава старших: карточки по своей высоте, не тянутся под плитку «Показать всех» */
#playersGrid.m-rail:has(.roster-card) > * { align-self: flex-start; }
#playersGrid:has(.roster-card) > .lb-more-card { min-height: 150px; }
#playersGrid:not(.m-rail):has(.roster-card) { align-items: start; }
