/* Explicit, small grips. The rest of an event keeps native touch scrolling. */
.agenda-event>.calendar-resize-handle { position:absolute;z-index:3;left:calc(var(--time-width,54px) + (var(--track-width,70px) - 44px)/2);width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--muted,#aaa);touch-action:none;cursor:ns-resize;display:grid;place-items:center; }
.calendar-resize-handle[data-calendar-resize="start"] { top:-3px; }
.calendar-resize-handle[data-calendar-resize="end"] { bottom:-3px; }
.calendar-resize-handle::after { content:"";width:16px;height:3px;border-radius:3px;background:currentColor;opacity:1; }
.calendar-resize-handle:focus-visible { outline:2px solid var(--accent-ink,#ad9eed);outline-offset:-8px;border-radius:14px; }
.calendar-resizing .calendar-resize-handle { color:var(--accent-ink,#ad9eed); }
.calendar-resizing .agenda-icon { outline:1px solid var(--accent-ink,#ad9eed);outline-offset:3px; }
.calendar-resize-active .bottom-nav,.calendar-resize-active .fab { pointer-events:none;opacity:.25; }
.calendar-resize-preview { position:fixed;top:0;left:0;width:220px;z-index:10010;pointer-events:none;padding:10px 12px;border:1px solid var(--accent-border,#777);border-radius:12px;background:var(--surface,#242529);color:var(--text,#f3f3f5);font-size:13px;line-height:1.45;text-align:center;font-variant-numeric:tabular-nums;box-shadow:none; }
.calendar-drop-marker { height:auto;min-height:34px;display:flex;align-items:center;justify-content:center;padding:7px 10px;border-radius:9px;background:var(--accent-soft,#393444);color:var(--accent-ink,#d4c8fa);border:1px solid var(--accent-border,#746784);font-size:12px;font-weight:500;line-height:1.45;text-align:center;font-variant-numeric:tabular-nums; }
.calendar-drop-marker[data-mode="invalid"] { border-color:var(--line,#45454b);background:var(--surface-3,#33343a);color:var(--muted,#b1b1b8); }
.calendar-drop-marker[hidden] { display:none; }
@media(prefers-reduced-motion:reduce){.calendar-resizing .agenda-icon { transition:none; }}

/* Follow the finger immediately; card content and later blocks reflow together. */
.calendar-resizing,.calendar-resizing .agenda-track,.calendar-resizing .agenda-icon{transition:none!important}
.calendar-resizing{z-index:4}

.calendar-resize-invalid .agenda-icon{outline-color:var(--danger)}
.calendar-resizing .agenda-content{opacity:1}

/* The time element had its own old dark-theme color, overriding inheritance. */
#app[data-view=calendar] .day-agenda .agenda-time time{color:var(--text)}

/* Height changes must not make browser anchoring move the held boundary. */
.calendar-resize-active,.calendar-resize-active .day-agenda{overflow-anchor:none}

/* A long title may make its row taller than the duration capsule. Stretching
   the capsule to that text height hid small live changes to the actual time. */
.day-agenda:not(.flexible-day)>.agenda-event .agenda-icon{align-self:center;height:var(--event-height,102px)}
.day-agenda:not(.flexible-day)>.agenda-event>.calendar-resize-handle[data-calendar-resize="start"]{top:max(-3px,calc((100% - var(--event-height,102px))/2 - 22px))}
.day-agenda:not(.flexible-day)>.agenda-event>.calendar-resize-handle[data-calendar-resize="end"]{bottom:max(-3px,calc((100% - var(--event-height,102px))/2 - 22px))}
