/* ═══════════════════════════════════════════════════════════
   Телефоны (≤ 760 px): приложение-подобная вёрстка.
   • нижняя панель вкладок + шторка со всеми разделами (вместо боковой «простыни»);
   • длинные списки карточек → горизонтальные «ленты» со свайпом и точками (как в App Store / Netflix);
   • плотнее отступы, герой без наложений, мяч не мешает прокрутке.
   Логика — mobile.js. На компьютере этот файл ничего не меняет.
   ═══════════════════════════════════════════════════════════ */

/* шторка и панель живут вне @media, но показываются только на телефоне */
.m-tabbar, .m-sheet, .m-sheet-bg, .m-nav-account, .m-nav-right, .m-rail-meta { display: none; }

@media (max-width: 760px) {
  :root { --section-pad: 56px; --m-tabbar-h: 64px; }
  html { scroll-padding-top: calc(12px + env(safe-area-inset-top)); }
  body { padding-bottom: calc(var(--m-tabbar-h) + 14px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
  .section { padding-left: 16px; padding-right: 16px; }
  .section-label { letter-spacing: 3px; margin-bottom: 10px; }
  .section-title { font-size: clamp(1.75rem, 8vw, 2.3rem); margin-bottom: 12px; }
  .section-sub, .section-desc { font-size: .95rem; }

  /* ── Верхняя панель: как на компьютере (белая полупрозрачная с размытием); слева надпись, справа музыка и кабинет ── */
  .nav, .nav.scrolled { padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: rgba(255,255,255,.75);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(200,210,230,.25); box-shadow: 0 1px 20px rgba(0,0,0,.04); }
  .nav.m-nav-hidden { transform: none !important; }            /* панель всегда на экране — музыку можно выключить в любой момент */
  .nav-links, .burger { display: none !important; }
  .nav-logo .nav-mark { display: none; }
  .m-nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .m-nav-account, .soundtrack-btn.in-nav { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; flex: 0 0 auto;
    color: var(--text-primary); background: rgba(255,255,255,.7); border: 1px solid rgba(200,210,230,.5); box-shadow: none; }
  .m-nav-account svg { width: 20px; height: 20px; }
  .m-nav-account.is-in { color: #fff; background: var(--blue-600); border-color: transparent; }
  .soundtrack-btn.in-nav { position: static; gap: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .soundtrack-btn.in-nav .soundtrack-label { display: none; }
  .soundtrack-btn.in-nav .soundtrack-icon { font-size: 1rem; line-height: 1; }
  .soundtrack-btn.in-nav.playing { background: var(--blue-50, #eff6ff); border-color: rgba(59,130,246,.45); }
  .soundtrack-btn.in-nav:hover { transform: none; }

  /* ── Герой ── */
  #hero { min-height: 100svh; padding-top: calc(88px + env(safe-area-inset-top));
    background: radial-gradient(ellipse 130% 75% at 50% 32%, #ffffff 0%, #f6f8ff 42%, #e6ecfa 74%, #d7dff4 100%); }
  .hero-text { padding-top: 0; position: relative; z-index: auto; pointer-events: none; }   /* мяч летает поверх текста, впереди мяча — только кнопка «Записать ребёнка» (у неё z-index 20) */
  .hero-text a, .hero-text button { pointer-events: auto; }
  .hero-inner { pointer-events: none; }
  .hero-inner * { pointer-events: none; }
  .hero-inner a, .hero-inner button, .hero-inner .btn { pointer-events: auto; }
  .hero-label { letter-spacing: 2.5px; font-size: .64rem; flex-wrap: nowrap; white-space: nowrap; margin-bottom: 14px; }
  .hero-h1 { font-size: clamp(2.7rem, 13vw, 3.4rem); margin-bottom: 14px; }
  .hero-tagline { font-size: .95rem; }
  .hero-desc { font-size: .95rem; line-height: 1.55; max-width: 34ch; }
  .scroll-ind { display: none !important; }

  .ball-tooltip { display: none !important; }
  /* фото в шапке: крупные, чтобы было видно, что на них */
  /* фото вылетают и за верхний край экрана */
  .floating-photos { opacity: .55; top: -10%; height: 84%;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%); }
  .hero-tagline, .hero-desc, .hero-label { text-shadow: 0 0 10px rgba(240,245,255,.95), 0 0 2px rgba(240,245,255,.9); }
  .photo-float { width: min(58vw, 250px); border-radius: 16px; }
  .photo-float:nth-child(n+7) { display: none; }
  .blob { display: none; }

  /* ── Тренеры ── */
  .coach-stats { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
  .coach-stat { padding: 14px 6px !important; }
  .coach-stat-val, .coach-stat .val { font-size: 1.3rem !important; }
  .coach-stat-lbl, .coach-stat .lbl { font-size: .66rem !important; line-height: 1.3; }

  /* ── Новости: главная карточка без наложения плашки на заголовок ── */
  .news-featured-img { aspect-ratio: auto; min-height: 250px; padding: 60px 20px 20px; }
  .news-featured-content h3 { font-size: 1.15rem; }

  /* ── Стритбол без доступа: не держим пустую «простыню» ── */
  .pg-locked { max-height: 460px; overflow: hidden; }

  /* ── Ленты (горизонтальный свайп) ── */
  .m-rail {
    display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
    grid-template-columns: none !important; column-count: auto !important;
    gap: 12px !important; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-padding: 0 16px; overscroll-behavior-x: contain;
    margin: -10px -16px -10px !important; padding: 14px 16px 24px !important;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: none !important;
  }
  .m-rail::-webkit-scrollbar { display: none; }
  .m-rail > * { flex: 0 0 84%; max-width: 84%; scroll-snap-align: start; margin: 0 !important; break-inside: auto; }
  .m-rail > .m-rail-end { flex: 0 0 1px; }
  .m-rail.m-rail--narrow > * { flex-basis: 72%; max-width: 72%; }
  .m-rail.m-rail--wide > * { flex-basis: 90%; max-width: 90%; }
  .m-rail-meta { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 4px; min-height: 18px; }
  .m-rail-dots { display: flex; gap: 6px; }
  .m-rail-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--blue-200, #bfdbfe); transition: width .3s, background .3s; }
  .m-rail-dots i.on { width: 18px; background: var(--blue-600, #2563eb); }
  .m-rail-count { font: 600 .75rem var(--font-body); color: var(--text-muted); letter-spacing: .02em; }

  /* история: компактная вертикальная шкала (короткая, с анимацией точек и линии) */
  .timeline { max-width: 100%; }
  .timeline::before { left: 11px; }
  .m-tl-progress { left: 11px !important; }
  .tl-item { padding-left: 40px; margin-bottom: 26px; }
  .tl-dot { left: 3px; }
  .tl-title { font-size: 1.05rem; }
  .tl-desc { font-size: .9rem; line-height: 1.55; }

  /* разделы — как на компьютере: мягкое чередование белого и светло-голубого */
  #stats-bar { padding-top: 8px; padding-bottom: 8px; }
  #quote { padding-top: 48px; padding-bottom: 32px; }
  /* «Только для своих»: без серой подложки-заглушки */
  .pg-locked { min-height: 0; max-height: none !important; overflow: visible !important; }
  .pg-locked > :first-child { display: none !important; }
  .pg-locked > :last-child { position: static !important; transform: none !important; margin: 0 auto; inset: auto !important; }

  /* карточки внутри лент не должны тянуться на всю высоту соседей */
  .m-rail > .player-card, .m-rail > .video-card, .m-rail > .lrn-card, .m-rail > .fan-post, .m-rail > .news-card { height: auto; align-self: stretch; }
  #fanzoneGrid.m-rail .tgp { margin-bottom: 0; }

  /* ── Нижняя панель вкладок ── */
  .m-tabbar {
    display: flex; position: fixed; z-index: 1200; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--m-tabbar-h); padding: 6px; border-radius: 22px; justify-content: space-between;
    background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border: 1px solid rgba(200,210,230,.6); box-shadow: 0 10px 30px rgba(15,23,42,.14);
    transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
  }
  .m-tabbar.is-hidden { transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }
  .m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none;
    border-radius: 16px; color: var(--text-muted, #94a3b8); font: 600 .62rem var(--font-body); letter-spacing: .01em; padding: 0; cursor: pointer;
    transition: color .25s, background .25s; }
  .m-tab svg { width: 22px; height: 22px; }
  .m-tab.on { color: var(--blue-600, #2563eb); background: var(--blue-50, #eff6ff); }
  .m-tab-acc { position: relative; }
  .m-tab-acc.is-in { color: var(--blue-600, #2563eb); }
  .m-tab-acc.is-in::after { content: ''; position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px #fff; }
  .m-tab:active { transform: scale(.94); }

  /* ── Шторка «Все разделы» ── */
  .m-sheet-bg { display: block; position: fixed; inset: 0; z-index: 1300; background: rgba(8,14,32,.42); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .m-sheet-bg.on { opacity: 1; pointer-events: auto; }
  .m-sheet {
    display: block; position: fixed; z-index: 1301; left: 0; right: 0; bottom: 0; max-height: 88svh; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-radius: 26px 26px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(105%); visibility: hidden; transition: transform .42s cubic-bezier(.2,.9,.2,1), visibility 0s linear .42s; box-shadow: 0 -20px 50px rgba(15,23,42,.18);
  }
  .m-sheet.on { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.2,.9,.2,1); }
  .m-sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: #dbe3ef; margin: 4px auto 12px; }
  .m-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .m-sheet-head b { font: 800 1.25rem var(--font-display); letter-spacing: -.02em; }
  .m-sheet-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #f1f5f9; color: var(--text-secondary); font-size: 1.3rem; line-height: 1; }
  .m-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .m-sheet-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 86px; padding: 12px 6px;
    border-radius: 18px; background: #f6f8fc; color: var(--text-primary); font: 600 .78rem var(--font-body); text-align: center; text-decoration: none; }
  .m-sheet-grid a svg { width: 24px; height: 24px; color: var(--blue-600, #2563eb); }
  .m-sheet-grid a.on { background: var(--blue-50, #eff6ff); color: var(--blue-700, #1d4ed8); box-shadow: inset 0 0 0 1.5px var(--blue-200, #bfdbfe); }
  .m-sheet-grid a:active { transform: scale(.96); }
  .m-sheet-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
  .m-sheet-cta button { height: 50px; border-radius: 16px; border: 0; font: 700 .9rem var(--font-body); }
  .m-sheet-cta .primary { background: var(--blue-600, #2563eb); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.3); }
  .m-sheet-cta .ghost { background: #eef2f8; color: var(--text-primary); }
  body.m-sheet-open { overflow: hidden; }

  /* модальные окна — как «шторки» снизу */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: none !important; max-height: 92svh; border-radius: 24px 24px 0 0 !important; margin: 0; }

  /* тост над нижней панелью */
  .toast { top: auto; bottom: calc(var(--m-tabbar-h) + 24px + env(safe-area-inset-bottom)); left: 16px; right: 16px; transform: translateY(160%); }
  .toast.show { transform: none; }
}

@media (max-width: 380px) {
  .m-rail > * { flex-basis: 88%; max-width: 88%; }
  .m-tab { font-size: .58rem; }
  .coach-stat-lbl, .coach-stat .lbl { font-size: .6rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .m-sheet, .m-tabbar, .m-sheet-bg { transition: none; }
}

/* ── Сенсорные экраны: карточку можно зажать и наклонять (touch-tilt.js) ── */
.lbc { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.lbc.is-touch-tilt .lbc-inner { transition-duration: .08s !important; }
.lbc.is-touch-tilt { z-index: 5; }
/* прокрутка внутри окон не «проваливается» на страницу */
.modal, .modal-body, .lrn-ov, .lrn-sheet, .lbp-sheet, .m-sheet { overscroll-behavior: contain; }
html.lb-scroll-locked, html.lb-scroll-locked body { overscroll-behavior: none; }
html.lb-touch .lbv-hint::before, html.lb-touch .dk-mhint::before { content: 'Зажми и наклоняй — карточка переливается · '; font-weight: 600; color: var(--blue-600, #2563eb); }

/* ── Без приближения страницы (двойной тап / щипок). Карта и фото в просмотрщике масштабируются сами (touch-tilt.js) ── */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.crt-lb img, .tgp-lb img, img[data-zoomable] { touch-action: none; transform-origin: center; will-change: transform; }
@media (max-width: 760px) {
  /* iOS сам приближает страницу при фокусе на поле с шрифтом мельче 16px */
  input, select, textarea { font-size: 16px !important; }
}

/* ── Карточки: скругляем каждый слой отдельно — Safari при 3D-наклоне не обрезает углы по родителю ── */
.lbc-face > .lbc-bg, .lbc-face > .lbc-court, .lbc-face > .lbc-foil, .lbc-face > .lbc-glare,
.lbc-face > .hw-foil, .lbc-face > .hw-sparkle, .lbc-face > .lbe-art { border-radius: inherit; clip-path: inset(0 round 5.5cqw); }
.lbc-face > .lbc-photo { clip-path: inset(0 round 5.5cqw 5.5cqw 0 0); }
.lbc-face { -webkit-transform-style: flat; transform-style: flat; }
@media (max-width: 760px) {
  .coach-photo.has-img { width: 68%; max-width: 280px; aspect-ratio: 3 / 4; }
}

/* фото тренера: имя не дублируем на снимке — оно и так написано рядом */
.coach-photo.has-img .coach-photo-name { display: none; }
.coach-photo.has-img::after { background: linear-gradient(to top, rgba(255,255,255,.35) 0%, transparent 22%); }

@media (max-width: 900px) {
  /* паки: начинаются ровно по слову «ПАКИ», тень активного пака не обрезается полосой */
  .dk-packs { scroll-padding-inline: 16px; margin: -10px -16px -14px !important; padding: 10px 16px 22px !important; }
  .dk-side-h { padding-left: 0; }
  .dk-pack.is-active { box-shadow: 0 6px 18px rgba(37,99,235,.14) !important; }
}
@media (max-width: 760px) {
  /* плашка «Состав и статистика онлайн из FAS…» — небольшая строка над лентой, а не карточка ленты */
  .fas-roster-note { margin: 0 0 12px; max-width: 100%; font-size: .76rem; padding: 7px 12px; border-radius: 14px; width: fit-content; }
}

/* ═══ Тени на телефоне: не обрезаются краями разделов и лент ═══
   1) разделы больше не режут содержимое по вертикали (только по горизонтали — чтобы не было бокового скролла);
   2) внутри прокручиваемых лент тени убраны — карточки отделяются тонкой рамкой (тень там всё равно режется краем прокрутки);
   3) остальные тени — короткие и мягкие, им хватает воздуха между блоками. */
@media (max-width: 760px) {
  .section:not(#hero) { overflow: visible !important; overflow-x: clip !important; }
  body { overflow-x: hidden; }
  .glass, .glass-strong, .glass:hover { box-shadow: 0 4px 18px rgba(15,23,42,.06) !important; }
  .m-rail > * { box-shadow: 0 4px 14px rgba(15,23,42,.07) !important; }      /* помещается в отступы ленты */
  /* без [class*="card"]: селектор по атрибуту class заставлял браузер пересчитывать стили ВСЕЙ страницы при любой смене класса у <html> (окна, прокрутка) */
  .m-rail > * .glass, .m-rail > * :is(.news-card, .player-card, .video-card, .photo-card, .lrn-card, .knowledge-card, .roster-card, .result-card, .training-card, .ul-card, .pg-card, .kz-card, .lbm-card, .cmp-card, .ph-card, .rl-card, .profile-card),
  .dk-packs > *, .lbm-coll-row > *, .pg-list > *, .mo-j-list > *, .mo-rv-row > *, .lrn-topics > *,
  .fas-table-wrap *, .fas-bx-wrap *, .fas-table-scroll *, .fas-events > *, .modal-body .glass {
    box-shadow: none !important;
  }
  .m-rail > .m-rail-end { box-shadow: none !important; }
  .dk-pack.is-active { box-shadow: inset 0 0 0 2px var(--blue-500, #3b82f6) !important; }
  .lbm-coll-row > *, .mo-rv-row > * { outline: 1px solid rgba(200,210,230,.5); outline-offset: -1px; }
  /* кнопки и плашки: короткая тень, которая помещается в отступ */
  .btn-primary, .m-tab-pill, .tab-btn.active, .fas-grpswitch button.on, .lbp-pill { box-shadow: 0 2px 6px rgba(37,99,235,.22) !important; }
  .cta-box, .next-game, .calendar { box-shadow: 0 6px 22px rgba(15,23,42,.07) !important; }
}
@media (hover: none) {
  /* на пальце «наведение» залипает и приподнимает карточку — край ленты её обрезает */
  .news-card:hover, .player-card:hover, .training-card:hover, .video-card:hover, .lrn-card:hover, .photo-card:hover, .glass:hover { transform: none; }
}

@media (max-width: 760px) {
  .ballsnd-btn.in-nav { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; flex: 0 0 auto; -webkit-backdrop-filter: none; backdrop-filter: none;
    background: rgba(255,255,255,.7); border: 1px solid rgba(200,210,230,.5); box-shadow: none; }
  .ballsnd-btn.in-nav .bs-label { display: none; }
  .ballsnd-btn.in-nav .bs-ico { width: 24px; height: 24px; }
  .ballsnd-btn.in-nav:hover { transform: none; }
}

/* Фото в шапке на телефоне: вылетают слева и справа от надписей, к центру растворяются — текст всегда чистый */
@media (max-width: 759px) {
  #hero .floating-photos {
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 16%, transparent 34%, transparent 66%, #000 84%, #000 100%), linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 16%, transparent 34%, transparent 66%, #000 84%, #000 100%), linear-gradient(to bottom, #000 0%, #000 76%, transparent 100%);
    -webkit-mask-composite: source-in; mask-composite: intersect; opacity: .7; }
  #hero .photo-float { width: min(42vw, 180px); }
}

/* Первый экран — фиксированной высоты (переменная --lb-vh0 из <head>): не растёт и не сжимается, когда прячутся/появляются панели браузера */
@media (max-width: 759px) {
  html.lb-touch #hero { min-height: var(--lb-vh0, 100svh) !important; }
}

/* ── аватарка в меню (navava.js): фото — сразу из сохранённой копии; нет фото — инициалы ── */
.m-nav-account.has-ava { background: var(--lb-ava) center / cover no-repeat !important; border-color: transparent !important; box-shadow: 0 0 0 2px #fff, 0 4px 12px rgba(37,99,235,.28); }
.m-nav-account.has-ava svg, .m-nav-account.has-ini svg { display: none; }
.m-nav-account.has-ini::before { content: attr(data-ini); font: 800 .8rem var(--font-body, inherit); letter-spacing: .02em; }
.nav-account.has-ava, .nav-account.has-ini { display: inline-flex !important; align-items: center; gap: 8px; padding-left: 6px !important; }
.nav-account.has-ava::before, .nav-account.has-ini::before { content: attr(data-ini); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 800 .62rem var(--font-body, inherit); color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.nav-account.has-ava::before { content: ''; background: var(--lb-ava) center / cover no-repeat; box-shadow: 0 0 0 1.5px rgba(37,99,235,.25); }
.t-acc.has-ava svg, .t-acc.has-ini svg { display: none; }
.t-acc.has-ava::before, .t-acc.has-ini::before { content: attr(data-ini); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 800 .62rem var(--font-body, inherit); color: #fff; background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.t-acc.has-ava::before { content: ''; background: var(--lb-ava) center / cover no-repeat; box-shadow: 0 0 0 2px #fff; }

/* ── окна и кабинет на телефоне: внизу запас под панель браузера (Safari) и «чёлку» снизу ── */
@media (max-width: 760px) {
  .modal { max-height: calc(100dvh - 24px); max-height: 92svh; }
  .modal-body { max-height: calc(92svh - 70px) !important; padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  .lbp .lbp-body { padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important; }
}

/* компьютер: звук мяча и музыка — кружки в верхнем меню (navava.js) */
.d-nav-audio { display: flex; align-items: center; gap: 8px; margin-left: 10px; flex: 0 0 auto; }
.d-nav-audio[hidden] { display: none; }
.ballsnd-btn.in-dnav, .soundtrack-btn.in-dnav { position: static; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; gap: 0; border-radius: 50%; flex: 0 0 auto;
  background: #fff; border: 1.5px solid var(--blue-200, #bfdbfe); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.ballsnd-btn.in-dnav .bs-label, .soundtrack-btn.in-dnav .soundtrack-label { display: none; }
.ballsnd-btn.in-dnav .bs-ico { width: 24px; height: 24px; }
.soundtrack-btn.in-dnav .soundtrack-icon { font-size: 1.05rem; line-height: 1; }
.soundtrack-btn.in-dnav .st-main { display: grid; place-items: center; }
.ballsnd-btn.in-dnav:hover, .soundtrack-btn.in-dnav:hover { transform: translateY(-1px); background: var(--blue-50, #eff6ff); }
.soundtrack-btn.in-dnav.playing { background: var(--blue-50, #eff6ff); border-color: rgba(59,130,246,.55); }

/* ═══ Кнопки верхнего меню: скруглённые квадраты везде (колокольчик, звук мяча, музыка, кабинет) ═══ */
html body .lbn-bell, html body .ballsnd-btn.in-dnav, html body .soundtrack-btn.in-dnav,
html body .ballsnd-btn.in-nav, html body .soundtrack-btn.in-nav, html body .m-nav-account,
html.lb-tab body .soundtrack-btn.t-in-bar, html.lb-tab body .ballsnd-btn.t-in-bar { border-radius: 14px; }
/* музыка: иконка строго по центру (раньше мешали поля и скрытая стрелка выбора трека) */
html body .soundtrack-btn.in-dnav .st-caret, html body .soundtrack-btn.in-nav .st-caret { display: none !important; }
html body .soundtrack-btn.in-dnav .st-main, html body .soundtrack-btn.in-nav .st-main { display: grid; place-items: center; width: 100%; height: 100%; padding: 0 !important; gap: 0; }
html body .soundtrack-btn .soundtrack-icon { display: grid; place-items: center; margin: 0; text-align: center; }
/* компьютер: одинаковые размеры и шаг */
html body .ballsnd-btn.in-dnav, html body .soundtrack-btn.in-dnav { width: 40px; height: 40px; }
@media (min-width: 1025px) { html body .lbn-bell { width: 40px; height: 40px; margin-left: 8px; } }
html body .nav-account.has-ava::before, html body .nav-account.has-ini::before { border-radius: 8px; }
html body .t-acc.has-ava::before, html body .t-acc.has-ini::before { border-radius: 8px; }

/* телефон: название сайта не прилипает к кнопкам, кнопки компактнее и ближе друг к другу */
@media (max-width: 760px) {
  html body .nav { gap: 0; }
  html body .nav-logo { flex: 0 1 auto; min-width: 0; margin-right: 12px; font-size: clamp(.98rem, 4.6vw, 1.2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body .lbn-bell { margin-left: auto; margin-right: 6px; width: 36px; height: 36px; }
  html body .lbn-bell svg { width: 19px; height: 19px; }
  html body .m-nav-right { gap: 6px; margin-left: 0; }
  html body .lbn-bell[hidden] + .m-nav-right, html body .nav-logo + .m-nav-right { margin-left: auto; }
  html body .m-nav-account, html body .soundtrack-btn.in-nav, html body .ballsnd-btn.in-nav { width: 36px; height: 36px; }
  html body .ballsnd-btn.in-nav .bs-ico { width: 21px; height: 21px; }
  /* аватарка: ровный квадрат со скруглением, рамка внутри — ничего не обрезается краем экрана */
  html body .m-nav-account, html body .soundtrack-btn.in-nav, html body .ballsnd-btn.in-nav, html body .lbn-bell { border-radius: 13px; }
}
@media (max-width: 380px) {
  html body .nav, html body .nav.scrolled { padding-left: 12px; padding-right: 12px; }
  html body .nav-logo { margin-right: 8px; font-size: .92rem; }
  html body .m-nav-right { gap: 5px; }
  html body .lbn-bell { margin-right: 5px; width: 34px; height: 34px; }
  html body .m-nav-account, html body .soundtrack-btn.in-nav, html body .ballsnd-btn.in-nav { width: 34px; height: 34px; }
}

/* аватарка в меню телефона: фото до самых краёв скруглённого квадрата, без белых полей и рамок */
html body .m-nav-account.has-ava { padding: 0 !important; border: 0 !important;
  background: var(--lb-ava) center / cover no-repeat !important; background-clip: border-box !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.18) !important; }
html body .m-nav-account.has-ava::before { display: none !important; }

/* «Потяни вниз — обновить» в приложении с экрана «Домой» (ptr.js) */
.lb-ptr { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 62px); z-index: 1200; display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 10px 28px -10px rgba(15,23,42,.35), 0 0 0 1px rgba(200,210,230,.6);
  transform: translate(-50%, -64px); opacity: 0; pointer-events: none; font: 700 .8rem var(--font-body, inherit); color: #334155; white-space: nowrap; }
.lb-ptr.back { transition: transform .25s ease, opacity .25s ease; }
.lb-ptr-ball { width: 28px; height: 28px; display: grid; place-items: center; font-size: 1.35rem; line-height: 1; background: none; }
.lb-ptr.ready { color: #1d4ed8; box-shadow: 0 10px 28px -10px rgba(29,78,216,.5), 0 0 0 1.5px #3b82f6; }
.lb-ptr.spin { transition: transform .2s ease; }
.lb-ptr.spin .lb-ptr-ball { animation: lbPtrSpin .7s linear infinite; }
@keyframes lbPtrSpin { to { transform: rotate(360deg); } }

/* ═══ раскрытый список на телефоне/планшете: не лента вбок, а компактная сетка вниз; «Свернуть» — снова лента ═══ */
.m-rail-open { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; overflow: visible !important; flex-wrap: initial !important; }
.m-rail-open > * { margin: 0 !important; min-width: 0 !important; max-width: none !important; width: auto !important; flex: none !important; }
.m-rail-open.m-rail-open--narrow { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
@media (min-width: 600px) { .m-rail-open { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } .m-rail-open.m-rail-open--narrow { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.m-rail-open > .m-rail-end { display: none !important; }
/* карточки в сетке — поменьше, чтобы на экране помещалось больше */
.m-rail-open .video-card { border-radius: 16px !important; }
.m-rail-open .video-info { padding: 8px 10px 10px !important; }
.m-rail-open .video-title { font-size: .76rem !important; line-height: 1.25 !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-rail-open .video-meta { font-size: .64rem !important; }
.m-rail-open .video-badge { font-size: .56rem !important; padding: 3px 7px !important; top: 6px !important; left: 6px !important; }
.m-rail-open .video-play-btn { transform: scale(.7); }
.m-rail-open .player-card, .m-rail-open .lrn-card, .m-rail-open .news-card { border-radius: 16px !important; }
.m-rail-open .player-name { font-size: .82rem !important; }
.m-rail-open .lb-more-card { min-height: 120px; grid-column: 1 / -1; }
