:root {
  --fm-primary: #087a5b;
  --fm-primary-dark: #055b45;
  --fm-primary-soft: #eaf6f1;
  --fm-bg: #f7f9f8;
  --fm-surface: #ffffff;
  --fm-text: #152033;
  --fm-muted: #667085;
  --fm-border: #e1e9e5;
  --fm-warning: #b54708;
  --fm-danger: #c43232;
  --fm-radius: 16px;
  --fm-shadow: 0 10px 30px rgba(16, 54, 42, 0.07);
  --fm-safe-bottom: env(safe-area-inset-bottom, 0px);
  --orange: var(--fm-primary);
  --orange-dark: var(--fm-primary-dark);
  --soft-orange: var(--fm-primary-soft);
}

html, body {
  background: var(--fm-bg);
  color: var(--fm-text);
}

body, button, input, textarea, select {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.nav-item.active {
  border-color: var(--fm-primary) !important;
  background: var(--fm-primary) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(8,122,91,.18) !important;
}
.nav-item.active span,
.nav-item.active strong { color: #fff !important; }
.nav-item:focus { outline: none; }
.nav-item:focus-visible {
  outline: 3px solid rgba(8,122,91,.24);
  outline-offset: 2px;
}
.side-rail {
  background: linear-gradient(180deg, #f5faf7 0%, #f8faf9 100%) !important;
}
.brand-mark { background: var(--fm-primary) !important; }

.primary-button {
  background: var(--fm-primary);
  border-color: var(--fm-primary);
}
.primary-button:hover { background: var(--fm-primary-dark); }

.screen-page-header,
.final-plan-header,
.today-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.screen-page-header small,
.final-plan-header small,
.today-top-bar small {
  color: var(--fm-muted);
  font-weight: 600;
}

.screen-page-header h2,
.final-plan-header h2,
.today-top-bar h2 {
  color: var(--fm-text);
  letter-spacing: -0.035em;
  margin: 2px 0 0;
}

.header-add-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--fm-border);
  border-radius: 14px;
  background: var(--fm-surface);
  color: var(--fm-primary);
  font-size: 24px;
  line-height: 1;
}

.compact-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px dashed #cadbd4;
  border-radius: 13px;
  text-align: center;
  background: #fbfdfc;
}
.compact-empty strong { font-size: 14px; }
.compact-empty span { color: var(--fm-muted); font-size: 12px; line-height: 1.35; }

