:root {
  color-scheme: light;
  --surface-page: #fdfbf7;
  --surface-card: #fffefa;
  --surface-subtle: #f5f3ee;
  --border-subtle: #d9ddd9;
  --border-strong: #b7c0c8;
  --brand-primary: #4163a1;
  --brand-dark: #324e82;
  --brand-soft: #eef3fc;
  --brand-yellow: #f9d387;
  --brand-coral: #f49882;
  --tracking-accent-dark: #8f4346;
  --manager-pin-outline: var(--tracking-accent-dark);
  --text-primary: #24354a;
  --text-secondary: #4e5e70;
  --text-support: #667487;
  --text-helper: #5f6e7d;
  --text-caption: #637184;
  --text-placeholder: #687586;
  --text-disabled: #a3abb4;
  --text-action: #365a98;
  --text-on-strong: #ffffff;
  --status-success: #315f50;
  --status-success-soft: #eaf3ef;
  --status-warning: #8a5b1d;
  --status-warning-soft: #fff4d8;
  --status-danger: #8f4346;
  --status-danger-soft: #fbece8;
  --status-info: #365a98;
  --status-info-soft: #eef3fc;
  --daypart-morning: #2f7f82;
  --daypart-afternoon: #d19a32;
  --daypart-evening: #775aa6;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-1: 0 4px 12px rgba(36, 53, 74, .06);
  --shadow-2: 0 12px 32px rgba(36, 53, 74, .10);
  --shadow-overlay: 0 24px 64px rgba(36, 53, 74, .18);
  --focus-ring: 0 0 0 3px rgba(65, 99, 161, .24);
  --p4-module-sticky-offset: 0px;
  --p4-view-tabs-sticky-height: 51px;
  --p4-week-navigation-sticky-height: 52px;
  --p4-week-navigation-return-sticky-height: 98px;
  --p4-admin-navigation-sticky-height: 51px;
  --p4-admin-week-navigation-sticky-height: 98px;
  --p4-admin-pending-summary-sticky-height: 52px;
  --p4-week-browser-current-height: 112px;
  --p4-sticky-stack-max-height: 240px;
}

* { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--p4-module-sticky-offset) + var(--p4-sticky-stack-max-height));
  background: var(--surface-page);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  background: var(--surface-page);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", sans-serif;
  font-size: 16px;
  line-height: 24px;
}
html.sheet-open,
body.sheet-open {
  overflow: hidden;
  overscroll-behavior: none;
}
body.sheet-open {
  position: fixed;
  top: var(--sheet-lock-top, 0px);
  right: 0;
  left: 0;
  width: 100%;
}
button, select, input, summary { font: inherit; }
button, select, summary {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; }
summary { min-height: 44px; }
.hidden { display: none !important; }
#weekDateJumpStatus {
  width: 0 !important;
  height: 0 !important;
}

:where(button, select, input, textarea, summary):focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: default; }

.p4-module-outlet {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(var(--space-6), env(safe-area-inset-top)) var(--space-4) max(var(--space-8), env(safe-area-inset-bottom));
  background: var(--surface-page);
}
.topbar, .sheet-title, .session-heading, .participant-row, .identity-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.topbar { padding: 0 0 var(--space-4); }
.eyebrow {
  margin: 0 0 var(--space-1);
  color: var(--status-success);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: .08em;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: var(--space-1); font-size: 32px; font-weight: 600; line-height: 40px; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 22px; font-weight: 600; line-height: 30px; }
h3 { color: var(--text-primary); font-weight: 600; }
.date-label, .identity-strip span, .meta, .annotation, .safety-note { color: var(--text-caption); }
.date-label { margin-bottom: 0; font-size: 14px; line-height: 21px; }
.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-2);
}
.notification-button {
  position: relative;
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: var(--space-3);
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--brand-primary);
  background: transparent;
  font-weight: 600;
}
.notification-bell-wrap { position: relative; display: block; width: 24px; height: 24px; }
.notification-button svg {
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-button[data-has-unfinished-responsibility="true"] #notificationBellIcon path:first-child {
  fill: var(--brand-coral);
  stroke: var(--manager-pin-outline);
}
.notification-button[data-has-unfinished-responsibility="true"] { color: var(--manager-pin-outline); }
.notification-unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface-card);
  border-radius: 50%;
  background: var(--brand-primary);
}
.tool-button {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: var(--space-3);
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--brand-primary);
  background: transparent;
}
.tool-alert-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--surface-page);
  border-radius: var(--radius-pill);
  color: var(--text-on-strong);
  background: var(--status-warning);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}
