/* ============================================================
   shtennis · 响应式布局适配（仅调整布局，不改任何颜色/风格）
   桌面 980px → iPad → 手机
   依赖：在 css.css 之后加载
   ============================================================ */

/* ---------- 全局：汉堡导航默认隐藏（仅移动端 ≤768 显示） ---------- */
.nav-toggle, .nav-toggle-btn{ display: none; }

/* 文章详情：正文使用卡片扣除内边距后的宽度，长内容在正文内处理。 */
#wrapper #content{ min-width: 0; max-width: 100%; }
#wrapper #content .entry_box_s,
#wrapper #content .entry_title_box,
#wrapper #content .entry_sb{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#wrapper #content .entry,
#wrapper #content #entry{
  width: auto;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
#wrapper #content .entry{ overflow: visible; }
#wrapper #content #entry{ overflow-x: auto; }
#wrapper #content .entry_title,
#wrapper #content .browse{ overflow-wrap: anywhere; }
#wrapper #content #entry p,
#wrapper #content #entry div,
#wrapper #content #entry section,
#wrapper #content #entry figure{
  max-width: 100%;
  box-sizing: border-box;
}
#wrapper #content #entry img,
#wrapper #content #entry video{
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
#wrapper #content #entry iframe,
#wrapper #content #entry embed,
#wrapper #content #entry object{ max-width: 100%; }
#wrapper #content #entry pre{ white-space: pre-wrap; overflow-wrap: anywhere; }
#wrapper #content #entry table{ max-width: 100%; border-collapse: collapse; }

/* 下拉菜单以主菜单项定位，完整展示名称，不沿用旧的固定宽度。 */
#topnav #nav_box > li,
#topnav #nav_box > li:hover{ position: relative; }
#topnav #nav_box > li > ul > li{
  float: none;
  width: 100%;
  height: auto;
}
#topnav #nav_box > li > ul > li > a{
  display: flex;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  box-sizing: border-box;
  white-space: nowrap;
  font-size: var(--font-size-body);
  font-weight: normal;
  background: var(--color-text-primary);
  opacity: 1;
  filter: none;
}
#topnav #nav_box > li > ul > li > a:hover,
#topnav #nav_box > li > ul > li > a:focus-visible{ background: var(--color-brand-hover); }
@media screen and (min-width: 769px){
  #topnav #nav_box > li > ul{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--color-text-primary);
    box-shadow: var(--shadow-card);
    z-index: 1000;
  }
  #topnav #nav_box > li:last-child > ul{ left: auto; right: 0; }
  #topnav #nav_box > li:hover > ul,
  #topnav #nav_box > li:focus-within > ul{ display: block; }
}
@media screen and (max-width: 768px){
  #topnav #nav_box > li > ul > li > a{
    padding-left: var(--space-8);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* ---------- 中屏 ≤1024px（笔记本/平板横屏） ---------- */
@media screen and (max-width: 1200px){
  #wrapper{ width: auto; max-width: 980px; }
  #index_half{ width: 100%; }
  .left_half{ width: 38%; }
  .right_half{ width: 58%; }
  #post{ width: 75%; }
  #content{ width: 75% !important; }
  #sidebar{ width: 25%; }
  #cmsl_img{ width: 100%; }
  #content .entry_box, #content .entry_box_b, #content .entry_sb, #content .entry, #content .entrymeta{ width: auto; max-width: 100%; }
  /* 首页内容变窄后会换行，取消旧模板的固定 180px 高度，避免列表被裁切 */
  #post .grid5col .mc,
  #cmsl .grid5col .mc,
  #cmsl_img .grid5col .mc{
    height: auto !important;
    min-height: 0;
    overflow: visible;
  }
  #wrapper .index_newstitle{
    height: auto;
    min-height: 70px;
    overflow: visible;
  }
  /* 首页首屏新闻栏随窄屏换行增高，避免 310px 面板裁掉后续内容 */
  #index_half{ overflow: visible; }
  #index_half .tab-inside{
    height: auto;
    min-height: 310px;
    overflow: visible;
  }
  #index_half .tab-inside ul li{
    line-height: 1.5;
    white-space: normal;
    overflow: visible;
    padding: 6px 0;
  }
  #index_half .tab-inside ul li a{
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #post .grid5col .club li,
  #cmsl .grid5col .club li{
    height: auto;
    min-height: 80px;
    overflow: visible;
  }
  /* 中屏主栏只有页面的 75%，培训双栏继续并排会把标题挤到相邻卡片下 */
  .w2col > .share_2{
    float: none;
    width: 100% !important;
    max-width: 100%;
    padding: 0 !important;
  }
  #map_h{ max-width: 100%; }
  .header_c{ width: auto; max-width: 100%; }
  .navigation{ max-width: 100%; }
  #share, #comment{ width: 100% !important; float: none; }
  #share_2{ width: 100% !important; }
  #share_2 .mc li{ width: auto !important; }
  .grid5col, #cmsl, .w{ width: auto; max-width: 100%; }
  .bannerbox, #focus{ width: 100% !important; }
  #focus ul, #focus ul li{ width: 100% !important; }
  .bannerbox_1, #focus_1{ width: 100% !important; }
  #focus_1 ul, #focus_1 ul li{ width: 100% !important; }
  .right_half .scroll, .right_half .scroll_cont, .right_half .scroll_cont .box{ width: 100% !important; }
  .right_half .scroll_cont .box > div,
  .right_half .scroll_cont .box a{ max-width: 100%; }
  .right_half .scroll_cont .box img{ max-width: 100%; height: auto; }
  .right_half .scroll_cont{ overflow: hidden; }
  #sidebar .top_box, #sidebar .top_t, #sidebar #tabs{ width: 100% !important; max-width: 100%; }
  #sidebar .top_box{ background-size: 100% 100%; }
  #link_logo{ width: 100% !important; height: auto !important; overflow: visible !important; }
  #link_logo1{ display: flex; flex-wrap: wrap; justify-content: center; width: 100%; }
  #link_logo1 li{ flex: 0 0 48%; height: 80px; line-height: 80px; text-align: center; margin: 0; padding: 0; }
  #link_logo1 li img{ max-width: 90%; max-height: 60px; vertical-align: middle; }
  #sidebar .tab_h_box, #sidebar .tab_h_box .title-bar, #sidebar .tab_h_box h2{ width: auto !important; max-width: 100% !important; box-sizing: border-box; }
  .bannerbox img, #focus img{ max-width: 100%; height: auto; }
  .share_2{ width: auto; max-width: 100%; }
  .cmsl{ width: auto; max-width: 100%; }
  .share_2 .mc li{ width: auto !important; }
}

