/* =============================================================
   Tools / engagement-app styles.
   ============================================================= */

/* ----- Quiz ----- */
.lhm-quiz-card {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	box-shadow: var(--lhm-shadow-md);
	padding: var(--lhm-space-7);
	max-width: 720px;
	margin: 0 auto;
}
.lhm-quiz-intro { text-align: center; }
.lhm-quiz-illust {
	display: inline-flex; align-items: center; justify-content: center;
	width: 88px; height: 88px;
	background: linear-gradient(135deg, var(--lhm-pink), var(--lhm-lavender));
	border-radius: 50%;
	color: #fff;
	margin-bottom: var(--lhm-space-4);
}
.lhm-quiz-points {
	list-style: none; padding: 0; margin: var(--lhm-space-5) 0;
	text-align: left; max-width: 480px; margin-left: auto; margin-right: auto;
	display: flex; flex-direction: column; gap: 8px;
}
.lhm-quiz-points li {
	padding-left: 28px; position: relative; color: var(--lhm-muted);
}
.lhm-quiz-points li::before {
	content: "✓"; position: absolute; left: 0; color: #57755b; font-weight: 700;
	width: 20px; height: 20px; background: rgba(168, 192, 165, .2);
	border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
.lhm-quiz-progress {
	height: 6px; background: var(--lhm-beige);
	border-radius: var(--lhm-radius-pill);
	overflow: hidden;
	margin-bottom: var(--lhm-space-5);
}
.lhm-quiz-progress-fill {
	display: block; height: 100%;
	background: linear-gradient(90deg, var(--lhm-terracotta), var(--lhm-pink));
	border-radius: var(--lhm-radius-pill);
	transition: width var(--lhm-trans);
}
.lhm-quiz-step h3 { font-size: 1.4rem; margin-bottom: var(--lhm-space-4); }
.lhm-quiz-options { display: grid; gap: 10px; margin-top: var(--lhm-space-4); }
.lhm-quiz-option {
	background: var(--lhm-beige);
	border: 2px solid transparent;
	border-radius: var(--lhm-radius-md);
	padding: 14px 18px;
	font-family: var(--lhm-font-ui);
	font-weight: 500;
	color: var(--lhm-charcoal);
	cursor: pointer;
	text-align: left;
	transition: background var(--lhm-trans), border-color var(--lhm-trans), transform var(--lhm-trans);
	font-size: 1rem;
}
.lhm-quiz-option:hover { background: var(--lhm-cream); border-color: var(--lhm-terracotta); transform: translateX(4px); }
.lhm-quiz-option.is-selected { background: #fff; border-color: var(--lhm-terracotta); }
.lhm-quiz-nav { display: flex; align-items: center; justify-content: space-between; margin-top: var(--lhm-space-5); }
.lhm-quiz-counter { color: var(--lhm-muted); font-family: var(--lhm-font-ui); font-size: .9rem; }
.lhm-quiz-result { text-align: center; }
.lhm-quiz-result h3 { font-size: 1.8rem; margin: 12px 0; }
.lhm-quiz-result-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--lhm-space-4); margin: var(--lhm-space-5) 0; text-align: left; }
.lhm-quiz-result-actions { display: flex; gap: var(--lhm-space-3); justify-content: center; flex-wrap: wrap; }
.lhm-quiz-save-confirm {
	margin-top: var(--lhm-space-3); text-align: center; color: #57755b;
	background: rgba(168, 192, 165, .18); padding: 10px 14px; border-radius: var(--lhm-radius-md);
	font-size: .9rem;
}

