:root {
	--pal-blue: #1266c3;
	--pal-green: #55a919;
	--pal-green-dark: #347a10;
	--pal-orange: #f3a400;
	--pal-bg: #f5f8f2;
	--pal-surface: #ffffff;
	--pal-text: #17311c;
	--pal-muted: #6b786d;
	--pal-border: #e3eadf;
	--pal-radius: 20px;
	--pal-shadow: 0 12px 34px rgba(36, 73, 40, .08);
}

.pal-app,
.pal-app * {
	box-sizing: border-box;
}

.pal-app {
	min-height: 100vh;
	background: var(--pal-bg);
	color: var(--pal-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	padding-bottom: 88px;
}

.pal-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255,255,255,.94);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--pal-border);
}

.pal-topbar__inner {
	width: min(100%, 760px);
	min-height: 68px;
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.pal-logo {
	display: block;
	width: auto;
	max-width: 220px;
	height: 48px;
	object-fit: contain;
}

.pal-icon-button {
	width: 42px;
	height: 42px;
	border: 1px solid var(--pal-border);
	border-radius: 14px;
	background: #fff;
	color: var(--pal-green-dark);
	font-size: 21px;
	cursor: pointer;
}

.pal-main {
	width: min(100%, 760px);
	margin: 0 auto;
	padding: 18px 14px 32px;
}

.pal-hero {
	position: relative;
	overflow: hidden;
	padding: 26px 22px;
	border-radius: 26px;
	background:
		radial-gradient(circle at 90% 4%, rgba(243,164,0,.20), transparent 32%),
		linear-gradient(135deg, #ffffff 0%, #f5faef 100%);
	box-shadow: var(--pal-shadow);
	border: 1px solid rgba(85,169,25,.12);
}

.pal-hero::after {
	content: "";
	position: absolute;
	width: 150px;
	height: 150px;
	right: -50px;
	bottom: -80px;
	border-radius: 50%;
	background: rgba(18,102,195,.06);
}

.pal-eyebrow {
	margin: 0 0 8px;
	color: var(--pal-orange);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pal-hero h1 {
	margin: 0;
	max-width: 500px;
	font-size: clamp(28px, 7vw, 42px);
	line-height: 1.05;
	letter-spacing: -.04em;
}

.pal-hero p:not(.pal-eyebrow) {
	max-width: 560px;
	margin: 14px 0 0;
	color: var(--pal-muted);
	font-size: 16px;
	line-height: 1.55;
}

.pal-primary-button {
	margin-top: 20px;
	padding: 14px 20px;
	border: 0;
	border-radius: 15px;
	background: linear-gradient(135deg, var(--pal-green), var(--pal-green-dark));
	color: #fff;
	font-size: 15px;
	font-weight: 750;
	box-shadow: 0 8px 20px rgba(73,143,22,.22);
	cursor: pointer;
}

.pal-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 16px;
}

.pal-card {
	min-height: 155px;
	padding: 18px;
	border: 1px solid var(--pal-border);
	border-radius: var(--pal-radius);
	background: var(--pal-surface);
	box-shadow: 0 8px 24px rgba(36,73,40,.05);
}

.pal-card__icon {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	margin-bottom: 14px;
	border-radius: 13px;
	background: #f0f8e8;
	color: var(--pal-green-dark);
	font-size: 21px;
	font-weight: 800;
}

.pal-card:nth-child(2) .pal-card__icon {
	background: #fff6df;
	color: var(--pal-orange);
}

.pal-card:nth-child(3) .pal-card__icon {
	background: #eaf4ff;
	color: var(--pal-blue);
}

.pal-card h2 {
	margin: 0;
	font-size: 17px;
	letter-spacing: -.02em;
}

.pal-card p {
	margin: 7px 0 0;
	color: var(--pal-muted);
	font-size: 13px;
	line-height: 1.45;
}

.pal-notice {
	margin-top: 16px;
	padding: 15px 17px;
	border-radius: 16px;
	border: 1px solid #e8eadf;
	background: #fffdf5;
	color: #5e5b45;
	font-size: 12px;
	line-height: 1.5;
}

.pal-notice strong,
.pal-notice span {
	display: block;
}

.pal-notice strong {
	margin-bottom: 3px;
	color: #4d4a34;
	font-size: 13px;
}

.pal-bottom-nav {
	position: fixed;
	z-index: 30;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	width: min(100%, 760px);
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
	background: rgba(255,255,255,.97);
	border-top: 1px solid var(--pal-border);
	box-shadow: 0 -10px 28px rgba(37,70,38,.08);
	backdrop-filter: blur(14px);
}

.pal-bottom-nav button {
	appearance: none;
	border: 0;
	background: transparent;
	color: #7d897f;
	min-height: 54px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	font-size: 10px;
	font-weight: 700;
	cursor: pointer;
}

.pal-bottom-nav button span {
	font-size: 20px;
	line-height: 1;
}

.pal-bottom-nav button.is-active {
	color: var(--pal-green-dark);
}

@media (min-width: 761px) {
	.pal-app {
		max-width: 760px;
		margin: 0 auto;
		border-left: 1px solid var(--pal-border);
		border-right: 1px solid var(--pal-border);
	}
}

@media (max-width: 430px) {
	.pal-logo {
		max-width: 185px;
		height: 42px;
	}

	.pal-main {
		padding-left: 12px;
		padding-right: 12px;
	}

	.pal-hero {
		padding: 22px 18px;
	}

	.pal-card {
		padding: 15px;
	}
}


.pal-button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
}

.pal-profile-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin-top: 20px;
}

.pal-profile-summary.is-hidden {
	display: none;
}

.pal-profile-summary > div {
	padding: 12px 10px;
	border: 1px solid rgba(85,169,25,.13);
	border-radius: 14px;
	background: rgba(255,255,255,.72);
}

.pal-profile-summary strong,
.pal-profile-summary span {
	display: block;
}

.pal-profile-summary strong {
	font-size: 20px;
	letter-spacing: -.03em;
}

.pal-profile-summary span {
	margin-top: 2px;
	color: var(--pal-muted);
	font-size: 10px;
	font-weight: 700;
}

.pal-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 48;
	background: rgba(11,28,14,.38);
	backdrop-filter: blur(2px);
}

.pal-sheet {
	position: fixed;
	z-index: 49;
	left: 50%;
	bottom: 0;
	transform: translate(-50%, 105%);
	width: min(100%, 760px);
	max-height: min(90vh, 820px);
	overflow-y: auto;
	padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
	border-radius: 28px 28px 0 0;
	background: #fff;
	box-shadow: 0 -24px 70px rgba(18,49,22,.22);
	transition: transform .25s ease;
	overscroll-behavior: contain;
}

.pal-sheet.is-open {
	transform: translate(-50%, 0);
}

.pal-sheet__handle {
	width: 42px;
	height: 5px;
	margin: 2px auto 14px;
	border-radius: 999px;
	background: #dce4da;
}

.pal-sheet__header {
	position: sticky;
	top: -8px;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0 14px;
	background: rgba(255,255,255,.97);
	backdrop-filter: blur(8px);
}

.pal-sheet__header .pal-eyebrow {
	margin-bottom: 4px;
}

.pal-sheet__header h2 {
	margin: 0;
	font-size: 25px;
	letter-spacing: -.035em;
}

.pal-sheet__close {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border: 1px solid var(--pal-border);
	border-radius: 14px;
	background: #fff;
	color: #536057;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
}

.pal-profile-form {
	padding-bottom: 12px;
}

.pal-field {
	margin-bottom: 18px;
}

.pal-field-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.pal-field label {
	display: block;
	margin-bottom: 7px;
	color: #263a29;
	font-size: 13px;
	font-weight: 800;
}

.pal-field input,
.pal-field select {
	width: 100%;
	min-height: 50px;
	border: 1px solid #dbe5d7;
	border-radius: 14px;
	background: #fbfcfa;
	color: #18311d;
	padding: 0 13px;
	font: inherit;
	font-size: 16px;
	outline: none;
}

.pal-field input:focus,
.pal-field select:focus {
	border-color: rgba(85,169,25,.75);
	box-shadow: 0 0 0 3px rgba(85,169,25,.10);
	background: #fff;
}

.pal-field small {
	display: block;
	margin-top: 5px;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.4;
}

.pal-input-unit {
	position: relative;
}

.pal-input-unit input {
	padding-right: 48px;
}

.pal-input-unit > span {
	position: absolute;
	right: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: #7a867c;
	font-size: 13px;
	font-weight: 700;
	pointer-events: none;
}

.pal-choice-grid {
	display: grid;
	gap: 8px;
}

.pal-choice {
	position: relative;
	margin: 0 !important;
	cursor: pointer;
}

.pal-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pal-choice > span {
	display: block;
	padding: 13px 14px;
	border: 1px solid #dfe8dc;
	border-radius: 15px;
	background: #fbfcfa;
	transition: .15s ease;
}

.pal-choice strong,
.pal-choice small {
	display: block;
}

.pal-choice strong {
	font-size: 14px;
}

.pal-choice small {
	margin-top: 2px;
}

.pal-choice input:checked + span {
	border-color: rgba(85,169,25,.60);
	background: #f2faeb;
	box-shadow: 0 0 0 2px rgba(85,169,25,.08);
}

.pal-optional {
	color: #8a948b;
	font-size: 11px;
	font-weight: 600;
}

.pal-save-button {
	width: 100%;
	margin-top: 2px;
	min-height: 50px;
}

.pal-save-button[disabled] {
	opacity: .62;
	cursor: wait;
}

.pal-form-message {
	min-height: 20px;
	margin: -2px 0 8px;
	font-size: 12px;
	font-weight: 700;
}

.pal-form-message.is-error {
	color: #b33a2e;
}

.pal-form-message.is-success {
	color: var(--pal-green-dark);
}

.pal-data-note {
	margin: 12px 3px 0;
	color: #7b877d;
	font-size: 10px;
	line-height: 1.45;
	text-align: center;
}

body.pal-sheet-open {
	overflow: hidden;
}

@media (max-width: 430px) {
	.pal-sheet {
		padding-left: 14px;
		padding-right: 14px;
	}

	.pal-field-row {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
}


/* PAL ALPHA 3 */

.pal-snapshot {
	margin-top: 16px;
	padding: 19px;
	border: 1px solid var(--pal-border);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(36,73,40,.05);
}

.pal-section-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 14px;
}

.pal-section-heading .pal-eyebrow {
	margin-bottom: 3px;
}

.pal-section-heading h2 {
	margin: 0;
	font-size: 21px;
	letter-spacing: -.03em;
}

.pal-free-badge {
	display: inline-flex;
	align-items: center;
	min-height: 27px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef8e7;
	color: var(--pal-green-dark);
	font-size: 11px;
	font-weight: 800;
}

.pal-metric-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.pal-metric {
	padding: 15px;
	border-radius: 17px;
	background: #f6f9f3;
	border: 1px solid #e6ede2;
}

