.planning-display-controls { display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:12px 0;padding:12px 0;border-block:1px solid var(--line); }
.planning-display-controls .field { margin:0;min-width:150px; }
.planning-phase-legend { color:var(--text);margin-left:auto; }
.planning-phase-legend summary { cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px; }
.planning-phase-legend summary::before { content:"+";font-weight:800;color:var(--primary); }
.planning-phase-legend[open] summary::before { content:"-"; }
.planning-phase-legend > span { display:block;line-height:1.7;font-size:13px; }
.planning-phase-legend svg { width:16px;height:16px;vertical-align:middle; }
.roster-shell { container:roster / inline-size; }
.roster-content { min-width:0; }
.roster-shell button.roster-shift-chip:not(.icon-button):not(.dialog-close) { height:auto;min-height:54px;max-height:none; }
.roster-shell .roster-shift-chip { gap:3px;padding:7px 8px;border-left-width:3px; }
.roster-shell .roster-shift-heading strong { min-width:0;flex:1 1 100%; }
.roster-shell .roster-cell { gap:4px;padding:5px; }
.roster-shell .roster-timeline { grid-template-rows:repeat(var(--timeline-tracks),minmax(70px,auto)) 44px; }
.roster-shell .roster-day-minutes { font-weight:500; }
.roster-person-day { margin:10px 0;display:grid;gap:5px; }
.roster-person-day h3 { margin:0;font-size:15px;line-height:1.5; }
.roster-person-day .roster-contact-trigger { min-height:44px;display:flex;align-items:center;gap:8px; }
.roster-person-day .roster-contact-trigger svg { width:18px;height:18px; }
.absence-display-neutral { background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:6px; }
.absence-display-neutral:hover { background:var(--surface-soft); }
.absence-display-neutral .row-copy small { color:var(--muted) !important; }
.absence-calendar { container:absence / inline-size;color:var(--text); }
.absence-calendar-toolbar { display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 0;border-block:1px solid var(--line);margin-bottom:16px; }
.absence-calendar-range { display:flex;flex-wrap:wrap;align-items:end;gap:8px; }
.absence-calendar-range .field { margin:0;min-width:150px; }
.absence-calendar-weekdays,.absence-calendar-days { display:grid;grid-template-columns:repeat(7,minmax(0,1fr)); }
.absence-calendar-weekdays { gap:0;background:var(--surface-raised);border:1px solid var(--line); }
.absence-calendar-weekdays span { padding:10px 8px;font-size:14px;font-weight:700; }
.absence-calendar-days { border-left:1px solid var(--line); }
.absence-calendar-day { background:var(--surface);border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px;min-width:0;min-height:140px;display:flex;flex-direction:column;gap:6px; }
.absence-calendar-day h3,.absence-calendar-agenda h3 { margin:0 0 6px;font-size:14px;line-height:1.5; }
.absence-calendar-day.outside { background:var(--surface-soft); }
.absence-calendar-day.outside h3 { color:var(--muted);font-weight:500; }
.absence-calendar-day.today { border-top:3px solid var(--primary); }
.absence-calendar-day .calendar-event { display:grid;gap:3px;min-height:44px;--one-content-control-min-height:44px;border-radius:5px;font-size:14px;padding:7px;white-space:normal;overflow-wrap:normal; }
.absence-calendar-day .calendar-event span,.absence-calendar-day .calendar-event small { font-size:14px;line-height:1.4; }
.absence-calendar-agenda { display:none; }
.absence-calendar-agenda.custom { display:grid;gap:18px; }
.absence-calendar .icon-button:focus-visible,.absence-calendar .calendar-event:focus-visible { outline:3px solid var(--primary);outline-offset:2px; }
@container absence (max-width:1050px) {
  .absence-calendar-grid { display:none; }
  .absence-calendar-agenda { display:grid;gap:18px; }
  .absence-calendar .roster-period-nav { flex-wrap:wrap; }
}
.roster-shell .roster-absence-chip { color:var(--text);background:color-mix(in srgb,var(--service-bg) 12%,var(--surface));overflow-wrap:normal; }
.roster-shell :is(.roster-corner,.roster-column-heading,.roster-capacity-heading,.roster-capacity,.roster-summary-strip small,.roster-mobile-day-head small,.roster-legend-copy small,.roster-legend-copy strong) { font-size:14px;line-height:1.4;letter-spacing:0; }
.roster-shell .roster-summary-strip { flex-wrap:wrap; }
.roster-shell .roster-summary-strip > span { min-width:110px; }
.roster-shell .roster-capacity-heading > span,.roster-shell .roster-capacity > span { white-space:normal;overflow:visible;text-overflow:clip;word-break:normal; }
.roster-shell .roster-row-label { align-content:start; }
.roster-more { min-height:44px;width:100%;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text); }
.roster-timeline { display:grid;grid-template-columns:repeat(var(--timeline-days),minmax(0,1fr));grid-template-rows:repeat(var(--timeline-tracks),minmax(92px,auto)) 44px;min-width:0;position:relative; }
.roster-timeline .roster-timeline-day { padding:0;display:flex;align-items:end;min-height:0; }
.roster-timeline-day-link { min-height:44px;width:100%;border:0;background:var(--surface);color:var(--text); }
.roster-timeline-day-link:hover { background:var(--surface-soft); }
.roster-timeline-day-link svg { width:18px;height:18px; }
.roster-timeline-entry { z-index:1;min-width:0;align-self:start;margin:6px 4px; }
.roster-pointer-dragging .roster-timeline-entry { pointer-events:none; }
.planning-original-period p { margin:8px 0;overflow-wrap:anywhere; }
#action-confirm-message { white-space:pre-line; }
.calendar-event { white-space:normal;overflow-wrap:anywhere;min-height:32px; }
.planning-month-scroll { max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain; }
.planning-month-scroll .calendar-grid { min-width:840px; }
.planning-month-scroll .calendar-event { --one-content-control-min-height:44px;min-height:44px;height:auto;max-height:none;overflow:visible;line-height:1.4;font-size:12px;border-radius:6px; }
.planning-month-scroll .calendar-day-number { min-height:44px; }
.planning-month-scroll .calendar-day { overflow:visible; }
@media (max-width:767px),(max-height:500px) {
  .planning-layout-switch { display:none; }
  .planning-phase-legend { margin-left:0; }
  .planning-display-controls { gap:8px; }
}
@container roster (max-width:900px) {
  .roster-desktop-matrix { display:none; }
  .roster-mobile-days { display:grid;gap:12px; }
  .roster-board { grid-template-columns:minmax(0,1fr); }
  .roster-service-palette { position:static;max-height:none; }
}

