/* ============================================================================
   BentoBoard — Weekly Family Goals & Task Tracker Styles
   ============================================================================ */

/* 1. Compact Weekly Goals Strip (Hidden on Main Meals, Shown at Bottom in Focus Mode) */
.board-weekly-goals-widget {
  background: var(--bg-surface-alt);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  margin-top: 18px;
  margin-bottom: 0;
  box-shadow: inset 0 2px 4px rgba(42, 37, 33, 0.04), var(--shadow-sm);
  display: none;
  flex-direction: column;
  gap: 12px;
  transition: padding 0.18s ease, box-shadow 0.18s ease;
}

body.focus-mode .board-weekly-goals-widget {
  display: flex;
}

/* Events Focus Mode: Move Weekly Goals Sidebar to Bottom Like Meals Focus Strip */
body.focus-mode.focus-events-mode .goals-right-sidebar {
  position: static;
  top: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  background: var(--bg-surface-alt);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 14px 18px;
  box-shadow: inset 0 2px 4px rgba(42, 37, 33, 0.04), var(--shadow-sm);
}

body.focus-mode.focus-events-mode .goals-right-top {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

body.focus-mode.focus-events-mode .goals-right-top > * + * {
  margin-top: 0;
  margin-left: 12px;
}

body.focus-mode.focus-events-mode .goals-right-progress-track {
  display: none;
}

body.focus-mode.focus-events-mode .goals-right-top-actions {
  flex-direction: row;
  align-items: center;
  width: auto;
}

body.focus-mode.focus-events-mode .goals-right-top-actions > * + * {
  margin-top: 0;
  margin-left: 8px;
}

body.focus-mode.focus-events-mode .goals-right-rollover-btn,
body.focus-mode.focus-events-mode .goals-right-full-btn {
  width: auto;
}

body.focus-mode.focus-events-mode .goals-right-list-scroll {
  max-height: none;
  overflow: visible;
  padding: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

body.focus-mode.focus-events-mode .goals-right-quick-form {
  border-top: none;
  padding: 12px 0 0;
  background: transparent;
}

/* 1b. Right-Side Vertical Weekly Goals Sidebar (2/8 width on Events Page) */
.goals-right-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-height) - 110px);
  min-height: 440px;
  position: sticky;
  top: calc(var(--header-height) + 12px);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.goals-right-top {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-surface);
}

.goals-right-top > * + * {
  margin-top: 10px;
}

.goals-right-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.goals-right-title-row h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.goals-right-title-row h2 svg {
  color: var(--primary);
  flex-shrink: 0;
}

.goals-right-progress-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.goals-right-top-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goals-right-top-actions > * + * {
  margin-top: 8px;
}

.goals-right-rollover-btn,
.goals-right-full-btn {
  width: 100%;
  justify-content: center;
}

.goals-right-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-surface-alt);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goals-right-list-scroll > * + * {
  margin-top: 10px;
}

.goals-right-item {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 11px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.goals-right-item.is-pinned {
  border-color: var(--primary-border);
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-surface) 65%);
}

.goals-right-item > * + * {
  margin-top: 8px;
}

.goals-right-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.goals-right-item.is-completed {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  box-shadow: inset 0 1px 3px rgba(61, 122, 90, 0.12);
}

.goals-right-item-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-height: 36px;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
}

.goals-right-item-toggle > * + * {
  margin-left: 9px;
}

.goals-right-item-toggle .board-goal-check-box {
  margin-top: 1px;
}

.goals-right-item.is-completed .board-goal-check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.goals-right-item-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}

.goals-right-item-text > * + * {
  margin-top: 3px;
}

.goals-right-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  overflow-wrap: break-word;
}

.goals-right-item.is-completed .goals-right-item-title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--primary);
  color: var(--text-muted);
}

.goals-right-item-note {
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.35;
  overflow-wrap: break-word;
}

.goals-right-item.is-completed .goals-right-item-note {
  text-decoration: line-through;
  color: var(--text-muted);
}

.goals-right-item-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
}

.goals-right-item-footer > * + * {
  margin-left: 6px;
}

.btn-goal-icon-action.goals-right-action-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-sm);
}

.goal-more-menu.open-upward {
  top: auto;
  bottom: calc(100% + 6px);
}

.goals-right-quick-form {
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 0;
}

.goals-right-quick-form > * + * {
  margin-left: 6px;
}