/* ---------- 平板 ≤768px（iPad 竖屏/大屏手机） ---------- */
@media screen and (max-width: 768px){
  #wrapper{ width: 100%; }

  /* 新闻+广告两列：移动端回退为纵向（新闻在上、广告在下） */
  .home-news-ads-row > .home-ads-col,
  .home-news-ads-row > .home-news-col{
    flex: 1 1 100%;
    order: 0;
  }

  /* 青少年/高校推广两列：移动端回退纵向 */
  .promo-row > .share_2{ flex: 1 1 100%; }

  /* 培训/专业发展 标题网格：移动端回退单列 */
  .page-home #wrapper .w2col-stack .mc1 ul{ grid-template-columns: 1fr !important; }

  /* 头部自适应（背景图按容器缩放，位置居中，不改变原图风格） */
  /* 移动端隐藏 banner 背景残条：导航 fixed 已覆盖顶部，去掉背景避免蓝天错位 */
  #header{ height: 38px; min-height: 38px; background: none; }
  .header_c{ width: auto; padding: 0 8px; }
  .logo{ width: 210px; height: 56px; background: none; }
  .header_c h1{ font-size: 18px; width: auto; padding: 8px 0 0 10px; }
  .regsit{ font-size: 16px; position: absolute; right: 8px; top: 8px; max-width: 42%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  #searchbar{ width: 140px; }
  #searchbar #s{ width: 112px; }

  /* 主区堆叠 */
  #index_half{ width: 100%; }
  .left_half, .right_half{ width: 100%; float: none; margin: 4px 0 10px; }
  #post, #sidebar{ width: 100%; float: none; }
  #sidebar{ margin-top: 12px; }

  /* 裁判表格移动端自适应 */
  #tab_latest table, .title-bar1 table{ width: 100%; }
  #tab_latest{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 广告横幅图防横向溢出 */
  .ad img, #ad img, #cmsl_img img{ max-width: 100%; height: auto; }

  /* 版块标题在移动端适当缩小 */
  .m .mt h2, .grid5col .mt h2{ font-size: 18px; }

  /* 面包屑移动端：压缩为一行，隐藏冗余分类路径（browse 内已含完整路径） */
  #map{
    height: auto;
  }
  #map > a, #map > span, #map > .fn{
    display: none;
  }
  #map .browse{
    float: left;
    width: auto !important;
    max-width: 75%;
    white-space: normal;
    line-height: 32px;
    padding: 0 12px;
  }
  #map .font{
    float: right;
    margin-top: 1px;
  }

  /* 导航：移动端汉堡菜单（保持灰底 #767676 / 白色文字 #f2f2f2 原配色） */
  .nav-toggle{
    position: absolute;
    left: -9999px;
    opacity: 0;
  }
  .nav-toggle-btn{
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 38px;
    background: transparent;
    cursor: pointer;
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }
  .nav-toggle-btn span{
    display: block;
    width: 22px;
    height: 3px;
    background: #333;
    border-radius: 2px;
  }
  #top{ position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
  #topnav{ height: 38px; overflow: visible; position: relative; background: #fff; }
  #topnav .left_top{ height: 38px; overflow: visible; }
  #topnav .left_top .home{ display: none; }
  #topnav #searchbar{ position: absolute; right: 0; top: 0; height: 38px; background: none; }
  /* 展开面板 */
  .nav-toggle:checked ~ .left_top .menu-home_-container{ display: block !important; }
  #topnav .menu-home_-container{
    position: fixed;
    top: 38px;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 999;
    display: none;
  }
  #topnav #nav_box{
    width: 100%;
    white-space: normal;
    margin: 0;
    padding: 0;
  }
  #topnav #nav_box > li{
    float: none;
    display: block;
    width: 100%;
    height: auto;
    border-right: none;
  }
  #topnav #nav_box > li > a,
  #topnav #nav_box > li > a:link,
  #topnav #nav_box > li > a:visited{
    display: block;
    padding: 0 14px;
    line-height: 40px;
    color: #333;
  }
  #topnav #nav_box > li > a:hover{ background: #eee; color: #333; }
  /* 子菜单：垂直展开 */
  #topnav #nav_box li ul{
    position: static;
    left: auto;
    width: 100%;
    margin: 0;
    border: none;
    background: #f7f7f7;
    display: block;
  }
  #topnav #nav_box li ul li{
    float: none;
    display: block;
    width: 100%;
    height: auto;
    border-right: none;
    border-left: none;
  }
  #topnav #nav_box li ul li a{
    display: block;
    width: auto;
    padding: 0 14px 0 30px;
    line-height: 36px;
    color: #333;
    font-weight: normal;
  }

  /* 固定宽容器/大图弹性收缩（仅宽度，不改颜色/圆角/边框） */
  #post, .grid5col, #cmsl, .inset{ max-width: 100%; }
  .bannerbox img, .bannerbox_1 img, #index_half img, #post img, #cmsl_img img{ max-width: 100%; height: auto; }
  .right_half .scroll,
  .right_half .scroll_cont,
  .right_half .scroll_cont .box{ width: 100% !important; }
  .right_half .scroll_cont .box > div,
  .right_half .scroll_cont .box a{ max-width: 100%; }
  .right_half .scroll_cont .box img{ max-width: 100%; height: auto; }
  .right_half .scroll_cont .box{ box-sizing: border-box; }

  /* 广告位弹性收缩（980/730 广告图随屏宽缩放） */
  .bannerbox, #focus, #focus ul, #focus ul li{ max-width: 100%; }
  .bannerbox, #focus{ width: 100% !important; height: auto; }
  #focus ul{ width: 100% !important; position: static; }
  #focus ul li{ width: 100% !important; height: auto; }
  .bannerbox_1, #focus_1, #focus_1 ul, #focus_1 ul li{ max-width: 100%; }
  .bannerbox_1, #focus_1{ width: 100% !important; height: auto; }
  #focus_1 ul{ width: 100% !important; position: static; }
  #focus_1 ul li{ width: 100% !important; height: auto; }

  /* 版块内容容器弹性（.w 原固定 990px） */
  .w{ width: 100% !important; max-width: 990px; }
  .grid5col{ overflow: hidden; }

  /* 页脚 padding 计入宽度，消除横向溢出 */
  .footer_bottom{ box-sizing: border-box; }

  /* 详情页正文自适应（#content 原固定 732px） */
  #content{ width: 100% !important; max-width: 732px; float: none; }
  #content IMG{ max-width: 100% !important; width: auto; height: auto; }

  /* 版块 .m 弹性：宽度贴合容器、高度自适应（边框不再被裁剪） */
  .grid5col .m.m3{ width: 100% !important; max-width: 100%; float: none; }
  #mcclist{ width: 100% !important; height: auto !important; overflow: visible !important; }

  /* 新闻列表条目：图片放大、文字完整显示（不再截断/错位） */
  .club li{ height: auto; min-height: 80px; }
  #index_img{ width: 88px; height: 88px; margin: 0 10px 0 5px; }
  #index_img img{ width: 88px; height: auto; }
  #index_newstitle{ height: auto; overflow: visible; }
  #index_newstitle p{ padding: 2px 5px 6px; margin: 0; }

  /* 首页 tab */
  .htotabs{ position: static; top: auto; left: auto; }
  .box_top_index, .box-bottom_index{ display: none; }
  .tab-inside{ height: auto; }

    /* 移动端：栏目容器高度自适应，避免窄屏换行后内容截断 */
  .mc, .mc1{ height: auto !important; }
  /* 培训/专业发展 区块移动端回退单列（模板使用 class="share_2"） */
  .w2col > .share_2{ float: none; width: 100% !important; max-width: 100%; padding: 0 !important; }
