@media (max-width: 900px) {
  html,
  body,
  .app-shell,
  #todayView {
    max-width: 100%;
    overflow-x: hidden;
  }

  #todayView .mobile-time-flow {
    max-width: 100%;
    overflow: hidden;
  }

  #todayView .mobile-flow-segment {
    min-width: 0;
  }

  #todayView .mobile-planner-card {
    padding: 14px;
  }

  #todayView .section-head.compact {
    margin-bottom: 10px;
  }

  #todayView .mobile-planner-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  #todayView .mobile-planner-panel {
    min-height: auto;
    border-radius: 14px;
    padding: 13px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.045);
  }

  #todayView .top3-panel {
    border-color: rgba(255, 117, 0, 0.32);
    background:
      linear-gradient(145deg, rgba(255, 247, 237, 0.92), rgba(255, 255, 255, 0.98)),
      #ffffff;
  }

  #todayView .mobile-planner-panel h4 {
    margin-bottom: 10px;
    align-items: center;
  }

  #todayView .mobile-planner-list {
    gap: 8px;
  }

  #todayView .mobile-task {
    min-height: 72px;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    gap: 9px;
    align-items: start;
    padding: 9px;
    border: 1px solid rgba(220, 229, 239, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: none;
    position: relative;
  }

  #todayView .mobile-task.is-top {
    background: rgba(255, 255, 255, 0.94);
  }

  #todayView .mobile-task.menu-open {
    border-color: rgba(0, 134, 111, 0.28);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.08);
  }

  #todayView .mobile-task-check,
  #todayView .mobile-task-more {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    margin-top: 4px;
  }

  #todayView .mobile-task-check {
    border-color: #d8e1ed;
    background: #ffffff;
  }

  #todayView .mobile-task-more {
    color: #748197;
    letter-spacing: -1px;
  }

  #todayView .mobile-task-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
  }

  #todayView .mobile-task-title {
    min-height: 36px;
    max-height: 38px;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #121a2b;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.25;
    padding: 0;
    resize: none;
    outline: none;
    overflow: hidden;
    font-family: inherit;
  }

  #todayView .mobile-task-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #617087;
    font-size: 11px;
    font-weight: 800;
  }

  #todayView .mobile-task-meta small {
    min-width: 0;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #todayView .mobile-category-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--task-color);
    flex: 0 0 auto;
  }

  #todayView .mobile-time-chip {
    min-height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 117, 0, 0.11);
    color: #e45f00;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  #todayView .mobile-time-chip.planned {
    background: rgba(0, 134, 111, 0.11);
    color: #006b5d;
  }

  #todayView .mobile-task-actions {
    position: absolute;
    right: 8px;
    top: 42px;
    z-index: 20;
    width: 166px;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(220, 229, 239, 0.95);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 38px rgba(16, 24, 40, 0.16);
  }

  #todayView .mobile-task-actions button {
    min-height: 32px;
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: #f7fafc;
    color: #26344a;
    font-size: 12px;
    font-weight: 850;
    text-align: left;
    padding: 0 10px;
  }

  #todayView .mobile-task-actions button:last-child {
    color: #c83f52;
    background: #fff5f6;
  }

  #todayView .mobile-inline-add {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    margin-top: 10px;
  }

  #todayView .mobile-inline-add input {
    min-height: 42px;
    border-radius: 12px;
    font-size: 13px;
  }

  #todayView .mobile-inline-add button {
    border-radius: 12px;
    font-size: 20px;
  }

  #todayView .mobile-plan-all {
    width: 100%;
    min-height: 44px;
    margin-top: 9px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #00866f, #006b5d);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 22px rgba(0, 107, 93, 0.18);
  }

  #todayView .mobile-bullet {
    min-height: 46px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 8px 9px;
    border: 1px solid rgba(220, 229, 239, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
  }

  #todayView .mobile-bullet button {
    width: 28px;
    height: 28px;
    border-radius: 10px;
  }

  #todayView .mobile-bullet input {
    font-size: 14px;
    font-weight: 830;
  }

  #todayView .mobile-ritual-row {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 40px;
    align-items: start;
    padding: 7px 0;
    border-bottom: 1px solid rgba(225, 232, 241, 0.8);
  }

  #todayView .mobile-ritual-row:last-child {
    border-bottom: 0;
  }

  #todayView .mobile-ritual-row strong {
    font-size: 12px;
  }

  #todayView .mobile-ritual-row span {
    font-size: 12px;
    line-height: 1.32;
  }

  #todayView .mobile-ritual-row textarea {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.86);
    color: #253149;
    padding: 8px 9px;
    font: inherit;
    font-size: 12px;
    font-weight: 780;
    line-height: 1.32;
    outline: none;
    resize: vertical;
  }

  #todayView .mobile-ritual-row textarea:focus {
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 134, 111, 0.16);
  }
}

/* v131 responsive layout contract — desktop is a dashboard, phone remains a focused column. */
@media (min-width: 761px) {
  #todayView {
    width: min(100%, 1240px) !important;
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 24px 0 40px !important;
  }

  #todayView .today-clean-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr) !important;
    grid-template-areas:
      "header header"
      "now top3"
      "timeline quick" !important;
    align-items: start !important;
    gap: 20px !important;
    padding: 0 !important;
  }

  #todayView .today-top-bar { grid-area: header; padding: 0 4px 4px !important; }
  #todayView .now-hero-card { grid-area: now; min-height: 236px; }
  #todayView .today-card-section:first-of-type { grid-area: top3; }
  #todayView .today-quick-capture { grid-area: quick; }
  #todayView .today-card-section:last-of-type { grid-area: timeline; }

  #todayView .today-card-section,
  #todayView .today-quick-capture,
  #todayView .now-hero-card {
    margin: 0 !important;
    min-width: 0 !important;
  }

  #todayView .today-timeline-row {
    display: grid !important;
    grid-template-columns: 44px 94px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 72px !important;
    padding: 12px 16px !important;
    border: 1px solid #e3ebe7 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(11, 67, 54, .045) !important;
    text-align: left !important;
  }

  #todayView .today-timeline-row:hover {
    border-color: #9dd5c3 !important;
    transform: translateY(-1px);
  }

  #todayView .today-timeline-dot { justify-self: center; }
  #todayView .today-timeline-time { font-variant-numeric: tabular-nums; }
  #todayView .today-timeline-copy { min-width: 0; }
  #todayView .today-timeline-copy strong,
  #todayView .today-timeline-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #todayView .timeline-period-label { margin: 14px 0 6px !important; }

  #todayView .must-do-item { min-height: 64px; }
  #todayView .today-quick-capture { align-self: start; }
}

@media (min-width: 761px) and (max-width: 1020px) {
  #todayView .today-clean-container {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 760px) {
  #todayView {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: max(12px, env(safe-area-inset-top, 0px)) 0 calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #todayView .today-timeline-row {
    display: grid !important;
    grid-template-columns: 42px 76px minmax(0, 1fr) !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  #todayView .today-timeline-copy,
  #todayView .today-timeline-copy strong,
  #todayView .today-timeline-copy small,
  #todayView .must-do-title,
  #todayView .must-do-time {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #todayView .today-timeline-time { font-size: 12px !important; white-space: nowrap !important; }
  #todayView .today-timeline-dot { width: 34px !important; height: 34px !important; }
}

/* V88 focus/account pass: scheduled sessions, floating timer, cleaner login state. */
.focus-pill {
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0, 78, 68, 0.28);
}

.focus-pill em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 62px;
  color: #ffffff;
  font-size: 18px;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.focus-pill #pillBreak,
.focus-pill #pillDone {
  grid-row: auto;
  width: auto;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.focus-pill #pillToggle {
  display: none;
}

.focus-pill.on-break {
  background: #6f5ce8;
}

