/* Турниры — планшет и VK Mini App desktop.
   Адаптация только CSS. Ширина cqw от центрального #content.
   Регистрация, награды, сетка и лог боя сохраняют исходную логику. */
@media (min-width:601px) and (min-height:600px) {
 body.catfight-tablet-layout #content .tournament-container {
  box-sizing:border-box;min-width:0;min-height:0;
  padding:clamp(5px,1.25cqw,10px);border-radius:clamp(12px,3cqw,24px);
 }
 body.catfight-tablet-layout #content .tournament-tabs {
  box-sizing:border-box;min-width:0;flex-shrink:0;
  gap:clamp(4px,1cqw,8px)!important;padding:clamp(4px,1cqw,8px)!important;
 }
 body.catfight-tablet-layout #content .tournament-tab {
  box-sizing:border-box;min-width:0;
  font-size:clamp(14px,3.5cqw,25px)!important;
  padding:clamp(9px,2.25cqw,16px) clamp(8px,2cqw,16px)!important;
  line-height:1.2;white-space:nowrap;
 }
 body.catfight-tablet-layout #content .tournament-content {
  box-sizing:border-box;min-width:0;min-height:0;flex:1 1 auto;overflow:hidden;
 }
 body.catfight-tablet-layout #content :is(.tournament-header,.leaders-header) {
  box-sizing:border-box;min-width:0;flex-shrink:0;
  padding:clamp(11px,2.75cqw,21px) clamp(12px,3cqw,23px);
 }
 body.catfight-tablet-layout #content .tournament-title-wrapper {
  min-width:0;gap:clamp(8px,2cqw,16px);padding:clamp(5px,1.25cqw,10px) 0;
 }
 body.catfight-tablet-layout #content .tournament-title-text-wrapper {
  min-width:0;gap:clamp(3px,.75cqw,6px);
  padding:0 clamp(25px,6.25cqw,46px);
 }
 body.catfight-tablet-layout #content .tournament-title-text {
  font-size:clamp(18px,4.5cqw,32px);line-height:1.2;
  letter-spacing:.02em;white-space:normal;overflow-wrap:break-word;
 }
 body.catfight-tablet-layout #content .tournament-title-text.sub {
  font-size:clamp(13px,3.25cqw,23px);letter-spacing:.08em;
 }
 body.catfight-tablet-layout #content :is(.tournament-deco-left,.tournament-deco-right,.leaders-deco-left,.leaders-deco-right) {
  min-width:0;width:clamp(20px,5cqw,38px);height:clamp(2px,.5cqw,4px);flex:1 1 0;
 }
 body.catfight-tablet-layout #content #tournamentHelpBtn {
  right:clamp(10px,2.5cqw,19px);
  font-size:clamp(24px,6cqw,42px);padding:clamp(3px,.75cqw,6px);
 }

 /* Регистрация — эмблемы в 3 колонки, пропорции и названия сохранены. */
 body.catfight-tablet-layout #content .tournament-registration {
  box-sizing:border-box;min-width:0;min-height:0;
  gap:clamp(7px,1.75cqw,13px);padding:clamp(10px,2.5cqw,19px);
  overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #content .tournament-registration .section-header {
  min-width:0;gap:clamp(8px,2cqw,15px);padding:clamp(5px,1.25cqw,9px) 0;
 }
 body.catfight-tablet-layout #content .tournament-registration .section-title {
  font-size:clamp(13px,3.25cqw,23px);letter-spacing:.08em;white-space:nowrap;
 }
 body.catfight-tablet-layout #content .tournament-container :is(.class-emblem-container,.role-emblem-container) {
  box-sizing:border-box;min-width:0;gap:clamp(9px,2.25cqw,16px);
  margin:clamp(6px,1.5cqw,11px) 0;flex-wrap:wrap;justify-content:center;
 }
 body.catfight-tablet-layout #content .tournament-container :is(.class-emblem,.role-emblem) {
  box-sizing:border-box;width:clamp(76px,19cqw,134px);
  max-width:100%;flex:0 1 clamp(76px,19cqw,134px);
  gap:clamp(5px,1.25cqw,9px);
 }
 body.catfight-tablet-layout #content .tournament-container .emblem-image {
  width:clamp(65px,16.25cqw,114px);
  height:clamp(65px,16.25cqw,114px);max-width:100%;
 }
 body.catfight-tablet-layout #content .tournament-container :is(.class-emblem,.role-emblem) img {
  width:100%;height:100%;object-fit:contain;
 }
 body.catfight-tablet-layout #content .tournament-container .emblem-glow {
  width:clamp(72px,18cqw,126px);height:clamp(72px,18cqw,126px);
 }
 body.catfight-tablet-layout #content .tournament-container .emblem-label {
  box-sizing:border-box;width:100%;min-height:clamp(28px,7cqw,48px);
  padding:0 clamp(2px,.5cqw,4px);font-size:clamp(12px,2.9cqw,20px);
  line-height:1.2;word-break:normal;overflow-wrap:normal;text-align:center;
 }
 body.catfight-tablet-layout #content .tournament-action-btn {
  box-sizing:border-box;max-width:100%;
  min-height:clamp(46px,11.5cqw,80px);
  padding:clamp(10px,2.5cqw,19px) clamp(12px,3cqw,23px);
  font-size:clamp(14px,3.5cqw,24px);line-height:1.3;white-space:normal;
 }
 body.catfight-tablet-layout #content .tournament-info {
  box-sizing:border-box;min-width:0;
  padding:clamp(9px,2.25cqw,17px);margin:clamp(5px,1.25cqw,10px) 0;
  font-size:clamp(12px,3cqw,21px);line-height:1.35;overflow-wrap:break-word;
 }

 /* Ожидание, отсчёт до старта и активный турнир. */
 body.catfight-tablet-layout #content .tournament-waiting {
  box-sizing:border-box;min-width:0;min-height:0;
  gap:clamp(9px,2.25cqw,17px);
  padding:clamp(20px,5cqw,38px) clamp(12px,3cqw,23px);
  overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #content .tournament-waiting-icon {
  font-size:clamp(58px,14.5cqw,105px);margin-bottom:clamp(5px,1.25cqw,10px);
 }
 body.catfight-tablet-layout #content .tournament-waiting-title {
  font-size:clamp(20px,5cqw,36px);line-height:1.25;
  margin-bottom:clamp(6px,1.5cqw,12px);
 }
 body.catfight-tablet-layout #content .tournament-waiting-message {
  font-size:clamp(16px,4cqw,29px);line-height:1.3;
  margin-bottom:clamp(10px,2.5cqw,19px);
 }
 body.catfight-tablet-layout #content .tournament-timer-digits .countdown-digits {
  box-sizing:border-box;max-width:100%;gap:clamp(8px,2cqw,15px);
 }
 body.catfight-tablet-layout #content .tournament-timer-digits .digit-box {
  box-sizing:border-box;min-width:clamp(72px,18cqw,127px);
  padding:clamp(10px,2.5cqw,19px) clamp(13px,3.25cqw,24px);
  border-radius:clamp(10px,2.5cqw,19px);
 }
 body.catfight-tablet-layout #content .tournament-timer-digits .digit-value {
  font-size:clamp(35px,8.75cqw,62px);
 }
 body.catfight-tablet-layout #content .tournament-timer-digits .digit-unit {
  font-size:clamp(12px,3cqw,21px);
 }
 body.catfight-tablet-layout #content .tournament-waiting-note {
  font-size:clamp(13px,3.25cqw,23px);line-height:1.35;
  margin-top:clamp(10px,2.5cqw,19px);
 }

 /* Сетка боёв: 5 раундов в строке, имена не переносятся по буквам. */
 body.catfight-tablet-layout #content .tournament-round-tabs {
  box-sizing:border-box;width:100%;min-width:0;
  gap:clamp(2px,.5cqw,4px)!important;
  padding:clamp(5px,1.25cqw,10px) 0!important;flex-shrink:0;
 }
 body.catfight-tablet-layout #content .tournament-round-tab {
  box-sizing:border-box;flex:1 1 0!important;min-width:0;
  padding:clamp(7px,1.75cqw,13px) clamp(2px,.5cqw,4px)!important;
  border-radius:clamp(11px,2.75cqw,20px)!important;
  font-size:clamp(11px,2.75cqw,18px)!important;
  line-height:1.15;word-break:normal;white-space:nowrap;letter-spacing:0;
 }
 body.catfight-tablet-layout #content .tournament-round-content {
  box-sizing:border-box;min-width:0;min-height:0;
  padding:clamp(8px,2cqw,15px);gap:clamp(9px,2.25cqw,17px);
  overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #content .tournament-round-title-fantasy {
  box-sizing:border-box;min-width:0;gap:clamp(8px,2cqw,15px);
  margin:clamp(8px,2cqw,15px) 0;padding:clamp(6px,1.5cqw,11px) 0;
 }
 body.catfight-tablet-layout #content .round-title-text {
  font-size:clamp(16px,4cqw,28px);line-height:1.3;
  text-align:center;word-break:normal;
 }
 body.catfight-tablet-layout #content :is(.round-title-deco-left,.round-title-deco-right) {
  flex:1 1 0;min-width:0;width:clamp(20px,5cqw,38px);height:clamp(2px,.5cqw,4px);
 }
 body.catfight-tablet-layout #content .tournament-match-block-fantasy {
  box-sizing:border-box;width:100%;min-width:0;
  min-height:clamp(100px,25cqw,176px);
  gap:clamp(9px,2.25cqw,17px);
  padding:clamp(10px,2.5cqw,19px);
  border-radius:clamp(9px,2.25cqw,16px);
 }
 body.catfight-tablet-layout #content .match-players {
  min-width:0;gap:clamp(5px,1.25cqw,10px);
 }
 body.catfight-tablet-layout #content :is(.match-player-row,.match-player-info,.match-player-top) {
  min-width:0;
 }
 body.catfight-tablet-layout #content .match-player-row {
  gap:clamp(6px,1.5cqw,12px);
 }
 body.catfight-tablet-layout #content .match-player-top {
  gap:clamp(8px,2cqw,15px);
 }
 body.catfight-tablet-layout #content .match-role-icon {
  width:clamp(28px,7cqw,50px);height:clamp(28px,7cqw,50px);
 }
 body.catfight-tablet-layout #content .match-player-name {
  min-width:0;font-size:clamp(14px,3.5cqw,25px);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal;
 }
 body.catfight-tablet-layout #content .match-player-classrole {
  margin-left:clamp(36px,9cqw,65px);
  font-size:clamp(11px,2.75cqw,19px);line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:normal;
 }
 body.catfight-tablet-layout #content .match-player-score {
  flex:0 0 clamp(32px,8cqw,58px);min-width:0;
  font-size:clamp(19px,4.75cqw,33px);
 }
 body.catfight-tablet-layout #content :is(.tournament-replay-btn,.tournament-replay-placeholder) {
  box-sizing:border-box;flex:0 0 clamp(45px,11.25cqw,80px);
  width:clamp(45px,11.25cqw,80px);height:clamp(45px,11.25cqw,80px);
  font-size:clamp(20px,5cqw,35px);border-radius:clamp(7px,1.75cqw,13px);
 }
 body.catfight-tablet-layout #content .tournament-close-btn {
  box-sizing:border-box;min-width:clamp(130px,32.5cqw,230px);max-width:100%;
  padding:clamp(10px,2.5cqw,19px) clamp(18px,4.5cqw,32px);
  margin:clamp(12px,3cqw,23px) auto;
  font-size:clamp(15px,3.75cqw,26px);border-radius:clamp(9px,2.25cqw,16px);
 }

 /* Лидеры с тремя читабельными колонками и пагинацией. */
 body.catfight-tablet-layout #content .leaders-header {
  gap:clamp(10px,2.5cqw,19px);font-size:clamp(18px,4.5cqw,32px);
 }
 body.catfight-tablet-layout #content #leadersTableContainer {
  box-sizing:border-box;min-width:0;min-height:0;
  padding:clamp(10px,2.5cqw,19px);
  overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #content #leadersTableContainer .leader-row {
  box-sizing:border-box;min-width:0;
  gap:clamp(10px,2.5cqw,19px);
  padding:clamp(12px,3cqw,23px);
  margin-bottom:clamp(7px,1.75cqw,13px);
  border-radius:clamp(9px,2.25cqw,16px);
 }
 body.catfight-tablet-layout #content #leadersTableContainer .leader-place {
  box-sizing:border-box;flex:0 0 clamp(36px,9cqw,64px);
  min-width:0;font-size:clamp(15px,3.75cqw,26px);
 }
 body.catfight-tablet-layout #content #leadersTableContainer .leader-name {
  flex:1 1 0;min-width:0;font-size:clamp(14px,3.5cqw,25px);
  line-height:1.25;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;word-break:normal;
 }
 body.catfight-tablet-layout #content #leadersTableContainer .leader-points {
  box-sizing:border-box;flex:0 0 auto;
  min-width:clamp(60px,15cqw,106px);
  font-size:clamp(14px,3.5cqw,25px);white-space:nowrap;
 }
 body.catfight-tablet-layout #content #leadersPaginationContainer {
  box-sizing:border-box;min-width:0;flex-shrink:0;
  gap:clamp(5px,1.25cqw,10px);
  padding:clamp(9px,2.25cqw,17px) clamp(5px,1.25cqw,10px);
 }
 body.catfight-tablet-layout #content #leadersPaginationContainer .pagination-btn {
  box-sizing:border-box;min-width:clamp(32px,8cqw,56px);
  padding:clamp(7px,1.75cqw,13px);
  font-size:clamp(14px,3.5cqw,24px);
 }

 /* Окно серии боёв и повтор боя. Ширина = общая modal-tablet.css. */
 body.catfight-tablet-layout #roleModal:has(.series-replay-list) .modal-body,
 body.catfight-tablet-layout #roleModal:has(#matchReplayLog) .modal-body {
  min-width:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #roleModal .series-replay-list {
  min-width:0;gap:clamp(9px,1.8vw,16px);
 }
 body.catfight-tablet-layout #roleModal .series-replay-list .series-game-item {
  box-sizing:border-box;min-width:0;gap:clamp(10px,2vw,18px);
  padding:clamp(10px,2vw,18px) clamp(12px,2.4vw,22px)!important;
  margin-bottom:clamp(8px,1.5vw,14px)!important;
  border-radius:clamp(10px,2vw,18px);
 }
 body.catfight-tablet-layout #roleModal .series-replay-list .series-game-item > div {
  min-width:0;font-size:clamp(13px,2.2vw,19px);
  line-height:1.4;overflow-wrap:break-word;
 }
 body.catfight-tablet-layout #roleModal .series-replay-list .watch-game-btn {
  box-sizing:border-box;flex:0 0 clamp(40px,7vw,60px);
  width:clamp(40px,7vw,60px)!important;height:clamp(40px,7vw,60px)!important;
  border-radius:clamp(8px,1.5vw,13px)!important;font-size:clamp(17px,2.8vw,24px);
 }
 body.catfight-tablet-layout #roleModal #matchReplayLog {
  box-sizing:border-box;width:100%;max-width:100%;min-height:0;
  height:min(55dvh,600px)!important;
  padding:clamp(8px,1.5vw,15px)!important;
  overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
 }
 body.catfight-tablet-layout #roleModal :is(#closeSeriesReplayBtn,#closeMatchReplayBtn) {
  box-sizing:border-box;max-width:100%;min-height:clamp(42px,7vw,60px);
  padding:clamp(9px,1.5vw,16px) clamp(14px,2.5vw,24px);
  font-size:clamp(15px,2.6vw,23px);white-space:normal;
 }
}