.goals-right-quick-form .board-goals-quick-input {
  min-width: 0;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.goals-right-quick-form .btn-board-goals-quick-add {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.78rem;
}

.board-weekly-goals-widget.is-collapsed {
  padding: 10px 18px;
  gap: 0;
}

.board-weekly-goals-widget.is-collapsed .board-goals-body {
  display: none;
}

.board-goals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.board-goals-title-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.board-goals-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.board-goals-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin: 0;
}

.board-goals-progress-pill {
  font-size: 0.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.board-goals-progress-pill.all-done {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.board-goals-mini-bar {
  width: 76px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.board-goals-mini-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.board-goals-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-board-goals-rollover {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  min-height: 38px;
  border-radius: var(--radius-full);
  background: var(--breakfast-bg);
  color: var(--breakfast-text);
  border: 1.5px solid var(--breakfast-border);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-board-goals-rollover:hover {
  background: var(--breakfast-tag);
  transform: translateY(-1px);
}

.btn-board-goals-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-board-goals-link:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-toggle-board-goals {
  padding: 6px 12px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-toggle-board-goals:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.board-goals-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.board-goals-chips-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 8px;
}

.board-goal-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.board-goal-chip:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.board-goal-chip.is-completed {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  box-shadow: inset 0 1px 3px rgba(61, 122, 90, 0.12);
}

.board-goal-chip-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  min-height: 38px;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
}

.board-goal-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: background-color 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.board-goal-chip.is-completed .board-goal-check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.board-goal-chip-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.board-goal-chip-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  overflow-wrap: break-word;
  transition: color 0.18s ease;
}

.board-goal-chip.is-completed .board-goal-chip-title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--primary);
  color: var(--text-muted);
}

.board-goal-chip-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-goal-chip.is-completed .board-goal-chip-note {
  text-decoration: line-through;
  color: var(--text-muted);
}

.btn-board-goal-copy-next {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.btn-board-goal-copy-next:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-board-goal-copy-next.is-copied {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-border);
}

.board-goals-quick-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-goals-quick-input {
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.84rem;
}

.board-goals-quick-input:focus {
  border-color: var(--primary);
  outline: none;
}

.btn-board-goals-quick-add {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn-board-goals-quick-add:hover {
  background: var(--primary-hover);
}

/* 2. Full Weekly Family Goals Stage */
.weekly-goals-stage {
  display: none;
  flex: 1;
  padding: 20px 28px 96px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
}

.weekly-goals-stage.active {
  display: block;
}

.goals-hero-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.goals-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 240px;
}

.goals-hero-copy h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.goals-hero-copy p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 65ch;
}

.goals-progress-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  min-width: 260px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.goals-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.goals-progress-summary {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.goals-progress-percent {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.goals-progress-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.goals-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Rollover Banner from Previous Week (Compact Single-Row Footprint) */
.goals-rollover-banner {
  background: var(--breakfast-bg);
  border: 1.5px solid var(--breakfast-border);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0;
}

.goals-rollover-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

.goals-rollover-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.goals-rollover-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--breakfast-tag);
  color: var(--breakfast-text);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.goals-rollover-badge > * + * {
  margin-left: 6px;
}

.goals-rollover-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 10px;
}

.goals-rollover-cta > * + * {
  margin-left: 8px;
}

.btn-rollover-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--breakfast-border);
  background: var(--bg-surface);
  color: var(--breakfast-text);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-rollover-review:hover {
  background: var(--breakfast-tag);
}

.goals-rollover-preview-list {
  display: none;
  flex-wrap: wrap;
  gap: 0;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--breakfast-border);
}

.goals-rollover-banner.is-expanded .goals-rollover-preview-list {
  display: flex;
}

.goals-rollover-preview-list > * {
  margin-right: 10px;
  margin-bottom: 6px;
}

.goals-rollover-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 4px 6px 4px 12px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1.5px solid var(--breakfast-border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

.goals-rollover-chip > * + * {
  margin-left: 10px;
}

.btn-rollover-single-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  min-width: 76px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-rollover-single-chip:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-goals-rollover-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-goals-rollover-primary > * + * {
  margin-left: 6px;
}

.btn-goals-rollover-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Main Physical Bento Tray Board Card */
.goals-board-card {
  background: var(--bg-surface-alt);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: inset 0 2px 5px rgba(42, 37, 33, 0.05), var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goals-board-card > * + * {
  margin-top: 16px;
}

/* Inline Composer Form (Bento Top Compartment) */
.goals-composer-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.goals-composer-form > * + * {
  margin-left: 10px;
}

.goals-composer-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
  flex: 1;
}

.goals-input-main-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.goals-input-icon {
  position: absolute;
  left: 13px;
  color: var(--primary);
  pointer-events: none;
}

.pro-form-input.goal-title-input {
  padding-left: 38px;
  min-height: 48px;
  font-weight: 600;
  background: var(--bg-surface-alt);
  border: 1.5px solid var(--border-subtle);
}

.pro-form-input.goal-title-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
}

