/* The touch foundation (whole-app plan step 3, docs/peeloff-whole-app/plan.md): the input decides behaviour, width only
   the arrangement. A touch screen (coarse pointer: phones, and iPads in either orientation, even at computer widths)
   gets 44 px targets and every control in plain sight; a mouse keeps the compact look. Loaded last on Make tomorrow and
   Run today. */
@media(pointer:coarse){
 /* 44 px targets: buttons, links styled as buttons, fields and menus. Height only; the arrangement stays as it is.
    Targets already taller (the day line, the phone board's sheet buttons, the assign chooser, Add) are left alone. */
 :is(main,header,dialog,.sheet,#bp-sheet,.room-options-menu) :is(button,.button,.text-button,a.menu-action,a.workspace-mode,a.workspace-link,summary,select,input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]),[role=button]):not(.board-gap,.board-bar,.day-stop,.bp-btn,.bp-add,.bp-q,.assign-choice,.add-button,.msum-compact){min-height:44px}
 /* Icon-only buttons are 44 px wide too. */
 :is(.board-chip-x,.board-remove,.assignment-table .meo-options,.crna-top .remove-person,.icon-button,.bp-x,.msum .x,.msum-hide,.text-provider,.task>button,#peeloff-tools-toggle,.split-action>button+button,button[data-action-menu],.sheet-header button){min-width:44px;min-height:44px}
 /* Tick boxes: a bigger box. The MEO box's label is padded so the tap area around it is 44 px (padding, not display,
    so an ineligible row's hidden pill stays hidden). */
 :is(main,dialog) input[type=checkbox],.assignment-table input[type=checkbox]{width:24px;height:24px}
 .assignment-table label.meo-pill{padding:10px}
 /* Other tick-box labels (coverage choices, settings, confirmations) are 44 px tall to tap. */
 :is(main,dialog) label:has(> input:is([type=checkbox],[type=radio])):not(.meo-pill){padding-block:10px}
 .meo-options{min-height:44px}
 /* Count ✓ / Left out on the board. */
 .board-seg button{min-height:44px;padding-inline:14px}
 .bp-btn.is-small{min-height:44px}
 /* The × glyphs sit in the middle of their 44 px boxes. */
 .board-chip-x,.board-remove{line-height:44px}
 /* Add physician / Add room (taller on phones already), Undo in toasts, Run today's task rows. */
 .add-button{min-height:44px}
 #toast button,.board-pills button,.save-alert .button{min-height:44px}
 /* Links that act: Open Make tomorrow on an empty day, and phone numbers. */
 .empty-day-link{line-height:26px}
 .phone-number{line-height:28px}
 .task label{min-height:44px}
 /* The names column's ⋯: as wide as the column allows, with a 44 px tap area around it. */
 .board-person-menu{position:relative;min-height:44px}
 .board-person-menu::before{content:"";position:absolute;inset:0 0 0 -12px}
 /* In the afternoon the column is narrow: the ⋯ is itself 44 px wide, so the tap area never covers the name. */
 .schedule-board.is-afternoon .board-person-menu{width:44px}
 .schedule-board.is-afternoon .board-person-menu::before{content:none}
 /* The date box on Make tomorrow. */
 .schedule-date{height:44px}
 .board-picklist{top:calc(100% + 3px)}
 .board-slot,.board-slot.is-small,.board-type-input,.board-option,.board-addtimes,.board-q-time{min-height:44px}
 .board-chip{min-height:44px}

 /* Nothing faded or hidden until hover. */
 .board-chip-x{opacity:1}
 .board-quiet{color:inherit;padding-inline:4px}
 /* Combine and Swap: slimmer side padding so both fit on one line where the column allows (computer widths); on a
    tablet in portrait they wrap rather than squeeze the timeline. */
 .board-act{gap:2px;padding-right:0}
 /* A case on the timeline keeps its slim look; the tap area around it is 44 px tall. */
 .board-tl{min-height:44px}
 .board-bar[role=button]::before{content:"";position:absolute;left:0;right:0;top:-13px;bottom:-13px}
 .board-bar[role=button].is-request{overflow:visible}.board-bar[role=button].is-request>span{min-width:0}
 /* MEO names you can tap (to skip one) are padded targets. */
 .msum button.mn{min-height:44px;padding:0 6px}
 /* The split point between two cases shows as a labelled target, not an invisible strip. */
 /* It stays inside the timeline and under the cases: where they overlap, the case wins the tap. */
 .board-gap{left:clamp(0px, calc(var(--mid) - max(22px, var(--w) / 2)), calc(100% - max(44px, var(--w))))!important;width:max(44px, var(--w))!important;height:44px;margin-top:-22px;z-index:0;outline:1.5px dashed #8db33a}
 .board-bar[role=button]{z-index:2}.board-bar[role=button].is-selected{z-index:3}
 /* The 9:00 counting line stays drawn over the cases. */
 .board-cutline{z-index:4}
 /* A room with times but no case list splits where you tap its bar: the bar says so, in white, and a tap on the words
    is a tap on the bar. */
 .board-tl[data-board-split-tl] .board-bar:not(.is-request)::after{content:"Tap to split";position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;white-space:nowrap;font-size:11px;font-weight:700;color:#fff;pointer-events:none}
 .board-tl[data-board-split-tl] .board-bar:is(.is-need,.is-out)::after{color:var(--forest-lo,#0f3631)}
 /* Short rooms: "Split", and on the shortest no words rather than a clipped fragment. */
 .board-tl[data-board-split-tl] .board-bar:not(.is-request){container-type:inline-size}
 @container (max-width:72px){.board-tl[data-board-split-tl] .board-bar:not(.is-request)::after{content:"Split"}}
 @container (max-width:34px){.board-tl[data-board-split-tl] .board-bar:not(.is-request)::after{content:none}}
 .board-gap::after{content:"Split";position:absolute;inset:0;display:grid;place-items:center;font-size:11px;font-weight:800;color:var(--forest,#173f37)}
 /* Peeloff list: the boxes you type in look like boxes. */
 .assignment-table.peeloff-list :is(input.name,input[data-staff=assignment],.staff-time input){border-color:var(--pl-line,#e2e8e4);background:#fff}

 /* Run today: Home, Still working, Finished, Lunch and Dinner, checks and the row menu. */
 .peel-actions button,.peel-meals .meal,.meal,#people .person summary,.credit-banner button,.wh-switch button,#meo-next,.phones-open,.date-controls button{min-height:44px}
}
/* Tablet arrangement with touch (701–1059 px): the afternoon names column is a little wider, so the 44 px ⋯ doesn't
   cut names short. */
@media(pointer:coarse) and (min-width:701px) and (max-width:1059px){.schedule-board.is-afternoon .board-rail{width:180px}}
/* Computer arrangement with touch (1060 px and wider): the peeloff list's last column fits the MEO pill and the 44 px
   ⋯ side by side, so neither spills over the time or note box; if a pill is still too wide they wrap, never overlap. */
@media(pointer:coarse){.assignment-table.peeloff-list tr[data-target-kind]>td:last-child{flex-wrap:wrap}}
@media(pointer:coarse) and (min-width:1060px){
 .assignment-table label.meo-pill{padding-inline:0}
 .assignment-table.peeloff-list tr[data-target-kind]{grid-template-columns:104px minmax(110px,.9fr) minmax(150px,1.7fr) minmax(90px,.75fr) 190px}
}
@media(pointer:coarse) and (min-width:1060px) and (max-width:1199px){.assignment-table.peeloff-list tr[data-target-kind]{grid-template-columns:116px minmax(90px,.9fr) minmax(124px,1.7fr) minmax(72px,.75fr) 184px}}
