/* Phone layout (< 744px) for the calendar screens — see the mobile handoff.
   Both keep their own phone layouts (the timetable's day agenda, .ttp-*, and
   the school calendar's month, .kal-phone); this only brings them to the
   phone rules: a tap target of 44px, no text under 12px, fields at 16px,
   nothing wider than the screen, sheets that fit. */
@media (max-width:743.98px){

  /* ---------------------------------------------------------- timetable */
  /* the class picker is the phone's own, dressed as the old chip in the dark bar */
  .ttp-top .combo.native.ttp-classpick{flex:0 1 auto;width:auto;min-width:0;max-width:44vw}
  .ttp-top .ttp-classpick .combo-select{height:44px;min-height:44px;padding:0 30px 0 14px;
    border-radius:999px;border:1px solid rgba(255,255,255,.32);
    background-color:rgba(255,255,255,.14);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23FFFFFF' stroke-width='1.8'/%3E%3C/svg%3E");
    background-position:right 12px center;color:#fff;font-size:16px;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ttp-top .ttp-classpick option{color:var(--ink);background:var(--surface)}
  .ttp-top h2{flex:none}

  /* day tabs: a strip that scrolls inside itself when seven will not fit */
  .ttp-tabs{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
  .ttp-tabs::-webkit-scrollbar{display:none}
  .ttp-tab{min-height:44px}

  /* nothing under 12px */
  .ttp-pill{font-size:12px}
  .ttp-mini-t{font-size:12px}
  .ttp-daysum{font-size:13px}

  /* the lesson sheet's fields */
  .tts .ttw-field input{height:48px}

  /* the school week sheet: a day's hours drop under its name */
  .weekrow{flex-wrap:wrap;row-gap:6px;min-height:48px;padding:8px}
  .weekrow input[type=checkbox]{width:22px;height:22px;flex:none}
  .weekday{font-size:15px}
  .weekrow .ar{margin-inline-start:auto}
  .weektimes{flex:1 1 100%;margin-left:0;padding-inline-start:32px}
  .weektimes input{flex:1;min-width:0;height:44px;padding:0 10px;font-size:16px}

  /* ---------------------------------------------------- school calendar */
  /* English / Hijri / Both and the class share one row at 360px */
  .kal-classpick{font-size:16px;min-width:0;max-width:38%}
  .kal-phone .kal-seg{min-width:0}
  .kal-phone .kal-seg button{min-width:0;padding:0 4px}
  /* the month title gives way to the arrows rather than push them off screen */
  .kal-phone .kal-pmonth{flex:1 1 auto}
  .kal-phone .kal-pmonth .kal-title{min-width:0}
  .kal-phone .kal-title .kal-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .kal-phone .kal-prow .kal-arrow{flex:none}

  /* the grid: weekday letters at 12px, a whole cell to tap */
  .kal-phone .kal-wd{font-size:12px}
  .kal-phone .kal-cell{min-height:48px;cursor:pointer}

  /* the day card */
  .kal-phone .kal-dayhead{flex-wrap:wrap}
  .kal-phone .kal-dayhead > div:first-child{min-width:0}
  .kal-phone .kal-dayhead .kal-status{max-width:100%;min-width:0}
  .kal-phone .kal-dayhead .kal-status span{overflow:hidden;text-overflow:ellipsis}
  .kal-phone .kal-evrow.clickable{min-height:44px}
  .kal-phone .kal-testrow{min-height:44px;align-items:center}
  .kal-phone .kal-open{display:inline-flex;align-items:center;min-height:44px;margin-top:8px;font-size:15px}
  .kal-phone .kal-tltime span{font-size:12px}

  /* the event form */
  .kal-evsheet .kal-type{min-height:44px;font-size:15px}
  .kal-evsheet .kal-swatch{width:44px;height:44px}
  .kal-evsheet .kal-swatches input[type=color]{width:52px;height:44px}
  .kal-evsheet .kal-switch{flex-wrap:wrap}
  .kal-evsheet .kal-daysbox{margin-inline-start:auto}
  .kal-evsheet .kal-days{width:72px}

  /* the day, cover / retime, holiday and assessment sheets */
  .kal-sheet > header .linkbtn{min-height:44px;padding:0 12px;font-size:15px}
  .kal-sheet input[type=time]{height:48px;font-size:16px;min-width:0;flex:1}
  .kal-sheet .cal-lesson{flex-wrap:wrap}
  .kal-sheet .cal-lesson-title{font-size:15px}
  .kal-sheet .cal-lesson-time{font-size:12px;flex-wrap:wrap}
  .kal-sheet .cal-lesson-acts{flex:1 1 100%;flex-wrap:wrap;padding-inline-start:16px}
  .kal-sheet .cal-lesson-acts .linkbtn{min-height:44px;padding:0 12px;font-size:15px;color:var(--accent)}
}
