/* Coach docs — compact group roster on phones.
   One bordered block per group; dense kid rows (not oversized cards). */

@media screen and (max-width: 720px) {
  body {
    padding: 8px 8px 24px;
    font-size: 14px;
    line-height: 1.35;
    -webkit-text-size-adjust: 100%;
  }

  .sheet {
    max-width: none;
    border: none;
    border-radius: 0;
    padding: 8px 4px 4px;
    box-shadow: none;
    background: transparent;
  }

  header h1 {
    font-size: 1.15rem;
    line-height: 1.25;
  }

  header .sub,
  .summary,
  .legend {
    font-size: 12.5px;
  }

  .legend { margin-bottom: 12px; }

  .block {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #c9d6e4;
    border-radius: 12px;
    overflow: hidden;
  }

  .block h2 {
    font-size: 14px;
    padding: 9px 10px 4px;
    border-radius: 0;
    gap: 4px 8px;
  }

  .track {
    padding: 2px 10px 8px;
    font-size: 12.5px;
    border-bottom: 1px solid #c9d6e4;
  }

  table { width: 100%; border: none; }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  tbody { display: block; }

  /* Dense roster: mark | name .............. grade
                   status ...... mom+WA  dad+WA */
  tr {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    column-gap: 6px;
    row-gap: 3px;
    align-items: center;
    margin: 0;
    padding: 7px 10px;
    border: none;
    border-bottom: 1px solid #e6edf2;
    border-radius: 0;
    box-shadow: none;
  }

  tr:last-child { border-bottom: none; }

  tr.accepted { background: #eaf6ea; }
  tr.stay     { background: #fff7e4; }
  tr.pending  { background: #ffefe8; }
  tr.leave    { background: #f3f3f3; }

  td {
    display: block;
    border: none;
    padding: 0;
    width: auto;
    min-width: 0;
    text-align: right;
  }

  td::before { content: none; }

  /* Already shown in group header / track */
  td.num,
  td.gid,
  td.choice { display: none; }

  td.mark {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 1px;
    font-size: 1rem;
    line-height: 1.2;
  }

  td.name {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.95rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  td.grade {
    grid-column: 3 / 5;
    grid-row: 1;
    justify-self: end;
    font-size: 12px;
    color: #5a6b78;
    white-space: nowrap;
  }

  td.status {
    grid-column: 2;
    grid-row: 2;
    font-size: 12px;
    font-weight: 600;
    color: #3d4f5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  td.phone {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }

  td.phone + td.phone {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
  }

  .name,
  .status,
  .grade,
  .phone { width: auto; }

  .name { white-space: nowrap; }

  td.phone a.coach-tel,
  a.coach-tel {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    color: #0b5fff;
    text-decoration: none;
    white-space: nowrap;
  }

  footer {
    font-size: 12px;
    margin-top: 12px;
  }
}

/* Phone + WhatsApp: always same line */
.coach-phone-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  vertical-align: middle;
}

a.coach-tel { white-space: nowrap; }

a.coach-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #25d366;
  color: #fff !important;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 0;
}

a.coach-wa svg {
  width: 11px;
  height: 11px;
  display: block;
}

a.coach-wa:active {
  filter: brightness(0.92);
}