.pro-form-input.goal-note-input {
  min-height: 48px;
  background: var(--bg-surface-alt);
  border: 1.5px solid var(--border-subtle);
}

.pro-form-input.goal-note-input:focus {
  background: var(--bg-surface);
  border-color: var(--primary);
}

.btn-goal-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Toolbar & Filters */
.goals-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 4px;
}

.goals-filter-pills {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.goals-filter-pills > * + * {
  margin-left: 8px;
}

.goals-filter-pills .pantry-pill {
  min-height: 48px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
}

.goals-filter-pills .pantry-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.goals-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-goals-copy-all-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--primary-border);
  background: var(--bg-surface);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-goals-copy-all-next:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Unified Weekly Goals List (Recessed Bento Well) */
.weekly-goals-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(42, 37, 33, 0.035);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: inset 0 2px 6px rgba(42, 37, 33, 0.06);
}

.weekly-goals-list > * + * {
  margin-top: 10px;
}

[data-theme="dark"] .weekly-goals-list {
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.goal-bento-item {
  position: relative;
  overflow: visible;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-bento-item.is-pinned {
  border-color: var(--primary-border);
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg-surface) 60%);
}

.goal-bento-item.is-archived {
  opacity: 0.82;
  border-style: dashed;
}

.goal-bento-item > * + * {
  margin-left: 14px;
}

.goal-bento-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.goal-bento-item.is-completed {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  box-shadow: inset 0 1px 3px rgba(61, 122, 90, 0.14);
}

.goal-item-main {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.goal-item-main > * + * {
  margin-left: 12px;
}

.goal-check-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin: -6px -4px -6px -6px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: var(--radius-md);
}

.goal-check-btn:hover .goal-check-visual {
  border-color: var(--primary);
  transform: scale(1.06);
}

.goal-check-visual {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, color 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-bento-item.is-completed .goal-check-visual {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: scale(1.04);
}

.goal-text-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding-top: 3px;
}

.goal-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.goal-title-row > * {
  margin-right: 8px;
}

.goal-title-row > *:last-child {
  margin-right: 0;
}

.goal-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  overflow-wrap: break-word;
  text-decoration-line: line-through;
  text-decoration-thickness: 2.2px;
  text-decoration-color: transparent;
  transition: color 0.2s ease, text-decoration-color 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.goal-bento-item.is-completed .goal-item-title {
  text-decoration-line: line-through;
  text-decoration-thickness: 2.2px;
  text-decoration-color: var(--primary);
  color: var(--text-secondary);
}

