/* Mobile-only "card table" mode
   ONLY affects tables that have BOTH .table and .table--cards
   Desktop stays unchanged. */
@media (max-width: 720px){

  /* kill sideways scrolling caused by wide table layout */
  .table-wrap{
    overflow: visible !important;
  }

  table.table.table--cards{
    border: 0;
  }

  table.table.table--cards thead{
    display:none;
  }

  table.table.table--cards,
  table.table.table--cards tbody,
  table.table.table--cards tr,
  table.table.table--cards td{
    display:block;
    width:100%;
  }

  /* each row becomes a card */
  table.table.table--cards tr{
    margin: 10px 0;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
  }

  table.table.table--cards td{
    border: 0;
    border-top: 1px solid rgba(0,0,0,.06);
    padding: 10px 12px;
  }

  table.table.table--cards td:first-child{
    border-top: 0;
  }

  /* label/value layout */
  table.table.table--cards td[data-label]{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  table.table.table--cards td[data-label]::before{
    content: attr(data-label);
    font-weight: 700;
    opacity: .70;
    flex: 0 0 auto;
    max-width: 45%;
  }

  /* value block (your existing <div class="cellval">) */
  table.table.table--cards .cellval{
    flex: 1 1 auto;
    text-align: right;
    min-width: 0;
  }

  /* keep logos readable */
  table.table.table--cards img{
    max-height: 28px;
    width: auto;
    height: auto;
    display: inline-block;
  }

  /* long player names / text should wrap nicely */
  table.table.table--cards a,
  table.table.table--cards .cellval{
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
