/* SEARCH_SURFACE_CANONICAL_V2
   HOME and player search share this single visual owner. */
#home-search.searchrow button::before,
#home-search.searchrow button::after{content:none;display:none}

/* Player search — approved A | Compact Row. */
body.ref-search #search-panel{
  margin-top:16px!important;
  padding:12px 14px 10px!important;
  border:1px solid #cad3db!important;
  border-radius:0!important;
  background:rgba(247,250,251,.94)!important;
  box-shadow:none!important;
}
body.ref-search #search-panel .search-grid{
  display:grid!important;
  grid-template-columns:minmax(240px,1.7fr) 130px 150px 150px auto!important;
  gap:8px!important;
  align-items:end!important;
}
body.ref-search #search-panel .field{
  min-width:0!important;
}
body.ref-search #search-panel .field label{
  display:block!important;
  margin:0 0 5px!important;
  color:#50697b!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1.2!important;
}
body.ref-search #search-panel .field input,
body.ref-search #search-panel .field select{
  width:100%!important;
  height:36px!important;
  min-width:0!important;
  padding:0 10px!important;
  border:1px solid #b7c6d0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#173d5b!important;
  font-size:13px!important;
  box-shadow:none!important;
}
body.ref-search #search-panel .field input:focus,
body.ref-search #search-panel .field select:focus{
  border-color:#688e9d!important;
  box-shadow:0 0 0 2px rgba(73,107,120,.10)!important;
}
body.ref-search #search-panel .primary-actions{
  display:flex!important;
  align-items:end!important;
  gap:8px!important;
  grid-column:auto!important;
  white-space:nowrap!important;
}
body.ref-search #search-panel .search-button,
body.ref-search #search-panel .clear-button{
  height:36px!important;
  padding:0 14px!important;
  border-radius:0!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
}
body.ref-search #search-panel .search-button{
  border-color:#c91936!important;
  background:#c91936!important;
  color:#fff!important;
}
body.ref-search #search-panel .search-button:hover{background:#ac142d!important}
body.ref-search #search-panel .clear-button{
  border-color:#b7c6d0!important;
  background:#fff!important;
  color:#173d5b!important;
}
body.ref-search #search-panel .clear-button:hover{background:#f6fafc!important}
body.ref-search #search-panel .advanced-search{
  margin-top:9px!important;
  padding-top:8px!important;
  border-top:1px solid #d7e1e6!important;
}
body.ref-search #search-panel .advanced-search>summary{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  color:#173d5b!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1.3!important;
  cursor:pointer!important;
  list-style:none!important;
  user-select:none!important;
}
body.ref-search #search-panel .advanced-search>summary::-webkit-details-marker{display:none}
body.ref-search #search-panel .advanced-search>summary::before{content:"＋";font-weight:900}
body.ref-search #search-panel .advanced-search[open]>summary::before{content:"−"}

@media(max-width:1000px) and (min-width:761px){
  body.ref-search #search-panel .search-grid{
    grid-template-columns:1fr 1fr 1fr!important;
  }
  body.ref-search #search-panel .search-grid>.field:first-child{
    grid-column:1/-1!important;
  }
  body.ref-search #search-panel .primary-actions{
    grid-column:auto!important;
  }
}

@media(max-width:760px){
  body.ref-search #search-panel{
    padding:12px 10px 10px!important;
  }
  body.ref-search #search-panel .search-grid{
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
  }
  body.ref-search #search-panel .search-grid>.field:first-child{
    grid-column:auto!important;
  }
  body.ref-search #search-panel .primary-actions{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  body.ref-search #search-panel .search-button,
  body.ref-search #search-panel .clear-button{
    width:100%!important;
  }
}

/* Player search details / status / pagination.
   Search-page-only layout lives here; search.html contains no page CSS. */
