/* Мобильная оболочка («приложение»): телефон до 700 px.
   Компактная верхняя полоса, нижняя панель вкладок с иконками, игровое поле на одном экране.
   Грузится после shell.css; на ширине больше 700 px ничего не меняет. Только ASCII. */
.cab-nav-ico { display: none; }

@media (max-width: 700px) {
  :root {
    --m-top: 54px;
    --m-nav: 62px;
    --m-safe: env(safe-area-inset-bottom, 0px);
    --sticky: var(--m-top);
  }
  html { -webkit-tap-highlight-color: transparent; }
  body { overscroll-behavior-y: none; }
  body :is(button, a, input, select, summary, [role=button]) { touch-action: manipulation; }

  /* ---------- верхняя полоса ---------- */
  body .home-shell { border-radius: 0; }
  body .home-shell > .home-header {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: var(--m-top); padding: 6px 12px; border-radius: 0;
    background: var(--menu-bg, #0c1a12); border-bottom: 1px solid var(--hdr-line, rgb(255 255 255 / .08));
  }
  body .home-brand { gap: 8px; min-width: 0; }
  body .home-brand img { width: 34px; height: 36px; }
  body .home-brand .brand-name { font-size: 20px; line-height: 1; }
  body .home-brand .brand-sub { display: block; margin-top: 3px; font-size: 8.5px; letter-spacing: .14em; }
  body .home-header nav { width: auto; margin: 0; gap: 0; flex: none; }
  body .hdr-tools { display: none; }
  body .user-menu { margin: 0; }
  /* кнопка профиля -> круглый герб клуба */
  body .user-menu > .home-login {
    width: 42px; height: 42px; min-width: 42px; min-height: 42px; padding: 0; gap: 0; border-radius: 50%;
    font-size: 0; color: transparent; overflow: hidden;
    background: var(--crest, none) center / 78% no-repeat, var(--surface-2, #123020);
    border: 2px solid var(--home-green, #2eb84f); box-shadow: none;
  }
  body .user-menu > .home-login::after { display: none; }
  body .user-menu-list { position: fixed; top: calc(var(--m-top) + 6px); right: 10px; left: 10px; min-width: 0; padding: 8px; max-height: calc(100dvh - var(--m-top) - var(--m-nav) - 24px); overflow: auto; }
  body .user-menu-list a, body .user-menu-list button { min-height: 48px; padding: 12px 14px; font-size: 17px; display: flex; align-items: center; }

  /* плашка статистики: тонкая лента под полосой; на экране игры убираем совсем */
  body .stat-strip { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0; margin: 0; padding: 4px 10px; overflow-x: auto; scrollbar-width: none; }
  body .stat-strip::-webkit-scrollbar { display: none; }
  body .stat-strip .stat-pill { border: 0; background: none; padding: 0; font-size: 13px; }
  body .stat-strip .stat-it { padding: 2px 10px; font-size: 13px; }
  body .stat-strip .hdr-social { display: none; }
  body:has(#game) .stat-strip, body:has(.wait-match) .stat-strip { display: none; }

  /* ---------- гость: стартовый экран (окно входа над фото стадиона) ---------- */
  body .landing-stage { padding: min(18svh, 130px) 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  body .stage-window { padding: 14px 16px 10px; max-height: none; }
  body .stage-window .brand-sub, body .stage-window .crest-strip { display: none; }
  body .stage-window label { margin: 8px 0 4px; }
  body .stage-window input[type=submit] { margin-top: 12px; }
  body .stage-window .cab-auth-link { margin-top: 6px; }
  body .stage-social { margin-top: 10px; padding: 8px; gap: 6px; }
  body .stage-social-t { display: none; }
  body .stage-social a { flex-direction: row; min-height: 44px; }

  /* ---------- нижняя панель вкладок ---------- */
  body:has(.cab-navigation) { padding-bottom: calc(var(--m-nav) + var(--m-safe)); }
  body .cab-navigation {
    position: fixed; right: 0; bottom: 0; left: 0; top: auto; z-index: 70;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 0 4px var(--m-safe); overflow: visible;
    min-height: calc(var(--m-nav) + var(--m-safe)); border: 0; border-top: 1px solid var(--hdr-line, rgb(255 255 255 / .1));
    background: var(--menu-bg, #0c1a12); box-shadow: 0 -6px 20px rgb(0 0 0 / .25);
  }
  body .cab-navigation a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--m-nav); padding: 6px 0 4px; border: 0; border-radius: 0; font-size: 11px; font-weight: 600; letter-spacing: .01em; line-height: 1;
    color: var(--hdr-text, #9db5a6);
  }
  body .cab-navigation .cab-nav-ico { display: block; width: 26px; height: 26px; transition: transform .15s ease; }
  body .cab-navigation a[aria-current=page] { color: var(--home-green, #2eb84f); border: 0; }
  body .cab-navigation a[aria-current=page] .cab-nav-ico { transform: translateY(-1px) scale(1.08); }
  body .cab-navigation a[aria-current=page]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--home-green, #2eb84f); }
  body .cab-navigation a:active .cab-nav-ico { transform: scale(.88); }

  /* чат-плавашка выше панели */
  body:has(.cab-navigation) .chat-widget { bottom: calc(var(--m-nav) + var(--m-safe) + 12px); right: 12px; }

  /* ---------- общие экраны ---------- */
  body .cabinet-main, body .matches-main { padding-top: 0; }
  body :is(.cab-workspace, .matches-workspace, .page-main) { padding: 10px 12px 16px; }
  body :is(.cabinet-main, .matches-main) h1 { margin: 4px 0 10px; font-size: 25px; line-height: 1.15; letter-spacing: -.01em; }
  body .matches-intro { margin-bottom: 10px; }
  body .matches-intro p { font-size: 15px; line-height: 1.4; }
  body :is(.match-panel, .cab-card) { border-radius: 18px; }
  body :is(.cabinet-main, .matches-main) :is(input[type=submit], button):not(.sector):not(.chat-fab) { min-height: 52px; border-radius: 14px; font-size: 18px; }

  /* ---------- кабинет и турниры: плотнее ---------- */
  body .cab-club { flex-wrap: nowrap; gap: 14px; padding: 16px 14px; }
  body .cab-club > img { width: 76px; height: 76px; }
  body .cab-club > div { flex: 1 1 0; }
  body .matches-intro p, body .cab-intro p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* ---------- «Играть»: две большие плитки ---------- */
  body .match-panel-heading { padding: 12px 0 8px; }
  body .match-panel-heading h2 { font-size: 20px; }
  body .match-request { padding: 14px; border-radius: 18px; }
  body .match-request h3 { font-size: 18px; margin: 0 0 10px; }
  body .match-chat { display: none; }

  /* ---------- игровое поле: всё на одном экране ---------- */
  body:has(#game) { --gate-h: calc((100dvh - var(--m-nav) - var(--m-safe) - 296px) / 2); }
  body:has(#game) .matches-workspace { padding: 6px 10px 0; grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  body:has(#game) .matches-intro { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html body:has(#game) .matches-main #time { width: auto; box-sizing: border-box; justify-self: stretch; grid-column: 1 / -1; max-width: none; margin: 0 0 8px; padding: 6px 16px; border-radius: 14px; justify-content: space-between; }
  body:has(#game) #time::before { content: "\0421\0445\0435\043C\0430  \043D\0430  \043C\0430\0442\0447"; color: var(--home-muted); font-size: 15px; font-weight: 600; }
  body:has(#game) #time h2 { font-size: 28px; line-height: 1; }
  body:has(#game) #game { gap: 0; margin: 0; }
  body:has(#game) #game > tbody > tr > td { padding: 6px 10px 8px; border-radius: 0; }
  body:has(#game) #game > tbody > tr:first-child > td { padding-bottom: 0; }
  body:has(#game) #game > tbody > tr:last-child > td { padding-top: 0; }
  body:has(#game) #game > tbody > tr:last-child > td:first-child { margin-bottom: 8px; }
  /* заголовок ворот: герб + название + счётчик в одну строку */
  body:has(#game) #game > tbody > tr:first-child > td { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 0 10px; text-align: left; }
  body:has(#game) #game > tbody > tr:first-child img { grid-column: 1; grid-row: 1; width: 28px; height: 28px; }
  body:has(#game) #game > tbody > tr:first-child h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 17px; }
  body:has(#game) #game > tbody > tr:first-child .gate-note { grid-column: 3; grid-row: 1; font-size: 17px; }
  body:has(#game) #game td > div[role=group] { aspect-ratio: 1.5; width: min(100%, calc(var(--gate-h) * 1.5)); min-height: 0; max-height: var(--gate-h); }
  body:has(#game) #game button.sector { min-height: 0; font-size: clamp(20px, 6vw, 30px); }
  body:has(#game) #game button.sector:active:not(:disabled) { background-color: rgb(255 255 255 / .3); }
  /* панель отправки: компактная, над вкладками */
  body form:has(#send) > .center { bottom: calc(var(--m-nav) + var(--m-safe)); margin: 0 -10px; padding: 8px 10px 10px; gap: 4px 10px; }
  body form:has(#send) > .center h3 { font-size: 15px; }
  body form:has(#send) > .center #rand-scheme, body form:has(#send) > .center #send { min-height: 50px; font-size: 17px; }
  body form:has(#send) > .center .match-penalty { grid-column: 1 / -1; font-size: 13px; }
  body:has(#send) .chat-widget { display: none; }

  /* ---------- ожидание матча ---------- */
  body .wait-head { padding: 12px; gap: 8px; }
  body .wait-side img { width: 64px; height: 64px; }
  body .wait-side h2 { font-size: 16px; }
  body .wait-vs b { font-size: 24px; }
  body .wait-vs small { display: none; }
  body #time.wait-timer { padding: 12px 16px; }
  body #time.wait-timer h2 { font-size: 32px; }

  /* ---------- итог матча ---------- */
  body .matches-main #score { padding: 12px 10px; gap: 6px 8px; }
  body .matches-main #score img { width: 56px; height: 56px; }
  body .matches-main #score td[rowspan] { font-size: 48px; }
  body:has(.score-actions) .chat-widget { display: none; }
  body:has(.score-actions) .matches-workspace { padding-bottom: 96px; }
  body .matches-main .score-actions { position: fixed; right: 0; left: 0; bottom: calc(var(--m-nav) + var(--m-safe)); z-index: 65; margin: 0; padding: 10px 12px; gap: 8px; background: var(--menu-bg, #0c1a12); border-top: 1px solid var(--hdr-line, rgb(255 255 255 / .1)); }
  body .matches-main .score-actions > form, body .matches-main .score-actions > a { flex: 1 1 0; min-width: 0; }
  body .matches-main .score-actions a { display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: 17px; }
  body:has(.score-actions) .stat-strip { display: none; }
  body .matches-main .score-actions form input[type=submit] { width: 100%; padding: 0 6px; font-size: 15px !important; white-space: nowrap; }
  body .matches-main .score-actions a { font-size: 16px; }
  /* Длинная подпись («В личный кабинет») не лезет на край: боковой отступ уже, строка переносится, вертикальный отступ держится при любом числе строк. */
  html body .matches-main .score-actions a[href] { padding: 14px 12px; font-size: 16px; line-height: 1.25; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
}

@media (max-width: 700px) and (max-height: 700px) {
  body:has(#game) { --gate-h: calc((100dvh - var(--m-nav) - var(--m-safe) - 296px) / 2); }
}
@media (max-width: 360px) {
  body .home-brand .brand-name { font-size: 17px; }
  body .cab-navigation a { font-size: 10px; }
  body form:has(#send) > .center #rand-scheme, body form:has(#send) > .center #send { padding: 0 6px; font-size: 14px !important; white-space: nowrap; }
  body .matches-main .score-actions > form { flex: 1.5 1 0; }
  body .matches-main .score-actions form input[type=submit] { padding: 0 4px; font-size: 14px !important; }
  body .matches-main .score-actions a { font-size: 14px; }
  html body .matches-main .score-actions a[href] { padding: 12px 8px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  body .cab-navigation .cab-nav-ico { transition: none; }
}

/* ---------- play.js: pull-to-refresh, iOS install hint, win glow ---------- */
.ptr { position: fixed; top: 0; left: 50%; z-index: 90; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2, #123020); color: var(--home-green, #6fcf4e); border: 1px solid var(--line, rgb(255 255 255 / .12)); font-size: 22px; line-height: 1; transform: translate(-50%, -60px); opacity: 0; pointer-events: none; }
.ptr.on { opacity: .9; }
.ptr.ready { opacity: 1; border-color: var(--home-green, #6fcf4e); }
.ptr.spin { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { rotate: 360deg; } }
.ios-hint { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, #123020); color: var(--home-text, #fff); border: 1px solid var(--home-green, #6fcf4e); font-size: 14px; line-height: 1.35; box-shadow: 0 8px 28px rgb(0 0 0 / .35); }
.ios-hint p { margin: 0; flex: 1; }
.ios-hint button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 26px; line-height: 1; cursor: pointer; }
@media (max-width: 700px) {
  .ios-hint.with-tabs { bottom: calc(var(--m-nav, 62px) + env(safe-area-inset-bottom, 0px) + 10px); }
  body .matches-main #score[data-result=win] td[rowspan] { color: var(--home-green, #6fcf4e); text-shadow: 0 0 24px rgb(111 207 78 / .45); }
}
html[data-motion=off] .ptr.spin { animation: none; }
@media (prefers-reduced-motion: reduce) { .ptr.spin { animation: none; } }

/* ===== Phone UX round 2: header that gets out of the way, stat cards, crest, clubs, footer, full-screen chat ===== */
@media (max-width: 700px) {
  /* top bar hides on scroll down, returns on scroll up (play.js toggles body.hdr-away); sticky offsets follow it */
  body .home-shell > .home-header { transition: transform .22s ease, box-shadow .22s ease; will-change: transform; }
  body.hdr-away .home-shell > .home-header { transform: translateY(-101%); box-shadow: none; }
  body.hdr-away { --sticky: 0px; }
  body:not(.hdr-away) .home-shell > .home-header { box-shadow: 0 4px 16px rgb(0 0 0 / .22); }

  /* stat strip: four equal cards, number over label; scrolls away with the page */
  body .stat-strip { display: block; padding: 8px 12px 2px; overflow: visible; }
  body .stat-strip .stat-pill { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; padding: 0; border: 0; background: none; }
  body .stat-strip .stat-it { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 7px 2px 6px; border: 1px solid var(--line, rgb(255 255 255 / .09)); border-radius: 12px; background: var(--surface-2, rgb(255 255 255 / .04)); font-size: 11px; line-height: 1.1; letter-spacing: .02em; color: var(--home-muted, #9db5a6); text-transform: uppercase; white-space: nowrap; }
  body .stat-strip .stat-it + .stat-it { border-left: 1px solid var(--line, rgb(255 255 255 / .09)); }
  body .stat-strip .stat-it b { order: -1; font-size: 19px; line-height: 1.1; letter-spacing: 0; color: var(--home-text, #fff); font-variant-numeric: tabular-nums; }
  body .stat-strip .stat-it svg { display: none; }
  body .stat-strip .stat-dot { position: absolute; top: 6px; right: 7px; margin: 0; }

  /* crest: ring + soft halo + chevron badge so it reads as a menu */
  body .user-menu > .home-login {
    position: relative; overflow: visible; width: 42px; height: 42px; min-width: 42px; min-height: 42px;
    border: 0; background: var(--crest, none) center / 72% no-repeat, radial-gradient(circle at 50% 30%, #214a33, #0c1a12 75%);
    box-shadow: 0 0 0 2px var(--home-green, #2eb84f), 0 0 0 5px rgb(46 184 79 / .16), 0 3px 10px rgb(0 0 0 / .35);
    transition: transform .15s ease, box-shadow .2s ease;
  }
  /* бейдж и стрелка — один элемент: стрелка по центру бейджа, при открытии переворачивается */
  body .user-menu > .home-login::after {
    content: ""; display: block; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; margin: 0;
    box-sizing: border-box; border: 2px solid var(--menu-bg, #0c1a12); border-radius: 50%;
    background: var(--home-green, #2eb84f) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
    -webkit-mask: none; mask: none; transform: none; transition: transform .2s ease;
  }
  body .user-menu > .home-login::before { display: none; }
  body .user-menu.open > .home-login::after { transform: rotate(180deg); }
  body .user-menu > .home-login:active { transform: scale(.92); }
  body .user-menu.open > .home-login { box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgb(46 184 79 / .35), 0 3px 10px rgb(0 0 0 / .35); }

  body .cabinet-main .page-content { padding-left: 0; padding-right: 0; }
  /* clubs: compact search card, countries as 3 tiles per row, clubs as single-line rows */
  body .club-search { gap: 8px; margin-bottom: 14px; padding: 10px; border-radius: 16px; }
  body .club-search label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body .cabinet-main .club-search input[type=search], body .cabinet-main .club-search button.dropdown-button { min-height: 46px; font-size: 16px; border-radius: 12px; }
  body .page-content h2 { margin: 14px 0 8px; font-size: 20px; }
  body #table .list.countries { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  body #table .list.countries a { flex-direction: column; justify-content: center; gap: 5px; min-height: 88px; padding: 10px 4px 8px; font-size: 13px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; border-radius: 14px; }
  body #table .list.countries img { width: 40px; height: 40px; }
  body #table .list:not(.countries) { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body #table .list:not(.countries) a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 64px; padding: 8px 12px; text-align: left; border-radius: 14px; }
  body #table .list:not(.countries) img { width: 44px; height: 44px; }
  body #table .list:not(.countries) .club-list-copy { justify-items: start; width: auto; }
  body #table .list:not(.countries) .club-list-copy > span { font-size: 16px; }
  body #table .list:not(.countries) .club-list-copy small { font-size: 13px; }

  /* footer: centred, symmetric, clear of the chat button */
  body .home-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 16px calc(96px + var(--m-safe)); text-align: center; }
  body .home-footer .foot-more { align-self: stretch; justify-content: space-between; width: 100%; min-height: 52px; padding: 0 18px; border-radius: 14px; font-size: 16px; font-weight: 600; }
  body .home-footer .foot-more::after { content: ""; width: 9px; height: 9px; border: solid var(--home-muted); border-width: 2px 2px 0 0; transform: rotate(45deg); }
  body .home-footer .foot-bar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; padding-top: 12px; text-align: center; }
  body .home-footer .foot-bar p { width: 100%; margin: 0; line-height: 1.5; text-align: center; }
  body .home-footer .foot-dot { display: none; }
  body .home-footer .foot-bar a[href^=mailto] { display: block; }
  body .home-footer .foot-tg { flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
  body #menu-sheet nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body #menu-sheet .sheet-link { margin: 0; min-height: 52px; padding: 0 8px 0 12px; font-size: 14px; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
  body #menu-sheet .sheet-link::after { display: none; }

  /* chat: full screen inside the visual viewport, background locked, never zooms on focus */
  html.chat-open, html.chat-open body { overflow: hidden; overscroll-behavior: none; }
  body .chat-widget.open { z-index: 100; }
  body .chat-widget.open .chat-fab { display: none; }
  body .chat-widget.open .chat-panel, body .chat-widget.open.big .chat-panel {
    position: fixed; z-index: 100; top: var(--vvt, 0px); right: 0; bottom: auto; left: 0; width: auto; max-width: none;
    height: var(--vvh, 100dvh); max-height: none; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 0; box-shadow: none; overscroll-behavior: contain;
  }
  html.chat-kb .chat-panel { padding-bottom: 10px; }
  body .chat-panel .chat-log { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body .chat-panel [data-chat-size] { display: none; }
  body .chat-ctl { width: 40px; height: 40px; }
  body .chat-input { font-size: 16px; min-height: 44px; }
  body .chat-form { margin-top: 8px; }
  body .chat-form button.chat-send { width: 36px; height: 36px; bottom: 4px; }
  body .chat-emo-btn { width: 36px; height: 36px; right: 48px; bottom: 4px; }
}

/* ---------- Phone UX round 3: игровое поле без прокрутки ---------- */
@media (max-width: 700px) {
  /* экран схемы стоит на месте: страница не скроллится, шапка не прячется, подвала нет */
  html:has(#game) { overflow: hidden; overscroll-behavior: none; }
  body:has(#game) .home-footer, body:has(#game) .stat-strip { display: none; }
  body:has(#game).hdr-away .home-shell > .home-header { transform: none; }
  body:has(#game) .matches-workspace { padding-bottom: calc(var(--m-nav) + var(--m-safe) + 66px); }
  body:has(#game) #game button.sector { touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .12s ease, transform .12s ease; }
  body:has(#game) #game button.sector:active:not(:disabled) { transform: scale(.96); }
  /* панель отправки: одна строка — счётчик, «Случайная», «Отправить» */
  body form:has(#send) > .center { position: fixed; right: 0; left: 0; z-index: 65; margin: 0; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 0 8px; padding: 8px 10px; }
  body form:has(#send) > .center h3 { grid-column: 1; grid-row: 1; display: grid; justify-items: center; margin: 0; line-height: 1; }
  body form:has(#send) > .center h3 label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body form:has(#send) > .center h3 output { font-size: 26px; font-weight: 800; color: var(--home-green, #6fcf4e); }
  body form:has(#send) > .center h3::after { content: "\043E\0441\0442\0430\043B\043E\0441\044C"; margin-top: 3px; color: var(--home-muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
  body form:has(#send) > .center > p { margin: 0; }
  body form:has(#send) > .center > p:has(#rand-scheme) { grid-column: 2; grid-row: 1; }
  body form:has(#send) > .center > p:has(#send) { grid-column: 3; grid-row: 1; }
  /* подсказка и ошибка всплывают над панелью и не двигают ворота */
  body form:has(#send) > .center #gate-msg { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 6px); z-index: 2; margin: 0; min-height: 0; padding: 7px 12px; border-radius: 12px; background: var(--menu-bg, #0c1a12); border: 1px solid var(--line, rgb(255 255 255 / .14)); font-size: 14px; line-height: 1.25; text-align: center; pointer-events: none; box-shadow: 0 6px 18px rgb(0 0 0 / .35); }
  body form:has(#send) > .center #gate-msg[data-state=error] { color: #ff8a80; border-color: #a72821; }
  body form:has(#send) > .center #gate-msg { opacity: 0; }
  body form:has(#send) > .center #gate-msg[data-show] { animation: gate-toast 2.4s cubic-bezier(.2, .9, .3, 1.2) both; }
  @keyframes gate-toast {
    0% { opacity: 0; transform: translateY(14px) scale(.96); }
    12% { opacity: 1; transform: none; }
    82% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: translateY(8px); }
  }
  @media (prefers-reduced-motion: reduce) { body form:has(#send) > .center #gate-msg[data-show] { animation: none; opacity: 1; } }
  body form:has(#send) > .center .match-penalty { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
  body form:has(#send) > .center #rand-scheme, body form:has(#send) > .center #send { width: 100%; min-height: 48px; padding: 0 6px; font-size: 15px !important; white-space: nowrap; }
}

@media (max-width: 700px) {
  body form:has(#send) > .center #rand-scheme, body form:has(#send) > .center #send { font-size: 14px !important; letter-spacing: -.01em; }
  body form:has(#send) > .center { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.2fr); }
}

/* ---------- Phone UX round 3: схема пенальти как ворота ---------- */
@media (max-width: 700px) {
  body .cup-penalty { display: grid; gap: 12px; padding-bottom: 70px; }
  body .cup-penalty fieldset { padding: 12px; border: 1px solid var(--line, rgb(255 255 255 / .14)); border-radius: 16px; background: rgb(255 255 255 / .03); min-width: 0; }
  body .cup-penalty legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; }
  body .cup-penalty legend .pen-cnt { color: var(--home-muted, #9ab); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
  body .cup-penalty legend .pen-cnt.done { color: var(--home-green, #6fcf4e); }
  body .cup-penalty .cup-sectors { clear: both; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  /* как в воротах: 7 8 9 сверху, 1 2 3 снизу */
  body .cup-penalty .cup-sectors label:nth-child(n+7) { order: 1; }
  body .cup-penalty .cup-sectors label:nth-child(n+4):nth-child(-n+6) { order: 2; }
  body .cup-penalty .cup-sectors label:nth-child(-n+3) { order: 3; }
  body .cup-penalty .cup-sectors span { height: clamp(46px, 9.5dvh, 64px); border-radius: 12px; font-size: 24px; font-weight: 800; transition: background-color .12s ease, transform .12s ease; -webkit-tap-highlight-color: transparent; }
  body .cup-penalty .cup-sectors label:active span { transform: scale(.95); }
  body .cup-penalty .cup-sectors input:checked + span { box-shadow: 0 0 0 2px rgb(111 207 78 / .35); }
  body .cup-penalty-actions { position: fixed; z-index: 65; right: 0; left: 0; bottom: calc(var(--m-nav) + var(--m-safe)); margin: 0; padding: 8px 10px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; background: var(--menu-bg, #0c1a12); border-top: 1px solid var(--line, rgb(255 255 255 / .14)); }
  body .cup-penalty-actions > * { min-width: 0; min-height: 48px; font-size: 15px; line-height: 1.15; white-space: normal; padding: 0 8px; }
  body:has(.cup-penalty) .chat-widget { display: none; }
  body .cup-penalty-actions #pen-random { background: transparent; box-shadow: none; border: 1px solid var(--home-green, #2eb84f); color: var(--home-green, #6fcf4e); }
}

/* ---------- Phone UX round 3: сетка кубка — чипы раундов и путь команды ---------- */
@media (max-width: 700px) {
  .cup-rnav { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 8px; padding: 2px 0 6px; scrollbar-width: none; }
  .cup-rnav::-webkit-scrollbar { display: none; }
  .cup-rnav button { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line, rgb(255 255 255 / .14)); border-radius: 999px; background: rgb(255 255 255 / .04); color: inherit; font: 600 14px/1 inherit; white-space: nowrap; }
  .cup-rnav button:active { background: rgb(111 207 78 / .2); }
  .cup-trace-hint { margin: 0 0 10px; color: var(--home-muted, #9ab); font-size: 14px; }
  .cup-bracket .cup-round { scroll-margin-top: 70px; }
  .cup-bracket .cup-pair p { min-height: 44px; cursor: pointer; }
  .cup-bracket.cup-tracing .cup-pair:not(.on) { opacity: .35; }
  .cup-bracket .cup-pair.on { border-color: var(--home-green, #2eb84f); box-shadow: 0 0 0 1px var(--home-green, #2eb84f); }
  .cup-trace-card { position: relative; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--home-green, #2eb84f); border-radius: 14px; background: rgb(46 184 79 / .08); }
  .cup-trace-card h4 { margin: 0 56px 8px 0; font-size: 17px; }
  .cup-trace-x { position: absolute; top: 8px; right: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line, rgb(255 255 255 / .14)); border-radius: 999px; background: transparent; color: inherit; font-size: 13px; }
  .cup-trace-card ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .cup-trace-card li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 10px; border-radius: 10px; background: rgb(255 255 255 / .05); border-left: 3px solid var(--home-muted, #678); }
  .cup-trace-card li.w { border-left-color: #43c463; }
  .cup-trace-card li.l { border-left-color: #e0564b; }
  .cup-trace-card li small { grid-column: 1 / -1; color: var(--home-muted, #9ab); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
  .cup-trace-card li b { font-variant-numeric: tabular-nums; }
}

/* ---------- Phone UX round 3: итог матча — ворота крупно, удары и защита карточками ---------- */
@media (max-width: 700px) {
  body .matches-main #score { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 8px; padding: 14px 12px 16px; }
  body .matches-main #score::before { grid-area: 1 / 1 / 2 / -1; justify-self: center; margin: 0 0 6px; padding: 6px 18px; border-radius: 999px; background: rgb(255 255 255 / .08); color: var(--home-muted, #9ab); font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; content: "\41d \438 \447 \44c \44f "; }
  body .matches-main #score[data-result=win]::before { content: "\41f \43e \431 \435 \434 \430 "; background: rgb(111 207 78 / .18); color: var(--home-green, #6fcf4e); }
  body .matches-main #score[data-result=lose]::before { content: "\41f \43e \440 \430 \436 \435 \43d \438 \435 "; background: rgb(224 86 75 / .16); color: #ff8a80; }
  body .matches-main #score tr:first-child > td:first-child { grid-area: 2 / 1; }
  body .matches-main #score tr:first-child > td:last-child { grid-area: 2 / 3; }
  body .matches-main #score td[rowspan] { grid-area: 2 / 2 / 4 / 3; align-self: center; font-size: 52px; letter-spacing: -1px; }
  body .matches-main #score tr:nth-child(2) > td:first-child { grid-area: 3 / 1; }
  body .matches-main #score tr:nth-child(2) > td:last-child { grid-area: 3 / 3; }
  body .matches-main #score .side { margin: 0; font-size: 13px; }
  body .matches-main #score tr:nth-child(2) > td { gap: 8px; }
  body .matches-main #score h3 { font-size: 16px; font-weight: 700; }
  body .matches-main #score img { width: 64px; height: 64px; }
  body .matches-main #score tr:last-child > td.scheme { grid-column: 1 / -1; padding: 12px 10px 14px; border: 1px solid var(--line, rgb(255 255 255 / .12)); border-radius: 16px; background: rgb(255 255 255 / .035); text-align: center; }
  body .matches-main #score tr:last-child > td.scheme:first-child { grid-area: 4 / 1 / 5 / -1; margin-top: 10px; }
  body .matches-main #score tr:last-child > td.scheme:last-child { grid-area: 5 / 1 / 6 / -1; }
  body .matches-main #score tr:last-child > td.scheme::before { display: block; margin: 0 0 8px; color: var(--home-muted, #9ab); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  body .matches-main #score tr:last-child > td.scheme:first-child::before { content: "\412 \43e \440 \43e \442 \430 \20 \441 \43e \43f \435 \440 \43d \438 \43a \430 "; }
  body .matches-main #score tr:last-child > td.scheme:last-child::before { content: "\412 \430 \448 \438 \20 \432 \43e \440 \43e \442 \430 "; }
  body .matches-main #score .gate-big { max-width: 340px; }
  body .matches-main #score .gate-big span { font-size: 13px; font-weight: 800; }
  body .matches-main #score .gate-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; font-size: 14px; }
  body .matches-main #score .gate-nums i { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; background: rgb(255 255 255 / .05); white-space: normal; }
  body .matches-main #score .gate-sum { display: inline-block; margin: 10px 0 0; padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / .08); font-size: 15px; font-weight: 700; }
}

.theme-chip { display: contents; }
html body .theme-tabs .theme-chip button.theme-info, .theme-pop { display: none; }

/* Турниры на телефоне: компактные плашки тем с кнопкой «?», карточки кубков в одну плотную строку */
@media (max-width: 700px) {
  body:has(.theme-tabs) .matches-intro { margin-bottom: 8px; }
  body:has(.theme-tabs) .matches-intro h1 { font-size: 26px; }
  body:has(.theme-tabs) .matches-intro p { display: none; }
  body .theme-tabs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin: 0 0 12px; position: relative; }
  .theme-chip { position: relative; display: block; }
  body .theme-tabs .theme-chip > a { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 50px 6px 8px; border-radius: 12px; }
  body .theme-tabs .theme-chip > a img { width: 26px; height: 34px; flex: none; }
  body .theme-tabs .theme-chip > a b { grid-row: auto; font-size: 14px; line-height: 1.2; font-weight: 700; }
  body .theme-tabs .theme-chip .theme-bag { display: none; }
  html body .theme-tabs .theme-chip button.theme-info.theme-info { position: absolute; top: 0; right: 0; bottom: 0; display: grid; place-items: center; width: 50px; height: auto; min-width: 0; min-height: 0; padding: 0; border: 0 !important; border-radius: 0 12px 12px 0; background: transparent !important; box-shadow: none !important; transform: none; isolation: isolate; color: var(--home-green-hover, #8fe36d); font-family: inherit; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  html body .theme-tabs .theme-chip button.theme-info.theme-info::before { content: ""; position: absolute; z-index: -1; width: 28px; height: 28px; border: 1px solid var(--line-strong, #ffffff44); border-radius: 50%; background: var(--surface-3, #ffffff14); }
  html body .theme-tabs .theme-chip button.theme-info.theme-info[aria-expanded=true] { color: #04140a; }
  html body .theme-tabs .theme-chip button.theme-info.theme-info[aria-expanded=true]::before { border-color: transparent; background: var(--home-green, #3fae3b); }
  body:has(.theme-tabs) .cup-notice { margin: 0 0 8px; padding: 8px 12px; font-size: 14px; line-height: 1.35; }
  body:has(.theme-tabs) .cup-note { margin: 0 0 8px; font-size: 14px; }
  .theme-chip[data-open] { z-index: 200; }
  .theme-pop { display: none; position: fixed; left: 12px; right: 12px; bottom: calc(var(--m-nav) + var(--m-safe) + 14px); box-sizing: border-box; padding: 14px 16px 15px; border: 1px solid var(--home-green, #3fae3b); border-radius: 16px; background: #0f2a1f; box-shadow: 0 14px 36px #000a; font-size: 15px; line-height: 1.45; }
  .theme-chip[data-open] .theme-pop { display: block; animation: pop-in .18s ease-out; }
  .theme-pop b { display: block; margin: 0 0 4px; font-size: 17px; }
  .theme-pop p { margin: 0; }
  .theme-pop .pop-prog { margin-top: 6px; color: var(--home-muted); font-size: 13px; }
  @keyframes pop-in { from { opacity: 0; transform: translateY(8px); } }

  body .theme-section { margin-bottom: 8px; padding: 10px 12px 12px; scroll-margin-top: 10px; }
  body .theme-section .match-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding: 0; }
  body .theme-section .match-panel-heading h2 { gap: 8px; font-size: 18px; }
  body .theme-section .match-panel-heading img { width: 22px; height: 28px; }
  body .theme-section .match-panel-heading span a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 13px; }
  body .theme-section .theme-line { display: none; }
  body .theme-section .match-empty { padding: 8px 12px; font-size: 14px; }
  body .cup-cards { gap: 6px; }
  body .cup-cards li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 10px; padding: 7px 12px 8px; border-radius: 12px; }
  body .cup-cards li > a { grid-column: 1; grid-row: 1; min-height: 0; gap: 10px; font-size: 16px; }
  body .cup-cards li > a time { padding: 1px 8px; font-size: 14px; }
  body .cup-cards li > a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body .cup-stake { grid-column: 1 / -1; grid-row: 2; margin: 0; gap: 4px 6px; font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; color: var(--home-muted); }
  body .cup-stake i { display: none; }
  body .cup-stake b { padding: 0; color: var(--home-muted); font-weight: 500; }
  body .cup-cards li > small { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; font-size: 13px; text-align: right; white-space: nowrap; }
  body .cup-cards li > .cup-bar { grid-column: 1 / -1; height: 3px; margin-top: 4px; }

  /* итог матча: только результат и кнопки, без подвала с разделами сайта */
  body:has(#score) .home-footer { display: none; }
  body:has(#score) .matches-main { padding-bottom: 96px; }
}

/* итог матча: «?» в углу карточки, расшифровка значков в маленьком окошке */
.matches-main .score-card { position: relative; }
html body .matches-main .gate-help button.gate-info.gate-info { position: absolute; top: 4px; right: 4px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; min-width: 0; min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; transform: none; isolation: isolate; color: var(--home-green-hover, #8fe36d); font-family: inherit; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html body .matches-main .gate-help button.gate-info.gate-info::before { content: ""; position: absolute; z-index: -1; width: 28px; height: 28px; border: 1px solid var(--line-strong, #ffffff44); border-radius: 50%; background: var(--surface-3, #ffffff14); }
html body .matches-main .gate-help[data-open] button.gate-info.gate-info { color: #04140a; }
html body .matches-main .gate-help[data-open] button.gate-info.gate-info::before { border-color: transparent; background: var(--home-green, #3fae3b); }
body .matches-main .gate-help .gate-legend { display: none; position: absolute; top: 48px; right: 8px; z-index: 3; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--home-green, #3fae3b); border-radius: 14px; background: #0f2a1f; box-shadow: 0 12px 30px #000a; font-size: 15px; }
body .matches-main .gate-help[data-open] .gate-legend { display: flex; animation: pop-in .18s ease-out; }

/* ===== шапка на телефоне: в слоте между логотипом и гербом только «онлайн» и «бусты» (игроки и клубы — только на десктопе) ===== */
.hdr-stats { display: none; }
@media (max-width: 700px) {
  body .stat-strip { display: none; }
  body .home-header .home-brand { flex: none; }
  .hdr-stats { display: block; flex: 1 1 0; min-width: 0; margin: 0 2px 0 8px; }
  .hdr-stats .stat-pill { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 5px; width: max-content; margin-left: auto; padding: 0; border: 0; background: none; }
  html body .hdr-stats .stat-it { position: static; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 22px; margin: 0; padding: 0 9px; border: 1px solid var(--line-strong, rgb(255 255 255 / .14)); border-radius: 999px; background: var(--surface-2, rgb(255 255 255 / .06)); font-size: 10px; font-weight: 500; line-height: 1; letter-spacing: .04em; text-transform: lowercase; color: var(--home-muted, #9db5a6); white-space: nowrap; }
  html body .hdr-stats .stat-it + .stat-it { border: 1px solid var(--line-strong, rgb(255 255 255 / .14)); }
  .hdr-stats .stat-it b { order: -1; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--home-text, #fff); font-variant-numeric: tabular-nums; }
  .hdr-stats .stat-it .stat-of { display: none; }
  .hdr-stats .stat-pill .stat-it:nth-child(2), .hdr-stats .stat-pill .stat-it:nth-child(3) { display: none; }
  html body .hdr-stats .stat-it .stat-dot { position: static; flex: none; align-self: center; margin: 0; }
  html body .hdr-stats .stat-it svg { display: block; order: -2; flex: none; width: 11px; height: 11px; margin: 0 -1px 0 -2px; color: var(--home-green, #3fae3b); }
}
html body .matches-main .gate-help button.gate-info:focus:not(:focus-visible), html body .theme-tabs .theme-chip button.theme-info:focus:not(:focus-visible) { outline: 0; }

/* ===== «Сыграно сегодня» и шрифты на телефоне: одна сетка, один масштаб ===== */
@media (max-width: 700px) {
  /* шкала: заголовок страницы 25/800, разделы 20/800, карточки и кнопки 17/700, текст 15 */
  html body .matches-main h2, html body .matches-main .request-list-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
  html body .matches-main h3:not(.gate-title) { font-size: 17px; font-weight: 700; line-height: 1.25; }
  html body .matches-main :is(input[type=submit], .match-secondary) { font-size: 17px; font-weight: 700; }
  html body .matches-main .match-empty { font-size: 15px; }

  /* карточка матча: [герб+имя | счёт | герб+имя] и под ними [схема | схема]; всё по центру своих колонок */
  html body :is(.matches-main, .cab-main) .match-results .match-result { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "tm tm tm" "ca sc cb" "ga . gb"; gap: 10px 0; align-items: start; justify-items: center; padding: 12px 10px 14px; }
  html body :is(.matches-main, .cab-main) .match-results .match-result caption { grid-area: tm; justify-self: center; margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .08em; line-height: 1; color: var(--home-green, #3fae3b); font-variant-numeric: tabular-nums; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:first-child > td, html body :is(.matches-main, .cab-main) .match-results .match-result tr:last-child > td:nth-child(2) { display: none; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:nth-child(2) > td:first-child { grid-area: ca; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:nth-child(2) > td:last-child { grid-area: cb; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:nth-child(2) > td:is(:first-child, :last-child) { display: flex; flex-direction: column; align-items: center; justify-self: stretch; align-self: start; gap: 6px; padding: 0 4px; text-align: center; }
  html body :is(.matches-main, .cab-main) .match-results .match-result img { width: 56px; height: 56px; }
  html body :is(.matches-main, .cab-main) .match-results .match-result .mr-name { font-size: 15px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
  /* счёт ровно на уровне гербов */
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:nth-child(2) > td:nth-child(2) { grid-area: sc; display: flex; align-items: center; justify-content: center; align-self: start; height: 56px; padding: 0 6px; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:last-child > td:first-child { grid-area: ga; }
  html body :is(.matches-main, .cab-main) .match-results .match-result tr:last-child > td:last-child { grid-area: gb; }
  html body :is(.matches-main, .cab-main) .match-results .match-result .scheme { display: flex; flex-direction: column; align-items: center; justify-self: stretch; margin: 0; padding: 0 2px; }
  html body :is(.matches-main, .cab-main) .match-results .match-result .gate-view { --cell: 24px; }
  html body :is(.matches-main, .cab-main) .match-results .match-result .gate-nums { align-items: center; margin-top: 8px; font-size: 12px; }
  html body :is(.matches-main, .cab-main) .match-results .match-result .gate-nums i { flex-wrap: wrap; justify-content: center; white-space: normal; }
}
/* самые узкие экраны: подписи кнопок панели отправки не вылезают из кнопок */
@media (max-width: 350px) { body form:has(#send) > .center { grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 1.2fr); gap: 0 6px; } body form:has(#send) > .center #rand-scheme, body form:has(#send) > .center #send { font-size: 13px !important; padding-left: 4px; padding-right: 4px; letter-spacing: 0 !important; } }
@media (max-width: 400px) {
  html body .hdr-stats .stat-it { height: 24px; padding: 0 6px; gap: 3px; font-size: 9px; letter-spacing: 0; }
  .hdr-stats .stat-it b { font-size: 12px; }
  html body .hdr-stats .stat-it svg { width: 10px; height: 10px; margin: 0; }
  .hdr-stats .stat-pill { gap: 4px; }
  .hdr-stats { margin-left: 4px; margin-right: 0; }
}
@media (max-width: 350px) {
  body .home-brand { gap: 5px; }
  html body .home-brand .brand-sub { font-size: 7.5px; letter-spacing: .05em; }
  html body .home-brand .brand-name { font-size: 16px; }
  html body .home-header .home-brand img { width: 28px; height: auto; }
  html body .hdr-stats .stat-it svg { display: none; }
  html body .hdr-stats .stat-it { padding: 0 6px; }
}
/* Слот плашек зажат логотипом и гербом: когда слова «онлайн»/«бусты» не помещаются (узкий экран, трёхзначные числа), остаются точка/молния и число, текст не упирается в края плашки. */
@media (max-width: 700px) { .hdr-stats { container: hdrs / inline-size; } }
@container hdrs (max-width: 160px) {
  html body .hdr-stats .stat-it { padding: 0 9px; gap: 4px; font-size: 0; }
  html body .hdr-stats .stat-it svg { display: block; }
  html body .hdr-stats .stat-it b { font-size: 13px; }
}
