/* Share Your Life - Styles
   Vintage/Sepia Theme with Modern App Components
   ========================================= */

/* Reset and base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--sepia-dark: #3d2914;
	--sepia-medium: #6b4423;
	--sepia-light: #a67c52;
	--sepia-cream: #f5e6d3;
	--sepia-paper: #faf3e8;
	--sepia-aged: #e8dcc8;
	--sepia-shadow: rgba(61, 41, 20, 0.3);
	--ink-brown: #2c1810;
	--gold-accent: #c9a227;
	--gold-muted: #b8956e;
}

html { scroll-behavior: smooth; }

body {
	font-family: 'Crimson Text', Georgia, serif;
	background: var(--sepia-paper);
	color: var(--ink-brown);
	line-height: 1.7;
	font-size: 18px;
	overflow-x: hidden;
}

/* Grain overlay for entire page */
body::before {
	content: '';
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
	opacity: 0.03;
	pointer-events: none;
	z-index: 1000;
}

h1, h2, h3, h4, h5, h6 { margin-top: 0; line-height: 1.2; font-family: 'Playfair Display', serif; }
a { color: var(--sepia-medium); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER / NAV ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; background: rgba(245, 230, 211, 0.65); backdrop-filter: blur(8px); padding: 1.5rem 3rem; z-index: 100; box-shadow: 0 2px 8px rgba(61, 41, 20, 0.1); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; max-width: none; padding: 0; }

.site-header .logo {
	font-family: 'Playfair Display', serif;
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--sepia-dark);
	text-decoration: none;
	letter-spacing: 0.02em;
}

.site-header .logo:hover { text-decoration: none; }
.logo-accent { font-style: italic; color: var(--sepia-medium); }

.main-nav { display: flex; gap: 2rem; align-items: center; }

.main-nav a:not(.btn-nav) {
	font-family: 'Crimson Text', serif;
	font-size: 1rem;
	color: var(--sepia-medium);
	text-decoration: none;
	position: relative;
	padding: 0.3rem 0;
	transition: color 0.3s ease;
}

.main-nav a::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0;
	width: 0;
	height: 1px;
	background: var(--gold-accent);
	transition: width 0.3s ease;
}

.main-nav a:hover { color: var(--sepia-dark); text-decoration: none; }
.main-nav a:hover::after { width: 100%; }

.btn-nav {
	background: var(--sepia-dark);
	color: var(--sepia-cream) !important;
	padding: 0.7rem 1.5rem;
	font-family: 'Playfair Display', serif;
	font-size: 0.95rem;
	border: 2px solid var(--sepia-dark);
	transition: all 0.4s ease;
}

.btn-nav:hover {
	background: transparent;
	color: var(--sepia-dark) !important;
}

.btn-nav::after { display: none; }

/* Hamburger toggle - hidden by default (desktop) */
.nav-toggle { display: none; }

/* ===== MAIN CONTENT ===== */
.site-main { min-height: calc(100vh - 140px); }

/* For app pages that need padding */
.site-main.app-content { padding: 120px 0 40px; }

/* ===== HERO SECTION ===== */
.hero {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 8rem 2rem 4rem;
	background:
		radial-gradient(ellipse at 30% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
		radial-gradient(ellipse at 70% 80%, rgba(166, 124, 82, 0.1) 0%, transparent 50%),
		var(--sepia-paper);
}

.hero-content {
	max-width: 800px;
	text-align: center;
	position: relative;
	z-index: 2;
}

/* Decorative corner flourishes */
.hero-content::before, .hero-content::after {
	content: '\2767';
	position: absolute;
	font-size: 3rem;
	color: var(--sepia-light);
	opacity: 0.4;
	animation: flourish-pulse 4s ease-in-out infinite;
}

.hero-content::before { top: -3rem; left: -2rem; transform: rotate(-45deg); }
.hero-content::after { bottom: -3rem; right: -2rem; transform: rotate(135deg); animation-delay: 2s; }

@keyframes flourish-pulse {
	0%, 100% { opacity: 0.3; transform: rotate(-45deg) scale(1); }
	50% { opacity: 0.5; transform: rotate(-45deg) scale(1.05); }
}

.hero h1 {
	font-family: 'Playfair Display', serif;
	font-size: clamp(2.5rem, 6vw, 4.5rem);
	font-weight: 400;
	color: var(--sepia-dark);
	margin-bottom: 1.5rem;
	line-height: 1.2;
	animation: title-reveal 1.2s ease-out forwards;
	opacity: 0;
	transform: translateY(30px);
}

@keyframes title-reveal { to { opacity: 1; transform: translateY(0); } }

.hero h1 em {
	font-style: italic;
	color: var(--sepia-medium);
	display: block;
	font-size: 0.85em;
}

.hero-subtitle {
	font-size: 1.25rem;
	color: var(--sepia-medium);
	max-width: 600px;
	margin: 0 auto 2.5rem;
	animation: subtitle-reveal 1.2s ease-out 0.3s forwards;
	opacity: 0;
	transform: translateY(20px);
}

@keyframes subtitle-reveal { to { opacity: 1; transform: translateY(0); } }

/* Hero button animation */
.hero-content .btn-primary {
	animation: btn-reveal 1.2s ease-out 0.6s forwards;
	opacity: 0;
}
@keyframes btn-reveal { to { opacity: 1; } }

/* ===== BUTTONS ===== */
.btn { display: inline-block; padding: 10px 20px; border-radius: 2px; font-weight: 500; cursor: pointer; border: none; text-align: center; font-family: 'Crimson Text', serif; }
.btn:hover { text-decoration: none; }

.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--sepia-dark);
	color: var(--sepia-cream);
	padding: 1rem 2.5rem;
	font-family: 'Playfair Display', serif;
	font-size: 1.1rem;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	border: 2px solid var(--sepia-dark);
	transition: all 0.4s ease;
}