/* 合作伙伴 logo 移动端：撑满容器、两列 flex 排列、取消竖向滚动 */
  #link_logo{
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  #link_logo1, #link_logo2{ overflow: visible !important; }
  #link_logo1{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  #link_logo1 li{
    flex: 0 0 48%;
    height: 80px;
    line-height: 80px;
    font-size: 16px;
    text-align: center;
    margin: 0;
    padding: 0;
  }
  #link_logo1 li img{
    max-width: 90%;
    max-height: 60px;
    vertical-align: middle;
  }
  /* 协会认证裁判列表自适应（#tabs 原固定 236px） */
  #tabs, #tabs_h, .tab_h_box{ width: 100% !important; }
  #tab_latest, #tab_latest1, #tab_latest table{ width: 100% !important; }
  #tab_latest td{ padding: 2px 4px; }

  /* 导航移动端：单行横向滚动，避免菜单溢出错位 */
  #topnav{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #topnav .left_top{
    white-space: nowrap;
  }

  /* 详情页正文移动端：容器自适应、文字图片不超视口 */
  #content .entry_box_s{
    width: 100% !important;
    max-width: 732px;
    box-sizing: border-box;
  }
  #content .entry, #content #entry{
    width: auto !important;
    max-width: 100%;
    overflow: visible;
  }
  #content .entry p, #content #entry p{
    width: auto;
    max-width: 100%;
  }
  #content .entry img, #content #entry img{
    max-width: 100%;
    height: auto;
  }
  #content .entry_title_box{
    width: 100% !important;
    max-width: 732px;
    box-sizing: border-box;
  }

  /* 合作伙伴 logo 移动端：隐藏竖向滚动副本，避免重复混乱 */
  #link_logo2{
    display: none !important;
  }

  /* 文章列表页移动端：缩略图适配 + 布局防溢出 */
  #content .entry_box, #content .entry_box_right, #content .entry_box_left,
  #content .archive_box, #content .archive_title_box,
  #content .entry_box_b, #content .entry_sb{
    width: 100% !important;
    max-width: 710px;
    box-sizing: border-box;
  }
  #content .entry_box, #content .entry_box_right, #content .entry_box_left{
    padding: 10px 8px;
  }
  #content .thumbnail_box{
    float: left;
    width: 110px;
    height: auto;
    margin: 6px 10px 6px 0;
    padding: 0;
  }
  #content .thumbnail{
    float: left;
    width: 100px;
    height: auto;
    margin: 0 10px 6px 0;
    padding: 0;
    position: relative;
  }
  #content .thumbnail img, #content .thumbnail_t img{
    position: static;
    width: 100px;
    height: auto;
    max-width: 100%;
  }
  #content .postdate{
    display: block;
    width: auto;
    margin: 0 0 4px 110px;
  }
  #content .archive{
    width: auto;
  }
  #content .archive_title{
    width: auto;
    height: auto;
  }
  #content .archive_title h3{
    font-size: 18px !important;
    line-height: 1.5 !important;
  }
  /* 列表摘要移动端修复：取消 550px 固定宽右浮动，全宽显示避免文字左裁 */
  #content .archive_desc{
    width: 100% !important;
    float: none !important;
    margin: 4px 0 0 0;
  }
  #content .archive_desc p{
    font-size: 16px;
    margin: 4px 0;
  }
  #content .posttag{
    width: auto;
    display: block;
    margin: 2px 0 4px 110px;
  }
  #content .archive_more{
    margin: var(--space-2) var(--space-4) var(--space-2) 0;
  }

  /* 图片宫格与页脚 */
  #cmsl_img li{ width: 30%; }
  .footer_top{ height: auto; }
  .footer_top .link_s li{ margin: 4px 10px 4px 0; }
  .footer_bottom p{ font-size: 16px; }
}