.signed-in-card {
  min-height: 112px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.signed-in-card > span {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(145deg, #00866f, #00b18e);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 950;
}

.signed-in-card small {
  color: #00866f;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.signed-in-card strong {
  display: block;
  margin-top: 3px;
  color: #121a2b;
  font-size: 18px;
}

.signed-in-card p {
  margin: 5px 0 0;
  color: #66758e;
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 760px) {
  .focus-pill {
    left: 12px !important;
    right: 12px !important;
    bottom: 86px !important;
    z-index: 60;
    min-width: 0;
    min-height: 62px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 4px 8px;
    padding: 10px 11px;
  }

  .focus-pill.hidden {
    display: none !important;
  }

  .focus-pill span {
    grid-column: 1;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .focus-pill strong {
    grid-column: 1;
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .focus-pill em {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 54px;
    font-size: 17px;
  }

  .focus-pill #pillBreak,
  .focus-pill #pillDone {
    grid-row: 1 / span 2;
    align-self: center;
    height: 38px;
    padding: 0 9px;
    background: rgba(255, 255, 255, 0.16);
  }

  .focus-room {
    border-radius: 24px !important;
    background:
      radial-gradient(circle at 14% 0, rgba(255, 117, 0, 0.18), transparent 36%),
      linear-gradient(145deg, #101828, #0f766e) !important;
    color: #ffffff;
  }

  .focus-room h3,
  .focus-room span,
  .focus-room p {
    color: #ffffff !important;
  }

  .focus-timer {
    color: #ffffff !important;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  }

  .focus-buttons {
    grid-template-columns: 1fr 1fr !important;
  }

  .focus-buttons #focusStart {
    grid-column: 1 / -1;
  }

  .signed-in-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .signed-in-card > button {
    grid-column: 1 / -1;
  }
}

/* v105: authoritative iPhone containment and action-first Today header */
@media (max-width: 760px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html,
  body,
  .app-shell,
  .main,
  .view,
  .today-clean-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html,
  body {
    overflow-x: clip !important;
  }

  .today-clean-container {
    padding: 12px 14px 22px !important;
    gap: 12px !important;
  }

  .today-top-bar {
    width: 100%;
    min-width: 0;
    padding: 4px 2px 2px !important;
    align-items: flex-end !important;
    gap: 10px;
  }

  .today-top-date {
    min-width: 0;
  }

  .today-top-date small {
    display: block;
    margin-bottom: 2px;
    color: #087a5b !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
    text-transform: none !important;
  }

  .today-top-date h2 {
    margin: 0 !important;
    font-size: 30px !important;
    line-height: 1 !important;
    letter-spacing: -.045em;
  }

  .today-top-date p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 11px;
    font-weight: 650;
  }

  .today-top-right {
    flex: 0 1 auto;
    min-width: 0;
  }

  .today-goal-pill {
    width: auto !important;
    max-width: 116px !important;
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    font-size: 10px !important;
  }

  .now-hero-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 17px !important;
    gap: 13px !important;
    overflow: hidden;
    border: 1px solid #174f42 !important;
    border-left: 1px solid #174f42 !important;
    border-radius: 20px !important;
    background:
      radial-gradient(circle at 100% 0, rgba(38, 190, 143, .22), transparent 42%),
      linear-gradient(145deg, #063f34 0%, #082f2a 100%) !important;
    box-shadow: 0 14px 30px rgba(4, 63, 52, .16) !important;
  }

  .now-card-top {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px !important;
    min-width: 0;
    margin: 0 !important;
  }

  .now-badge {
    background: rgba(255,255,255,.12) !important;
    border: 1px solid rgba(255,255,255,.18);
    color: #8df0d0 !important;
  }

  .now-time-pill {
    min-width: 0;
    overflow: hidden;
    color: #c6d9d3 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .now-card-main {
    min-width: 0;
  }

  .now-card-main h3 {
    color: #fff !important;
    font-size: clamp(21px, 6vw, 25px) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
  }

  .now-card-step {
    color: #b9d8ce !important;
    font-size: 12px !important;
    font-weight: 650 !important;
  }

  .primary-focus-btn,
  .primary-focus-btn:disabled {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    background: #16c892 !important;
    color: #052e27 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  }

  .today-card-section,
  .today-section-head,
  .today-must-do-list,
  .must-do-item,
  .today-timeline-list,
  .today-timeline-row,
  .quick-add-input-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .today-card-section {
    padding: 13px !important;
  }

  .today-section-head {
    gap: 8px;
  }

  .today-section-head h3 {
    flex: 0 0 auto;
  }

  .section-sub-label,
  .text-link-btn {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .must-do-item {
    grid-template-columns: 28px minmax(0,1fr) minmax(46px, auto) 26px !important;
    gap: 7px !important;
    padding: 10px 8px !important;
  }

  .must-do-time {
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quick-add-input-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 46px !important;
    gap: 7px !important;
  }

  .quick-add-input-wrapper input,
  .quick-add-input-wrapper button {
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 6px env(safe-area-inset-bottom, 0px) !important;
    overflow: hidden !important;
  }

  .mobile-nav-item {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 4px 0 !important;
    font-size: 9px !important;
  }
}



@media (max-width: 760px) {
  #todayView .mobile-planner-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(226, 233, 242, 0.95);
    background: linear-gradient(180deg, #ffffff 0%, #fffdfb 100%);
    box-shadow: 0 12px 34px rgba(16, 24, 40, 0.06);
  }

  #todayView .mobile-planner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  #todayView .mobile-planner-head h3 {
    margin: 0;
    color: #172033;
    font-size: 20px;
    line-height: 1.05;
    text-transform: none;
  }

  #todayView .mobile-planner-head p {
    margin: 4px 0 0;
    color: #66758e;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.25;
  }

  #todayView .mobile-template-button {
    flex: 0 0 auto;
    min-height: 36px;
    border: 1px solid #d9efe9;
    border-radius: 12px;
    background: #f5fbf9;
    color: #006b5d;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
  }

  #todayView .mobile-planner-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  #todayView .mobile-planner-panel {
    min-height: auto;
    border-radius: 14px;
    padding: 13px;
    overflow: visible;
  }

  #todayView .mobile-planner-panel h4 {
    margin-bottom: 11px;
    color: #26344a;
    font-size: 12px;
    letter-spacing: 0;
  }

  #todayView .mobile-planner-list {
    display: grid;
    gap: 9px;
  }

  #todayView .mobile-task {
    min-height: 76px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(220, 229, 239, 0.92);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.035);
    position: relative;
  }

  #todayView .mobile-task.is-top {
    border-color: rgba(0, 134, 111, 0.2);
  }

  #todayView .mobile-task.menu-open {
    z-index: 8;
    border-color: rgba(0, 134, 111, 0.36);
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.14);
  }

  #todayView .mobile-task .mobile-task-check,
  #todayView .mobile-task .mobile-task-more {
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 10px;
  }

  #todayView .mobile-task .mobile-task-check {
    border: 1px solid #d9e3ef;
    background: #ffffff;
    color: #ffffff;
  }

  #todayView .mobile-task.done .mobile-task-check {
    border-color: var(--task-color);
    background: var(--task-color);
  }

  #todayView .mobile-task .mobile-task-more {
    border: 0;
    background: transparent;
    color: #8190a6;
    font-size: 15px;
    letter-spacing: -2px;
  }

  #todayView .mobile-task-copy {
    min-width: 0;
    display: grid;
    gap: 7px;
  }

  #todayView .mobile-task-title {
    width: 100%;
    min-width: 0;
    min-height: 22px;
    max-height: 42px;
    border: 0;
    background: transparent;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.22;
    outline: none;
    overflow: hidden;
    padding: 0;
    resize: none;
  }

  #todayView .mobile-task.done .mobile-task-title {
    color: #6b7890;
    text-decoration: line-through;
  }

  #todayView .mobile-task-subrow {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  #todayView .mobile-time-chip,
  #todayView .mobile-time-label {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 23px;
    min-height: 23px;
    max-width: none;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 117, 0, 0.11);
    color: #e45f00;
    overflow: hidden;
    padding: 0 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 950;
  }

  #todayView .mobile-time-chip.planned,
  #todayView .mobile-time-label.planned {
    background: rgba(0, 134, 111, 0.12);
    color: #006b5d;
  }

  #todayView .mobile-category-label {
    flex: 0 1 auto;
    width: auto;
    height: auto;
    min-width: 0;
    max-width: none;
    margin-left: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: #66758e;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #todayView .mobile-category-label i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--task-color);
    flex: 0 0 auto;
  }

  #todayView .mobile-task .mobile-time-label,
  #todayView .mobile-task .mobile-category-label {
    width: auto;
    height: auto;
  }

  #todayView .mobile-task-meta,
  #todayView .mobile-category-dot {
    display: none;
  }

  #todayView .mobile-task-actions {
    position: absolute;
    top: 42px;
    right: 9px;
    z-index: 25;
    width: 168px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(220, 229, 239, 0.95);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);
  }

  #todayView .mobile-task-actions button {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f7fafc;
    color: #26344a;
    padding: 0 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 900;
  }

  #todayView .mobile-task-actions button:last-child {
    background: #fff5f6;
    color: #c83f52;
  }

  #todayView .mobile-inline-add {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    margin-top: 10px;
  }

  #todayView .mobile-inline-add input {
    min-height: 42px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 800;
  }

  #todayView .mobile-inline-add button,
  #todayView .mobile-plan-all {
    border-radius: 13px;
  }

  #todayView .mobile-flow-empty,
  #todayView .mobile-timeline-empty {
    border: 1px dashed rgba(0, 134, 111, 0.28);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(236, 248, 244, 0.86), rgba(255, 255, 255, 0.96));
    color: #006b5d;
    padding: 16px;
    font-weight: 900;
    text-align: center;
  }

  #todayView .mobile-timeline-empty {
    display: grid;
    gap: 5px;
    min-height: 116px;
    place-items: center;
  }

  #todayView .mobile-timeline-empty strong {
    color: #172033;
    font-size: 16px;
  }

  #todayView .mobile-timeline-empty span {
    max-width: 270px;
    color: #65758d;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 780;
  }

  #todayView .mobile-timeline-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  #todayView .mobile-timeline-row.live {
    padding: 4px;
    border-radius: 18px;
    background:
      linear-gradient(135deg, rgba(0, 134, 111, 0.14), rgba(255, 117, 0, 0.08)),
      #ffffff;
    box-shadow: 0 14px 32px rgba(0, 107, 93, 0.14);
  }

  #todayView .mobile-timeline-row.live .mobile-timeline-main {
    min-height: 78px;
    border-color: rgba(0, 134, 111, 0.34);
    box-shadow: inset 4px 0 0 var(--block-color);
  }

  #todayView .mobile-timeline-row.live .mobile-time-copy strong::before {
    content: "Now: ";
    color: #00866f;
  }

  #todayView .mobile-timeline-row.live .mobile-timeline-main em {
    background: #00866f;
    color: #ffffff;
  }

  #todayView .mobile-task .mobile-task-more {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 3px;
    background: #f6f9fc;
    border: 1px solid rgba(222, 230, 241, 0.9);
  }

  #todayView .mobile-task .mobile-task-more span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #73839b;
    display: block;
  }

  #todayView .mobile-bullet {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid rgba(220, 229, 239, 0.92);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
  }

  #todayView .mobile-bullet button {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #ffffff;
  }

  #todayView .mobile-bullet.done button {
    border-color: #00866f;
    background: #00866f;
  }

  #todayView .mobile-bullet.done input {
    color: #6b7890;
    text-decoration: line-through;
  }

  .mobile-action-sheet {
    border-radius: 22px 22px 0 0;
  }

  .sheet-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e7edf4;
    border-radius: 14px;
    background: #fbfcff;
  }

  .sheet-form label {
    min-width: 0;
    display: grid;
    gap: 5px;
  }

  .sheet-form label:nth-child(3),
  .sheet-save-time {
    grid-column: 1 / -1;
  }

  .sheet-form span {
    color: #66758e;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
  }

  .sheet-form input,
  .sheet-form select {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    padding: 0 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
  }

  .sheet-save-time {
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #00a98f, #007a6a);
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
  }

  .sheet-actions.compact {
    grid-template-columns: 1fr;
  }

  #todayView .mobile-plan-coach-card {
    padding: 14px;
    border-radius: 18px;
    gap: 12px;
  }

  #todayView .plan-coach-hero {
    gap: 10px;
  }

  #todayView .plan-coach-hero h3 {
    font-size: 19px;
  }

  #todayView .plan-coach-hero p {
    font-size: 12px;
  }

  #todayView .plan-coach-hero > span {
    min-width: 56px;
    min-height: 44px;
    border-radius: 14px;
    font-size: 16px;
  }

  #todayView .plan-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #todayView .plan-readiness-item {
    min-height: 68px;
    padding: 10px;
    border-radius: 13px;
  }

  #todayView .plan-readiness-item strong {
    font-size: 17px;
  }

  #todayView .plan-coach-actions {
    grid-template-columns: 1fr 0.82fr;
    gap: 8px;
  }

  #todayView .plan-coach-actions button {
    min-width: 0;
    min-height: 46px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 950;
  }
}

