/* Full-width entry bodies also protect completed/cancelled routines on small screens. */
.family-week { align-items: start; }
.week-entry { min-width: 0; }
.week-entry .row { display: grid; grid-template-columns: minmax(0,1fr); }
.week-entry .row > div { min-width: 0; }
.week-entry .row > button { justify-self: start; }
.week-entry-heading, .week-entry-meta { display: none; }
.week-tooltip[hidden] { display: none; }
.week-tooltip { position: fixed; z-index: 1200; width: min(320px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 14px 16px; border: 1px solid #eadde5; border-top: 3px solid var(--accent); border-radius: 12px; color: #29262a; background: #fff; box-shadow: 0 12px 36px #3e193d26,0 2px 7px #3e193d12; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.week-tooltip > strong { display: block; margin-bottom: 10px; color: var(--accent); font-size: 14px; line-height: 1.4; }
.week-tooltip dl { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 6px 10px; margin: 0; }
.week-tooltip dt { color: var(--muted); font-weight: 500; }
.week-tooltip dd { margin: 0; white-space: pre-line; }
.week-tooltip-hint { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.week-tooltip-conflict { color: #9a5c14; margin-top: 8px; }
@media(min-width:901px) {
 .family-week { grid-template-columns: repeat(7,minmax(0,1fr)); align-items: start; gap: 8px; }
 .week-day { padding: 8px; min-width: 0; }
 .week-day > h3 { margin-bottom: 8px; padding-bottom: 8px; font-size: 12px; line-height: 1.35; }
 .week-day > h3 small { font-size: 11px; margin-top: 4px; }
 .week-day > .muted { font-size: 11.5px; line-height: 1.5; margin: 8px 0; }
 .week-entry { padding: 8px; margin: 0 0 8px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; background: white; }
 .week-entry-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; font-size: 10.5px; line-height: 1.35; margin-bottom: 5px; color: var(--muted); }
 .week-entry-heading > :first-child { flex-shrink: 0; font-weight: 650; color: #4c414b; }
 .week-entry-kind { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .week-entry .row, .week-entry .daily-event { display: block; border: 0; padding: 0; margin: 0; }
 .week-entry .daily-time, .week-entry .row p, .week-entry .row .tag, .week-entry .daily-event-body > p, .week-entry .daily-event-body > .tag { display: none; }
 .week-entry .title, .week-entry .daily-event-body > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; width: 100%; min-height: 0; max-width: 100%; padding: 0; margin: 0; border: 0; border-radius: 2px; box-shadow: none; background: transparent; color: var(--text,#29262a); font-size: 12px; font-weight: 600; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
 .week-entry .title:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
 .week-entry-meta { display: block; margin-top: 5px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
 .week-entry .row > button { margin-top: 7px; padding: 3px 7px; min-height: 25px; font-size: 10.5px; }
 .week-entry .daily-event > a { display: inline-block; margin-top: 5px; font-size: 10.5px; }
 .week-entry .week-overlap { display: block; width: fit-content; max-width: 100%; margin-bottom: 5px; font-size: 10px; }
 .week-completed { border-left-color: #62917e; background: #f6faf8; }
 .week-cancelled { border-left-color: #aaa0a7; background: #f8f7f8; }
 .week-cancelled .title { text-decoration: line-through; }
 .week-day .menu-shortcut { min-height: 28px; padding: 5px 4px; margin-top: 4px; font-size: 11px; gap: 5px; }
 .week-day .menu-shortcut svg { width: 14px; height: 14px; flex-shrink: 0; }
}
@media(min-width:901px) and (pointer:coarse) {
 .week-entry .row > button, .week-day .menu-shortcut, .week-entry .title, .week-entry .daily-event > a { min-height: 44px; }
}