.btn-primary::before {
	content: '';
	position: absolute;
	top: 0; left: -100%;
	width: 100%; height: 100%;
	background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
	transition: left 0.6s ease;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { background: transparent; color: var(--sepia-dark); text-decoration: none; }

.btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--sepia-medium);
	padding: 1rem 2.5rem;
	font-family: 'Playfair Display', serif;
	font-size: 1.1rem;
	text-decoration: none;
	border: 2px solid var(--sepia-light);
	transition: all 0.4s ease;
	position: relative;
}

.btn-secondary:hover { background: var(--sepia-aged); color: var(--sepia-dark); border-color: var(--sepia-medium); text-decoration: none; }

.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* App button variants - match primary/secondary sizing */
.btn-app {
	background: var(--sepia-medium);
	color: var(--sepia-cream);
	padding: 1rem 2.5rem;
	font-family: 'Playfair Display', serif;
	font-size: 1.1rem;
	border: 2px solid var(--sepia-medium);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.btn-app:hover { background: var(--sepia-dark); border-color: var(--sepia-dark); text-decoration: none; }
.btn-app-secondary { background: var(--sepia-light); color: var(--sepia-cream); }
.btn-app-secondary:hover { background: var(--sepia-medium); }
.btn-block { display: block; width: 100%; }
.btn-small { padding: 5px 15px; font-size: 0.9rem; }

/* Floating vintage photos */
.floating-photos {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	pointer-events: none;
	overflow: hidden;
}

.floating-photo {
	position: absolute;
	background: var(--sepia-cream);
	padding: 8px;
	box-shadow: 0 10px 40px var(--sepia-shadow), 0 2px 10px rgba(0,0,0,0.1);
	animation: photo-float 20s ease-in-out infinite;
}

.floating-photo img { display: block; width: 140px; height: 180px; object-fit: cover; filter: sepia(60%) contrast(0.9); }

.floating-photo:nth-child(1) { top: 15%; left: 5%; transform: rotate(-8deg); animation-delay: 0s; }
.floating-photo:nth-child(2) { top: 60%; left: 8%; transform: rotate(5deg); animation-delay: -7s; }
.floating-photo:nth-child(3) { top: 20%; right: 5%; transform: rotate(10deg); animation-delay: -3s; }
.floating-photo:nth-child(4) { top: 55%; right: 8%; transform: rotate(-6deg); animation-delay: -10s; }

@keyframes photo-float {
	0%, 100% { opacity: 0.7; transform: rotate(var(--rot, -8deg)) translateY(0); }
	25% { opacity: 0.9; }
	50% { opacity: 0.8; transform: rotate(var(--rot, -8deg)) translateY(-15px); }
	75% { opacity: 0.9; }
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
	padding: 6rem 2rem;
	background:
		linear-gradient(to bottom, var(--sepia-aged), var(--sepia-paper)),
		repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(107, 68, 35, 0.03) 30px, rgba(107, 68, 35, 0.03) 31px);
	position: relative;
}

.section-header { text-align: center; margin-bottom: 4rem; }

.section-header h2 {
	font-family: 'Playfair Display', serif;
	font-size: clamp(2rem, 4vw, 3rem);
	color: var(--sepia-dark);
	font-weight: 400;
	position: relative;
	display: inline-block;
}

.section-header h2::before, .section-header h2::after {
	content: '\2014';
	color: var(--gold-muted);
	margin: 0 1rem;
	opacity: 0.6;
}

.steps-container {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 3rem;
}

.step {
	text-align: center;
	padding: 2.5rem 2rem;
	background: var(--sepia-paper);
	border: 1px solid var(--sepia-light);
	position: relative;
	opacity: 0;
	transform: translateY(40px);
	animation: step-reveal 0.8s ease-out forwards;
}

.step:nth-child(1) { animation-delay: 0.2s; }
.step:nth-child(2) { animation-delay: 0.4s; }
.step:nth-child(3) { animation-delay: 0.6s; }

@keyframes step-reveal { to { opacity: 1; transform: translateY(0); } }

/* Corner decorations on step cards */
.step::before, .step::after {
	content: '';
	position: absolute;
	width: 30px; height: 30px;
	border: 2px solid var(--gold-muted);
	opacity: 0.4;
	transition: opacity 0.3s ease;
}

.step::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.step::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.step:hover::before, .step:hover::after { opacity: 0.8; }

.step-number {
	font-family: 'Playfair Display', serif;
	font-size: 4rem;
	color: var(--sepia-light);
	line-height: 1;
	margin-bottom: 1rem;
	opacity: 0.5;
}

.step h3 {
	font-family: 'Playfair Display', serif;
	font-size: 1.5rem;
	color: var(--sepia-dark);
	margin-bottom: 1rem;
	font-weight: 600;
}

.step p { color: var(--sepia-medium); font-size: 1.05rem; }

/* Decorative icon animation */
.step-icon { width: 60px; height: 60px; margin: 0 auto 1.5rem; position: relative; }

.step-icon svg {
	width: 100%; height: 100%;
	fill: none;
	stroke: var(--sepia-medium);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.step:hover .step-icon svg { animation: icon-wiggle 0.5s ease-in-out; }

@keyframes icon-wiggle {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(-5deg); }
	75% { transform: rotate(5deg); }
}

/* Page curl effect */
.page-curl { position: relative; }

.page-curl::after {
	content: '';
	position: absolute;
	bottom: 0; right: 0;
	width: 0; height: 0;
	border-style: solid;
	border-width: 0 0 25px 25px;
	border-color: transparent transparent var(--sepia-aged) transparent;
	transition: all 0.3s ease;
}

.page-curl:hover::after { border-width: 0 0 40px 40px; }

/* ===== PHOTO STRIP ANIMATION ===== */
.photo-strip {
	padding: 3rem 0;
	background: var(--sepia-aged);
	overflow: hidden;
	position: relative;
}

.photo-strip::before, .photo-strip::after {
	content: '';
	position: absolute;
	top: 0; bottom: 0;
	width: 100px;
	z-index: 2;
}

.photo-strip::before { left: 0; background: linear-gradient(to right, var(--sepia-aged), transparent); }
.photo-strip::after { right: 0; background: linear-gradient(to left, var(--sepia-aged), transparent); }

.photo-track {
	display: flex;
	gap: 2rem;
	animation: scroll-photos 25s linear infinite;
	width: max-content;
}