/* ----- Routine planner ----- */
.lhm-routine {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: var(--lhm-space-5);
}
.lhm-routine-bank, .lhm-routine-flow {
	background: #fff;
	border-radius: var(--lhm-radius-md);
	padding: var(--lhm-space-5);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-routine-bank h4, .lhm-routine-flow h4 { margin: 0 0 var(--lhm-space-3); }
.lhm-routine-cards { display: flex; flex-direction: column; gap: 8px; max-height: 480px; overflow-y: auto; padding-right: 4px; }
.lhm-routine-card {
	background: var(--lhm-beige);
	border: 1px solid transparent;
	border-radius: var(--lhm-radius-md);
	padding: 10px 14px;
	display: flex; align-items: center; gap: 10px;
	font-family: var(--lhm-font-ui); font-weight: 500;
	cursor: grab;
	transition: background var(--lhm-trans), transform var(--lhm-trans);
	text-align: left;
}
.lhm-routine-card:hover { background: var(--lhm-pink); }
.lhm-routine-card:active { cursor: grabbing; transform: scale(.98); }

.lhm-routine-flow-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--lhm-space-3); }
.lhm-routine-dropzone {
	list-style: none; padding: var(--lhm-space-4); margin: 0;
	background: var(--lhm-cream); border: 2px dashed rgba(47, 42, 38, .15);
	border-radius: var(--lhm-radius-md);
	min-height: 280px;
	display: flex; flex-direction: column; gap: 10px;
}
.lhm-routine-dropzone.is-dragover { border-color: var(--lhm-terracotta); background: rgba(231, 181, 176, .18); }
.lhm-routine-dropzone li:not(.lhm-routine-empty) {
	background: #fff; padding: 12px 14px; border-radius: var(--lhm-radius-md);
	box-shadow: var(--lhm-shadow-sm);
	display: flex; align-items: center; gap: 12px;
	font-family: var(--lhm-font-ui); font-weight: 500;
}
.lhm-routine-empty { color: var(--lhm-muted); font-style: italic; text-align: center; padding: var(--lhm-space-5); }
.lhm-routine-remove { background: transparent; border: 0; cursor: pointer; color: var(--lhm-muted); font-size: 1.2rem; margin-left: auto; }
.lhm-routine-remove:hover { color: var(--lhm-terracotta); }
.lhm-routine-saved { color: #57755b; font-family: var(--lhm-font-ui); font-size: .88rem; margin-top: 12px; }

/* ----- Sleep calculator ----- */
.lhm-sleep {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--lhm-space-5);
	background: #fff;
	padding: var(--lhm-space-6);
	border-radius: var(--lhm-radius-lg);
	box-shadow: var(--lhm-shadow-md);
}
.lhm-sleep-form { display: flex; flex-direction: column; gap: var(--lhm-space-3); }
.lhm-sleep-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--lhm-font-ui); font-size: .9rem; color: var(--lhm-muted); }
.lhm-sleep-result h4 { margin-bottom: var(--lhm-space-3); }
.lhm-sleep-list { padding-left: 0; list-style: none; }
.lhm-sleep-list li {
	background: var(--lhm-cream);
	border-radius: var(--lhm-radius-md);
	padding: 12px 16px;
	margin-bottom: 8px;
	display: flex; gap: 12px; align-items: center;
	font-family: var(--lhm-font-ui);
}
.lhm-sleep-list .time { font-weight: 600; color: var(--lhm-terracotta); min-width: 70px; }
.lhm-sleep-tips { margin-top: var(--lhm-space-3); display: flex; flex-direction: column; gap: 8px; }
.lhm-sleep-tip { padding: 10px 14px; background: rgba(168, 192, 165, .14); border-radius: var(--lhm-radius-md); font-size: .92rem; color: var(--lhm-charcoal); }