/* 首页跨屏宽度修复：旧模板固定高度和单行标题会遮住换行内容 */
#wrapper #post .grid5col .mc,
#wrapper #cmsl .grid5col .mc,
#wrapper #cmsl_img .grid5col .mc{
  height: auto !important;
  min-height: 0;
  overflow: visible;
}
#wrapper .index_newstitle{
  height: auto;
  min-height: 70px;
  overflow: visible;
}
#wrapper .share_2 .mc li a,
#wrapper #comment .mc1 li a{
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
#wrapper #post .grid5col .club li,
#wrapper #cmsl .grid5col .club li{
  height: auto;
  min-height: 80px;
  overflow: visible;
}

/* 首页赛事成绩图片区：主图填满栏目宽度，保留原始比例。 */
#wrapper #share #mcclist{
  height: auto !important;
  max-height: none;
  overflow: visible !important;
}
#wrapper #share #mcclist img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  margin: 0 auto;
}

/* 社会新闻缩略图统一为 4:3，和标题摘要保持稳定间距 */
#wrapper #comment .index_img{
  float: left;
  width: 128px;
  height: 96px;
  margin: 0 14px 8px 0;
  overflow: hidden;
}
#wrapper #comment .index_img img{
  display: block;
  width: 128px;
  height: 96px;
  object-fit: cover;
}
#wrapper #comment .index_newstitle{
  min-height: 96px;
}

