.collab-buttons .reject-action {
  background: #fff0f1;
  color: #a14751;
}

.complete.status-only {
  display: inline-grid;
  place-items: center;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  background: #f0eff6;
  border-color: #d7d4e5;
  color: #5d5870;
}

.task.done .complete.status-only { background: #20b777; border-color: #20b777; color: #fff; }
.collab-buttons .message-action { background: #e9f1ff; color: #345f98; }
.collab-buttons .delete-action, .clear-done-button { background: #fff0f1; color: #a14751; }
.clear-done-button { min-height: 38px; padding: 8px 12px; border-radius: 9px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.task-preset-message {
  width: calc(100% - 34px);
  margin: 2px 0 0 34px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff7db;
  color: #6f5713;
  font-size: .78rem;
  line-height: 1.35;
}

.task-inbox { margin: -12px 0 20px; overflow: hidden; border: 1px solid #d9d6f2; border-radius: 17px; background: #fff; box-shadow: 0 10px 28px #29265112; }
.inbox-head { min-height: 64px; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 16px; background: #f8f7ff; }
.inbox-head > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-head strong { font-size: .94rem; }
.inbox-head small { overflow: hidden; color: #757086; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-icon { color: #625cdb; font-size: .8rem; }
#inboxCount { min-width: 28px; padding: 5px 8px; border-radius: 999px; background: #625cdb; color: #fff; font-size: .76rem; text-align: center; }
.pending-block, .updates-block { border-top: 1px solid #e5e3ee; }
.pending-block > h3, .updates-heading { margin: 0; padding: 12px 16px 8px; color: #292651; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.pending-list { display: grid; gap: 1px; background: #e8e6f0; }
.pending-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; }
.pending-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; background: transparent; color: #292651; text-align: left; }
.pending-copy strong { overflow: hidden; font-size: .98rem; text-overflow: ellipsis; white-space: nowrap; }
.pending-copy small { color: #706b82; font-size: .78rem; }
.pending-actions { display: flex; gap: 7px; }
.pending-actions button { min-height: 44px; padding: 9px 13px; border-radius: 11px; font-weight: 780; }
.pending-accept { background: #20b777; color: #fff; }
.pending-reject { background: #fff0f1; color: #a14751; }
.updates-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.updates-heading h3 { margin: 0; font-size: inherit; }
.inbox-list { max-height: 360px; overflow: auto; border-top: 1px solid #e5e3ee; }
.inbox-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #efedf5; background: #fff; color: #292651; text-align: left; }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: #f8f7ff; }
.inbox-item > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.inbox-item strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item small { color: #777187; font-size: .76rem; }
.collab-buttons .open-action { background: #292651; color: #fff; }

.task-focus-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px #17133755;
}

.task-focus-dialog::backdrop { background: #171337b8; backdrop-filter: blur(8px); }
.focus-top { min-height: 96px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 18px; background: #292651; color: #fff; }
.focus-top .eyebrow { margin: 0 0 10px; color: #c9c5ff; }
.focus-close { color: #fff; background: #ffffff16; }
.focus-status { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #ffffff18; color: #fff; font-size: .78rem; font-weight: 750; }
.focus-status.accepted { background: #fff0c2; color: #76530e; }
.focus-status.completed { background: #d9f7e9; color: #176b48; }
.focus-body { max-height: calc(100dvh - 120px); overflow: auto; padding: 24px; }
.focus-body h2 { margin: 0; font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.2; letter-spacing: -.04em; }
.focus-meta { margin: 10px 0 20px; color: #706b82; line-height: 1.5; }
.focus-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.focus-actions button { min-height: 54px; padding: 11px 13px; border-radius: 13px; font-size: .92rem; font-weight: 760; line-height: 1.2; }
.focus-actions .focus-primary { background: #625cdb; color: #fff; }
.focus-actions .focus-message { background: #eaf2ff; color: #315d99; }
.focus-actions .focus-danger { background: #fff0f1; color: #a14751; }
.focus-activity { margin-top: 24px; padding-top: 19px; border-top: 1px solid #e5e3ee; }
.focus-activity h3 { margin-bottom: 13px; font-size: .92rem; }
.focus-timeline { display: grid; gap: 12px; }
.focus-event { display: grid; grid-template-columns: 12px 1fr; align-items: start; gap: 10px; }
.focus-event > span { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #625cdb; box-shadow: 0 0 0 4px #eceaff; }
.focus-event div { display: flex; flex-direction: column; gap: 2px; }
.focus-event strong { font-size: .86rem; }
.focus-event small { color: #7a7588; font-size: .75rem; }
.focus-empty { margin: 0; color: #7a7588; font-size: .84rem; }

.startup-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -14px 0 24px;
}

.startup-step {
  min-width: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dfdeea;
  border-radius: 15px;
  background: #fff;
  color: #292651;
  text-align: left;
}

.startup-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.startup-copy strong { font-size: .9rem; }
.startup-copy span { color: #747084; font-size: .76rem; line-height: 1.35; }

.traffic-light {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #dc4d57;
  box-shadow: 0 0 0 2px #efd6d8, 0 0 12px #dc4d5740;
}

.notification-setup.active .traffic-light {
  background: #20b777;
  box-shadow: 0 0 0 2px #c9eddd, 0 0 14px #20b77766;
}

.notification-setup.blocked .traffic-light { background: #8d8999; box-shadow: 0 0 0 2px #dddbe4; }
.setup-action { min-height: 40px; flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; background: #292651; color: #fff; font-size: .76rem; font-weight: 750; }
.notification-setup.active .setup-action { background: #dff6eb; color: #217653; }
.install-guide { cursor: pointer; }
.install-guide-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 11px; background: #292651; color: #fff; font-size: 1.15rem; }
.guide-arrow { color: #77718b; font-size: 1.6rem; }
.notify-button span { width: 11px; height: 11px; display: inline-grid; place-items: center; border-radius: 50%; background: #dc4d57; color: transparent !important; box-shadow: 0 0 0 3px #f8e3e5; }
.notify-button.active span { background: #20b777; box-shadow: 0 0 0 3px #dbf5e9; }

@media (max-width: 690px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
  body { background: #f6f6fb; }
  main { width: 100%; max-width: 560px; margin-inline: auto; box-sizing: border-box; }
  .startup-guide { grid-template-columns: 1fr; margin: -4px 0 15px; gap: 8px; }
  .startup-step { width: 100%; min-height: 72px; box-sizing: border-box; padding: 12px; }
  .notification-setup { box-shadow: 0 8px 20px #29265112; }
  .startup-copy strong { font-size: .94rem; }
  .startup-copy span { font-size: .8rem; }
  .setup-action { min-height: 44px; padding-inline: 11px; }
  .main-grid, .main-grid > *, .board, .task, .board-toolbar { width: 100%; min-width: 0; box-sizing: border-box; }
  .board { margin-inline: auto; overflow: hidden; }
  .board-heading { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 10px; text-align: center; }
  .board-heading > div { width: 100%; }
  .board-heading .outline { width: 100%; }
  .dashboard-stats { text-align: center; }
  .board-toolbar { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .filters { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .filters button { min-width: 0; white-space: nowrap; }
  .share-plan-btn { width: 100%; justify-content: center; }
  .task-preset-message { margin-left: 30px; width: calc(100% - 30px); }
  .task-inbox { margin: -4px 0 14px; }
  .inbox-head { padding: 7px 8px; }
  #inboxReadAll { padding-inline: 8px; white-space: nowrap; }
  .inbox-item { padding: 13px 12px; }
  .pending-item { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .pending-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .pending-actions button { min-height: 50px; font-size: .95rem; }
  .task-focus-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 22px; }
  .focus-top { padding: 21px 19px 17px; }
  .focus-body { padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); }
  .focus-actions { grid-template-columns: 1fr; }
  .focus-actions button { min-height: 58px; font-size: 1rem; }
  html[data-shared="true"] main { display: flex; flex-direction: column; padding-top: 10px; }
  html[data-shared="true"] .intro { display: none; }
  html[data-shared="true"] .shared-bar { order: 1; margin-bottom: 10px; }
  html[data-shared="true"] .task-inbox { order: 2; margin-bottom: 10px; }
  html[data-shared="true"] .main-grid { order: 3; display: flex; flex-direction: column; gap: 18px; }
  html[data-shared="true"] .main-grid .board { order: 1; display: flex; flex-direction: column; }
  html[data-shared="true"] .main-grid .composer { order: 2; }
  html[data-shared="true"] .board-heading { order: 1; padding-bottom: 10px; }
  html[data-shared="true"] .board-toolbar { order: 2; }
  html[data-shared="true"] #tasks { order: 3; }
  html[data-shared="true"] #empty { order: 4; }
  html[data-shared="true"] .dashboard-stats { order: 5; margin-top: 14px; margin-bottom: 10px; }
  html[data-shared="true"] .family-pulse { order: 6; }
  html[data-shared="true"] .board-bottom { order: 7; }
  html[data-shared="true"] .board > .micro { order: 8; }
  html[data-shared="true"] .quick-add { order: 4; margin-top: 18px; }
  html[data-shared="true"] .startup-guide { order: 5; margin-top: 14px; }
  html[data-shared="true"] .feedback { order: 6; }
  html[data-shared="true"] footer { order: 7; }
}