.goal-item-note {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.goal-bento-item.is-completed .goal-item-note {
  text-decoration: line-through;
  color: var(--text-muted);
}

.goal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.goal-status-badge.done {
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.goal-status-badge.from-prev {
  background: var(--breakfast-bg);
  color: var(--breakfast-text);
  border: 1px solid var(--breakfast-border);
}

.goal-status-badge.copied-next {
  background: var(--lunch-bg);
  color: var(--lunch-text);
  border: 1px solid var(--lunch-border);
}

.goal-status-badge.is-pinned {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.goal-status-badge.is-archived {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.goal-item-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.goal-item-actions > * + * {
  margin-left: 8px;
}

.btn-goal-copy-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-goal-copy-next:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-goal-copy-next.is-copied {
  background: var(--lunch-bg);
  border-color: var(--lunch-border);
  color: var(--lunch-text);
}

.btn-goal-icon-action {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-goal-icon-action:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--primary);
}

.btn-goal-icon-action.danger:hover {
  background: var(--danger-soft);
  color: var(--danger-red);
  border-color: var(--danger-red);
}

.btn-goal-icon-action.is-pinned-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.goals-detail-more-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.goal-more-menu {
  min-width: 196px;
  z-index: 55;
}

.goals-detail-more-wrap.is-open .goal-more-menu {
  display: flex;
  flex-direction: column;
}

/* Inline Edit Row Inside Goal Item */
.goal-inline-edit-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.goal-inline-edit-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.goal-inline-edit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Empty State for Weekly Goals */
.goals-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.goals-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.goals-empty-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.goals-empty-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 46ch;
}

/* Kiosk PIN Lock Rules for Weekly Goals */
body.is-pin-locked #header-goals-controls,
body.is-pin-locked #btn-pro-rollover-goals,
body.is-pin-locked .goals-composer-form,
body.is-pin-locked .board-goals-quick-form,
body.is-pin-locked .goals-right-quick-form,
body.is-pin-locked .btn-board-goals-rollover,
body.is-pin-locked .btn-board-goal-copy-next,
body.is-pin-locked .goals-rollover-banner,
body.is-pin-locked .btn-goals-copy-all-next,
body.is-pin-locked .goal-item-actions {
  display: none !important;
}

/* Responsive Breakpoints for Weekly Goals */
@media (max-width: 820px) {
  .goals-composer-form {
    flex-direction: column;
  }

  .goals-composer-inputs {
    grid-template-columns: 1fr;
  }

  .goal-inline-edit-inputs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .weekly-goals-stage {
    padding: 10px 12px calc(var(--mobile-nav-height) + 28px);
  }

  .goals-hero-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
  }

  .goals-hero-copy {
    min-width: 0;
  }

  .goals-hero-copy h2 {
    font-size: 1.16rem;
  }

  .goals-hero-copy p {
    display: none;
  }

  .goals-progress-card {
    min-width: 158px;
    padding: 7px 11px;
    gap: 4px;
    border-radius: var(--radius-md);
  }

  .goals-progress-summary {
    font-size: 0.74rem;
  }

  .goals-progress-percent {
    font-size: 0.86rem;
  }

  .goals-progress-track {
    height: 6px;
  }

  .goals-rollover-banner {
    padding: 8px 10px;
    margin-bottom: 8px;
    gap: 6px;
    border-radius: var(--radius-lg);
  }

  .goals-rollover-info {
    gap: 6px;
  }

  .goals-rollover-sub {
    display: none;
  }

  .goals-rollover-preview-list {
    flex-direction: column;
    gap: 0;
  }

  .goals-rollover-preview-list > * {
    margin-right: 0;
    margin-bottom: 6px;
  }

  .goals-rollover-preview-list > *:last-child {
    margin-bottom: 0;
  }

  .goals-rollover-chip {
    width: 100%;
    padding: 4px 6px 4px 10px;
    min-height: 48px;
    font-size: 0.78rem;
  }

  .btn-rollover-single-chip {
    min-height: 48px;
    padding: 8px 14px;
  }

  .goals-rollover-cta {
    width: 100%;
  }

  .btn-goals-rollover-primary {
    width: 100%;
    min-height: 48px;
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .goals-board-card {
    padding: 10px;
    gap: 8px;
    border-radius: var(--radius-lg);
  }

  .goals-composer-form {
    padding: 8px;
    gap: 6px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    order: 3;
  }

  .goals-composer-inputs {
    display: contents;
  }

  .goals-input-main-wrap {
    grid-column: 1 / -1;
  }

  .pro-form-input.goal-title-input,
  .pro-form-input.goal-note-input,
  .btn-goal-submit {
    min-height: 48px;
  }

  .btn-goal-submit {
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .goals-list-toolbar {
    gap: 6px;
    padding-bottom: 2px;
    order: 1;
  }

  .goals-filter-pills .pantry-pill {
    min-height: 48px;
    padding: 6px 11px;
    font-size: 0.76rem;
  }

  .btn-goals-copy-all-next {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 0.78rem;
  }

  .weekly-goals-list {
    padding: 8px;
    gap: 8px;
    order: 2;
  }

  .goal-bento-item {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px;
    gap: 8px;
    overflow: visible;
  }

  .goal-item-actions {
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px dashed var(--border-subtle);
  }

  .btn-goal-copy-next {
    flex: 1;
    justify-content: center;
  }

  .board-weekly-goals-widget {
    padding: 12px 14px;
  }

  .board-goals-chips-list {
    grid-template-columns: 1fr;
  }
}

/* Drag-to-Reorder Weekly Goals */
.goal-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 36px;
  min-width: 26px;
  margin: 0 -2px 0 -6px;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.goal-drag-handle:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.goal-drag-handle:active {
  cursor: grabbing;
}

.goal-bento-item.is-dragging {
  opacity: 0.45;
}

.goal-bento-item.is-drop-before::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: -6px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
  z-index: 3;
}

.goal-bento-item.is-drop-after::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -6px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
  z-index: 3;
}

