/* Responsive/UI enhancement layer — 2026-09-26 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* Official-style social brand marks. Keep link text in DOM for accessible names. */
.ref-headin{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:18px!important}
.ref-head-main{min-width:0}
.ref-head-social,.ref-footer-social,.global-admin-social,.site-admin-social,.admin-home-social,.social-links{
  display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important
}
.ref-head-social a,.ref-footer-social a,.global-admin-social a,.site-admin-social a,.admin-home-social a,.social-links a{
  display:inline-flex!important;width:24px!important;height:24px!important;min-width:24px!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:4px!important;background-color:transparent!important;background-position:center!important;background-repeat:no-repeat!important;background-size:24px 24px!important;
  font-size:0!important;line-height:0!important;text-decoration:none!important;box-shadow:none!important
}
.ref-head-social a[href*="x.com/"],.ref-footer-social a[href*="x.com/"],.global-admin-social a[href*="x.com/"],.site-admin-social a[href*="x.com/"],.admin-home-social a[href*="x.com/"],.social-links a[href*="x.com/"]{background-image:url('/assets/social-x.svg')!important}
.ref-head-social a[href*="youtube.com/"],.ref-footer-social a[href*="youtube.com/"],.global-admin-social a[href*="youtube.com/"],.site-admin-social a[href*="youtube.com/"],.admin-home-social a[href*="youtube.com/"],.social-links a[href*="youtube.com/"]{background-image:url('/assets/social-youtube.svg')!important}
.ref-head-social a[href*="tiktok.com/"],.ref-footer-social a[href*="tiktok.com/"],.global-admin-social a[href*="tiktok.com/"],.site-admin-social a[href*="tiktok.com/"],.admin-home-social a[href*="tiktok.com/"],.social-links a[href*="tiktok.com/"]{background-image:url('/assets/social-tiktok.svg')!important}
.ref-head-social a[href*="instagram.com/"],.ref-footer-social a[href*="instagram.com/"],.global-admin-social a[href*="instagram.com/"],.site-admin-social a[href*="instagram.com/"],.admin-home-social a[href*="instagram.com/"],.social-links a[href*="instagram.com/"]{background-image:url('/assets/social-instagram.svg')!important}
.ref-head-social a:hover,.ref-footer-social a:hover,.global-admin-social a:hover,.site-admin-social a:hover,.admin-home-social a:hover,.social-links a:hover{opacity:.78!important;transform:translateY(-1px)}

/* HOME ranking: TEAM/POS are removed by ui-enhancements.js. */
.rank.home-rank-clean{table-layout:fixed!important;width:100%!important;min-width:0!important}
.rank.home-rank-clean th,.rank.home-rank-clean td{white-space:normal!important;overflow-wrap:anywhere!important}
.rank.home-rank-clean th:nth-child(1),.rank.home-rank-clean td:nth-child(1){width:7%!important;text-align:center!important}
.rank.home-rank-clean th:nth-child(2),.rank.home-rank-clean td:nth-child(2){width:48%!important;text-align:left!important}
.rank.home-rank-clean th:nth-child(3),.rank.home-rank-clean td:nth-child(3){width:12%!important;text-align:center!important}
.rank.home-rank-clean th:nth-child(4),.rank.home-rank-clean td:nth-child(4){width:13%!important;text-align:right!important}
.rank.home-rank-clean th:nth-child(5),.rank.home-rank-clean td:nth-child(5){width:20%!important;text-align:right!important}