.tool-button svg,
.operation-item-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.role-preview {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}
.role-preview > span { margin-right: auto; color: var(--text-caption); font-size: 12px; line-height: 18px; }
.role-button {
  min-height: 44px;
  padding: 10px var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
}
.role-button.active { border-color: var(--brand-primary); color: var(--text-on-strong); background: var(--brand-primary); }
.identity-strip {
  justify-content: flex-start;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.identity-strip div:last-child { display: grid; gap: var(--space-1); }
.identity-strip strong { color: var(--text-primary); font-weight: 600; }
.identity-strip span { color: var(--text-caption); font-size: 12px; line-height: 18px; }
.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--text-on-strong);
  background: var(--status-success);
  font-weight: 700;
}
.p4-sticky-navigation-anchor { display: block; height: 0; }
.view-tabs {
  position: sticky;
  z-index: 12;
  top: var(--p4-module-sticky-offset);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
}
.tab {
  min-height: 48px;
  margin-bottom: -1px;
  padding: var(--space-3) var(--space-2);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  font-size: 16px;
  font-weight: 500;
}
.tab.active { border-bottom-color: var(--brand-primary); color: var(--text-action); background: transparent; font-weight: 600; }
.tab-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: var(--space-1);
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-on-strong);
  background: var(--status-info);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
}
.admin-entry-grid {
  position: sticky;
  z-index: 13;
  top: var(--p4-module-sticky-offset);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
}
.admin-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  margin-bottom: -1px;
  padding: var(--space-3) var(--space-2);
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  font-weight: 500;
}
.admin-entry.active { border-bottom-color: var(--brand-primary); color: var(--text-action); background: transparent; font-weight: 600; }
.admin-entry strong { min-width: 20px; font-size: 12px; font-weight: 600; }
.admin-therapist-picker {
  margin: 0 0 var(--space-4);
  padding: var(--space-2) 0 0;
}
.admin-therapist-options {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 0 var(--space-4) var(--space-1) 0;
  scroll-padding-inline: var(--space-4);
  scrollbar-width: none;
}
.admin-therapist-options::-webkit-scrollbar { display: none; }
.admin-therapist-option {
  min-height: 44px;
  padding: 10px var(--space-4);
  flex: 0 0 auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-therapist-option.active {
  border-color: var(--brand-primary);
  color: var(--text-on-strong);
  background: var(--brand-primary);
}
.view-hint {
  margin: 0 0 var(--space-4);
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
}
.week-browser { margin: var(--space-4) 0 0; }
#therapistViewTabs:not(.hidden) ~ #weekBrowser:not(.hidden) {
  position: sticky;
  z-index: 11;
  top: calc(var(--p4-module-sticky-offset) + var(--p4-view-tabs-sticky-height));
  margin-top: 0;
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
}
.week-navigation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  column-gap: var(--space-3);
  row-gap: 0;
  padding: 0 var(--space-1) var(--space-2);
}
.week-navigation-button {
  position: relative;
  display: grid;
  grid-row: 1;
  width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: transparent;
  font-size: 18px;
  font-weight: 500;
}
.week-navigation-button::before {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  content: '';
}
.week-navigation-button > span { position: relative; }
.week-navigation-button:hover::before { background: var(--surface-subtle); }
#previousWeekButton { grid-column: 1; }
#nextWeekButton { grid-column: 3; }
.week-range-button {
  position: relative;
  grid-row: 1;
  grid-column: 2;
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 6px var(--space-2);
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
}
.week-range-button:hover { background: var(--surface-subtle); }
.week-range-button:focus-within {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}
.week-range-button > input[type="date"] {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  color: transparent;
  background: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.week-range-button > :not(input[type="date"]) {
  position: relative;
  z-index: 3;
  pointer-events: none;
}
.week-range-button > input[type="date"]::-webkit-date-and-time-value {
  color: transparent;
  text-align: center;
}
.week-range-button > input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.week-range-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.week-range {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.week-range-disclosure { flex: 0 0 auto; color: var(--text-caption); }
.current-week-button {
  grid-row: 2;
  grid-column: 2;
  justify-self: center;
  width: auto;
  min-height: 44px;
  padding: 10px var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.current-week-button:hover { background: var(--brand-soft); }
.admin-week-context {
  grid-row: 2;
  grid-column: 2;
  justify-self: center;
  min-width: 0;
  padding: 10px var(--space-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser .week-navigation {
  grid-template-columns: minmax(44px, 1fr) max-content minmax(44px, 1fr);
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser #nextWeekButton { justify-self: end; }
#adminEntryGrid:not(.hidden) ~ #weekBrowser .admin-week-context {
  justify-self: center;
  max-width: min(34vw, 140px);
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser .current-week-button {
  grid-column: 3;
  justify-self: start;
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser:not(.hidden) {
  position: sticky;
  z-index: 11;
  top: calc(var(--p4-module-sticky-offset) + var(--p4-admin-navigation-sticky-height));
  margin-top: 0;
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
}
.week-strip {
  position: sticky;
  z-index: 8;
  top: var(--p4-module-sticky-offset);
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  gap: var(--space-1);
  margin: 0 calc(var(--space-1) * -1) var(--space-4);
  padding: var(--space-2) var(--space-1);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
}
#therapistViewTabs:not(.hidden) ~ #weekBrowser:not(.hidden) + #weekStrip {
  top: calc(
    var(--p4-module-sticky-offset) +
    var(--p4-view-tabs-sticky-height) +
    var(--p4-week-browser-current-height)
  );
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser:not(.hidden) + #weekStrip {
  top: calc(
    var(--p4-module-sticky-offset) +
    var(--p4-admin-navigation-sticky-height) +
    var(--p4-week-browser-current-height)
  );
}
.week-day {
  display: grid;
  min-height: 72px;
  padding: var(--space-2) 2px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-caption);
  background: transparent;
}
.week-day span { font-size: 12px; line-height: 16px; }
.week-day strong { font-size: 20px; font-weight: 600; line-height: 24px; font-variant-numeric: tabular-nums; }
.week-day small { font-size: 11px; line-height: 16px; }
.week-day.active { border-color: var(--brand-primary); color: var(--text-on-strong); background: var(--brand-primary); }
.week-day.regular-closure:not(.active) { color: var(--text-caption); background: var(--surface-subtle); }
.schedule-list {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}
#therapistViewTabs:not(.hidden) ~ #weekBrowser:not(.hidden) ~ #scheduleList {
  min-height: calc(100vh - var(--p4-sticky-stack-max-height));
}
#adminEntryGrid:not(.hidden) ~ #weekBrowser:not(.hidden) ~ #scheduleList {
  min-height: calc(100vh - var(--p4-sticky-stack-max-height));
}
.admin-pending-filters {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-1) 0 var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.admin-pending-sticky-summary {
  position: sticky;
  z-index: 12;
  top: calc(var(--p4-module-sticky-offset) + var(--p4-admin-navigation-sticky-height));
  display: flex;
  min-height: var(--p4-admin-pending-summary-sticky-height);
  margin: 0 0 var(--space-3);
  padding: var(--space-1) var(--space-2);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
  font-size: 13px;
}
.admin-pending-sticky-summary strong { color: var(--text-primary); font-weight: 600; }
.admin-filter-adjust {
  min-width: 64px;
  min-height: 44px;
  padding: 8px 10px;
}
#adminPendingFilters {
  scroll-margin-top: calc(
    var(--p4-module-sticky-offset) +
    var(--p4-admin-navigation-sticky-height) +
    var(--p4-admin-pending-summary-sticky-height)
  );
}
.filter-label {
  margin: 0 0 var(--space-2);
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.filter-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
}
.filter-chip {
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
}
.filter-chip.active {
  border-color: var(--brand-primary);
  color: var(--text-on-strong);
  background: var(--brand-primary);
}
.filter-chip:disabled,
.filter-chip.empty {
  cursor: default;
  color: var(--text-disabled);
  background: var(--surface-subtle);
}
.admin-schedule-card { position: relative; }
.admin-summary-card-core { align-items: start; }
.admin-summary-content { min-width: 0; }
.admin-summary-date {
  margin: 0 0 var(--space-1);
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.admin-overview-status {
  color: var(--status-success);
  background: var(--status-success-soft);
}
.admin-overview-card[data-status="個案請假"] .admin-overview-status,
.admin-overview-card[data-status="無故未到"] .admin-overview-status,
.admin-overview-card[data-status="臨心師請假"] .admin-overview-status,
.admin-overview-card[data-status="成員出席異常"] .admin-overview-status {
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.admin-overview-card[data-status="待排"] .admin-overview-status {
  color: var(--status-info);
  background: var(--status-info-soft);
}
.admin-edit-disclosure {
  width: 100%;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.admin-edit-disclosure summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  background: var(--surface-card);
  font-weight: 600;
  list-style: none;
}
.admin-edit-disclosure summary::-webkit-details-marker { display: none; }
.admin-edit-disclosure summary::after {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-action);
  border-bottom: 2px solid var(--text-action);
  content: '';
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.admin-edit-disclosure[open] summary::after { transform: rotate(225deg); }
.admin-edit-disclosure .status-select {
  width: 100%;
  max-width: none;
  margin-top: var(--space-2);
  padding-right: 22px;
  padding-left: var(--space-2);
  font-size: 14px;
}
.session-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
}
.session-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: var(--border-strong);
}
.session-card[data-daypart="上午"]::before { background: var(--daypart-morning); }
.session-card[data-daypart="下午"]::before { background: var(--daypart-afternoon); }
.session-card[data-daypart="晚上"]::before { background: var(--daypart-evening); }
.session-card[data-special-state="true"] {
  border-color: #c8cdcf;
  background: #f1f2ef;
}
.time { min-width: 62px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.session-main { min-width: 0; flex: 1; }
.session-main h3 { margin-bottom: 4px; font-size: 18px; }
.session-title-line { display: block; }
.session-title-line h3 { margin: 0; }
.session-format-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  margin-top: 5px;
}
.format-badge {
  display: inline-flex;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--status-success);
  background: var(--status-success-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.annotation { margin: 0; font-size: 12px; }
.date-annotation { margin: var(--space-1) 0 0; color: var(--text-caption); font-size: 11px; }
.therapist-leave-note {
  display: inline-block;
  margin: 7px 0 0;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  color: var(--status-danger);
  background: var(--status-danger-soft);
  font-size: 12px;
  font-weight: 600;
}
.status-select {
  min-height: 44px;
  max-width: 116px;
  padding: 9px 28px 9px var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  font-weight: 600;
}
.status-select:disabled {
  color: var(--text-disabled);
  background: var(--surface-subtle);
  opacity: 1;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 13px 0 0 76px;
  font-size: 12px;
}
.participants {
  display: grid;
  gap: 8px;
  margin: 14px 0 0 76px;
  padding-top: 13px;
  border-top: 1px solid var(--border-subtle);
}
.participant-row { gap: 10px; }
.participant-row span { font-size: 14px; }
.participant-row select { max-width: 112px; }
.history-box {
  margin: 13px 0 0 76px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-support);
  background: var(--surface-subtle);
  font-size: 12px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 0 76px;
}
.card-action-note {
  align-self: center;
  color: var(--text-helper);
  font-size: 12px;
  line-height: 1.45;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.summary-session-card { min-height: 0; }
.summary-card-core {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 132px;
  align-items: start;
  column-gap: var(--space-2);
  row-gap: var(--space-2);
}
.summary-content-zone {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  min-width: 0;
  column-gap: var(--space-3);
}
.summary-card-identity { min-width: 0; }
.summary-card-identity h3 {
  margin: 0;
  font-size: 19px;
  line-height: 26px;
  overflow-wrap: anywhere;
}
.summary-background {
  margin-top: var(--space-1);
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  flex: 1;
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.summary-detail-zone {
  display: grid;
  min-width: 44px;
  place-items: start center;
}
.summary-state-zone {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: flex-end;
}
.summary-state-zone > .status-select {
  width: 100%;
  max-width: none;
  padding-right: 22px;
  padding-left: var(--space-2);
  font-size: 14px;
}
.summary-background span + span::before {
  margin-right: var(--space-2);
  color: var(--border-strong);
  content: '·';
}
.summary-status {
  display: inline-grid;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--text-caption);
  background: var(--surface-subtle);
  font-size: 13px;
  font-weight: 600;
}
.group-attendance-summary {
  display: grid;
  grid-template-columns: 20px auto;
  min-width: 82px;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  place-content: center;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-subtle);
}
.group-attendance-summary svg,
.card-detail-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-attendance-summary strong { font-size: 15px; font-weight: 600; white-space: nowrap; }

.group-waiting-placement-sheet { overflow-x: hidden; }
.group-waiting-placement-sheet > .sheet-copy { margin-bottom: var(--space-4); }
.group-waiting-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
}
.group-waiting-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.group-waiting-list,
.group-placement-options { display: grid; gap: var(--space-3); }
.group-waiting-episode-card,
.group-placement-option,
.group-placement-case-context {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
}
.group-waiting-episode-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: var(--space-3);
}
.group-waiting-episode-card > div,
.group-placement-option-heading { display: grid; min-width: 0; gap: var(--space-1); }
.group-waiting-episode-card span,
.group-placement-option-heading span,
.group-placement-case-context span { color: var(--text-secondary); font-size: 14px; }
.group-waiting-select,
.group-placement-submit { min-height: 44px; }
.group-waiting-back,
.group-waiting-return { min-height: 44px; margin-bottom: var(--space-2); }
.group-placement-case-context { display: flex; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.group-placement-option { display: grid; gap: var(--space-4); }
.group-placement-option-heading { overflow-wrap: anywhere; }
.group-placement-facts { display: grid; gap: var(--space-2); margin: 0; }
.group-placement-facts > div {
  display: grid;
  grid-template-columns: minmax(88px,auto) minmax(0,1fr);
  align-items: center;
  gap: var(--space-3);
}
.group-placement-facts dt { color: var(--text-secondary); }
.group-placement-facts dd { min-width: 0; margin: 0; text-align: right; overflow-wrap: anywhere; }
.group-placement-effective-date { width: min(100%,190px); min-height: 44px; }

@media (max-width: 360px) {
  .group-waiting-episode-card { grid-template-columns: 1fr; }
  .group-waiting-select { width: 100%; }
  .group-placement-facts > div { grid-template-columns: 1fr; gap: var(--space-1); }
  .group-placement-facts dd { text-align: left; }
  .group-placement-effective-date { width: 100%; }
}
.session-events,
.detail-events {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}
.summary-event-zone {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-column: 1 / -1;
  min-width: 0;
  column-gap: var(--space-3);
}
.summary-event-zone > .session-events {
  grid-column: 2;
  margin-top: 0;
}
.group-participant-exceptions span {
  color: var(--status-warning);
  background: var(--status-warning-soft);
}
.session-events span,
.detail-events span {
  display: inline-flex;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--status-warning);
  background: var(--status-warning-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.detail-events span { font-size: 14px; line-height: 20px; }
.detail-events span[data-event-type="timeChanged"] {
  color: var(--text-secondary);
  background: var(--surface-subtle);
  font-weight: 500;
}
.card-detail-button {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.card-detail-button > span { font-size: 26px; line-height: 1; }
.card-detail-button:hover { background: var(--brand-soft); }
.admin-schedule-card { position: relative; }
.admin-card-detail { flex: 0 0 44px; }
.detail-primary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-4);
}
.detail-primary > div { display: grid; min-width: 0; gap: var(--space-1); }
.detail-primary > div span { color: var(--text-caption); font-size: 12px; line-height: 18px; }
.detail-primary strong { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.detail-status {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--status-success);
  background: var(--status-success-soft);
  font-size: 12px;
  font-weight: 600;
}
.detail-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}
.detail-info-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  gap: 12px;
  background: transparent;
}
.detail-info-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  fill: none;
  stroke: var(--text-support);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-facts dd {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.detail-fact-support {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.detail-info-row.is-prominent dd { font-size: 18px; font-weight: 600; line-height: 26px; }
.detail-annotation {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.detail-annotation strong { color: var(--text-caption); font-size: 12px; }
.accounting-protection-notice {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-subtle);
}
.accounting-protection-notice strong { color: var(--text-primary); font-size: 14px; }
.accounting-protection-notice p { margin: 0; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.detail-accounting-status {
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-left: 3px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
}
.accounting-protection-notice.is-statement {
  border-color: var(--brand-primary);
  background: transparent;
}
.accounting-protection-notice.is-archived {
  border-color: var(--status-warning);
  background: transparent;
}
.new-service-facts {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.new-service-facts h3 { margin: 0; font-size: 16px; line-height: 24px; }
.new-service-facts > .form-hint { margin: 0; }
.new-service-fact-list { display: grid; gap: var(--space-3); }
.new-service-fact {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.new-service-fact legend {
  padding: 0 var(--space-1);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.new-service-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.new-service-fact-grid .field { margin: 0; }
.new-service-supplemental {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}
.new-service-parent-minutes.hidden { display: none; }
@media (max-width: 620px) {
  .new-service-fact-grid { grid-template-columns: 1fr; }
}
.accounting-impact-confirmation {
  align-items: flex-start;
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--status-warning);
  background: var(--status-warning-soft);
}
.detail-current-region {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
}
.detail-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.detail-section h3 { margin: 0 0 var(--space-3); font-size: 16px; line-height: 24px; }
.detail-attendance-section { position: relative; margin-top: var(--space-1); }
.detail-attendance-section > h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}
.detail-attendance-count { color: var(--text-caption); font-size: 13px; font-weight: 600; }
.detail-attendance-busy {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  color: var(--text-caption);
  background: var(--surface-subtle);
  font-size: 12px;
  line-height: 20px;
}
.detail-attendance-busy[hidden] { display: none; }
.detail-participant-list {
  display: grid;
  min-width: 0;
  gap: var(--space-6);
}
.detail-therapist-attendance-subsection,
.detail-member-attendance-subsection,
.detail-client-attendance-subsection {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
}
.detail-subsection-heading,
.detail-therapist-attendance-subsection > h4,
.detail-member-attendance-subsection > h4,
.detail-client-attendance-subsection > h4 {
  display: flex;
  min-width: 0;
  margin: 0;
  align-items: baseline;
  justify-content: flex-start;
  gap: var(--space-2);
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}
.detail-subsection-heading h4 { margin: 0; }
.detail-paused-result { color: var(--status-warning); }
.detail-therapist-attendance-summary {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.detail-therapist-attendance-summary > span {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  overflow-wrap: anywhere;
}
.detail-therapist-attendance-summary > span > span {
  color: var(--text-secondary);
  font-size: 13px;
}
.detail-therapist-attendance-actions {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-1);
}
.detail-therapist-attendance-actions :is(button, .detail-control-explanation) {
  min-height: 44px;
}
.therapist-attendance-list {
  display: grid;
  min-width: 0;
  gap: 0;
}
.therapist-attendance-row {
  display: grid;
  position: relative;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
  align-items: start;
  gap: var(--space-2) var(--space-3);
}
.therapist-attendance-identity-column,
.therapist-attendance-result-column {
  display: grid;
  min-width: 0;
  align-content: start;
}
.therapist-attendance-identity-column { gap: var(--space-1); }
.therapist-attendance-result-column {
  grid-column: 2;
  justify-items: stretch;
  gap: var(--space-2);
  text-align: left;
}
.therapist-attendance-identity-column > strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.therapist-substitution-current {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.therapist-attendance-row.is-readonly .detail-therapist-readonly-result {
  width: 100%;
  justify-self: stretch;
  padding-inline: var(--space-3);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
  overflow-wrap: anywhere;
}
.therapist-attendance-row > .detail-control-explanation { grid-column: 1 / -1; }
.therapist-attendance-row + .therapist-attendance-row {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}
.therapist-attendance-row + .therapist-attendance-row::before {
  position: absolute;
  top: 0;
  right: var(--space-4);
  left: var(--space-4);
  height: 1px;
  background: var(--border-subtle);
  content: '';
}
.therapist-attendance-status {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.therapist-attendance-draft,
.therapist-substitution-draft {
  display: grid;
  min-width: 0;
  grid-column: 1 / -1;
  gap: var(--space-2);
}
.therapist-substitution-draft { grid-column: 1 / -1; }
.therapist-attendance-draft > span,
.therapist-attendance-substitute-result {
  color: var(--text-secondary);
  font-size: 13px;
}
.therapist-attendance-draft-actions {
  display: grid;
  min-width: 0;
  min-height: 44px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-2);
}
.therapist-attendance-draft-actions > button,
.arrange-therapist-substitution {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  justify-self: stretch;
}
.therapist-attendance-draft-actions > button { width: 100%; }
.arrange-therapist-substitution {
  justify-content: flex-start;
  color: var(--text-action);
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
}
.therapist-substitution-draft {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.therapist-substitution-heading { font-size: 14px; line-height: 21px; }
.therapist-substitution-draft .compact-field-row { gap: var(--space-2); }
.therapist-substitution-select { min-width: 0; }
.detail-session-paused {
  margin: 0;
  padding: 0;
  color: var(--status-warning);
  font-weight: 700;
}
.detail-conditional-state {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 14px;
}
.detail-condition-label {
  border-radius: var(--radius-pill);
  padding: 2px var(--space-2);
  color: var(--status-warning);
  background: var(--status-warning-soft);
  font-size: 12px;
  font-weight: 700;
}
.detail-conditional-state .detail-action { margin-left: auto; }
.detail-condition-summary {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.detail-inline-confirmation {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: var(--space-2);
  padding-top: var(--space-2);
}
.detail-inline-confirmation > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.detail-inline-confirmation > div > button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
}
.detail-inline-confirmation .confirm-destructive {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--brand-coral);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--brand-coral);
  font-weight: 700;
}
.detail-inline-confirmation .confirm-destructive:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--brand-coral);
}
.detail-participant-row {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-3);
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.detail-participant-row.is-group {
  grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
  align-items: start;
  column-gap: var(--space-3);
}
.detail-member-attendance-subsection > .detail-participant-row + .detail-participant-row {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}
.detail-member-attendance-subsection > .detail-participant-row + .detail-participant-row::before {
  position: absolute;
  top: 0;
  right: var(--space-4);
  left: var(--space-4);
  height: 1px;
  background: var(--border-subtle);
  content: '';
}
.detail-participant-row.is-group > :is(.attendance-draft-fields, .detail-participant-feedback, .detail-action) {
  grid-column: 1 / -1;
}
.detail-participant-result-column {
  display: grid;
  min-width: 0;
  grid-column: 2;
  justify-items: stretch;
  gap: var(--space-2);
  text-align: left;
}
.detail-participant-result-column > :is(.detail-action, .participant-result, .detail-no-charge-result) {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  text-align: left;
}
.detail-participant-result-column > .detail-action {
  min-height: 44px;
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.detail-participant-row.is-group > .detail-readonly-explanation {
  grid-column: 1 / -1;
}
.detail-participant-row > * { min-width: 0; max-width: 100%; }
.detail-participant-identity { display: grid; min-width: 0; gap: var(--space-1); }
.detail-participant-identity.is-full-width { grid-column: 1 / -1; }
.detail-participant-identity strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.detail-participant-identity > span { color: var(--text-caption); font-size: 12px; line-height: 18px; }
.detail-participant-identity > .detail-no-charge-result {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.detail-participant-identity .detail-current-status {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}
.detail-participant-identity .participant-result { color: var(--status-warning); font-weight: 600; }
.detail-no-charge-result {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.detail-participant-row > label {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}
.detail-participant-row > label .detail-participant-status,
.detail-participant-status-field .detail-participant-status {
  width: 100%;
  max-width: none;
}
.detail-participant-row .detail-action { justify-self: start; }
.detail-participant-accounting,
.return-to-service-fields {
  min-width: 0;
  max-width: 100%;
}
.detail-participant-accounting {
  display: grid;
  gap: var(--space-2);
}
.attendance-draft-fields {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
}
.return-to-service-fields {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-1) 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.return-to-service-fields legend {
  padding: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.return-to-service-fields .form-hint { margin: 0; }
.return-to-service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  min-width: 0;
}
.return-to-service-grid .field { margin: 0; }
@media (max-width: 620px) {
  .return-to-service-grid { grid-template-columns: 1fr; }
}
.detail-actions > div { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.detail-attendance-reason { margin-bottom: 0; }
.detail-attendance-reason textarea { min-height: 72px; resize: vertical; }
.detail-participant-workflow,
.detail-participant-status-field {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}
.detail-inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.detail-inline-control.is-value-only { display: block; }
.detail-participant-row.is-group > :is(.detail-participant-workflow, .detail-readonly-status) {
  width: 100%;
  justify-self: end;
}
.detail-participant-status-field {
  margin-top: 0;
}
.detail-participant-next-step,
.detail-independent-action-note,
.detail-control-explanation,
.detail-control-loading {
  margin: 0;
  color: var(--text-helper);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.detail-participant-next-step {
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
}
.detail-independent-action-note {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.detail-readonly-status {
  display: grid;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 24px;
}
.detail-readonly-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2);
  min-width: 0;
}
.detail-readonly-summary > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.detail-readonly-summary > :only-child { grid-column: auto; }
.detail-readonly-value {
  display: block;
  max-width: 100%;
  padding: 0 var(--space-3);
  color: var(--text-primary);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  text-align: left;
  overflow-wrap: anywhere;
}
.detail-participant-row[data-control-state="readonly"] {
  background: transparent;
}
.detail-control-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--status-info);
}
.detail-control-loading::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--status-info);
  content: '';
}
.detail-section[aria-busy="true"] .detail-participant-status:disabled,
.detail-participant-row[data-control-state="loading"] .detail-participant-status:disabled {
  color: var(--text-support);
  border-color: var(--brand-primary);
  background: var(--brand-soft);
}
.detail-participant-feedback {
  min-height: 0;
  margin: 0;
}
.detail-participant-feedback:empty,
.field-error:empty { display: none; }
.field-error {
  margin: 0;
  color: var(--status-danger);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.detail-participant-row :is(input, select, textarea)[aria-invalid="true"],
.manager-schedule-edit-form :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--status-danger);
  box-shadow: 0 0 0 1px var(--status-danger);
  scroll-margin-block: 88px;
}
.manager-schedule-edit-form .manager-therapist-adjust[aria-invalid="true"] {
  border-color: var(--status-danger);
  color: var(--status-danger);
  box-shadow: 0 0 0 1px var(--status-danger);
}
.detail-participant-row :is(input, select, textarea)[aria-invalid="true"]:focus-visible,
.manager-schedule-edit-form :is(input, select, textarea)[aria-invalid="true"]:focus-visible {
  outline: 2px solid var(--status-danger);
  outline-offset: 1px;
  box-shadow: none;
}
.detail-participant-row .choice-row[aria-invalid="true"],
.detail-participant-row .choice-row.is-invalid,
.manager-schedule-edit-form .choice-row[aria-invalid="true"] {
  padding: var(--space-2);
  border: 1px solid var(--status-danger);
  border-radius: var(--radius-md);
  color: var(--status-danger);
  background: var(--status-danger-soft);
  scroll-margin-block: 88px;
}
.schedule-detail-feedback { margin: 0 0 var(--space-3); }
.schedule-detail-feedback:empty { display: none; }
.manager-schedule-duration-hint { margin-top: calc(var(--space-2) * -1); }
.manager-schedule-duration-hint:empty { display: none; }
.manager-schedule-edit-form {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
}
.manager-schedule-section {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.detail-editor-trigger {
  display: inline-flex;
  min-height: 44px;
  margin-left: auto;
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  align-items: center;
  gap: var(--space-2);
  color: var(--text-action);
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.detail-editor-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.manager-editor-heading { margin: 0; font-size: 18px; line-height: 26px; }
.manager-editor-heading:focus {
  outline: 0;
  box-shadow: none;
}
.manager-schedule-fields { display: grid; min-width: 0; gap: var(--space-3); }
.manager-schedule-time-grid { display: grid; min-width: 0; gap: var(--space-2); }
.compact-field-row {
  grid-template-columns: minmax(84px, 1fr) minmax(112px, 190px);
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}
.compact-field-row > :is(input, select) { justify-self: end; }
.compact-field-row > .field-error { grid-column: 2; }
.compact-space-row > select { width: min(120px, 100%); }
.manager-therapist-summary {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.manager-therapist-summary > span { min-width: 0; overflow-wrap: anywhere; }
.manager-therapist-adjust {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-1);
  padding-right: var(--space-1);
}
.manager-therapist-adjust svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}
.manager-therapist-adjust[aria-expanded="true"] svg { transform: rotate(180deg); }
.protected-attendance-editor {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
}
.protected-attendance-editor > h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}
.protected-attendance-fields {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}
.protected-therapist-attendance-fields {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}
.protected-therapist-attendance-fields legend,
.protected-attendance-fields legend {
  width: 100%;
  margin: 0 0 var(--space-1);
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}
.protected-therapist-attendance-field {
  display: grid;
  position: relative;
  min-width: 0;
  grid-template-columns: minmax(52px, 1fr) minmax(112px, 132px);
  align-items: center;
  gap: var(--space-2);
}
.protected-therapist-attendance-field + .protected-therapist-attendance-field,
.protected-attendance-field + .protected-attendance-field {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}
.protected-therapist-attendance-field + .protected-therapist-attendance-field::before,
.protected-attendance-field + .protected-attendance-field::before {
  position: absolute;
  top: 0;
  right: var(--space-4);
  left: var(--space-4);
  height: 1px;
  background: var(--border-subtle);
  content: '';
}
.protected-therapist-attendance-field > select {
  min-width: 0;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.protected-therapist-substitute-field { grid-column: 1 / -1; }
.protected-attendance-field {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.protected-attendance-field > select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.protected-therapist-attendance-field > strong,
.protected-attendance-field > strong {
  min-width: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.protected-single-attendee-choice-field {
  display: grid;
  grid-column: 1 / -1;
  gap: var(--space-1);
}
.accounting-correction-warning {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--status-warning);
  background: var(--status-warning-soft);
}
.accounting-correction-warning p { margin: var(--space-1) 0 0; }
.accounting-correction-warning .accounting-impact-confirmation {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid color-mix(in srgb, var(--status-warning) 24%, transparent);
  border-radius: 0;
  background: transparent;
}
.detail-note {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.detail-note-reading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.detail-note-reading > div { min-width: 0; }
.detail-note-reading strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}
.detail-note-edit {
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}
.detail-note-reading p {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.detail-note-form { display: grid; min-width: 0; gap: var(--space-2); }
.detail-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}
.detail-note-actions button { min-height: 44px; }
.detail-form-purpose {
  margin: var(--space-3) 0 0;
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
}
.detail-form-actions { padding-top: var(--space-2); border: 0; }
.attendance-save-actions,
.group-attendance-save-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.attendance-save-actions > button,
.group-attendance-save-actions > button { width: 100%; min-height: 48px; }
.manager-schedule-edit-form > .detail-form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.manager-schedule-edit-form > .detail-form-actions > button { width: 100%; min-width: 0; min-height: 48px; }
.manager-schedule-edit-form textarea { resize: vertical; }
.manager-therapist-fieldset {
  min-width: 0;
  margin: var(--space-4) 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}
.manager-therapist-fieldset legend {
  padding: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.manager-therapist-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.manager-therapist-options .choice-row {
  margin: 0;
  padding: var(--space-1) 0;
  border-radius: 0;
  background: transparent;
}
.manager-therapist-options .choice-row span { overflow-wrap: anywhere; }
.modification-history-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.modification-history {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.modification-history > h3 {
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}
.modification-history-item {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.modification-history-item + .modification-history-item {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
}
.modification-history-item + .modification-history-item::before {
  position: absolute;
  top: 0;
  right: var(--space-4);
  left: var(--space-4);
  height: 1px;
  background: var(--border-subtle);
  content: '';
}
.modification-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.modification-history-heading > div { display: grid; min-width: 0; gap: 2px; }
.modification-history-heading strong,
.modification-history-heading span { overflow-wrap: anywhere; }
.modification-history-heading strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.modification-history-heading span,
.modification-history-heading time,
.modification-history-actor {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.modification-history-heading time { flex: 0 0 auto; }
.modification-history-actor { margin: var(--space-2) 0; overflow-wrap: anywhere; }
.modification-history-changes { display: grid; gap: var(--space-2); margin: var(--space-3) 0 0; }
.modification-history-changes > div { display: grid; min-width: 0; gap: var(--space-1); }
.modification-history-changes dt {
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}
.modification-history-changes dd {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-wrap: wrap;
  gap: var(--space-1);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.modification-history-changes dd :is(span, strong) { max-width: 100%; overflow-wrap: anywhere; }
.modification-history-changes dd strong { color: var(--text-primary); font-weight: 600; }
.modification-history-reason {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.modification-history-reason strong { color: var(--text-caption); font-size: 12px; }
.modification-history-ids { margin-top: var(--space-3); color: var(--text-caption); font-size: 12px; }
.modification-history-ids summary { min-height: 44px; padding: var(--space-2) 0; cursor: pointer; color: var(--text-action); }
.modification-history-ids span { display: block; margin-top: var(--space-1); overflow-wrap: anywhere; }
.modification-history-empty { margin: 0; color: var(--text-helper); font-size: 14px; line-height: 21px; }
.report-data-issue-actions { display: grid; gap: var(--space-2); margin-top: var(--space-6); }
.group-accounting-issue-prompt {
  margin: 0;
  color: var(--text-helper);
  font-size: 12px;
  line-height: 18px;
}
.report-data-issue-button { width: 100%; }
.data-issue-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.data-issue-heading > div { display: grid; gap: var(--space-1); }
.data-issue-heading strong { font-size: 16px; }
.data-issue-heading span { color: var(--text-caption); font-size: 12px; line-height: 18px; }
.empty-state {
  padding: var(--space-8) var(--space-4);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-support);
  background: var(--surface-card);
  text-align: center;
}
.schedule-list[aria-busy="true"] { cursor: progress; opacity: .72; }
.session-card:hover,
.admin-schedule-card:hover { border-color: var(--border-strong); }
.summary-session-card:hover { border-color: var(--border-subtle); }
.sheet {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 760px);
  max-height: 88vh;
  margin: auto;
  padding: var(--space-3) var(--space-6) max(var(--space-6), env(safe-area-inset-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface-card);
  box-shadow: var(--shadow-overlay);
}
.group-management-sheet {
  z-index: 90;
  top: 0;
  width: min(100%, 760px);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0 var(--space-4) max(var(--space-8), env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: var(--surface-page);
  box-shadow: none;
  scroll-padding-top: 60px;
  isolation: isolate;
  overflow-x: hidden;
}
.group-management-local-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  gap: 0;
  padding-top: max(var(--space-2), env(safe-area-inset-top));
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-page);
}
.group-management-local-header.is-list-view {
  grid-template-columns: minmax(0, 1fr) repeat(3, 44px);
  align-items: center;
  column-gap: var(--space-1);
}
.group-management-local-header.is-list-view .group-management-header-actions {
  display: contents;
}
.group-management-local-header.is-list-view .group-management-title-row {
  grid-row: 1;
  grid-column: 1 / 3;
}
.group-management-local-header.is-list-view.is-searching .group-management-title-row {
  grid-column: 1 / 4;
}
.group-management-local-header.is-list-view .group-management-add {
  grid-row: 1;
  grid-column: 3;
}
.group-management-local-header.is-list-view.is-searching .group-management-add {
  display: none;
}
.group-management-local-header.is-list-view .group-management-close {
  grid-row: 1;
  grid-column: 4;
}
.group-management-header-actions {
  position: relative;
  display: flex;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 0;
}
.group-management-title-row {
  display: grid;
  grid-row: 2;
  min-width: 0;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-1);
}
.group-management-title-row.is-searchable {
  grid-template-columns: minmax(0, 1fr) 44px;
}
.group-management-title-row.is-searching {
  grid-template-columns: minmax(0, 1fr);
}
.group-management-local-header h2 {
  min-width: 0;
  margin: 0;
  padding: var(--space-1) 0 var(--space-3);
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 600;
  line-height: 30px;
}
.group-management-local-header.is-list-view h2 {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0;
}
.group-management-search-toggle {
  grid-column: 2;
  justify-self: end;
}
.group-management-search-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-management-header-search {
  display: grid;
  min-width: 0;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0 var(--space-3);
}
.group-management-header-search .group-search-field,
.group-management-header-search input { min-width: 0; max-width: 100%; }
.group-management-search-cancel {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-2);
  white-space: nowrap;
}
.group-management-local-header .group-management-back {
  grid-column: 1;
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-self: start;
  gap: 0;
  margin: 0;
  margin-right: auto;
  padding: 0;
}
.group-management-back-glyph { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.group-management-back-label { min-width: 0; overflow-wrap: anywhere; }
.quiet-icon-button {
  display: grid;
  width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
  font-size: 28px;
  line-height: 1;
}
.quiet-icon-button:hover { background: var(--brand-soft); }
.group-management-add { grid-column: 2; }
.group-management-detail-action {
  display: grid;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--text-action);
  background: transparent;
}
.group-management-detail-action svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-management-more svg circle { fill: currentColor; stroke: none; }
.group-management-more-menu {
  position: absolute;
  z-index: 4;
  top: 44px;
  right: 44px;
  min-width: min(240px, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-overlay);
}
.group-management-more-menu button {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--status-danger);
  background: transparent;
  text-align: left;
}
.group-management-close {
  position: static;
  grid-column: 3;
  display: grid;
  width: 44px;
  min-height: 44px;
  justify-self: end;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  background: transparent;
}
.group-management-close svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-management-controls {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) 0 var(--space-3);
}
.group-search-label,
.group-therapist-filter {
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
}
.group-search-field { position: relative; }
.group-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: var(--space-3);
  width: 20px;
  height: 20px;
  color: var(--text-helper);
  transform: translateY(-50%);
  pointer-events: none;
}
.group-search-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-search-field input,
.group-rule-form input:not([type="checkbox"]):not([type="radio"]),
.group-rule-form select,
.group-therapist-filter select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  font-size: 16px;
}
.group-search-field input { min-height: 44px; padding: var(--space-2) 48px var(--space-2) 42px; }
#groupManagementPanel .group-rule-form :is(input, select, textarea)[aria-invalid="true"] {
  border-color: var(--status-danger);
  box-shadow: 0 0 0 1px var(--status-danger);
  scroll-margin-block: 88px;
}
#groupManagementPanel .group-rule-form :is(input, select, textarea)[aria-invalid="true"]:focus-visible {
  outline: 2px solid var(--status-danger);
  outline-offset: 1px;
  box-shadow: none;
}
.group-search-field button {
  position: absolute;
  top: 2px;
  right: 0;
  width: 44px;
  min-height: 44px;
  border: 0;
  color: var(--text-action);
  background: transparent;
  font-size: 22px;
}
.group-search-field button:disabled { color: var(--text-disabled); }
.group-search-field button.hidden { display: none; }
.group-weekday-filters {
  display: flex;
  gap: var(--space-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.group-weekday-filters::-webkit-scrollbar { display: none; }
.group-weekday-filters button {
  flex: 1 0 44px;
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}
.group-weekday-filters button[aria-pressed="true"] {
  border-bottom-color: var(--brand-primary);
  color: var(--text-action);
}
.group-weekday-filters button:disabled { color: var(--text-disabled); }
.group-therapist-options {
  margin: 0;
  padding-right: 0;
}
.group-therapist-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-3); }
.group-filter-sticky {
  position: sticky;
  z-index: 2;
  top: var(--group-management-header-height, 88px);
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: rgba(253, 251, 247, .96);
  backdrop-filter: blur(12px);
  font-size: 14px;
}
.group-filter-sticky:not(.is-active) { position: static; }
.group-filter-sticky span { min-width: 0; overflow-wrap: anywhere; }
.group-filter-sticky .quiet-button { flex: 0 0 auto; padding-right: var(--space-2); padding-left: var(--space-2); }
.group-weekday-heading {
  margin: var(--space-6) 0 var(--space-2);
  color: var(--text-caption);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.group-management-rows { border-top: 1px solid var(--border-subtle); }
.group-management-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 24px;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0 var(--space-3) var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  background: transparent;
  text-align: left;
}
.group-management-row[data-daypart]::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: var(--border-strong);
}
.group-management-row[data-daypart="上午"]::before { background: var(--daypart-morning); }
.group-management-row[data-daypart="下午"]::before { background: var(--daypart-afternoon); }
.group-management-row[data-daypart="晚上"]::before { background: var(--daypart-evening); }
.group-management-row:hover,
.group-management-row:active { background: var(--surface-subtle); }
.group-management-row-time { align-self: start; padding-top: var(--space-1); font-variant-numeric: tabular-nums; font-weight: 600; }
.group-management-row-main { display: grid; min-width: 0; gap: var(--space-1); }
.group-management-row-main strong,
.group-management-row-main span,
.group-management-row-main small { overflow-wrap: anywhere; }
.group-management-row-main strong { font-size: 17px; line-height: 24px; }
.group-management-row-main span { color: var(--text-secondary); font-size: 14px; line-height: 21px; }
.group-management-row-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}
.group-management-meta-item { display: inline-flex; min-width: 0; align-items: center; gap: 3px; }
.group-management-meta-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: var(--text-helper);
}
.group-management-meta-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.group-management-meta-separator { color: var(--border-strong); }
.group-management-row-main small { color: var(--status-info); font-size: 12px; line-height: 18px; }
.group-management-chevron { color: var(--text-action); font-size: 28px; }
.group-history-entry { display: flex; width: 100%; margin-top: var(--space-8); justify-content: space-between; }
.group-detail-section { padding: var(--space-6) 0; border-bottom: 1px solid var(--border-subtle); }
.group-detail-context-anchor { block-size: 1px; }
.group-detail-sticky-context {
  position: sticky;
  z-index: 2;
  top: 88px;
  display: grid;
  gap: 2px;
  margin: 0 calc(0px - var(--space-4));
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-page);
}
.group-detail-sticky-context strong { overflow-wrap: anywhere; }
.group-detail-sticky-context span { color: var(--text-helper); font-size: 13px; line-height: 19px; }
.group-detail-section h3,
.group-detail-heading h3 { margin: 0 0 var(--space-3); font-size: 17px; line-height: 24px; }
.group-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.group-detail-facts { display: grid; gap: var(--space-3); margin: 0; }
.group-detail-facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-3); }
.group-detail-facts dt { color: var(--text-caption); }
.group-detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.group-member-list { margin: 0; padding: 0; list-style: none; }
.group-member-list li { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
.group-member-status { flex: 0 1 auto; }
.group-preview-actions { display: grid; gap: var(--space-3); padding: var(--space-6) 0; }
.group-detail-join-workspace { display: grid; gap: var(--space-3); padding-top: var(--space-4); }
.group-detail-join-workspace > h4 { margin: 0; font-size: 16px; }
.group-detail-candidate-list { display: grid; gap: var(--space-2); }
.group-detail-placement-preview {
  display: grid;
  gap: var(--space-3);
  padding: 0 var(--space-3) var(--space-3) 42px;
}
.group-detail-placement-preview label { display: grid; min-width: 0; gap: var(--space-2); }
.group-detail-placement-preview input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: 0;
}
.group-detail-placement-unavailable {
  margin: 0;
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
}
.group-history-detail { margin: var(--space-4) 0; }
.group-history-detail summary { display: flex; align-items: center; cursor: pointer; color: var(--text-action); }
.group-rule-form { display: grid; gap: var(--space-4); padding: var(--space-6) 0; }
.group-rule-form label { display: grid; gap: var(--space-2); color: var(--text-secondary); }
.group-rule-form label > small,
.group-rule-derived { color: var(--text-helper); font-size: 14px; line-height: 21px; }
.group-rule-derived { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0; }
.group-rule-derived output { color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 600; }
.group-rule-form input[type="date"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-min-logical-width: 0;
}
#groupManagementPanel .group-rule-form input[type="date"] {
  box-sizing: border-box;
  padding-inline: 0;
}
.group-rule-form input[type="date"]::-webkit-date-and-time-value {
  min-inline-size: 0;
  text-align: left;
}
.group-effective-mode {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr));
  gap: var(--space-2);
}
.group-effective-mode > span { grid-column: 1 / -1; color: var(--text-secondary); }
.group-effective-mode label {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
}
.group-effective-mode label:has(input:checked) {
  border-color: var(--brand-primary);
  color: var(--text-action);
  background: var(--brand-soft);
}
.group-effective-mode input[type="radio"] {
  box-sizing: border-box;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand-primary);
}
.group-field-heading { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.group-field-heading output,
.group-code-format { color: var(--text-helper); font-size: 14px; font-weight: 400; line-height: 21px; }
.group-time-fields {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5em), 1fr));
  gap: var(--space-3);
}
.group-time-fields > label { min-width: 0; max-width: 100%; align-content: start; }
@media (max-width: 360px) {
  .group-effective-mode {
    grid-template-columns: minmax(0, 1fr);
  }
}
.form-helper { margin: 0; color: var(--text-helper); font-size: 14px; line-height: 21px; }
.group-preview { padding: var(--space-6) 0; }
.group-preview h3 { margin-top: 0; }
.success-state { padding: var(--space-3); color: var(--status-success); background: var(--status-success-soft); }
.sheet :is(form, fieldset, label, section, .form-grid, .detail-current-region,
  .detail-participant-row, .detail-participant-workflow, .manager-schedule-fields,
  .manager-schedule-time-grid, .manager-therapist-fieldset, .sheet-actions) {
  min-width: 0;
  max-width: 100%;
}
.sheet :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
}
#notificationPanel {
  --notification-snackbar-inset: max(var(--space-6), env(safe-area-inset-bottom));
  height: 88vh;
}
#notificationPanel[data-notification-snackbar-visible="true"] {
  padding-bottom: var(--notification-snackbar-inset);
  scroll-padding-bottom: var(--notification-snackbar-inset);
}
#notificationPanel > .sheet-title { z-index: 3; }
#notificationPanel > .sheet-title > h2 { min-width: 0; }
.notification-title-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-1);
}
.notification-announcement-toggle {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.notification-announcement-toggle:hover { background: var(--brand-soft); }
.notification-announcement-toggle[data-needs-publication="true"] {
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.notification-announcement-toggle svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: scaleX(-1);
  transform-origin: center;
}
.sheet-title {
  position: sticky;
  z-index: 1;
  top: calc(var(--space-3) * -1);
  align-items: flex-start;
  padding: var(--space-3) 0 var(--space-2);
  background: var(--surface-card);
}
.sheet-title > div { min-width: 0; }
.sheet-title h2 { overflow-wrap: anywhere; }
#scheduleDetailPanel > .sheet-title {
  z-index: 4;
  min-height: 76px;
  padding-top: var(--space-3);
  isolation: isolate;
  transition: min-height .16s ease, border-color .16s ease;
}
#scheduleDetailPanel.is-compact-header > .sheet-title::after {
  position: absolute;
  right: 0;
  bottom: calc(var(--space-4) * -1);
  left: 0;
  height: var(--space-4);
  background: var(--surface-card);
  content: '';
  pointer-events: none;
}
#scheduleDetailPanel > .sheet-title .eyebrow {
  margin-bottom: 2px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  letter-spacing: 0;
}
#scheduleDetailPanel > .sheet-title h2 {
  color: var(--text-primary);
  font-size: clamp(24px, 7vw, 28px);
  font-weight: 700;
  line-height: 34px;
}
#scheduleDetailPanel.is-compact-header > .sheet-title {
  min-height: 56px;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}
