/* Phone layout (< 744px) for the attendance screens — see the mobile handoff. */
@media (max-width:743.98px){
  /* ---- filters: class (or year) on its own row, From and To two up, then
     the quick-range pills across the bottom */
  .attm-bar > .inline-field:first-child{grid-column:1 / -1}
  .attm-chips{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px}
  .attm-chip{height:40px;padding:0 15px;border-radius:99px;border:1.5px solid #D6DED8;
    background:#fff;color:#16211C;font:inherit;font-size:14px;font-weight:600;cursor:pointer;
    white-space:nowrap}
  .attm-chip.on{background:#0E7A63;border-color:#0E7A63;color:#fff}

  /* ---- attendance report: one row per student */
  .attm-meta{font-size:14px;color:#5C6D64;margin:2px 4px 10px}
  .attm-list{background:#fff;border:1px solid #E5EAE6;border-radius:16px;overflow:hidden}
  .attm-row{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 12px 10px 16px;
    background:none;border:0;border-bottom:1px solid #E5EAE6;border-radius:0;text-align:start;
    font:inherit;color:#16211C;cursor:pointer}
  .attm-row:last-child{border-bottom:0}
  .attm-row:active{background:#F5F8F4}
  .attm-who{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .attm-name{font-size:16px;font-weight:600;overflow-wrap:anywhere}
  .attm-sub{font-size:14px;color:#5C6D64;overflow-wrap:anywhere}
  .attm-rate{flex:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
  .attm-rate b{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}
  .attm-rate span{font-size:12px;color:#5C6D64}
  .attm-rate.bad b{color:#9C332B}
  .attm-chev{flex:none;font-size:24px;line-height:1;color:#5C6D64}

  /* ---- a student's attendance: the figure, the counts, the weeks */
  .attm-sheet .sheet-title .mono{font-size:13px;font-weight:400}
  .attm-hero{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;background:#fff;
    border:1px solid #E5EAE6;border-radius:16px;padding:16px;margin-bottom:12px}
  .sheet-body .attm-hero{margin-bottom:0}
  .attm-hero-v{font-size:34px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
  .attm-hero-k{font-size:16px;font-weight:600}
  .attm-hero-n{flex-basis:100%;font-size:14px;color:#5C6D64}
  .attm-cards{margin-bottom:12px}
  .sheet-body .attm-cards{margin-bottom:0}
  .attm-cards .card{border-radius:16px}
  .attm-cards .card .k{font-size:12px}
  .attm-cards .card .n{font-size:12px}
  .attm-weeks{background:#fff;border-radius:16px;padding:12px}
  .panel .attm-weeks{border-radius:0}
  .sheet-body .attm-weeks{border:1px solid #E5EAE6}

  /* ---- the week grid */
  .attwk{display:grid;gap:6px}
  .attwk-row{display:grid;grid-template-columns:repeat(var(--cols,5),minmax(0,1fr));gap:6px}
  .attwk-head span{font-size:12px;font-weight:600;color:#5C6D64;text-align:center}
  .attwk-cell{height:54px;min-width:0;border-radius:10px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;gap:2px;overflow:hidden;
    background:#EEF1EE;color:#46564D}
  .attwk-date{font-family:var(--mono);font-size:12px;opacity:.85;white-space:nowrap}
  .attwk-word{font-size:12.5px;font-weight:700;max-width:100%;padding:0 2px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .attwk-cell.present{background:#DDF1E8;color:#0A6B52}
  .attwk-cell.absent{background:#F7E4E1;color:#9C332B}
  .attwk-cell.late{background:#F7EED9;color:#7A5A0E}
  .attwk-cell.leave{background:#EAE3F5;color:#5A3E93}
  .attwk-cell.excused{background:var(--blue-soft,#DFEAF3);color:var(--blue,#0F6BB5)}
  .attwk-cell.none{background:#fff;border:1.5px dashed #D6DED8}
  .attwk-cell.future{background:transparent;border:1px dashed #E5EAE6;color:#5C6D64}
  .attwk-cell.out{background:transparent}

  /* ---- the other family screens: room to breathe, nothing wider than the
     phone (a long name or subject wraps instead of pushing the page sideways) */
  .childbar,.childcard{border-radius:16px}
  .childbar{min-height:64px;padding:12px 14px;gap:12px}
  .childcard{min-height:72px;padding:14px;gap:12px}
  .childbar > .grow,.childcard > .grow{min-width:0}
  .childname{overflow-wrap:anywhere}
  .childwho{font-size:14px;overflow-wrap:anywhere}
  .childstats{flex-wrap:wrap;gap:10px 20px}
  .ministat .k,.ministat .n{font-size:12px}
  .childmenu-row{min-height:48px}
  .daylist{grid-template-columns:minmax(0,1fr)}
  .daycard{border-radius:16px}
  .dayhead{padding:12px 14px;font-size:15px}
  .dayrow{min-height:44px;font-size:14px;padding:8px 14px}
  .dayrow > .grow{min-width:0;overflow-wrap:anywhere}
  .dayrow > .mono.dim{font-size:12px;flex:none}
}