.photo-track:hover { animation-play-state: paused; }

@keyframes scroll-photos {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.photo-frame {
	flex-shrink: 0;
	background: var(--sepia-cream);
	padding: 8px;
	box-shadow: 0 4px 15px var(--sepia-shadow);
	transition: all 0.3s ease;
}

.photo-frame:hover {
	transform: scale(1.05) rotate(-2deg);
	box-shadow: 0 8px 25px var(--sepia-shadow);
}

.photo-frame img { display: block; width: 180px; height: 130px; object-fit: cover; filter: sepia(60%) contrast(0.9); }

/* ===== CHAPTERS / TOPICS ===== */
.chapters {
	padding: 6rem 2rem;
	background: var(--sepia-paper);
	position: relative;
}

.chapters::before {
	content: '';
	position: absolute;
	top: 0; left: 50%;
	transform: translateX(-50%);
	width: 1px; height: 80px;
	background: linear-gradient(to bottom, transparent, var(--sepia-light), transparent);
}

.chapters-grid {
	max-width: 1000px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

.chapter-card {
	padding: 1.5rem;
	background: linear-gradient(135deg, var(--sepia-cream), var(--sepia-aged));
	border-left: 3px solid var(--gold-muted);
	position: relative;
	cursor: pointer;
	transition: all 0.4s ease;
	overflow: hidden;
}

.chapter-card::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: linear-gradient(135deg, transparent 40%, rgba(201, 162, 39, 0.1));
	opacity: 0;
	transition: opacity 0.4s ease;
}

.chapter-card:hover::before { opacity: 1; }

.chapter-card:hover {
	transform: translateX(5px);
	box-shadow: -5px 5px 20px var(--sepia-shadow);
}

.chapter-card h4 {
	font-family: 'Playfair Display', serif;
	font-size: 1.15rem;
	color: var(--sepia-dark);
	font-weight: 600;
	position: relative;
	z-index: 1;
}

.chapter-card .chapter-icon {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	opacity: 0.7;
	display: block;
}

/* ===== FEATURED SECTION ===== */
.featured {
	padding: 6rem 2rem;
	background: var(--sepia-dark);
	position: relative;
	overflow: hidden;
}

/* Background image for featured */
.featured::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: url('https://images.unsplash.com/photo-1722173205783-d602329f0743?w=1920&h=1080&fit=crop&q=85') center/cover no-repeat;
	filter: sepia(80%) contrast(0.7) brightness(0.4);
	opacity: 0.5;
}

.featured-content {
	max-width: 700px;
	margin: 0 auto;
	text-align: center;
	position: relative;
	z-index: 2;
}

.featured h2 {
	font-family: 'Playfair Display', serif;
	font-size: clamp(2rem, 4vw, 2.8rem);
	color: var(--sepia-cream);
	font-weight: 400;
	margin-bottom: 1.5rem;
	line-height: 1.3;
}

.featured p {
	color: var(--sepia-light);
	font-size: 1.15rem;
	margin-bottom: 2rem;
}

.featured .btn-secondary { color: var(--sepia-cream); border-color: var(--sepia-cream); }
.featured .btn-secondary:hover { background: var(--sepia-cream); color: var(--sepia-dark); }

/* ===== TESTIMONIAL / QUOTE ===== */
.quote-section {
	padding: 5rem 2rem;
	background: var(--sepia-paper);
	text-align: center;
}

.quote-block {
	max-width: 700px;
	margin: 0 auto;
	position: relative;
}

.quote-block::before {
	content: '"';
	font-family: 'Playfair Display', serif;
	font-size: 8rem;
	color: var(--sepia-light);
	position: absolute;
	top: -3rem; left: -1rem;
	opacity: 0.3;
	line-height: 1;
}

.quote-block blockquote {
	font-family: 'Playfair Display', serif;
	font-size: 1.6rem;
	font-style: italic;
	color: var(--sepia-dark);
	line-height: 1.6;
	position: relative;
	z-index: 1;
}