#scheduleDetailPanel.is-compact-header > .sheet-title > div { flex: 1 1 auto; overflow: hidden; }
#scheduleDetailPanel.is-compact-header > .sheet-title .eyebrow { display: none; }
#scheduleDetailPanel.is-compact-header > .sheet-title h2 {
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-close-button,
.notification-secondary-compact-close {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.treatment-panel-close {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.detail-close-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.detail-close-button svg {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.detail-close-button:focus:not(:focus-visible) {
  outline: 0;
  box-shadow: none;
}
html:not([data-input-mode="keyboard"]) .detail-close-button:focus-visible {
  outline: 0;
  box-shadow: none;
}
.detail-close-button:hover:not(:disabled) { background: var(--brand-soft); }
.data-issue-close-button {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex: 0 0 44px;
  padding: 10px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.notification-close-button svg,
.notification-secondary-compact-close svg,
.data-issue-close-button svg,
.detail-close-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.treatment-panel-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.treatment-panel-close:hover:not(:disabled) { background: var(--brand-soft); }
.treatment-panel-close:active:not(:disabled) { background: var(--surface-subtle); }
.data-issue-close-button:hover:not(:disabled) { background: var(--brand-soft); }
.data-issue-close-button:active:not(:disabled) { background: var(--surface-subtle); }
.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}

.treatment-transition-sheet,
.waiting-case-action-sheet { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.transition-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.transition-search-form .secondary-button { min-height: 44px; }
.treatment-transition-sheet,
.waiting-case-action-sheet,
.treatment-schedule-query-sheet {
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  scroll-padding-block: 88px max(28px,env(safe-area-inset-bottom));
}
.treatment-transition-sheet > .sheet-handle,
.waiting-case-action-sheet > .sheet-handle,
.treatment-schedule-query-sheet > .sheet-handle { display: none; }
.treatment-transition-sheet > .sheet-title,
.waiting-case-action-sheet > .sheet-title,
.treatment-schedule-query-sheet > .sheet-title {
  padding-top: var(--space-2);
  padding-bottom: var(--space-1);
}
.treatment-panel-header { align-items: flex-start; }
.treatment-panel-header > div {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
}
.treatment-transition-waiting-origin {
  position: sticky;
  top: 0;
  display: grid;
  min-width: 0;
  gap: 2px;
  margin-top: var(--space-2);
  padding-top: var(--space-1);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-card);
}
.quiet-button.treatment-transition-waiting-back {
  min-height: 44px;
  justify-self: start;
  margin-left: -4px;
  padding: 8px 4px;
  color: var(--text-action);
}
#treatmentTransitionWaitingBack { margin-left: -4px; }
.treatment-transition-waiting-origin .eyebrow {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: 0;
}
.treatment-transition-waiting-origin .transition-source-context {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.treatment-transition-sheet .treatment-panel-subtitle,
.treatment-schedule-query-sheet .treatment-panel-subtitle {
  margin: 0;
  color: var(--text-helper);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: 0;
}
.case-search-control { position: relative; display: block; }
.case-search-control input {
  width: 100%; min-height: 54px; padding-inline-end: 48px; font-size: 17px;
}
.case-search-clear {
  position: absolute; top: 50%; right: 2px; width: 44px; height: 44px;
  padding: 0; border: 0; color: var(--text-support); background: transparent;
  transform: translateY(-50%); font-size: 25px; line-height: 1;
}
.case-search-results { display: grid; gap: 10px; margin-top: 12px; }
.case-search-card {
  display: grid; gap: 5px; width: 100%; min-height: 44px; padding: 14px;
  border: 1px solid var(--border-subtle); border-radius: 14px;
  color: var(--text-primary); background: var(--surface-card); text-align: left;
}
.case-search-card strong { font-size: 18px; }
.case-search-card span { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 8px; }
.case-search-card b { color: var(--text-caption); font-size: 13px; font-weight: 600; }
.case-search-card:hover,
.case-search-card:focus-visible { border-color: var(--brand-primary); }
.case-search-more { width: 100%; margin-top: 12px; }
.quiet-button.case-detail-back {
  min-height: 44px;
  justify-self: start;
  padding: 9px 0;
}
.transition-workspace { display: grid; gap: var(--space-2); margin-top: 0; }
.treatment-transition-sheet .case-detail-back,
.treatment-schedule-query-sheet .case-detail-back { margin-block: 0; }
.treatment-transition-sheet .case-detail-back,
.treatment-schedule-query-sheet .case-detail-back {
  margin-left: -4px;
  padding-right: 4px;
  padding-left: 4px;
}
#treatmentTransitionOccurrences {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 52px;
  pointer-events: auto;
  touch-action: auto;
  -webkit-appearance: menulist;
  appearance: auto;
}
.transition-summary,
.transition-original-request {
  padding: 14px; border-radius: 14px; background: var(--surface-soft, #f5f7fb);
}
.transition-summary h3,
.transition-original-request h3 { margin: 0 0 8px; font-size: 16px; }
.transition-summary p,
.transition-original-request p { margin: 4px 0; }
.case-context-card {
  display: grid;
  gap: var(--space-2);
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-soft, #f5f7fb);
}
.case-context-card > :is(h3, strong),
.case-context-id {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
.transition-targets { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.transition-targets legend,
.transition-waiting-fields legend,
#treatmentTransitionOccurrenceSection legend,
#treatmentTransitionDisposition legend { margin-bottom: 8px; font-weight: 700; }
.transition-targets label {
  display: grid; place-items: center; min-height: 50px; padding: 8px;
  border: 1px solid var(--border-subtle, #d7dce5); border-radius: 12px; text-align: center;
}
.transition-targets label:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-soft, #eaf2ff); }
.transition-targets input { position: absolute; opacity: 0; pointer-events: none; }
.transition-availability-grid { display: grid; gap: 8px; }
.transition-occurrence-list label {
  display: flex; gap: 9px; align-items: flex-start; min-height: 44px; padding: 10px;
  border: 1px solid var(--border-subtle, #d7dce5); border-radius: 12px;
}
.transition-occurrence-list { display: grid; gap: 8px; }
.transition-occurrence-list label:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-soft, #eaf2ff); }
.transition-occurrence-list small { display: block; color: var(--text-caption); margin-top: 2px; }
.transition-original-request { border-left: 4px solid var(--brand-primary); }
.transition-original-request .original-request-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.transition-original-request-actions { margin-top: 10px; }
.transition-request-differences {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--status-warning);
  background: var(--status-warning-soft);
}
.transition-request-differences > strong,
.transition-request-differences p { margin: 0; }
.transition-request-differences p { display: grid; gap: 2px; }
.transition-request-differences small { color: var(--text-secondary); }
.required-mark { color: var(--state-error, #a83a32); font-size: 13px; font-weight: 700; }
.transition-workspace :is(fieldset, input, textarea)[aria-invalid="true"] {
  border-color: var(--state-error, #a83a32);
  background: #fff8f7;
}
.treatment-transition-sheet input[type="date"] {
  display: block;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  padding-inline: 12px 42px;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
#treatmentTransitionClosureDateField { width: 100%; max-width: 100%; overflow: hidden; }
#treatmentTransitionClosureDate::-webkit-date-and-time-value {
  width: 100%;
  min-width: 0;
  text-align: left;
}
#treatmentTransitionClosureDate::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  margin: 0;
}
.transition-confirmation,
.transition-reply { display: grid; gap: 16px; margin-top: 12px; }
.transition-confirmation h3 { margin: 0; }
.transition-confirmation-summary { display: grid; gap: 8px; }
.transition-confirmation-summary p { margin: 0; }
.app-snackbar {
  position: fixed; z-index: 60; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px; max-width: 560px; margin: auto; padding: 12px 16px; border-radius: 12px;
  color: #fff; background: var(--brand-primary); box-shadow: var(--shadow-overlay); text-align: center;
}
.app-snackbar:empty { display: none; }
@media (max-width: 390px) {
  .transition-targets { grid-template-columns: 1fr; }
  .transition-search-form { grid-template-columns: 1fr; }
  .case-search-card span { grid-template-columns: 76px minmax(0,1fr); }
}
.sheet-copy {
  margin: var(--space-3) 0 var(--space-4);
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.sheet-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.waiting-placement-section {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
.waiting-placement-section > h3 { margin: 0; }
.waiting-placement-section.is-held-mode {
  margin-top: var(--space-4);
  padding-top: 0;
  border-top: 0;
}
.waiting-held-workspace { display: grid; gap: var(--space-3); }
.waiting-case-search { margin-top: var(--space-4); }
.waiting-case-search-control {
  position: relative;
  display: block;
}
.waiting-case-search-control input { padding-right: 52px; }
.waiting-case-search-clear {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.waiting-case-search-clear:hover { background: var(--brand-soft); }
.waiting-case-search-clear svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.waiting-candidate-picker {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  margin: var(--space-5) 0 0;
  padding: 0;
  border: 0;
}
.waiting-candidate-group { display: grid; gap: var(--space-2); }
.waiting-candidate-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.waiting-candidate-group-title h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
}
.waiting-candidate-group-title > span {
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-helper);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.waiting-candidate-list { display: grid; gap: var(--space-2); }
.waiting-candidate-card {
  min-height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  overflow: hidden;
}
.waiting-candidate-card:hover { border-color: var(--brand-primary); }
.waiting-candidate-card.is-selected {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 18%, transparent);
}
.waiting-candidate-card.is-held-locked .waiting-candidate-summary {
  grid-template-columns: minmax(0, 1fr);
}
.waiting-candidate-card.is-held-locked:hover { border-color: var(--border-subtle); }
.waiting-candidate-card.is-held-locked .waiting-candidate-detail {
  padding-left: var(--space-3);
}
.waiting-candidate-summary {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  width: 100%;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-3);
  color: inherit;
  background: transparent;
  text-align: left;
}
.waiting-candidate-select-hit {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.waiting-candidate-select-hit:focus-visible {
  outline: 0;
  box-shadow: inset var(--focus-ring);
}
.waiting-candidate-selection {
  position: relative;
  z-index: 2;
  pointer-events: none;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  align-self: start;
  justify-self: start;
  border: 2px solid var(--border-strong, var(--text-caption));
  border-radius: 50%;
  background: var(--surface-card);
  box-shadow: inset 0 0 0 4px var(--surface-card);
}
.waiting-candidate-card.is-selected .waiting-candidate-selection {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  box-shadow: none;
}
.waiting-candidate-card.is-selected .waiting-candidate-selection::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--surface-card);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.waiting-candidate-main {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
  min-width: 0;
  pointer-events: none;
}
.waiting-candidate-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.waiting-candidate-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}
.waiting-candidate-case {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
}
.waiting-case-copy,
.waiting-availability-edit {
  display: none;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 11px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
  pointer-events: auto;
}
.waiting-candidate-card.is-selected .waiting-case-copy,
.waiting-availability-edit { display: inline-grid; }
.waiting-case-copy:hover,
.waiting-availability-edit:hover { background: var(--brand-soft); }
.waiting-case-copy svg,
.waiting-availability-edit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.waiting-candidate-heading-actions {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: var(--space-1);
}
.waiting-candidate-chevron {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-action);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}
.waiting-candidate-card.is-selected .waiting-candidate-chevron { transform: rotate(180deg); }
.waiting-stage-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
}
.waiting-candidate-facts,
.waiting-candidate-availability,
.waiting-candidate-reasons {
  color: var(--text-helper);
  font-size: 13px;
  line-height: 19px;
  overflow-wrap: anywhere;
}
.waiting-candidate-availability b,
.waiting-candidate-reasons b { margin-right: 6px; color: var(--text-primary); }
.waiting-tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  vertical-align: middle;
}
.waiting-tag {
  display: inline-flex;
  min-height: 24px;
  padding: 2px 8px;
  align-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.waiting-tag-list.is-availability .waiting-tag {
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.waiting-tag-list.is-reason .waiting-tag {
  color: var(--text-helper);
  background: var(--surface-muted, var(--surface-subtle));
}
.waiting-tag-empty { color: var(--text-caption); }
.waiting-candidate-reasons { display: block; }
.waiting-candidate-detail {
  display: grid;
  gap: var(--space-2);
  padding: 0 var(--space-3) var(--space-3) calc(22px + 2 * var(--space-3));
}
.waiting-candidate-detail::before {
  content: '';
  height: 1px;
  background: var(--border-subtle);
}
.waiting-candidate-availability-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.waiting-candidate-availability-note > div { min-width: 0; }
.waiting-candidate-availability-note > div strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 20px;
}
.waiting-candidate-availability-note > div span {
  display: block;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.waiting-candidate-availability-note > div span.is-empty { color: var(--text-caption); }
.waiting-availability-edit { margin: -10px 0; }
.waiting-availability-form {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.waiting-availability-options {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.waiting-availability-options legend {
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.waiting-availability-day {
  display: grid;
  grid-template-columns: 40px repeat(3,minmax(0,1fr));
  align-items: center;
  gap: 5px;
}
.waiting-availability-day > span {
  color: var(--text-helper);
  font-size: 13px;
  font-weight: 600;
}
.waiting-availability-day label {
  position: relative;
  min-width: 0;
}
.waiting-availability-day input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}
.waiting-availability-day label > span {
  display: grid;
  min-height: 44px;
  padding: 6px 4px;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-helper);
  background: var(--surface-card);
  font-size: 13px;
  font-weight: 600;
}
.waiting-availability-day input:checked + span {
  border-color: var(--brand-primary);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.waiting-availability-day input:focus-visible + span { box-shadow: var(--focus-ring); }
.waiting-availability-note-field textarea { resize: vertical; }
.waiting-candidate-last-edit {
  display: block;
  min-width: 0;
  padding-top: 0;
}
.waiting-last-edit-value,
.waiting-last-edit-empty {
  min-width: 0;
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.waiting-last-edit-value {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
}
.waiting-candidate-note { min-width: 0; }
.waiting-candidate-note-reading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: var(--space-2);
  min-width: 0;
}
.waiting-candidate-note-reading > div { min-width: 0; }
.waiting-candidate-note-reading strong {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 20px;
}
.waiting-candidate-note-reading p {
  margin: var(--space-1) 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.waiting-note-reading-time {
  display: block;
  margin-top: 2px;
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.waiting-note-reading-empty { color: var(--text-caption) !important; }
.waiting-note-edit {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin-top: -10px;
  padding: 11px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.waiting-note-edit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.waiting-note-edit:hover { background: var(--brand-soft); }
.waiting-note-form {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}
.waiting-note-form textarea { resize: vertical; }
.waiting-note-quick-texts {
  display: grid;
  gap: var(--space-2);
}
.waiting-note-quick-texts > span {
  color: var(--text-helper);
  font-size: 13px;
  font-weight: 600;
}
.waiting-note-quick-texts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.waiting-note-quick-text {
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-action);
  background: var(--surface-card);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.waiting-note-quick-text:hover { border-color: var(--brand-primary); background: var(--brand-soft); }
.waiting-note-scope-hint { margin: 0; }
.waiting-note-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--space-2);
}
.waiting-note-actions button { min-height: 44px; }
.waiting-contact-completion,
.waiting-formal-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.waiting-contact-completion legend,
.waiting-formal-actions legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.waiting-contact-completion label,
.waiting-formal-actions label {
  position: relative;
  min-width: 0;
}
.waiting-contact-completion input,
.waiting-formal-actions input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}
.waiting-contact-completion label > span,
.waiting-formal-actions label > span {
  display: grid;
  min-height: 44px;
  padding: 8px 10px;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
}
.waiting-contact-completion input:checked + span,
.waiting-formal-actions input:checked + span {
  border-color: var(--brand-primary);
  color: var(--brand-dark);
  background: var(--brand-soft);
}
.waiting-contact-completion input:focus-visible + span,
.waiting-formal-actions input:focus-visible + span { box-shadow: var(--focus-ring); }
.waiting-contact-time {
  display: grid;
  grid-template-columns: minmax(0,1.5fr) minmax(96px,0.8fr);
  gap: var(--space-2);
  min-width: 0;
}
.waiting-contact-time input { width: 100%; min-width: 0; }
.waiting-action-hold-form input[type="date"] {
  display: block;
  width: 100%;
  inline-size: 100%;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
.waiting-action-hold-form input[type="date"]::-webkit-date-and-time-value {
  width: 100%;
  min-width: 0;
  text-align: left;
}
.waiting-contact-current-missed {
  margin: 0;
  color: var(--text-caption);
  font-size: 13px;
}
.waiting-contact-history { min-width: 0; }
.waiting-history-toggle {
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  gap: var(--space-1);
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  text-align: left;
}
.waiting-history-toggle strong { font-size: 14px; }
.waiting-missed-count { color: var(--text-caption); font-size: 13px; font-weight: 600; }
.waiting-missed-count.is-alert { color: var(--status-error); }
.waiting-history-list { display: grid; gap: var(--space-2); padding-left: 24px; }
.waiting-history-list article { padding-bottom: var(--space-2); border-bottom: 1px solid var(--border-subtle); }
.waiting-history-list article:last-child { border-bottom: 0; }
.waiting-history-list strong { color: var(--text-helper); font-size: 13px; }
.waiting-history-list p,
.waiting-history-empty { margin: 2px 0 0; color: var(--text-secondary); font-size: 14px; white-space: pre-wrap; }
.waiting-formal-actions { grid-template-columns: 1fr; padding-top: var(--space-2); }
.waiting-formal-actions label > span { justify-items: start; }
.waiting-hold-editor { display: grid; gap: var(--space-2); min-width: 0; }
.waiting-hold-list-title { color: var(--text-primary); font-size: 14px; }
.waiting-hold-slots { display: grid; gap: var(--space-3); }
.waiting-hold-weekday { display: grid; gap: 5px; min-width: 0; }
.waiting-hold-weekday > strong { color: var(--text-helper); font-size: 13px; }
.waiting-hold-slot {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) minmax(70px,auto);
  gap: var(--space-2);
  align-items: start;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.waiting-hold-slot > input { margin-top: 10px; }
.waiting-hold-slot.is-current { background: var(--brand-soft); }
.waiting-hold-slot.is-conflict { border-color: var(--danger); background: #fff1f1; }
.waiting-hold-slot span { min-width: 0; color: var(--text-secondary); font-size: 15px; line-height: 22px; }
.waiting-hold-slot b { color: var(--text-primary); font-size: 15px; line-height: 22px; text-align: right; }
.waiting-hold-detail {
  display: grid;
  gap: 4px;
  padding: var(--space-2);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}
.waiting-hold-detail > div { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; }
.waiting-hold-detail p { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--space-2); align-items: center; margin: 0; font-size: 13px; }
.waiting-hold-detail p:first-of-type { display: block; color: var(--text-helper); }
.waiting-hold-edit,
.waiting-hold-release-slot { min-width: 44px; min-height: 44px; border: 0; color: var(--text-action); background: transparent; }
.waiting-hold-edit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.waiting-hold-release-slot { font-size: 22px; }
.waiting-hold-slot-status { color: #8a5a00; background: #fff2cc; border-color: #e0bd65; }
.waiting-hold-slot-summary { display: flex; flex-wrap: wrap; gap: 5px 12px; align-items: baseline; color: var(--text-secondary); }
.waiting-hold-quick-state {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
}
.waiting-hold-quick-state small {
  max-width: 150px;
  color: var(--text-helper);
  font-size: 11px;
  line-height: 15px;
  text-align: right;
  overflow-wrap: anywhere;
}
.waiting-case-action-open {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-action);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.waiting-case-action-open > span:last-child { font-size: 24px; font-weight: 400; }
.waiting-case-action-context-header {
  position: sticky;
  z-index: 3;
  top: calc(var(--space-4) * -1);
  margin: calc(var(--space-4) * -1) 0 var(--space-4);
  padding: var(--space-4) 0 var(--space-2);
  background: var(--surface-card);
}
.waiting-case-action-nav {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.waiting-case-action-back,
.waiting-case-action-close {
  min-height: 44px;
  border: 0;
  color: var(--text-action);
  background: transparent;
  font: inherit;
  font-weight: 700;
}
.waiting-case-action-close {
  display: grid;
  width: 44px;
  padding: 10px;
  place-items: center;
}
.waiting-case-action-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.waiting-case-action-heading { margin: var(--space-1) 0 0; }
.waiting-case-action-heading .eyebrow { margin: 0 0 4px; }
.waiting-case-action-heading h2 {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.waiting-case-action-menu { display: grid; border-top: 1px solid var(--border-subtle); }
.waiting-case-action-menu button {
  display: flex;
  min-height: 58px;
  padding: 0;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
}
.waiting-case-action-menu button > span:last-child { color: var(--text-action); font-size: 26px; font-weight: 400; }
.waiting-action-workflow { display: grid; gap: var(--space-4); }
.waiting-action-workflow h3 { margin: 0; color: var(--text-primary); }
.waiting-action-workflow > p { margin: 0; color: var(--text-secondary); }
.waiting-action-current-holds,
.waiting-action-other-holds { display: grid; gap: var(--space-2); }
.waiting-action-current-holds > strong,
.waiting-action-other-holds > strong {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
}
.waiting-action-current-holds > p { margin: 0; color: var(--text-helper); font-size: 14px; }
.waiting-action-current-hold {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(70px,auto) 44px;
  gap: var(--space-2);
  min-height: 48px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.waiting-action-current-hold span,
.waiting-action-current-hold b { min-width: 0; font-size: 15px; line-height: 22px; }
.waiting-action-current-hold b { text-align: right; }
.waiting-action-impact {
  display: grid;
  gap: var(--space-1);
}
.waiting-action-impact strong {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
}
.waiting-action-impact p {
  margin: 0;
  color: var(--text-secondary);
}
.waiting-action-current-hold button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  color: var(--text-action);
  background: transparent;
  font-size: 22px;
}
.waiting-action-current-hold.is-conflict,
.waiting-action-other-holds .is-conflict { border-color: var(--danger); background: #fff1f1; }
.waiting-action-place .waiting-placement-inline-update {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: var(--space-2);
  align-items: center;
  min-height: 48px;
}
.waiting-requeue-confirm { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-muted); }
.waiting-requeue-confirm p { margin: 0; color: var(--text-secondary); }
.waiting-requeue-confirm > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); gap: var(--space-2); }
.waiting-candidate-empty {
  margin: 0;
  color: var(--text-helper);
  font-size: 14px;
}
.waiting-placement-inline-update {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
}
.waiting-placement-inline-update label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}
.waiting-placement-inline-update input { margin: 0; }
.waiting-candidate-actions { margin-top: 0; }
.form-feedback.waiting-placement-feedback {
  min-height: 18px;
  margin: 0;
  line-height: 18px;
}
.form-feedback.waiting-placement-feedback[data-feedback-state="success"] {
  padding: var(--space-1) var(--space-2);
}
@media (max-width: 520px) {
  .waiting-candidate-summary { padding: 12px; }
  .waiting-candidate-detail { padding: 0 12px 12px calc(22px + 2 * var(--space-3)); }
  .waiting-candidate-heading { align-items: flex-start; }
  .waiting-availability-day { grid-template-columns: 36px repeat(3,minmax(0,1fr)); }
  .waiting-hold-slot { grid-template-columns: 22px minmax(0,1fr) minmax(60px,auto); }
  .waiting-hold-slot b { min-width: 0; text-align: right; }
}
@media (max-width: 360px) {
  .waiting-contact-time { grid-template-columns: 1fr; }
}
.closure-active-status {
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border: 1px solid var(--status-success-soft);
  border-radius: var(--radius-md);
  color: var(--status-success);
  background: var(--status-success-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.closure-danger-zone {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.closure-danger-zone > p,
.closure-remove-confirm > p {
  margin: 0 0 var(--space-3);
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
}
.closure-danger-zone > .destructive-button { width: 100%; }
.closure-remove-confirm {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--status-danger);
  border-radius: var(--radius-md);
  background: var(--status-danger-soft);
}
.closure-remove-confirm > p { color: var(--status-danger); font-weight: 600; }
.closure-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.closure-remove-confirm .confirm-destructive {
  border-color: var(--brand-coral);
  color: var(--text-primary);
  background: var(--brand-coral);
}
.closure-remove-confirm .confirm-destructive:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--brand-coral);
}
.operation-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.operation-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  background: var(--surface-card);
}
.operation-item::after {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-top: 2px solid var(--text-action);
  border-right: 2px solid var(--text-action);
  content: '';
  transform: rotate(45deg);
}
.operation-item:hover { border-color: var(--border-strong); background: var(--brand-soft); }
.operation-item:active:not(:disabled) { background: var(--surface-subtle); }
.operation-item:disabled {
  color: var(--text-disabled);
  background: var(--surface-subtle);
}
.operation-item-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: var(--space-3);
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: var(--brand-soft);
}
.operation-item-copy {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}
.operation-item-copy strong { color: var(--text-primary); font-size: 16px; font-weight: 600; }
.operation-item-copy > span {
  color: var(--text-helper);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.data-issue-tool-count {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--status-warning);
  background: var(--status-warning-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.primary-button, .secondary-button, .quiet-button {
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.primary-button { min-height: 48px; border: 1px solid var(--brand-primary); color: var(--text-on-strong); background: var(--brand-primary); }
.secondary-button { border: 1px solid var(--border-strong); color: var(--text-action); background: var(--surface-card); }
.quiet-button { border: 1px solid transparent; color: var(--text-action); background: transparent; }
.destructive-button {
  border-color: var(--status-danger);
  color: var(--status-danger);
  background: var(--surface-card);
}
.primary-button:hover { background: var(--brand-dark); }
.secondary-button:hover,
.quiet-button:hover,
.notification-button:hover,
.tool-button:hover { background: var(--brand-soft); }
.destructive-button:hover:not(:disabled) { background: var(--status-danger-soft); }
.primary-button:disabled,
.secondary-button:disabled,
.small-button:disabled {
  cursor: default;
  color: var(--text-disabled);
  border-color: var(--border-subtle);
  background: var(--surface-subtle);
  opacity: 1;
}
.primary-button.completed:disabled,
.small-button.completed:disabled {
  color: var(--status-success);
  border: 1px solid var(--status-success-soft);
  background: var(--status-success-soft);
}
.form-grid {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#schedulePanel { overflow-x: clip; }
#schedulePanel .form-grid,
#schedulePanel .field {
  min-inline-size: 0;
  max-inline-size: 100%;
}
#schedulePanel input[type="date"],
#schedulePanel input[type="time"] {
  display: block;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  -webkit-min-logical-width: 0;
  overflow: hidden;
}
#schedulePanel :is(input[type="date"], input[type="time"])::-webkit-date-and-time-value {
  min-inline-size: 0;
  text-align: left;
}
.holiday-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.holiday-mode-picker button[aria-pressed="true"] {
  color: var(--text-on-strong);
  border-color: var(--brand-primary);
  background: var(--brand-primary);
}
.holiday-service-facts {
  display: grid;
  gap: var(--space-3);
}
.holiday-fact-schedule {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.holiday-fact-schedule > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.holiday-fact-schedule > header strong,
.holiday-fact-schedule > header span { overflow-wrap: anywhere; }
.holiday-fact-schedule > header span {
  flex: none;
  color: var(--text-caption);
  font-size: 12px;
}
.holiday-fact-participants {
  display: grid;
  gap: var(--space-2);
}
.holiday-fact-participant {
  min-width: 0;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.holiday-fact-participant legend {
  padding: 0 var(--space-1);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}
.holiday-participant-name {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-caption);
  font-size: 12px;
}
.holiday-fact-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.field {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
  margin: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}
.field input, .field select, .field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  max-inline-size: 100%;
  min-height: 48px;
  min-width: 0;
  min-inline-size: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  font-size: 16px;
}
.field :is(input, textarea)::placeholder { color: var(--text-placeholder); }
.field :is(input, select, textarea):disabled {
  color: var(--text-disabled);
  border-color: var(--border-subtle);
  background: var(--surface-subtle);
  opacity: 1;
}
.choice-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
}
.makeup-fixed-source {
  display: flex;
  min-width: 0;
  min-height: 44px;
  margin: var(--space-3) 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text-secondary);
}
.makeup-fixed-source strong {
  min-width: 0;
  color: var(--text-primary);
  text-align: right;
  overflow-wrap: anywhere;
}
.choice-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 14px;
}
.choice-row input { width: 20px; height: 20px; accent-color: var(--brand-primary); }
.form-hint, .form-feedback {
  margin: var(--space-2) 0;
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.form-feedback { min-height: 21px; color: var(--text-helper); font-weight: 500; }
.form-feedback:empty { display: none; min-height: 0; margin: 0; padding: 0; }
.form-feedback[data-feedback-state="success"],
.form-feedback[data-feedback-state="info"] {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: var(--brand-soft);
}
.form-feedback.error,
.form-feedback[data-feedback-state="error"] {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.backdrop {
  position: fixed;
  z-index: 19;
  inset: 0;
  background: rgba(36, 53, 74, .28);
  backdrop-filter: blur(4px);
}
.group-management-sheet-open .backdrop { z-index: 89; }
.notification-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: var(--space-3) 0 var(--space-2);
  padding: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
}
#notificationPanel[data-secondary-view="true"] > .sheet-handle,
#notificationPanel[data-secondary-view="true"] > .sheet-title { display: none; }
.notification-secondary-location {
  position: sticky;
  z-index: 4;
  top: calc(var(--space-3) * -1);
  display: block;
  min-width: 0;
  margin: calc(var(--space-3) * -1) 0 var(--space-3);
  padding: var(--space-3) 0 0;
  background: var(--surface-card);
}
.notification-secondary-compact-nav {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-card);
}
.notification-secondary-top-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2);
}
.notification-secondary-title-row {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: var(--space-1) var(--space-2) var(--space-2);
}
.notification-history-search-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--text-action);
  background: transparent;
  transform: translateY(-50%);
}
.notification-history-search-toggle.hidden { display: none; }
.notification-history-search-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.notification-secondary-compact-back {
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2) var(--space-1);
  border: 0;
  color: var(--text-action);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.notification-secondary-compact-back {
  justify-self: start;
  text-align: left;
  overflow-wrap: anywhere;
}
.notification-secondary-compact-close {
  justify-self: end;
}
.notification-secondary-location-title {
  min-width: 0;
  margin: 0;
  justify-self: center;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  overflow-wrap: anywhere;
}
.notification-tab {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2);
  border: 0;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: normal;
}
.notification-tab.active {
  color: var(--text-action);
  background: transparent;
  font-weight: 600;
}
.notification-tab.active::after {
  position: absolute;
  right: var(--space-3);
  bottom: -1px;
  left: var(--space-3);
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--brand-primary);
  content: '';
}
.notification-tab-label { font: inherit; }
.notification-tab-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0 6px;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-on-strong);
  background: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}