/* P60: readable calendar states without replacing configured event colors. */
#workspace .panel:has(> .planning-month-scroll),
#workspace .panel:has(> .calendar-list-day),
#workspace .p60-planning-month {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#workspace .p60-planning-month { container: p60-planning / inline-size; }
#workspace .p60-calendar-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(16rem, 1fr); gap: 1.5rem; align-items: start; }
#workspace .p60-calendar-layout > * { min-width: 0; }
#workspace .p60-calendar-day-list { padding-block: 1rem; border-top: 1px solid var(--line); }
#workspace .p60-calendar-day-list .list-row { height: auto; padding: .75rem 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 1rem; }
#workspace .p60-calendar-day-list .row-copy :is(strong, small) { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
#workspace .p60-calendar-day-list .row-copy small { font-size: .875rem; line-height: 1.45; }
#workspace .p60-calendar-day-list .row-meta { max-width: 100%; }
@container p60-planning (max-width: 60rem) {
  #workspace .p60-calendar-layout { grid-template-columns: minmax(0, 1fr); }
}
#workspace .planning-display-controls .field { min-width: min(100%, 10rem); flex: 1 1 10rem; }
#workspace .planning-phase-legend { min-width: 0; max-width: 100%; }
#workspace .planning-phase-legend > span { font-size: .875rem; line-height: 1.5; }
#workspace .planning-month-scroll { padding: 4px; }
#workspace .planning-month-scroll .calendar-grid { min-width: max(840px, 49rem); }
#workspace .planning-month-scroll .calendar-day { min-width: 0; grid-template-columns: minmax(0, 1fr); }
#workspace .planning-month-scroll .absence-calendar-label { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
#workspace :is(.calendar-weekday, .calendar-day-number, .calendar-more, .calendar-list-day-heading small) { font-size: .875rem; line-height: 1.4; }
#workspace :is(.calendar-day-number, .calendar-more, .calendar-list-day-heading) {
  height: auto;
  min-height: var(--one-control-height);
  min-width: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#workspace .calendar-day-number { flex-wrap: wrap; gap: .25rem; }