/* ----- Family wellness planner ----- */
.lhm-wellness {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-6);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-wellness-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--lhm-space-4); }
.lhm-wellness-chip {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--lhm-beige);
	padding: 6px 12px;
	border-radius: var(--lhm-radius-pill);
	font-family: var(--lhm-font-ui); font-size: .85rem;
}
.lhm-wellness-grid {
	width: 100%; border-collapse: separate; border-spacing: 4px;
}
.lhm-wellness-grid th { font-family: var(--lhm-font-ui); font-weight: 600; font-size: .85rem; padding: 8px; color: var(--lhm-muted); text-align: center; }
.lhm-wellness-grid th:first-child, .lhm-wellness-grid td:first-child { text-align: left; }
.lhm-wellness-grid tbody th { text-align: left; background: var(--lhm-cream); border-radius: var(--lhm-radius-sm); }
.lhm-wellness-cell {
	width: 100%; height: 44px;
	border-radius: var(--lhm-radius-sm);
	background: var(--lhm-cream);
	border: 1px solid rgba(47, 42, 38, .06);
	cursor: pointer;
	transition: background var(--lhm-trans), transform var(--lhm-trans);
}
.lhm-wellness-cell:hover { transform: scale(1.04); }
.lhm-wellness-cell.is-on { background: var(--lhm-sage); border-color: transparent; box-shadow: inset 0 0 0 2px #57755b; }
.lhm-wellness-cell[data-block="meals"].is-on    { background: var(--lhm-sage); }
.lhm-wellness-cell[data-block="hydrate"].is-on  { background: var(--lhm-lavender); }
.lhm-wellness-cell[data-block="outdoor"].is-on  { background: #cde0c8; }
.lhm-wellness-cell[data-block="clean"].is-on    { background: var(--lhm-beige); }
.lhm-wellness-cell[data-block="sleep"].is-on    { background: var(--lhm-lavender); }
.lhm-wellness-cell[data-block="wellness"].is-on { background: var(--lhm-pink); }
.lhm-wellness-actions { display: flex; gap: var(--lhm-space-3); justify-content: flex-end; margin-top: var(--lhm-space-4); }

/* ----- Nursery visualizer ----- */
.lhm-nursery {
	display: grid;
	grid-template-columns: 260px 1fr;
	grid-template-areas: "palette room" "palette actions" "suggestions suggestions";
	gap: var(--lhm-space-4);
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-5);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-nursery-palette { grid-area: palette; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.lhm-nursery-palette h4 { margin: 0 0 6px; font-size: .92rem; color: var(--lhm-muted); font-family: var(--lhm-font-ui); }
.lhm-nursery-item {
	background: var(--lhm-cream);
	border: 1px solid rgba(47, 42, 38, .06);
	border-radius: var(--lhm-radius-md);
	padding: 10px 12px;
	font-family: var(--lhm-font-ui); font-weight: 500;
	cursor: grab; text-align: left;
}
.lhm-nursery-item:hover { background: var(--lhm-beige); }
.lhm-nursery-room {
	grid-area: room;
	position: relative;
	min-height: 380px;
	background:
		radial-gradient(circle at 20% 20%, rgba(168, 192, 165, .15), transparent 50%),
		radial-gradient(circle at 80% 70%, rgba(231, 181, 176, .15), transparent 50%),
		var(--lhm-cream);
	border: 2px dashed rgba(47, 42, 38, .14);
	border-radius: var(--lhm-radius-lg);
	overflow: hidden;
}
.lhm-nursery-floor { position: absolute; inset: 24px; border-radius: var(--lhm-radius-md); background: rgba(255, 255, 255, .6); }
.lhm-nursery-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--lhm-muted); font-style: italic; padding: var(--lhm-space-4); text-align: center; pointer-events: none; }
.lhm-nursery-placed {
	position: absolute;
	background: #fff;
	padding: 8px 12px;
	border-radius: var(--lhm-radius-md);
	box-shadow: var(--lhm-shadow-sm);
	font-family: var(--lhm-font-ui); font-size: .88rem; font-weight: 500;
	cursor: move;
	display: inline-flex; gap: 6px;
}
.lhm-nursery-actions { grid-area: actions; display: flex; gap: var(--lhm-space-3); justify-content: flex-end; }
.lhm-nursery-suggestions { grid-area: suggestions; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--lhm-space-4); }

