/* mobile.css — общая мобильная адаптация страниц «Битвы» */
@media (max-width: 700px) {
  html, body { -webkit-text-size-adjust: 100%; }
  body { margin: 0 !important; overflow-x: hidden; }
  #main { width: 100% !important; max-width: 100% !important; }
  h1 { font-size: 26px !important; line-height: 1.15; }
  h2 { font-size: 19px !important; }
  p, li, td, th { font-size: 15px; }

  /* меню */
  #topmenu { width: 100% !important; border-collapse: separate; }
  #topmenu tr { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
  #topmenu td { padding: 0 !important; display: block; }
  #topmenu .button,
  .button { display: inline-block; padding: 10px 14px; font-size: 14px; line-height: 1.2; min-height: 40px; box-sizing: border-box; }

  /* танцоры на главной */
  .dancers { padding: 2px 0 0; }
  .dancers .d { width: 132px; height: 198px; margin: 0 3px; background-size: 132px 594px; }
  .dancers .d1:active, .dancers .d2:active { background-position: 0 -396px; }

  /* форма входа / регистрации */
  .auth-table td { font-size: 100% !important; }
  .auth-table td.lbl { text-align: left !important; padding-right: 8px; }
  .auth-table input[type="text"],
  .auth-table input[type="password"],
  input[type="email"],
  input[type="password"],
  input[type="text"] { font-size: 16px !important; }

  /* таблицы: горизонтальная прокрутка вместо вылета за экран */
  .scroll-table-body { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { max-width: 100%; }
  img { max-width: 100%; height: auto; }
  table[align="center"] { width: 100% !important; }
  .scroll-table-body td { word-break: break-word; }
}
/* --- выбор бойца (bitva.php / knopkaDAV) --- */
@media (max-width: 760px) {
  .page { width: 100% !important; margin: 8px !important; box-sizing: border-box; }
  .row { flex-wrap: wrap !important; justify-content: center !important; gap: 10px; }
  .section {
    width: 44vw !important;
    max-width: 190px;
    height: auto !important;
    margin-top: 8px !important;
    box-shadow: 2px 2px black !important;
  }
  div.knopka1, div.knopka2, div.knopka3, div.knopka8, div.knopka9,
  div.knopka10, div.knopka11, div.knopka12 {
    width: 100% !important;
    height: auto !important;
    padding-bottom: 100% !important;      /* квадрат по ширине */
    background-size: 100% 300% !important; /* спрайт: три кадра по вертикали */
    background-position: 0 0 !important;
    display: block !important;
    box-sizing: border-box;
  }
  .sectionText { margin: 8px 6px !important; font-size: 13px !important; line-height: 1.2; }
  .titleText { font-size: 2em !important; padding: 0.4em !important; }
  .soon-badge { font-size: 10px; }
}

  /* формы входа: подпись не переносится по буквам */
  .auth-table { table-layout: auto; }
  .auth-table td.lbl { white-space: nowrap; text-align: right !important; padding-right: 8px; }
  .auth-table input[type="text"], .auth-table input[type="password"] { width: 170px !important; max-width: 100%; }
  @media (max-width: 380px) {
    .auth-table input[type="text"], .auth-table input[type="password"] { width: 140px !important; }
    .auth-table td { font-size: 14px !important; }
  }