.quote-block cite {
	display: block;
	margin-top: 1.5rem;
	font-family: 'Crimson Text', serif;
	font-size: 1rem;
	color: var(--sepia-medium);
	font-style: normal;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ===== FOOTER ===== */
.site-footer {
	padding: 3rem 2rem;
	background: var(--sepia-dark);
	text-align: center;
	position: relative;
}

.site-footer::before {
	content: '\2766';
	position: absolute;
	top: -1rem; left: 50%;
	transform: translateX(-50%);
	font-size: 2rem;
	color: var(--gold-muted);
	background: var(--sepia-dark);
	padding: 0 1rem;
}

.site-footer p { color: var(--sepia-light); font-size: 0.95rem; margin: 0; }
.site-footer a { color: var(--gold-muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.photo-credits { margin-top: 1rem; font-size: 0.85rem; }

/* ===== ALERTS ===== */
.alert { padding: 15px 20px; margin: 20px; border-radius: 5px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ==============================================
   APP PAGES (Dashboard, Auth, Questions, etc.)
   ============================================== */

/* Auth pages */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding-top: 100px; }
.auth-form-container { background: var(--sepia-cream); padding: 40px; border-radius: 5px; box-shadow: 0 4px 20px var(--sepia-shadow); max-width: 400px; width: 100%; border: 1px solid var(--sepia-light); }
.auth-form-container h1 { color: var(--sepia-dark); margin-bottom: 10px; text-align: center; }
.auth-subtitle { text-align: center; color: var(--sepia-medium); margin-bottom: 30px; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-form .btn { margin-top: 10px; }
.auth-footer { text-align: center; margin-top: 25px; color: var(--sepia-medium); }
.forgot-link { font-size: 0.875rem; color: var(--sepia-light); }
.forgot-link:hover { color: var(--sepia-medium); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--sepia-dark); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid var(--sepia-light); border-radius: 3px; font-size: 1rem; font-family: 'Crimson Text', serif; background: var(--sepia-paper); color: var(--ink-brown); }
.form-group textarea { min-height: 150px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--sepia-medium); box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.2); }
.form-hint { display: block; margin-top: 5px; font-size: 0.875rem; color: var(--sepia-medium); }
.form-row { display: flex; justify-content: space-between; align-items: center; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: normal; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }

/* Dashboard */
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.dashboard-welcome h1 { color: var(--sepia-dark); margin-bottom: 5px; }
.dashboard-welcome .story-title { color: var(--sepia-medium); font-size: 1.1rem; }
.dashboard-actions { display: flex; gap: 10px; }
.dashboard-section { margin-top: 40px; }
.dashboard-section h2 { color: var(--sepia-dark); margin-bottom: 20px; }

/* Getting started */
.getting-started { background: linear-gradient(135deg, var(--sepia-dark) 0%, var(--sepia-medium) 100%); color: var(--sepia-cream); padding: 40px; border-radius: 5px; text-align: center; margin-bottom: 40px; }
.getting-started h2 { color: var(--sepia-cream); margin-bottom: 15px; }
.getting-started p { opacity: 0.9; margin-bottom: 25px; max-width: 500px; margin-left: auto; margin-right: auto; }
.getting-started .btn { background: var(--sepia-cream); color: var(--sepia-dark); }
.getting-started .btn:hover { background: var(--sepia-paper); }

/* Output CTA */
.output-cta { background: var(--sepia-cream); padding: 30px; border-radius: 5px; margin-bottom: 40px; border: 2px solid var(--gold-accent); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.output-cta-content h2 { color: var(--sepia-dark); margin-bottom: 8px; font-size: 1.3rem; }
.output-cta-content p { color: var(--sepia-medium); margin: 0; }
.output-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Stats cards */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.stat-card { background: var(--sepia-cream); padding: 25px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); text-align: center; border: 1px solid var(--sepia-light); }
.stat-number { font-size: 2.5rem; font-weight: bold; color: var(--sepia-dark); font-family: 'Playfair Display', serif; }
.stat-label { color: var(--sepia-medium); margin-top: 5px; }
.stat-card-actions { display: flex; flex-direction: column; justify-content: center; }
.stat-card-actions .stat-label { margin-top: 0; margin-bottom: 12px; font-weight: 600; color: var(--sepia-dark); }
.stat-actions { display: flex; flex-direction: column; gap: 8px; }
.stat-actions .btn-small { padding: 8px 12px; font-size: 0.85rem; }

/* Progress ring */
.progress-ring { position: relative; width: 80px; height: 80px; margin: 0 auto; }
.progress-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.progress-ring-bg { fill: none; stroke: var(--sepia-light); stroke-width: 8; }
.progress-ring-fill { fill: none; stroke: var(--gold-accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 283; transition: stroke-dashoffset 0.5s ease; }
.progress-ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.1rem; font-weight: bold; color: var(--sepia-dark); }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.category-card { display: block; background: var(--sepia-cream); padding: 20px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--sepia-light); }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--sepia-shadow); text-decoration: none; }
.category-card.category-complete { border: 2px solid var(--gold-accent); }
.category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.category-header h3 { margin: 0; color: var(--sepia-dark); font-size: 1rem; }
.category-badge { background: var(--sepia-aged); color: var(--sepia-medium); padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; }
.category-complete .category-badge { background: rgba(201, 162, 39, 0.2); color: var(--sepia-dark); }
.category-progress-bar { height: 6px; background: var(--sepia-aged); border-radius: 3px; overflow: hidden; }
.category-progress-fill { height: 100%; background: var(--gold-accent); border-radius: 3px; transition: width 0.3s ease; }
.category-complete .category-progress-fill { background: var(--gold-accent); }
.category-description { color: var(--sepia-medium); font-size: 0.9rem; margin: 10px 0 0 0; }

/* Story create/settings */
.story-create { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding-top: 100px; }
.story-form-container { background: var(--sepia-cream); padding: 40px; border-radius: 5px; box-shadow: 0 4px 20px var(--sepia-shadow); max-width: 500px; width: 100%; border: 1px solid var(--sepia-light); }
.story-form-container h1 { color: var(--sepia-dark); margin-bottom: 10px; text-align: center; }
.story-subtitle { text-align: center; color: var(--sepia-medium); margin-bottom: 30px; }
.story-settings .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.story-settings h1 { margin: 0; }
.settings-section { background: var(--sepia-cream); padding: 30px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); margin-bottom: 20px; border: 1px solid var(--sepia-light); }
.settings-section h2 { color: var(--sepia-dark); margin-bottom: 20px; font-size: 1.25rem; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }

/* Question pages */
.questions-page .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.questions-page .page-header h1 { margin: 0; color: var(--sepia-dark); }
.questions-page .breadcrumb { color: var(--sepia-medium); font-size: 0.9rem; }
.questions-page .breadcrumb a { color: var(--sepia-medium); }
.questions-page .breadcrumb a:hover { color: var(--sepia-dark); }
.page-intro { color: var(--sepia-medium); margin-bottom: 30px; max-width: 600px; }

/* Category intro */
.category-intro { margin-bottom: 30px; }
.category-intro h1 { color: var(--sepia-dark); margin-bottom: 10px; }
.category-intro p { color: var(--sepia-medium); margin-bottom: 15px; }
.category-progress-info { background: var(--sepia-aged); padding: 10px 15px; border-radius: 5px; font-size: 0.9rem; color: var(--sepia-dark); display: inline-block; }

