@media (max-width: 760px) {
  #focusView.active .focus-add-time-panel {
    width: 100%; margin: 0; padding: 10px; border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px; background: rgba(255,255,255,.08); color: white;
  }
  #focusView.active .focus-add-time-panel[hidden] { display: none !important; }
  #focusView.active .focus-add-time-panel > small {
    display: block; margin-bottom: 8px; color: rgba(255,255,255,.72); font-size: 10px;
    font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  }
  #focusView.active .focus-add-time-panel > div { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
  #focusView.active .focus-add-time-panel button {
    min-height: 40px; border: 1px solid rgba(255,255,255,.28); border-radius: 11px;
    background: rgba(255,255,255,.1); color: white; font-size: 12px; font-weight: 760;
  }

  .plan-draft-inline-editor input[type="time"] {
    min-height: 52px !important; font-size: 16px !important; color: #102d25 !important;
  }
  .plan-confirmation-draft > footer { grid-template-columns: 1fr !important; }
  .plan-confirmation-draft > footer .primary-button { width: 100% !important; }

  body.couple-sheet-open { touch-action: none; overscroll-behavior: none; }
  body.couple-sheet-open .mobile-bottom-nav { visibility: hidden !important; }
  body.couple-sheet-open .couple-sheet-backdrop { z-index: 1000 !important; }
  body.couple-sheet-open #coupleAddPanel { z-index: 1001 !important; bottom: 0 !important; }

  #reviewView .review-journal-eyebrow {
    display: block; margin-bottom: 5px; color: #087a5b; font-size: 10px; font-weight: 850;
    letter-spacing: .12em;
  }
  #reviewView .review-reflection-panel h3 { margin-top: 0; }
  #reviewView .review-reflection-panel label { font-size: 13px !important; }
  #reviewView .review-reflection-panel textarea {
    min-height: 78px; border-radius: 14px !important; font-size: 16px !important; line-height: 1.4;
  }
}

/* Today: keep quick capture next to priorities instead of below the timeline. */
#todayView .today-quick-capture {
  margin: -4px 2px 22px;
  padding: 14px;
  border: 1px solid rgba(8, 92, 70, 0.14);
  border-radius: 18px;
  background: rgba(239, 249, 245, 0.72);
}

#todayView .today-quick-capture-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 10px;
}

#todayView .today-quick-capture-copy strong {
  color: var(--ink, #0b2f27);
  font-size: 15px;
}

#todayView .today-quick-capture-copy small {
  color: var(--muted, #667085);
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
}

#todayView .today-quick-capture .quick-add-input-wrapper { margin: 0; }
#todayView .today-quick-capture .quick-add-input-wrapper input { background: #fff; }

@media (max-width: 390px) {
  #todayView .today-quick-capture-copy { display: block; }
  #todayView .today-quick-capture-copy small {
    display: block;
    margin-top: 2px;
    text-align: left;
  }
}

#todayView .today-priority-picker-toggle {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid rgba(8, 122, 91, 0.24);
  border-radius: 13px;
  background: #f0faf6;
  color: #087a5b;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

#todayView .priority-empty .today-priority-picker-toggle { margin: 13px 0 0; }

#todayView .today-priority-picker {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
  background: #f7faf8;
}

#todayView .today-priority-picker > button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 61, 50, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #102d25;
  text-align: left;
}

#todayView .today-priority-picker > button > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #edf5f1;
  color: #087a5b;
  font-weight: 900;
}

#todayView .today-priority-picker > button.selected {
  border-color: rgba(8, 122, 91, 0.34);
  background: #eef9f4;
}

#todayView .today-priority-picker > button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#todayView .today-priority-picker > button small { color: #667085; }
#todayView .today-priority-picker > p { margin: 8px; color: #667085; font-size: 13px; }
/* v123: Review owns the complete action; an older mobile rule hid its third button. */
.review-task-card:not(.is-in-progress) .review-decision-actions > button:nth-child(3) {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* v124: richer Today hierarchy and unmistakable completion feedback. */
#todayView .today-card-section:has(#todayMustDoList),
#todayView #todayMustDoList {
  border-color: rgba(8, 92, 70, 0.16) !important;
  box-shadow: 0 12px 32px rgba(15, 61, 50, 0.07) !important;
}

#todayView .must-do-item {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) minmax(72px, auto) 32px !important;
  column-gap: 10px !important;
  align-items: center !important;
  min-height: 64px !important;
  margin: 6px 0;
  padding: 8px 10px !important;
  border: 1px solid rgba(15, 61, 50, 0.09) !important;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffffff 0%, #fbfdfc 100%);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

#todayView .must-do-rank {
  width: 38px !important;
  height: 38px !important;
  border-width: 2px !important;
  font-size: 15px !important;
  box-shadow: 0 4px 12px rgba(8, 122, 91, 0.10);
  place-self: center;
}