/* V87 plain planner pass: make the first screen feel like a simple mobile app. */
@media (max-width: 760px) {
  .mobile-brand small {
    font-weight: 750;
  }

  .mobile-mantra {
    color: #6b7890;
    font-size: 11px;
    font-style: normal;
    font-weight: 750;
  }

  #todayView .today-layout {
    gap: 12px;
    padding-bottom: 84px;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Hide all unnecessary, duplicate, or secondary cards on mobile Today view */
  #todayView .mission-card,
  #todayView .final-today-grid,
  #todayView .revolut-balance-row,
  #todayView .mobile-pocket-card,
  #todayView .mobile-couple-card,
  #todayView .mobile-flow-card,
  #todayView .mobile-plan-coach-card,
  #todayView .mobile-coach-card,
  #todayView .coach-rail,
  #todayView .daily-practice-card,
  #todayView .planner-spread,
  #todayView .day-map-card,
  #todayView .clarity-card,
  #todayView .switch-card,
  #todayView .recovery-card,
  #todayView .audio-card,
  #todayView .score-note,
  #todayView .todo-panel,
  #todayView .brain-panel,
  #todayView .ritual-panel {
    display: none !important;
  }

  #todayView .revolut-command-card {
    order: 1;
    border: 0;
    border-radius: 20px;
    padding: 16px;
    background: linear-gradient(145deg, #101827, #0c2a25 62%, #03110f);
    max-width: 100%;
    box-sizing: border-box;
  }

  #todayView .mobile-planner-card {
    order: 2;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #e3ebf4;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
    max-width: 100%;
    box-sizing: border-box;
  }

  #todayView .mobile-timeline-card {
    order: 3;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #e3ebf4;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
    max-width: 100%;
    box-sizing: border-box;
  }

  #todayView .mobile-planner-head h3,
  #todayView .mobile-timeline-card h3 {
    color: #121a2b;
    font-size: 22px;
    font-weight: 950;
    text-transform: none;
  }

  #todayView .mobile-planner-head p {
    color: #66758e;
    font-size: 13px;
    font-weight: 760;
  }

  #todayView .mobile-template-button,
  #todayView .mobile-timeline-tools .text-button,
  #todayView .section-head.compact .text-button {
    min-height: 34px;
    border: 1px solid #e5edf5;
    border-radius: 999px;
    background: #f8fafc;
    color: #22314a;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 850;
  }

  #todayView .message-planner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 8px;
    margin: 12px 0 14px;
    padding: 7px;
    border: 1px solid #e1e9f3;
    border-radius: 18px;
    background: #f8fafc;
  }

  #todayView .message-planner input {
    min-width: 0;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: #121a2b;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 760;
    outline: none;
  }

  #todayView .message-planner input:focus {
    box-shadow: 0 0 0 2px rgba(0, 134, 111, 0.16);
  }

  #todayView .message-planner button {
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    background: #00866f;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
  }

  #todayView .mobile-planner-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  #todayView .mobile-planner-panel {
    border-radius: 18px;
    padding: 14px;
    border: 1px solid #e5edf5;
    background: #ffffff !important;
    box-shadow: none;
  }

  #todayView .mobile-planner-panel h4 {
    margin-bottom: 12px;
    color: #26344a;
    font-size: 13px;
    font-weight: 950;
    text-transform: none;
  }

  #todayView .mobile-planner-panel h4 span {
    width: 24px;
    height: 24px;
    border-radius: 9px;
  }

  #todayView .mobile-task {
    min-height: 64px;
    grid-template-columns: 32px minmax(0, 1fr) 34px;
    border-radius: 16px;
    padding: 10px;
    border: 1px solid #e4ecf5;
    background: #fbfdff;
  }

  #todayView .mobile-task-title {
    min-height: 22px;
    color: #121a2b;
    font-size: 15px;
    font-weight: 850;
  }

  #todayView .mobile-task-subrow {
    gap: 6px;
  }

  #todayView .mobile-category-label,
  #todayView .mobile-time-label {
    min-height: 24px;
    border-radius: 999px;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
  }

  #todayView .mobile-category-label {
    background: var(--task-bg);
    color: var(--task-color);
  }

  #todayView .mobile-time-label {
    background: #fff3e8;
    color: #db6100;
  }

  #todayView .mobile-time-label.planned {
    background: #e8f7f2;
    color: #006b5d;
  }

  #todayView .mobile-inline-add {
    grid-template-columns: minmax(0, 1fr) 46px;
    margin-top: 12px;
  }

  #todayView .mobile-inline-add input {
    min-height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }

  #todayView .mobile-inline-add button {
    border-radius: 14px;
    background: #effaf6;
  }

  #todayView .mobile-plan-all {
    min-height: 48px;
    border-radius: 15px;
    background: #00866f;
  }

  #todayView .mobile-bullet {
    min-height: 46px;
    border-radius: 15px;
    border: 1px solid #e4ecf5;
    background: #fbfdff;
    padding: 8px 10px;
  }

  #todayView .mobile-bullet input {
    font-size: 14px;
    font-weight: 760;
  }

  #todayView .mobile-ritual-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  #todayView .mobile-ritual-row textarea {
    min-height: 38px;
    border-radius: 14px;
    background: #f8fafc;
  }

  #todayView .mobile-timeline-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #todayView .mobile-timeline-row {
    border-radius: 17px;
    border: 1px solid #e4ecf5;
    background: #fbfdff;
  }

  #todayView .mobile-timeline-main {
    min-height: 68px;
  }
}
/* Private beta v91: one calm task system and five primary destinations. */
.mobile-pocket-card,
.mobile-couple-card,
.mobile-flow-card,
.mobile-plan-coach-card,
.mobile-coach-card,
.coach-rail,
.daily-practice-card,
.evidence-card,
.switch-card,
.recovery-card,
.audio-card,
.score-note,
.minimum-viable-day,
.streak-cell,
.identity-cell,
.planner-ritual-hidden,
.danger-setting {
  display: none !important;
}