/* Question list */
.question-list { display: flex; flex-direction: column; gap: 10px; }
.question-item { display: flex; align-items: flex-start; gap: 15px; background: var(--sepia-cream); padding: 20px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); transition: transform 0.2s, box-shadow 0.2s; border: 1px solid var(--sepia-light); }
.question-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--sepia-shadow); text-decoration: none; }
.question-item.question-answered { border-left: 4px solid var(--gold-accent); }
.question-number { background: var(--sepia-aged); color: var(--sepia-medium); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 500; flex-shrink: 0; }
.question-answered .question-number { background: rgba(201, 162, 39, 0.3); color: var(--sepia-dark); }
.question-content { flex: 1; min-width: 0; }
.question-content .question-prompt { color: var(--sepia-dark); font-weight: 500; margin-bottom: 5px; }
.question-preview { color: var(--sepia-medium); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.question-status { color: var(--sepia-light); font-size: 0.9rem; font-style: italic; }
.question-arrow { color: var(--sepia-medium); font-size: 1.2rem; flex-shrink: 0; }
.category-actions { margin-top: 30px; text-align: center; }

/* Single question page */
.question-page .container { max-width: 800px; }
.question-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.back-link { color: var(--sepia-medium); display: flex; align-items: center; gap: 5px; }
.back-link:hover { color: var(--sepia-dark); text-decoration: none; }
.question-indicator { color: var(--sepia-medium); font-size: 0.9rem; }

/* Question card */
.question-card { background: var(--sepia-cream); padding: 40px; border-radius: 5px; box-shadow: 0 4px 20px var(--sepia-shadow); margin-bottom: 30px; border: 1px solid var(--sepia-light); }
.question-card .question-header { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.question-badge { background: var(--sepia-aged); color: var(--sepia-dark); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.required-badge { background: #fee2e2; color: #991b1b; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.question-card h1.question-prompt { font-size: 1.5rem; color: var(--sepia-dark); margin-bottom: 15px; line-height: 1.4; }
.question-helper { color: var(--sepia-medium); font-style: italic; margin-bottom: 25px; padding-left: 15px; border-left: 3px solid var(--sepia-light); }

/* Response form */
.response-form textarea { min-height: 250px; font-size: 1.1rem; line-height: 1.7; font-family: 'Crimson Text', serif; }
.response-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
.save-status { font-size: 0.9rem; min-height: 1.4em; }
.status-saved { color: var(--gold-accent); }
.status-saving { color: var(--sepia-medium); }
.status-error { color: #ef4444; }
.word-count { color: var(--sepia-light); font-size: 0.9rem; }

/* Question navigation */
.question-nav-bottom { display: flex; justify-content: space-between; align-items: center; }

/* Question media section */
.question-media-section { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--sepia-light); }
.media-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.media-section-header h3 { margin: 0; color: var(--sepia-dark); font-size: 1.1rem; }
.media-header-actions { display: flex; align-items: center; gap: 12px; }
.media-limit-badge { font-size: 0.8rem; font-weight: normal; color: var(--sepia-medium); background: var(--sepia-aged); padding: 2px 8px; border-radius: 10px; margin-left: 8px; font-family: 'Crimson Text', serif; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }

.attached-media-list { display: flex; flex-wrap: wrap; gap: 12px; }
.attached-media-item { display: flex; align-items: center; gap: 10px; background: var(--sepia-aged); padding: 8px 12px 8px 8px; border-radius: 5px; }
.attached-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.attached-thumb.video-thumb { background: var(--sepia-dark); display: flex; align-items: center; justify-content: center; color: var(--sepia-cream); font-size: 1.5rem; }
.attached-info { display: flex; flex-direction: column; gap: 4px; }
.attached-name { color: var(--sepia-dark); font-size: 0.9rem; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-remove-media { background: none; border: none; color: var(--sepia-light); cursor: pointer; font-size: 1.3rem; padding: 0; line-height: 1; align-self: flex-start; }
.btn-remove-media:hover { color: #ef4444; }
.no-media-hint { color: var(--sepia-light); font-style: italic; margin: 0; }

/* Modal tabs */
.modal-tabs { display: flex; border-bottom: 1px solid var(--sepia-light); background: var(--sepia-cream); }
.modal-tab { flex: 1; padding: 12px 20px; background: none; border: none; color: var(--sepia-medium); cursor: pointer; font-size: 1rem; font-family: inherit; transition: all 0.2s; }
.modal-tab:hover { background: var(--sepia-aged); }
.modal-tab.active { background: var(--sepia-paper); color: var(--sepia-dark); font-weight: 600; border-bottom: 2px solid var(--gold-accent); margin-bottom: -1px; }

/* Modal sizes */
.modal-lg { max-width: 600px; }

/* Upload in modal */
.tab-content .upload-area { padding: 30px; margin-bottom: 15px; }
.tab-content .upload-area .upload-icon { font-size: 2.5rem; }
.upload-actions { text-align: right; margin-top: 15px; }

/* Upload progress */
.upload-progress { margin-top: 15px; }
.progress-bar { height: 8px; background: var(--sepia-aged); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold-accent); width: 0%; transition: width 0.3s; }
#progress-text { display: block; text-align: center; margin-top: 8px; color: var(--sepia-medium); font-size: 0.9rem; }

/* Screen reader only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Media page */
.media-page .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.media-page .page-header h1 { margin: 0; color: var(--sepia-dark); }

/* Upload section */
.upload-section { background: var(--sepia-cream); padding: 30px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); margin-bottom: 30px; border: 1px solid var(--sepia-light); }
.upload-section h2 { color: var(--sepia-dark); margin-bottom: 20px; font-size: 1.25rem; }
.upload-form { display: flex; flex-direction: column; gap: 15px; }
.upload-area { border: 2px dashed var(--sepia-light); border-radius: 5px; padding: 40px; text-align: center; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--sepia-medium); background: var(--sepia-aged); }
.upload-icon { font-size: 3rem; color: var(--sepia-medium); margin-bottom: 10px; }
.upload-text { color: var(--sepia-dark); font-weight: 500; margin-bottom: 5px; }
.upload-hint { color: var(--sepia-light); font-size: 0.9rem; margin: 0; }
.upload-input { display: none; }
.upload-preview { display: flex; align-items: center; justify-content: space-between; background: var(--sepia-aged); padding: 15px; border-radius: 5px; }
.preview-info { display: flex; gap: 15px; }
#preview-name { color: var(--sepia-dark); font-weight: 500; }
#preview-size { color: var(--sepia-medium); }

/* Media section */
.media-section { background: var(--sepia-cream); padding: 30px; border-radius: 5px; box-shadow: 0 2px 10px var(--sepia-shadow); border: 1px solid var(--sepia-light); }
.media-section h2 { color: var(--sepia-dark); margin-bottom: 20px; font-size: 1.25rem; }
.media-count { color: var(--sepia-medium); font-weight: normal; }
.no-media { text-align: center; padding: 40px; color: var(--sepia-medium); }
.no-media p { margin: 5px 0; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.media-item { background: var(--sepia-aged); border-radius: 5px; overflow: hidden; position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.media-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px var(--sepia-shadow); }
.media-thumbnail { height: 150px; background: var(--sepia-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.media-thumbnail.media-video { background: var(--sepia-dark); }
.video-icon { color: var(--sepia-cream); font-size: 2rem; }
.media-info { padding: 12px; }
.media-filename { color: var(--sepia-dark); font-weight: 500; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { color: var(--sepia-light); font-size: 0.8rem; margin-top: 4px; }
.media-delete-form { position: absolute; top: 8px; right: 8px; }
.btn-delete { background: rgba(239, 68, 68, 0.9); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.media-item:hover .btn-delete { opacity: 1; }
.btn-delete:hover { background: #dc2626; }

/* Page content */
.page-content { max-width: 800px; margin: 0 auto; padding-top: 100px; }
.page-content h1 { color: var(--sepia-dark); margin-bottom: 20px; }
.page-content h2 { color: var(--sepia-dark); margin-top: 40px; margin-bottom: 15px; }
.page-content ul { margin-bottom: 20px; }
.page-content li { margin-bottom: 10px; }

/* Error page */
.error-page { text-align: center; padding: 80px 20px; padding-top: 150px; }
.error-page h1 { font-size: 2.5rem; color: var(--sepia-dark); }
.error-page p { margin-bottom: 30px; color: var(--sepia-medium); }

/* ===== EDITOR PAGE ===== */
.editor-page .container { max-width: 1000px; padding-top: 100px; }
.editor-page .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.editor-page .page-header h1 { margin: 0; color: var(--sepia-dark); }
.header-actions { display: flex; gap: 10px; }

.editor-info { background: var(--sepia-cream); padding: 15px 20px; border-radius: 5px; margin-bottom: 30px; color: var(--sepia-medium); border-left: 3px solid var(--gold-accent); }

.editor-categories { display: flex; flex-direction: column; gap: 30px; }

.editor-category { background: var(--sepia-cream); border-radius: 5px; padding: 25px; box-shadow: 0 2px 10px var(--sepia-shadow); border: 1px solid var(--sepia-light); }
.category-title { color: var(--sepia-dark); font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold-accent); }

.response-list { display: flex; flex-direction: column; gap: 15px; }

.response-card { background: var(--sepia-paper); border: 1px solid var(--sepia-light); border-radius: 5px; padding: 15px; transition: box-shadow 0.2s, opacity 0.2s; }
.response-card:hover { box-shadow: 0 2px 8px var(--sepia-shadow); }
.response-card.excluded { opacity: 0.6; background: var(--sepia-aged); }
.response-card.sortable-ghost { opacity: 0.4; background: var(--gold-accent); }
.response-card.sortable-chosen { box-shadow: 0 4px 15px var(--sepia-shadow); }

.response-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.drag-handle { cursor: grab; color: var(--sepia-light); font-size: 1.2rem; padding: 5px; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.include-wrapper { flex-shrink: 0; }
.include-toggle { width: 20px; height: 20px; accent-color: var(--gold-accent); cursor: pointer; }
.response-question { flex: 1; font-weight: 600; color: var(--sepia-dark); font-family: 'Playfair Display', serif; }

.response-body { padding-left: 52px; }
.response-text-wrapper { margin-bottom: 10px; }
.response-editor { width: 100%; min-height: 80px; padding: 12px; border: 1px solid var(--sepia-light); border-radius: 4px; font-family: 'Crimson Text', serif; font-size: 1rem; line-height: 1.6; resize: vertical; background: #fff; }
.response-editor:focus { outline: none; border-color: var(--gold-accent); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2); }
.edit-status { font-size: 0.85rem; margin-top: 5px; min-height: 1.2em; }

.response-media-section { margin-bottom: 10px; }
.media-layout-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 6px 10px; background: var(--sepia-aged); border-radius: 4px; }
.media-count { font-size: 0.8rem; color: var(--sepia-medium); }
/* Visual Layout Picker - Grid Mode */
.layout-picker.layout-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; justify-items: end; }
.layout-option { width: 36px; height: 28px; padding: 3px; border: 2px solid transparent; border-radius: 3px; background: var(--sepia-cream); cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; }
.layout-option:hover { border-color: var(--gold-muted); background: var(--sepia-aged); }
.layout-option.selected { border-color: var(--gold-accent); background: var(--sepia-aged); }
.layout-icon { width: 100%; height: 100%; }
.layout-icon .layout-text { fill: var(--sepia-light); }
.layout-icon .layout-image { fill: var(--sepia-medium); }
.layout-option:hover .layout-icon .layout-text, .layout-option.selected .layout-icon .layout-text { fill: var(--sepia-medium); }
.layout-option:hover .layout-icon .layout-image, .layout-option.selected .layout-icon .layout-image { fill: var(--gold-accent); }
.response-media-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.media-thumb { display: flex; align-items: center; gap: 8px; background: var(--sepia-aged); padding: 6px 10px 6px 6px; border-radius: 4px; font-size: 0.85rem; }
.media-thumb .thumb-img { width: 50px; height: 50px; object-fit: cover; border-radius: 3px; }
.media-thumb .thumb-video { width: 50px; height: 50px; background: var(--sepia-dark); border-radius: 3px; display: flex; align-items: center; justify-content: center; color: var(--sepia-cream); font-size: 1.2rem; }
.media-name { color: var(--sepia-dark); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-remove { background: none; border: none; color: var(--sepia-light); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 4px; }
.media-remove:hover { color: #ef4444; }

.response-actions { margin-top: 10px; }
.btn-attach-media { background: none; border: 1px dashed var(--sepia-light); color: var(--sepia-medium); padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.btn-attach-media:hover { border-color: var(--gold-accent); color: var(--gold-accent); background: var(--sepia-cream); }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; z-index: 1001; }
.modal-backdrop { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); }
.modal-content { position: relative; background: var(--sepia-paper); border-radius: 8px; max-width: 500px; width: 90%; max-height: 80vh; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: var(--sepia-cream); border-bottom: 1px solid var(--sepia-light); }
.modal-header h3 { margin: 0; color: var(--sepia-dark); }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--sepia-medium); }
.modal-close:hover { color: var(--sepia-dark); }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.media-option { background: var(--sepia-cream); border-radius: 5px; text-align: center; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; overflow: hidden; }
.media-option:hover { border-color: var(--gold-accent); background: var(--sepia-aged); transform: translateY(-2px); }
.media-thumb-img { height: 90px; overflow: hidden; background: var(--sepia-light); }
.media-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb-video { height: 90px; background: var(--sepia-dark); display: flex; align-items: center; justify-content: center; }
.video-play-icon { color: var(--sepia-cream); font-size: 2rem; }
.media-label { font-size: 0.8rem; color: var(--sepia-dark); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px; }
.empty-media { text-align: center; color: var(--sepia-medium); padding: 20px; }

/* ===== PREVIEW PAGE ===== */
.preview-page .container { max-width: 800px; padding-top: 100px; }
.preview-page .page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.preview-page .page-header h1 { margin: 0; color: var(--sepia-dark); }

.preview-container { background: var(--sepia-cream); border-radius: 5px; padding: 40px; box-shadow: 0 4px 20px var(--sepia-shadow); border: 1px solid var(--sepia-light); }

.preview-cover { text-align: center; padding: 60px 20px; margin-bottom: 40px; border-bottom: 2px solid var(--gold-accent); }
.cover-ornament { font-size: 1.5rem; color: var(--gold-accent); margin: 15px 0; }
.cover-title { font-size: 2.5rem; color: var(--sepia-dark); margin-bottom: 10px; font-weight: 400; }
.cover-subtitle { font-size: 1.3rem; color: var(--sepia-medium); font-style: italic; margin-bottom: 20px; }
.cover-dedication { font-style: italic; color: var(--sepia-medium); max-width: 400px; margin: 0 auto; line-height: 1.6; }

.preview-chapter { margin-bottom: 40px; }
.chapter-title { color: var(--sepia-dark); font-size: 1.5rem; border-bottom: 2px solid var(--gold-accent); padding-bottom: 10px; margin-bottom: 25px; }

.preview-response { margin-bottom: 30px; }
.response-prompt { font-size: 1.1rem; color: var(--sepia-dark); font-style: italic; margin-bottom: 10px; font-weight: 600; }
.preview-response .response-text { color: var(--ink-brown); line-height: 1.8; text-align: justify; }

.response-media-gallery { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.media-figure { max-width: 300px; margin: 0; }
.media-figure img { border-radius: 4px; border: 4px solid var(--sepia-cream); box-shadow: 0 2px 10px var(--sepia-shadow); }
.media-figure figcaption { font-size: 0.9rem; color: var(--sepia-medium); font-style: italic; margin-top: 8px; text-align: center; }

.preview-empty { text-align: center; padding: 60px 20px; color: var(--sepia-medium); }
.preview-empty p { margin-bottom: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
	.site-header { padding: 1rem 1.5rem; }
	.site-header .container { flex-wrap: nowrap; position: relative; }

	/* Hamburger button */
	.nav-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 10px; margin-left: auto; }
	.hamburger, .hamburger::before, .hamburger::after { display: block; width: 24px; height: 2px; background: var(--sepia-dark); border-radius: 2px; transition: all 0.3s ease; }
	.hamburger { position: relative; }
	.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
	.hamburger::before { top: -7px; }
	.hamburger::after { top: 7px; }

	/* Animate to X when open */
	.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
	.nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

	/* Collapsed nav */
	.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: rgba(245, 230, 211, 0.98); backdrop-filter: blur(8px); flex-direction: column; gap: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; box-shadow: 0 4px 12px var(--sepia-shadow); }
	.main-nav.nav-open { max-height: 400px; padding: 1rem 0; }
	.main-nav a { display: block; padding: 0.8rem 1.5rem; text-align: center; border-bottom: 1px solid var(--sepia-light); }
	.main-nav a:last-child { border-bottom: none; }
	.main-nav a::after { display: none; }
	.main-nav .btn-nav { margin: 0.8rem 1.5rem; display: block; }

	.floating-photos { display: none; }
	.hero { padding: 6rem 1.5rem 3rem; }
	.how-it-works, .chapters, .featured { padding: 4rem 1.5rem; }
	.quote-block blockquote { font-size: 1.3rem; }
	.auth-page, .story-create { padding-top: 80px; }
	.page-content { padding-top: 80px; }
}

/* ===== COLLABORATION STYLES ===== */

/* Collaborators Section on Question Page */
.question-collaborators-section { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--sepia-light); }
.collaborators-loading { color: var(--sepia-medium); font-style: italic; padding: 10px 0; }

.collaborators-panel { }
.collaborators-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.collaborators-header h3 { font-size: 1.1rem; color: var(--sepia-dark); margin: 0; }

.collaborators-empty { color: var(--sepia-medium); font-style: italic; padding: 15px 0; }

.collaborators-list { display: flex; flex-direction: column; gap: 15px; }

.collaborator-item { background: var(--sepia-aged); padding: 15px; border-radius: 8px; border: 1px solid var(--sepia-light); }
.collaborator-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.collaborator-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.collaborator-name { font-weight: 600; color: var(--sepia-dark); }

.collab-status { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.status-pending { background: var(--gold-muted); color: var(--sepia-dark); }
.status-contributed { background: var(--gold-accent); color: var(--sepia-dark); }

.collaborator-actions { display: flex; align-items: center; gap: 10px; }
.collab-date { font-size: 0.8rem; color: var(--sepia-medium); }
.btn-revoke { background: none; border: none; font-size: 1.2rem; color: var(--sepia-medium); cursor: pointer; padding: 2px 6px; line-height: 1; }
.btn-revoke:hover { color: #a94442; }

.contribution-preview { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--sepia-light); }
.contribution-text { color: var(--ink-brown); line-height: 1.7; white-space: pre-wrap; }
.contribution-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.contribution-meta { font-size: 0.8rem; color: var(--sepia-medium); font-style: italic; }
.btn-copy-contribution { font-size: 0.75rem; padding: 4px 10px; background: var(--sepia-cream); border: 1px solid var(--sepia-light); color: var(--sepia-medium); cursor: pointer; border-radius: 3px; transition: all 0.2s; }
.btn-copy-contribution:hover { background: var(--sepia-dark); color: var(--sepia-cream); border-color: var(--sepia-dark); }
.highlight-flash { animation: highlightFlash 1.5s ease-out; }
@keyframes highlightFlash { 0% { background-color: rgba(201, 162, 39, 0.3); } 100% { background-color: transparent; } }

/* Invite Modal Styles */
.invite-intro { color: var(--sepia-medium); margin-bottom: 20px; line-height: 1.6; }

.invite-actions { display: flex; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
.invite-actions .btn { flex: 1; min-width: 150px; }

.invite-result { }
.invite-success { margin-bottom: 25px; }
.invite-success p { margin-bottom: 15px; color: var(--sepia-dark); }

.share-link-box { display: flex; gap: 10px; margin-bottom: 10px; }
.share-link-box input { flex: 1; padding: 10px 15px; border: 1px solid var(--sepia-light); border-radius: 6px; font-size: 0.9rem; background: var(--sepia-paper); color: var(--ink-brown); }
.share-link-box .btn { white-space: nowrap; }

.share-hint { font-size: 0.85rem; color: var(--sepia-medium); }

/* Collaborate Page (Public) */
.collaborate-page { }
.collaborate-header .logo { pointer-events: none; }
.collaborate-page-content { padding: 40px 20px; }
.collaborate-page-content .container { max-width: 700px; margin: 0 auto; }

.collaborate-intro { text-align: center; margin-bottom: 40px; }
.collaborate-intro h1 { font-family: 'Playfair Display', Georgia, serif; color: var(--sepia-dark); font-size: 2rem; margin-bottom: 15px; }
.collaborate-lead { font-size: 1.15rem; color: var(--sepia-medium); line-height: 1.7; }

.collaborate-card { background: var(--sepia-cream); border: 1px solid var(--sepia-light); border-radius: 12px; padding: 35px; margin-bottom: 40px; }
.collaborate-card .question-header { margin-bottom: 15px; }
.collaborate-badge { background: var(--sepia-aged); color: var(--sepia-medium); font-size: 0.8rem; padding: 4px 12px; border-radius: 15px; }
.collaborate-card .question-prompt { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--sepia-dark); line-height: 1.5; margin-bottom: 15px; }
.collaborate-card .question-helper { color: var(--sepia-medium); font-style: italic; margin-bottom: 25px; }

.owner-response-section { background: var(--sepia-aged); border-radius: 8px; padding: 20px; margin-bottom: 25px; }
.owner-response-section h3 { font-size: 0.9rem; color: var(--sepia-medium); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.owner-response-text { color: var(--ink-brown); line-height: 1.8; white-space: pre-wrap; }

.contribute-form .form-group { margin-bottom: 20px; }
.contribute-form label { display: block; font-weight: 600; color: var(--sepia-dark); margin-bottom: 8px; }
.contribute-form input[type="text"], .contribute-form textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--sepia-light); border-radius: 8px; font-family: inherit; font-size: 1rem; background: var(--sepia-paper); color: var(--ink-brown); box-sizing: border-box; }
.contribute-form input[type="text"]:focus, .contribute-form textarea:focus { outline: none; border-color: var(--gold-accent); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2); }
.contribute-form textarea { resize: vertical; min-height: 200px; line-height: 1.7; }
.contribute-form .form-hint { font-size: 0.85rem; color: var(--sepia-medium); margin-top: 6px; }
.contribute-form .form-actions { margin-top: 30px; text-align: center; }
.contribute-form .btn-lg { padding: 14px 40px; font-size: 1.1rem; }

.collaborate-cta { text-align: center; padding-top: 30px; }
.cta-divider { width: 80px; height: 2px; background: var(--gold-accent); margin: 0 auto 25px; }
.collaborate-cta h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--sepia-dark); font-size: 1.4rem; margin-bottom: 10px; }
.collaborate-cta p { color: var(--sepia-medium); margin-bottom: 20px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* Thank You Page */
.thank-you-card { background: var(--sepia-cream); border: 1px solid var(--sepia-light); border-radius: 12px; padding: 50px 35px; text-align: center; margin-bottom: 40px; }
.thank-you-icon { color: var(--gold-accent); margin-bottom: 20px; }
.thank-you-card h1 { font-family: 'Playfair Display', Georgia, serif; color: var(--sepia-dark); font-size: 2rem; margin-bottom: 15px; }
.thank-you-lead { font-size: 1.15rem; color: var(--sepia-medium); margin-bottom: 15px; }
.thank-you-card p { color: var(--ink-brown); line-height: 1.7; }

/* Error Page */
.error-card { background: var(--sepia-cream); border: 1px solid var(--sepia-light); border-radius: 12px; padding: 50px 35px; text-align: center; margin-bottom: 40px; }
.error-icon { color: var(--sepia-medium); margin-bottom: 20px; }
.error-card h1 { font-family: 'Playfair Display', Georgia, serif; color: var(--sepia-dark); font-size: 1.8rem; margin-bottom: 15px; }
.error-lead { font-size: 1.1rem; color: var(--sepia-medium); }

/* Checkbox label styling */
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sepia-dark); }
.checkbox-label span { color: var(--ink-brown); }

/* Mobile responsive for collaboration */
@media (max-width: 768px) {
	.collaborators-header { flex-direction: column; align-items: flex-start; gap: 10px; }
	.collaborator-header { flex-direction: column; }
	.invite-actions { flex-direction: column; }
	.invite-actions .btn { width: 100%; }
	.share-link-box { flex-direction: column; }
	.share-link-box .btn { width: 100%; }
	.collaborate-card { padding: 25px 20px; }
	.collaborate-intro h1 { font-size: 1.6rem; }
}