/* Best order: stats first, abilities second. */
.best-team-table.ui-stat-first,.best-table.ui-stat-first{min-width:760px!important;table-layout:fixed!important}
.best-team-table.ui-stat-first colgroup,.best-table.ui-stat-first colgroup{display:none!important}
.best-team-table.ui-stat-first th:nth-child(1),.best-team-table.ui-stat-first td:nth-child(1),.best-table.ui-stat-first th:nth-child(1),.best-table.ui-stat-first td:nth-child(1){width:28px!important}
.best-team-table.ui-stat-first th:nth-child(2),.best-team-table.ui-stat-first td:nth-child(2),.best-table.ui-stat-first th:nth-child(2),.best-table.ui-stat-first td:nth-child(2){width:32px!important}
.best-team-table.ui-stat-first th:nth-child(3),.best-team-table.ui-stat-first td:nth-child(3),.best-table.ui-stat-first th:nth-child(3),.best-table.ui-stat-first td:nth-child(3){width:190px!important;text-align:left!important}
.best-team-table.ui-stat-first th:nth-child(4),.best-team-table.ui-stat-first td:nth-child(4),.best-table.ui-stat-first th:nth-child(4),.best-table.ui-stat-first td:nth-child(4){width:46px!important}
.best-team-table.ui-stat-first th:nth-child(5),.best-team-table.ui-stat-first td:nth-child(5),.best-table.ui-stat-first th:nth-child(5),.best-table.ui-stat-first td:nth-child(5){width:34px!important}
.best-team-table.ui-stat-first th:nth-child(6),.best-team-table.ui-stat-first td:nth-child(6),.best-table.ui-stat-first th:nth-child(6),.best-table.ui-stat-first td:nth-child(6){width:38px!important}
.best-team-table.ui-stat-first th:nth-child(7),.best-team-table.ui-stat-first td:nth-child(7),.best-table.ui-stat-first th:nth-child(7),.best-table.ui-stat-first td:nth-child(7){width:38px!important}
.best-team-table.ui-stat-first th:nth-child(n+8),.best-team-table.ui-stat-first td:nth-child(n+8),.best-table.ui-stat-first th:nth-child(n+8),.best-table.ui-stat-first td:nth-child(n+8){width:34px!important;padding-left:2px!important;padding-right:2px!important;text-align:center!important}
.best-team-table-wrap,.best-table-wrap{-webkit-overflow-scrolling:touch}

/* Prevent bad character compression/wrapping. */
p,li,td,th,a,button,label,summary{word-break:normal;line-break:auto}

@media(max-width:900px){
  .feature-grid,.featureArticleGrid,.explore,.best-order-grid,.home-meta-grid{grid-template-columns:1fr!important}
  .best-team-table-wrap,.best-table-wrap,.table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
}