.launch-panel,
.account-roadmap-panel {
  display: none !important;
}

.planner-spread .blocks-card,
.planner-spread .task-card,
.planner-spread .recovery-lane-card,
.day-map-card,
.mobile-planner-panel.todo-panel,
.mobile-planner-panel.brain-panel,
.mobile-planner-panel.ritual-panel {
  display: none !important;
}

.countdown-hidden {
  visibility: hidden;
}

.goals-beta {
  display: grid;
  gap: 16px;
}

.vision-board {
  overflow: hidden;
  background: linear-gradient(135deg, #fff9f2 0%, #f2fbf8 55%, #f4f3ff 100%);
}

.vision-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.vision-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(0, 134, 111, 0.16);
  background-color: rgba(255, 255, 255, 0.88);
  background-position: center;
  background-size: cover;
  color: #111827;
  position: relative;
}

.vision-card > span {
  display: block;
  margin-bottom: 30px;
  font-size: 32px;
}

.vision-card h3,
.vision-card p {
  margin: 4px 0;
}

.vision-card button,
.goal-actions button,
.goal-milestones button,
.review-task button,
.couple-unshare {
  border: 0;
  background: #eef7f4;
  color: #006b59;
  min-height: 36px;
  padding: 8px 11px;
  font: inherit;
  cursor: pointer;
}

.goal-card-head,
.goal-actions,
.review-task > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.goal-card-head > span {
  font-size: 26px;
}

.goal-card.primary-goal {
  outline: 2px solid #00866f;
  outline-offset: -2px;
}

.goal-card.paused {
  opacity: 0.65;
}

.goal-milestones {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.goal-milestones button {
  text-align: left;
  background: #f6f8fa;
  color: #283548;
}

.goal-actions .danger {
  background: #fff1f2;
  color: #b42335;
}

.review-unfinished-panel {
  grid-column: 1 / -1;
}

.review-unfinished-list,
.review-history {
  display: grid;
  gap: 10px;
}

.review-task,
.saved-review {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e3e9ef;
  background: #fff;
}

.saved-review p,
.saved-review small,
.saved-review em {
  margin: 0;
}

.couple-share-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.couple-unshare {
  margin: 8px 12px 12px;
}

#pillToggle {
  display: inline-flex !important;
}

@media (max-width: 760px) {
  .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .nav-item {
    min-width: 0 !important;
  }

  .focus-pill {
    bottom: 82px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
  }

  .focus-pill button,
  .focus-pill span,
  .focus-pill strong,
  .focus-pill em {
    min-width: 0;
  }

  .vision-board-grid,
  .goals-grid {
    grid-template-columns: 1fr !important;
  }

  .review-task > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .review-task button {
    width: 100%;
  }
}

/* V95 final mobile hierarchy. Product logic remains in the existing canonical state. */
.primary-goal-hero {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  overflow: hidden;
  border-radius: 8px;
  background: #073f3a;
  color: #fff;
  padding: 24px;
}

.primary-goal-hero-icon {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 28px;
}

.primary-goal-hero small {
  color: #bfe7dd;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.primary-goal-hero h2 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.08;
}

.primary-goal-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.primary-goal-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

.primary-goal-hero-meta strong {
  color: #ffc27f;
}

.primary-goal-hero-meta span {
  color: rgba(255, 255, 255, 0.76);
}

.hero-edit-button,
.icon-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
}

.goal-actions > summary,
.share-day-panel > summary,
.distraction-panel > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #006b5d;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.goal-actions > summary::-webkit-details-marker,
.share-day-panel > summary::-webkit-details-marker,
.distraction-panel > summary::-webkit-details-marker {
  display: none;
}

.goal-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.review-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.review-summary > div {
  min-height: 92px;
  border: 1px solid #e4e9ef;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
}

.review-summary strong {
  color: #073f3a;
  font-size: 25px;
}

.review-summary span {
  color: #68758a;
  font-size: 12px;
  font-weight: 750;
}

.review-task > summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.review-task > summary::-webkit-details-marker {
  display: none;
}

.review-task summary span,
.review-task summary small {
  display: block;
}

.review-task summary small {
  margin-top: 4px;
  color: #748197;
}

.review-task summary em {
  border-radius: 999px;
  background: #eef8f5;
  color: #006b5d;
  padding: 8px 12px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.review-decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}

.plan-date {
  min-height: 44px;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font: inherit;
}

.is-collapsed {
  display: none !important;
}

.focus-zero-panel {
  display: none;
}

