#emudt-root {
  --emudt-accent: #087e78;
  --emudt-ink: #18273d;
  --emudt-border: #dbe4e9;
  --emudt-muted: #4c5c6d;
  font-family: "Source Sans 3", system-ui, sans-serif;
}
#emudt-root .emudt-launcher {
  position: fixed;
  z-index: 900;
  inset: auto max(24px, env(safe-area-inset-right)) min(calc(100dvh - 56px), calc(var(--emudt-launcher-bottom, 192px) + env(safe-area-inset-bottom))) auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  direction: ltr;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid #ffffffd9;
  background: linear-gradient(145deg, #09928a, #086e6e);
  color: white;
  font: 700 14px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 5px 16px #123c4740;
  transition: width 160ms ease, box-shadow 160ms ease;
}
#emudt-root .emudt-launcher:hover, #emudt-root .emudt-launcher:focus-visible { width: 106px; box-shadow: 0 6px 20px #123c4752; }
#emudt-root .emudt-launcher:focus-visible { outline: 2px solid var(--emudt-ink); outline-offset: 3px; }
#emudt-root .emudt-launcher-icon { flex: 0 0 20px; font-size: 22px; }
#emudt-root .emudt-launcher-label { opacity: 0; pointer-events: none; transition: opacity 120ms ease; }
#emudt-root .emudt-launcher:hover .emudt-launcher-label,
#emudt-root .emudt-launcher:focus-visible .emudt-launcher-label { opacity: 1; }
@media (hover: none) {
  #emudt-root .emudt-launcher { width: 106px; }
  #emudt-root .emudt-launcher-label { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #emudt-root .emudt-launcher, #emudt-root .emudt-launcher-label { transition: none; }
}
#emudt-root .emudt-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: min(600px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: 100%;
  box-sizing: border-box;
  border: 0;
  background: white;
  color: var(--emudt-ink);
  box-shadow: -12px 0 40px #132c3d29;
}
#emudt-root .emudt-drawer::backdrop { background: #14233b66; }
#emudt-root .emudt-header {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--emudt-border);
}
#emudt-root h2 { flex: 1; font-size: 1.4rem; margin: 0; }
#emudt-root h3 { font-size: 1.1rem; margin: 12px 0; }
#emudt-root .emudt-content { padding: 12px 20px 24px; }
#emudt-root .emudt-content[aria-busy='true']::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--emudt-accent);
  opacity: .55;
  pointer-events: none;
}
#emudt-root .emudt-drawer button {
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--emudt-border);
  border-radius: 6px;
  background: white;
  color: var(--emudt-ink);
  font: inherit;
  cursor: pointer;
}
#emudt-root .emudt-drawer button:disabled { cursor: wait; opacity: .55; }
#emudt-root button:focus-visible, #emudt-root input:focus-visible,
#emudt-root select:focus-visible, #emudt-root textarea:focus-visible {
  outline: 2px solid var(--emudt-accent);
  outline-offset: 2px;
}
#emudt-root .emudt-drawer .emudt-primary { color: white; background: var(--emudt-accent); border-color: var(--emudt-accent); }
#emudt-root .emudt-drawer .emudt-danger { color: #953633; }
#emudt-root .emudt-tabs { display: flex; flex-wrap: wrap; gap: 3px; border-bottom: 1px solid var(--emudt-border); }
#emudt-root .emudt-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
#emudt-root .emudt-tabs button[aria-current] { color: #096c66; border-bottom-color: var(--emudt-accent); font-weight: 700; }
#emudt-root .emudt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 12px; }
#emudt-root .emudt-filters, #emudt-root .emudt-editor { display: grid; gap: 10px; }
#emudt-root .emudt-reminder-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
#emudt-root .emudt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); background: #f5f8fa; padding: 12px; border-radius: 8px; }
#emudt-root .emudt-field { display: grid; gap: 4px; min-width: 0; font-weight: 600; }
#emudt-root .emudt-field input, #emudt-root .emudt-field select, #emudt-root textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--emudt-border);
  border-radius: 6px;
  background: white;
  color: var(--emudt-ink);
  font: inherit;
}
#emudt-root .emudt-checkbox { display: flex; align-items: center; gap: 8px; }
#emudt-root .emudt-party-selection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
#emudt-root .emudt-party-selection:empty,
#emudt-root .emudt-party-status:empty { display: none; }
#emudt-root .emudt-party-results {
  display: grid;
  gap: 4px;
  max-height: 210px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 2px;
}
#emudt-root .emudt-party-results button { display: grid; width: 100%; text-align: start; overflow-wrap: anywhere; }
#emudt-root .emudt-party-results small,
#emudt-root .emudt-party-status { color: var(--emudt-muted); }
#emudt-root .emudt-party-name { font-weight: 700; overflow-wrap: anywhere; }
#emudt-root .emudt-task, #emudt-root .emudt-group-row, #emudt-root .emudt-notice {
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--emudt-border);
}
#emudt-root .emudt-task > div { flex: 1; min-width: 0; }
#emudt-root .emudt-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--emudt-muted); }
#emudt-root .emudt-drawer .emudt-task-title { padding: 0; border: 0; font-weight: 700; text-align: start; overflow-wrap: anywhere; }
#emudt-root .emudt-drawer .emudt-complete { border-radius: 50%; color: #096c66; }
#emudt-root .emudt-priority { padding: 2px 7px; border-radius: 10px; font-size: .82em; background: #e7eef5; }
#emudt-root .emudt-high { background: #fcebe9; color: #942d2b; }
#emudt-root .emudt-low { background: #edf3ef; color: #315a45; }
#emudt-root .emudt-notes, #emudt-root .emudt-change span { white-space: pre-wrap; overflow-wrap: anywhere; }
#emudt-root .emudt-properties { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; }
#emudt-root .emudt-properties dd { margin: 0; }
#emudt-root .emudt-properties dt { font-weight: 600; }
#emudt-root .emudt-history { padding-inline-start: 22px; }
#emudt-root .emudt-history li { margin-bottom: 16px; }
#emudt-root .emudt-change { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 5px; margin-block: 7px; }
#emudt-root .emudt-change small { grid-column: 1 / -1; font-weight: 600; }
#emudt-root .emudt-message { margin: 12px 20px; padding: 10px; border-radius: 6px; background: #fcebe9; color: #7c2522; }
#emudt-root [hidden] { display: none !important; }
@media (max-width: 450px) {
  #emudt-root .emudt-header, #emudt-root .emudt-content { padding-inline: 12px; }
  #emudt-root .emudt-filters { grid-template-columns: 1fr; }
}
#emudt-root .emudt-unread {
  position: absolute;
  inset: -6px -5px auto auto;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 3px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 2px solid white;
  background: #b32236;
  color: white;
  font: 750 12px/1 system-ui, sans-serif;
  pointer-events: none;
}
#emudt-root .emudt-toast-region {
  position: fixed;
  z-index: 950;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  width: min(365px, calc(100vw - 32px));
}
#emudt-root .emudt-toast-region:empty { display: none; }
#emudt-root .emudt-drawer .emudt-toast-region { left: auto; right: max(16px, env(safe-area-inset-right)); }
#emudt-root button.emudt-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  text-align: start;
  color: var(--emudt-ink);
  background: white;
  border: 1px solid var(--emudt-border);
  border-inline-start: 4px solid var(--emudt-accent);
  border-radius: 10px;
  box-shadow: 0 6px 22px #0a21373d;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
}
#emudt-root .emudt-toast::after {
  position: absolute;
  content: '';
  inset: auto 0 0;
  height: 2px;
  background: var(--emudt-accent);
  transform-origin: left;
  animation: emudt-toast-time var(--emudt-toast-duration) linear forwards;
}
@keyframes emudt-toast-time { to { transform: scaleX(0); } }
#emudt-root .emudt-toast-copy { display: grid; gap: 2px; overflow-wrap: anywhere; }
#emudt-root .emudt-toast-copy strong { text-align: start; }
#emudt-root .emudt-toast-copy small { color: var(--emudt-muted); }
#emudt-root .emudt-toast-label { color: #096c66; font-weight: 700; }
#emudt-root .emudt-toast-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #e1f4ef; color: #096c66; }
#emudt-root .emudt-toast-arrow { color: #096c66; font-size: 24px; }
@media (max-width: 640px) {
  #emudt-root .emudt-toast-region {
    bottom: min(calc(100dvh - 104px), calc(var(--emudt-launcher-bottom, 192px) + 62px + env(safe-area-inset-bottom)));
  }
  #emudt-root .emudt-drawer .emudt-toast-region { bottom: max(18px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  #emudt-root .emudt-toast::after { animation: none; }
}
#emudt-root .emudt-reminder {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 8px;
  color: #125c56;
  background: #dff3f0;
}