.notification-tab-count[hidden],
.manager-shared-count[hidden] { display: none; }
.notification-history-entry {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 var(--space-2);
}
.notification-history-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-1);
  min-height: 44px;
  padding: 0 var(--space-1);
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}
.notification-history-button::after {
  color: var(--text-caption);
  content: '›';
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}
.notification-history-button[aria-expanded="true"]::after { transform: rotate(90deg); }
.notification-history-button.active,
.notification-history-button[aria-pressed="true"] {
  color: var(--text-action);
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.notification-record-filters {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
.notification-record-filters nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.notification-record-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: 0;
  color: var(--text-secondary);
  background: transparent;
  font-weight: 500;
}
.notification-record-filter::after {
  position: absolute;
  right: var(--space-1);
  bottom: 0;
  left: var(--space-1);
  height: 3px;
  border-radius: var(--radius-pill);
  background: transparent;
  content: '';
}
.notification-record-filter.active {
  color: var(--text-action);
  background: transparent;
  font-weight: 600;
}
.notification-record-filter.active::after {
  height: 3px;
  background: var(--brand-primary);
}
.notification-record-filter [data-record-filter-label] {
  min-width: 0;
  overflow-wrap: anywhere;
}
.notification-data-issue-work-view {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
  margin: calc(var(--space-3) * -1) 0 0;
}
.notification-data-issue-work-nav {
  position: sticky;
  z-index: 5;
  top: calc(var(--space-3) * -1);
  margin: 0;
  padding-top: var(--space-3);
}
.notification-data-issue-work-body {
  display: grid;
  min-width: 0;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
}
.notification-data-issue-work-summary { min-width: 0; }
.notification-data-issue-work-summary:empty { display: none; }
.notification-data-issue-work-detail {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}
.notification-data-issue-work-detail[hidden] { display: none !important; }
.notification-data-issue-work-detail h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.notification-data-issue-work-detail dl {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}
.notification-data-issue-work-detail dt { color: var(--text-caption); }
.notification-data-issue-work-detail dd {
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.notification-data-issue-work-form {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}
.notification-data-issue-work-note { margin: 0; }
.notification-data-issue-work-note textarea {
  min-height: 112px;
  resize: vertical;
  font-size: 16px;
  line-height: 24px;
}
.notification-data-issue-work-view[data-dirty="true"]
  .notification-data-issue-work-note textarea:not(:focus) {
  border-color: var(--brand-primary);
}
.notification-data-issue-work-feedback { margin: 0; }
.notification-data-issue-work-feedback:empty { display: none; }
.notification-data-issue-work-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.notification-data-issue-work-actions :is(button, [role="button"]) {
  min-width: 44px;
  min-height: 44px;
}
.notification-data-issue-work-actions .primary-button { flex: 0 1 auto; }
.notification-data-issue-work-view[data-submit-state="busy"] {
  cursor: progress;
}
.notification-data-issue-work-view[data-submit-state="error"]
  .notification-data-issue-work-feedback {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.notification-feedback {
  margin: 0 0 var(--space-3);
  font-size: 12px;
  line-height: 18px;
}
.notification-feedback:empty { display: none; }
.notification-snackbar {
  position: fixed;
  z-index: 28;
  right: max(var(--space-4), calc((100vw - 760px) / 2 + var(--space-6)));
  bottom: max(var(--space-3), env(safe-area-inset-bottom));
  left: max(var(--space-4), calc((100vw - 760px) / 2 + var(--space-6)));
  display: flex;
  min-width: 0;
  min-height: 44px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  box-shadow: var(--shadow-2);
  overflow-wrap: anywhere;
}
.notification-snackbar:empty { display: none; }
.notification-snackbar[data-feedback-state="info"] {
  border-color: var(--brand-dark);
  color: var(--text-on-strong);
  background: var(--status-info);
}
.notification-snackbar-message {
  min-width: 0;
  flex: 1 1 200px;
  overflow-wrap: anywhere;
}
.notification-snackbar .notification-undo-button {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--text-on-strong);
  font-weight: 600;
}
.notification-snackbar .notification-undo-button:focus-visible {
  outline: 2px solid var(--text-on-strong);
  box-shadow: none;
}
.notification-snackbar[data-feedback-state="error"] {
  border-color: var(--status-danger);
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
[data-notification-card] {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
[data-notification-card] :is(input, textarea) { font-size: 16px; }
[data-notification-card="data-issue"],
[data-work-kind="dataIssue"] {
  row-gap: var(--space-3);
  border-color: var(--border-subtle);
  background: var(--surface-card);
}
[data-notification-card="data-issue"] :is([data-data-issue-description], .data-issue-description),
[data-work-kind="dataIssue"] :is([data-data-issue-description], .notification-inline-note) {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
[data-notification-card="data-issue"] [data-notification-status-rail],
[data-work-kind="dataIssue"] [data-notification-status-rail] {
  align-self: start;
  margin-inline-start: auto;
  justify-self: end;
  text-align: right;
}
[data-data-issue-detail-facts] {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}
[data-data-issue-detail-facts] dt { color: var(--text-caption); }
[data-data-issue-detail-facts] dd {
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
#notificationList,
.manager-shared-tracking-list,
.my-data-issue-list {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
}
.manager-shared-tracking-list,
.my-data-issue-list { display: grid; gap: var(--space-3); }
.notification-row {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.notification-work-item { display: grid; gap: var(--space-2); }
.notification-work-item.is-waiting-hold { gap: 4px; }
.notification-work-item.is-waiting-hold .notification-event-title-group { gap: 2px; }
.notification-work-item.is-waiting-hold .notification-inline-note { margin-top: 0 !important; }
.notification-waiting-hold-deadline {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
}
.notification-deadline-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--text-helper);
}
.notification-deadline-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#notificationList > .notification-row { margin-bottom: 0; }
.notification-work-item strong {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.notification-work-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
}
.notification-request-person-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: var(--brand-dark);
}
.notification-request-person-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-transition-detail dl {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}
.notification-transition-detail dt { color: var(--text-caption); }
.notification-transition-detail dd {
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.notification-transition-heading {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}
.notification-transition-submitter {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
}
.notification-heading,
.notification-card-header {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.notification-row strong { display: block; margin-bottom: var(--space-1); }
.notification-row p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 21px; }
.notification-heading > div:first-child,
.notification-card-title-group {
  display: grid;
  min-width: 0;
  flex: 1 1 190px;
  gap: var(--space-1);
}
[data-notification-card-main] {
  display: grid;
  min-width: 0;
  flex: 1 1 190px;
  gap: var(--space-2);
}
.notification-event-heading {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-2);
}
[data-notification-event-icon] {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: var(--brand-dark);
}
[data-notification-event-icon] svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-event-title-group {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}
.notification-event-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  overflow-wrap: anywhere;
}
[data-notification-business-identifier] {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  overflow-wrap: anywhere;
}
[data-notification-status-rail] {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  flex-wrap: wrap;
  margin-inline-start: auto;
  justify-content: flex-end;
  justify-self: end;
  gap: var(--space-1);
  text-align: right;
}
.notification-status-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.notification-status-badge.pending,
.notification-status-badge[data-status="pending"] {
  color: var(--status-warning);
  background: var(--status-warning-soft);
}
.notification-status-badge.complete,
.notification-status-badge[data-status="complete"] {
  color: var(--status-success);
  background: var(--status-success-soft);
}
.notification-status-badge.overdue,
.notification-status-badge[data-status="overdue"] {
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.notification-card-status .notification-badges,
.notification-card-title-group > .notification-badges {
  justify-content: flex-start;
}
.notification-heading-actions {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--space-1);
}
[data-notification-pin-slot] {
  display: flex;
  min-width: 0;
  margin-inline-start: auto;
  justify-content: flex-end;
  justify-self: end;
}
.notification-category {
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.notification-message {
  display: grid;
  gap: var(--space-1);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.notification-outcome {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}
.notification-message .notification-subject {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.notification-summary,
.notification-legacy-message {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.notification-legacy-message {
  display: grid;
  gap: 2px;
}
.notification-inline-note {
  margin-top: var(--space-1) !important;
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  line-height: 20px !important;
  overflow-wrap: anywhere;
}
.notification-message .notification-previous {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.notification-message .notification-outcome { margin-bottom: 0; }
.notification-service-time {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-1) var(--space-2);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.notification-service-time-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: var(--text-support);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notification-service-time-value {
  display: flex;
  min-width: 0;
  flex: 1 1 160px;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 var(--space-1);
  overflow-wrap: anywhere;
}
.notification-service-time-before,
.notification-service-time-current {
  min-width: 0;
}
.notification-service-time-transition {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  align-items: flex-start;
  gap: var(--space-1);
}
.notification-service-time-arrow { flex: 0 0 auto; }
.notification-service-time-after {
  min-width: 0;
  overflow-wrap: anywhere;
}
.notification-arrangement {
  display: flex;
  margin: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px var(--space-2);
}
.notification-arrangement-label {
  flex: 0 0 auto;
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.notification-arrangement-value {
  min-width: 0;
  flex: 1 1 12ch;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.notification-arrangement-lines {
  display: grid;
  gap: 2px;
}
.notification-arrangement-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
}
.notification-arrangement-field {
  color: var(--text-caption);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}
.notification-therapist-change {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px var(--space-2);
  align-items: start;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
}
.notification-change-list,
.notification-primary-change-list,
.notification-detail-change-list {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
}
.notification-primary-change-list {
  margin: 0;
  padding: 0;
}
.notification-detail-change-list {
  margin: 0;
  padding: 0;
}
.notification-change-row {
  display: grid;
  grid-template-columns: minmax(48px, auto) minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
}
.notification-change-label {
  color: var(--text-caption);
  font-size: 12px;
  font-weight: 600;
  line-height: 21px;
}
.notification-change-label[data-notification-fact-label] {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
}
[data-notification-fact-icon] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--text-support);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-notification-fact-row] {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px var(--space-2);
}
[data-notification-fact-row] .notification-change-value {
  min-width: 0;
  flex: 1 1 12ch;
  overflow-wrap: anywhere;
}
.notification-change-value { overflow-wrap: anywhere; }
.notification-date-time-change {
  display: grid;
  gap: 2px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}
.notification-context {
  color: var(--text-caption);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.notification-actor {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.notification-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-1); }
.notification-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface-subtle);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}
.notification-badge.unread { color: var(--text-action); background: var(--brand-soft); }
.notification-badge.todo { color: var(--status-warning); background: var(--status-warning-soft); }
.notification-badge.done { color: var(--status-success); background: var(--status-success-soft); }
.notification-badge.acknowledgement { color: var(--text-action); background: var(--brand-soft); }
.notification-badge.overdue { color: var(--status-danger); background: var(--status-danger-soft); }
.notification-badge.inform { color: var(--text-secondary); background: var(--surface-subtle); }
.notification-badge.approval { color: var(--status-warning); background: var(--status-warning-soft); }
.notification-badge.pinned { color: var(--text-action); background: var(--brand-soft); }
.manager-activity-section {
  min-width: 0;
  margin-top: var(--space-2);
}
.manager-shared-overview,
.legacy-todo-entry {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  margin: var(--space-1) 0 var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: var(--surface-subtle);
  text-align: left;
}
.manager-shared-overview span:last-child,
.legacy-todo-entry span:last-child { margin-left: auto; font-size: 20px; }
.manager-shared-overview :is(.manager-tracking-flag-glyph, .notification-tracking-flag) {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--tracking-accent-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(12deg);
  transform-box: view-box;
  transform-origin: 6.5px 21px;
}
.manager-shared-overview :is(.manager-tracking-flag-banner, .notification-tracking-flag-banner) {
  fill: var(--brand-coral);
  transform: scale(1.18);
  transform-box: fill-box;
  transform-origin: left center;
  vector-effect: non-scaling-stroke;
}
.manager-shared-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-on-strong);
  background: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  white-space: nowrap;
}
.manager-pin-button,
.manager-note-edit-button,
.notification-undo-button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
}
.manager-pin-state-button {
  --manager-tracking-flag-fill: none;
  display: inline-flex;
  width: auto;
  min-width: 44px;
  min-inline-size: calc(4em + 52px);
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--tracking-accent-dark);
  color: var(--tracking-accent-dark);
  background: var(--surface-card);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.manager-pin-state-button > span {
  min-inline-size: 4em;
}
.manager-pin-state-button[aria-pressed="false"] {
  --manager-tracking-flag-fill: none;
  border-color: var(--tracking-accent-dark);
  color: var(--tracking-accent-dark);
  background: var(--surface-card);
}
.manager-pin-state-button[aria-pressed="true"] {
  --manager-tracking-flag-fill: var(--brand-coral);
  border-color: var(--tracking-accent-dark);
  color: var(--tracking-accent-dark);
  background: color-mix(in srgb, var(--brand-coral) 12%, var(--surface-card));
}
.manager-pin-button :is(.manager-tracking-flag-glyph, .notification-tracking-flag) {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: visible;
  fill: none;
  stroke: var(--tracking-accent-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(12deg);
  transform-box: view-box;
  transform-origin: 6.5px 21px;
}
.manager-pin-button :is(.manager-tracking-flag-banner, .notification-tracking-flag-banner) {
  fill: var(--manager-tracking-flag-fill);
  transform: scale(1.18);
  transform-box: fill-box;
  transform-origin: left center;
  vector-effect: non-scaling-stroke;
}
.manager-pin-state-button:hover:not(:disabled) {
  border-color: var(--tracking-accent-dark);
  background: color-mix(in srgb, var(--brand-coral) 12%, var(--surface-card));
}
.manager-pin-state-button[aria-pressed="true"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-coral) 18%, var(--surface-card));
}
.manager-pin-state-button:active:not(:disabled) {
  border-color: var(--tracking-accent-dark);
  background: color-mix(in srgb, var(--brand-coral) 20%, var(--surface-card));
}
.manager-pin-state-button[aria-pressed="true"]:active:not(:disabled) {
  background: color-mix(in srgb, var(--brand-coral) 24%, var(--surface-card));
}
.manager-pin-state-button:disabled {
  --manager-tracking-flag-fill: var(--surface-subtle);
  border-color: var(--border-subtle);
  color: var(--text-support);
  background: var(--surface-subtle);
}
.manager-pin-state-button[aria-busy="true"] {
  cursor: progress;
  opacity: 1;
}
.manager-pin-state-button[aria-busy="true"][aria-pressed="false"] {
  --manager-tracking-flag-fill: none;
  border-color: var(--tracking-accent-dark);
  color: var(--tracking-accent-dark);
  background: var(--surface-card);
}
.manager-pin-state-button[aria-busy="true"][aria-pressed="true"] {
  --manager-tracking-flag-fill: var(--brand-coral);
  border-color: var(--tracking-accent-dark);
  color: var(--tracking-accent-dark);
  background: color-mix(in srgb, var(--brand-coral) 12%, var(--surface-card));
}
.manager-pin-state-button[aria-busy="true"]
  :is(.manager-tracking-flag-glyph, .notification-tracking-flag, span) {
  visibility: visible;
}
.manager-note-edit-button {
  display: inline-flex;
  width: auto;
  min-width: 44px;
  padding: 0 var(--space-2);
  color: var(--text-action);
  font-size: 13px;
  font-weight: 600;
}
.notification-undo-button {
  display: inline-flex;
  width: auto;
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
  text-decoration: underline;
}
.manager-activity-section + .manager-activity-section { margin-top: var(--space-4); }
.manager-activity-section.pinned {
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.manager-activity-heading {
  display: grid;
  gap: 2px;
  margin-bottom: var(--space-1);
}
.manager-activity-heading h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.manager-activity-heading span {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.manager-shared-pin-panel {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.manager-shared-note-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.manager-shared-note-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.manager-shared-note-summary {
  min-width: 0;
}
.manager-shared-note-summary p { margin: 0; overflow-wrap: anywhere; }
.manager-shared-note-editor { display: grid; gap: var(--space-2); }
.manager-shared-pin-panel label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}
.manager-shared-pin-panel textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 72px;
  padding: var(--space-2);
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
}
.manager-shared-pin-history {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.legacy-todo-list,
.my-data-issue-list { display: grid; gap: var(--space-3); }
#notificationList[data-refreshing="true"] {
  cursor: progress;
}
.manager-shared-tracking-card,
.legacy-todo-card,
.my-data-issue-row {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.manager-shared-tracking-card {
  display: grid;
  gap: var(--space-2);
}
.manager-shared-card-heading {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
}
.manager-shared-card-heading > div:first-child {
  display: grid;
  min-width: 0;
  flex: 1 1 190px;
  gap: var(--space-1);
}
.manager-shared-card-actions {
  display: flex;
  flex: 0 1 auto;
  align-items: flex-start;
  justify-content: flex-end;
}
.manager-shared-card-heading strong {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 23px;
}
[data-notification-card] .notification-event-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}
[data-notification-card] [data-notification-business-identifier] {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
}
.my-data-issue-row > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
}
.manager-shared-card-heading span,
.manager-shared-tracking-card p,
.legacy-todo-card p { margin: 0; overflow-wrap: anywhere; }
.manager-shared-tracking-card > .manager-shared-pin-panel,
.notification-detail-content > .manager-shared-pin-panel {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.manager-shared-empty {
  display: grid;
  place-items: center;
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-4) var(--space-3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  text-align: center;
}
.manager-shared-empty.complete { min-height: 120px; }
.manager-shared-event-information dt { color: var(--text-caption); }
.manager-shared-event-information dd {
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.notification-back-button {
  min-height: 44px;
  margin-bottom: var(--space-2);
  padding: 0 var(--space-2);
  border: 0;
  color: var(--text-action);
  background: transparent;
}
.legacy-todo-card { display: grid; gap: var(--space-2); }
.legacy-todo-card .small-button { justify-self: start; }
.legacy-integrity-message { color: var(--text-helper) !important; font-size: 12px !important; }
.legacy-todo-history {
  display: grid;
  gap: var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}
.legacy-todo-history p { margin: 0; overflow-wrap: anywhere; }
.legacy-todo-history span { color: var(--text-caption); font-size: 12px; }
.acknowledgement-tracking {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.acknowledgement-tracking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.acknowledgement-tracking-heading h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.acknowledgement-tracking-help {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.acknowledgement-tracking-group {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.tracking-group-summary {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
}
.tracking-group-summary > strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.tracking-group-subject {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
}
.acknowledgement-tracking-group[data-overdue="true"] {
  margin-top: 0;
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}
.acknowledgement-tracking-group[data-overdue="true"] > .tracking-group-summary > strong,
.acknowledgement-tracking-group[data-overdue="true"] .acknowledgement-deadline {
  color: var(--status-danger);
}
.tracking-recipient-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--border-subtle);
  list-style: none;
}
.tracking-recipient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2);
  background: var(--surface-card);
}
.tracking-recipient-row > span { min-width: 0; overflow-wrap: anywhere; }
.tracking-recipient-row > strong {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.tracking-recipient-row[data-status="confirmed"] > strong { color: var(--status-success); }
.tracking-recipient-row[data-status="pending"] > strong { color: var(--text-action); }
.tracking-recipient-row[data-status="unread"] > strong,
.tracking-recipient-row[data-status="overdue"] > strong { color: var(--status-danger); }
.acknowledgement-deadline {
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.acknowledgement-overdue-label { justify-self: start; }
.notification-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  margin-top: var(--space-1);
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.notification-footer > span + span::before { margin-right: var(--space-2); content: '・'; }
.notification-meta { margin: 0 !important; color: inherit !important; font-size: inherit !important; line-height: inherit !important; }
[data-notification-footer] {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}
[data-notification-card] { row-gap: var(--space-3); }
[data-notification-tracking-slot],
[data-notification-leading-slot] {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
}
[data-notification-footer-actions] {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-inline-start: auto;
}
[data-notification-trailing-slot] {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-inline-start: auto;
}
[data-notification-footer][data-footer-pattern="data-issue"] {
  align-items: center;
}
[data-notification-footer][data-footer-pattern="data-issue"]
  [data-notification-tracking-slot] {
  display: none;
}
[data-notification-footer][data-footer-pattern="data-issue"]
  [data-notification-leading-slot] {
  justify-content: flex-start;
}
[data-notification-footer][data-footer-pattern="data-issue"]
  [data-notification-trailing-slot] {
  justify-content: flex-end;
}
[data-work-kind="dataIssue"] [data-notification-footer] {
  justify-content: flex-start;
}
[data-work-kind="dataIssue"] [data-notification-footer-actions] {
  margin-inline-start: 0;
  justify-content: flex-start;
}
[data-notification-footer] .notification-actions { margin-top: 0; }
.notification-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: 0;
}
[data-notification-action-slot] {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}
.notification-control-bar .notification-actions { margin-top: 0; }
.notification-disclosure-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  gap: var(--space-1);
  margin-left: 0;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
.notification-disclosure-toggle:hover:not(:disabled) {
  background: var(--brand-soft);
}
.notification-disclosure-toggle:active:not(:disabled) {
  background: var(--surface-subtle);
}
.notification-disclosure-indicator {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}
.notification-disclosure-indicator.expanded { transform: rotate(180deg); }
.notification-disclosure-toggle:disabled {
  color: var(--text-disabled);
  background: var(--surface-subtle);
  cursor: default;
}
.notification-detail-content {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: 0;
}
.notification-detail-content[hidden] { display: none !important; }
.notification-detail-information {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}
.notification-detail-information h3 {
  margin: 0 0 var(--space-1);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 22px;
}
.notification-detail-content dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}
.notification-detail-content dt {
  color: var(--text-caption);
  font-weight: 400;
}
.notification-detail-content dd {
  min-width: 0;
  margin: 0;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.notification-detail-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.notification-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.small-button {
  min-height: 44px;
  padding: 9px var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
}
.notification-business-action {
  min-width: 44px;
  min-height: 44px;
  padding: 9px var(--space-3);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-md);
  color: var(--text-action);
  background: var(--surface-card);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.notification-data-issue-leading-action,
[data-data-issue-leading-action],
[data-work-kind="dataIssue"] [data-work-action="dataIssue"] {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--brand-primary);
  color: var(--text-action);
  background: var(--surface-card);
}
.notification-data-issue-leading-action:hover:not(:disabled),
[data-data-issue-leading-action]:hover:not(:disabled),
[data-work-kind="dataIssue"] [data-work-action="dataIssue"]:hover:not(:disabled) {
  background: var(--brand-soft);
}
.notification-data-issue-leading-action:active:not(:disabled),
[data-data-issue-leading-action]:active:not(:disabled),
[data-work-kind="dataIssue"] [data-work-action="dataIssue"]:active:not(:disabled) {
  background: var(--surface-subtle);
}
.notification-business-action:hover:not(:disabled) { background: var(--brand-soft); }
.notification-business-action:active:not(:disabled) { background: var(--surface-subtle); }
.notification-business-action:disabled {
  border-color: var(--border-subtle);
  color: var(--text-support);
  background: var(--surface-subtle);
}
.small-button.primary { border-color: var(--brand-primary); color: var(--text-on-strong); background: var(--brand-primary); }
.small-button:hover:not(:disabled) { background: var(--brand-soft); }
.small-button.primary:hover:not(:disabled) { background: var(--brand-dark); }
.small-button.destructive-button:hover:not(:disabled) { background: var(--status-danger-soft); }
.todo-editor {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--status-warning-soft);
  border-radius: var(--radius-md);
  background: var(--status-warning-soft);
}
.todo-editor label, .todo-history { color: var(--text-helper); font-size: 12px; line-height: 18px; }
.todo-editor textarea {
  width: 100%;
  min-height: 64px;
  padding: var(--space-3);
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface-card);
  font: inherit;
  font-size: 14px;
  line-height: 21px;
}
.empty-state.compact { padding: var(--space-6) var(--space-3); }
.loading-state { color: var(--text-helper); }
.loading-state::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--status-info);
  content: '';
}
.error-state {
  border-color: var(--status-danger);
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.field-hint {
  margin: var(--space-2) 0;
  color: var(--text-helper);
  font-size: 14px;
  line-height: 21px;
}
.case-history-result { margin-top: 0; }
.case-history-sticky {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: 0 0 var(--space-2);
  background: var(--surface-page);
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .case-history-sticky {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--space-2);
  margin-right: calc(var(--space-2) * -1);
  margin-left: calc(var(--space-2) * -1);
  padding: var(--space-1) var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-1);
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .case-detail-back {
  align-self: center;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .case-history-identity {
  align-self: center;
  justify-self: end;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .case-history-identity strong {
  font-size: 17px;
  line-height: 24px;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .case-summary-facts {
  display: none;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .history-overview {
  grid-column: 1 / -1;
  gap: 0;
  margin: var(--space-1) 0 0;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .history-overview > div {
  display: flex;
  min-height: 28px;
  padding: 4px 2px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .history-overview span {
  display: none;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] .history-overview strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] #caseHistoryPeriod > span {
  display: none;
}
.treatment-schedule-query-sheet[data-history-scrolled="true"] #caseHistoryPeriod::after {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  content: attr(data-compact-label);
}
.case-history-identity {
  display: grid;
  gap: var(--space-2);
}
.case-summary-facts { display: grid; gap: 4px; }
.case-summary-facts span { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 8px; }
.case-summary-facts b { color: var(--text-caption); font-size: 13px; font-weight: 600; }
.history-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}
.history-overview > div {
  display: grid;
  grid-template-rows: 18px minmax(40px, 1fr);
  gap: 4px;
  min-height: 84px;
  padding: 10px;
  align-content: stretch;
  justify-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  text-align: center;
}
.history-overview span {
  align-self: start;
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.history-overview strong {
  align-self: center;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}
#caseHistoryPeriod {
  display: grid;
  gap: 0;
  justify-items: center;
  line-height: 22px;
}
#caseHistoryPeriod > span {
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}
.case-history-period {
  margin: var(--space-2) 0 var(--space-4);
  color: var(--text-caption);
  font-size: 12px;
  line-height: 18px;
}
.case-history-list { display: grid; gap: var(--space-4); }
.history-month h3 {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 21px;
}
.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 36px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}
.history-entry > strong { color: var(--text-primary); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.history-entry > span { color: var(--text-caption); font-size: 12px; }
.history-entry > b {
  width: 68px;
  min-width: 0;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-action);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.history-entry > span { justify-self: end; text-align: right; }
.history-entry[data-status="個案請假"] > b,
.history-entry[data-status="無故未到"] > b {
  color: var(--status-danger);
  background: var(--status-danger-soft);
}
.history-load-more { width: 100%; margin-top: var(--space-4); }
.safety-note { margin: var(--space-6) var(--space-1) 0; font-size: 12px; line-height: 18px; text-align: center; }

@media (max-width: 480px) {
  .group-time-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-notification-footer] {
    gap: var(--space-2) var(--space-3);
  }
  .notification-data-issue-work-detail dl,
  [data-data-issue-detail-facts] {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .notification-data-issue-work-actions {
    align-items: stretch;
  }
  .p4-module-outlet {
    padding-top: max(var(--space-4), env(safe-area-inset-top));
    padding-right: var(--space-3);
    padding-left: var(--space-3);
  }
  .eyebrow { font-size: 13px; }
  .date-label { font-size: 15px; }
  .notification-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 10px; }
  .tool-button { width: 44px; height: 44px; flex-basis: 44px; padding: 10px; }
  .session-card { padding: var(--space-4) var(--space-3); }
  .session-heading { align-items: flex-start; }
  .time { min-width: 55px; font-size: 20px; }
  .meta, .participants, .history-box, .card-actions { margin-left: 68px; }
  .status-select { min-height: 44px; max-width: 116px; font-size: 14px; }
  .summary-card-core { grid-template-columns: minmax(0, 1fr) 44px 116px; gap: var(--space-2); }
  .summary-card-core:has(> .summary-state-zone > .group-attendance-summary) {
    grid-template-columns: minmax(0, 1fr) 44px 88px;
  }
  .summary-content-zone,
  .summary-event-zone { grid-template-columns: 52px minmax(0, 1fr); gap: var(--space-2); }
  .summary-card-identity h3 { font-size: 17px; }
  .summary-background { gap: 2px 4px; }
  .summary-background span + span::before { margin-right: 4px; }
  .group-attendance-summary { min-width: 82px; padding-right: var(--space-2); padding-left: var(--space-2); }
  .detail-facts { grid-template-columns: 1fr; }
  .detail-participant-row {
    padding: 0;
  }
  .detail-participant-row.is-group {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 132px);
    gap: var(--space-2);
  }
  .detail-participant-accounting,
  .return-to-service-fields,
  .return-to-service-grid,
  .manager-schedule-edit-form,
  .detail-current-region {
    min-width: 0;
    max-width: 100%;
  }
  .manager-therapist-options { grid-template-columns: 1fr; }
  .modification-history-heading { display: grid; }
  .modification-history-heading time { justify-self: start; }
  .week-strip { grid-template-columns: repeat(7, minmax(39px, 1fr)); gap: 3px; }
  .week-day { min-height: 64px; padding-right: 0; padding-left: 0; }
  .sheet {
    max-height: 92vh;
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }
  #notificationPanel { height: 92vh; }
  .treatment-transition-sheet,
  .waiting-case-action-sheet,
  .treatment-schedule-query-sheet { height: 100dvh; max-height: 100dvh; }
  .operation-item { padding-right: var(--space-3); padding-left: var(--space-3); }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .holiday-fact-inputs { grid-template-columns: 1fr; }
  .holiday-fact-schedule > header { display: grid; }
  .holiday-fact-schedule > header span { justify-self: start; }
  .history-overview strong { font-size: 18px; }
  .treatment-schedule-query-sheet[data-history-scrolled="true"] .history-overview strong {
    font-size: 14px;
  }
  .history-entry { grid-template-columns: minmax(0, 1fr) 68px 36px; gap: var(--space-2); }
}