@media (max-width: 760px) {
  :root {
    --mobile-gutter: 14px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    background: #f7f8f7;
  }

  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  button,
  input,
  select,
  textarea {
    font-size: 16px;
  }

  button,
  summary,
  [role="button"] {
    touch-action: manipulation;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding: 0 var(--mobile-gutter) calc(24px + env(safe-area-inset-bottom));
  }

  .mobile-app-header {
    position: sticky;
    top: 0;
    z-index: 42;
    width: calc(100% + 20px) !important;
    margin-left: -10px !important;
    grid-template-columns: minmax(0, 1fr) 78px 40px !important;
    gap: 8px;
    border-bottom: 1px solid #e8eaed;
    background: rgba(255, 255, 255, 0.96);
    padding: max(10px, env(safe-area-inset-top)) 10px 10px !important;
    backdrop-filter: blur(18px);
  }

  .mobile-goal-summary {
    min-width: 0;
    text-align: right;
  }

  .mobile-brand {
    min-width: 0;
    gap: 8px;
  }

  .mobile-brand .brand-mark {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .mobile-brand strong {
    font-size: 14px;
    white-space: nowrap;
  }

  .mobile-brand small {
    font-size: 10px;
  }

  .mobile-mantra {
    display: none !important;
  }

  .mobile-goal-summary small,
  .mobile-goal-summary strong {
    display: block;
  }

  .mobile-goal-summary small {
    color: #8791a1;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .mobile-goal-summary strong {
    overflow: hidden;
    color: #172033;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-countdown {
    display: none !important;
  }

  .view {
    min-width: 0;
    padding-top: 12px;
  }

  .panel,
  #todayView .mobile-planner-card,
  #todayView .mobile-timeline-card,
  .mission-card {
    border: 1px solid #e3e8ed;
    border-radius: 8px !important;
    background: #fff;
    box-shadow: none !important;
  }

  #todayView .today-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #todayView .revolut-command-card,
  #todayView .mission-proof-strip,
  #todayView .mission-why,
  #todayView .mobile-plan-all,
  #todayView .mobile-timeline-tools #mobileClearTimeline,
  #todayView .mobile-timeline-tools [data-share-plan],
  .quick-dock {
    display: none !important;
  }

  #todayView .mission-card {
    display: block !important;
    order: 1;
    padding: 18px;
  }

  #todayView .mission-main {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  #todayView .mission-symbol {
    width: 46px;
    height: 46px;
  }

  #todayView .mission-copy h3 {
    margin: 4px 0 6px;
    font-size: 26px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  #todayView .mission-start {
    display: none;
  }

  #todayView .mission-poetic-line {
    margin-top: 10px;
    color: #647084;
    font-size: 13px;
  }

  #todayView .mission-fast-actions {
    margin-top: 16px;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  #todayView .mission-primary-action {
    min-height: 50px;
    border-radius: 8px;
    background: #00866f;
  }

  #todayView .mission-primary-action small {
    display: none !important;
  }

  #todayView .mission-action-orb {
    width: 46px;
    height: 46px;
    border-radius: 8px;
  }

  #todayView .mobile-planner-card {
    order: 2;
    padding: 16px;
  }

  #todayView .message-planner {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 8px;
  }

  #todayView .message-planner input,
  #todayView .message-planner button {
    min-height: 48px;
    border-radius: 8px;
  }

  #todayView .mobile-planner-grid {
    margin-top: 12px;
  }

  #todayView .mobile-planner-panel {
    padding: 0;
    border: 0;
    background: transparent;
  }

  #todayView .mobile-task {
    min-height: 60px;
    border-radius: 8px;
    background: #fff;
  }

  #todayView .mobile-task-title {
    font-size: 14px;
  }

  #todayView .mobile-time-label,
  #todayView .mobile-category-label {
    min-height: 20px;
    padding: 0;
    background: transparent !important;
  }

  #todayView .mobile-inline-add input,
  #todayView .mobile-inline-add button {
    border-radius: 8px;
  }

  #todayView .mobile-timeline-card {
    order: 3;
    padding: 16px;
  }

  #todayView .mobile-timeline-row {
    border: 0;
    border-bottom: 1px solid #edf0f3;
    border-radius: 0;
    background: transparent;
  }

  #todayView .mobile-timeline-row:last-child {
    border-bottom: 0;
  }

  #todayView .mobile-timeline-main {
    min-height: 64px;
  }

  .side-rail {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .nav {
    height: calc(70px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #e2e6eb;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 28px rgba(16, 24, 40, 0.06);
  }

  .nav-item {
    min-height: 58px !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .nav-item.active {
    color: #007a67 !important;
  }

  .full-map-layout,
  .focus-layout,
  .review-grid,
  .couple-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  #mapView .panel {
    min-width: 0;
    padding: 16px;
  }

  #mapView .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  #mapView .builder-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  #mapView .builder-route-board {
    display: grid;
    gap: 0;
  }

  #mapView .board-subhead {
    display: none;
  }

  #mapView .builder-route-row {
    border: 0;
    border-bottom: 1px solid #edf0f3;
    border-radius: 0;
    background: #fff;
  }

  #mapView .route-select {
    min-height: 72px;
    grid-template-columns: 52px 36px minmax(0, 1fr);
  }

  #mapView .route-copy small,
  #mapView .route-actions,
  #mapView .route-link {
    display: none;
  }

  #mapView .route-sheet-action {
    display: grid !important;
  }

  #mapView .inspector {
    position: static;
    max-height: none;
  }

  #mapView .inspector > p,
  #mapView .sync-note {
    display: none;
  }

  #mapView .block-editor {
    display: grid;
    gap: 12px;
  }

  #mapView .more-details {
    border-top: 1px solid #e7ebef;
    padding-top: 8px;
  }

  #mapView .more-details summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    color: #006b5d;
    font-size: 14px;
    font-weight: 850;
  }

  #mapView .more-details[open] {
    display: grid;
    gap: 10px;
  }

  #mapView .plan-backlog {
    margin-top: 18px;
    border-top: 1px solid #dfe5eb;
    padding-top: 14px;
  }

  #mapView .plan-backlog .board-subhead {
    display: flex;
  }

  #mapView .inspector-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #mapView .inspector-actions [data-action="save-block"] {
    grid-column: 1 / -1;
  }

  #mapView .inspector-actions [data-action="done-selected"],
  #mapView .inspector-actions [data-action="move-selected"],
  #mapView .inspector-actions [data-action="miss-selected"],
  #mapView .inspector-actions [data-action="auto-now"],
  #mapView .inspector-actions [data-action="delete-block"] {
    display: none;
  }

  .primary-goal-hero {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .primary-goal-hero-icon {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .primary-goal-hero h2 {
    font-size: 25px;
  }

  .hero-edit-button {
    position: absolute;
    top: 12px;
    right: 12px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .primary-goal-hero-meta {
    display: grid;
    gap: 4px;
  }

  .vision-board {
    padding: 16px;
  }

  .vision-board-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .vision-card {
    flex: 0 0 78%;
    min-height: 184px;
    border-radius: 8px;
    scroll-snap-align: start;
  }

  .vision-card > span {
    margin-bottom: 24px;
  }

  .goals-grid {
    gap: 10px;
  }

  .goal-card {
    border-radius: 8px !important;
    padding: 16px;
    box-shadow: none;
  }

  .goal-card.primary-goal {
    outline: 0;
    border-color: #91cfc0;
  }

  .couple-hero-stats,
  .share-day-preview-grid {
    display: none !important;
  }

  .couple-layout .panel {
    padding: 16px;
  }

  .couple-hero {
    background: #fff6f8;
    border-color: #f5d7e1;
  }

  .couple-shared-block {
    border-radius: 8px;
  }

  .couple-unshare {
    display: none;
  }

  .couple-add-panel {
    position: fixed;
    inset: auto 10px calc(76px + env(safe-area-inset-bottom)) 10px;
    z-index: 80;
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    box-shadow: 0 18px 70px rgba(16, 24, 40, 0.24) !important;
  }

  .couple-add-panel .icon-close {
    border-color: #dce3eb;
    color: #5f6c80;
  }

  .share-day-panel[open] > summary,
  .distraction-panel[open] > summary {
    margin-bottom: 12px;
  }

  .review-summary {
    gap: 7px;
  }

  .review-summary > div {
    min-height: 80px;
    padding: 8px 4px;
  }

  .review-summary strong {
    font-size: 22px;
  }

  .review-task {
    padding: 10px 12px;
  }

  .review-task > div {
    display: grid;
  }

  .review-decision-actions {
    grid-template-columns: 1fr !important;
  }

  body:has(#focusView.active) {
    padding-bottom: 0;
    background: #071712;
  }

  body:has(#focusView.active) .mobile-app-header,
  body:has(#focusView.active) .side-rail,
  body:has(#focusView.active) .topbar {
    display: none !important;
  }

  body:has(#focusView.active) .main {
    min-height: 100dvh;
    padding: 0;
    background: #071712;
  }

  #focusView.active {
    min-height: 100dvh;
    padding: 0;
    background: #071712;
  }

  #focusView .focus-layout {
    min-height: 100dvh;
    align-content: center;
    gap: 10px;
    padding: 24px 18px;
  }

  #focusView .focus-room {
    min-height: 570px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 30px 8px;
  }

  #focusView .focus-room h3 {
    max-width: 100%;
    font-size: 30px;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  #focusView .focus-timer {
    font-size: 72px;
    line-height: 1;
  }

  #focusView .focus-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #focusView #focusStart {
    grid-column: 1 / -1;
    min-height: 54px;
  }

  #focusView .focus-buttons button {
    min-height: 48px;
  }

  #focusView .distraction-panel {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 10px 14px;
  }

  #focusView .distraction-panel summary {
    color: rgba(255, 255, 255, 0.8);
  }

  #focusView .focus-zero-panel.open {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: end center;
    background: rgba(1, 12, 9, 0.7);
    padding: 14px;
  }

  #focusView .focus-zero-panel > div {
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    padding: 22px;
  }

  #focusView .focus-zero-panel h3 {
    margin: 5px 0 8px;
    font-size: 24px;
  }

  #focusView .focus-zero-panel p {
    margin: 0 0 18px;
    color: #68758a;
  }

  #focusView .focus-zero-panel button {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
  }

  #focusView .capture-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .focus-pill {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    border-radius: 8px !important;
  }

  .account-layout .panel {
    padding: 16px;
  }

  .workspace-panel,
  .sync-panel {
    margin-top: 0;
  }

  .mobile-action-sheet {
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(68dvh, 560px) !important;
    overflow-y: auto;
    border-radius: 18px !important;
    overscroll-behavior: contain;
  }

  .sheet-form {
    grid-template-columns: 1fr !important;
  }

  .sheet-form input,
  .sheet-form select {
    min-height: 46px;
  }

  .sheet-save-time {
    position: sticky;
    bottom: 0;
    min-height: 50px;
    z-index: 2;
  }

  .toast {
    top: auto !important;
    left: 14px;
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    max-width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
body.account-loading .account-form {
  opacity: 0.6;
  pointer-events: none;
}

.form-error {
  min-height: 1.25rem;
  margin: 0;
  color: #b42318;
  font-size: 0.82rem;
}

.simple-time-form .time-entry-help,
.simple-time-form .schedule-error,
.simple-time-form .schedule-more-options,
.vision-sheet-form label:nth-child(2) {
  grid-column: 1 / -1;
}

.time-entry-help {
  margin: 0;
  color: #66758e;
  font-size: 12px;
  line-height: 1.4;
}

.schedule-more-options {
  border-top: 1px solid #e7edf4;
  padding-top: 10px;
}

.schedule-more-options summary {
  color: #087565;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.schedule-more-options[open] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.schedule-more-options[open] summary {
  grid-column: 1 / -1;
}

.goal-edit-button,
.vision-edit-button {
  margin-left: auto;
  min-height: 38px;
  border: 1px solid #cfe3de !important;
  border-radius: 8px;
  background: #fff !important;
  color: #087565 !important;
  font-weight: 850 !important;
}

.vision-sheet-form textarea,
.goal-sheet-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  font: inherit;
  resize: vertical;
}