#workspace .calendar-day-number b { font-size: .875rem; border-radius: 4px; }
#workspace .calendar-day { border-radius: 6px; }
#workspace .calendar-day.selected,
#workspace [data-p60-select-day][aria-pressed="true"],
#workspace [data-planning-day][aria-current="date"]:not([data-p60-select-day]),
#workspace .roster-column-heading[aria-current="date"] {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
  font-weight: 750;
}
#workspace [data-p60-select-day][aria-pressed="false"]:not(:focus-visible) { outline: none; background: transparent; }
#workspace [data-p60-select-day][aria-pressed="true"] { background: var(--surface-tint); }
#workspace .calendar-day.outside { border-style: dashed; }
#workspace .calendar-day.outside .calendar-day-number { color: var(--muted); }
#workspace .planning-month-scroll .calendar-event {
  min-width: 0;
  min-height: var(--one-control-height);
  height: auto;
  max-height: none;
  font-size: .875rem;
  line-height: 1.45;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
#workspace .calendar-event.absence { border-style: dashed; }
#workspace :is(.calendar-data-strip span, .calendar-data-label) { font-size: .875rem; line-height: 1.4; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
#workspace .calendar-list-day-heading { align-items: start; gap: .75rem; padding: .75rem; }
#workspace .calendar-list-day-heading > span { min-width: 0; overflow-wrap: anywhere; }
#workspace .roster-shell :is(.roster-legend-item, .roster-absence-chip, .roster-mobile-day-head, .roster-contact-trigger, .roster-timeline-day-link) {
  min-height: var(--one-control-height);
  height: auto;
  font-size: .875rem;
  line-height: 1.45;
}
#workspace .roster-shell :is(.roster-legend-copy strong, .roster-legend-copy small, .roster-shift-chip strong, .roster-shift-chip span, .roster-shift-chip small, .roster-mobile-day-head small, .roster-summary-strip small, .roster-day-minutes) {
  font-size: .875rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}
#workspace .roster-shell .roster-legend-item { overflow: visible; }
#workspace .roster-shell .roster-legend-copy :is(strong, small) { overflow-wrap: normal; word-break: normal; hyphens: auto; }
#workspace .roster-shell .roster-legend-item .service-mark {
  grid-column: 1 / 3;
  justify-self: start;
  width: 2rem;
  min-width: 0;
  max-width: min(100%, 2rem);
  height: auto;
  min-height: 2rem;
  max-height: none;
  padding: .25rem .375rem;
  font-size: .875rem;
  line-height: 1.4;
  overflow: visible;
  overflow-wrap: anywhere;
}
#workspace .roster-shell .roster-legend-item > svg { grid-column: 3; grid-row: 1; }
#workspace .roster-rule-row.is-disabled { opacity: 1; border-style: dashed; color: var(--muted); background: var(--surface-soft); }
#workspace .roster-shell .roster-summary-strip { display: flex; flex-wrap: wrap; }
#workspace .roster-shell .roster-summary-strip > span { flex: 1 1 7rem; min-width: 0; }
#workspace .roster-shell .roster-add { width: 44px; height: 44px; min-height: 44px; opacity: 1; }
#workspace .roster-shell .roster-add > :is(i, svg) { width: 18px; height: 18px; }
#workspace .roster-shell :is(.roster-cell.selected, .roster-legend-item[aria-pressed="true"], .roster-shift-chip[aria-selected="true"]) { outline: 3px solid var(--primary); outline-offset: -3px; }
#workspace .absence-calendar :is(.absence-calendar-weekdays span, .absence-calendar-day h3, .absence-calendar-agenda h3, .calendar-event span, .calendar-event small) { font-size: .875rem; line-height: 1.45; }
@media (forced-colors: active) {
  #workspace .calendar-day.selected,
  #workspace [data-p60-select-day][aria-pressed="true"],
  #workspace [data-planning-day][aria-current="date"]:not([data-p60-select-day]),
  #workspace .roster-column-heading[aria-current="date"] { outline-color: Highlight; }
}
@media (max-width: 767px) {
  #workspace .p60-calendar-day-list .list-row { flex-wrap: wrap; }
}