@media(max-width:760px){
  .ref-headin{padding:12px 14px 8px!important;align-items:center!important;gap:10px!important}
  .ref-brand{font-size:22px!important;white-space:nowrap!important}
  .ref-tag{font-size:10.5px!important;line-height:1.35!important;white-space:normal!important}
  .ref-head-social{flex:0 0 auto!important;gap:6px!important}
  .ref-head-social a{width:22px!important;height:22px!important;min-width:22px!important;background-size:22px 22px!important}
  .ref-nav{max-width:100%!important;padding:0 14px!important;gap:18px!important;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}
  .ref-nav::-webkit-scrollbar{display:none!important}
  .ref-nav a{flex:0 0 auto!important;white-space:nowrap!important;font-size:12px!important;padding:10px 0!important}

  body.ref-search .wrap,body.ref-rankings .wrap,body.ref-features .wrap,body.ref-info .wrap,body.ref-article .wrap{width:auto!important;margin:20px auto 40px!important;padding-left:14px!important;padding-right:14px!important}
  body.ref-rules .shell,body.ref-player .shell{width:calc(100% - 28px)!important}
  body.ref-search .hero h1,body.ref-rankings .hero h1,body.ref-info .hero h1,body.ref-features .wrap>h1,body.ref-rules .shell>h1{font-size:25px!important;line-height:1.25!important}
  body.ref-search .hero p,body.ref-rankings .hero p,body.ref-info .hero .lead,body.ref-features .wrap>.lead,body.ref-rules .shell>.lead{font-size:14px!important;line-height:1.65!important}
  .global-section-heading,body.ref-rules .rules-section-heading h2,body.ref-rules .source-heading,body.ref-player .source-section .section-title{font-size:18px!important}

  /* HOME */
  .wrap{padding-left:12px!important;padding-right:12px!important}
  .hero{padding:16px 12px!important}
  .hero h1{font-size:22px!important;line-height:1.3!important}
  .hero p{font-size:13px!important;line-height:1.6!important}
  .searchrow{grid-template-columns:minmax(0,1fr) 78px!important;gap:6px!important}
  .searchrow input{min-width:0!important;font-size:16px!important}
  .section-title{align-items:center!important;gap:8px!important}
  .section-title h2{font-size:18px!important;line-height:1.3!important}
  .section-title a{font-size:11px!important;white-space:nowrap!important}
  .feature-grid{grid-template-columns:1fr!important;gap:10px!important}
  .feature-grid .season{min-width:0!important}
  .feature-grid .abilities{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;width:100%!important;margin:0!important;overflow:visible!important}
  .feature-grid .ability{width:auto!important;min-width:0!important;flex:none!important;padding:8px 2px!important}
  .feature-grid .ability .lab{font-size:9px!important;white-space:normal!important}
  .feature-grid .ability .val{font-size:13px!important;gap:3px!important}
  .feature-grid .specials{padding:9px 10px!important;gap:5px!important;align-items:flex-start!important}
  .ranktabs{overflow-x:auto!important;white-space:nowrap!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}
  .ranktabs::-webkit-scrollbar{display:none!important}
  .ranktabs span{flex:0 0 auto!important;padding:9px 13px!important;font-size:11px!important}
  .rank.home-rank-clean th,.rank.home-rank-clean td{padding:8px 5px!important;font-size:11px!important;line-height:1.35!important}
  .rank.home-rank-clean th:nth-child(1),.rank.home-rank-clean td:nth-child(1){width:9%!important}
  .rank.home-rank-clean th:nth-child(2),.rank.home-rank-clean td:nth-child(2){width:45%!important}
  .rank.home-rank-clean th:nth-child(3),.rank.home-rank-clean td:nth-child(3){width:13%!important}
  .rank.home-rank-clean th:nth-child(4),.rank.home-rank-clean td:nth-child(4){width:13%!important}
  .rank.home-rank-clean th:nth-child(5),.rank.home-rank-clean td:nth-child(5){width:20%!important}
  .home-rank-name{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:11px!important;line-height:1.35!important}
  .home-rank-en{display:block!important;font-size:9.5px!important;line-height:1.25!important}
  .home-rank-evidence{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;font-size:9.5px!important;line-height:1.3!important}
  .featureArticleGrid{grid-template-columns:1fr!important;gap:8px!important}
  .featureArticle{padding:12px!important}

  /* Player */
  body.ref-player h1{font-size:34px!important;line-height:1.08!important;overflow-wrap:anywhere!important}
  body.ref-player .meta-line{font-size:13px!important;line-height:1.55!important}
  body.ref-player .rating-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body.ref-player .rating-card:first-child{grid-column:span 2!important}
  body.ref-player .rating-number{font-size:20px!important}
  body.ref-player .trait-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.ref-player .special-list{gap:6px!important}
  body.ref-player .special{font-size:12px!important;white-space:normal!important;text-align:left!important}

  /* Best-order */
  .best-wrap{margin:20px auto 42px!important;padding:0 12px!important}
  .best-hero h1{font-size:25px!important}
  .best-hero p,.greatest-intro,.decade-card-head p{font-size:12px!important;line-height:1.65!important}
  .best-section-head{align-items:flex-start!important;gap:8px!important}
  .best-section h2{font-size:18px!important}
  .decade-card-head{padding:12px!important;display:block!important}
  .decade-card-head>span{display:block!important;margin-top:5px!important}
  .best-team-table.ui-stat-first,.best-table.ui-stat-first{min-width:740px!important}
  .best-team-table.ui-stat-first th,.best-team-table.ui-stat-first td,.best-table.ui-stat-first th,.best-table.ui-stat-first td{font-size:10.5px!important;height:31px!important;white-space:nowrap!important}

  /* Features / articles / rules */
  body.ref-features .feature-card{grid-template-columns:1fr!important;min-height:0!important}
  body.ref-features .feature-main{padding:14px!important}
  body.ref-features .jp{font-size:27px!important}
  body.ref-features .season-inline{font-size:22px!important}
  body.ref-features .article-title{font-size:18px!important;line-height:1.45!important}
  body.ref-features .article-sub{font-size:12px!important;line-height:1.7!important}
  body.ref-features .feature-side{grid-template-columns:1fr 1fr!important;border-left:0!important;border-top:1px solid #dbe2e8!important}
  body.ref-rules table{min-width:640px!important}
  body.ref-rules .table-wrap,body.ref-rules .rule-table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body.ref-article .article,body.ref-article .record,body.ref-article .compare,body.ref-article .callout{padding-left:14px!important;padding-right:14px!important}
}

@media(max-width:430px){
  .ref-head-social a{width:20px!important;height:20px!important;min-width:20px!important;background-size:20px 20px!important}
  .ref-brand{font-size:20px!important}
  .ref-tag{font-size:10px!important}
  body.ref-player .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .feature-grid .abilities{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .feature-grid .ability:nth-child(n+5){min-width:0!important}
}
