/* 第22.5版：仅手机屏幕中的实时及历史签表；导出与打印保留原尺寸。 */
@media screen and (max-width:600px) {
  .panel:has(> .bracketwrap) { padding-left:8px; padding-right:8px; }
  .panel .bracketwrap { padding:6px 2px 14px; overflow:auto; }
  .panel .bracketwrap .match,
  .panel .bracketwrap .match:hover {
    width:100%; min-width:0; min-height:82px;
    padding:6px 5px; border-radius:6px;
  }
  .panel .bracketwrap .match .matchmeta {
    font-size:9px; line-height:1.4; gap:2px 4px; margin-bottom:4px;
    overflow-wrap:anywhere;
  }
  .panel .bracketwrap .match .pair {
    display:flex; flex-wrap:wrap; padding:3px 0; gap:2px;
    font-size:11px; line-height:1.4; min-height:23px;
  }
  .panel .bracketwrap .match .name { flex:1; min-width:0; line-height:1.4; }
  .panel .bracketwrap .player-label { gap:2px; flex-wrap:wrap; line-height:1.4; }
  .panel .bracketwrap .player-label-name {
    white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere;
  }
  .panel .bracketwrap .player-grade { font-size:9px!important; padding:0 3px; line-height:1.4; }
  .panel .bracketwrap .match .pair .score {
    font-size:13px!important; line-height:1.4; min-width:10px;
    max-width:none; white-space:nowrap; overflow-wrap:normal;
  }
  .panel .bracketwrap .clean-badge { font-size:9px; line-height:1.4; }
  .panel .bracketwrap .qualhead,
  .panel .bracketwrap .qualgroup {
    grid-template-columns:minmax(0,.65fr) minmax(0,1.25fr) minmax(0,1.25fr) minmax(0,.65fr);
    gap:6px; min-width:0; width:100%;
  }
  .panel .bracketwrap .qualhead { font-size:10px; line-height:1.5; text-align:center; }
  .panel .bracketwrap .qualgroup { padding:12px 0; }
  .panel .bracketwrap .qualgroup > * { min-width:0; }
  .panel .bracketwrap .qmatches { gap:8px; }
  .panel .bracketwrap .qresult {
    padding:5px 3px; font-size:10px; line-height:1.6;
    border-radius:6px; overflow-wrap:anywhere;
  }
  .panel .bracketwrap .qresult strong { min-width:0; }
  .panel .bracketwrap .muted { font-size:10px; overflow-wrap:anywhere; }
  .panel .bracketwrap .qualgroup-tail { padding-bottom:38px; }
  .panel .bracketwrap .tail-caption { font-size:10px; bottom:8px; line-height:1.4; }
  .panel .bracketwrap .bracket-grouped {
    display:grid; grid-template-columns:repeat(var(--bracket-columns),minmax(76px,1fr));
    gap:12px 6px; width:100%;
    min-width:calc(var(--bracket-columns) * 76px + (var(--bracket-columns) - 1) * 6px);
    align-items:stretch;
  }
  .panel .bracketwrap .round { width:auto; min-width:0; }
  .panel .bracketwrap .round h3 {
    font-size:10px; line-height:1.5; min-height:39px;
    padding-bottom:6px; margin-bottom:8px; overflow-wrap:anywhere;
  }
  .panel .bracketwrap .bracket-grouped .roundbody { gap:8px; }
  .panel .bracketwrap .championbox {
    grid-column:1 / -1; min-width:0; width:min(100%,240px);
    justify-self:center; padding:8px 12px; border-radius:8px;
    font-size:11px; line-height:1.6;
  }
}

/* 手机正赛：保留连线，竖排姓名，上下两端汇聚。 */
.mobile-converging-bracket {display:none}
@media screen and (max-width:600px) {
 .panel .bracketwrap > .bracket-grouped {display:none}
 .panel .bracketwrap > .mobile-tree {display:flex;flex-direction:column;gap:20px;position:relative;width:100%;isolation:isolate}
 .mobile-tree-half {display:flex;flex-direction:column;gap:20px}
 .mobile-tree-round,.mobile-tree-final {position:relative;min-width:0}
 .mobile-tree h3 {position:absolute;top:0;right:0;margin:0;padding:0 3px;font-size:9px;line-height:18px;font-weight:500;color:#62626b;background:#fff;z-index:2}
 .panel .bracketwrap .mobile-tree .match {position:absolute;top:22px;transform:translateX(-50%);width:clamp(32px,calc(100% / var(--tree-leaves) - 4px),56px);min-height:96px;padding:4px 2px;border-radius:5px;display:flex;flex-wrap:wrap;align-items:stretch;gap:0;z-index:1}
 .panel .bracketwrap .mobile-tree .match .matchmeta {width:100%;font-size:8px;line-height:12px;margin-bottom:4px;justify-content:center}
 .mobile-tree .matchmeta span:last-child {display:none}
 .panel .bracketwrap .mobile-tree .match .pair {display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:4px;padding:0;width:50%;min-width:0;font-size:10px}
 .panel .bracketwrap .mobile-tree .match .name {flex:none;writing-mode:vertical-rl;text-orientation:upright;white-space:nowrap;line-height:12px;letter-spacing:1px;overflow:visible;overflow-wrap:normal;min-height:40px}
 .panel .bracketwrap .mobile-tree .match .score {font-size:11px!important;line-height:1.4;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}
 .mobile-tree .player-grade {display:none}
 .mobile-tree-scores {width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:5px;align-self:flex-end}
 .mobile-tree-scores .score {font-size:11px!important;font-weight:400;line-height:1.4;text-align:center;min-width:0;white-space:nowrap}
 .mobile-tree-scores.special-scores {grid-template-columns:minmax(0,1fr)}
 .special-scores .score:empty {display:none}
 .special-scores .score[data-side="0"] {text-align:left}
 .special-scores .score[data-side="1"] {text-align:right}
 .mobile-tree .clean-badge {font-size:7px;writing-mode:vertical-rl}
 .mobile-tree-final > .match {left:50%}
 .mobile-tree-final {margin:0;}
 .mobile-tree-final h3 {color:#005bb8;font-size:11px;right:50%;transform:translateX(50%)}
 .mobile-tree-lines {position:absolute;inset:0;pointer-events:none;z-index:0;overflow:visible}
 .mobile-tree-lines path {fill:none;stroke:#9caabd;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
 .panel .bracketwrap .mobile-tree > .championbox {align-self:center;margin:0;width:min(100%,220px);font-size:11px;padding:8px;}
}

/* 空间充足的中间轮次横排姓名，缩短树的高度。 */
@media screen and (max-width:600px) {
 .panel .bracketwrap .mobile-tree .match.mobile-horizontal {display:block;min-height:54px;padding:4px 5px;}
 .panel .bracketwrap .mobile-tree .mobile-horizontal .matchmeta {font-size:9px;margin-bottom:2px;justify-content:space-between;}
 .panel .bracketwrap .mobile-tree .mobile-horizontal .pair {width:100%;flex-direction:row;justify-content:space-between;align-items:center;gap:4px;padding:1px 0;min-height:18px;font-size:11px;}
 .panel .bracketwrap .mobile-tree .mobile-horizontal .name {writing-mode:horizontal-tb;text-orientation:mixed;min-height:0;flex:1;white-space:normal;overflow-wrap:anywhere;line-height:1.4;letter-spacing:0;}
 .panel .bracketwrap .mobile-tree .mobile-horizontal .pair .score {max-width:none;white-space:nowrap;overflow-wrap:normal;flex:none;}
 .mobile-tree .mobile-horizontal .clean-badge {writing-mode:horizontal-tb;}
}