.workspace-invite-card,
.workspace-members {
  margin-bottom: 14px;
}

.workspace-invite-card {
  padding: 14px;
  border: 1px solid #b8dfd7;
  border-radius: 8px;
  background: #f3fbf8;
}

.workspace-invite-card strong,
.workspace-invite-card small {
  display: block;
}

.workspace-members > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e8edf2;
}

.workspace-members span,
.workspace-members small {
  display: block;
}

.account-hero-signout {
  margin-top: 7px;
  padding: 0;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 850;
}

.workspace-switch-label {
  display: block;
  margin: 2px 0 7px;
  color: #65758d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workspace-switch {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.workspace-switch small {
  flex: 0 0 auto;
}

/* Final responsive daily planner */
#todayView .today-layout {
  display: block !important;
  width: min(100%, 1240px) !important;
  margin-inline: auto !important;
}

#todayView .today-layout > :not(.mission-card):not(.final-today-grid) {
  display: none !important;
}

#todayView .mission-card {
  grid-column: auto !important;
  width: 100% !important;
}

.topbar .identity-cell,
.topbar .streak-cell {
  display: none !important;
}

@media (max-width: 760px) {
  .content,
  .topbar {
    width: 100%;
  }

  #todayView .today-layout {
    display: flex !important;
    flex-direction: column;
    padding: 0 14px 92px !important;
  }

  #todayView .mission-card {
    order: 2;
    margin-bottom: 14px !important;
    border-radius: 8px !important;
  }

  #todayView .mission-main {
    min-height: 0;
    padding: 18px 16px;
  }

  #todayView .mission-symbol {
    width: 46px;
    height: 46px;
  }

  #todayView .mission-card h3 {
    font-size: 25px !important;
  }

  #todayView .mission-start {
    display: none;
  }

  #todayView .mission-proof-strip {
    grid-template-columns: 1fr;
  }

  #todayView .mission-proof-strip > div:last-child {
    border-left: 0;
    border-top: 1px solid #d8ebe5;
  }

  #todayView .mission-fast-actions {
    display: flex !important;
  }

  #todayView .mission-why {
    padding-inline: 16px;
  }

  .final-today-grid,
  .final-today-main,
  .final-today-side {
    display: contents;
  }

  .today-goal-card {
    order: 1;
  }

  .clarity-card {
    order: 3;
  }

  .top-three-final {
    order: 4;
  }

  .today-timeline-card {
    order: 5;
  }

  .ideas-collapsed {
    order: 6;
  }

  .clarity-card,
  .today-timeline-card,
  .top-three-final,
  .plan-clarity-card,
  .plan-timeline-panel {
    padding: 16px;
  }

  .clarity-card textarea {
    min-height: 124px;
    font-size: 16px;
  }

  .clarity-actions {
    flex-wrap: wrap;
  }

  .clarity-actions .primary-button {
    flex: 1 1 180px;
  }

  .final-timeline-row {
    grid-template-columns: 58px 9px minmax(0, 1fr) 26px;
    gap: 7px;
    min-height: 68px;
  }

  .final-timeline-state {
    display: none;
  }

  .final-timeline-time {
    font-size: 12px;
  }

  .final-top-row {
    grid-template-columns: 24px 26px minmax(0, 1fr) 26px;
  }

  .final-top-add input,
  .plan-clarity-card textarea {
    font-size: 16px;
  }

  .final-plan-layout {
    padding: 4px 14px 100px;
  }

  .final-plan-header {
    display: block;
  }

  .final-plan-header h2 {
    font-size: 25px;
  }

  .plan-date-nav {
    display: grid;
    grid-template-columns: 40px auto minmax(126px, 1fr) 40px;
    margin-top: 14px;
  }

  .plan-date-nav .primary-button {
    grid-column: 1 / -1;
  }

  .plan-clarity-input {
    grid-template-columns: 1fr;
  }

  #mapView .builder-route-row {
    grid-template-columns: minmax(0, 1fr) 34px !important;
    padding: 8px 0 !important;
  }

  #mapView .route-select {
    grid-template-columns: 56px 34px minmax(0, 1fr) !important;
  }

  #mapView .route-select > em {
    display: none;
  }

  #mapView .route-copy strong,
  #mapView .route-copy small {
    overflow-wrap: anywhere;
  }

  .plan-editor-sheet {
    top: auto;
    width: 100%;
    max-height: 88vh;
    border-radius: 12px 12px 0 0 !important;
    transform: translateY(100%);
  }

  body.plan-editor-open .plan-editor-sheet {
    transform: translateY(0);
  }

  /* v98: phone-first five-minute plan */
  .final-plan-layout {
    padding-inline: 12px;
  }

  .final-plan-header {
    margin-bottom: 12px;
  }

  .final-plan-header > div:first-child small {
    display: none;
  }

  .final-plan-header h2 {
    margin-top: 0;
    font-size: 24px;
  }

  .plan-date-nav {
    grid-template-columns: 40px auto minmax(120px, 1fr) 40px;
    margin-top: 10px;
  }

  .plan-date-nav .primary-button {
    min-height: 44px;
  }

  .plan-clarity-card,
  .plan-timeline-panel {
    padding: 15px;
    border-radius: 8px;
  }

  .plan-clarity-card h3 {
    margin: 3px 0 0;
    font-size: 19px;
  }

  .plan-clarity-card > div:first-child p {
    font-size: 13px;
  }

  .plan-clarity-card textarea {
    min-height: 86px;
    resize: none;
  }

  .plan-clarity-input .primary-button {
    min-height: 46px;
  }

  .plan-timeline-panel .section-head {
    margin-bottom: 5px;
  }

  .plan-timeline-panel .section-head h3 {
    margin: 2px 0 0;
    font-size: 19px;
  }

  #mapView .builder-route-row {
    min-height: 70px;
    padding: 4px 0 !important;
  }

  #mapView .route-select {
    grid-template-columns: 55px 34px minmax(0, 1fr) !important;
    min-height: 62px;
    gap: 8px;
  }

  #mapView .route-time {
    font-size: 13px;
  }

  #mapView .route-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #mapView .route-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #mapView .plan-backlog {
    margin-top: 15px;
    padding-top: 14px;
  }

  #mapView .unscheduled-task {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 9px;
  }

  #mapView .unscheduled-task button {
    min-width: 76px;
    padding-inline: 9px;
    font-size: 12px;
  }
}