@media (max-width: 760px) {
  html, body { width: 100%; min-width: 0; overflow-x: hidden; }
  body { background: var(--fm-bg); }
  .app-shell { display: block; min-height: 100dvh; width: 100%; }
  .side-rail, .topbar, .mobile-app-header, .quick-dock { display: none !important; }
  .main { width: 100%; min-width: 0; margin: 0; padding: 0; overflow: visible; }
  .view { display: none; width: 100%; min-width: 0; padding: 0 0 calc(86px + var(--fm-safe-bottom)); }
  .view.active { display: block; }
  .panel { border: 1px solid var(--fm-border); box-shadow: none; border-radius: var(--fm-radius); background: var(--fm-surface); }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1200;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(68px + var(--fm-safe-bottom));
    padding: 7px 8px var(--fm-safe-bottom);
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--fm-border);
    box-shadow: 0 -8px 30px rgba(17, 45, 35, .08);
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    backdrop-filter: blur(16px);
  }
  .mobile-nav-item {
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 0;
  }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item.active { color: var(--fm-primary); }
  .mobile-nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 24px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--fm-primary);
  }
  .mobile-nav-item { position: relative; }

  body:has(#focusView.active) .mobile-bottom-nav,
  body:has(#focusView.active) .focus-pill { display: none !important; }
  body.auth-experience-active .mobile-bottom-nav,
  body.auth-experience-active .focus-pill { display: none !important; }
  body:has(#focusView.active) #focusView { padding-bottom: 0; }

  /* Today */
  .today-clean-container {
    max-width: 460px;
    margin: 0 auto;
    padding: 17px 15px 22px;
    display: grid;
    gap: 12px;
  }
  .today-top-bar { min-height: 54px; }
  .today-top-date small { color: var(--fm-primary); font-size: 11px; letter-spacing: .08em; }
  .today-top-date h2 { font-size: 22px; }
  .today-top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .today-goal-pill {
    max-width: 175px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    border: 1px solid #c9e4da;
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 750;
  }
  .today-avatar-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: var(--fm-primary);
    color: white;
    font-weight: 800;
  }
  .now-hero-card {
    border: 1px solid #c9dfd7;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f0f8f4 100%);
    box-shadow: var(--fm-shadow);
    padding: 16px;
    display: grid;
    gap: 12px;
  }
  .now-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .now-badge {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--fm-primary-dark);
    color: white;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .06em;
  }
  .now-time-pill { color: #52617a; font-size: 11px; font-weight: 700; text-align: right; }
  .now-card-main { display: grid; gap: 5px; }
  .now-card-main h3 { margin: 0; color: var(--fm-text); font-size: 22px; line-height: 1.13; letter-spacing: -.035em; }
  .now-card-step { margin: 0; color: var(--fm-primary); font-size: 12px; font-weight: 750; }
  .primary-focus-btn {
    min-height: 50px;
    border: 0;
    border-radius: 13px;
    background: var(--fm-primary);
    color: white;
    font-size: 15px;
    font-weight: 800;
  }
  .primary-focus-btn:disabled { background: #9bb3aa; }

  .today-card-section {
    border: 1px solid var(--fm-border);
    border-radius: 16px;
    background: var(--fm-surface);
    padding: 14px;
  }
  .today-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .today-section-head h3 { margin: 0; color: var(--fm-primary-dark); font-size: 11px; letter-spacing: .08em; }
  .section-sub-label, .text-link-btn { color: var(--fm-muted); font-size: 11px; font-weight: 700; }
  .text-link-btn { border: 0; background: transparent; color: var(--fm-primary); }
  .today-must-do-list { display: grid; gap: 2px; }
  .must-do-item {
    min-height: 43px;
    display: grid;
    grid-template-columns: 28px minmax(0,1fr) auto 28px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #edf1ef;
  }
  .must-do-item:last-child { border-bottom: 0; }
  .must-do-rank {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #cbe0d8;
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
    font-size: 11px;
    font-weight: 850;
  }
  .must-do-item.done .must-do-rank { background: var(--fm-primary); color: white; }
  .must-do-title { min-width: 0; font-size: 13px; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .must-do-item.done .must-do-title { color: #8a948f; text-decoration: line-through; }
  .must-do-time { color: var(--fm-muted); font-size: 10px; white-space: nowrap; }
  .must-do-more { border: 0; background: transparent; color: var(--fm-muted); letter-spacing: 1px; }

  .today-timeline-list { position: relative; display: grid; }
  .today-timeline-list::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 15px;
    bottom: 15px;
    width: 1px;
    background: #d8e5e0;
  }
  .today-timeline-row {
    position: relative;
    display: grid;
    grid-template-columns: 28px 66px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    padding: 4px 6px 4px 0;
    text-align: left;
    color: var(--fm-text);
  }
  .today-timeline-row.active { background: var(--item-bg); }
  .today-timeline-dot {
    z-index: 1;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: 2px solid var(--item-color);
    background: white;
    color: var(--item-color);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 800;
  }
  .today-timeline-row.active .today-timeline-dot,
  .today-timeline-row.done .today-timeline-dot { background: var(--item-color); color: white; }
  .today-timeline-time { color: #52617a; font-size: 10px; font-weight: 700; white-space: nowrap; }
  .today-timeline-copy { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .today-timeline-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .today-timeline-copy small { color: var(--fm-muted); font-size: 10px; white-space: nowrap; }
  .timeline-period-label {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 24px;
    color: #7b8882;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .timeline-period-label span { background: white; padding-right: 8px; }
  .timeline-expand-btn {
    min-height: 38px;
    margin-top: 7px;
    border: 1px solid #cfe2da;
    border-radius: 10px;
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
    font-size: 11px;
    font-weight: 800;
  }

  .quick-add-section { padding: 10px; }
  .quick-add-input-wrapper { display: grid; grid-template-columns: minmax(0,1fr) 46px; gap: 7px; }
  .quick-add-input-wrapper input {
    width: 100%; min-width: 0; height: 44px; border: 1px solid #d6e1dd; border-radius: 12px; padding: 0 12px; background: white; color: var(--fm-text);
  }
  .quick-add-input-wrapper button { border: 0; border-radius: 12px; background: var(--fm-primary); color: white; font-size: 0; }
  .quick-add-input-wrapper button::before { content: "+"; font-size: 23px; font-weight: 500; }

  /* Plan */
  .final-plan-layout {
    max-width: 460px;
    margin: 0 auto;
    padding: 17px 15px 25px;
    display: grid;
    gap: 12px;
  }
  .final-plan-header { display: grid; gap: 10px; }
  .final-plan-header .screen-title { display: flex; flex-direction: column-reverse; }
  .final-plan-header h2 { font-size: 22px; }
  .plan-date-nav { display: grid; grid-template-columns: 42px 60px minmax(0,1fr) 42px; gap: 6px; width: 100%; }
  .plan-date-nav button, .plan-date-nav input {
    height: 42px; min-width: 0; border: 1px solid var(--fm-border); border-radius: 11px; background: white; color: var(--fm-text); padding: 0 8px;
  }
  .plan-date-nav input { text-align: center; font-size: 12px; }
  .plan-clarity-card {
    border: 1px solid #cfe2da;
    border-radius: 16px;
    background: white;
    padding: 14px;
    display: grid;
    gap: 10px;
    box-shadow: none;
  }
  .plan-clarity-card small { color: var(--fm-primary); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
  .plan-clarity-card h3 { margin: 3px 0 2px; font-size: 17px; }
  .plan-clarity-card p { margin: 0; color: var(--fm-muted); font-size: 12px; }
  .plan-clarity-input { display: grid; gap: 8px; }
  .plan-clarity-input textarea { width: 100%; resize: vertical; min-height: 68px; border: 1px solid #d8e2de; border-radius: 12px; padding: 11px; color: var(--fm-text); }
  .plan-clarity-input .primary-button { min-height: 46px; border-radius: 12px; font-weight: 800; }
  #planBuildResult { color: var(--fm-muted); font-size: 11px; }
  .plan-timeline-panel { border: 0; background: transparent; padding: 0; }
  .plan-timeline-panel > .section-head { padding: 4px 2px 6px; }
  .plan-timeline-panel h3 { margin: 2px 0 0; font-size: 13px; color: var(--fm-primary-dark); text-transform: uppercase; letter-spacing: .04em; }
  .builder-route-board { display: grid; gap: 6px; }
  .plan-period-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 3px 2px;
    color: var(--fm-primary-dark);
  }
  .plan-period-label:first-child { padding-top: 2px; }
  .plan-period-label span { font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .plan-period-label small { color: var(--fm-muted); font-size: 9px; }
  .builder-route-row {
    position: relative;
    border: 1px solid #dfe7e4;
    border-radius: 12px;
    background: white;
    overflow: hidden;
  }
  .builder-route-row.live { border-color: var(--block-color); background: var(--block-bg); }
  .route-select {
    width: 100%; min-width: 0; display: grid; grid-template-columns: 56px 28px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 38px 9px 9px; text-align: left; color: var(--fm-text);
  }
  .route-time { font-size: 11px; font-weight: 750; color: var(--fm-primary-dark); }
  .route-time small { display: none; }
  .route-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; color: var(--block-color); background: var(--block-bg); }
  .route-copy { min-width: 0; display: grid; gap: 2px; }
  .route-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .route-copy small { color: var(--fm-muted); font-size: 10px; }
  .route-select em { color: var(--fm-muted); font-size: 9px; font-style: normal; }
  .route-sheet-action { position: absolute; right: 5px; top: 9px; width: 30px; height: 30px; border: 0; background: transparent; }
  .route-actions, .route-link { display: none !important; }
  .plan-backlog { margin-top: 8px; border: 1px solid var(--fm-border); border-radius: 14px; background: white; padding: 12px; }
  .board-subhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
  .board-subhead strong { font-size: 12px; }
  .board-subhead span { color: var(--fm-muted); font-size: 10px; }
  .unscheduled-task { min-height: 42px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid #edf1ef; }
  .unscheduled-task:first-of-type { border-top: 0; }
  .unscheduled-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--block-color); }
  .unscheduled-copy { min-width: 0; display: grid; }
  .unscheduled-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .unscheduled-copy small { color: var(--fm-muted); font-size: 10px; }
  .unscheduled-task > button { border: 1px solid #cfe1da; border-radius: 9px; background: var(--fm-primary-soft); color: var(--fm-primary-dark); padding: 7px 8px; font-size: 10px; font-weight: 700; }
  .empty-board-state { min-height: 62px; padding: 14px; border: 1px dashed #d3dfda; border-radius: 12px; color: var(--fm-muted); font-size: 12px; display: grid; place-items: center; text-align: center; }
  .plan-editor-sheet { border-radius: 22px 22px 0 0 !important; padding-bottom: calc(20px + var(--fm-safe-bottom)); }

  /* Focus */
  .focus-fullscreen { min-height: 100dvh; background: radial-gradient(circle at 50% 35%, #0a8265 0%, #06654f 48%, #044b3c 100%); color: white; }
  .focus-room { width: 100%; max-width: 500px; min-height: 100dvh; margin: 0 auto; padding: 17px 18px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; border: 0; background: transparent; box-shadow: none; }
  .focus-screen-header { width: 100%; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; margin-bottom: 40px; }
  .focus-screen-header button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: white; font-size: 23px; }
  .focus-screen-header div { display: grid; gap: 2px; }
  .focus-screen-header strong { font-size: 15px; }
  .focus-screen-header small { color: rgba(255,255,255,.72); font-size: 11px; }
  #focusLabel { color: #a8f3d8; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .focus-room > h3 { max-width: 330px; margin: 9px 0 4px; color: white; font-size: 27px; line-height: 1.08; letter-spacing: -.035em; }
  .focus-schedule-label { margin: 0; color: rgba(255,255,255,.78); font-size: 12px; }
  .focus-timer-ring-container { position: relative; width: min(72vw, 300px); aspect-ratio: 1; margin: 22px auto 15px; }
  .focus-timer-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .focus-timer-ring-bg { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 8; }
  .focus-timer-ring-path { fill: none; stroke: #91eb73; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .4s linear; }
  .focus-timer-ring-center { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; }
  .focus-timer-clock { color: white; font-size: clamp(43px, 13vw, 60px); line-height: 1; font-weight: 750; letter-spacing: -.045em; }
  .focus-total-label { color: rgba(255,255,255,.72); font-size: 12px; }
  .focus-instruction { max-width: 330px; min-height: 34px; margin: 0 0 14px; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.45; }
  .focus-primary-controls { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 4px; }
  .focus-round-control { min-width: 0; border: 0; background: transparent; color: white; display: grid; justify-items: center; gap: 7px; }
  .focus-round-control > span { width: 62px; height: 62px; border-radius: 50%; background: white; color: var(--fm-primary-dark); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
  .focus-round-control.focus-finish > span { background: linear-gradient(135deg,#74d6ad,#3ba77f); color: white; }
  .focus-round-control.focus-outline > span { background: transparent; border: 1px solid rgba(255,255,255,.45); color: white; font-size: 16px; }
  .focus-round-control small { color: white; font-size: 10px; }
  .focus-secondary-controls { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
  .focus-secondary-controls button { border: 1px solid rgba(255,255,255,.22); border-radius: 20px; background: rgba(255,255,255,.08); color: white; padding: 9px 13px; font-size: 10px; }
  .focus-next-break-card { width: 100%; margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.07); text-align: left; }
  .focus-next-break-card div { display: grid; gap: 4px; }
  .focus-next-break-card small { color: #a9f0d8; font-size: 9px; font-weight: 800; }
  .focus-next-break-card strong { color: white; font-size: 12px; }
  .focus-distraction { width: 100%; margin-top: 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(255,255,255,.07); color: white; text-align: left; }
  .focus-distraction summary { padding: 13px 14px; color: white; font-size: 12px; }
  .focus-distraction .capture-row { padding: 0 12px 12px; display: grid; grid-template-columns: minmax(0,1fr) 54px; gap: 7px; }
  .focus-distraction input { min-width: 0; height: 42px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(255,255,255,.09); color: white; padding: 0 10px; }
  .focus-distraction input::placeholder { color: rgba(255,255,255,.55); }
  .focus-distraction button { border: 0; border-radius: 10px; background: white; color: var(--fm-primary-dark); font-size: 11px; font-weight: 750; }
  .focus-distraction .evidence-list { padding: 0 12px 12px; }
  .focus-distraction .muted { color: rgba(255,255,255,.6); }

  /* Goals */
  .goals-2026-layout { max-width: 460px; margin: 0 auto; padding: 17px 15px 25px; display: grid; gap: 12px; }
  .screen-page-header h2 { font-size: 22px; }
  .year-finish-card { border-radius: 18px; background: linear-gradient(135deg,#075c48,#087a5b 65%,#0a8664); color: white; padding: 17px; box-shadow: var(--fm-shadow); display: grid; gap: 14px; }
  .year-finish-copy { display: grid; gap: 3px; }
  .year-finish-copy small { color: #b8f2dc; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
  .year-finish-copy strong { font-size: 28px; letter-spacing: -.04em; }
  .year-finish-copy span { color: rgba(255,255,255,.76); font-size: 11px; }
  .year-finish-progress { display: grid; gap: 6px; }
  .year-progress-track { height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; }
  .year-progress-track span { display: block; height: 100%; border-radius: inherit; background: #91eb73; }
  .year-finish-progress small { color: rgba(255,255,255,.7); font-size: 10px; }
  .goals-list-panel { background: transparent; }
  .goals-list-panel .section-head { margin: 2px 1px 6px; }
  .goals-list-panel .section-head small { color: var(--fm-primary); font-size: 10px; font-weight: 850; }
  .goals-list-panel .section-head h3 { margin: 2px 0 0; font-size: 16px; }
  .goals-grid { display: grid; grid-template-columns: 1fr; gap: 7px; width: 100%; }
  .annual-goal-row { position: relative; width: 100%; min-width: 0; border: 1px solid var(--fm-border); border-radius: 14px; background: white; overflow: hidden; }
  .annual-goal-row.selected { border-color: #a8d4c4; box-shadow: 0 0 0 2px rgba(8,122,91,.06); }
  .annual-goal-main { width: 100%; min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; gap: 10px; align-items: center; border: 0; background: transparent; padding: 11px 38px 11px 11px; color: var(--fm-text); text-align: left; }
  .annual-goal-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--goal-bg); color: var(--goal-color); display: grid; place-items: center; font-size: 17px; }
  .annual-goal-copy { min-width: 0; display: grid; gap: 3px; }
  .annual-goal-copy strong { font-size: 13px; }
  .annual-goal-copy small { color: var(--fm-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .annual-goal-progress { width: 100%; height: 4px; border-radius: 3px; background: #edf2f0; overflow: hidden; margin-top: 2px; }
  .annual-goal-progress i { display: block; height: 100%; border-radius: inherit; background: var(--goal-color); }
  .annual-goal-score { display: grid; justify-items: end; gap: 2px; }
  .annual-goal-score strong { color: var(--goal-color); font-size: 12px; }
  .annual-goal-score small { color: var(--fm-muted); font-size: 9px; }
  .annual-goal-more { position: absolute; right: 2px; top: 15px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--fm-muted); }
  .goal-focus-panel { border: 1px solid var(--fm-border); border-radius: 17px; background: white; padding: 15px; display: grid; gap: 13px; }
  .goal-focus-head { display: grid; grid-template-columns: 44px minmax(0,1fr) 34px; gap: 10px; align-items: start; }
  .primary-goal-hero-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--fm-primary-soft); color: var(--fm-primary); font-size: 18px; }
  .goal-focus-head small { color: var(--fm-primary); font-size: 9px; font-weight: 850; letter-spacing: .06em; }
  .goal-focus-head h2 { margin: 2px 0; font-size: 18px; letter-spacing: -.03em; }
  .goal-focus-head p { margin: 0; color: var(--fm-muted); font-size: 11px; line-height: 1.35; }
  .goal-more-button { border: 0; background: transparent; color: var(--fm-muted); }
  .goal-focus-meta { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1ef; padding-top: 10px; }
  .goal-focus-meta strong { color: var(--fm-primary); font-size: 11px; }
  .goal-focus-meta span { color: var(--fm-muted); font-size: 10px; text-align: right; }
  .goal-execution-ladder { display: grid; gap: 7px; }
  .execution-rung {
    display: grid;
    gap: 3px;
    border-left: 3px solid #cfe3da;
    border-radius: 0 11px 11px 0;
    background: #f8fbf9;
    padding: 10px 11px;
  }
  .execution-rung small { color: var(--fm-primary); font-size: 8px; font-weight: 850; letter-spacing: .07em; }
  .execution-rung strong { font-size: 11px; line-height: 1.35; }
  .next-action-rung { grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .next-action-rung small { grid-column: 1/-1; }
  .next-action-rung button {
    border: 0;
    border-radius: 9px;
    background: var(--fm-primary);
    color: white;
    padding: 8px 10px;
    font-size: 9px;
    font-weight: 800;
  }
  .goal-current-milestone { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; align-items: center; border-radius: 13px; background: var(--fm-primary-soft); padding: 12px; }
  .goal-current-milestone small { grid-column: 1/-1; color: var(--fm-primary); font-size: 9px; font-weight: 850; }
  .goal-current-milestone strong { font-size: 12px; }
  .goal-current-milestone button { border: 1px solid #bcdccc; border-radius: 9px; background: white; color: var(--fm-primary-dark); padding: 7px 8px; font-size: 9px; font-weight: 750; }
  .goal-weekly-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .goal-weekly-head strong { font-size: 13px; }
  .goal-weekly-head span { color: var(--fm-muted); font-size: 9px; }
  .goal-weekly-actions { display: grid; gap: 3px; }
  .goal-weekly-row { min-height: 44px; display: grid; grid-template-columns: 26px minmax(0,1fr) auto; align-items: center; gap: 8px; border-top: 1px solid #edf1ef; }
  .goal-weekly-row:first-child { border-top: 0; }
  .goal-weekly-row > button:first-child { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #bfd7ce; background: white; color: var(--fm-primary); }
  .goal-weekly-row span { min-width: 0; display: grid; }
  .goal-weekly-row strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .goal-weekly-row small { color: var(--fm-muted); font-size: 9px; }
  .goal-weekly-row > button:last-child { border: 1px solid #c7ded5; border-radius: 8px; background: white; color: var(--fm-primary); padding: 6px 7px; font-size: 9px; font-weight: 750; }
  .later-goals { grid-column: 1/-1; }
  .later-goals > summary {
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #f1f4f3;
    color: var(--fm-muted);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }
  .later-goals > summary::-webkit-details-marker { display: none; }
  .later-goals > div { display: grid; gap: 7px; margin-top: 7px; }
  .vision-secondary { border: 1px solid var(--fm-border); border-radius: 15px; background: white; padding: 0; overflow: hidden; }
  .vision-secondary > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px; list-style: none; }
  .vision-secondary > summary span:first-child { display: grid; gap: 2px; }
  .vision-secondary > summary small { color: var(--fm-primary); font-size: 9px; font-weight: 850; }
  .vision-secondary > summary strong { font-size: 12px; }
  .vision-actions { padding: 0 12px 8px; }
  .vision-board-grid { width: 100%; display: grid; grid-template-columns: 1fr; gap: 7px; padding: 0 12px 12px; }
  .vision-card { min-width: 0; min-height: 0; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 9px; align-items: center; border: 1px solid var(--fm-border); border-radius: 12px; padding: 10px; background-color: white; background-size: cover; }
  .vision-card > span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--fm-primary-soft); color: var(--fm-primary); }
  .vision-card div { min-width: 0; }
  .vision-card strong { font-size: 11px; }
  .vision-card p { margin: 2px 0 0; color: var(--fm-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vision-card button { border: 0; background: transparent; color: var(--fm-primary); font-size: 9px; }

  /* Couple */
  .couple-layout { max-width: 460px; margin: 0 auto; padding: 17px 15px 25px; display: grid; gap: 12px; grid-template-columns: 1fr; }
  .couple-hero { padding: 14px; background: linear-gradient(145deg,#fff 0%,#f8eff3 100%); }
  .couple-hero-copy small { color: #b1436c; font-size: 9px; font-weight: 850; }
  .couple-hero-copy h3 { margin: 4px 0; font-size: 17px; }
  .couple-hero-copy p { margin: 0; color: var(--fm-muted); font-size: 11px; }
  .couple-hero-stats { margin-top: 10px; display: flex; gap: 7px; }
  .couple-hero-stats > div, .couple-hero-stats > span { flex: 1; min-width: 0; }
  .couple-plan-panel { padding: 14px; }
  .couple-plan-panel .section-head { align-items: flex-start; }
  .couple-plan-panel .section-head h3 { margin: 0; font-size: 15px; }
  .couple-plan-panel .section-head p { margin: 3px 0 0; color: var(--fm-muted); font-size: 10px; }
  .couple-plan-panel .primary-button { min-height: 38px; border-radius: 10px; padding: 0 10px; font-size: 10px; }
  .couple-shared-timeline { display: grid; gap: 7px; margin-top: 10px; }
  .couple-shared-block { border: 1px solid #ecd7df; border-radius: 13px; background: #fff7fa; overflow: hidden; }
  .couple-block-main { width: 100%; min-width: 0; display: grid; grid-template-columns: 54px 30px minmax(0,1fr) auto; gap: 8px; align-items: center; border: 0; background: transparent; padding: 10px 34px 10px 10px; text-align: left; }
  .couple-block-time { color: #9d3c61; font-size: 10px; font-weight: 750; }
  .couple-block-time small { display: none; }
  .couple-block-copy { min-width: 0; display: grid; }
  .couple-block-copy strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .couple-block-copy small { color: var(--fm-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .couple-block-main em { font-size: 8px; color: #a34166; font-style: normal; }
  .couple-block-actions { position: absolute; right: 4px; top: 8px; }
  .couple-unshare { font-size: 9px; }
  .couple-empty { min-height: 80px; display: grid; place-content: center; text-align: center; padding: 12px; border: 1px dashed #e1c7d1; border-radius: 12px; background: #fffafd; }
  .couple-empty strong { font-size: 12px; }
  .couple-empty p { margin: 4px 0 0; color: var(--fm-muted); font-size: 10px; }
  .share-day-panel, .couple-rules-panel { display: none; }
  .couple-add-panel { order: 3; padding: 14px; }
  .couple-add-panel.is-collapsed { display: none; }
  .couple-side { display: grid; gap: 12px; }
  .couple-side > .panel { padding: 14px; }
  .couple-request-list { display: grid; gap: 6px; }
  .couple-request { min-height: 44px; }
  .mini-add { display: grid; grid-template-columns: minmax(0,1fr) 48px; gap: 7px; margin-top: 10px; }
  .mini-add input { min-width: 0; height: 42px; border: 1px solid var(--fm-border); border-radius: 10px; padding: 0 10px; }
  .mini-add button { border: 0; border-radius: 10px; background: var(--fm-primary); color: white; }

  /* Review */
  .review-grid { max-width: 460px; margin: 0 auto; padding: 17px 15px 25px; display: grid; gap: 12px; grid-template-columns: 1fr; }
  .review-page-header small { color: var(--fm-muted); font-size: 10px; }
  .review-page-header h2 { margin: 2px 0 0; font-size: 22px; }
  .review-page-header p { margin: 3px 0 0; color: var(--fm-muted); font-size: 11px; }
  .review-summary { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--fm-border); border-radius: 15px; background: white; padding: 12px 5px; }
  .review-summary > div { min-width: 0; display: grid; justify-items: center; gap: 3px; border-right: 1px solid #edf1ef; text-align: center; }
  .review-summary > div:last-child { border-right: 0; }
  .review-summary strong { color: var(--fm-primary); font-size: 15px; }
  .review-summary span { color: var(--fm-muted); font-size: 8px; line-height: 1.2; }
  .review-unfinished-panel, .review-completed-panel, .review-reflection-panel, .review-grid > .panel:last-child { padding: 14px; }
  .review-grid .section-head h3, .review-reflection-panel h3 { margin: 0; font-size: 14px; }
  .review-grid .section-head p { margin: 3px 0 0; color: var(--fm-muted); font-size: 10px; }
  .review-completed-list { display: grid; gap: 3px; }
  .review-completed-item { min-height: 36px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 7px; border-top: 1px solid #edf1ef; }
  .review-completed-item:first-child { border-top: 0; }
  .review-completed-item .check-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--fm-primary); color: white; font-size: 10px; }
  .review-completed-item strong { font-size: 11px; }
  .review-unfinished-list { display: grid; gap: 7px; }
  .review-task-card { border: 1px solid var(--fm-border); border-radius: 12px; background: #fff; padding: 10px; display: grid; gap: 8px; }
  .review-task-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .review-task-title > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
  .review-task-title i { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--review-color); }
  .review-task-title strong { font-size: 11px; }
  .review-task-title small { color: var(--fm-muted); font-size: 9px; white-space: nowrap; }
  .review-decision-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
  .review-btn { min-width: 0; height: 31px; border: 1px solid #cfe2da; border-radius: 8px; background: var(--fm-primary-soft); color: var(--fm-primary-dark); padding: 0 3px; font-size: 8px; font-weight: 700; }
  .review-btn.danger { border-color: #efd1d1; background: #fff1f1; color: var(--fm-danger); }
  .review-more-actions { position: relative; }
  .review-more-actions summary {
    height: 31px;
    border: 1px solid #dce5e1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--fm-muted);
    cursor: pointer;
    list-style: none;
  }
  .review-more-actions summary::-webkit-details-marker { display: none; }
  .review-more-actions[open] .review-btn {
    position: absolute;
    z-index: 3;
    right: 0;
    top: 35px;
    width: 110px !important;
    background: white;
    box-shadow: var(--fm-shadow);
  }
  .review-later-decisions { border-top: 1px solid var(--fm-border); padding-top: 7px; }
  .review-later-decisions > summary {
    min-height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }
  .review-later-decisions > summary::-webkit-details-marker { display: none; }
  .review-later-decisions > div { display: grid; gap: 7px; margin-top: 7px; }
  .review-reflection-panel { display: grid; gap: 7px; }
  .review-reflection-panel label { color: var(--fm-muted); font-size: 10px; }
  .review-reflection-panel textarea { width: 100%; border: 1px solid var(--fm-border); border-radius: 10px; padding: 9px; resize: vertical; }
  .review-reflection-panel .primary-button { min-height: 42px; border-radius: 11px; }
  .review-history { display: grid; gap: 7px; }

  /* Account and overlays */
  .account-layout { max-width: 460px; margin: 0 auto; padding: 17px 15px 25px; }
  .focus-pill { left: 10px; right: 10px; bottom: calc(76px + var(--fm-safe-bottom)); }
  .mobile-action-sheet { z-index: 1400; }
  .mobile-action-backdrop { z-index: 1350; }
}

@media (min-width: 761px) {
  .goals-2026-layout, .final-plan-layout, .couple-layout, .review-grid { max-width: 1180px; margin: 0 auto; }
  .goals-2026-layout { padding: 6px 0 32px; display: grid; gap: 18px; }
  .year-finish-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid var(--fm-border); border-radius: 16px; background: white; padding: 18px 22px; }
  .year-finish-copy { display: grid; gap: 4px; }
  .year-finish-copy small { color: var(--fm-primary); font-size: 10px; font-weight: 850; letter-spacing: .08em; }
  .year-finish-copy strong { font-size: 22px; }
  .year-finish-copy span, .year-finish-progress small { color: var(--fm-muted); font-size: 11px; }
  .year-finish-progress { width: min(420px,45%); display: grid; gap: 7px; }
  .year-progress-track { height: 7px; border-radius: 999px; background: #eaf0ed; overflow: hidden; }
  .year-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--fm-primary); }
  .goals-list-panel { display: grid; gap: 10px; }
  .goals-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .annual-goal-row { position: relative; min-width: 0; border: 1px solid var(--fm-border); border-radius: 14px; background: white; overflow: hidden; }
  .annual-goal-row.selected { border-color: #9dcebc; box-shadow: 0 0 0 3px rgba(8,122,91,.06); }
  .annual-goal-main { width: 100%; display: grid; grid-template-columns: 46px minmax(0,1fr) 64px; align-items: center; gap: 12px; border: 0; background: transparent; padding: 14px 44px 14px 14px; color: var(--fm-text); text-align: left; }
  .annual-goal-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--goal-bg); color: var(--goal-color); }
  .annual-goal-copy { min-width: 0; display: grid; gap: 4px; }
  .annual-goal-copy strong { font-size: 14px; }
  .annual-goal-copy small { color: var(--fm-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .annual-goal-progress { height: 5px; border-radius: 999px; background: #ebf0ee; overflow: hidden; }
  .annual-goal-progress i { display: block; height: 100%; background: var(--goal-color); }
  .annual-goal-score { display: grid; justify-items: end; }
  .annual-goal-score strong { color: var(--goal-color); font-size: 15px; }
  .annual-goal-score small { color: var(--fm-muted); font-size: 9px; }
  .annual-goal-more { position: absolute; right: 4px; top: 18px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--fm-muted); }
  .goal-focus-panel { max-width: 820px; width: 100%; justify-self: center; border: 1px solid var(--fm-border); border-radius: 18px; background: white; padding: 22px; display: grid; gap: 15px; box-shadow: var(--fm-shadow); }
  .goal-focus-head { display: grid; grid-template-columns: 48px minmax(0,1fr) 36px; gap: 12px; }
  .primary-goal-hero-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--fm-primary-soft); color: var(--fm-primary); }
  .goal-focus-head small, .execution-rung small, .goal-current-milestone small { color: var(--fm-primary); font-size: 9px; font-weight: 850; letter-spacing: .07em; }
  .goal-focus-head h2 { margin: 3px 0; font-size: 24px; }
  .goal-focus-head p { margin: 0; color: var(--fm-muted); line-height: 1.45; }
  .goal-more-button { border: 0; background: transparent; }
  .goal-focus-meta { display: flex; justify-content: space-between; border-top: 1px solid var(--fm-border); padding-top: 12px; }
  .goal-execution-ladder { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
  .execution-rung { display: grid; gap: 5px; border-left: 3px solid #bddccd; border-radius: 0 12px 12px 0; background: #f7fbf9; padding: 12px; }
  .next-action-rung { grid-template-columns: 1fr; }
  .next-action-rung button { border: 0; border-radius: 9px; background: var(--fm-primary); color: white; min-height: 36px; font-weight: 800; }
  .goal-current-milestone { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; border-radius: 13px; background: var(--fm-primary-soft); padding: 14px; }
  .goal-current-milestone small { grid-column: 1/-1; }
  .goal-current-milestone button { border: 1px solid #bcdccc; border-radius: 9px; background: white; color: var(--fm-primary-dark); padding: 8px 10px; font-weight: 750; }
  .goal-weekly-head { display: flex; justify-content: space-between; }
  .goal-weekly-actions { display: grid; gap: 5px; }
  .vision-secondary { max-width: 820px; width: 100%; justify-self: center; }
  .goals-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .goal-focus-panel { max-width: 760px; }
  .timeline-period-label,
  .plan-period-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    color: var(--fm-primary-dark);
    padding: 10px 4px 4px;
  }
  .timeline-period-label span,
  .plan-period-label span { font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .plan-period-label small { color: var(--fm-muted); font-size: 10px; }
  .timeline-expand-btn {
    min-height: 40px;
    border: 1px solid #cfe2da;
    border-radius: 10px;
    background: var(--fm-primary-soft);
    color: var(--fm-primary-dark);
    font-weight: 800;
  }
  .review-unfinished-list { display: grid; gap: 8px; }
  .review-task-title > span { display: flex; align-items: center; gap: 8px; }
  .review-task-title i { width: 8px; height: 8px; border-radius: 50%; background: var(--review-color); }
  .review-decision-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .review-more-actions { position: relative; }
  .review-more-actions summary { height: 40px; display: grid; place-items: center; border: 1px solid var(--fm-border); border-radius: 10px; list-style: none; cursor: pointer; }
  .review-more-actions summary::-webkit-details-marker { display: none; }
  .review-more-actions[open] .review-btn { position: absolute; z-index: 3; right: 0; top: 44px; width: 130px; background: white; box-shadow: var(--fm-shadow); }
  .review-later-decisions { margin-top: 4px; }
  .review-later-decisions > summary { min-height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--fm-primary-soft); color: var(--fm-primary-dark); font-weight: 800; list-style: none; cursor: pointer; }
  .review-later-decisions > summary::-webkit-details-marker { display: none; }
  .review-later-decisions > div { display: grid; gap: 8px; margin-top: 8px; }
}

/* V108: goal execution system */
.goals-list-panel .section-head h3 {
  max-width: 34rem;
}

.goal-current-milestone > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.goal-current-milestone > div small {
  grid-column: auto;
  color: var(--fm-muted);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.execution-rung strong,
.goal-focus-head p,
.goal-weekly-row strong {
  overflow-wrap: anywhere;
}

.goal-execution-ladder > .execution-rung {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #e5ece8;
  border-left: 3px solid #9ccfbc;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffffff, #f8fbf9);
  color: var(--fm-text);
  padding: 12px 13px;
  text-align: left;
  box-shadow: 0 5px 16px rgba(18, 54, 43, .035);
  cursor: pointer;
}

.goal-execution-ladder > button.execution-rung:hover {
  border-color: #b8d9cc;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(18, 54, 43, .07);
}

.execution-rung > span,
.execution-rung-copy > span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.execution-rung i,
.execution-rung-copy i {
  color: var(--fm-primary);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.execution-rung.is-empty {
  border-style: dashed;
  background: #fbfdfc;
}

.execution-rung.is-empty strong {
  color: #687771;
  font-weight: 700;
}

.goal-execution-ladder > .next-action-rung {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-left-color: var(--fm-primary);
  background: linear-gradient(135deg, #f0faf6, #ffffff);
}

.execution-rung-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  padding: 0;
  text-align: left;
}

.next-action-rung .next-action-button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--fm-primary);
  color: white;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.goal-quick-editor {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.goal-editor-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #087a5b, #075442);
  color: white;
  box-shadow: 0 10px 24px rgba(8, 122, 91, .2);
}

.goal-quick-editor > small {
  color: var(--fm-primary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
}

.goal-quick-editor h3 {
  margin: -4px 0 0;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.goal-quick-editor p {
  margin: 0;
  color: var(--fm-muted);
  font-size: 12px;
  line-height: 1.5;
}

.goal-quick-editor textarea {
  min-height: 108px;
  border: 1px solid #bed9cf;
  border-radius: 13px;
  background: #fbfdfc;
  padding: 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: vertical;
}

.goal-editor-example {
  border-left: 2px solid #a9d4c4;
  color: #6d7c76;
  padding-left: 10px;
  font-size: 10px;
  line-height: 1.4;
}

.goal-quick-editor .sheet-save-time {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #087a5b, #075b47);
  color: white;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 9px 20px rgba(8, 122, 91, .18);
}

@media (max-width: 760px) {
  .goals-2026-layout {
    padding-bottom: calc(104px + var(--fm-safe-bottom));
  }

  .goals-list-panel {
    min-width: 0;
    overflow: hidden;
  }

  .goals-grid {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 2px 2px 5px;
  }

  .goals-grid::-webkit-scrollbar {
    display: none;
  }

  .annual-goal-row {
    flex: 0 0 132px;
    scroll-snap-align: start;
    border-radius: 999px;
  }

  .annual-goal-row.selected {
    border-color: var(--fm-primary);
    background: var(--fm-primary);
    box-shadow: none;
  }

  .annual-goal-main {
    grid-template-columns: 27px minmax(0, 1fr);
    gap: 6px;
    min-height: 48px;
    padding: 6px 10px;
  }

  .annual-goal-icon {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .annual-goal-copy {
    gap: 0;
  }

  .annual-goal-copy strong {
    font-size: 11px;
  }

  .annual-goal-copy small {
    font-size: 8px;
  }

  .annual-goal-score,
  .annual-goal-more {
    display: none;
  }

  .annual-goal-row.selected .annual-goal-copy strong,
  .annual-goal-row.selected .annual-goal-copy small {
    color: white;
  }

  .goal-focus-panel {
    gap: 11px;
    box-shadow: 0 12px 32px rgba(18, 48, 40, .07);
  }

  .goal-execution-ladder {
    gap: 6px;
  }

  .execution-rung {
    padding: 10px 11px;
  }

  .next-action-rung {
    border-left-color: var(--fm-primary);
    background: linear-gradient(135deg, #eef9f4, #f8fcfa);
  }

  .next-action-rung button {
    min-height: 34px;
    white-space: nowrap;
  }

  .goal-execution-ladder > .next-action-rung {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .next-action-rung .next-action-button {
    width: 100%;
  }

  .goal-current-milestone {
    grid-template-columns: minmax(0, 1fr) auto;
    background: #f7faf8;
    border: 1px solid var(--fm-border);
  }

  .goal-current-milestone > div strong {
    font-size: 11px;
  }

  .goal-current-milestone > div small {
    font-size: 9px;
  }
}

@media (min-width: 761px) {
  .goals-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .goal-execution-ladder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-action-backdrop.open {
    display: block;
    z-index: 1350;
    opacity: 1;
  }

  .mobile-action-sheet.open {
    display: block;
    left: 50%;
    right: auto;
    bottom: 28px;
    z-index: 1400;
    width: min(540px, calc(100vw - 40px));
    max-height: min(760px, calc(100vh - 56px));
    overflow-y: auto;
    transform: translate(-50%, 0);
  }

  body:has(.focus-pill:not(.hidden)) :is(#todayView,#mapView,#goalsView,#coupleView,#reviewView).active {
    padding-bottom: 118px !important;
  }

  .focus-pill:not(.hidden) {
    width: min(360px, calc(100vw - 32px));
    min-width: 0;
    min-height: 60px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    gap: 1px 8px;
    padding: 8px 10px;
  }

  .focus-pill #pillBreak,
  .focus-pill #pillStop {
    display: none;
  }

  .focus-pill span {
    grid-column: 1;
    grid-row: 1;
  }

  .focus-pill strong {
    grid-column: 1;
    grid-row: 2;
  }

  .focus-pill em,
  .focus-pill #pillToggle,
  .focus-pill #pillDone {
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 760px) {
  .today-top-date small { color: var(--fm-muted); font-size: 10px; letter-spacing: 0; text-transform: none; }
  .today-top-date h2 { font-size: 24px; white-space: nowrap; }
  .today-goal-pill { max-width: 122px; }
  .must-do-more { white-space: nowrap !important; word-break: normal !important; font-size: 18px !important; line-height: 1 !important; }
  .focus-timer-ring-center { inset: 0 !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; transform: none !important; width: 100% !important; height: 100% !important; }
  .plan-editor-sheet:not(.open), body:not(.plan-editor-open) .plan-editor-sheet { display: none !important; }
  .review-task-card .review-decision-actions { display: grid !important; grid-template-columns: repeat(4, minmax(0,1fr)) !important; flex-direction: unset !important; }
  .review-task-card .review-btn { width: auto !important; min-width: 0 !important; }
  .goals-list-panel .section-head h3 { text-transform: none !important; letter-spacing: -.02em !important; }
  .toast { left: 16px !important; right: 16px !important; bottom: calc(20px + var(--fm-safe-bottom)) !important; top: auto !important; max-width: none !important; z-index: 1800 !important; }
  body:has(#focusView.active) .toast { bottom: 18px !important; }
}
@media (max-width: 760px) {
  .couple-shared-block { position: relative; }
  .must-do-more { text-decoration: none !important; }
}

@media (max-width: 760px) {
  /* Keep the active timer visible without covering the final page content. */
  body:has(.focus-pill:not(.hidden)) :is(#todayView,#mapView,#goalsView,#coupleView,#reviewView).active {
    padding-bottom: calc(146px + var(--fm-safe-bottom)) !important;
  }
  .focus-pill:not(.hidden) {
    min-height: 56px !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    grid-template-rows: auto auto !important;
    gap: 2px 7px !important;
    padding: 7px 10px !important;
  }
  .focus-pill #pillBreak,
  .focus-pill #pillStop {
    display: none !important;
  }
  .focus-pill span {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: end;
  }
  .focus-pill strong {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start;
  }
  .focus-pill em {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    min-width: 52px !important;
  }
  .focus-pill #pillToggle,
  .focus-pill #pillDone {
    grid-row: 1 / span 2 !important;
    align-self: center;
    min-width: 48px;
    height: 34px;
  }
}

/* v101 mobile reliability polish */
@media (max-width: 760px) {
  body:has(#focusView.active) {
    height: 100dvh;
    overflow: hidden;
    background: #044b3c;
  }
  body:has(#focusView.active) .main,
  #focusView.active,
  #focusView.active .focus-fullscreen {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  #focusView.active .focus-room {
    box-sizing: border-box;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(10px, env(safe-area-inset-top)) 16px max(10px, env(safe-area-inset-bottom));
    gap: 0;
    overflow: hidden;
  }
  #focusView.active .focus-screen-header {
    flex: 0 0 auto;
    margin: 0 0 5px;
  }
  #focusView.active .focus-screen-header button {
    width: 38px;
    height: 38px;
  }
  #focusView.active #focusLabel { margin-top: 0; font-size: 9px; }
  #focusView.active .focus-room > h3 {
    max-width: 330px;
    margin: 4px 0 2px;
    font-size: clamp(21px, 6.5vw, 27px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #focusView.active .focus-schedule-label { font-size: 11px; }
  #focusView.active .focus-timing-note {
    max-width: 350px;
    margin: 2px 0 0;
    color: #b8eadc;
    font-size: 10px;
    line-height: 1.25;
  }
  #focusView.active .focus-timer-ring-container {
    flex: 0 0 auto;
    width: min(50vw, 205px);
    height: min(50vw, 205px);
    margin: 8px auto 6px;
  }
  #focusView.active .focus-timer-ring-svg { width: 100%; height: 100%; }
  #focusView.active .focus-timer-clock { font-size: clamp(38px, 11vw, 50px); }
  #focusView.active .focus-instruction {
    min-height: 0;
    max-height: 32px;
    margin: 0 0 5px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
  }
  #focusView.active .focus-primary-controls {
    flex: 0 0 auto;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
    margin: 0;
  }
  #focusView.active .focus-round-control {
    width: auto !important;
    height: auto !important;
    gap: 3px;
  }
  #focusView.active .focus-round-control > span {
    width: 50px;
    height: 50px;
    color: #064f3e !important;
    font-size: 19px;
  }
  #focusView.active .focus-round-control.focus-finish > span,
  #focusView.active .focus-round-control.focus-outline > span { color: white !important; }
  #focusView.active .focus-round-control small { font-size: 9px; }
  #focusView.active .focus-secondary-controls {
    flex: 0 0 auto;
    margin: 6px 0;
    gap: 7px;
  }
  #focusView.active .focus-secondary-controls button {
    min-height: 32px;
    padding: 6px 12px;
  }
  #focusView.active .focus-next-break-card {
    flex: 0 0 auto;
    min-height: 45px;
    margin: 0;
    padding: 8px 11px;
  }
  #focusView.active .focus-distraction {
    flex: 0 0 auto;
    margin-top: 6px;
  }
  #focusView.active .focus-distraction summary {
    min-height: 40px;
    padding: 10px 12px;
  }
  #focusView.active .focus-distraction[open] {
    position: absolute;
    z-index: 20;
    left: 16px;
    right: 16px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    background: #0b6854;
    box-shadow: 0 -12px 30px rgba(0,0,0,.25);
  }
  body:has(#focusView.active) .toast {
    top: max(64px, calc(env(safe-area-inset-top) + 48px)) !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    max-width: calc(100vw - 32px) !important;
    transform: translateX(-50%);
    font-size: 11px;
    padding: 9px 12px;
  }
  .couple-signin-action {
    min-height: 42px;
    margin-top: 12px;
  }
  .couple-hero-stats:empty { display: none; }
}

.account-signin-panel { overflow: hidden; }
.account-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-auth-brand > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--fm-primary);
  color: white;
  font-size: 25px;
}
.account-auth-brand small {
  color: var(--fm-primary);
  font-weight: 800;
  letter-spacing: .05em;
}
.account-auth-brand h3 { margin: 2px 0 0; }
.account-auth-intro {
  margin: 12px 0 18px;
  color: var(--fm-muted);
  line-height: 1.5;
}
.password-field { position: relative; display: block; }
.password-field input { padding-right: 66px !important; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 6px;
  min-width: 50px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--fm-primary-soft);
  color: var(--fm-primary-dark);
  font-weight: 750;
}
.account-submit { min-height: 48px; width: 100%; }
.account-submit:disabled { opacity: .65; cursor: wait; }
.account-auth-links { display: grid; gap: 8px; }
.account-auth-links button { min-height: 42px; }
.account-guest-action { color: var(--fm-muted); }
.sheet-form-wide { grid-column: 1 / -1; }
.sheet-remove-time { grid-column: 1 / -1; min-height: 42px; }
.plan-confirmation-draft {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #cfe2da;
  border-radius: 12px;
  background: #f5fbf8;
  color: var(--fm-text);
}
.plan-confirmation-draft p,
.plan-confirmation-draft small { margin: 0; color: var(--fm-muted); line-height: 1.4; }
.plan-confirmation-draft > div { display: grid; grid-template-columns: 1fr; gap: 7px; }
.plan-confirmation-draft button { min-height: 40px; border-radius: 10px; }
.plan-confirmation-draft > header,
.plan-confirmation-draft > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan-confirmation-draft > header > div { display: grid; gap: 2px; }
.plan-confirmation-draft > header > span { color: var(--fm-muted); font-size: 10px; font-weight: 700; }
.plan-draft-list { display: grid; gap: 7px; }
.plan-draft-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce8e3;
  border-radius: 11px;
  background: white;
}
.plan-draft-row.needs-confirmation { border-color: #e9c89f; background: #fffaf4; }
.plan-draft-row.inferred-time { border-color: #add8c8; background: #f4fbf8; }
.plan-draft-row.inferred-time > div small { color: var(--fm-primary); font-weight: 750; }
.plan-draft-row > div { display: grid; gap: 2px; }
.plan-draft-row > div strong { font-size: 12px; }
.plan-draft-row > div small { font-size: 10px; }
.plan-draft-row-head {
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 8px !important;
}
.plan-draft-row-head > span { min-width: 0; display: grid; gap: 2px; }
.plan-draft-more {
  width: 34px;
  min-height: 30px !important;
  border: 1px solid transparent;
  border-radius: 9px !important;
  background: transparent;
  color: var(--fm-muted);
  font-size: 15px;
  letter-spacing: 1px;
}
.plan-draft-more:hover,
.plan-draft-more:focus-visible {
  border-color: #cfe2da;
  background: #f2f8f5;
  color: var(--fm-primary);
}
.plan-draft-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 5px;
  margin: 0;
}
.plan-draft-row dl div { min-width: 0; display: grid; gap: 2px; }
.plan-draft-row dt { color: var(--fm-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.plan-draft-row dd { min-width: 0; margin: 0; color: var(--fm-text); font-size: 9px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-draft-inline-editor {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(110px, .7fr) minmax(90px, .5fr);
  gap: 8px !important;
  border-top: 1px solid #e4ece8;
  padding-top: 10px;
}
.plan-draft-inline-editor label { min-width: 0; margin: 0; }
.plan-draft-inline-editor label span { display: block; margin-bottom: 5px; color: var(--fm-muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.plan-draft-inline-editor input { height: 40px; min-width: 0; border-radius: 9px; padding: 0 10px; }
.plan-draft-inline-editor > p { grid-column: 1 / -1; min-height: 0; }
.plan-draft-inline-editor > div {
  grid-column: 1 / -1;
  display: flex !important;
  justify-content: flex-end;
  gap: 7px !important;
}
.plan-draft-inline-editor button { min-height: 38px !important; padding: 0 14px; }
.plan-confirmation-draft > footer { display: grid; grid-template-columns: 1fr 1fr; }

@media (max-width: 760px) {
  .plan-draft-inline-editor {
    grid-template-columns: 1fr 1fr;
  }
  .plan-draft-inline-editor label:first-child { grid-column: 1 / -1; }
}
.focus-start-choice { display: grid; gap: 10px; padding: 5px 2px 8px; }
.focus-start-choice > small { color: var(--fm-warning); font-size: 10px; font-weight: 850; letter-spacing: .06em; }
.focus-start-choice h3 { margin: 0; font-size: 20px; }
.focus-start-choice p { margin: 0 0 4px; color: var(--fm-muted); font-size: 12px; line-height: 1.4; }
.focus-start-choice button { min-height: 46px; border-radius: 11px; }
.auth-experience-active .side-rail,
.auth-experience-active .topbar,
.auth-experience-active .mobile-app-header,
.auth-experience-active .quick-dock,
.auth-experience-active .mobile-bottom-nav,
.auth-experience-active .focus-pill {
  display: none !important;
}
.auth-experience-active .app-shell,
.auth-experience-active .main,
.auth-experience-active #accountView.active {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
}
.auth-experience-active #accountView.active {
  display: grid;
  place-items: center;
}
.auth-experience-active .account-layout {
  width: min(100% - 32px, 430px);
  grid-template-columns: 1fr;
}
.auth-experience-active .account-layout > :not(.account-signin-panel) { display: none !important; }
#coupleView:not(.workspace-connected) #coupleHeaderAdd,
#coupleView:not(.workspace-connected) .couple-plan-panel,
#coupleView:not(.workspace-connected) .couple-add-panel,
#coupleView:not(.workspace-connected) .couple-side,
#coupleView:not(.workspace-connected) .share-day-panel {
  display: none !important;
}
.form-success { min-height: 0; margin: 0; color: var(--fm-primary); font-size: 12px; }
.account-form input:focus-visible,
.account-form button:focus-visible {
  outline: 3px solid rgba(8,122,91,.22);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  #accountView { min-height: 100dvh; padding-bottom: 0; }
  body:has(#accountView.active) .focus-pill { display: none !important; }
  .account-layout { display: grid; gap: 12px; }
  .account-layout .panel { padding: 16px; border-radius: 16px; }
  .account-auth-intro { font-size: 13px; }
  .account-form label { font-size: 12px; }
  .account-form input { min-height: 48px; font-size: 16px; }
  body.auth-experience-active {
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--fm-primary-soft), var(--fm-bg) 42%);
  }
  body.auth-experience-active #accountView.active {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  }
  body.auth-experience-active .account-layout {
    width: 100%;
    max-width: 430px;
    padding: 0;
  }
  body.auth-experience-active .account-layout > :not(.account-signin-panel) { display: none !important; }
  body.auth-experience-active .account-signin-panel {
    width: 100%;
    padding: 22px !important;
    border-color: #cfe2da;
    box-shadow: var(--fm-shadow);
  }
  #coupleView:not(.workspace-connected) #coupleHeaderAdd,
  #coupleView:not(.workspace-connected) .couple-plan-panel,
  #coupleView:not(.workspace-connected) .couple-add-panel,
  #coupleView:not(.workspace-connected) .couple-side {
    display: none !important;
  }
  .review-task-card.is-in-progress { border-color: #a8d4c4; background: #f5fbf8; }
  .review-task-card.is-in-progress .review-decision-actions { display: none !important; }
  .review-progress-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    background: var(--fm-primary-soft);
    color: var(--fm-primary);
    padding: 0 8px;
    font-size: 9px;
    font-weight: 800;
  }
  .review-progress-note { margin: 0; color: var(--fm-muted); font-size: 9px; }
  .annual-goal-main { grid-template-columns: 42px minmax(0,1fr) 42px; }
  .annual-goal-copy small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .goal-focus-head > div { min-width: 0; }
  .goal-focus-head h2,
  .goal-focus-head p {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

@media (max-width: 760px) {
  .mobile-nav-item.active,
  .mobile-nav-item.active svg {
    color: var(--fm-primary) !important;
    stroke: var(--fm-primary) !important;
  }
  .mobile-nav-item.active {
    background: var(--fm-primary-soft) !important;
    border-radius: 12px !important;
  }
  .mobile-nav-item:focus { outline: none; }
  .mobile-nav-item:focus-visible {
    outline: 2px solid rgba(8,122,91,.28);
    outline-offset: -2px;
  }
  .mobile-nav-item.active::before { display: none !important; }
}

.plan-clarity-card textarea:focus {
  border-color: var(--fm-primary) !important;
  outline: 3px solid rgba(8,122,91,.12) !important;
}