/* 首页标题和“更多”放在同一标题行，覆盖旧的 top:-25px 定位 */
#wrapper .grid5col .mt{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 50px;
  height: auto;
  overflow: visible;
}
#wrapper .grid5col .mt h2{
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  line-height: 1.5;
}
#wrapper .grid5col .mt .extra{
  position: static;
  float: none;
  flex: 0 0 auto;
  margin-left: auto;
}
#wrapper .grid5col .mt .extra:empty{ display: none; }

/* 文章列表：放大预览图，摘要占用缩略图右侧的完整空间 */
#content .archive_box,
#content .archive_title_box{
  width: 100%;
  max-width: none;
}
#content .thumbnail_box{
  float: left;
  width: 180px;
  margin: 5px 18px 10px 0;
  padding: 0;
  box-sizing: border-box;
}
#content .thumbnail{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
#content .thumbnail > a{
  display: block;
  width: 100%;
  height: 100%;
}
#content .thumbnail img,
#content .thumbnail_t img{
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}
#content .postdate{
  float: none;
  position: static;
  display: block;
  width: 100%;
  margin: 6px 0 0;
  text-align: left;
}
#content .archive{
  width: auto;
  min-width: 0;
}
#content .archive_desc{
  float: none;
  width: auto;
  max-width: none;
}
#content .archive_desc p{
  margin: 6px 0 0;
  line-height: 1.7;
}

