/* Jinjerli Journal: client dashboard. Everything is scoped to .jj-app so it cannot leak into the theme. */

/* DM Serif Display, bundled with the plugin so the title looks the same on every page and in the phone app. SIL Open Font License. */
@font-face {
	font-family: "JJ DM Serif Display";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/dm-serif-display-latin-400-normal.woff2") format("woff2");
}

.jj-app {
	--jj-navy: #2a3157;
	--jj-maroon: var(--e-global-color-bf59160, #8c2f2f);
	--jj-maroon-dark: color-mix(in srgb, var(--e-global-color-bf59160, #8c2f2f) 82%, #000);
	--jj-cream: #f6efe6;
	--jj-paper: #fffdfa;
	--jj-line: #e4d9cc;
	--jj-field: #cbbfb0;
	--jj-muted: #5d6385;
	--jj-ok: #2f6f55;
	--jj-ok-bg: #e3f0e8;
	--jj-part-bg: #efd9d4;
	--jj-radius: 14px;
	--jj-blue: #8a9bb6;       /* the light blue the site uses on its buttons */
	--jj-blue-dark: #74869f;
	--jj-quote-font: "DM Serif Display", Georgia, serif;
	--jj-display-font: "JJ DM Serif Display", "DM Serif Display", Georgia, serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 1060px;
	margin: 0 auto;
	container: jj / inline-size;
	--jj-sticky-top: 24px;
	padding: 0 0 48px;
	color: var(--jj-navy);
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.55;
	text-align: left;
}
.jj-app *, .jj-app *::before, .jj-app *::after { box-sizing: border-box; }
.jj-app h2, .jj-app h3, .jj-app h4 { color: var(--jj-navy); font-family: var(--jj-heading-font, inherit); line-height: 1.25; margin: 0 0 .5em; }
.jj-app h2 { font-size: 1.6rem; }
.jj-app h3 { font-size: 1.2rem; }
.jj-app h4 { font-size: 1rem; margin-top: 1.1em; }
.jj-app p { margin: 0 0 .8em; }
.jj-app ul { margin: 0; padding: 0; }
.jj-app a { color: var(--jj-maroon); }
.jj-app :focus-visible { outline: 3px solid var(--jj-navy); outline-offset: 2px; }
.jj-app [hidden] { display: none !important; }
.jj-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jj-muted { color: var(--jj-muted); }
.jj-eyebrow { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-maroon); margin: 0 0 .25em; }

.jj-loading { color: var(--jj-muted); }

/* ---------- header ---------- */
.jj-head { margin-bottom: 14px; }
.jj-head__top { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.jj-head__title { margin: 0; }

/* title on a slight arch, with a rotating line beneath (half the title size) */
.jj-hero { text-align: center; margin: 0 0 6px; }
.jj-app h1.jj-hero__title { margin: 0 auto; padding: 0; line-height: 0; font-size: 1rem; border: 0; }
/* the full Jinjerli logo, only when the journal is opened from the home screen (the site header with the logo is hidden there) */
.jj-app .jj-applogo { display: none; width: min(52%, 200px); height: auto; margin: 4px auto 8px; position: relative; left: -10px; }
@media (display-mode: standalone) { .jj-app .jj-applogo { display: block; } }
.jj-hero__svg { display: block; width: min(100%, 560px); height: auto; margin: 0 auto; overflow: visible; }
.jj-hero__text { font-family: var(--jj-display-font); font-size: 54px; fill: var(--jj-navy); }
.jj-app .jj-hero__line {
	font-family: var(--jj-display-font); font-size: clamp(16px, 4.5cqw, 25px); line-height: 1.3; color: var(--jj-maroon);
	max-width: 720px; min-height: 2.6em; text-wrap: balance; margin: 2px auto 0; display: flex; align-items: flex-start; justify-content: center;
}
@container jj (min-width: 760px) { .jj-app .jj-hero__line { min-height: 1.3em; } }
@media (prefers-reduced-motion: no-preference) {
	.jj-app .jj-hero__line { transition: opacity .7s ease, transform .7s ease; }
	.jj-app .jj-hero__line.is-out { opacity: 0; transform: translateY(6px); }
}
.jj-saved { font-size: .85rem; color: var(--jj-muted); }
.jj-saved--error { color: var(--jj-maroon-dark); font-weight: 600; }
.jj-daynav { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.jj-daynav__label { display: flex; flex-direction: column; min-width: 150px; line-height: 1.25; }
.jj-daynav__label span { font-size: .9rem; color: var(--jj-muted); }
.jj-iconbtn {
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--jj-field); background: var(--jj-paper);
	color: var(--jj-navy); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0;
}
.jj-iconbtn:hover:not(:disabled) { background: var(--jj-cream); }
.jj-iconbtn:disabled { opacity: .35; cursor: default; }

/* ---------- tabs ---------- */
.jj-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px 6px; scrollbar-width: thin; }
.jj-tab {
	flex: 0 0 auto; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--jj-line);
	background: var(--jj-paper); color: var(--jj-navy); font: inherit; font-size: .95rem; cursor: pointer; white-space: nowrap;
}
.jj-tab:hover { background: var(--jj-cream); }
.jj-tab.is-active { background: var(--jj-navy); border-color: var(--jj-navy); color: #fff; }
.jj-tab__tick { margin-left: 6px; color: var(--jj-ok); font-weight: 700; }
.jj-tab.is-active .jj-tab__tick { color: #bfe6cf; }

/* ---------- cards ---------- */
.jj-panel { outline: none; }
.jj-card {
	background: var(--jj-paper); border: 1px solid var(--jj-line); border-radius: var(--jj-radius);
	padding: 18px; margin: 0 0 14px;
}
.jj-card--hero { background: var(--jj-navy); border-color: var(--jj-navy); color: #fff; }
.jj-card--hero h2, .jj-card--hero h3, .jj-card--hero .jj-bigday { color: #fff; }
.jj-card--hero .jj-eyebrow { color: #f1d6b8; }
.jj-card--hero .jj-muted { color: #d6d9ea; }
.jj-card--hero a { color: #fff; }
.jj-card--soft { background: var(--jj-cream); border-color: var(--jj-cream); }
.jj-card--note { background: var(--jj-cream); border-color: var(--jj-line); }
.jj-card--meal h3 { margin-bottom: .75em; }
.jj-bigday { font-size: 2.2rem; margin: 0 0 .3em; }
.jj-bigday span { font-size: 1.1rem; font-weight: 400; opacity: .85; }
.jj-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; margin: 6px 0 12px; }
.jj-bar__fill { height: 100%; background: #f1d6b8; border-radius: 999px; }

.jj-quote {
	margin: 0 0 14px; padding: 18px 20px; background: var(--jj-cream); border-left: 4px solid var(--jj-maroon);
	border-radius: 0 var(--jj-radius) var(--jj-radius) 0; font-style: normal;
}
.jj-quote p { margin: 0; }
.jj-quote cite { display: block; margin-top: .5em; font-size: .9rem; font-style: normal; color: var(--jj-muted); }
.jj-app .jj-quote p { font-family: var(--jj-quote-font); font-size: 25px; line-height: 1.3; }

.jj-reminder { font-size: 1.05rem; margin: 0; }
.jj-celebrate { margin: .8em 0 0; color: var(--jj-ok); font-weight: 600; }

/* ---------- overview checklist ---------- */
.jj-checks { list-style: none; display: grid; gap: 8px; }
.jj-checkrow {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; text-align: left;
	background: var(--jj-paper); border: 1px solid var(--jj-line); border-radius: 12px; font: inherit; color: var(--jj-navy); cursor: pointer;
}
.jj-checkrow:hover { background: var(--jj-cream); }
.jj-checkrow__icon {
	flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--jj-field);
	display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff;
}
.jj-checkrow__name { flex: 1; font-weight: 600; }
.jj-checkrow__status { font-size: .9rem; color: var(--jj-muted); }
.jj-checkrow--done { background: var(--jj-ok-bg); border-color: #b9d8c6; }
.jj-checkrow--done .jj-checkrow__icon { background: var(--jj-ok); border-color: var(--jj-ok); }
.jj-checkrow--done .jj-checkrow__status { color: var(--jj-ok); font-weight: 600; }
.jj-checkrow--started .jj-checkrow__icon { border-color: var(--jj-maroon); background: linear-gradient(90deg, var(--jj-maroon) 50%, transparent 50%); }

/* ---------- stats ---------- */
.jj-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.jj-stat { background: var(--jj-cream); border-radius: 12px; padding: 10px 12px; }
.jj-stat__label { display: block; font-size: .8rem; color: var(--jj-muted); }
.jj-stat__value { display: block; font-weight: 700; font-size: 1.05rem; }

/* ---------- goals ---------- */
.jj-goals, .jj-bullets { padding-left: 1.2em; }
.jj-goals li, .jj-bullets li { margin: .3em 0; }
.jj-bullets--soft li::marker { color: var(--jj-maroon); }
.jj-details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.jj-details.jj-card { padding: 10px 18px; }
.jj-history { padding: 8px 0; border-top: 1px solid var(--jj-line); }
.jj-history h4 { margin: 0 0 .3em; }

/* ---------- 91 day grid ---------- */
.jj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 5px; margin: 10px 0; }
.jj-day {
	min-height: 34px; border-radius: 8px; border: 1px solid var(--jj-line); background: var(--jj-paper); color: var(--jj-navy);
	font: inherit; font-size: .78rem; cursor: pointer; padding: 0;
}
.jj-day--part { background: var(--jj-part-bg); border-color: #dcbab2; }
.jj-day--full { background: var(--jj-ok); border-color: var(--jj-ok); color: #fff; }
.jj-day--future { opacity: .4; cursor: default; }
.jj-day--current { outline: 3px solid var(--jj-navy); outline-offset: 1px; }
.jj-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--jj-muted); margin-top: 6px; }
.jj-legend li { display: inline-flex; align-items: center; gap: 6px; }
.jj-swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--jj-line); display: inline-block; }
.jj-swatch.jj-day--none { background: var(--jj-paper); }
.jj-swatch--a { background: var(--jj-maroon); border-color: var(--jj-maroon); border-radius: 50%; }
.jj-swatch--b { background: var(--jj-navy); border-color: var(--jj-navy); border-radius: 50%; }

/* ---------- charts ---------- */
.jj-chart { display: block; width: 100%; max-width: 560px; height: auto; margin: 6px 0; overflow: visible; }
.jj-chart__grid { stroke: var(--jj-line); stroke-width: 1; }
.jj-chart__text { fill: var(--jj-muted); font-size: 11px; font-family: inherit; }
.jj-chart__line { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.jj-chart__line.jj-s-a { stroke: var(--jj-maroon); }
.jj-chart__line.jj-s-b { stroke: var(--jj-navy); }
.jj-chart__dot.jj-s-a { fill: var(--jj-maroon); }
.jj-chart__dot.jj-s-b { fill: var(--jj-navy); }

/* ---------- forms ---------- */
.jj-field { margin: 0 0 14px; min-width: 0; }
.jj-field label, .jj-label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.jj-app input[type="text"], .jj-app input[type="number"], .jj-app input[type="time"], .jj-app textarea {
	display: block; width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--jj-navy);
	background: #fff; border: 1px solid var(--jj-field); border-radius: 10px; box-shadow: none;
}
.jj-app textarea { resize: vertical; min-height: 70px; }
.jj-app input:focus, .jj-app textarea:focus { border-color: var(--jj-navy); }
.jj-hint { font-size: .85rem; color: var(--jj-muted); margin: 4px 0 0; }
.jj-static { margin: 0; padding: 10px 0; }
.jj-twocol, .jj-grid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.jj-check-field { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0 10px; }
.jj-check-field input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--jj-maroon); flex: 0 0 auto; margin: 0; }
.jj-check-field label { font-weight: 600; margin: 0; }

/* 1 to 10 rating */
.jj-rating { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.jj-rating legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.jj-rating__row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.jj-rating__opt { position: relative; }
.jj-rating__opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jj-rating__opt label {
	display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; border-radius: 10px;
	border: 1px solid var(--jj-field); background: #fff; font-weight: 600; cursor: pointer;
}
.jj-rating__opt input:checked + label { background: var(--jj-navy); border-color: var(--jj-navy); color: #fff; }
.jj-rating__opt input:focus-visible + label { outline: 3px solid var(--jj-maroon); outline-offset: 2px; }
.jj-rating__ends { display: flex; justify-content: space-between; font-size: .85rem; color: var(--jj-muted); margin: 6px 0 0; }

/* ---------- buttons ---------- */
.jj-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 22px; border-radius: 999px;
	border: 2px solid var(--jj-maroon); background: var(--jj-maroon); color: #fff !important; font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; line-height: 1.2;
}
.jj-btn:hover:not(:disabled) { background: var(--jj-maroon-dark); border-color: var(--jj-maroon-dark); }
.jj-btn:disabled { opacity: .6; cursor: default; }
.jj-btn--ghost { background: transparent; color: var(--jj-maroon) !important; }
.jj-btn--ghost:hover:not(:disabled) { background: var(--jj-cream); color: var(--jj-maroon-dark) !important; }
.jj-btn--small { min-height: 40px; padding: 6px 16px; font-size: .9rem; }
.jj-btn--block { display: flex; width: 100%; }
.jj-linkbtn { background: none; border: 0; padding: 8px 4px; font: inherit; color: var(--jj-maroon); text-decoration: underline; cursor: pointer; min-height: 40px; }
.jj-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.jj-link { color: var(--jj-maroon); }

/* Complete block */
.jj-complete { margin: 6px 0 18px; }
.jj-complete .jj-btn { font-size: 1.05rem; min-height: 54px; }
.jj-complete__done { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--jj-ok-bg); border: 1px solid #b9d8c6; border-radius: var(--jj-radius); }
.jj-complete__badge { color: var(--jj-ok); font-weight: 700; }
.jj-complete__msg { margin: 10px 0 0; color: var(--jj-ok); }
.jj-complete__msg--error { color: var(--jj-maroon-dark); }

/* ---------- photos ---------- */
.jj-photos__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.jj-photos__item { position: relative; width: 92px; height: 92px; }
.jj-photos__item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--jj-line); display: block; }
.jj-photos__remove {
	position: absolute; top: -8px; right: -8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
	background: var(--jj-navy); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0;
}
.jj-photos__msg { color: var(--jj-maroon-dark); font-size: .9rem; margin: 6px 0 0; }

/* ---------- footer, gate ---------- */
.jj-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--jj-line); font-size: .9rem; color: var(--jj-muted); }
.jj-foot p { margin: 0 0 .4em; }
.jj-gate { text-align: center; padding: 28px 18px; background: var(--jj-paper); border: 1px solid var(--jj-line); border-radius: var(--jj-radius); }
.jj-richtext p { margin: 0 0 .8em; }
.jj-richtext ul, .jj-richtext ol { padding-left: 1.2em; margin: 0 0 .8em; }