#todayView .must-do-title,
#todayView .must-do-time {
  min-width: 0;
}

#todayView .must-do-item.done {
  border-color: rgba(8, 122, 91, 0.22) !important;
  background: linear-gradient(135deg, #eaf8f2 0%, #f7fcf9 100%);
}

#todayView .must-do-item.done .must-do-rank {
  color: #fff !important;
  font-size: 20px !important;
  box-shadow: 0 6px 18px rgba(8, 122, 91, 0.25);
  transform: none;
}

#todayView .must-do-item.done .must-do-title {
  color: #32685a !important;
  text-decoration-thickness: 2px !important;
}

#todayView .section-sub-label {
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf8f2;
  color: #087a5b !important;
  text-align: center;
  font-weight: 900 !important;
}

#todayView .today-timeline-list::before {
  left: 18px !important;
  width: 2px !important;
  background: linear-gradient(#bedbd0, #e6efeb) !important;
}

#todayView .today-timeline-row {
  grid-template-columns: 40px 74px minmax(0, 1fr) !important;
  min-height: 64px !important;
  padding: 6px 8px 6px 0 !important;
}

#todayView .today-timeline-dot {
  display: grid !important;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  border-width: 2px !important;
  background: var(--item-bg) !important;
  color: var(--item-color) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  box-shadow: 0 3px 10px rgba(15, 61, 50, 0.10);
}

#todayView .today-timeline-row.active .today-timeline-dot {
  background: var(--item-color) !important;
  color: #fff !important;
}

#todayView .today-timeline-row.done {
  margin: 3px 0;
  border: 1px solid rgba(8, 122, 91, 0.15) !important;
  background: linear-gradient(90deg, #eaf8f2 0%, rgba(247, 252, 249, 0.35) 80%) !important;
}

#todayView .today-timeline-row.done .today-timeline-dot {
  width: 40px !important;
  height: 40px !important;
  border-color: #087a5b !important;
  background: #087a5b !important;
  color: #fff !important;
  font-size: 21px !important;
  box-shadow: 0 6px 16px rgba(8, 122, 91, 0.28);
}

#todayView .today-timeline-row.done .today-timeline-copy strong {
  color: #32685a;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.task-completion-celebration {
  position: fixed;
  z-index: 1300;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: min(330px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(174, 235, 207, 0.34);
  border-radius: 18px;
  background: rgba(5, 79, 61, 0.97);
  color: #fff;
  box-shadow: 0 16px 40px rgba(3, 49, 38, 0.28);
  opacity: 0;
  transform: translate(-50%, -18px) scale(0.96);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.task-completion-celebration.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.task-completion-celebration > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #91efb9, #32c98b);
  color: #064a39;
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 6px 18px rgba(50, 201, 139, 0.30);
}
.task-completion-celebration strong,
.task-completion-celebration small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-completion-celebration strong { font-size: 15px; }
.task-completion-celebration small { margin-top: 2px; color: #cce9df; font-size: 12px; }

/* Review must show real actions, not hide completion behind an ellipsis. */
#reviewView .review-decision-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  overflow: visible !important;
}
#reviewView .review-decision-actions > button:nth-child(3) { display: grid !important; place-items: center; }
#reviewView .review-decision-actions > .review-more-actions { grid-column: auto !important; }
#reviewView .review-more-actions summary {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(8, 122, 91, 0.22);
  border-radius: 11px;
  background: #f6fbf8;
  color: #087a5b;
  font-weight: 900;
}
#reviewView .review-decision-actions .review-btn { min-height: 46px !important; font-size: 11px !important; }

@media (prefers-reduced-motion: reduce) {
  .task-completion-celebration { transition: opacity 120ms linear; transform: translate(-50%, 0); }
}