/* 阅读链接按文字实际宽度排版，并与卡片右边缘留出间距。 */
/* 列表页左右栏共用顶部基线，去掉侧栏额外的 10px 内距和 15px 标题外距。 */
#content ~ #sidebar{ padding-top: 0; }
#content ~ #sidebar > .widget:first-child{ margin-top: 0; }
#content ~ #sidebar > h3:first-child,
#content ~ #sidebar > .widget:first-child > h3:first-child{ margin-top: 0; }

#content .archive_more{
  float: right;
  max-width: calc(100% - 32px);
  margin: var(--space-2) var(--space-4) var(--space-2) 0;
}
#content .archive_more a,
#content .archive_more a:visited,
#content .archive_more a:hover{
  float: none;
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-height: 32px;
  padding: 0 var(--space-3) 0 0;
  line-height: var(--line-height-compact);
  box-sizing: border-box;
  white-space: nowrap;
}

@media screen and (max-width: 768px){
  #content .thumbnail_box{ width: min(180px, 34vw); }
}

/* 首页“精彩瞬间”：桌面固定四列，手机改为两列 */
#cmsl_img .grid5col > ul.clearfix{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  padding: 0 14px 12px;
  box-sizing: border-box;
}
#cmsl_img .grid5col > ul.clearfix::before,
#cmsl_img .grid5col > ul.clearfix::after{
  content: none;
  display: none;
}
#cmsl_img .grid5col > ul.clearfix > li{
  float: none;
  width: auto !important;
  min-width: 0;
  margin: 0;
}
#cmsl_img .grid5col > ul.clearfix > li a{
  display: block;
  width: 100%;
}
#cmsl_img .grid5col > ul.clearfix > li .thumbimg{
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 10 / 7;
  object-fit: cover;
}
#cmsl_img .grid5col > ul.clearfix > li span{
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media screen and (max-width: 768px){
  #cmsl_img .grid5col > ul.clearfix{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 手机 ≤480px ---------- */
@media screen and (max-width: 480px){
  body{ font-size: 16px; }
  #header{ min-height: 84px; }
  .logo{ width: 150px; height: 40px; background: none; }
  .header_c h1{ font-size: 18px; }
  .regsit{ font-size: 16px; right: 4px; top: 4px; }
  #searchbar{ width: 110px; }
  #searchbar #s{ width: 95px; }
  #topnav li a{ padding: 0 12px; font-size: 16px; }
  #cmsl_img li{ width: 46%; margin: 5px 2% 8px; }
  #cmsl_img li span{ width: 100%; }
  .htotabs li a{ padding: 5px 8px; font-size: 16px; white-space: nowrap; }
  .htotabs li{ width: auto !important; white-space: nowrap; }
  .footer_bottom p{ font-size: 16px; }
  .bottom_tools{ zoom: .85; }
  .m .mt h2, .grid5col .mt h2{ font-size: 16px; }
  /* 正文可读性优化（仅移动端）：段落行高、图片间距，不改颜色/字号 */
  #content .entry p, #content .entry_box_s p{ line-height: 1.8; }
  #content .entry img, #content .entry_box_s img{ margin: 8px 0; display: block; }
}


/* 本月赛事活动日历：适配侧栏宽度（桌面 236px 容纳 7 列），移动端侧栏全宽同样生效 */
#sidebar .flatpickr-calendar{
  width: 100% !important;
  box-sizing: border-box;
}
#sidebar .flatpickr-calendar .flatpickr-days{
  width: 100% !important;
}
#sidebar .flatpickr-calendar .flatpickr-rContainer{
  width: 100% !important;
}
#sidebar .flatpickr-calendar .flatpickr-day,
#sidebar .flatpickr-calendar .flatpickr-weekday{
  max-width: 29px !important;
  flex-basis: 29px !important;
  height: 29px !important;
  line-height: 27px !important;
  font-size: 14px !important;
}
#sidebar .flatpickr-calendar .flatpickr-current-month .cur-month{
  font-size: 14px;
}