@media (min-width: 560px) {
	.jj-twocol, .jj-grid2 { grid-template-columns: 1fr 1fr; }
	.jj-rating__row { grid-template-columns: repeat(10, 1fr); }
	.jj-card { padding: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
	.jj-btn, .jj-tab, .jj-checkrow, .jj-day { transition: background-color .15s ease, border-color .15s ease; }
}

/* collapsible meal cards */
.jj-meal { padding: 0; }
.jj-meal > summary {
	display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; cursor: pointer; list-style: none;
}
.jj-meal > summary::-webkit-details-marker { display: none; }
.jj-meal > summary::after { content: "\25BE"; margin-left: auto; color: var(--jj-muted); transition: transform .15s ease; }
.jj-meal[open] > summary::after { transform: rotate(180deg); }
.jj-meal__name { font-weight: 700; font-size: 1.1rem; flex: 0 0 auto; }
.jj-meal__preview { color: var(--jj-muted); font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jj-meal__body { padding: 0 18px 8px; }
@media (min-width: 560px) { .jj-meal > summary { padding: 12px 22px; } .jj-meal__body { padding: 0 22px 8px; } }

/* ---------- desktop: tabs down the left side ---------- */
@container jj (min-width: 820px) {
	.jj-shell {
		display: grid;
		grid-template-columns: 220px minmax(0, 1fr);
		grid-template-areas: "head head" "tabs body" "tabs foot";
		column-gap: 32px;
		align-items: start;
	}
	.jj-head { grid-area: head; }
	.jj-tabs {
		grid-area: tabs; flex-direction: column; gap: 6px; overflow: visible; margin: 0; padding: 0;
		position: sticky; top: var(--jj-sticky-top);
	}
	.jj-tab {
		display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px;
		border-radius: 12px; padding: 10px 16px; font-size: 1rem; text-align: left;
	}
	.jj-tab__tick { margin-left: auto; padding-left: 8px; }
	.jj-body { grid-area: body; min-width: 0; }
	.jj-foot { grid-area: foot; }
	.jj-shell > .jj-card, .jj-shell > .jj-gate { grid-column: 1 / -1; }
}

/* =====================================================================
 * 1.1 changes
 * ===================================================================== */

/* ---------- buttons: stop the theme making them chunky ----------
 * The theme gives every button 20px top and bottom padding. Journal buttons get 5px less (15px),
 * keeping the theme's side padding. The selectors below include "button" so they outrank the theme. */
.jj-app button.jj-btn,
.jj-app button.jj-tab,
.jj-app button.jj-checkrow,
.jj-app a.jj-btn { padding-top: 15px; padding-bottom: 15px; min-height: 0; line-height: 1.25; }
.jj-app button.jj-btn--small, .jj-app a.jj-btn--small { padding-top: 10px; padding-bottom: 10px; }

/* Buttons that should never look like big buttons */
.jj-app button.jj-linkbtn {
	background: none; border: 0; box-shadow: none; padding: 6px 2px; min-height: 0; font: inherit; font-size: .95rem;
	color: var(--jj-maroon); text-decoration: underline; border-radius: 0; text-transform: none; letter-spacing: normal;
}
.jj-app button.jj-linkbtn:hover { background: none; color: var(--jj-maroon-dark); }
.jj-app button.jj-iconbtn { padding: 0; width: 44px; height: 44px; min-height: 0; border-radius: 50%; background: var(--jj-paper); color: var(--jj-navy); border: 1px solid var(--jj-field); font-size: 1.5rem; }
.jj-app button.jj-iconbtn:hover:not(:disabled) { background: var(--jj-cream); color: var(--jj-navy); }
.jj-app button.jj-photos__remove { padding: 0; width: 30px; height: 30px; min-height: 0; border-radius: 50%; background: var(--jj-navy); color: #fff; border: 2px solid #fff; font-size: 1.1rem; }

/* ---------- Complete button: maroon with cream text, blue on hover, no border ---------- */
.jj-app button.jj-btn--complete {
	background: var(--jj-maroon); color: var(--jj-cream) !important; border: 0; box-shadow: none;
}
.jj-app button.jj-btn--complete:hover:not(:disabled),
.jj-app button.jj-btn--complete:focus-visible { background: var(--jj-blue); color: var(--jj-cream) !important; border: 0; }

/* ---------- Today's journal: cream to start, blue once complete ---------- */
.jj-app button.jj-checkrow { background: var(--jj-cream); border: 1px solid var(--jj-line); color: var(--jj-navy); padding-left: 16px; padding-right: 16px; }
.jj-app button.jj-checkrow:hover { background: #efe4d6; color: var(--jj-navy); }
.jj-app button.jj-checkrow .jj-checkrow__status { color: var(--jj-muted); }
.jj-app button.jj-checkrow--done { background: var(--jj-blue); border-color: var(--jj-blue); color: #fff; }
.jj-app button.jj-checkrow--done:hover { background: var(--jj-blue-dark); border-color: var(--jj-blue-dark); color: #fff; }
.jj-app button.jj-checkrow--done .jj-checkrow__status { color: #fff; font-weight: 600; }
.jj-app button.jj-checkrow--done .jj-checkrow__icon { background: #fff; border-color: #fff; color: var(--jj-blue-dark); }

/* ---------- "Your 91 days": 15px padding, 2px apart ---------- */
.jj-app .jj-grid { display: flex; flex-wrap: wrap; gap: 2px; margin: 8px 0 4px; }
.jj-app button.jj-day {
	margin: 0; padding: 15px; min-width: 0; min-height: 0; line-height: 1; font-size: .9rem; border-radius: 8px;
	background: var(--jj-paper); color: var(--jj-navy); border: 1px solid var(--jj-line);
}
.jj-app button.jj-day--part { background: var(--jj-part-bg); border-color: #dcbab2; color: var(--jj-navy); }
.jj-app button.jj-day--full { background: var(--jj-ok); border-color: var(--jj-ok); color: #fff; }
.jj-app button.jj-day:hover:not(:disabled) { background: var(--jj-blue); border-color: var(--jj-blue); color: #fff; }
.jj-app button.jj-day--future { opacity: .4; }

/* ---------- months ---------- */
.jj-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.jj-month { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.jj-month .jj-bar { margin: 0; height: 8px; }
.jj-month__name { font-weight: 600; color: #f1d6b8; }
.jj-month__count { color: #d6d9ea; }
.jj-month.is-current .jj-month__name { color: #fff; }
.jj-month.is-current .jj-bar { background: rgba(255,255,255,.35); }
.jj-monthblock { padding: 12px 0; border-top: 1px solid var(--jj-line); }
.jj-monthblock:first-of-type { border-top: 0; }
.jj-monthblock__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.jj-monthblock__head h4 { margin: 0; }
.jj-monthblock__head .jj-muted { font-weight: 400; font-size: .9rem; }
.jj-monthblock__count { font-size: .85rem; color: var(--jj-muted); }
.jj-bar--light { background: var(--jj-cream); height: 6px; margin: 6px 0 4px; }
.jj-bar--light .jj-bar__fill { background: var(--jj-ok); }

/* ---------- Information tab: 20px padding on every box ---------- */
.jj-app #jj-panel-information .jj-card { padding: 20px; }

/* ---------- "Boom! Journal done!" ---------- */
.jj-submit { margin-top: 14px; }
.jj-app button.jj-btn--boom {
	background: linear-gradient(135deg, var(--jj-maroon), #a8433a 55%, var(--jj-maroon)); color: var(--jj-cream) !important;
	border: 0; font-size: 1.15rem; letter-spacing: .02em; box-shadow: 0 4px 14px rgba(140, 47, 47, .28);
}
.jj-app button.jj-btn--boom:hover:not(:disabled) { background: var(--jj-blue); color: var(--jj-cream) !important; border: 0; }
.jj-app button.jj-btn--boom:disabled { opacity: .45; box-shadow: none; }
.jj-submit__hint { text-align: center; }
.jj-submit__done {
	display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--jj-radius);
	background: var(--jj-navy); color: var(--jj-cream);
}
.jj-submit__spark { font-size: 1.4rem; color: #d9b45a; }
.jj-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100000; }

/* ---------- actions ---------- */
.jj-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.jj-app button.jj-chip {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; min-height: 0; border-radius: 999px; line-height: 1.3;
	background: var(--jj-paper); color: var(--jj-navy); border: 1px solid var(--jj-field); font: inherit; font-size: .95rem; text-align: left;
}
.jj-app button.jj-chip:hover { background: var(--jj-cream); color: var(--jj-navy); }
.jj-app button.jj-chip.is-on { background: var(--jj-blue); border-color: var(--jj-blue); color: #fff; }
.jj-chip__tick { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; font-size: .75rem; font-weight: 700; flex: 0 0 auto; }

/* ---------- fasting pills, kg/lbs switch ---------- */
.jj-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.jj-pill { position: relative; }
.jj-pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.jj-pill label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--jj-field); background: #fff; font-weight: 600; cursor: pointer; margin: 0; }
.jj-pill input:checked + label { background: var(--jj-navy); border-color: var(--jj-navy); color: #fff; }
.jj-pill input:focus-visible + label { outline: 3px solid var(--jj-maroon); outline-offset: 2px; }
.jj-weight-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.jj-weight-head h3 { margin: 0; }
.jj-units { display: inline-flex; border: 1px solid var(--jj-field); border-radius: 999px; overflow: hidden; }
.jj-app button.jj-unit { padding: 6px 16px; min-height: 0; border: 0; border-radius: 0; background: #fff; color: var(--jj-navy); font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.jj-app button.jj-unit:hover { background: var(--jj-cream); color: var(--jj-navy); }
.jj-app button.jj-unit.is-on { background: var(--jj-navy); color: #fff; }
.jj-field-error { color: var(--jj-maroon-dark); font-weight: 600; font-size: .9rem; margin: 6px 0 0; }
.jj-field-error:empty { display: none; }
.jj-app input.is-invalid { border-color: var(--jj-maroon); box-shadow: 0 0 0 2px rgba(140, 47, 47, .15); }

/* ---------- food photo summary ---------- */
.jj-foodsum h4 { margin: 12px 0 6px; font-size: .95rem; }
.jj-foodsum__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.jj-foodsum__list img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--jj-line); display: block; }

/* ---------- weekly pop-up ---------- */
.jj-modal-open, .jj-modal-open body { overflow: hidden; }
.jj-app.jj-modal-backdrop {
	position: fixed; inset: 0; z-index: 99999; max-width: none; margin: 0; padding: 16px;
	display: flex; align-items: center; justify-content: center; background: rgba(42, 49, 87, .55);
}
.jj-modal {
	position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
	background: var(--jj-paper); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.jj-modal__body { padding: 28px 24px 8px; }
.jj-modal__title { font-family: var(--jj-quote-font); font-size: 1.9rem; margin: 0 0 .2em; }
.jj-modal h3 { font-size: 1.05rem; margin: 1.1em 0 .4em; }
.jj-modal__note { font-family: var(--jj-quote-font); font-size: 1.25rem; margin: 1.2em 0 .4em; color: var(--jj-maroon); }
.jj-modal__foot { padding: 8px 24px 24px; }
.jj-modal__foot .jj-btn { width: 100%; }
.jj-app button.jj-modal__x {
	position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; padding: 0; min-height: 0; border-radius: 50%;
	border: 0; background: var(--jj-cream); color: var(--jj-navy); font-size: 1.4rem; line-height: 1;
}
.jj-wtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.jj-wtile { background: var(--jj-cream); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.jj-wtile__value { font-size: 1.5rem; font-weight: 700; color: var(--jj-maroon); line-height: 1.1; }
.jj-wtile__label { font-size: .9rem; }
.jj-wtile__sub { font-size: .8rem; color: var(--jj-muted); }
.jj-wline { margin: .5em 0; }
.jj-review { border: 1px solid var(--jj-line); border-radius: 12px; padding: 12px 14px; margin: 16px 0 0; }
.jj-review legend { font-weight: 700; padding: 0 4px; }

.jj-request p:last-of-type { margin-bottom: .6em; }

@media (max-width: 480px) {
	.jj-months { gap: 6px; }
	.jj-month { font-size: .78rem; }
}

/* Outline-style buttons keep their own look rather than the theme's */
.jj-app button.jj-btn--ghost, .jj-app a.jj-btn--ghost {
	background: transparent; border: 2px solid var(--jj-maroon); color: var(--jj-maroon) !important; box-shadow: none;
}
.jj-app button.jj-btn--ghost:hover:not(:disabled), .jj-app a.jj-btn--ghost:hover { background: var(--jj-cream); border-color: var(--jj-maroon-dark); color: var(--jj-maroon-dark) !important; }
.jj-app button.jj-tab:hover:not(.is-active) { background: var(--jj-cream); color: var(--jj-navy); }
.jj-app button.jj-tab.is-active, .jj-app button.jj-tab.is-active:hover { background: var(--jj-navy); color: #fff; }

/* ---------- Day arrows: round, arrow centred ---------- */
.jj-app button.jj-iconbtn {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 0;
	border-radius: 50%; line-height: 1; background: var(--jj-paper); color: var(--jj-navy); border: 1px solid var(--jj-navy);
}
.jj-app button.jj-iconbtn svg { display: block; width: 22px; height: 22px; flex: 0 0 auto; }
.jj-app button.jj-iconbtn:hover:not(:disabled) { background: var(--jj-navy); color: #fff; }

/* ---------- Navy cards: readable text, labels and links even if the theme restyles them ---------- */
.jj-app .jj-card--hero, .jj-app .jj-card--hero p, .jj-app .jj-card--hero label, .jj-app .jj-card--hero span,
.jj-app .jj-card--hero li, .jj-app .jj-card--hero h2, .jj-app .jj-card--hero h3 { color: #fff !important; }
.jj-app .jj-card--hero .jj-eyebrow { color: #f1d6b8 !important; }
.jj-app .jj-card--hero .jj-muted { color: #e3e6f3 !important; }
.jj-app .jj-card--hero a, .jj-app .jj-card--hero a:visited { color: #f1d6b8 !important; text-decoration: underline; text-underline-offset: 2px; }
.jj-app .jj-card--hero a:hover, .jj-app .jj-card--hero a:focus { color: #fff !important; }
.jj-app .jj-card--hero label { font-weight: 600; text-transform: none; background: transparent !important; }
.jj-app .jj-card--hero ::selection { background: #f1d6b8; color: #2a3157; }
.jj-app .jj-card--hero :focus-visible { outline-color: #f1d6b8; }
.jj-app .jj-card--hero .jj-complete__msg--error { color: #ffd9d9 !important; }
.jj-app .jj-complete__msg--error { color: var(--jj-maroon-dark); }

/* ---------- Login card ---------- */
.jj-gate #loginform { max-width: 320px; margin: 0 auto 12px; text-align: left; }
.jj-gate #loginform p { margin: 0 0 12px; }
.jj-gate #loginform label { display: block; font-weight: 600; margin-bottom: 4px; }
.jj-gate #loginform input[type=text], .jj-gate #loginform input[type=password] { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--jj-field); border-radius: 6px; font-size: 16px; }
.jj-gate #loginform .login-remember label { font-weight: 400; }
.jj-gate #loginform input[type=submit] { background: var(--jj-maroon); color: var(--jj-cream); border: 0; border-radius: 999px; padding: 14px 24px; font-size: 16px; cursor: pointer; }

/* ---------- Progress photos on the Overview, send warning ---------- */
.jj-pp { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0; }
.jj-pp figure { margin: 0; }
.jj-pp img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--jj-line); display: block; }
.jj-pp figcaption { font-size: .9rem; color: var(--jj-muted); margin-top: 4px; }
.jj-send__warn { margin: 10px 0; padding: 12px 14px; background: var(--jj-cream); border-left: 4px solid var(--jj-maroon); border-radius: 6px; }
.jj-send__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* ---------- Mobile: breathing room left and right of everything (progress bars, tabs, cards) ---------- */
@media (max-width: 700px) {
	.jj-app { padding-left: 16px; padding-right: 16px; }
	.jj-app .jj-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* "Boom! Journal done." on navy: palest blue grey */
.jj-app .jj-submit__done, .jj-app .jj-submit__done span, .jj-app .jj-submit__done strong { color: #e3e8f1 !important; }
.jj-app .jj-submit__done .jj-submit__spark { color: #e8c98a !important; }

/* "Sent to your coach" line is white; the Boom words stay palest blue grey */
.jj-app .jj-submit__done span { color: #fff !important; }
.jj-app .jj-submit__done strong { color: #e3e8f1 !important; }
.jj-app .jj-submit__done .jj-submit__spark { color: #e8c98a !important; }

/* ---------- BMI bar ---------- */
.jj-bmi { margin: 18px 0 8px; }
.jj-bmi__track { position: relative; display: flex; height: 16px; border-radius: 999px; overflow: visible; gap: 2px; }
.jj-bmi__seg { height: 100%; }
.jj-bmi__seg:first-child { border-radius: 999px 0 0 999px; }
.jj-bmi__seg:nth-child(4) { border-radius: 0 999px 999px 0; }
.jj-bmi__seg--a { background: #c9d3e6; }
.jj-bmi__seg--b { background: #b7dcc8; }
.jj-bmi__seg--c { background: #ecdcae; }
.jj-bmi__seg--d { background: #e1c2bb; }
.jj-bmi__seg.is-here { box-shadow: 0 0 0 2px var(--jj-navy) inset; }
.jj-bmi__mark { position: absolute; top: -8px; width: 0; height: 32px; transform: translateX(-1px); }
.jj-bmi__mark::before { content: ""; position: absolute; left: -2px; top: 0; width: 4px; height: 32px; background: var(--jj-navy); border-radius: 2px; }
.jj-bmi__pin { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); background: var(--jj-navy); color: #fff; font-size: .85rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.jj-bmi { padding-top: 24px; }
.jj-bmi__labels { display: flex; gap: 2px; margin-top: 12px; }
.jj-bmi__label { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.25; color: var(--jj-navy); min-width: 0; padding-right: 4px; }
.jj-bmi__label span { color: var(--jj-muted); }
@media (max-width: 700px) {
	.jj-bmi__labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
	.jj-bmi__label { flex: none !important; font-size: .85rem; padding: 2px 0 2px 10px; border-left: 6px solid transparent; }
	.jj-bmi__label--a { border-left-color: #c9d3e6; }
	.jj-bmi__label--b { border-left-color: #b7dcc8; }
	.jj-bmi__label--c { border-left-color: #ecdcae; }
	.jj-bmi__label--d { border-left-color: #e1c2bb; }
}

/* ---------- Coach view (administrators only) ---------- */
.jj-coachbar { max-width: 1060px; margin: 0 auto 14px; padding: 12px 16px; background: var(--jj-cream); border: 1px solid var(--jj-line); border-radius: var(--jj-radius); }
.jj-coachbar form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.jj-coachbar select { min-height: 42px; padding: 6px 10px; border: 1px solid var(--jj-field); border-radius: 8px; font: inherit; background: #fff; color: var(--jj-navy); max-width: 100%; }
.jj-coachbar a { color: var(--jj-maroon); }
.jj-coachnote { margin: 0 0 14px; padding: 10px 14px; background: var(--jj-navy); color: #fff !important; border-radius: 10px; }
.jj-app .jj-coachnote strong { color: #fff; }
.jj-readonly .jj-complete, .jj-readonly .jj-submit, .jj-readonly .jj-photos__remove, .jj-readonly .jj-photos .jj-btn,
.jj-readonly .jj-foot, .jj-readonly .jj-units, .jj-readonly [data-jj-write] { display: none !important; }
.jj-readonly input:disabled, .jj-readonly textarea:disabled, .jj-readonly select:disabled { opacity: 1; background: var(--jj-paper); color: var(--jj-navy); -webkit-text-fill-color: var(--jj-navy); }

/* ---------- My Path ---------- */
.jj-path__lead { font-size: 1.05rem; margin: 0 0 16px; }
.jj-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: none; }
.jj-flow__step { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 0 0 22px; }
.jj-flow__step:not(:last-child)::after { content: ""; position: absolute; left: 31px; top: 66px; bottom: 6px; width: 3px; background: repeating-linear-gradient(to bottom, var(--jj-field) 0 6px, transparent 6px 12px); }
.jj-flow__icon { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--jj-navy); color: #fff; }
.jj-flow__step--objectives .jj-flow__icon { background: var(--jj-blue-dark); }
.jj-flow__step--actions .jj-flow__icon { background: var(--jj-maroon); }
.jj-flow__step--rewards .jj-flow__icon { background: var(--jj-ok); }
.jj-flow__icon svg { width: 38px; height: 38px; }
.jj-flow__body { min-width: 0; }
.jj-flow__n { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-muted); }
.jj-app .jj-flow__body h4 { margin: 0 0 .15em; font-size: 1.15rem; }
.jj-flow__body p { margin: 0 0 .4em; }
.jj-flow__chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.jj-flow__chips li { background: var(--jj-cream); border: 1px solid var(--jj-line); border-radius: 999px; padding: 4px 12px; font-size: .92rem; }
@container jj (min-width: 760px) {
	.jj-flow { grid-template-columns: repeat(4, 1fr); gap: 16px; }
	.jj-flow__step { flex-direction: column; align-items: center; text-align: center; padding: 0; }
	.jj-flow__step:not(:last-child)::after { left: calc(50% + 40px); right: calc(-16px - 50% + 40px); top: 31px; bottom: auto; width: auto; height: 3px; background: repeating-linear-gradient(to right, var(--jj-field) 0 6px, transparent 6px 12px); }
	.jj-flow__chips { justify-content: center; }
}

/* My Path: example dropdowns */
.jj-eg { margin-top: 6px; text-align: left; }
.jj-eg > summary { cursor: pointer; display: inline-block; padding: 4px 0; color: var(--jj-navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.jj-eg > summary:focus-visible { outline: 3px solid var(--jj-navy); outline-offset: 3px; border-radius: 4px; }
.jj-eg .jj-flow__chips li { border-radius: 14px; }
@container jj (min-width: 760px) { .jj-eg { text-align: center; } }

/* personal actions */
.jj-chip-wrap { display: inline-flex; align-items: center; gap: 4px; }
.jj-app button.jj-chip-remove { min-height: 0; width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid var(--jj-field); background: var(--jj-paper); color: var(--jj-navy); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.jj-app button.jj-chip-remove:hover { background: var(--jj-cream); }
.jj-app button.jj-chip-remove:focus-visible { outline: 3px solid var(--jj-navy); outline-offset: 2px; }
.jj-own { margin-top: 12px; text-align: left; }
.jj-own-form__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.jj-own-form__grow { flex: 1 1 220px; min-width: 0; }
.jj-own-form label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.jj-own-form select, .jj-own-form input[type="text"] { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--jj-field); border-radius: 6px; font: inherit; font-size: 16px; background: #fff; color: var(--jj-navy); }

/* action groups (collapsible, so a long list stays easy to scan) */
.jj-actgroup { margin: 10px 0 0; border-top: 1px solid var(--jj-line); padding-top: 6px; }
.jj-actgroup > summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; list-style: none; }
.jj-actgroup > summary::-webkit-details-marker { display: none; }
.jj-actgroup__name { font-size: 1.1rem; font-weight: 600; color: var(--jj-navy); }
.jj-actgroup__n { font-size: .9rem; color: var(--jj-muted); }
.jj-actgroup > summary::after { content: '\25BE'; margin-left: auto; color: var(--jj-navy); }
.jj-actgroup[open] > summary::after { content: '\25B4'; }
.jj-actgroup > summary:focus-visible { outline: 3px solid var(--jj-navy); outline-offset: 2px; border-radius: 4px; }


/* =====================================================================
 * 1.5 changes: Photos tab, photo viewer, install card
 * ===================================================================== */
.jj-pp--record { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
.jj-app button.jj-pphoto { display: block; width: 100%; padding: 0; min-height: 0; border: 0; background: none; border-radius: 10px; cursor: zoom-in; }
.jj-pgrid { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.jj-pgrid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--jj-line); display: block; }
.jj-pgrid__cap { display: block; font-size: .8rem; color: var(--jj-muted); margin-top: 4px; line-height: 1.3; }
.jj-pphoto img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--jj-line); display: block; }
.jj-lightbox { max-width: 640px; padding: 16px; text-align: center; }
.jj-lightbox__img { display: block; max-width: 100%; max-height: 68vh; width: auto; height: auto; margin: 28px auto 8px; border-radius: 10px; }
.jj-lightbox__cap { margin: 0 0 10px; color: var(--jj-muted); font-size: .95rem; }
.jj-lightbox__nav { display: flex; justify-content: center; gap: 12px; }
.jj-steps { margin: 0 0 .8em; padding-left: 1.3em; }
.jj-steps li { margin: 0 0 .4em; }
.jj-inline-icon { vertical-align: -3px; }
