:root {
	--bg: #0f172a;
	--card: #111827;
	--muted: #94a3b8;
	--text: #e5e7eb;
	--accent: #2563eb;
	--ok: #22c55e;
	--safe-area-inset-top: env(safe-area-inset-top);
	--safe-area-inset-bottom: env(safe-area-inset-bottom);
	--safe-area-inset-left: env(safe-area-inset-left);
	--safe-area-inset-right: env(safe-area-inset-right);
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	min-height: 100vh;
}

html {
	background: linear-gradient(180deg, #0b1220, #0f172a);
	background-attachment: fixed;
}

body {
	margin: 0;
	background: linear-gradient(180deg, #0b1220, #0f172a);
	background-attachment: fixed;
	color: var(--text);
	font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.app {
	max-width: 720px;
	margin: 0 auto;
	padding: 16px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Desktop breathing room for 4-up card grids */
@media (min-width: 1024px) {
	.app {
		max-width: 1100px;
	}
}

.header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.header h1 {
	font-size: 22px;
	margin: 0;
}

.card {
	background: rgba(17, 24, 39, 0.7);
	border: 1px solid rgba(148, 163, 184, 0.12);
	border-radius: 14px;
	padding: 16px;
	backdrop-filter: blur(6px);
}

.input-row {
	display: grid;
	gap: 12px;
	margin-top: 12px;
}

input[type="date"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: #0b1020;
	color: var(--text);
}

button {
	cursor: pointer;
	border: 0;
	border-radius: 10px;
	padding: 10px 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
}

.btn-primary {
	background: var(--accent);
	color: white;
}

.btn-ghost {
	background: rgba(148, 163, 184, 0.12);
	color: var(--text);
}

.title {
	font-size: 28px;
	font-weight: 800;
	margin: 0 0 6px;
}

.subtle {
	color: var(--muted);
}

.progress {
	display: grid;
	gap: 6px;
	margin: 14px 0;
}

.progress-bar {
	height: 10px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.2);
	overflow: hidden;
}

.progress-bar>span {
	display: block;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--ok), #84cc16);
	transition: width 800ms ease-in-out;
	border-radius: inherit;
}

.section {
	margin-top: 18px;
}

.section h3 {
	margin: 0 0 6px;
	font-size: 18px;
}

.tips {
	display: grid;
	gap: 8px;
}

.tip {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 8px;
}

.tip-bullet {
	font-weight: 800;
}

main {
	flex: 1;
}

.footer {
	margin: 18px 0 8px;
	margin-top: auto;
	padding: 12px;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.footer-detailed {
	padding: 24px 20px;
	text-align: left;
}

.footer-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.footer-disclaimer {
	text-align: center;
	margin-bottom: 8px;
}

.footer-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
}

.footer-location,
.footer-social,
.footer-copyright {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

.footer-social {
	gap: 16px;
}

.footer-link {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.footer-link:hover {
	color: var(--accent);
}

.footer-icon {
	font-size: 14px;
	line-height: 1;
}

@media (min-width: 768px) {
	.footer-info {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	
	.footer-disclaimer {
		text-align: left;
		margin-bottom: 0;
	}
}

/* Login Page Styles */
.login-card {
	max-width: 400px;
	margin: 0 auto;
}

.login-header {
	text-align: center;
	margin-bottom: 24px;
}

.login-form {
	display: grid;
	gap: 16px;
}

.input-group {
	display: grid;
	gap: 6px;
}

.input-group label {
	font-weight: 600;
	color: var(--text);
}

.input-group input {
	padding: 12px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: #0b1020;
	color: var(--text);
	font-size: 16px;
}

.input-group input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.input-group input.error {
	border-color: #ef4444;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px;
	font-size: 16px;
	margin-top: 8px;
}

.btn-icon {
	font-size: 18px;
}

.login-footer {
	margin-top: 24px;
	text-align: center;
}

.error-message {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	color: #fca5a5;
	padding: 12px;
	border-radius: 8px;
	margin-top: 16px;
	text-align: center;
}

/* Home Page Styles */
.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.user-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-name {
	font-weight: 600;
	color: var(--text);
}

.logout-btn {
	padding: 6px 12px;
	font-size: 14px;
}

.home-container {
	display: grid;
	gap: 20px;
}

.welcome-card {
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(34, 197, 94, 0.1));
	border: 1px solid rgba(37, 99, 235, 0.2);
}

.welcome-content {
	text-align: center;
}

.welcome-title {
	font-size: 32px;
	margin: 0 0 8px;
	background: linear-gradient(135deg, var(--accent), var(--ok));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.welcome-subtitle {
	font-size: 18px;
	color: var(--muted);
	margin: 0 0 20px;
}

.progress-section {
	margin-top: 20px;
}

.progress-text {
	margin: 8px 0 0;
	font-size: 14px;
	color: var(--muted);
}

.fruit-card {
	overflow: hidden;
}

.fruit-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: center;
}

.fruit-image {
	text-align: center;
}

.fruit-img {
	width: 100%;
	max-width: 200px;
	height: 200px;
	object-fit: cover;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Fruit sprite (uses fruitpictures.png sheet) */
.fruit-sprite {
	width: 100%;
	max-width: 200px;
	height: 200px;
	margin: 0 auto;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	background-color: rgba(255, 255, 255, 0.04);
	/* crop a single cell from the sprite */
	overflow: hidden;
}

.fruit-info h3 {
	margin: 0 0 12px;
	font-size: 20px;
}

.fruit-description {
	color: var(--muted);
	line-height: 1.5;
}

.tips-preview h3 {
	margin: 0 0 16px;
}

.tips-grid {
	display: grid;
	gap: 12px;
	margin-bottom: 20px;
}

.quick-tip {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 12px;
	align-items: start;
}

.tip-text {
	color: var(--muted);
	line-height: 1.4;
}

.view-details-btn {
	width: 100%;
	padding: 12px;
	font-size: 16px;
}

.navigation-cards h3 {
	margin: 0 0 16px;
}

.nav-grid {
	display: grid;
	/* Four cards side-by-side on home (Progress, Weekly, Journal, Tips) */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.nav-card {
	background: rgba(148, 163, 184, 0.05);
	border: 1px solid rgba(148, 163, 184, 0.1);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.nav-card:hover {
	background: rgba(148, 163, 184, 0.1);
	border-color: rgba(148, 163, 184, 0.2);
	transform: translateY(-2px);
}

.nav-icon {
	font-size: 24px;
	margin-bottom: 8px;
}

.nav-card h4 {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
}

.nav-card p {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.3;
}

/* Journal Styles */
.journal-container {
	display: grid;
	gap: 20px;
}

.new-entry-card h2 {
	margin: 0 0 16px;
}

.journal-form {
	display: grid;
	gap: 16px;
}

.journal-form textarea {
	padding: 12px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: #0b1020;
	color: var(--text);
	font-size: 16px;
	min-height: 120px;
	resize: vertical;
	font-family: inherit;
}

.journal-form select {
	padding: 12px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: #0b1020;
	color: var(--text);
	font-size: 16px;
}

.entries-list {
	display: grid;
	gap: 16px;
}

.journal-entry {
	background: rgba(148, 163, 184, 0.05);
	border: 1px solid rgba(148, 163, 184, 0.1);
	border-radius: 12px;
	padding: 16px;
}

.entry-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.entry-meta {
	display: flex;
	gap: 12px;
	font-size: 14px;
	color: var(--muted);
}

.entry-week {
	font-weight: 600;
	color: var(--accent);
}

.entry-mood {
	font-size: 20px;
}

.entry-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 600;
}

.entry-content {
	line-height: 1.5;
	margin-bottom: 12px;
	color: var(--text);
}

.entry-actions {
	display: flex;
	gap: 8px;
}

.delete-entry {
	padding: 6px 12px;
	font-size: 14px;
}

.empty-state {
	text-align: center;
	padding: 40px 20px;
	color: var(--muted);
}

.empty-icon {
	font-size: 48px;
	margin-bottom: 16px;
}

/* Progress Styles */
.progress-container {
	display: grid;
	gap: 20px;
}

.progress-main h2 {
	margin: 0 0 20px;
	text-align: center;
}

.progress-overview {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 24px;
	align-items: center;
}

.progress-circle {
	position: relative;
	width: 120px;
	height: 120px;
}

.circle-bg {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(148, 163, 184, 0.2);
	position: relative;
	overflow: hidden;
}

.circle-fill {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: conic-gradient(var(--accent) 0deg, var(--accent) calc(var(--progress) * 360deg), transparent calc(var(--progress) * 360deg));
	transition: all 0.3s ease;
}

.circle-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
}

.progress-percent {
	display: block;
	font-size: 24px;
	font-weight: 800;
	color: var(--text);
}

.progress-label {
	font-size: 12px;
	color: var(--muted);
}

.progress-info h3 {
	margin: 0 0 8px;
	font-size: 24px;
}

.progress-subtitle {
	margin: 0 0 12px;
	color: var(--muted);
	font-size: 16px;
}

.progress-description {
	margin: 0;
	line-height: 1.5;
	color: var(--text);
}

.milestones-grid {
	display: grid;
	gap: 12px;
}

.milestone {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 12px;
	background: rgba(148, 163, 184, 0.05);
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.1);
}

.milestone.completed {
	background: rgba(34, 197, 94, 0.1);
	border-color: rgba(34, 197, 94, 0.2);
}

.milestone-icon {
	font-size: 24px;
}

.milestone-title {
	font-weight: 600;
	margin-bottom: 2px;
}

.milestone-week {
	font-size: 14px;
	color: var(--muted);
}

.milestone-status {
	font-size: 18px;
}

.weeks-timeline {
	display: grid;
	grid-template-columns: repeat(20, 1fr);
	gap: 4px;
	margin-top: 16px;
}

.week-dot {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.week-dot.completed {
	background: var(--ok);
	color: white;
}

.week-dot.current {
	background: var(--accent);
	color: white;
	transform: scale(1.2);
}

.week-dot.upcoming {
	background: rgba(148, 163, 184, 0.2);
	color: var(--muted);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 16px;
}

.stat-item {
	text-align: center;
	padding: 16px;
	background: rgba(148, 163, 184, 0.05);
	border-radius: 8px;
}

.stat-number {
	font-size: 24px;
	font-weight: 800;
	color: var(--accent);
	margin-bottom: 4px;
}

.stat-label {
	font-size: 12px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Tips Styles */
.tips-container {
	display: grid;
	gap: 20px;
}

.tips-section {
	padding: 20px;
}

.section-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.section-icon {
	font-size: 24px;
}

.section-header h2 {
	margin: 0;
	font-size: 20px;
}

.tips-grid {
	display: grid;
	gap: 12px;
}

.tip-item {
	padding: 12px 16px;
	background: rgba(148, 163, 184, 0.05);
	border-radius: 8px;
	border-left: 3px solid var(--accent);
	font-size: 14px;
	line-height: 1.4;
}

/* Landing Page Styles */
.landing-container {
	display: grid;
	gap: 20px;
}

.hero-section {
	background: transparent;
	border: none;
	text-align: center;
	padding: 30px 20px 20px;
	margin-bottom: 10px;
}

.hero-title {
	font-size: 3rem;
	font-weight: 800;
	margin: 0 0 12px;
	background: linear-gradient(135deg, var(--accent), var(--ok));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1.1;
	filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.2));
}

.hero-subtitle {
	font-size: 1.125rem;
	color: var(--muted);
	margin: 0 auto 24px;
	line-height: 1.6;
	max-width: 600px;
}

/* Actions section removed - styles kept for potential future use or other pages */

.btn-lg {
	padding: 16px 32px;
	font-size: 1.125rem;
	font-weight: 700;
	border-radius: 12px;
	letter-spacing: 0.5px;
}

.btn-outline {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.3);
	color: var(--text);
}

.btn-outline:hover {
	background: rgba(148, 163, 184, 0.1);
	border-color: var(--text);
}

/* Floating Sneak Peek Bubble */
.sneak-peek-bubble {
	position: fixed;
	right: 20px;
	top: 40%;
	transform: translateY(-50%);
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: rgba(37, 99, 235, 0.15);
	border: 2px solid rgba(37, 99, 235, 0.3);
	color: var(--text);
	font-size: 36px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	transition: all 0.3s ease;
	backdrop-filter: blur(8px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	animation: pulseGlow 2s ease-in-out infinite,
			   strongPulse 4s ease-in-out infinite;
}

@keyframes pulseGlow {
	0%, 100% {
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 20px rgba(37, 99, 235, 0.3),
					0 0 30px rgba(37, 99, 235, 0.2);
		transform: translateY(-50%) scale(1);
	}
	50% {
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 30px rgba(37, 99, 235, 0.5),
					0 0 50px rgba(37, 99, 235, 0.3),
					0 0 70px rgba(37, 99, 235, 0.2);
		transform: translateY(-50%) scale(1.05);
	}
}

@keyframes strongPulse {
	/* Slow strong pulse (0-50%) */
	0% {
		transform: translateY(-50%) scale(1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 20px rgba(37, 99, 235, 0.3),
					0 0 30px rgba(37, 99, 235, 0.2);
	}
	25% {
		transform: translateY(-50%) scale(1.2);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 50px rgba(37, 99, 235, 1),
					0 0 90px rgba(37, 99, 235, 0.8),
					0 0 120px rgba(37, 99, 235, 0.6),
					0 0 150px rgba(37, 99, 235, 0.4);
	}
	50% {
		transform: translateY(-50%) scale(1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 20px rgba(37, 99, 235, 0.3),
					0 0 30px rgba(37, 99, 235, 0.2);
	}
	/* First small pulse (50-66.67%) */
	58.33% {
		transform: translateY(-50%) scale(1.1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 35px rgba(37, 99, 235, 0.7),
					0 0 60px rgba(37, 99, 235, 0.5),
					0 0 85px rgba(37, 99, 235, 0.3);
	}
	66.67% {
		transform: translateY(-50%) scale(1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 20px rgba(37, 99, 235, 0.3),
					0 0 30px rgba(37, 99, 235, 0.2);
	}
	/* Second small pulse (66.67-83.33%) */
	75% {
		transform: translateY(-50%) scale(1.1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 35px rgba(37, 99, 235, 0.7),
					0 0 60px rgba(37, 99, 235, 0.5),
					0 0 85px rgba(37, 99, 235, 0.3);
	}
	83.33%, 100% {
		transform: translateY(-50%) scale(1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
					0 0 20px rgba(37, 99, 235, 0.3),
					0 0 30px rgba(37, 99, 235, 0.2);
	}
}

.sneak-peek-tooltip {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	background: rgba(17, 24, 39, 0.95);
	color: var(--text);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 13px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
	backdrop-filter: blur(8px);
	border: 1px solid rgba(148, 163, 184, 0.2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sneak-peek-tooltip::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border: 6px solid transparent;
	border-left-color: rgba(17, 24, 39, 0.95);
}

.sneak-peek-bubble:hover .sneak-peek-tooltip,
.sneak-peek-bubble:focus .sneak-peek-tooltip {
	opacity: 1;
	transform: translateY(-50%) translateX(-4px);
}

.sneak-peek-bubble:hover {
	background: rgba(37, 99, 235, 0.25);
	border-color: var(--accent);
	transform: translateY(-50%) scale(1.15);
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3),
				0 0 40px rgba(37, 99, 235, 0.6),
				0 0 60px rgba(37, 99, 235, 0.4);
	animation: none;
}

.sneak-peek-bubble:focus {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.sneak-peek-bubble:active {
	transform: translateY(-50%) scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
	.sneak-peek-bubble {
		transition: none;
		animation: none;
		top: 40%;
	}
	
	.sneak-peek-bubble:hover {
		transform: translateY(-50%);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	}
}

/* Mobile positioning for bubble */
@media (max-width: 768px) {
	.sneak-peek-bubble {
		right: 16px;
		bottom: calc(80px + var(--safe-area-inset-bottom, 0px));
		top: auto;
		transform: none;
		width: 70px;
		height: 70px;
		font-size: 32px;
		animation: pulseGlowMobile 2s ease-in-out infinite,
				   strongPulseMobile 4s ease-in-out infinite;
	}
	
	@keyframes pulseGlowMobile {
		0%, 100% {
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 20px rgba(37, 99, 235, 0.3),
						0 0 30px rgba(37, 99, 235, 0.2);
			transform: scale(1);
		}
		50% {
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 30px rgba(37, 99, 235, 0.5),
						0 0 50px rgba(37, 99, 235, 0.3),
						0 0 70px rgba(37, 99, 235, 0.2);
			transform: scale(1.05);
		}
	}
	
	@keyframes strongPulseMobile {
		/* Slow strong pulse (0-50%) */
		0% {
			transform: scale(1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 20px rgba(37, 99, 235, 0.3),
						0 0 30px rgba(37, 99, 235, 0.2);
		}
		25% {
			transform: scale(1.2);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 50px rgba(37, 99, 235, 1),
						0 0 90px rgba(37, 99, 235, 0.8),
						0 0 120px rgba(37, 99, 235, 0.6),
						0 0 150px rgba(37, 99, 235, 0.4);
		}
		50% {
			transform: scale(1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 20px rgba(37, 99, 235, 0.3),
						0 0 30px rgba(37, 99, 235, 0.2);
		}
		/* First small pulse (50-66.67%) */
		58.33% {
			transform: scale(1.1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 35px rgba(37, 99, 235, 0.7),
						0 0 60px rgba(37, 99, 235, 0.5),
						0 0 85px rgba(37, 99, 235, 0.3);
		}
		66.67% {
			transform: scale(1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 20px rgba(37, 99, 235, 0.3),
						0 0 30px rgba(37, 99, 235, 0.2);
		}
		/* Second small pulse (66.67-83.33%) */
		75% {
			transform: scale(1.1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 35px rgba(37, 99, 235, 0.7),
						0 0 60px rgba(37, 99, 235, 0.5),
						0 0 85px rgba(37, 99, 235, 0.3);
		}
		83.33%, 100% {
			transform: scale(1);
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
						0 0 20px rgba(37, 99, 235, 0.3),
						0 0 30px rgba(37, 99, 235, 0.2);
		}
	}
	
	.sneak-peek-tooltip {
		right: auto;
		left: calc(100% + 12px);
		top: auto;
		bottom: 0;
		transform: none;
		white-space: normal;
		max-width: 140px;
		font-size: 12px;
		padding: 6px 10px;
	}
	
	.sneak-peek-tooltip::after {
		left: auto;
		right: 100%;
		top: 20px;
		transform: none;
		border-left-color: transparent;
		border-right-color: rgba(17, 24, 39, 0.95);
	}
	
	.sneak-peek-bubble:hover .sneak-peek-tooltip,
	.sneak-peek-bubble:focus .sneak-peek-tooltip {
		transform: translateX(4px);
	}
	
	.sneak-peek-bubble:hover {
		transform: scale(1.15);
		box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3),
					0 0 40px rgba(37, 99, 235, 0.6),
					0 0 60px rgba(37, 99, 235, 0.4);
		animation: none;
	}
	
	.sneak-peek-bubble:active {
		transform: scale(0.95);
	}
	
	@media (prefers-reduced-motion: reduce) {
		.sneak-peek-bubble {
			animation: none;
		}
		
		.sneak-peek-bubble:hover {
			transform: none;
			box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
		}
		
		.sneak-peek-bubble:hover .sneak-peek-tooltip,
		.sneak-peek-bubble:focus .sneak-peek-tooltip {
			transform: none;
		}
	}
}

.features-section {
	margin-top: 20px;
}

.features-section h3 {
	margin: 0 0 24px;
	text-align: center;
	font-size: 1.5rem;
	opacity: 0.8;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.feature-item {
	text-align: center;
	padding: 16px;
}

.feature-icon {
	font-size: 24px;
	margin-bottom: 8px;
}

.feature-item h4 {
	margin: 0 0 6px;
	font-size: 16px;
}

.feature-item p {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
	line-height: 1.4;
}

/* Feature Cards (for landing page CTAs) */
.feature-card {
	background: rgba(17, 24, 39, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.1);
	border-radius: 16px;
	padding: 24px;
	text-align: center;
	transition: all 0.3s ease;
	cursor: pointer;
	height: 100%;
	display: flex;
	flex-direction: column;
	backdrop-filter: blur(8px);
}

.feature-card:hover {
	background: rgba(37, 99, 235, 0.15);
	border-color: var(--accent);
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
}

.feature-card .feature-icon {
	font-size: 48px;
	margin-bottom: 16px;
	line-height: 1;
}

.feature-card h4 {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--text);
}

.feature-card p {
	margin: 0 0 16px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
}

.feature-card .feature-btn {
	width: 100%;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
}

.optional {
	color: var(--muted);
	font-size: 0.9em;
	font-weight: normal;
}

.required {
	color: #ef4444;
	font-weight: bold;
}

/* Modal Styles */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.modal.hidden {
	display: none;
}

.modal-content {
	background: var(--card);
	border-radius: 12px;
	padding: 24px;
	max-width: 400px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.modal-header h3 {
	margin: 0;
	font-size: 20px;
}

.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--muted);
	cursor: pointer;
	padding: 0;
	width: 30px;
}

.modal-body {
	margin-bottom: 20px;
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.close-btn:hover {
	color: var(--text);
}

.auth-form {
	display: grid;
	gap: 16px;
}

/* Image Upload Styles */
.image-preview {
	margin-top: 8px;
	text-align: center;
}

.image-preview.hidden {
	display: none;
}

.preview-image {
	max-width: 200px;
	max-height: 200px;
	border-radius: 8px;
	object-fit: cover;
}

.entry-image {
	margin: 12px 0;
	text-align: center;
}

.entry-image img {
	max-width: 100%;
	max-height: 300px;
	border-radius: 8px;
	object-fit: cover;
}

/* Journal Messages */
.journal-message {
	padding: 12px 16px;
	border-radius: 8px;
	margin: 16px 0;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	animation: slideIn 0.3s ease-out;
}

.journal-message-error {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.2);
	color: #dc2626;
}

.journal-message-success {
	background: rgba(34, 197, 94, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.2);
	color: #16a34a;
}

/* Error Message Styles */
.error-message {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.2);
	color: #dc2626;
	padding: 12px 16px;
	border-radius: 8px;
	margin: 16px 0;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	animation: slideIn 0.3s ease-out;
}

/* Input Error States */
.input-group input.error,
.input-group select.error,
.input-group textarea.error {
	border-color: #dc2626;
	background: rgba(239, 68, 68, 0.05);
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Loading States */
.btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-primary.loading {
	position: relative;
	color: transparent;
}

.btn-primary.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid transparent;
	border-top: 2px solid currentColor;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Character Counter */
.char-counter {
	text-align: right;
	font-size: 12px;
	color: var(--muted);
	margin-top: 4px;
}

.char-counter span {
	font-weight: 500;
}

/* Language Toggle */
.language-toggle {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
	display: flex;
	gap: 8px;
	background: rgba(17, 24, 39, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.2);
	border-radius: 12px;
	padding: 8px;
	backdrop-filter: blur(10px);
	transition: all 0.3s ease;
}

.language-toggle:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.lang-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: var(--text);
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 500;
}

.lang-btn:hover {
	background: rgba(148, 163, 184, 0.1);
}

.lang-btn.active {
	background: var(--accent);
	color: white;
}

.language-toggle .flag {
	font-size: 16px;
}

.language-toggle .lang-name {
	font-size: 12px;
}

/* Mobile language toggle */
@media (max-width: 768px) {
	.language-toggle {
		top: 10px;
		right: 10px;
		padding: 6px 8px;
	}

	.language-toggle button {
		padding: 4px 8px;
		font-size: 12px;
	}

	.language-toggle .lang-name {
		display: none;
	}
}

/* Sneak Peek Styles */
.sneakpeek-container {
	display: grid;
	gap: 20px;
}

.notice-card {
	background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.1));
	border: 1px solid rgba(255, 193, 7, 0.2);
}

.notice-content {
	text-align: center;
}

.notice-content h3 {
	margin: 0 0 12px;
	color: #f59e0b;
}

.notice-content p {
	margin: 0 0 16px;
	color: var(--muted);
}

.feature-list {
	text-align: left;
	margin: 0 0 20px;
	padding-left: 20px;
}

.feature-list li {
	margin-bottom: 8px;
	color: var(--text);
}

.create-account-btn {
	width: 100%;
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
	.fruit-content {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.nav-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.header-content {
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}

	.user-info {
		width: 100%;
		justify-content: space-between;
	}

	.progress-overview {
		grid-template-columns: 1fr;
		text-align: center;
		gap: 16px;
	}

	.weeks-timeline {
		grid-template-columns: repeat(10, 1fr);
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.entry-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.action-grid {
		grid-template-columns: 1fr;
	}

	.features-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.modal-content {
		width: 95%;
		padding: 20px;
	}
}

/* Additional Progress Page Styles */
.milestones-card h3,
.weekly-progress h3,
.stats-card h3 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 600;
}

.milestones-card,
.weekly-progress,
.stats-card {
	margin-bottom: 20px;
}

.weekly-progress .weeks-timeline {
	grid-template-columns: repeat(20, 1fr);
	gap: 4px;
	margin-top: 16px;
}

.lang-btn .flag {
	font-size: 16px;
}

.lang-btn .lang-name {
	font-weight: 500;
}

@media (max-width: 768px) {
	.language-toggle {
		top: 10px;
		right: 10px;
		padding: 6px;
	}

	.lang-btn {
		padding: 6px 8px;
		font-size: 12px;
	}

	.lang-btn .lang-name {
		display: none;
	}
}

/* Enhanced Mobile PWA Styles */
@media (max-width: 768px) {
	.app {
		padding: 12px;
		padding-top: calc(12px + var(--safe-area-inset-top));
		padding-bottom: calc(12px + var(--safe-area-inset-bottom));
		padding-left: calc(12px + var(--safe-area-inset-left));
		padding-right: calc(12px + var(--safe-area-inset-right));
	}

	.header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		margin-bottom: 16px;
	}

	.header h1 {
		font-size: 20px;
	}

	.card {
		padding: 12px;
		margin-bottom: 12px;
	}

	.title {
		font-size: 18px;
		line-height: 1.3;
	}

	.subtle {
		font-size: 14px;
	}

	.btn-primary,
	.btn-ghost {
		padding: 12px 16px;
		font-size: 16px;
		min-height: 44px;
		touch-action: manipulation;
	}

	.input-row {
		gap: 16px;
	}

	input[type="date"],
	input[type="text"],
	input[type="email"],
	textarea {
		font-size: 16px;
		padding: 12px;
		min-height: 44px;
	}

	.tip {
		padding: 8px 0;
	}

	.tip-bullet {
		width: 20px;
		height: 20px;
		font-size: 14px;
	}

	.section {
		margin: 16px 0;
	}

	.section h3 {
		font-size: 16px;
		margin-bottom: 8px;
	}

	.progress {
		margin: 16px 0;
	}

	.progress-bar {
		height: 8px;
	}

	/* Improve touch targets */
	button,
	a,
	input,
	textarea,
	select {
		min-height: 44px;
		min-width: 44px;
	}

	/* Better spacing for mobile */
	.tips {
		gap: 8px;
	}

	/* Modal improvements for mobile */
	.modal {
		padding: 16px;
		margin: 16px;
	}

	.modal-content {
		padding: 16px;
	}

	.modal-header {
		margin-bottom: 16px;
	}

	.modal-actions {
		flex-direction: column;
		gap: 12px;
	}

	.modal-actions button {
		width: 100%;
	}

	/* Navigation improvements */
	.nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background: var(--card);
		border-top: 1px solid rgba(148, 163, 184, 0.12);
		padding: 8px 16px;
		padding-bottom: calc(8px + var(--safe-area-inset-bottom));
		z-index: 100;
	}

	.nav-items {
		display: flex;
		justify-content: space-around;
		align-items: center;
	}

	.nav-item {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		padding: 8px;
		text-decoration: none;
		color: var(--muted);
		font-size: 12px;
		min-width: 44px;
		min-height: 44px;
		justify-content: center;
	}

	.nav-item.active {
		color: var(--accent);
	}

	.nav-item i {
		font-size: 18px;
	}

	/* Adjust main content for bottom navigation */
	.app {
		padding-bottom: calc(60px + var(--safe-area-inset-bottom));
	}
}

/* Global Navigation Component */
.global-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--card);
	border-top: 1px solid rgba(148, 163, 184, 0.12);
	padding: 8px 4px;
	padding-bottom: calc(8px + var(--safe-area-inset-bottom));
	z-index: 100;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.global-nav .nav-items {
	display: flex;
	justify-content: space-around;
	align-items: center;
	max-width: 100%;
}

.global-nav .nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px 4px;
	text-decoration: none;
	color: var(--muted);
	font-size: 11px;
	min-width: 44px;
	min-height: 44px;
	border-radius: 8px;
	transition: all 0.2s ease;
	flex: 1;
	max-width: 80px;
}

.global-nav .nav-item:hover,
.global-nav .nav-item:active {
	background: rgba(37, 99, 235, 0.1);
	color: var(--accent);
}

.global-nav .nav-item.active {
	color: var(--accent);
	font-weight: 600;
}

.global-nav .nav-item.clicked {
	transform: scale(0.95);
}

.global-nav .nav-icon {
	font-size: 20px;
	line-height: 1;
}

.global-nav .nav-label {
	font-size: 11px;
	line-height: 1.2;
	text-align: center;
}

/* Adjust main content for global navigation */
body:has(.global-nav) .app,
body:has(.global-nav) main {
	padding-bottom: calc(70px + var(--safe-area-inset-bottom));
}

/* Desktop: horizontal nav at top */
@media (min-width: 768px) {
	.global-nav {
		top: 0;
		bottom: auto;
		border-top: none;
		border-bottom: 1px solid rgba(148, 163, 184, 0.12);
		padding: 12px 24px;
		padding-top: calc(12px + var(--safe-area-inset-top));
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	}

	.global-nav .nav-items {
		max-width: 1200px;
		margin: 0 auto;
		justify-content: flex-start;
		gap: 8px;
		padding-right: 140px;
		/* Buffer space to prevent Journal tab from being covered by language toggle */
	}

	.global-nav .nav-item {
		flex-direction: row;
		gap: 8px;
		padding: 10px 16px;
		font-size: 14px;
		min-width: auto;
		max-width: none;
	}

	.global-nav .nav-icon {
		font-size: 18px;
	}

	.global-nav .nav-label {
		font-size: 14px;
	}

	body:has(.global-nav) .app,
	body:has(.global-nav) main {
		padding-top: calc(90px + var(--safe-area-inset-top));
		padding-bottom: 0;
	}
}

/* PWA specific styles */
@media (display-mode: standalone) {
	.header {
		padding-top: var(--safe-area-inset-top);
	}

	.app {
		padding-top: calc(16px + var(--safe-area-inset-top));
	}
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
	.header h1 {
		font-size: 18px;
	}

	.card {
		padding: 10px;
	}

	.title {
		font-size: 16px;
	}
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
	.card {
		border-width: 0.5px;
	}
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f172a;
		--card: #111827;
		--muted: #94a3b8;
		--text: #e5e7eb;
	}
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Cookie / local-storage banner */
.cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.95);
	color: #e5e7eb;
	padding: 0.75rem 1rem;
	box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.4);
}

/* Add padding to body/app to account for banner height so content isn't covered */
body:has(.cookie-banner) .app {
	padding-bottom: calc(80px + var(--safe-area-inset-bottom));
}

body:has(.cookie-banner) main {
	padding-bottom: calc(80px + var(--safe-area-inset-bottom));
}

.cookie-banner-content {
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	align-items: center;
	justify-content: space-between;
}

.cookie-banner-content p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
}

.cookie-banner-button {
	font-size: 0.95rem;
	padding: 0.5rem 1.1rem;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	white-space: nowrap;
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.cookie-banner-content {
		flex-wrap: nowrap;
	}

	.cookie-banner-content p {
		flex: 1;
	}
}