/* ===== 首页整改 2026-10-19：移动端触屏点击热区 ≥48px ===== */
@media screen and (max-width: 768px){
  #searchform button, .nav-toggle-btn { min-height: 48px; }
}
/* 页脚合作伙伴与友情链接统一网格，避免图片和文字链接浮动后错行 */
.footer_top{
  display: flow-root;
  height: auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  background: var(--color-surface);
  line-height: var(--line-height-compact);
}
.footer_top .blogtitle{
  width: auto;
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface-muted);
  font-size: var(--font-size-title-sm);
  line-height: var(--line-height-compact);
}
.footer_top .blogtitle a{ margin: 0; padding: 0; color: var(--color-text-primary); }
.footer_bottom{
  position: static;
  display: flow-root;
  clear: both;
  margin-top: var(--space-4);
  padding: var(--space-4);
  line-height: var(--line-height-body);
  overflow-wrap: anywhere;
}
.footer_bottom p{ margin: var(--space-1) 0; }
.footer_bottom img{ max-width: 100%; height: auto; vertical-align: middle; }
.footer_top .link_s{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  box-sizing: border-box;
  margin: 0;
  width: auto;
  height: auto;
  float: none;
  list-style: none;
}
.footer_top .link_s li{
  float: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: calc(var(--space-8) * 2 + var(--space-2));
  margin: 0;
  padding: var(--space-2);
  box-sizing: border-box;
  list-style: none;
  text-align: center;
}
.footer_top .link_s li a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  line-height: var(--line-height-compact);
  overflow-wrap: anywhere;
}
.footer_top .link_s li img{
  display: block;
  max-width: 100%;
  max-height: 54px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 1000px){
  .footer_top .link_s{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .footer_top .link_s{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
  }
  .footer_top .link_s li{ height: 64px; }
  .footer_top .link_s li img{ max-height: 48px; }
}

/* 首页栏目标题栏：背景、标记和内边距归整行，标题与更多共同对齐。 */
.page-home #wrapper .grid5col .mt{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  box-sizing: border-box;
  border: 0;
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface-muted);
}
.page-home #wrapper .grid5col .mt h2{
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-size: var(--font-size-title-sm);
  font-weight: 700;
  line-height: var(--line-height-compact);
  overflow-wrap: anywhere;
}

/* 培训/等级测试 + 专业网球发展 单列：标题在 box 内（对齐首页其他右侧模块——容器灰条条带） */
.page-home #wrapper .w2col-stack .mt{
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface-muted);
  min-height: 48px;
  box-sizing: border-box;
  padding: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-2);
}
.page-home #wrapper .w2col-stack .mt h2{
  background: transparent;
  border-left: 0;
  padding: 0;
  margin: 0;
  font-size: var(--font-size-title-sm);
  font-weight: 700;
  line-height: var(--line-height-compact);
  color: var(--color-text-primary);
  overflow-wrap: anywhere;
}
.page-home #wrapper .w2col-stack .mc1{
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-2) var(--space-3);
}
.page-home #wrapper .w2col-stack .mc1 ul{
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-4);
}
.page-home #wrapper .w2col-stack .mc1 li{
  line-height: 1.5;
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--color-border);
}
.page-home #wrapper .w2col-stack .mc1 li:last-child{ border-bottom: 0; }
.page-home #wrapper .w2col-stack .mc1 li a{ color: var(--color-text-primary); text-decoration: none; }
.page-home #wrapper .w2col-stack .mc1 li a:hover{ color: var(--color-brand); }
.page-home #wrapper .w2col-stack .mc1 li h2{
  margin: 0;
  font-size: var(--font-size-body);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-home #wrapper .w2col-stack .mc1 li p{
  margin: 2px 0 0;
  font-size: var(--font-size-min);
  line-height: 1.5;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3em;
}
.page-home #wrapper .grid5col .mt .extra{
  position: static;
  float: none;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  line-height: var(--line-height-compact);
}
.page-home #wrapper .grid5col .mt .more{
  position: static;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--font-size-min);
  text-decoration: none;
}
.page-home #wrapper .grid5col .mt .more:hover{ color: var(--color-brand); }