/* ==========================================
   EMERALD DESIGN SYSTEM & MOBILE VIEWS OVERRIDES
   ========================================== */

/* Universal Emerald Theme Variables */
:root {
  --emerald-primary: #005A36;
  --emerald-dark: #004529;
  --emerald-light: #F0F8F4;
  --emerald-border: #D2E6DB;
  --emerald-accent: #008A52;
  --slate-dark: #0F172A;
  --slate-sub: #475569;
  --slate-muted: #64748B;
  --slate-border: #E2E8F0;
  --slate-bg: #F5F7F6;
  --card-white: #FFFFFF;
}

/* General app background & card base styles */
body {
  background-color: var(--slate-bg) !important;
  color: var(--slate-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 1. FIXED MOBILE BOTTOM NAVIGATION BAR */
@media (max-width: 760px) {
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 64px !important;
    background: #FFFFFF !important;
    border-top: 1px solid #E6EBE8 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 9999 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    background: transparent !important;
    border: none !important;
    color: #64748B !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    width: 20% !important;
  }

  .mobile-nav-item svg {
    stroke: #64748B !important;
    transition: stroke 0.15s ease !important;
  }

  .mobile-nav-item.active {
    color: #005A36 !important;
  }

  .mobile-nav-item.active svg {
    stroke: #005A36 !important;
  }

  /* Bottom padding for main layout to clear bottom nav */
  .app-shell, .view {
    padding-bottom: 80px !important;
  }
}

@media (min-width: 761px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* 2. TODAY VIEW MOBILE EMERALD STYLING */
@media (max-width: 760px) {
  /* Top Current Focus Card */
  #todayView .revolut-command-card {
    background: #F0F8F4 !important;
    border: 1px solid #D2E6DB !important;
    border-radius: 20px !important;
    padding: 18px !important;
    box-shadow: 0 4px 16px rgba(0, 90, 54, 0.04) !important;
  }

  #todayView .revolut-balance-row small,
  #todayView .revolut-current-asset small {
    color: #005A36 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
  }

  #todayView .revolut-balance-row strong,
  #todayView .revolut-current-asset strong {
    color: #0F172A !important;
    font-size: 20px !important;
    font-weight: 800 !important;
  }

  #todayView .revolut-quick-actions button[data-action="start-current"],
  #todayView .primary-button {
    background: #005A36 !important;
    color: #FFFFFF !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 90, 54, 0.2) !important;
  }

  #todayView .revolut-quick-actions button[data-action="start-current"]:hover,
  #todayView .primary-button:hover {
    background: #004529 !important;
  }

  /* Middle Top 3 Outcomes Card */
  #todayView .mobile-planner-card {
    background: #FFFFFF !important;
    border: 1px solid #E6EBE8 !important;
    border-radius: 20px !important;
    padding: 18px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  }

  #todayView .mobile-planner-head h3 {
    color: #0F172A !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
  }

  /* Numbered Top 3 Badges */
  #todayView .final-top-rank {
    width: 24px !important;
    height: 24px !important;
    background: #005A36 !important;
    color: #FFFFFF !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  /* Bottom Timeline Card */
  #todayView .mobile-timeline-card {
    background: #FFFFFF !important;
    border: 1px solid #E6EBE8 !important;
    border-radius: 20px !important;
    padding: 18px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  }

  #todayView .mobile-timeline-row {
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    background: #FFFFFF !important;
  }

  #todayView .mobile-timeline-row.live {
    border-color: #005A36 !important;
    background: #F0F8F4 !important;
  }

  #todayView .mobile-time-icon {
    color: #005A36 !important;
    font-weight: 800 !important;
  }
}

/* 3. PLAN VIEW STYLING */
@media (max-width: 760px) {
  #mapView .plan-clarity-card {
    background: #FFFFFF !important;
    border: 1px solid #E6EBE8 !important;
    border-radius: 20px !important;
    padding: 18px !important;
  }

  #mapView .plan-clarity-input textarea {
    border: 1px solid #E2E8F0 !important;
    border-radius: 14px !important;
    padding: 12px !important;
    font-size: 14px !important;
  }

  #mapView .plan-clarity-input .primary-button {
    background: #005A36 !important;
    color: #FFFFFF !important;
    border-radius: 14px !important;
    min-height: 48px !important;
    font-weight: 800 !important;
  }

  #mapView .builder-route-row {
    border: 1px solid #E6EBE8 !important;
    border-radius: 16px !important;
    background: #FFFFFF !important;
    margin-bottom: 8px !important;
  }

  #mapView .builder-route-row.live {
    border-color: #005A36 !important;
    background: #F0F8F4 !important;
  }
}

/* 4. FOCUS VIEW STYLING */
#focusView {
  max-width: 480px;
  margin: 0 auto;
}

.focus-timer-ring-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 24px 0;
}

.focus-timer-ring-svg {
  width: 240px;
  height: 240px;
  transform: rotate(-90deg);
}

.focus-timer-ring-bg {
  stroke: #E2EFE8;
  stroke-width: 8;
  fill: transparent;
}

.focus-timer-ring-path {
  stroke: #005A36;
  stroke-width: 8;
  stroke-linecap: round;
  fill: transparent;
  transition: stroke-dashoffset 0.5s ease;
}

.focus-timer-ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.focus-timer-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748B;
  text-transform: uppercase;
}

.focus-timer-clock {
  font-size: 44px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 4px 0;
}

.focus-timer-pill {
  display: inline-block;
  padding: 4px 12px;
  background: #F0F8F4;
  color: #005A36;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.focus-next-break-card {
  background: #F0F8F4;
  border: 1px solid #D2E6DB;
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.focus-next-break-card small {
  color: #005A36;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
}

.focus-next-break-card strong {
  color: #0F172A;
  font-size: 15px;
  display: block;
  margin-top: 2px;
}

/* 5. REVIEW VIEW STYLING */
#reviewView {
  max-width: 520px;
  margin: 0 auto;
}