@media (max-width: 340px) {
  .week-strip {
    gap: 2px;
    margin-right: calc(var(--space-3) * -1);
    margin-left: calc(var(--space-3) * -1);
  }
  [data-notification-status-rail] {
    flex-basis: 100%;
  }
  [data-notification-footer] {
    align-items: stretch;
  }
  [data-notification-tracking-slot],
  [data-notification-leading-slot] {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  [data-notification-footer-actions],
  [data-notification-trailing-slot] {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
  .notification-data-issue-work-actions {
    flex-direction: column;
  }
  .notification-data-issue-work-actions > button {
    width: 100%;
  }
}

@media (max-width: 260px) {
  [data-notification-footer-actions],
  [data-notification-trailing-slot] {
    flex-direction: column;
    align-items: stretch;
  }
  [data-notification-footer-actions] > :is(button, a),
  [data-notification-trailing-slot] > :is(button, a),
  [data-notification-leading-slot] > :is(button, a) {
    width: 100%;
  }
}

@supports (max-height: 100dvh) {
  @media (max-width: 480px) {
    .sheet { max-height: 92dvh; }
    #notificationPanel { height: 92dvh; }
    .treatment-transition-sheet,
    .waiting-case-action-sheet,
    .treatment-schedule-query-sheet { height: 100dvh; max-height: 100dvh; }
    #therapistViewTabs:not(.hidden) ~ #weekBrowser:not(.hidden) ~ #scheduleList {
      min-height: calc(100dvh - var(--p4-sticky-stack-max-height));
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .session-card { animation: rise .35s ease both; }
  .session-card:nth-child(2) { animation-delay: .04s; }
  .session-card:nth-child(3) { animation-delay: .08s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}

.notification-announcement-composer,
.notification-history-search-form {
  display: grid;
  gap: var(--space-3);
  margin: 0 var(--space-4) var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.notification-announcement-composer.hidden,
.notification-announcement-composer .hidden,
.notification-history-search-view.hidden,
.notification-history-load-more.hidden {
  display: none;
}

.notification-announcement-composer .form-grid {
  margin: 0;
}

.notification-announcement-composer :is(select,input,textarea) {
  min-width: 0;
  max-width: 100%;
}

.notification-history-search-view {
  min-width: 0;
}

.notification-history-search-field {
  margin: 0;
}

.notification-history-search-field input {
  width: 100%;
  min-width: 0;
  font-size: 16px;
}

.notification-history-date-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: var(--space-2);
}
.notification-history-date-fields[hidden] { display: none; }

.notification-history-date-fields label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.notification-history-date-fields input {
  min-height: 44px;
  font-size: 16px;
}

.notification-history-search-actions,
.notification-holiday-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.notification-history-search-summary {
  margin: 0;
  color: var(--text-caption);
  font-size: 13px;
  line-height: 20px;
}
.notification-history-search-summary:empty { display: none; }

.notification-history-load-more {
  margin: var(--space-2) auto var(--space-5);
}

.notification-holiday-candidate-form {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

@media (max-width: 390px) {
  .notification-history-date-fields { grid-template-columns: 1fr; }
}
