/* One visible row per hour; each half remains a precise 30-minute hit target. */
#calendar .calcell,#calendar .calhour{height:29px;min-height:29px;box-sizing:border-box;border-bottom:0;padding-top:1px;padding-bottom:1px}
#calendar .calcell.hour-start,#calendar .calhour.hour-start{border-top:1px solid #d8cfbe}
#calendar .calcell.session-start{border-top:1px solid #c4bcae}
#calendar .calhour.half-hour{border-top:0}
#calendar .calcell .cellplus{display:none}
#calendar .calcell[data-slot]:focus-visible::after{content:attr(data-slot-label);position:absolute;right:5px;top:4px;font-size:11px;color:#655638}
@media(hover:hover) and (pointer:fine){#calendar .calcell[data-slot]:hover::after{content:attr(data-slot-label);position:absolute;right:5px;top:4px;font-size:11px;color:#655638}}
#calendar .calendar-drag-source{opacity:.45}
#calendar .calcell.calendar-drop-target{box-shadow:inset 0 0 0 2px #a88c50!important}
.calendar-drag-ghost{position:absolute;z-index:4;pointer-events:none;box-sizing:border-box;min-height:29px;padding:3px;background:#f8f3e7;color:#40351f;border:2px solid #a88c50;border-radius:5px;box-shadow:0 3px 12px #332b2730;opacity:.65;white-space:pre-line;overflow:hidden;font:600 11px/1.3 system-ui}
.calendar-drag-ghost.awaiting-confirmation{opacity:.8}
.calendar-drag-ghost.is-saving{opacity:1}
.calendar-drag-ghost.invalid-target{border-color:#a33b32}
body.calendar-drag-active{user-select:none;-webkit-user-select:none;cursor:grabbing}
#calendar [data-live-session]{-webkit-touch-callout:none}
#booking-panel .booking-calendar-back{display:inline-flex;align-items:center;margin:0 0 16px;padding:8px 12px;min-height:44px;border-radius:10px;font-weight:400;font-size:14px}

/* Touching a scrollable cell is not a selection. Keep keyboard focus and drag feedback. */
#calendar .calcell{-webkit-tap-highlight-color:transparent}
@media(hover:none),(pointer:coarse){
 #calendar .calcell{--calendar-rest-bg:#fdfbf6;--calendar-rest-shadow:none}
 #calendar .calcell.offpeak{--calendar-rest-bg:#f3eddf}
 #calendar .calcell.occupied{--calendar-rest-bg:#4d4430}
 #calendar .calcell.occupied[class*="tenant-tone-"]{--calendar-rest-bg:var(--tenant-bg)}
 #calendar .calcell.blocked{--calendar-rest-bg:repeating-linear-gradient(135deg,#e5dfd3 0,#e5dfd3 7px,#cfc6b5 7px,#cfc6b5 9px)}
 #calendar .calcell.occupied.session-hour-divider:not(.session-start){--calendar-rest-shadow:inset 0 1px 0 rgba(55,45,30,.12)}
 #calendar .calcell.blocked.session-hour-divider:not(.session-start){--calendar-rest-shadow:inset 0 1px 0 rgba(81,75,64,.12)}
 #calendar .calcell:hover:not(:disabled):not(.calendar-drop-target){background:var(--calendar-rest-bg);box-shadow:var(--calendar-rest-shadow);filter:none}
 #calendar .calcell:focus:not(:focus-visible){outline:none}
}
/* Readable labels occupy the first hour of the session, not a single hit target.
   The transparent overlay cannot intercept taps or change the grid geometry. */
#calendar .calcell>.calendar-session-heading{position:absolute;z-index:1;inset:0 0 auto;display:block;box-sizing:border-box;width:100%;height:56px;max-height:56px;margin:0;padding:4px 5px;overflow:hidden;pointer-events:none;color:inherit;background:transparent;line-height:1.2}
#calendar .calcell .calendar-session-heading>strong{display:block;min-width:0;margin:0;font-size:12px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#calendar .calcell.occupied .session-time-pill{box-sizing:border-box;max-width:100%;padding:3px 6px;margin-top:3px;font-size:11px;line-height:13px;letter-spacing:0;white-space:nowrap;font-variant-numeric:tabular-nums}
#calendar .calcell>.calendar-session-heading.session-heading-short{display:flex;align-items:center;gap:4px;height:27px;max-height:27px;padding:2px 4px}
#calendar .session-heading-short>strong{flex:1 1 0}
#calendar .calcell.occupied .session-heading-short>.session-time-pill{flex:0 0 auto;margin-top:0}
#calendar .calstaffnote{box-sizing:border-box;font-size:11px;line-height:13px;max-height:26px;margin-top:0;overflow:hidden;overflow-wrap:anywhere}

#calendar .calendar-session-comments{position:absolute;z-index:1;left:5px;right:5px;top:53px;display:flex;flex-direction:column;gap:5px;font-size:11px;line-height:14px;color:inherit;text-align:left;overflow:hidden;overflow-wrap:anywhere;pointer-events:none}
#calendar .calendar-team-comment{opacity:.8;border-top:1px solid #4c402330;padding-top:4px}
#calendar .calendar-session-comments.empty-note{opacity:.65}
#calendar .calendar-comment-marker{position:absolute;right:3px;bottom:2px;font-size:12px;pointer-events:none}
#calendar [data-live-session]{user-select:none;-webkit-user-select:none}

#calendar .calendar-session-comments,#calendar .calendar-session-comments>span{white-space:normal;min-height:0;max-height:none;text-overflow:clip}

/* Half-hour guides stay faint; selection only follows an intentional click. */
#calendar .calcell.half-hour:not(.occupied),#calendar .calhour.half-hour{border-top:1px solid rgba(103,88,58,.065)}
#calendar-panel.calendar-compact-week #calendar .calcell.half-hour:not(.occupied){border-top:1px solid rgba(103,88,58,.065)}
#calendar .calcell.calendar-slot-selected:not(.occupied){background:#eee3c8!important;box-shadow:inset 0 0 0 1px #bda570!important}
#calendar .calcell.calendar-slot-selected::after{content:attr(data-slot-label);position:absolute;right:4px;top:3px;font:500 11px/16px system-ui;color:#655638}