.pal-metric__label {
	display: block;
	color: #748078;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.pal-metric strong {
	display: block;
	margin-top: 4px;
	color: #213a25;
	font-size: 28px;
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-metric small {
	display: block;
	margin-top: 7px;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.35;
}

.pal-snapshot-note,
.pal-snapshot-blocked p {
	margin: 12px 2px 0;
	color: #78827a;
	font-size: 11px;
	line-height: 1.45;
}

.pal-snapshot-blocked {
	padding: 14px;
	border-radius: 16px;
	background: #fff8e8;
	border: 1px solid #f1e4bd;
}

.pal-snapshot-blocked strong {
	color: #715b1e;
	font-size: 13px;
}

.pal-safety {
	margin: 20px 0;
	padding: 15px;
	border-radius: 18px;
	background: #f8faf7;
	border: 1px solid #e2e9df;
}

.pal-safety__heading strong,
.pal-safety__heading span {
	display: block;
}

.pal-safety__heading strong {
	font-size: 14px;
}

.pal-safety__heading span {
	margin-top: 4px;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.4;
}

.pal-safety-question {
	margin: 15px 0 0;
	padding: 0;
	border: 0;
}

.pal-safety-question legend {
	width: 100%;
	margin: 0 0 8px;
	color: #334737;
	font-size: 12px;
	font-weight: 750;
	line-height: 1.4;
}

.pal-segmented {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 7px;
}

.pal-segmented label {
	position: relative;
	margin: 0;
}

.pal-segmented input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pal-segmented span {
	display: flex;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	border: 1px solid #dbe4d7;
	border-radius: 12px;
	background: #fff;
	color: #667169;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.pal-segmented input:checked + span {
	border-color: rgba(85,169,25,.55);
	background: #eef8e7;
	color: var(--pal-green-dark);
	box-shadow: 0 0 0 2px rgba(85,169,25,.07);
}


/* PAL ALPHA 4 AUTH */

.pal-auth {
	max-width: 560px;
	margin: 14px auto 0;
	padding: 22px 18px 26px;
	border: 1px solid var(--pal-border);
	border-radius: 26px;
	background: #fff;
	box-shadow: var(--pal-shadow);
}

.pal-auth__intro {
	text-align: center;
	padding: 3px 7px 16px;
}

.pal-auth__intro .pal-eyebrow {
	margin-bottom: 6px;
}

.pal-auth__intro h1 {
	margin: 0;
	font-size: clamp(29px, 7vw, 39px);
	line-height: 1.05;
	letter-spacing: -.04em;
}

.pal-auth__intro > p:last-child {
	max-width: 440px;
	margin: 12px auto 0;
	color: var(--pal-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pal-auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px;
	margin: 4px 0 20px;
	padding: 4px;
	border-radius: 15px;
	background: #f1f5ef;
}

.pal-auth-tabs button {
	min-height: 43px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: #6f7b71;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.pal-auth-tabs button.is-active {
	background: #fff;
	color: var(--pal-green-dark);
	box-shadow: 0 3px 12px rgba(34,68,37,.08);
}

.pal-auth-panel,
.pal-register-step {
	display: none;
}

.pal-auth-panel.is-active,
.pal-register-step.is-active {
	display: block;
}

.pal-auth-form .pal-field:last-of-type {
	margin-bottom: 14px;
}

.pal-register-step > h2 {
	margin: 0;
	font-size: 23px;
	letter-spacing: -.03em;
}

.pal-register-step > p {
	margin: 7px 0 18px;
	color: var(--pal-muted);
	font-size: 13px;
	line-height: 1.45;
}

.pal-auth-step-label {
	display: inline-flex;
	align-items: center;
	min-height: 25px;
	margin-bottom: 8px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #eef8e7;
	color: var(--pal-green-dark);
	font-size: 10px;
	font-weight: 900;
	letter-spacing: .04em;
}

.pal-code-input-wrap {
	margin: 6px 0 15px;
}

.pal-code-input {
	width: 100%;
	min-height: 66px;
	border: 1px solid #dbe5d7;
	border-radius: 18px;
	background: #fbfcfa;
	color: #18311d;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: .32em;
	text-align: center;
	outline: none;
	padding-left: .32em;
}

.pal-code-input:focus {
	border-color: rgba(85,169,25,.75);
	box-shadow: 0 0 0 3px rgba(85,169,25,.10);
	background: #fff;
}

.pal-text-button {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 9px;
	border: 0;
	background: transparent;
	color: var(--pal-blue);
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.pal-auth-note {
	margin-top: 20px;
	padding: 13px 14px;
	border-radius: 15px;
	background: #f7faf5;
	border: 1px solid #e5ece2;
}

.pal-auth-note strong,
.pal-auth-note span {
	display: block;
}

.pal-auth-note strong {
	font-size: 12px;
	color: #344c38;
}

.pal-auth-note span {
	margin-top: 3px;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.4;
}

@media (max-width: 430px) {
	.pal-auth {
		margin-top: 3px;
		padding: 19px 14px 22px;
		border-radius: 22px;
	}
}


/* PAL ALPHA 5 BLOG */

.pal-view[hidden] {
	display: none !important;
}

.pal-blog-view {
	padding: 2px 0 8px;
}

.pal-blog-head {
	margin: 2px 0 16px;
	padding: 22px 20px;
	border: 1px solid rgba(85,169,25,.12);
	border-radius: 24px;
	background:
		radial-gradient(circle at 92% 8%, rgba(243,164,0,.16), transparent 30%),
		linear-gradient(135deg, #fff 0%, #f7fbf3 100%);
}

.pal-blog-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-blog-head > div > p:last-child {
	max-width: 520px;
	margin: 10px 0 0;
	color: var(--pal-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pal-blog-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 13px;
}

.pal-blog-card {
	overflow: hidden;
	border: 1px solid var(--pal-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(36,73,40,.05);
	cursor: pointer;
	transition: transform .16s ease, box-shadow .16s ease;
}

.pal-blog-card:active {
	transform: scale(.992);
}

.pal-blog-card:first-child {
	grid-column: 1 / -1;
}

.pal-blog-card__image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, #eef5e8, #f8f2df);
}

.pal-blog-card:first-child .pal-blog-card__image {
	aspect-ratio: 16 / 8.7;
}

.pal-blog-card__image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.pal-blog-card__placeholder {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 72% 26%, rgba(243,164,0,.18), transparent 28%),
		linear-gradient(135deg, rgba(18,102,195,.08), rgba(85,169,25,.11));
	color: var(--pal-green-dark);
	font-size: 32px;
	font-weight: 900;
}

.pal-blog-card__body {
	padding: 15px;
}

.pal-blog-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 8px;
	color: #849087;
	font-size: 10px;
	font-weight: 750;
}

.pal-blog-card__cat {
	display: inline-flex;
	align-items: center;
	min-height: 23px;
	padding: 3px 8px;
	border-radius: 999px;
	background: #eff8e8;
	color: var(--pal-green-dark);
}

.pal-blog-card h2 {
	margin: 0;
	color: #1e3422;
	font-size: 17px;
	line-height: 1.25;
	letter-spacing: -.025em;
}

.pal-blog-card:first-child h2 {
	font-size: clamp(22px, 5vw, 30px);
}

.pal-blog-card p {
	margin: 8px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
	line-height: 1.5;
}

.pal-blog-card__read {
	display: inline-flex;
	margin-top: 11px;
	color: var(--pal-blue);
	font-size: 11px;
	font-weight: 850;
}

.pal-blog-status {
	padding: 14px 2px 2px;
	color: var(--pal-muted);
	font-size: 12px;
	text-align: center;
}

.pal-secondary-button {
	min-height: 46px;
	padding: 11px 17px;
	border: 1px solid #dbe6d7;
	border-radius: 14px;
	background: #fff;
	color: var(--pal-green-dark);
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.pal-blog-more {
	display: block;
	margin: 13px auto 0;
}

.pal-article-backdrop {
	position: fixed;
	inset: 0;
	z-index: 70;
	background: rgba(8,22,11,.58);
	backdrop-filter: blur(4px);
}

.pal-article-modal {
	position: fixed;
	z-index: 71;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -47%) scale(.985);
	width: min(calc(100% - 20px), 760px);
	height: min(92vh, 900px);
	overflow: hidden;
	border-radius: 27px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(0,0,0,.30);
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}

.pal-article-modal.is-open {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	pointer-events: auto;
}

.pal-article-modal__top {
	position: absolute;
	z-index: 3;
	top: 11px;
	right: 11px;
}

.pal-article-close {
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255,255,255,.48);
	border-radius: 14px;
	background: rgba(25,37,27,.72);
	color: #fff;
	font-size: 27px;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(8px);
}

.pal-article-modal__scroll {
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: 36px;
}

.pal-article-hero {
	aspect-ratio: 16 / 8.5;
	overflow: hidden;
	background: #eef4ea;
}

.pal-article-hero img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pal-article-meta,
#pal-article-title,
.pal-article-content {
	width: min(calc(100% - 36px), 650px);
	margin-left: auto;
	margin-right: auto;
}

.pal-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding-top: 24px;
	color: #7f8b82;
	font-size: 11px;
	font-weight: 750;
}

#pal-article-title {
	margin-top: 9px;
	margin-bottom: 19px;
	color: #1d3321;
	font-size: clamp(29px, 6vw, 43px);
	line-height: 1.08;
	letter-spacing: -.045em;
}

.pal-article-content {
	color: #344638;
	font-size: 16px;
	line-height: 1.72;
}

.pal-article-content > *:first-child {
	margin-top: 0;
}

.pal-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

.pal-article-content iframe,
.pal-article-content video {
	max-width: 100%;
}

.pal-article-content h2,
.pal-article-content h3 {
	color: #203725;
	line-height: 1.2;
}

body.pal-article-open {
	overflow: hidden;
}

@media (hover: hover) {
	.pal-blog-card:hover {
		transform: translateY(-2px);
		box-shadow: 0 13px 30px rgba(36,73,40,.09);
	}
}

@media (max-width: 560px) {
	.pal-blog-grid {
		grid-template-columns: 1fr;
	}

	.pal-blog-card:first-child {
		grid-column: auto;
	}

	.pal-blog-card__image,
	.pal-blog-card:first-child .pal-blog-card__image {
		aspect-ratio: 16 / 9;
	}

	.pal-blog-card:first-child h2 {
		font-size: 21px;
	}

	.pal-article-modal {
		width: 100%;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}

	.pal-article-meta,
	#pal-article-title,
	.pal-article-content {
		width: calc(100% - 30px);
	}
}


/* PAL ALPHA 6 PROGRESS */

.pal-card--action {
	position: relative;
	cursor: pointer;
}

.pal-card__arrow {
	position: absolute;
	right: 15px;
	bottom: 13px;
	color: var(--pal-green-dark);
	font-size: 18px;
	font-weight: 900;
}

.pal-progress-view {
	padding: 2px 0 10px;
}