/* ----- Feeding tracker ----- */
.lhm-tracker {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-6);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-tracker-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: var(--lhm-space-5); }
.lhm-tracker-btn {
	background: var(--lhm-beige);
	border: 0;
	border-radius: var(--lhm-radius-md);
	padding: var(--lhm-space-4);
	cursor: pointer;
	font-family: var(--lhm-font-ui); font-weight: 500;
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	transition: transform var(--lhm-trans), background var(--lhm-trans);
}
.lhm-tracker-btn:hover { background: var(--lhm-pink); transform: translateY(-2px); }
.lhm-tracker-btn span:first-child { font-size: 1.6rem; }
.lhm-tracker-stats { display: flex; gap: var(--lhm-space-3); flex-wrap: wrap; margin-bottom: var(--lhm-space-4); }
.lhm-tracker-stat { background: var(--lhm-cream); padding: 8px 14px; border-radius: var(--lhm-radius-pill); font-family: var(--lhm-font-ui); font-size: .88rem; }
.lhm-tracker-stat strong { color: var(--lhm-terracotta); }
.lhm-tracker-log { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
.lhm-tracker-log li {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 14px;
	background: var(--lhm-cream);
	border-radius: var(--lhm-radius-md);
	margin-bottom: 6px;
	font-family: var(--lhm-font-ui); font-size: .92rem;
}
.lhm-tracker-log .time { color: var(--lhm-muted); }
.lhm-tracker-actions { display: flex; gap: var(--lhm-space-3); margin-top: var(--lhm-space-4); flex-wrap: wrap; }
.lhm-tracker-note { color: var(--lhm-muted); font-size: .86rem; margin-top: var(--lhm-space-3); }

/* ----- Postpartum prioritizer ----- */
.lhm-postpartum {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-6);
	box-shadow: var(--lhm-shadow-sm);
	max-width: 720px;
	margin: 0 auto;
}
.lhm-postpartum-instruction { color: var(--lhm-muted); margin-bottom: var(--lhm-space-4); }
.lhm-postpartum-rank { list-style: none; padding: 0; margin: 0 0 var(--lhm-space-5); display: flex; flex-direction: column; gap: 8px; }
.lhm-postpartum-item {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 16px;
	background: var(--lhm-cream);
	border-radius: var(--lhm-radius-md);
	cursor: grab;
	font-family: var(--lhm-font-ui); font-weight: 500;
	border: 1px solid transparent;
	transition: border-color var(--lhm-trans), transform var(--lhm-trans), background var(--lhm-trans);
}
.lhm-postpartum-item:hover { border-color: var(--lhm-terracotta); }
.lhm-postpartum-item.is-dragging { opacity: .5; transform: scale(.98); }
.lhm-postpartum-handle { color: var(--lhm-muted); cursor: grab; }
.lhm-postpartum-result { margin-top: var(--lhm-space-5); }
.lhm-postpartum-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--lhm-space-4); }

/* ----- Essentials database ----- */
.lhm-essentials-controls { margin-bottom: var(--lhm-space-3); }
.lhm-essentials-search {
	position: relative;
	display: flex; align-items: center;
	max-width: 520px;
}
.lhm-essentials-search svg { position: absolute; left: 14px; color: var(--lhm-muted); }
.lhm-essentials-search input { padding-left: 40px; }
.lhm-essentials-filters {
	display: flex; gap: 6px; margin-bottom: var(--lhm-space-5); flex-wrap: wrap;
	scroll-snap-type: x mandatory;
}
.lhm-essentials-filter {
	background: #fff;
	border: 1px solid rgba(47, 42, 38, .12);
	border-radius: var(--lhm-radius-pill);
	padding: 8px 14px;
	font-family: var(--lhm-font-ui); font-size: .88rem; font-weight: 500;
	color: var(--lhm-muted);
	cursor: pointer;
	transition: background var(--lhm-trans), color var(--lhm-trans), border-color var(--lhm-trans);
	white-space: nowrap;
}
.lhm-essentials-filter:hover { border-color: var(--lhm-terracotta); color: var(--lhm-charcoal); }
.lhm-essentials-filter.is-active { background: var(--lhm-terracotta); color: var(--lhm-cream); border-color: var(--lhm-terracotta); }
.lhm-essentials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--lhm-space-5); }
.lhm-essentials-foot { text-align: center; color: var(--lhm-muted); font-size: .9rem; margin-top: var(--lhm-space-5); }

/* ----- Meal planner ----- */
.lhm-meals {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-6);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-meals-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--lhm-space-3); align-items: end; }
.lhm-meals-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--lhm-font-ui); font-size: .9rem; color: var(--lhm-muted); }
.lhm-meals-form button { grid-column: 1 / -1; justify-self: start; }
.lhm-meals-output { margin-top: var(--lhm-space-5); display: grid; grid-template-columns: 2fr 1fr; gap: var(--lhm-space-5); }
.lhm-meals-week { display: flex; flex-direction: column; gap: 10px; }
.lhm-meals-day { background: var(--lhm-cream); border-radius: var(--lhm-radius-md); padding: 12px 16px; }
.lhm-meals-day h5 { font-size: .92rem; margin: 0 0 6px; color: var(--lhm-terracotta); font-family: var(--lhm-font-ui); letter-spacing: .08em; text-transform: uppercase; }
.lhm-meals-day-meals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: .9rem; }
.lhm-meals-grocery { background: var(--lhm-cream); border-radius: var(--lhm-radius-md); padding: var(--lhm-space-4); }
.lhm-meals-grocery h4 { margin-top: 0; }
.lhm-meals-grocery ul { list-style: none; padding: 0; margin: 0 0 var(--lhm-space-3); }
.lhm-meals-grocery li { padding: 6px 0; border-bottom: 1px solid rgba(47, 42, 38, .06); font-size: .92rem; display: flex; justify-content: space-between; gap: 8px; }