body.ref-search #advanced-search .advanced-body{padding-top:14px}
body.ref-search #advanced-search .advanced-section{padding:14px 0;border-top:1px solid #e5ebf0}
body.ref-search #advanced-search .advanced-section:first-child{border-top:0;padding-top:0}
body.ref-search #advanced-search .advanced-section h2{margin:0 0 10px;color:#173d5b;font-size:12px;letter-spacing:.08em;text-transform:uppercase}
body.ref-search #advanced-search .section-note{margin:-3px 0 10px;color:#71879a;font-size:11px}
body.ref-search #advanced-search .detail-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px}
body.ref-search #advanced-search .detail-wide{grid-column:span 2}
body.ref-search #advanced-search .range-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:7px 18px}
body.ref-search #advanced-search .range-row{display:grid;grid-template-columns:minmax(86px,1fr) minmax(76px,.8fr) 18px minmax(76px,.8fr);align-items:center;gap:6px}
body.ref-search #advanced-search .range-label{color:#51697e;font-size:12px;font-weight:700}
body.ref-search #advanced-search .range-sep{text-align:center;color:#8295a5;font-size:12px}
body.ref-search #advanced-search .range-row input,
body.ref-search #advanced-search .range-row select{width:100%;height:36px;padding:0 8px;border:1px solid #cdd9e3;border-radius:0;background:#fff;color:#17344c;font-size:12px;outline:none}
body.ref-search #advanced-search .range-row input:focus,
body.ref-search #advanced-search .range-row select:focus{border-color:#4495c8;box-shadow:0 0 0 2px #4495c81d}
body.ref-search #advanced-search .advanced-footer-actions{display:flex;gap:8px;justify-content:flex-end;padding-top:14px;border-top:1px solid #e5ebf0}
body.ref-search .summary{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:18px 2px 10px;color:#64788b;font-size:13px}
body.ref-search .count{color:#1a3c55;font-weight:800}
body.ref-search .more{display:block;margin:14px auto 0;padding:9px 18px;border:1px solid #b9cad8;border-radius:0;background:#fff;color:#244861;cursor:pointer}
body.ref-search .more:hover{background:#f6fafc}
body.ref-search .more[hidden]{display:none}

@media(max-width:1000px){
  body.ref-search #advanced-search .detail-grid{grid-template-columns:repeat(3,1fr)}
  body.ref-search #advanced-search .range-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  body.ref-search #advanced-search .detail-grid{grid-template-columns:1fr}
  body.ref-search #advanced-search .detail-wide{grid-column:auto}
  body.ref-search #advanced-search .range-row{grid-template-columns:82px 1fr 16px 1fr}
  body.ref-search #advanced-search .advanced-footer-actions{display:grid;grid-template-columns:1fr 1fr}
}

/* SEARCH_RESULTS_CANONICAL_V4
   One semantic table + one colgroup owns header/body column geometry.
   Desktop keeps the existing alignment; mobile centers every fixed data column
   so each heading and its values share the same visual axis. */
body.ref-search .summary,
body.ref-search .search-results-wrap{
  width:100%;
}
body.ref-search .search-results-wrap{
  overflow-x:auto;
}
body.ref-search .search-results-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  border-spacing:0;
  background:#fff;
  border:1px solid #c8d4de;
}
body.ref-search .search-results-table col.result-col-player{width:auto}
body.ref-search .search-results-table col.result-col-season{width:58px}
body.ref-search .search-results-table col.result-col-team{width:52px}
body.ref-search .search-results-table col.result-col-position{width:52px}
body.ref-search .search-results-table col.result-col-trajectory{width:42px}
body.ref-search .search-results-table col.result-col-grade{width:42px}
body.ref-search .search-results-table col.result-col-grade:last-child{width:54px}

body.ref-search .search-results-table thead th{
  height:25px;
  padding:0 8px;
  border:0;
  border-bottom:1px solid #c8d4de;
  background:var(--radar-head,#eaf1f3);
  color:#536b76;
  font-size:10px;
  font-weight:900;
  line-height:1;
  text-align:right;
  white-space:nowrap;
  vertical-align:middle;
}
body.ref-search .search-results-table thead th:first-child{
  text-align:left;
}
body.ref-search .search-results-table thead th:last-child{
  padding-right:20px;
}
body.ref-search .search-results-table tbody td:last-child{
  padding-right:20px;
}
body.ref-search .search-results-table tbody tr{
  cursor:pointer;
  background:#fff;
}
body.ref-search .search-results-table tbody tr:hover{
  background:#f7fafb;
}
body.ref-search .search-results-table tbody tr:focus{
  outline:1px solid #8fa5ae;
  outline-offset:-1px;
}
body.ref-search .search-results-table tbody td{
  height:40px;
  padding:0 8px;
  border:0;
  border-bottom:1px solid #d8e3e8;
  color:#334d61;
  font-size:12px;
  font-weight:700;
  line-height:1;
  text-align:right;
  white-space:nowrap;
  vertical-align:middle;
}
body.ref-search .search-results-table tbody tr:last-child td{
  border-bottom:0;
}
body.ref-search .search-results-table tbody td.search-player{
  overflow:hidden;
  text-align:left;
}
body.ref-search .search-results-table .name{
  display:block;
  width:100%;
  overflow:hidden;
  color:#173d5b;
  font-size:12px;
  font-weight:900;
  line-height:1.15;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.ref-search .search-results-table .name-en{
  margin-left:5px;
  color:#7d8b96;
  font-size:10px;
  font-weight:700;
}
body.ref-search .search-results-table .season,
body.ref-search .search-results-table .team,
body.ref-search .search-results-table .position{
  color:#334d61;
  font-size:12px;
  font-weight:800;
}
body.ref-search .search-results-table .team-code{
  letter-spacing:.02em;
}
body.ref-search .search-results-table .order-grade{
  font-size:13px;
}
body.ref-search .search-results-table .order-traj{
  height:18px;
  transform:none;
}
body.ref-search .search-results-table .order-traj svg{
  width:16px;
  height:16px;
  flex-basis:16px;
}
body.ref-search .search-results-table .order-traj b{
  font-size:12px;
}
body.ref-search .search-results-table .empty{
  height:auto;
  padding:34px;
  color:#64788b;
  text-align:center;
}
@media(max-width:760px){
  body.ref-search .search-results-wrap{
    overflow-x:hidden;
  }
  body.ref-search .search-results-table{
    width:100%;
    min-width:0;
  }
  body.ref-search .search-results-table col.result-col-season{width:31px}
  body.ref-search .search-results-table col.result-col-team{width:27px}
  body.ref-search .search-results-table col.result-col-position{width:27px}
  body.ref-search .search-results-table col.result-col-trajectory{width:25px}
  body.ref-search .search-results-table col.result-col-grade{width:21px}
  body.ref-search .search-results-table col.result-col-grade:last-child{width:21px}
  body.ref-search .search-results-table thead th{
    box-sizing:border-box;
    height:22px;
    padding:0 1px;
    font-size:8.2px;
  }
  body.ref-search .search-results-table tbody td{
    box-sizing:border-box;
    height:31px;
    padding:0 1px;
    font-size:8.8px;
  }
  body.ref-search .search-results-table thead th:not(:first-child),
  body.ref-search .search-results-table tbody td:not(.search-player){
    text-align:center;
  }
  body.ref-search .search-results-table thead th:first-child,
  body.ref-search .search-results-table tbody td.search-player{
    padding-left:6px;
    text-align:left;
  }
  body.ref-search .search-results-table .name{
    font-size:9.8px;
  }
  body.ref-search .search-results-table .name-en{
    display:none;
  }
  body.ref-search .search-results-table .season,
  body.ref-search .search-results-table .team,
  body.ref-search .search-results-table .position{
    font-size:8.2px;
  }
  body.ref-search .search-results-table .team-code{
    font-size:7.8px;
    letter-spacing:0;
  }
  body.ref-search .search-results-table .order-grade{
    font-size:9.8px;
  }
  body.ref-search .search-results-table .order-traj{
    transform:scale(.72);
    transform-origin:center;
  }
  body.ref-search .search-results-table thead th:last-child,
  body.ref-search .search-results-table tbody td:last-child{
    padding-left:1px;
    padding-right:6px;
  }
}