.pal-progress-head {
	margin: 2px 0 14px;
	padding: 22px 20px;
	border: 1px solid rgba(18,102,195,.12);
	border-radius: 24px;
	background:
		radial-gradient(circle at 90% 10%, rgba(18,102,195,.12), transparent 30%),
		linear-gradient(135deg, #fff 0%, #f6faf2 100%);
}

.pal-progress-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-progress-head > div > p:last-child {
	max-width: 520px;
	margin: 10px 0 0;
	color: var(--pal-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pal-progress-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 9px;
	margin-bottom: 14px;
}

.pal-progress-metrics article {
	padding: 14px 12px;
	border: 1px solid var(--pal-border);
	border-radius: 17px;
	background: #fff;
	text-align: center;
	box-shadow: 0 7px 20px rgba(36,73,40,.04);
}

.pal-progress-metrics span,
.pal-progress-metrics small {
	display: block;
	color: var(--pal-muted);
	font-size: 10px;
	font-weight: 750;
}

.pal-progress-metrics strong {
	display: block;
	margin: 4px 0 1px;
	color: #1f3824;
	font-size: clamp(20px, 5vw, 28px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-checkin-card,
.pal-progress-history {
	margin-top: 14px;
	padding: 18px;
	border: 1px solid var(--pal-border);
	border-radius: 21px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(36,73,40,.05);
}

.pal-progress-form .pal-primary-button {
	margin-top: 2px;
}

.pal-progress-chart {
	min-height: 190px;
	padding: 10px 6px 3px;
	border-radius: 17px;
	background: #f8faf7;
	border: 1px solid #e7ede4;
}

.pal-progress-chart svg {
	display: block;
	width: 100%;
	height: 170px;
	overflow: visible;
}

.pal-progress-chart .pal-chart-empty {
	height: 170px;
	display: grid;
	place-items: center;
	padding: 20px;
	color: var(--pal-muted);
	font-size: 12px;
	text-align: center;
}

.pal-progress-list {
	margin-top: 10px;
	display: grid;
	gap: 7px;
}

.pal-progress-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 12px;
	border: 1px solid #e7ede4;
	border-radius: 13px;
	background: #fbfcfa;
}

.pal-progress-row span {
	color: var(--pal-muted);
	font-size: 11px;
}

.pal-progress-row strong {
	color: #263d2a;
	font-size: 14px;
}

@media (max-width: 430px) {
	.pal-progress-metrics {
		gap: 6px;
	}

	.pal-progress-metrics article {
		padding-left: 7px;
		padding-right: 7px;
	}

	.pal-checkin-card,
	.pal-progress-history {
		padding: 15px;
	}
}


/* PAL ALPHA 7 BASIC PLAN */

.pal-guide-view {
	padding: 2px 0 10px;
}

.pal-guide-head {
	margin: 2px 0 14px;
	padding: 22px 20px;
	border-radius: 24px;
	border: 1px solid var(--pal-border);
}

.pal-guide-head--food {
	background:
		radial-gradient(circle at 91% 8%, rgba(243,164,0,.18), transparent 29%),
		linear-gradient(135deg, #fff 0%, #fbfaf1 100%);
}

.pal-guide-head--training {
	background:
		radial-gradient(circle at 90% 10%, rgba(18,102,195,.12), transparent 30%),
		linear-gradient(135deg, #fff 0%, #f4faf3 100%);
}

.pal-guide-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-guide-head > div > p:last-child {
	max-width: 540px;
	margin: 10px 0 0;
	color: var(--pal-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pal-energy-card,
.pal-basic-plan {
	margin-top: 14px;
	padding: 18px;
	border: 1px solid var(--pal-border);
	border-radius: 21px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(36,73,40,.05);
}

.pal-energy-numbers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 9px;
}

.pal-energy-numbers article {
	padding: 15px;
	border: 1px solid #e5ece1;
	border-radius: 17px;
	background: #f8faf6;
}

.pal-energy-numbers article.pal-energy-target {
	background: #f1f8eb;
	border-color: rgba(85,169,25,.18);
}

.pal-energy-numbers span,
.pal-energy-numbers small {
	display: block;
	color: var(--pal-muted);
	font-size: 10px;
	font-weight: 750;
	line-height: 1.3;
}

.pal-energy-numbers strong {
	display: block;
	margin: 5px 0 2px;
	color: #1e3823;
	font-size: clamp(23px, 5.5vw, 30px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-guide-list {
	display: grid;
	gap: 9px;
}

.pal-guide-list article {
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 11px;
	align-items: start;
	padding: 13px;
	border: 1px solid #e7ede4;
	border-radius: 15px;
	background: #fbfcfa;
}

.pal-guide-list article > span {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 11px;
	background: #eef8e7;
	color: var(--pal-green-dark);
	font-size: 12px;
	font-weight: 900;
}

.pal-guide-list strong {
	display: block;
	color: #283d2c;
	font-size: 13px;
}

.pal-guide-list p {
	margin: 3px 0 0;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.45;
}

.pal-training-targets {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 9px;
	margin-bottom: 10px;
}

.pal-training-targets article {
	padding: 16px 12px;
	border-radius: 17px;
	background: #f5f9f2;
	border: 1px solid #e4ece0;
	text-align: center;
}

.pal-training-targets strong,
.pal-training-targets span {
	display: block;
}

.pal-training-targets strong {
	color: var(--pal-blue);
	font-size: 32px;
	line-height: 1;
	letter-spacing: -.05em;
}

.pal-training-targets span {
	margin-top: 5px;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.3;
	font-weight: 750;
}

.pal-training-note {
	margin: 0 2px 13px;
	color: #647169;
	font-size: 11px;
	line-height: 1.45;
}

.pal-notice--compact {
	margin-top: 12px;
}

.pal-premium-teaser {
	margin-top: 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 15px;
	border: 1px solid #eadfbf;
	border-radius: 18px;
	background: linear-gradient(135deg, #fffdf7, #fff9e9);
}

.pal-premium-teaser > div {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	min-width: 0;
}

.pal-premium-lock {
	width: 35px;
	height: 35px;
	flex: 0 0 35px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: #fff2c8;
	color: #aa7700;
	font-weight: 900;
}

.pal-premium-teaser strong {
	display: block;
	color: #514522;
	font-size: 13px;
}

.pal-premium-teaser p {
	margin: 3px 0 0;
	color: #827655;
	font-size: 10px;
	line-height: 1.4;
}

.pal-premium-badge {
	flex: 0 0 auto;
	padding: 5px 9px;
	border-radius: 999px;
	background: #fff0bd;
	color: #8c6500;
	font-size: 9px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .04em;
}

@media (max-width: 430px) {
	.pal-energy-card,
	.pal-basic-plan {
		padding: 15px;
	}

	.pal-energy-numbers {
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.pal-premium-teaser {
		align-items: flex-start;
	}

	.pal-premium-badge {
		margin-top: 2px;
	}
}


/* PAL ALPHA 8 PLANS */

.pal-plans-view {
	padding: 2px 0 10px;
}

.pal-plans-head {
	margin: 2px 0 14px;
	padding: 22px 20px;
	border: 1px solid rgba(243,164,0,.20);
	border-radius: 24px;
	background:
		radial-gradient(circle at 90% 8%, rgba(243,164,0,.18), transparent 30%),
		linear-gradient(135deg, #fff 0%, #fffaf0 100%);
}

.pal-plans-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-plans-head > div > p:last-child {
	max-width: 540px;
	margin: 10px 0 0;
	color: var(--pal-muted);
	font-size: 14px;
	line-height: 1.5;
}

.pal-plan-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.pal-plan-card {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 18px;
	border: 1px solid #e5e9dc;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 9px 26px rgba(36,73,40,.06);
}

.pal-plan-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.pal-plan-card h2 {
	margin: 8px 0 0;
	color: #243925;
	font-size: 20px;
	line-height: 1.15;
	letter-spacing: -.03em;
}

.pal-plan-price {
	flex: 0 0 auto;
	text-align: right;
}

.pal-plan-price strong,
.pal-plan-price span {
	display: block;
}

.pal-plan-price strong {
	color: var(--pal-green-dark);
	font-size: 29px;
	line-height: 1;
	letter-spacing: -.05em;
}

.pal-plan-price span {
	margin-top: 4px;
	color: #8a938a;
	font-size: 9px;
	font-weight: 750;
}

.pal-plan-description {
	margin: 14px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
	line-height: 1.5;
}

.pal-plan-includes {
	margin: 15px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.pal-plan-includes li {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 7px;
	align-items: start;
	color: #48584b;
	font-size: 11px;
	line-height: 1.4;
}

.pal-plan-includes li > span {
	width: 19px;
	height: 19px;
	display: grid;
	place-items: center;
	border-radius: 7px;
	background: #eef8e7;
	color: var(--pal-green-dark);
	font-size: 10px;
	font-weight: 900;
}

.pal-plan-status {
	margin-top: auto;
	padding-top: 17px;
	padding-bottom: 9px;
}

.pal-plan-status > span {
	display: inline-flex;
	align-items: center;
	min-height: 25px;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f2f4f1;
	color: #778078;
	font-size: 9px;
	font-weight: 850;
}

.pal-plan-status > span.is-waiting {
	background: #fff2c8;
	color: #8c6500;
}

.pal-plan-status > span.is-owned {
	background: #eaf8e3;
	color: var(--pal-green-dark);
}

.pal-plan-buy {
	width: 100%;
	margin-top: 0;
}

.pal-premium-info {
	margin-top: 13px;
	padding: 14px 15px;
	border: 1px solid #e5e9df;
	border-radius: 16px;
	background: #f9faf8;
}

.pal-premium-info strong {
	display: block;
	color: #364638;
	font-size: 12px;
}

.pal-premium-info p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.45;
}

.pal-premium-teaser--action {
	cursor: pointer;
}

@media (hover:hover) {
	.pal-premium-teaser--action:hover {
		box-shadow: 0 8px 22px rgba(36,73,40,.06);
	}
}

@media (max-width: 620px) {
	.pal-plan-grid {
		grid-template-columns: 1fr;
	}
}


/* PAL ALPHA 9 PAYPAL */

.pal-paypal-button {
	min-height: 46px;
	margin-top: 1px;
}

.pal-plan-payment-message {
	min-height: 18px;
	margin-top: 7px;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.35;
	text-align: center;
}

.pal-plan-payment-message.is-success {
	color: var(--pal-green-dark);
	font-weight: 800;
}

.pal-plan-payment-message.is-error {
	color: #b33a2e;
	font-weight: 750;
}

.pal-plan-payment-message.is-info {
	color: #766228;
}

.pal-admin-checkout-note {
	margin: 8px 2px 0;
	color: #8b7651;
	font-size: 9px;
	line-height: 1.35;
	text-align: center;
}

.pal-plan-card.is-payment-complete {
	border-color: rgba(85,169,25,.35);
	background: linear-gradient(180deg, #fff, #f8fcf5);
}

.pal-plan-card.is-payment-complete .pal-plan-status > span {
	background: #eaf8e3;
	color: var(--pal-green-dark);
}

.pal-paypal-success {
	min-height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 11px 13px;
	border: 1px solid rgba(85,169,25,.25);
	border-radius: 13px;
	background: #eef8e7;
	color: var(--pal-green-dark);
	font-size: 12px;
	font-weight: 850;
	text-align: center;
}


/* PAL ALPHA 10 FREE TEST PLANS */

.pal-plans-head--test {
	border-color: rgba(85,169,25,.22);
	background:
		radial-gradient(circle at 90% 8%, rgba(85,169,25,.16), transparent 31%),
		linear-gradient(135deg, #fff 0%, #f5fbef 100%);
}

.pal-test-mode-pill {
	display: inline-flex;
	align-items: center;
	min-height: 27px;
	margin-bottom: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #e8f7df;
	color: var(--pal-green-dark);
	font-size: 10px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.pal-plan-card--free {
	border-color: rgba(85,169,25,.18);
}

.pal-plan-free-price {
	color: var(--pal-green-dark);
	font-size: 19px;
	font-weight: 950;
	letter-spacing: -.03em;
}

.pal-plan-action {
	width: 100%;
	margin-top: auto;
}

.pal-plan-view {
	width: 100%;
	margin-top: 8px;
}

.pal-plan-builder-backdrop,
.pal-generated-plan-backdrop {
	position: fixed;
	inset: 0;
	z-index: 78;
	background: rgba(8,22,11,.52);
	backdrop-filter: blur(4px);
}

.pal-plan-builder {
	position: fixed;
	z-index: 79;
	left: 50%;
	bottom: 0;
	transform: translate(-50%, 105%);
	width: min(100%, 760px);
	max-height: min(92vh, 850px);
	overflow-y: auto;
	padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
	border-radius: 28px 28px 0 0;
	background: #fff;
	box-shadow: 0 -25px 80px rgba(20,48,22,.25);
	transition: transform .22s ease;
}

.pal-plan-builder.is-open {
	transform: translate(-50%, 0);
}

.pal-plan-builder-form {
	padding-bottom: 10px;
}

.pal-generated-plan-modal {
	position: fixed;
	z-index: 80;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -47%) scale(.985);
	width: min(calc(100% - 20px), 760px);
	height: min(92vh, 920px);
	overflow: hidden;
	border-radius: 27px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(0,0,0,.30);
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}

.pal-generated-plan-modal.is-open {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	pointer-events: auto;
}

.pal-generated-plan-scroll {
	height: 100%;
	overflow-y: auto;
	padding: 28px 18px 40px;
}

.pal-generated-plan-head,
.pal-generated-plan-content {
	width: min(100%, 660px);
	margin-left: auto;
	margin-right: auto;
}

.pal-generated-plan-head {
	padding-right: 46px;
}

.pal-generated-plan-head h1 {
	margin: 0;
	color: #1f3724;
	font-size: clamp(28px, 6vw, 42px);
	line-height: 1.08;
	letter-spacing: -.045em;
}

.pal-generated-plan-head p {
	margin: 10px 0 0;
	color: var(--pal-muted);
	font-size: 13px;
	line-height: 1.5;
}

.pal-generated-plan-content {
	margin-top: 20px;
}

.pal-plan-day,
.pal-training-session {
	margin-bottom: 12px;
	padding: 15px;
	border: 1px solid #e5ece1;
	border-radius: 18px;
	background: #fbfcfa;
}

.pal-plan-day h2,
.pal-training-session h2 {
	margin: 0 0 10px;
	color: #263d2a;
	font-size: 17px;
	letter-spacing: -.02em;
}

.pal-meal-row {
	display: grid;
	grid-template-columns: 78px 1fr auto;
	gap: 9px;
	align-items: start;
	padding: 9px 0;
	border-top: 1px solid #e9eee7;
}

.pal-meal-row:first-of-type {
	border-top: 0;
}

.pal-meal-row__type {
	color: var(--pal-green-dark);
	font-size: 10px;
	font-weight: 850;
	text-transform: uppercase;
}

.pal-meal-row strong {
	display: block;
	color: #344738;
	font-size: 12px;
}

.pal-meal-row p {
	margin: 3px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.4;
}

.pal-meal-kcal {
	color: #7c897f;
	font-size: 10px;
	font-weight: 800;
	white-space: nowrap;
}

.pal-exercise-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid #e9eee7;
}

.pal-exercise-row:first-of-type {
	border-top: 0;
}

.pal-exercise-row strong {
	font-size: 12px;
	color: #334637;
}

.pal-exercise-row span {
	color: var(--pal-muted);
	font-size: 10px;
	font-weight: 750;
}

.pal-plan-note-box {
	margin-top: 13px;
	padding: 13px 14px;
	border: 1px solid #e7e8d9;
	border-radius: 15px;
	background: #fffdf5;
	color: #68634b;
	font-size: 10px;
	line-height: 1.5;
}

body.pal-plan-builder-open,
body.pal-generated-plan-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.pal-generated-plan-modal {
		width: 100%;
		height: 100dvh;
		max-height: none;
		border-radius: 0;
	}

	.pal-generated-plan-scroll {
		padding-left: 15px;
		padding-right: 15px;
	}

	.pal-meal-row {
		grid-template-columns: 68px 1fr;
	}

	.pal-meal-kcal {
		grid-column: 2;
	}
}


/* PAL ALPHA 11 TODAY */

.pal-bottom-nav button {
	font-size: 9px;
}

.pal-bottom-nav button span {
	font-size: 18px;
}

.pal-today-view {
	padding: 2px 0 10px;
}

.pal-today-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 13px;
	padding: 22px 20px;
	border: 1px solid rgba(85,169,25,.16);
	border-radius: 24px;
	background:
		radial-gradient(circle at 91% 8%, rgba(243,164,0,.16), transparent 28%),
		linear-gradient(135deg, #fff 0%, #f6fbf1 100%);
}

.pal-today-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-today-head p:last-child {
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 13px;
}

.pal-today-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.pal-today-summary article {
	padding: 13px 9px;
	border: 1px solid var(--pal-border);
	border-radius: 16px;
	background: #fff;
	text-align: center;
	box-shadow: 0 6px 18px rgba(36,73,40,.04);
}

.pal-today-summary span,
.pal-today-summary small {
	display: block;
	color: var(--pal-muted);
	font-size: 9px;
	font-weight: 750;
}

.pal-today-summary strong {
	display: block;
	margin: 4px 0 1px;
	color: #213a26;
	font-size: clamp(19px, 4.8vw, 27px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-today-card {
	margin-top: 12px;
	padding: 17px;
	border: 1px solid var(--pal-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 7px 22px rgba(36,73,40,.045);
}

.pal-mini-action {
	min-height: 31px;
	padding: 5px 10px;
	border: 1px solid #dfe8dc;
	border-radius: 10px;
	background: #f7faf5;
	color: var(--pal-green-dark);
	font-size: 9px;
	font-weight: 850;
	cursor: pointer;
}

.pal-today-meals {
	display: grid;
	gap: 7px;
}

.pal-today-meal {
	display: grid;
	grid-template-columns: 68px 1fr auto;
	gap: 8px;
	align-items: start;
	padding: 10px 11px;
	border-radius: 13px;
	background: #f8faf6;
	border: 1px solid #e6ede2;
}

.pal-today-meal__type {
	color: var(--pal-green-dark);
	font-size: 9px;
	font-weight: 900;
	text-transform: uppercase;
}

.pal-today-meal strong {
	display: block;
	color: #334737;
	font-size: 11px;
}

.pal-today-meal p {
	margin: 3px 0 0;
	color: var(--pal-muted);
	font-size: 9px;
	line-height: 1.35;
}

.pal-today-meal__kcal {
	color: #77837a;
	font-size: 9px;
	font-weight: 800;
	white-space: nowrap;
}

.pal-today-training-box {
	padding: 14px;
	border: 1px solid #e4ebe1;
	border-radius: 15px;
	background: #f8faf7;
}

.pal-today-training-box h3 {
	margin: 0;
	color: #2c422f;
	font-size: 15px;
}

.pal-today-training-box > p {
	margin: 4px 0 10px;
	color: var(--pal-muted);
	font-size: 10px;
}

.pal-today-training-box ul {
	margin: 0;
	padding-left: 18px;
	color: #48584b;
	font-size: 10px;
	line-height: 1.6;
}

.pal-today-empty {
	padding: 15px;
	border-radius: 14px;
	background: #f8faf7;
	border: 1px dashed #dce6d9;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.45;
	text-align: center;
}

.pal-today-checkin {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.pal-today-checkin h2 {
	margin: 0;
	font-size: 18px;
}

.pal-today-checkin p:last-child {
	margin: 5px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
}

.pal-free-plan-teaser {
	margin-top: 14px;
	padding: 15px;
	border: 1px solid rgba(85,169,25,.20);
	border-radius: 18px;
	background: linear-gradient(135deg, #fbfff8, #f0f9e9);
}

.pal-free-plan-teaser > div:first-child {
	display: flex;
	align-items: flex-start;
	gap: 11px;
}

.pal-free-plan-teaser strong {
	display: block;
	color: #35502f;
	font-size: 13px;
}

.pal-free-plan-teaser p {
	margin: 3px 0 0;
	color: #71806f;
	font-size: 10px;
	line-height: 1.4;
}

.pal-free-plan-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 8px;
	margin-top: 12px;
}

.pal-free-plan-actions .pal-primary-button,
.pal-free-plan-actions .pal-secondary-button {
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 9px 11px;
	font-size: 11px;
}

@media (max-width: 430px) {
	.pal-today-head {
		padding: 19px 16px;
	}

	.pal-today-card {
		padding: 14px;
	}

	.pal-today-meal {
		grid-template-columns: 58px 1fr;
	}

	.pal-today-meal__kcal {
		grid-column: 2;
	}

	.pal-today-checkin {
		display: block;
	}

	.pal-today-checkin .pal-secondary-button {
		width: 100%;
		margin-top: 11px;
	}
}


/* PAL ALPHA 12 FULL APP SHELL */

/*
 * The shortcode page becomes a self-contained application surface.
 * The selectors below intentionally target common WordPress/theme chrome,
 * but only while body.pal-app-shell-active is present.
 */
html:has(body.pal-app-shell-active) {
	margin-top: 0 !important;
	background: var(--pal-bg);
}

body.pal-app-shell-active {
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0 !important;
	min-height: 100dvh !important;
	background: var(--pal-bg) !important;
	overflow: hidden !important;
}

body.pal-app-shell-active #wpadminbar,
body.pal-app-shell-active header:not(.pal-topbar),
body.pal-app-shell-active footer,
body.pal-app-shell-active .site-header,
body.pal-app-shell-active .site-footer,
body.pal-app-shell-active #site-header,
body.pal-app-shell-active #site-footer,
body.pal-app-shell-active .elementor-location-header,
body.pal-app-shell-active .elementor-location-footer,
body.pal-app-shell-active .wp-site-blocks > header,
body.pal-app-shell-active .wp-site-blocks > footer,
body.pal-app-shell-active .breadcrumb,
body.pal-app-shell-active .breadcrumbs,
body.pal-app-shell-active .yoast-breadcrumb,
body.pal-app-shell-active .rank-math-breadcrumb,
body.pal-app-shell-active aside,
body.pal-app-shell-active .sidebar,
body.pal-app-shell-active #sidebar,
body.pal-app-shell-active .widget-area,
body.pal-app-shell-active .comments-area,
body.pal-app-shell-active .entry-header,
body.pal-app-shell-active .page-header,
body.pal-app-shell-active .entry-title,
body.pal-app-shell-active .post-navigation,
body.pal-app-shell-active .navigation.post-navigation {
	display: none !important;
}

body.pal-app-shell-active,
body.pal-app-shell-active #page,
body.pal-app-shell-active #content,
body.pal-app-shell-active #primary,
body.pal-app-shell-active #main,
body.pal-app-shell-active main:not(.pal-main),
body.pal-app-shell-active .site,
body.pal-app-shell-active .site-content,
body.pal-app-shell-active .content-area,
body.pal-app-shell-active .container,
body.pal-app-shell-active .site-container,
body.pal-app-shell-active .content,
body.pal-app-shell-active .entry-content,
body.pal-app-shell-active article.page,
body.pal-app-shell-active article.type-page {
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.pal-app-shell-active .wp-site-blocks {
	padding: 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
}

body.pal-app-shell-active .pal-app {
	position: fixed;
	z-index: 2147483000;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100dvh;
	min-height: 100dvh;
	margin: 0;
	padding-bottom: 0;
	overflow: hidden;
	background: var(--pal-bg);
	border: 0;
}

body.pal-app-shell-active .pal-topbar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 68px;
	z-index: 40;
}

body.pal-app-shell-active .pal-topbar__inner {
	width: min(100%, 760px);
	height: 68px;
	min-height: 68px;
}

body.pal-app-shell-active .pal-main {
	position: absolute;
	top: 68px;
	bottom: calc(70px + env(safe-area-inset-bottom));
	left: 0;
	right: 0;
	width: min(100%, 760px);
	max-width: 760px;
	margin: 0 auto;
	padding: 18px 14px 32px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-y: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

body.pal-app-shell-active .pal-bottom-nav {
	position: absolute;
	left: 50%;
	right: auto;
	bottom: 0;
	width: min(100%, 760px);
	min-height: 70px;
	transform: translateX(-50%);
	padding-bottom: max(8px, env(safe-area-inset-bottom));
}

body.pal-app-shell-active .pal-sheet,
body.pal-app-shell-active .pal-plan-builder,
body.pal-app-shell-active .pal-article-modal,
body.pal-app-shell-active .pal-generated-plan-modal {
	z-index: 2147483200;
}

body.pal-app-shell-active .pal-sheet-backdrop,
body.pal-app-shell-active .pal-plan-builder-backdrop,
body.pal-app-shell-active .pal-article-backdrop,
body.pal-app-shell-active .pal-generated-plan-backdrop {
	z-index: 2147483100;
}

/* No theme typography/margin leakage inside the app. */
body.pal-app-shell-active .pal-app h1,
body.pal-app-shell-active .pal-app h2,
body.pal-app-shell-active .pal-app h3,
body.pal-app-shell-active .pal-app p,
body.pal-app-shell-active .pal-app ul,
body.pal-app-shell-active .pal-app ol,
body.pal-app-shell-active .pal-app figure {
	max-width: none;
}

body.pal-app-shell-active .pal-app a,
body.pal-app-shell-active .pal-app button,
body.pal-app-shell-active .pal-app input,
body.pal-app-shell-active .pal-app select,
body.pal-app-shell-active .pal-app textarea {
	font-family: inherit;
}

@media (min-width: 761px) {
	body.pal-app-shell-active {
		background: #eaf0e7 !important;
	}

	body.pal-app-shell-active .pal-app {
		background:
			linear-gradient(
				90deg,
				#eaf0e7 0,
				#eaf0e7 calc(50% - 380px),
				var(--pal-bg) calc(50% - 380px),
				var(--pal-bg) calc(50% + 380px),
				#eaf0e7 calc(50% + 380px),
				#eaf0e7 100%
			);
	}

	body.pal-app-shell-active .pal-topbar {
		background: transparent;
		border-bottom: 0;
	}

	body.pal-app-shell-active .pal-topbar__inner,
	body.pal-app-shell-active .pal-bottom-nav {
		background: rgba(255,255,255,.97);
	}

	body.pal-app-shell-active .pal-main {
		background: var(--pal-bg);
		border-left: 1px solid var(--pal-border);
		border-right: 1px solid var(--pal-border);
	}
}

@media (max-width: 760px) {
	body.pal-app-shell-active .pal-logo {
		height: 42px;
		max-width: 185px;
	}

	body.pal-app-shell-active .pal-main {
		top: 62px;
		bottom: calc(68px + env(safe-area-inset-bottom));
		padding-top: 12px;
	}

	body.pal-app-shell-active .pal-topbar,
	body.pal-app-shell-active .pal-topbar__inner {
		height: 62px;
		min-height: 62px;
	}
}


/* PAL ALPHA 13 DAILY TRACKER */

.pal-today-meal {
	position: relative;
	cursor: pointer;
	transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}

.pal-today-meal::after {
	content: "✓";
	width: 25px;
	height: 25px;
	display: grid;
	place-items: center;
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	border: 1px solid #d8e4d4;
	border-radius: 9px;
	background: #fff;
	color: transparent;
	font-size: 12px;
	font-weight: 900;
}

.pal-today-meal.is-done {
	background: #eef8e9;
	border-color: rgba(85,169,25,.30);
}

.pal-today-meal.is-done::after {
	background: var(--pal-green);
	border-color: var(--pal-green);
	color: #fff;
}

.pal-today-meal.is-done strong,
.pal-today-meal.is-done p {
	opacity: .68;
}

.pal-today-meal {
	padding-right: 46px;
}

.pal-today-training-box {
	position: relative;
}

.pal-training-done-toggle {
	width: 100%;
	min-height: 40px;
	margin-top: 10px;
	border: 1px solid #dce6d8;
	border-radius: 12px;
	background: #fff;
	color: var(--pal-green-dark);
	font-size: 11px;
	font-weight: 850;
	cursor: pointer;
}

.pal-training-done-toggle.is-done {
	background: #eaf8e3;
	border-color: rgba(85,169,25,.30);
}

.pal-daily-tracker {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
}

.pal-daily-field label {
	display: block;
	margin-bottom: 7px;
	color: #344738;
	font-size: 11px;
	font-weight: 800;
}

.pal-daily-field input {
	width: 100%;
	min-height: 48px;
	border: 1px solid #dbe5d7;
	border-radius: 13px;
	background: #fbfcfa;
	color: #18311d;
	padding: 0 12px;
	font: inherit;
	font-size: 15px;
	outline: none;
}

.pal-daily-field input:focus {
	border-color: rgba(85,169,25,.70);
	box-shadow: 0 0 0 3px rgba(85,169,25,.09);
	background: #fff;
}

.pal-today-save {
	width: 100%;
	margin-top: 4px;
}

.pal-today-card.is-saving {
	opacity: .72;
	pointer-events: none;
}

@media (max-width: 430px) {
	.pal-daily-tracker {
		grid-template-columns: 1fr 1fr;
		gap: 7px;
	}

	.pal-today-meal {
		padding-right: 42px;
	}
}


/* PAL ALPHA 14 OWNER MODE */

.pal-topbar-actions {
	display: flex;
	align-items: center;
	gap: 7px;
}

.pal-owner-button {
	color: var(--pal-blue);
}

.pal-owner-view {
	padding: 2px 0 12px;
}

.pal-owner-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 13px;
	padding: 21px 19px;
	border: 1px solid rgba(18,102,195,.15);
	border-radius: 24px;
	background:
		radial-gradient(circle at 91% 8%, rgba(18,102,195,.12), transparent 30%),
		linear-gradient(135deg, #fff 0%, #f4f9ff 100%);
}

.pal-owner-head h1 {
	margin: 0;
	font-size: clamp(29px, 7vw, 41px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-owner-head p:last-child {
	max-width: 500px;
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
	line-height: 1.45;
}

.pal-owner-new {
	flex: 0 0 auto;
	margin: 0;
	min-height: 42px;
	padding: 10px 13px;
	font-size: 11px;
}

.pal-owner-editor,
.pal-owner-list-card {
	margin-top: 12px;
	padding: 17px;
	border: 1px solid var(--pal-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 7px 22px rgba(36,73,40,.045);
}

.pal-owner-editor-close {
	width: 36px;
	height: 36px;
	border: 1px solid var(--pal-border);
	border-radius: 12px;
	background: #fff;
	color: #68746b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.pal-owner-post-form textarea {
	width: 100%;
	border: 1px solid #dbe5d7;
	border-radius: 14px;
	background: #fbfcfa;
	color: #18311d;
	padding: 12px 13px;
	font: inherit;
	font-size: 15px;
	line-height: 1.55;
	resize: vertical;
	outline: none;
}

.pal-owner-post-form textarea:focus {
	border-color: rgba(85,169,25,.75);
	box-shadow: 0 0 0 3px rgba(85,169,25,.10);
	background: #fff;
}

#pal-owner-content {
	min-height: 280px;
}

.pal-owner-image-preview {
	margin-bottom: 9px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 15px;
	background: #eff4ec;
}

.pal-owner-image-preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pal-owner-posts {
	display: grid;
	gap: 8px;
}

.pal-owner-post {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 11px;
	align-items: center;
	padding: 10px;
	border: 1px solid #e5ece2;
	border-radius: 15px;
	background: #fbfcfa;
	cursor: pointer;
}

.pal-owner-post__image {
	width: 72px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 11px;
	background: linear-gradient(135deg, #eef5e9, #f8f1df);
}

.pal-owner-post__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pal-owner-post__image span {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	color: var(--pal-green-dark);
	font-weight: 900;
}

.pal-owner-post h3 {
	margin: 0;
	color: #2d4231;
	font-size: 13px;
	line-height: 1.28;
}

.pal-owner-post__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 5px;
	color: #7d8980;
	font-size: 9px;
}

.pal-owner-status-pill {
	display: inline-flex;
	align-items: center;
	min-height: 21px;
	padding: 2px 7px;
	border-radius: 999px;
	background: #eff2ee;
	color: #6f796f;
	font-size: 8px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.pal-owner-status-pill.is-publish {
	background: #eaf8e3;
	color: var(--pal-green-dark);
}

.pal-owner-post__edit {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid #dfe7dc;
	border-radius: 11px;
	background: #fff;
	color: var(--pal-blue);
	font-size: 14px;
	font-weight: 900;
}

@media (max-width: 520px) {
	.pal-owner-head {
		display: block;
		padding: 18px 15px;
	}

	.pal-owner-new {
		width: 100%;
		margin-top: 13px;
	}

	.pal-owner-editor,
	.pal-owner-list-card {
		padding: 14px;
	}

	.pal-owner-post {
		grid-template-columns: 58px 1fr 32px;
		gap: 9px;
	}

	.pal-owner-post__image {
		width: 58px;
	}
}


/* PAL ALPHA 15 LOGOUT */

.pal-logout-button {
	color: #8b5a50;
}

.pal-logout-button:hover {
	background: #fff7f4;
	border-color: #edd8d2;
}

.pal-logout-button.is-loading {
	opacity: .55;
	pointer-events: none;
}

@media (max-width: 430px) {
	.pal-topbar-actions {
		gap: 5px;
	}

	.pal-topbar-actions .pal-icon-button {
		width: 38px;
		height: 38px;
		border-radius: 12px;
		font-size: 19px;
	}
}


/* PAL ALPHA 16 PREFERENCES */

.pal-profile-subsection {
	margin: 20px 0;
	padding: 15px;
	border: 1px solid #e2eadf;
	border-radius: 18px;
	background: #f8faf7;
}

.pal-profile-subsection__head {
	margin-bottom: 15px;
}

.pal-profile-subsection__head strong,
.pal-profile-subsection__head span {
	display: block;
}

.pal-profile-subsection__head strong {
	color: #314633;
	font-size: 14px;
}

.pal-profile-subsection__head span {
	margin-top: 4px;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.4;
}

.pal-day-picker {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 5px;
}

.pal-day-picker label {
	position: relative;
	margin: 0;
}

.pal-day-picker input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pal-day-picker span {
	display: grid;
	place-items: center;
	min-height: 38px;
	border: 1px solid #dce5d8;
	border-radius: 10px;
	background: #fff;
	color: #68746a;
	font-size: 9px;
	font-weight: 850;
	cursor: pointer;
}

.pal-day-picker input:checked + span {
	border-color: rgba(85,169,25,.45);
	background: #eaf8e3;
	color: var(--pal-green-dark);
}

@media (max-width: 430px) {
	.pal-profile-subsection {
		padding: 13px;
	}

	.pal-day-picker {
		gap: 4px;
	}

	.pal-day-picker span {
		min-height: 36px;
		font-size: 8px;
	}
}


/* PAL ALPHA 17 INSTALL PROMPT */

.pal-install-banner {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	gap: 11px;
	align-items: center;
	margin: 0 0 12px;
	padding: 12px;
	border: 1px solid rgba(18,102,195,.14);
	border-radius: 18px;
	background: linear-gradient(135deg, #ffffff 0%, #f3f9ff 100%);
	box-shadow: 0 8px 20px rgba(18,102,195,.06);
}

.pal-install-banner__media {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,.07);
}

.pal-install-banner__media img,
.pal-install-sheet__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pal-install-banner__content strong {
	display: block;
	color: #243e28;
	font-size: 14px;
	line-height: 1.2;
}

.pal-install-banner__content p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.4;
}

.pal-install-banner__actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
	min-width: 92px;
}

.pal-install-banner__primary,
.pal-install-banner__secondary {
	min-height: 34px;
	padding: 7px 10px;
	border-radius: 11px;
	font-size: 10px;
	font-weight: 850;
	cursor: pointer;
}

.pal-install-banner__primary {
	border: 0;
	background: var(--pal-blue);
	color: #fff;
}

.pal-install-banner__secondary {
	border: 1px solid #dbe5ee;
	background: #fff;
	color: #58708d;
}

.pal-install-sheet-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147483300;
	background: rgba(15,22,20,.42);
	backdrop-filter: blur(2px);
}

.pal-install-sheet {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	z-index: 2147483400;
	width: min(100%, 760px);
	padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
	border-radius: 24px 24px 0 0;
	background: #fff;
	box-shadow: 0 -12px 32px rgba(0,0,0,.16);
}

.pal-install-sheet__head {
	display: grid;
	grid-template-columns: 52px 1fr 36px;
	gap: 10px;
	align-items: center;
}

.pal-install-sheet__icon {
	width: 52px;
	height: 52px;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.pal-install-sheet__head h2 {
	margin: 3px 0 0;
	font-size: 20px;
	line-height: 1.1;
}

.pal-install-sheet__close {
	width: 36px;
	height: 36px;
	border: 1px solid #dce4df;
	border-radius: 12px;
	background: #fff;
	color: #657168;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.pal-install-steps {
	margin: 16px 0 0;
	padding-left: 19px;
	color: #415044;
	font-size: 12px;
	line-height: 1.6;
}

.pal-install-steps li + li {
	margin-top: 6px;
}

.pal-install-sheet__footer {
	margin-top: 16px;
}

.pal-install-sheet__footer .pal-primary-button {
	width: 100%;
	margin: 0;
}

@media (max-width: 520px) {
	.pal-install-banner {
		grid-template-columns: 50px 1fr;
	}

	.pal-install-banner__actions {
		grid-column: 1 / -1;
		grid-template-columns: 1fr 1fr;
		min-width: 0;
	}

	.pal-install-banner__media {
		width: 50px;
		height: 50px;
		border-radius: 14px;
	}

	.pal-install-sheet {
		width: 100%;
		border-radius: 22px 22px 0 0;
	}
}


/* PAL ALPHA 18 PLAN BUILDER SAFE AREA */

/* While a plan builder is open, the main app navigation must never sit above it. */
body.pal-plan-builder-open .pal-bottom-nav {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translate(-50%, 110%) !important;
}

/* The builder becomes its own scrollable application layer. */
body.pal-app-shell-active .pal-plan-builder {
	top: max(8px, env(safe-area-inset-top));
	bottom: 0;
	max-height: none;
	height: calc(100dvh - max(8px, env(safe-area-inset-top)));
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-bottom: calc(130px + env(safe-area-inset-bottom));
	scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom));
}

/* Keep the builder header visible while the form scrolls. */
body.pal-app-shell-active .pal-plan-builder .pal-sheet__header {
	position: sticky;
	top: -8px;
	z-index: 6;
	margin-left: -2px;
	margin-right: -2px;
	padding-top: 10px;
	background: rgba(255,255,255,.98);
	border-bottom: 1px solid rgba(227,234,223,.72);
}

/* The generate button is always reachable and sits above the phone safe area. */
body.pal-app-shell-active .pal-plan-builder-form > .pal-save-button {
	position: sticky;
	bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 7;
	margin-top: 18px;
	box-shadow:
		0 0 0 10px rgba(255,255,255,.96),
		0 10px 24px rgba(36,73,40,.12);
}

/* Prevent the final control group from disappearing behind the sticky action button. */
body.pal-app-shell-active .pal-plan-builder-form {
	padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Also protect select/radio controls close to the bottom edge. */
body.pal-app-shell-active .pal-plan-builder .pal-field:last-of-type {
	margin-bottom: 24px;
}

@media (max-width: 560px) {
	body.pal-app-shell-active .pal-plan-builder {
		top: 0;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
		padding-left: 14px;
		padding-right: 14px;
		padding-bottom: calc(135px + env(safe-area-inset-bottom));
	}

	body.pal-app-shell-active .pal-plan-builder .pal-sheet__handle {
		margin-top: max(5px, env(safe-area-inset-top));
	}

	body.pal-app-shell-active .pal-plan-builder .pal-sheet__header {
		top: 0;
	}

	body.pal-app-shell-active .pal-plan-builder-form > .pal-save-button {
		bottom: calc(14px + env(safe-area-inset-bottom));
	}
}


/* PAL ALPHA 20 MY WEEK */

.pal-today-head__actions {
	display: grid;
	justify-items: end;
	gap: 7px;
}

.pal-week-view {
	padding: 2px 0 10px;
}

.pal-week-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 12px;
	padding: 21px 19px;
	border: 1px solid rgba(85,169,25,.17);
	border-radius: 24px;
	background:
		radial-gradient(circle at 91% 8%, rgba(85,169,25,.15), transparent 30%),
		linear-gradient(135deg, #fff 0%, #f5fbf1 100%);
}

.pal-week-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-week-head p:last-child {
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
}

.pal-week-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 8px;
	margin-bottom: 11px;
}

.pal-week-summary > div {
	padding: 13px;
	border: 1px solid var(--pal-border);
	border-radius: 16px;
	background: #fff;
	text-align: center;
}

.pal-week-summary strong,
.pal-week-summary span {
	display: block;
}

.pal-week-summary strong {
	color: var(--pal-green-dark);
	font-size: 27px;
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-week-summary span {
	margin-top: 4px;
	color: var(--pal-muted);
	font-size: 9px;
	font-weight: 750;
}

.pal-week-days {
	display: grid;
	gap: 9px;
}

.pal-week-day {
	padding: 13px;
	border: 1px solid #e3eadf;
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(36,73,40,.035);
}

.pal-week-day.is-today {
	border-color: rgba(18,102,195,.30);
	box-shadow: 0 0 0 2px rgba(18,102,195,.05);
}

.pal-week-day.is-future {
	opacity: .67;
}

.pal-week-day__head {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	gap: 10px;
	align-items: center;
}

.pal-week-day__date {
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: #f2f8ed;
	color: var(--pal-green-dark);
	text-align: center;
}

.pal-week-day__date strong,
.pal-week-day__date span {
	display: block;
}

.pal-week-day__date strong {
	font-size: 13px;
}

.pal-week-day__date span {
	font-size: 9px;
	font-weight: 750;
}

.pal-week-day__title strong {
	display: block;
	color: #2d4331;
	font-size: 13px;
}

.pal-week-day__title span {
	display: block;
	margin-top: 3px;
	color: var(--pal-muted);
	font-size: 9px;
}

.pal-week-progress-ring {
	--pal-progress: 0%;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: conic-gradient(var(--pal-green) var(--pal-progress), #edf1eb 0);
	position: relative;
}

.pal-week-progress-ring::before {
	content: "";
	position: absolute;
	inset: 5px;
	border-radius: 50%;
	background: #fff;
}

.pal-week-progress-ring span {
	position: relative;
	z-index: 1;
	color: #506154;
	font-size: 8px;
	font-weight: 900;
}

.pal-week-day__body {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 7px;
	margin-top: 10px;
}

.pal-week-block {
	padding: 10px;
	border-radius: 13px;
	background: #f8faf7;
	border: 1px solid #e7ede4;
}

.pal-week-block__label {
	display: block;
	margin-bottom: 5px;
	color: var(--pal-blue);
	font-size: 8px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.pal-week-block strong {
	display: block;
	color: #35483a;
	font-size: 10px;
	line-height: 1.35;
}

.pal-week-block p {
	margin: 3px 0 0;
	color: var(--pal-muted);
	font-size: 8px;
	line-height: 1.35;
}

.pal-week-tracker-line {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.pal-week-tracker-pill {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 3px 7px;
	border-radius: 999px;
	background: #f0f3ef;
	color: #707b72;
	font-size: 8px;
	font-weight: 800;
}

@media (max-width: 430px) {
	.pal-week-head {
		padding: 18px 15px;
	}

	.pal-week-day {
		padding: 11px;
	}

	.pal-week-day__body {
		grid-template-columns: 1fr;
	}

	.pal-week-day__head {
		grid-template-columns: 48px 1fr 42px;
	}

	.pal-week-day__date {
		width: 48px;
		height: 48px;
	}
}


/* PAL ALPHA 21 PASSWORD RESET */

.pal-forgot-password {
	margin-top: 4px;
	color: var(--pal-blue);
}

.pal-password-step {
	display: none;
}

.pal-password-step.is-active {
	display: block;
}

.pal-password-reset-panel h2 {
	margin: 0;
	font-size: 23px;
	letter-spacing: -.03em;
}

.pal-password-reset-panel > .pal-password-step > p {
	margin: 7px 0 18px;
	color: var(--pal-muted);
	font-size: 13px;
	line-height: 1.45;
}

.pal-password-reset-panel .pal-auth-step-label {
	background: #eaf4ff;
	color: var(--pal-blue);
}

.pal-password-reset-panel .pal-code-input {
	border-color: #d7e4ef;
}

.pal-password-reset-panel .pal-code-input:focus {
	border-color: rgba(18,102,195,.65);
	box-shadow: 0 0 0 3px rgba(18,102,195,.09);
}


/* PAL ALPHA 22 INSTALL PROMPT FIX */

/* The install suggestion is a true app-layer card, never part of page flow. */
body.pal-app-shell-active .pal-install-banner {
	position: absolute;
	z-index: 2147483050;
	left: 50%;
	bottom: calc(82px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	width: min(calc(100% - 24px), 620px);
	margin: 0;
	padding: 12px 42px 12px 12px;
	pointer-events: auto;
}

body.pal-app-shell-active .pal-install-banner[hidden] {
	display: none !important;
}

.pal-install-banner__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border: 1px solid #dde5e0;
	border-radius: 10px;
	background: #fff;
	color: #66736a;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.pal-install-banner__close:active {
	transform: scale(.95);
}

.pal-install-banner__primary,
.pal-install-banner__secondary,
.pal-install-banner__close {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.pal-install-banner__primary:disabled {
	opacity: .55;
	cursor: wait;
}

/* The iPhone instruction sheet is also guaranteed to sit above the app shell. */
body.pal-app-shell-active .pal-install-sheet-backdrop {
	position: fixed;
	z-index: 2147483600;
}

body.pal-app-shell-active .pal-install-sheet {
	position: fixed;
	z-index: 2147483700;
}

@media (max-width: 520px) {
	body.pal-app-shell-active .pal-install-banner {
		bottom: calc(76px + env(safe-area-inset-bottom));
		width: calc(100% - 16px);
		padding: 10px 38px 10px 10px;
		border-radius: 16px;
	}

	.pal-install-banner__content strong {
		font-size: 13px;
	}

	.pal-install-banner__content p {
		font-size: 9px;
	}
}

/* Signed-out login screen has no bottom nav, so keep the card lower. */
body.pal-app-shell-active:has(.pal-auth) .pal-install-banner {
	bottom: calc(12px + env(safe-area-inset-bottom));
}


/* PAL ALPHA 23 PASSWORD RESET UX */

.pal-reset-resend {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
	min-height: 31px;
}

.pal-reset-resend .pal-text-button {
	width: auto;
	margin: 0;
	padding: 6px 8px;
}

.pal-reset-resend .pal-text-button:disabled {
	color: #9aa39c;
	cursor: default;
	opacity: .65;
}

#pal-password-resend-timer {
	color: #7e8980;
	font-size: 10px;
	font-weight: 750;
}

.pal-password-reset-panel .pal-form-message.is-info {
	color: var(--pal-blue);
}


/* PAL ALPHA 24 INSTALL SHEET CONTROLS */

#pal-install-sheet[hidden],
#pal-install-sheet-backdrop[hidden] {
	display: none !important;
}

#pal-install-sheet-gotit,
#pal-install-sheet-close {
	position: relative;
	z-index: 3;
	pointer-events: auto !important;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	cursor: pointer !important;
}

#pal-install-sheet-gotit {
	min-height: 52px;
}

#pal-install-sheet-gotit:active,
#pal-install-sheet-close:active {
	transform: scale(.98);
}

body.pal-install-help-open .pal-install-sheet,
body.pal-install-help-open .pal-install-sheet-backdrop {
	pointer-events: auto !important;
}


/* PAL ALPHA 25 SHOPPING LIST */

.pal-free-plan-actions--food {
	grid-template-columns: repeat(3, minmax(0,1fr));
}

.pal-shopping-view {
	padding: 2px 0 10px;
}

.pal-shopping-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 12px;
	padding: 21px 19px;
	border: 1px solid rgba(243,164,0,.18);
	border-radius: 24px;
	background:
		radial-gradient(circle at 90% 8%, rgba(243,164,0,.16), transparent 28%),
		linear-gradient(135deg, #fff 0%, #fffaf1 100%);
}

.pal-shopping-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-shopping-head p:last-child {
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
	line-height: 1.45;
}

.pal-shopping-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 8px;
	margin-bottom: 9px;
}

.pal-shopping-summary > div {
	padding: 12px;
	border: 1px solid var(--pal-border);
	border-radius: 15px;
	background: #fff;
	text-align: center;
}

.pal-shopping-summary strong,
.pal-shopping-summary span {
	display: block;
}

.pal-shopping-summary strong {
	color: var(--pal-green-dark);
	font-size: 25px;
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-shopping-summary span {
	margin-top: 4px;
	color: var(--pal-muted);
	font-size: 9px;
	font-weight: 800;
}

.pal-shopping-toolbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 7px;
	margin-bottom: 10px;
}

.pal-shopping-toolbar .pal-secondary-button {
	width: 100%;
}

.pal-shopping-groups {
	display: grid;
	gap: 10px;
}

.pal-shopping-group {
	padding: 14px;
	border: 1px solid #e4ebe1;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(36,73,40,.035);
}

.pal-shopping-group h2 {
	margin: 0 0 9px;
	color: #304533;
	font-size: 14px;
	letter-spacing: -.02em;
}

.pal-shopping-items {
	display: grid;
	gap: 6px;
}

.pal-shopping-item {
	display: grid;
	grid-template-columns: 34px 1fr auto;
	gap: 9px;
	align-items: center;
	padding: 9px 10px;
	border: 1px solid #e7ede4;
	border-radius: 13px;
	background: #fafcf9;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}

.pal-shopping-item.is-checked {
	background: #eef8e9;
	border-color: rgba(85,169,25,.25);
}

.pal-shopping-check {
	width: 31px;
	height: 31px;
	display: grid;
	place-items: center;
	border: 1px solid #d7e3d4;
	border-radius: 10px;
	background: #fff;
	color: transparent;
	font-size: 13px;
	font-weight: 900;
}

.pal-shopping-item.is-checked .pal-shopping-check {
	background: var(--pal-green);
	border-color: var(--pal-green);
	color: #fff;
}

.pal-shopping-item__body strong {
	display: block;
	color: #35483a;
	font-size: 11px;
	line-height: 1.35;
}

.pal-shopping-item.is-checked .pal-shopping-item__body strong {
	text-decoration: line-through;
	opacity: .68;
}

.pal-shopping-item__body span {
	display: block;
	margin-top: 2px;
	color: var(--pal-muted);
	font-size: 8px;
}

.pal-shopping-use-count {
	min-width: 36px;
	padding: 4px 6px;
	border-radius: 999px;
	background: #f0f3ef;
	color: #717c73;
	font-size: 8px;
	font-weight: 850;
	text-align: center;
}

.pal-shopping-empty {
	padding: 18px;
	border: 1px dashed #dce6d9;
	border-radius: 15px;
	background: #f9fbf8;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.45;
	text-align: center;
}

@media (max-width: 520px) {
	.pal-free-plan-actions--food {
		grid-template-columns: 1fr 1fr;
	}

	.pal-free-plan-actions--food > :last-child {
		grid-column: 1 / -1;
	}

	.pal-shopping-head {
		padding: 18px 15px;
	}

	.pal-shopping-group {
		padding: 12px;
	}
}


/* PAL ALPHA 26 ADMIN ACCESS */

.pal-admin-button {
	display: grid;
	place-items: center;
	text-decoration: none !important;
	color: #5d6470;
}

.pal-admin-button:hover,
.pal-admin-button:focus {
	color: var(--pal-blue);
	background: #f5f9ff;
	border-color: #d7e4f1;
}

.pal-admin-button:active {
	transform: scale(.96);
}

.pal-admin-button,
.pal-owner-button,
.pal-logout-button {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

/* Four actions can be tight on smaller phones. For real admins, the
 * placeholder notification control is less important than Owner/Admin/Logout. */
@media (max-width: 430px) {
	.pal-topbar--admin .pal-notification-button {
		display: none;
	}

	.pal-topbar--admin .pal-logo {
		max-width: 165px;
	}

	.pal-topbar--admin .pal-topbar-actions {
		gap: 5px;
	}
}

@media (max-width: 360px) {
	.pal-topbar--admin .pal-logo {
		max-width: 145px;
	}

	.pal-topbar--admin .pal-topbar-actions .pal-icon-button {
		width: 36px;
		height: 36px;
	}
}


/* PAL ALPHA 27 MEAL SWAP */

.pal-meal-row {
	position: relative;
	padding-right: 74px;
}

.pal-meal-swap {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	min-width: 58px;
	min-height: 31px;
	padding: 6px 8px;
	border: 1px solid #dbe5d7;
	border-radius: 10px;
	background: #fff;
	color: var(--pal-blue);
	font-size: 9px;
	font-weight: 850;
	cursor: pointer;
	touch-action: manipulation;
}

.pal-meal-swap:hover,
.pal-meal-swap:focus {
	background: #f5f9ff;
	border-color: #d5e2ef;
}

.pal-meal-swap:disabled {
	opacity: .55;
	cursor: wait;
}

.pal-meal-row.is-swapping {
	opacity: .62;
}

@media (max-width: 560px) {
	.pal-meal-row {
		padding-right: 66px;
	}

	.pal-meal-swap {
		min-width: 52px;
		font-size: 8px;
	}
}


/* PAL ALPHA 29 WEEKLY REVIEW */

.pal-week-head__actions {
	display: grid;
	gap: 6px;
	justify-items: end;
}

.pal-review-view {
	padding: 2px 0 10px;
}

.pal-review-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 12px;
	padding: 21px 19px;
	border: 1px solid rgba(18,102,195,.16);
	border-radius: 24px;
	background:
		radial-gradient(circle at 90% 8%, rgba(18,102,195,.12), transparent 28%),
		linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
}

.pal-review-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-review-head p:last-child {
	max-width: 520px;
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
	line-height: 1.45;
}

.pal-review-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: 8px;
	margin-bottom: 11px;
}

.pal-review-metrics article {
	padding: 13px 8px;
	border: 1px solid var(--pal-border);
	border-radius: 15px;
	background: #fff;
	text-align: center;
}

.pal-review-metrics span,
.pal-review-metrics small {
	display: block;
	color: var(--pal-muted);
	font-size: 8px;
	font-weight: 750;
}

.pal-review-metrics strong {
	display: block;
	margin: 5px 0 2px;
	color: #233c28;
	font-size: clamp(18px, 4.6vw, 25px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-review-card {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 12px;
	padding: 16px;
	border: 1px solid #e1e8de;
	border-radius: 19px;
	background: #fff;
	box-shadow: 0 7px 20px rgba(36,73,40,.045);
}

.pal-review-status-icon {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border-radius: 15px;
	background: #eef4ff;
	color: var(--pal-blue);
	font-size: 21px;
	font-weight: 900;
}

.pal-review-card h2 {
	margin: 0;
	color: #293f2d;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: -.025em;
}

.pal-review-card p:last-child {
	margin: 6px 0 0;
	color: var(--pal-muted);
	font-size: 11px;
	line-height: 1.5;
}

.pal-review-card[data-status="on_track"] .pal-review-status-icon,
.pal-review-card[data-status="stable"] .pal-review-status-icon {
	background: #eaf8e3;
	color: var(--pal-green-dark);
}

.pal-review-card[data-status="fast"] .pal-review-status-icon,
.pal-review-card[data-status="up"] .pal-review-status-icon {
	background: #fff1e8;
	color: #a65b27;
}

.pal-review-card[data-status="slow"] .pal-review-status-icon,
.pal-review-card[data-status="flat"] .pal-review-status-icon,
.pal-review-card[data-status="moving"] .pal-review-status-icon {
	background: #fff7df;
	color: #9a7316;
}

.pal-review-action,
.pal-review-rule {
	margin-top: 10px;
	padding: 14px 15px;
	border-radius: 16px;
}

.pal-review-action {
	border: 1px solid rgba(85,169,25,.18);
	background: #f4faef;
}

.pal-review-rule {
	border: 1px solid #e6e9e2;
	background: #fafbf9;
}

.pal-review-action strong,
.pal-review-rule strong {
	display: block;
	color: #334738;
	font-size: 12px;
}

.pal-review-action p,
.pal-review-rule p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.48;
}

@media (max-width: 430px) {
	.pal-review-head {
		padding: 18px 15px;
	}

	.pal-review-metrics {
		gap: 6px;
	}

	.pal-review-metrics article {
		padding-left: 5px;
		padding-right: 5px;
	}

	.pal-week-head__actions {
		min-width: 88px;
	}
}


/* PAL ALPHA 30 PLAN HISTORY */

.pal-history-view {
	padding: 2px 0 10px;
}

.pal-history-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 12px;
	padding: 21px 19px;
	border: 1px solid rgba(85,169,25,.17);
	border-radius: 24px;
	background:
		radial-gradient(circle at 91% 8%, rgba(85,169,25,.14), transparent 28%),
		linear-gradient(135deg, #fff 0%, #f6fbf2 100%);
}

.pal-history-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-history-head p:last-child {
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
}

.pal-history-list {
	display: grid;
	gap: 9px;
}

.pal-history-item {
	display: grid;
	grid-template-columns: 46px 1fr auto;
	gap: 11px;
	align-items: center;
	padding: 12px;
	border: 1px solid #e2e9df;
	border-radius: 17px;
	background: #fff;
	box-shadow: 0 5px 16px rgba(36,73,40,.035);
}

.pal-history-item.is-current {
	border-color: rgba(85,169,25,.30);
	background: #fbfef9;
}

.pal-history-icon {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: #f0f6ec;
	font-size: 20px;
}

.pal-history-item__body strong {
	display: block;
	color: #314536;
	font-size: 12px;
	line-height: 1.35;
}

.pal-history-item__body p {
	margin: 3px 0 0;
	color: var(--pal-muted);
	font-size: 9px;
	line-height: 1.35;
}

.pal-history-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.pal-history-chip {
	display: inline-flex;
	align-items: center;
	min-height: 20px;
	padding: 3px 7px;
	border-radius: 999px;
	background: #eef2ed;
	color: #6c776e;
	font-size: 8px;
	font-weight: 800;
}

.pal-history-chip.is-current {
	background: #e6f6df;
	color: var(--pal-green-dark);
}

.pal-history-open {
	min-width: 68px;
	min-height: 36px;
	padding: 7px 9px;
	border: 1px solid #d7e3d4;
	border-radius: 11px;
	background: #fff;
	color: var(--pal-blue);
	font-size: 9px;
	font-weight: 850;
	cursor: pointer;
	touch-action: manipulation;
}

.pal-history-note {
	margin-top: 11px;
	padding: 13px 14px;
	border: 1px solid #e6e9e2;
	border-radius: 15px;
	background: #fafbf9;
}

.pal-history-note strong {
	display: block;
	color: #35483a;
	font-size: 11px;
}

.pal-history-note p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 9px;
	line-height: 1.45;
}

.pal-history-empty {
	padding: 20px;
	border: 1px dashed #d9e3d6;
	border-radius: 16px;
	background: #fafcf9;
	color: var(--pal-muted);
	text-align: center;
	font-size: 11px;
	line-height: 1.5;
}

.pal-generated-plan-readonly {
	margin: 0 0 10px;
	padding: 9px 11px;
	border-radius: 12px;
	background: #f4f5f3;
	color: #6e776f;
	font-size: 9px;
	font-weight: 750;
}

@media (max-width: 430px) {
	.pal-history-head {
		padding: 18px 15px;
	}

	.pal-history-item {
		grid-template-columns: 42px 1fr;
	}

	.pal-history-icon {
		width: 42px;
		height: 42px;
	}

	.pal-history-open {
		grid-column: 1 / -1;
		width: 100%;
	}
}


/* PAL ALPHA 31 NEXT WEEK PLANNER */

.pal-review-head__actions,
.pal-plans-head__actions {
	display: grid;
	gap: 6px;
	justify-items: end;
}

.pal-next-week-view {
	padding: 2px 0 10px;
}

.pal-next-week-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin: 2px 0 12px;
	padding: 21px 19px;
	border: 1px solid rgba(85,169,25,.17);
	border-radius: 24px;
	background:
		radial-gradient(circle at 91% 8%, rgba(85,169,25,.14), transparent 28%),
		linear-gradient(135deg, #fff 0%, #f6fbf2 100%);
}

.pal-next-week-head h1 {
	margin: 0;
	font-size: clamp(30px, 7vw, 42px);
	line-height: 1;
	letter-spacing: -.04em;
}

.pal-next-week-head p:last-child {
	margin: 9px 0 0;
	color: var(--pal-muted);
	font-size: 12px;
}

.pal-next-week-guidance,
.pal-next-week-rule {
	padding: 14px 15px;
	border-radius: 16px;
}

.pal-next-week-guidance {
	margin-bottom: 10px;
	border: 1px solid rgba(18,102,195,.15);
	background: #f5f9ff;
}

.pal-next-week-guidance strong,
.pal-next-week-rule strong {
	display: block;
	color: #334738;
	font-size: 12px;
}

.pal-next-week-guidance p,
.pal-next-week-rule p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.48;
}

.pal-next-week-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 10px;
}

.pal-next-week-card {
	padding: 14px;
	border: 1px solid #e1e8de;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(36,73,40,.035);
}

.pal-next-week-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.pal-next-week-card__head > div {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pal-next-week-card__head h2 {
	margin: 0;
	color: #304533;
	font-size: 14px;
}

.pal-next-week-icon {
	width: 35px;
	height: 35px;
	display: grid;
	place-items: center;
	border-radius: 11px;
	background: #f1f7ed;
	font-size: 16px;
}

.pal-next-week-current {
	min-height: 36px;
	margin: 10px 0;
	color: var(--pal-muted);
	font-size: 10px;
	line-height: 1.45;
}

.pal-next-week-draft {
	margin: 10px 0;
}

.pal-next-week-draft-card {
	padding: 10px;
	border: 1px solid rgba(85,169,25,.22);
	border-radius: 13px;
	background: #f5fbf1;
}

.pal-next-week-draft-card strong {
	display: block;
	color: var(--pal-green-dark);
	font-size: 10px;
}

.pal-next-week-draft-card p {
	margin: 4px 0 0;
	color: var(--pal-muted);
	font-size: 9px;
	line-height: 1.4;
}

.pal-next-week-draft-actions,
.pal-next-week-actions {
	display: grid;
	gap: 6px;
}

.pal-next-week-draft-actions {
	grid-template-columns: repeat(3, minmax(0,1fr));
	margin-top: 8px;
}

.pal-next-week-draft-actions button {
	min-height: 34px;
	padding: 6px 7px;
	border-radius: 10px;
	font-size: 8px;
	font-weight: 850;
	cursor: pointer;
	touch-action: manipulation;
}

.pal-next-week-preview {
	border: 1px solid #d7e3d4;
	background: #fff;
	color: var(--pal-blue);
}

.pal-next-week-activate {
	border: 1px solid var(--pal-green);
	background: var(--pal-green);
	color: #fff;
}

.pal-next-week-discard {
	border: 1px solid #e4dddd;
	background: #fff;
	color: #876666;
}

.pal-next-week-rule {
	margin-top: 10px;
	border: 1px solid #e6e9e2;
	background: #fafbf9;
}

@media (max-width: 650px) {
	.pal-next-week-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 430px) {
	.pal-next-week-head {
		padding: 18px 15px;
	}

	.pal-review-head__actions,
	.pal-plans-head__actions {
		min-width: 82px;
	}

	.pal-next-week-draft-actions {
		grid-template-columns: 1fr 1fr;
	}

	.pal-next-week-discard {
		grid-column: 1 / -1;
	}
}


/* PAL ALPHA 32 TRAINING PERSONALIZATION */

.pal-exercise-row {
	position: relative;
	padding-right: 72px;
}

.pal-exercise-swap {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	min-width: 56px;
	min-height: 31px;
	padding: 6px 8px;
	border: 1px solid #d9e3d6;
	border-radius: 10px;
	background: #fff;
	color: var(--pal-blue);
	font-size: 8px;
	font-weight: 850;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.pal-exercise-swap:hover,
.pal-exercise-swap:focus {
	background: #f5f9ff;
	border-color: #d3e0ed;
}

.pal-exercise-swap:disabled,
.pal-exercise-row.is-swapping {
	opacity: .58;
}

@media (max-width: 430px) {
	.pal-exercise-row {
		padding-right: 64px;
	}

	.pal-exercise-swap {
		min-width: 50px;
	}
}


/* PAL ALPHA 33 ALLERGEN SAFETY */

.pal-allergy-field {
	padding-top: 4px;
}

.pal-allergy-picker {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 7px;
	margin-top: 7px;
}

.pal-allergy-picker label {
	position: relative;
	cursor: pointer;
}

.pal-allergy-picker input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.pal-allergy-picker span {
	min-height: 40px;
	display: flex;
	align-items: center;
	padding: 8px 10px;
	border: 1px solid #dfe7dc;
	border-radius: 12px;
	background: #fff;
	color: #58655b;
	font-size: 9px;
	font-weight: 800;
	line-height: 1.25;
	transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.pal-allergy-picker input:checked + span {
	border-color: #d9a24c;
	background: #fff6e7;
	color: #7c5417;
	box-shadow: inset 0 0 0 1px rgba(217,162,76,.12);
}

.pal-allergy-picker input:focus-visible + span {
	outline: 2px solid rgba(18,102,195,.28);
	outline-offset: 2px;
}

.pal-allergy-warning {
	margin: 2px 0 14px;
	padding: 12px 13px;
	border: 1px solid #efd9b8;
	border-radius: 14px;
	background: #fff9ef;
}

.pal-allergy-warning strong {
	display: block;
	color: #79531b;
	font-size: 11px;
}

.pal-allergy-warning p {
	margin: 4px 0 0;
	color: #7d6b50;
	font-size: 9px;
	line-height: 1.5;
}

@media (max-width: 390px) {
	.pal-allergy-picker {
		grid-template-columns: 1fr;
	}
}


/* PAL ALPHA 34 MEAL LEARNING */

.pal-meal-row {
	padding-right: 78px;
}

.pal-meal-feedback {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.pal-meal-feedback button {
	min-height: 28px;
	padding: 5px 8px;
	border: 1px solid #dfe6dc;
	border-radius: 999px;
	background: #fff;
	color: #6a756c;
	font-size: 8px;
	font-weight: 850;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.pal-meal-feedback button[data-state="like"].is-active {
	border-color: rgba(85,169,25,.35);
	background: #edf8e8;
	color: var(--pal-green-dark);
}

.pal-meal-feedback button[data-state="avoid"].is-active {
	border-color: #eccccc;
	background: #fff1f1;
	color: #9b4d4d;
}

.pal-meal-feedback button:disabled {
	opacity: .55;
	cursor: wait;
}

.pal-meal-feedback-note {
	margin-top: 4px;
	color: var(--pal-muted);
	font-size: 8px;
	line-height: 1.35;
}

@media (max-width: 430px) {
	.pal-meal-row {
		padding-right: 66px;
	}

	.pal-meal-feedback button {
		min-height: 30px;
		padding: 6px 9px;
	}
}