.review-hero-gauge {
  background: #FFFFFF;
  border: 1px solid #E6EBE8;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}

.review-gauge-score {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #F0F8F4;
  border: 4px solid #005A36;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  font-weight: 900;
  color: #005A36;
}

.review-hero-gauge h2 {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px;
}

.review-hero-gauge p {
  color: #64748B;
  font-size: 14px;
  margin: 0;
}

/* ==========================================
   CLEAN TODAY VIEW STYLING
   ========================================== */
#todayView {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 90px;
}

.today-clean-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. Header */
.today-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 4px 4px;
}

.today-top-date small {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--emerald-primary, #005A36);
  text-transform: uppercase;
}

.today-top-date h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.today-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-goal-pill {
  background: #F0F8F4;
  border: 1px solid #D2E6DB;
  color: #005A36;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.today-avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #005A36;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 2. Now Hero Card */
.now-hero-card {
  background: #FFFFFF;
  border: 1px solid #E6EBE8;
  border-left: 5px solid #005A36;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.now-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.now-badge {
  background: #005A36;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.6px;
}

.now-time-pill {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
}

.now-card-main h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px 0;
}

.now-card-step {
  font-size: 14px;
  color: #475569;
  margin: 0 0 16px 0;
}

.primary-focus-btn {
  width: 100%;
  height: 48px;
  background: #005A36;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.primary-focus-btn:hover, .primary-focus-btn:active {
  background: #004529;
}

/* 3 & 4. Today Card Sections */
.today-card-section {
  background: #FFFFFF;
  border: 1px solid #E6EBE8;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.today-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.today-section-head h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #64748B;
  text-transform: uppercase;
  margin: 0;
}

.section-sub-label {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.text-link-btn {
  background: transparent;
  border: none;
  color: #005A36;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

/* Today Must Do List */
.today-must-do-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.must-do-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

.must-do-item.done {
  opacity: 0.6;
  text-decoration: line-through;
  background: #F1F5F9;
}

.must-do-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #005A36;
  cursor: pointer;
  accent-color: #005A36;
}

.must-do-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
}

.must-do-time {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

/* Today Timeline List */
.today-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #F1F5F9;
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-time {
  font-size: 13px;
  font-weight: 700;
  color: #005A36;
  min-width: 90px;
}

.timeline-task-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
}

.timeline-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #E2E8F0;
  color: #475569;
}

.timeline-status-tag.active {
  background: #F0F8F4;
  color: #005A36;
}

/* 5. Quick Add Input */
.quick-add-input-wrapper {
  display: flex;
  gap: 8px;
}

.quick-add-input-wrapper input {
  flex: 1;
  height: 44px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.quick-add-input-wrapper input:focus {
  border-color: #005A36;
}

.quick-add-input-wrapper button {
  height: 44px;
  padding: 0 20px;
  background: #005A36;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* Safe-area inset & bottom nav clearance */
.view {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px) {
  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06) !important;
  }

  .mobile-nav-item {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 6px 0 !important;
    cursor: pointer !important;
  }

  .mobile-nav-item.active {
    color: #087a5b !important;
    font-weight: 700 !important;
  }

  /* Prevent horizontal overflow on mobile across all cards and grids */
  .goals-beta,
  .goals-grid,
  .vision-board-grid,
  .primary-goal-hero,
  .couple-layout,
  .review-grid,
  .final-plan-layout {
    grid-template-columns: 1fr !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
  }

  .goal-card,
  .vision-card,
  .panel,
  .today-card-section {
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    word-break: break-word !important;
  }
}

/* Review screen clean styling */
.review-page-header {
  margin-bottom: 16px;
}
.review-page-header small {
  color: #087a5b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}
.review-page-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: #152033;
  margin: 4px 0;
}
.review-page-header p {
  color: #667085;
  font-size: 14px;
  margin: 0;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.review-summary > div {
  background: #ffffff;
  border: 1px solid #e3e9e6;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-summary strong {
  font-size: 24px;
  font-weight: 800;
  color: #087a5b;
}

.review-summary span {
  font-size: 12px;
  font-weight: 600;
  color: #667085;
}

.review-task-card {
  background: #ffffff;
  border: 1px solid #e3e9e6;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-task-title {
  font-size: 14px;
  font-weight: 700;
  color: #152033;
}

.review-decision-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.review-btn {
  height: 36px;
  border: 1px solid #e3e9e6;
  border-radius: 8px;
  background: #f7f9f8;
  color: #152033;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.review-btn:hover, .review-btn:active {
  background: #eaf6f1;
  color: #087a5b;
  border-color: #087a5b;
}

.review-btn.danger {
  color: #c43232;
  background: #fef2f2;
  border-color: #fecaca;
}

@media (max-width: 760px) {
  body.task-sheet-open {
    height: 100dvh;
    overflow: hidden;
  }

  body.task-sheet-open .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-action-backdrop.open {
    background: rgba(3, 32, 25, .48);
    backdrop-filter: blur(2px);
  }

  .mobile-action-sheet .sheet-title {
    padding-right: 42px;
  }

  #todayView,
  #mapView,
  #goalsView,
  #coupleView,
  #reviewView {
    padding-bottom: max(92px, calc(76px + env(safe-area-inset-bottom)));
  }
}

.review-completed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f7f9f8;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #152033;
}

.review-completed-item .check-icon {
  color: #087a5b;
  font-weight: 800;
}

/* Keep the v105 phone contract last so legacy mobile rules cannot widen it. */
@media (max-width: 760px) {
  html,
  body,
  .app-shell,
  .main,
  .view,
  .today-clean-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html,
  body {
    overflow-x: clip !important;
  }

  .today-clean-container {
    padding: 12px 14px 22px !important;
    gap: 12px !important;
  }

  .today-top-bar,
  .today-top-right,
  .now-hero-card,
  .now-card-top,
  .now-card-main,
  .today-card-section,
  .today-section-head,
  .today-must-do-list,
  .must-do-item,
  .today-timeline-list,
  .today-timeline-row,
  .quick-add-input-wrapper {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .today-top-date small {
    color: #087a5b !important;
    font-size: 10px !important;
    text-transform: none !important;
  }

  .today-top-date h2 {
    font-size: 30px !important;
  }

  .today-goal-pill {
    max-width: 116px !important;
    min-width: 0 !important;
    padding: 0 10px !important;
  }

  .now-hero-card {
    padding: 17px !important;
    border: 1px solid #174f42 !important;
    border-radius: 20px !important;
    background:
      radial-gradient(circle at 100% 0, rgba(38, 190, 143, .22), transparent 42%),
      linear-gradient(145deg, #063f34 0%, #082f2a 100%) !important;
    box-shadow: 0 14px 30px rgba(4, 63, 52, .16) !important;
    overflow: hidden;
  }

  .now-card-top {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .now-card-main h3 {
    color: #fff !important;
    font-size: clamp(21px, 6vw, 25px) !important;
  }

  .now-card-step,
  .now-time-pill {
    color: #c6d9d3 !important;
  }

  .now-time-pill {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .primary-focus-btn,
  .primary-focus-btn:disabled {
    width: 100% !important;
    min-width: 0 !important;
    background: #16c892 !important;
    color: #052e27 !important;
  }

  .must-do-item {
    grid-template-columns: 28px minmax(0,1fr) minmax(46px, auto) 26px !important;
    padding: 10px 8px !important;
  }

  .quick-add-input-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 46px !important;
  }

  .quick-add-input-wrapper input,
  .quick-add-input-wrapper button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 6px env(safe-area-inset-bottom, 0px) !important;
    overflow: hidden !important;
  }

  .mobile-nav-item {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 4px 0 !important;
    font-size: 9px !important;
  }
}