/* v127: Goals are built around promises kept, not decorative progress. */
#goalsView :is(#goalTodayProof, #goalIfThenPlan, #goalProofTrail) { margin-inline: 18px; }
#goalsView .goal-today-proof {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #bfe4d5;
  border-radius: 16px;
  background: #eef9f4;
}
#goalsView .goal-today-proof div { display: grid; gap: 5px; min-width: 0; }
#goalsView .goal-today-proof small,
#goalsView .goal-if-then small,
#goalsView .goal-proof-trail small { color: #087a5b; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
#goalsView .goal-today-proof strong,
#goalsView .goal-if-then strong { color: #102a23; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
#goalsView .goal-today-proof span { color: #61766e; font-size: 13px; line-height: 1.35; }
#goalsView .goal-today-proof button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: #087a5b;
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
}
#goalsView .goal-if-then {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d8e6df;
  border-radius: 16px;
  background: white;
  color: #0d6f54;
  text-align: left;
}
#goalsView .goal-if-then span { display: grid; gap: 4px; min-width: 0; }
#goalsView .goal-if-then.is-empty strong { color: #697b75; }
#goalsView .goal-if-then i { flex: 0 0 auto; font-size: 13px; font-style: normal; font-weight: 850; }
#goalsView .goal-proof-trail { padding: 15px 16px; border: 1px solid #d8e6df; border-radius: 16px; background: #fff; }
#goalsView .goal-proof-trail-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
#goalsView .goal-proof-trail-head > div { display: grid; gap: 4px; }
#goalsView .goal-proof-trail-head strong { color: #102a23; font-size: 16px; }
#goalsView .goal-proof-trail-head > span { color: #087a5b; font-size: 12px; font-weight: 850; }
#goalsView .goal-proof-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-top: 14px; }
#goalsView .goal-proof-day { display: grid; justify-items: center; gap: 6px; border: 0; background: transparent; color: #72837d; padding: 0; }
#goalsView .goal-proof-day small { color: inherit; font-size: 9px; letter-spacing: 0; }
#goalsView .goal-proof-day b { display: grid; place-items: center; width: 27px; height: 27px; border: 1.5px solid #bed7cc; border-radius: 50%; color: white; font-size: 14px; }
#goalsView .goal-proof-day.is-complete { color: #087a5b; }
#goalsView .goal-proof-day.is-complete b { border-color: #087a5b; background: #087a5b; box-shadow: 0 4px 10px rgba(8,122,91,.2); }
#goalsView .goal-proof-trail p { margin: 12px 0 0; color: #6b7d77; font-size: 12px; line-height: 1.35; }

/* v128 — a private shared wedding runway, built from real Couple tasks. */
#coupleWeddingWorkspace:empty { display: none; }
#coupleView .wedding-start-card,
#coupleView .wedding-workspace-card {
  border: 1px solid #d8e6df;
  border-radius: 22px;
  background: linear-gradient(145deg, #fffdfa 0%, #f1faf6 100%);
  box-shadow: 0 10px 26px rgba(22, 59, 48, .06);
}
#coupleView .wedding-start-card { display: grid; gap: 16px; padding: 19px; }
#coupleView .wedding-start-card small,
#coupleView .wedding-workspace-card small { color: #087a5b; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
#coupleView .wedding-start-card h3 { margin: 5px 0 6px; color: #112e26; font-size: 23px; line-height: 1.08; }
#coupleView .wedding-start-card p { margin: 0; color: #667973; font-size: 13px; line-height: 1.45; }
#coupleView .wedding-start-card .primary-button { min-height: 48px; border-radius: 14px; }
#coupleView .wedding-workspace-card { overflow: hidden; }
#coupleView .wedding-workspace-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding: 19px 19px 16px; background: linear-gradient(135deg, #063e31, #087a5b); }
#coupleView .wedding-workspace-top small, #coupleView .wedding-workspace-top h3, #coupleView .wedding-workspace-top p { color: #fff; }
#coupleView .wedding-workspace-top small { opacity: .76; }
#coupleView .wedding-workspace-top h3 { margin: 6px 0 2px; font-size: 30px; letter-spacing: -.04em; }
#coupleView .wedding-workspace-top p { margin: 0; opacity: .78; font-size: 12px; }
#coupleView .wedding-checkin { flex: 0 0 auto; min-height: 34px; border: 1px solid rgba(255,255,255,.32); border-radius: 11px; background: rgba(255,255,255,.13); color: #fff; padding: 0 10px; font-size: 10px; font-weight: 800; }
#coupleView .wedding-week-focus { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 14px 19px; border-bottom: 1px solid #dcebe4; }
#coupleView .wedding-week-focus span { color: #087a5b; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
#coupleView .wedding-week-focus strong { color: #173b31; font-size: 13px; }
#coupleView .wedding-week-focus button { grid-row: 1 / span 2; min-height: 34px; border: 1px solid #aad9c8; border-radius: 10px; background: #fff; color: #087a5b; padding: 0 10px; font-size: 10px; font-weight: 800; }
#coupleView .wedding-project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
#coupleView .wedding-project { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 72px; border: 1px solid #dce8e3; border-radius: 14px; background: #fff; color: #173b31; padding: 9px; text-align: left; }
#coupleView .wedding-project > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #eaf6f1; color: #087a5b; font-size: 17px; }
#coupleView .wedding-project div { min-width: 0; display: grid; gap: 3px; }
#coupleView .wedding-project strong { font-size: 12px; }
#coupleView .wedding-project small { overflow: hidden; color: #71827c; font-size: 9px; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
#coupleView .wedding-project i { color: #087a5b; font-size: 16px; font-style: normal; }
@media (min-width: 761px) {
  #coupleView .wedding-start-card { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 700px) {
  #goalsView .goal-today-proof { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  #goalsView .goal-today-proof button { padding-inline: 18px; }
}