/* 榜单采用简洁图文展示，避免装饰标题栏与海报争抢视觉重点。 */
.page-home #wrapper #share .mt{
  min-height: 0;
  padding: 0;
  margin: 0 0 var(--space-3);
  border: 0;
  background: transparent;
}
.page-home #wrapper #share .mt h2{
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--font-size-body);
  line-height: var(--line-height-compact);
}
.page-home #wrapper #share{
  height: auto;
  min-height: 0;
  border: 0;
  padding: var(--space-3) var(--space-3) var(--space-2);
  margin-bottom: 0;
}
.page-home #wrapper #share .mc{
  min-height: 0;
  padding: 0;
  margin: 0;
}
.page-home #wrapper #share #mcclist{
  display: flow-root;
  min-height: 0;
  padding: 0;
  margin: 0;
}
.page-home #wrapper #share #mcclist p{ margin: 0; padding: 0; }
.page-home #wrapper #share #mcclist a{ display: block; }
.page-home #wrapper #share #mcclist p:has(img){ line-height: 0; }
.page-home #wrapper #share #mcclist p:empty{ display: none; }
.page-home #wrapper #share #mcclist > :last-child{ margin-bottom: 0; padding-bottom: 0; }

.page-home #wrapper #sidebar > h3,
.page-home #wrapper #sidebar .widget > h3,
.page-home #wrapper #sidebar .title-bar{
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  height: auto;
  min-height: 48px;
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  box-sizing: border-box;
  border: 0;
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface);
  color: var(--color-text-primary);
  font-size: var(--font-size-title-sm);
  font-weight: 700;
  line-height: var(--line-height-compact);
}
.page-home #wrapper #sidebar .title-bar h2{
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* 各区推广和老年专委会：等宽双栏，窄屏回退单栏。 */
.page-home #wrapper .home-community-columns{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  align-items: start;
}
.page-home #wrapper .home-community-columns > .share_2{
  float: none;
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
}
@media screen and (max-width: 640px){
  .page-home #wrapper .home-community-columns{ grid-template-columns: minmax(0, 1fr); }
}

/* 首页保留完整文本，按实际排版行数省略，兼容中英文和符号混排。 */
.page-home #index_half{ display: flex; flex-wrap: wrap; align-items: stretch; }
.page-home #index_half,
.page-home #index_half .tab-inside,
.page-home #wrapper .index_newstitle{
  height: auto;
  max-height: none;
  overflow: visible;
}
.page-home #index_half .tab-inside ul li{
  height: auto;
  padding: var(--space-2) 0;
  line-height: var(--line-height-body);
}
.page-home #index_half .tab-inside ul li:not(:first-child){
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
/* 图文列表：默认显示 3 条，其余隐藏（覆盖 :not(:first-child) flex） */
.page-home #index_half .tab-inside ul li.tab-more-item{
  display: none;
}
.page-home #index_half .tab-inside ul.open li.tab-more-item{
  display: flex;
  align-items: center;
}
.page-home #index_half .tab-inside ul li:not(:first-child) a{ flex: 1; }
.page-home #index_half .tab-inside ul li a,
.page-home #wrapper .index_newstitle h2,
.page-home #wrapper .share_2 .mc li > a,
.page-home #cmsl_img li span{
  display: block;
  min-width: 0;
  height: auto;
  max-height: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-home #wrapper .index_newstitle p,
.page-home #index_half .tab-inside .gray{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--home-summary-lines);
  line-clamp: var(--home-summary-lines);
  height: auto;
  max-height: calc(var(--home-summary-lines) * 1.5em);
  line-height: var(--line-height-compact);
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}
.page-home #wrapper .index_newstitle,
.page-home #wrapper .club .mc li,
.page-home #wrapper #comment .mc1 li{ display: flow-root; }

/* 链接单元等高，并随最长文字扩展。 */
.page-home .footer_top .link_s{ grid-auto-rows: 1fr; }
.page-home .footer_top .link_s li{ height: auto; min-height: 72px; }
.page-home .footer_top .link_s li a,
.page-home .regsit{
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
@media screen and (max-width: 768px){
  .page-home .regsit{ position: static; clear: both; max-width: 100%; }
}