/* ----- Self-care generator ----- */
.lhm-selfcare {
	max-width: 560px; margin: 0 auto; text-align: center;
}
.lhm-selfcare-card {
	background: linear-gradient(135deg, #fff 0%, rgba(168, 192, 165, .14) 100%);
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-7);
	box-shadow: var(--lhm-shadow-md);
	min-height: 220px;
	display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.lhm-selfcare-eyebrow {
	display: inline-block; font-family: var(--lhm-font-ui); letter-spacing: .12em;
	text-transform: uppercase; font-size: .76rem; color: #57755b;
	background: rgba(168, 192, 165, .25);
	padding: 4px 12px; border-radius: var(--lhm-radius-pill);
	margin: 0 auto;
}
.lhm-selfcare-card h3 { font-size: 1.5rem; margin: 0; }
.lhm-selfcare-card p { color: var(--lhm-muted); margin: 0; }
.lhm-selfcare-actions { display: flex; gap: var(--lhm-space-3); justify-content: center; flex-wrap: wrap; margin-top: var(--lhm-space-5); }
.lhm-selfcare-saved { background: #fff; border-radius: var(--lhm-radius-md); padding: var(--lhm-space-4); margin-top: var(--lhm-space-5); text-align: left; }
.lhm-selfcare-saved ul { list-style: none; padding: 0; margin: 0; }
.lhm-selfcare-saved li { padding: 6px 0; border-bottom: 1px solid rgba(47, 42, 38, .06); display: flex; align-items: center; justify-content: space-between; }

/* ----- Milestone tracker ----- */
.lhm-milestones {
	background: #fff;
	border-radius: var(--lhm-radius-lg);
	padding: var(--lhm-space-6);
	box-shadow: var(--lhm-shadow-sm);
}
.lhm-milestones-select { max-width: 360px; display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--lhm-space-5); font-family: var(--lhm-font-ui); font-size: .9rem; color: var(--lhm-muted); }
.lhm-milestones-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--lhm-space-4); }
.lhm-milestone-panel { background: var(--lhm-cream); border-radius: var(--lhm-radius-md); padding: var(--lhm-space-4); }
.lhm-milestone-panel h4 { font-size: 1rem; margin-bottom: 8px; }
.lhm-milestone-panel ul { padding-left: 18px; margin: 0; color: var(--lhm-muted); font-size: .92rem; }

/* ----- Comparison engine ----- */
.lhm-compare { background: #fff; border-radius: var(--lhm-radius-lg); padding: var(--lhm-space-6); box-shadow: var(--lhm-shadow-sm); }
.lhm-compare-instruction { color: var(--lhm-muted); margin-bottom: var(--lhm-space-4); }
.lhm-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--lhm-space-4); }
.lhm-compare-empty { color: var(--lhm-muted); font-style: italic; }
.lhm-compare-cell { background: var(--lhm-cream); border-radius: var(--lhm-radius-md); padding: var(--lhm-space-4); display: flex; flex-direction: column; gap: 10px; }
.lhm-compare-cell h4 { margin: 0; }
.lhm-compare-remove { background: transparent; border: 0; cursor: pointer; color: var(--lhm-terracotta); font-family: var(--lhm-font-ui); font-size: .88rem; align-self: flex-start; }

.lhm-compare-rail {
	position: fixed; right: 24px; bottom: 88px;
	background: #fff;
	box-shadow: var(--lhm-shadow-lg);
	border-radius: var(--lhm-radius-md);
	padding: var(--lhm-space-3);
	width: 260px;
	z-index: 40;
}
.lhm-compare-rail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lhm-compare-rail-clear { background: transparent; border: 0; cursor: pointer; color: var(--lhm-muted); font-size: 1.2rem; }
.lhm-compare-rail-list { list-style: none; padding: 0; margin: 0 0 var(--lhm-space-3); max-height: 200px; overflow-y: auto; }
.lhm-compare-rail-list li {
	display: flex; gap: 8px; align-items: center; padding: 6px 8px;
	background: var(--lhm-cream); border-radius: var(--lhm-radius-sm); margin-bottom: 4px;
	font-family: var(--lhm-font-ui); font-size: .85rem;
}
.lhm-compare-rail-list img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.lhm-compare-rail-cta { width: 100%; }
