/*
Theme Name: TinyTaleWorld
Theme URI: https://tinytaleworld.com
Description: A child-friendly story theme with dynamic scenes, moods, characters, elements, and FX effects
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Author: TinyTaleWorld
Author URI: https://tinytaleworld.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tinytaleworld
Tags: custom-background, threaded-comments, translation-ready

TinyTaleWorld Theme is a WordPress theme designed for children's stories
with dynamic visual effects based on metadata (scene, mood, character, element, FX).
*/

/* Basic theme styles */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Nunito', sans-serif;
	background: #1a0533;
	color: #fff;
	min-height: 100vh;
	overflow-x: hidden;
	width: 100%;
}

/* Don't apply solid background on single story pages - let scene gradients work */
body:not([class*="scene-"]) {
	background: #1a0533;
}

#page {
	width: 100%;
	overflow-x: hidden;
}

/* ============================
   Goal Bar Styles
   ============================ */
.ttw-goal-bar {
	position: sticky;
	top: 0;
	z-index: 300;
	background: #060f06;
	border-bottom: 1px solid rgba(0,230,118,0.15);
	padding: 0 1.5rem;
}
.ttw-goal-bar-inner {
	max-width: 1200px;
	margin: 0 auto;
	height: 38px;
	display: flex;
	align-items: center;
	gap: 1rem;
}
.goal-bar-label {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.68rem;
	color: #00e676;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 5px;
}
.goal-bar-track {
	flex: 1;
	height: 5px;
	background: rgba(255,255,255,0.07);
	border-radius: 999px;
	overflow: hidden;
}
.goal-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #00897b, #00e676, #b9f6ca);
	background-size: 200%;
	width: 0%;
	transition: width 2s cubic-bezier(.16,1,.3,1);
	animation: bar-glow 3s linear infinite;
}
@keyframes bar-glow { 0%{background-position:0%} 100%{background-position:200%} }

.goal-bar-nums {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 700;
	font-size: 0.72rem;
	white-space: nowrap;
	flex-shrink: 0;
}
.goal-bar-nums .e { color: #00e676; }
.goal-bar-nums .s { color: rgba(255,255,255,0.2); margin: 0 3px; }
.goal-bar-nums .g { color: rgba(255,255,255,0.35); }

.goal-bar-pct {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.68rem;
	color: #00e676;
	white-space: nowrap;
	flex-shrink: 0;
	min-width: 38px;
	text-align: right;
}
.goal-bar-report {
	font-size: 0.67rem;
	color: rgba(255,255,255,0.35);
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
	border-left: 1px solid rgba(255,255,255,0.08);
	padding-left: 0.9rem;
	transition: color 0.2s;
}
.goal-bar-report:hover { color: rgba(255,255,255,0.7); }

/* ============================
   Header Styles (Demo Design)
   ============================ */
.site-header {
	position: sticky;
	top: 38px;
	z-index: 200;
	background: rgba(13,2,33,0.92);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid rgba(255,255,255,0.07);
	width: 100%;
}

.header-top-bar {
	padding: 0 1.5rem;
}

.header-inner {
	max-width: 1200px;
	margin: 0 auto;
	height: 66px;
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

/* Logo */
.logo {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
	flex-shrink: 0;
}

.logo-icon {
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, #ffd700 0%, #ff9d00 100%);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	box-shadow: 0 3px 14px rgba(255,215,0,0.3);
	animation: logo-float 3.5s ease-in-out infinite;
	flex-shrink: 0;
}

@keyframes logo-float {
	0%,100% { transform: translateY(0); }
	50%      { transform: translateY(-3px); }
}

.logo-text .line1 {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 1.1rem;
	color: #ffd700;
	display: block;
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.logo-text .line2 {
	font-size: 0.62rem;
	color: rgba(255,255,255,0.7);
	display: block;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

/* Nav */
.main-navigation {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	margin-left: 0.5rem;
}

.main-navigation ul {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.main-navigation ul li a {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 700;
	font-size: 0.86rem;
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	padding: 0.38rem 0.78rem;
	border-radius: 999px;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}
.main-navigation ul li a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.main-navigation ul li a.active { background: rgba(255,215,0,0.12); color: #ffd700; }

.nav-dot { font-size: 14px; }

/* Age filter pills */
.age-pills {
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.age-pill {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 700;
	font-size: 0.75rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	cursor: pointer;
	border: 1.5px solid transparent;
	text-decoration: none;
	transition: all 0.2s;
	white-space: nowrap;
}

.age-pill.a35  { background: rgba(255,107,107,0.15); color: #ff9f9f; border-color: rgba(255,107,107,0.3); }
.age-pill.a68  { background: rgba(78,205,196,0.15); color: #7fe8e2; border-color: rgba(78,205,196,0.3); }
.age-pill.a912 { background: rgba(184,169,255,0.15); color: #c9bfff; border-color: rgba(184,169,255,0.3); }
.age-pill:hover { transform: scale(1.06); filter: brightness(1.2); }

/* CTA button */
.header-cta {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.88rem;
	padding: 0.55rem 1.25rem;
	background: linear-gradient(135deg, #ffd700 0%, #ff9d00 100%);
	color: #1a0533;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 14px rgba(255,215,0,0.35);
	flex-shrink: 0;
}

.header-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255,215,0,0.5);
}

/* Mobile menu toggle */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	color: #fff;
	font-size: 1.5rem;
}

.ttw-story-content {
	max-width: 800px;
	margin: 40px auto;
	padding: 20px;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 10px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ttw-story-title {
	margin-top: 0;
	color: inherit;
}

.ttw-story-thumb {
	margin-bottom: 20px;
}

.ttw-story-thumb img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.ttw-story-body {
	line-height: 1.8;
	color: #444;
}

.ttw-archive {
	max-width: 1200px;
	margin: 40px auto;
	padding: 20px;
}

.ttw-archive-title {
	text-align: center;
	margin-bottom: 40px;
}

.ttw-story-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.ttw-card {
	background: rgba(255, 255, 255, 0.9);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
}

.ttw-card:hover {
	transform: translateY(-5px);
}

.ttw-card-thumb {
	display: block;
}

.ttw-card-thumb img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.ttw-card-body {
	padding: 20px;
}

.ttw-card-title {
	margin-top: 0;
	margin-bottom: 10px;
}

.ttw-card-title a {
	text-decoration: none;
	color: inherit;
}

.ttw-card-char {
	display: inline-block;
	background: var(--ttw-char-accent, #666);
	color: white;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.85em;
	margin-bottom: 10px;
}

.ttw-card-excerpt {
	color: #666;
	line-height: 1.6;
}

/* ============================
   Mobile Menu Styles
   ============================ */
.main-navigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 20px;
}

.main-navigation ul li a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s;
}

.main-navigation ul li a:focus {
	outline: 2px solid #f9d84a;
	outline-offset: 2px;
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid currentColor;
	padding: 8px 16px;
	cursor: pointer;
	font-size: 16px;
}

.menu-toggle:focus {
	outline: 2px solid #f9d84a;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.menu-toggle {
		display: block;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(0, 0, 0, 0.9);
		padding: 20px;
		gap: 10px;
	}

	.main-navigation ul.ttw-menu-active {
		display: flex;
	}

	.ttw-menu-open {
		overflow: hidden;
	}
}

/* ============================
   Error Page Styles
   ============================ */
.ttw-error-page {
	max-width: 600px;
	margin: 100px auto;
	padding: 40px 20px;
	text-align: center;
}

.ttw-error-title {
	font-size: 80px;
	font-weight: bold;
	margin: 0 0 20px;
	color: #f9d84a;
}

.ttw-error-message {
	font-size: 24px;
	margin: 0 0 10px;
}

.ttw-error-description {
	color: #666;
	margin-bottom: 30px;
}

.ttw-error-home-btn {
	display: inline-block;
	background: #f9d84a;
	color: #1a1a40;
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.2s;
}

.ttw-error-home-btn:hover {
	background: #e5c43e;
}

.ttw-error-home-btn:focus {
	outline: 2px solid #1a1a40;
	outline-offset: 2px;
}

/* ============================
   Search Page Styles
   ============================ */
.ttw-search-page {
	max-width: 1200px;
	margin: 40px auto;
	padding: 20px;
}

.ttw-no-results {
	text-align: center;
	padding: 40px 20px;
}

.ttw-no-results-title {
	font-size: 32px;
	margin-bottom: 20px;
}

.ttw-no-results-message {
	color: #666;
	margin-bottom: 20px;
}

/* ============================
   Comments Styles
   ============================ */
.ttw-comments-area {
	max-width: 800px;
	margin: 40px auto;
	padding: 20px;
}

.ttw-comments-title {
	margin-bottom: 30px;
}

.ttw-comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ttw-comment-list li {
	margin-bottom: 20px;
	padding: 20px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
}

.ttw-no-comments {
	text-align: center;
	padding: 20px;
	color: #666;
}

.ttw-submit-btn {
	background: #f9d84a;
	color: #1a1a40;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 500;
}

.ttw-submit-btn:focus {
	outline: 2px solid #1a1a40;
	outline-offset: 2px;
}

/* ============================
   Accessibility: Focus States
   ============================ */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid #f9d84a;
	outline-offset: 2px;
}

/* ============================
   Accessibility: Reduced Motion
   ============================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============================
   Accessibility: Skip Link
   ============================ */
.skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: #f9d84a;
	color: #1a1a40;
	padding: 8px;
	z-index: 100;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 0;
}

/* ============================
   Footer Widgets
   ============================ */
.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
	padding: 40px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.footer-widgets .widget {
	padding: 20px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 8px;
}

.footer-widgets .widget-title {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 18px;
	color: #f9d84a;
}

.footer-widgets a {
	color: inherit;
	text-decoration: none;
}

.footer-widgets a:hover {
	color: #f9d84a;
}

/* ============================
   Footer Wave
   ============================ */
.ttw-footer-wave {
	width: 100%;
	height: 52px;
	overflow: hidden;
	line-height: 0;
	background: #0d0221;
}
.ttw-footer-wave svg { width: 100%; height: 100%; display: block; }

/* ============================
   Footer Styles (Demo Design)
   ============================ */
.site-footer {
	background: #070410;
	border-top: 1px solid rgba(255,255,255,0.06);
}

/* Goal tracker */
.ttw-footer-goal {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 2rem;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
.fgoal-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}
.fgoal-headline {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: clamp(1.15rem, 2.8vw, 1.6rem);
	line-height: 1.2;
}
.fgoal-headline .dream { color: #00e676; }
.fgoal-sub {
	font-size: 0.83rem;
	color: rgba(255,255,255,0.7);
	margin-top: 0.5rem;
	line-height: 1.65;
	max-width: 460px;
}
.fgoal-amount { text-align: right; flex-shrink: 0; }
.fgoal-big {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: clamp(1.7rem,4vw,2.5rem);
	color: #00e676;
	display: block;
	line-height: 1;
}
.fgoal-big-label {
	font-size: 0.68rem;
	color: rgba(255,255,255,0.7);
	letter-spacing: 0.07em;
	text-transform: uppercase;
	display: block;
	margin-top: 5px;
}
.fgoal-big-of {
	font-size: 0.75rem;
	color: rgba(255,255,255,0.28);
	display: block;
	margin-top: 3px;
}

/* Big bar */
.fgoal-track {
	width: 100%;
	height: 12px;
	background: rgba(255,255,255,0.06);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 0.6rem;
}
.fgoal-fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #00897b, #00e676, #69f0ae);
	background-size: 200%;
	width: 0%;
	transition: width 2s cubic-bezier(.16,1,.3,1);
	animation: bar-glow 3s linear infinite;
	position: relative;
}
.fgoal-fill::after {
	content: '';
	position: absolute;
	right: 0; top: 0; bottom: 0;
	width: 3px;
	background: rgba(255,255,255,0.8);
	border-radius: 999px;
}

/* Milestones */
.fgoal-milestones {
	display: flex;
	margin-bottom: 0.4rem;
}
.fmile {
	flex: 1;
	text-align: center;
	font-size: 0.65rem;
	font-family: 'Baloo Da 2', cursive;
	font-weight: 700;
	color: rgba(255,255,255,0.22);
	position: relative;
}
.fmile::before {
	content: '';
	display: block;
	width: 1px;
	height: 5px;
	background: rgba(255,255,255,0.12);
	margin: 0 auto 3px;
}
.fmile.hit { color: #00e676; }
.fmile.hit::before { background: #00e676; }

/* Monthly card */
.fgoal-monthly {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	background: rgba(0,230,118,0.1);
	border: 1px solid rgba(0,230,118,0.14);
	border-radius: 14px;
	padding: 1rem 1.25rem;
	margin-top: 1.5rem;
}
.fmonthly-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.fmonthly-icon {
	width: 40px; height: 40px;
	background: rgba(0,230,118,0.12);
	border-radius: 11px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}
.fmonthly-title {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.88rem;
	color: #fff;
}
.fmonthly-sub {
	font-size: 0.73rem;
	color: rgba(255,255,255,0.7);
	margin-top: 2px;
}
.fmonthly-stats { display: flex; gap: 1.5rem; }
.fmstat-num {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 1.1rem;
	display: block;
	color: #fff;
}
.fmstat-label {
	font-size: 0.62rem;
	color: rgba(255,255,255,0.7);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.fmonthly-cta {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.78rem;
	padding: 0.42rem 1.1rem;
	background: rgba(0,230,118,0.12);
	color: #00e676;
	border: 1px solid rgba(0,230,118,0.28);
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s;
}
.fmonthly-cta:hover { background: rgba(0,230,118,0.22); }

/* Footer grid */
.ttw-footer-grid {
	max-width: 1200px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 2rem;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 2rem;
}
.fbrand-logo { margin-bottom: 0.9rem; }
.fbrand-desc {
	font-size: 0.83rem;
	color: rgba(255,255,255,0.7);
	line-height: 1.7;
	max-width: 230px;
	margin-bottom: 1.1rem;
}
.fkids {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 1.1rem;
}
.fkid {
	width: 34px; height: 34px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.12);
	display: flex; align-items: center; justify-content: center;
	font-size: 16px;
	transition: transform 0.2s;
}
.fkid:hover { transform: scale(1.14); }
.fkid.s { background: linear-gradient(135deg,#ff85a1,#c77dff); }
.fkid.f { background: linear-gradient(135deg,#4ecdc4,#0077b6); }
.fkid.j { background: linear-gradient(135deg,#ffd700,#ff9d00); }
.fkids-label { font-size: 0.7rem; color: rgba(255,255,255,0.7); font-weight: 600; }

.fsocials { display: flex; gap: 0.4rem; }
.fsocial {
	width: 34px; height: 34px;
	border-radius: 9px;
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.09);
	display: flex; align-items: center; justify-content: center;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
}
.fsocial:hover { background: rgba(255,255,255,0.13); transform: translateY(-2px); }

.fcol h4 {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.75rem;
	color: #ffd700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-bottom: 0.9rem;
}
.fcol ul { list-style: none; }
.fcol ul li { margin-bottom: 0.48rem; }
.fcol ul li a {
	font-size: 0.82rem;
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	transition: color 0.2s, gap 0.2s;
}
.fcol ul li a:hover { color: #fff; gap: 0.6rem; }
.fcol ul li a i { font-size: 9px; opacity: 0.4; font-style: normal; }

/* Stats bar */
.ttw-footer-stats {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.25rem 1.5rem;
	border-top: 1px solid rgba(255,255,255,0.05);
	display: flex;
	gap: 1.5rem;
	align-items: center;
	flex-wrap: wrap;
}
.fstat { text-align: center; }
.fstat-num {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 1.25rem;
	color: #ffd700;
	display: block;
}
.fstat-label {
	font-size: 0.65rem;
	color: rgba(255,255,255,0.7);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.fstat-div { width: 1px; height: 30px; background: rgba(255,255,255,0.07); flex-shrink: 0; }

/* Newsletter */
.fnewsletter {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.fnewsletter span {
	font-size: 0.8rem;
	color: rgba(255,255,255,0.7);
	font-weight: 600;
	white-space: nowrap;
}
.fnl-form { display: flex; gap: 0.4rem; }
.fnl-form input {
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 999px;
	padding: 0.4rem 0.95rem;
	color: #fff;
	font-size: 0.8rem;
	font-family: 'Nunito', sans-serif;
	outline: none;
	width: 175px;
	transition: border-color 0.2s, background 0.2s;
}
.fnl-form input::placeholder { color: rgba(255,255,255,0.3); }
.fnl-form input:focus { border-color: #ffd700; background: rgba(255,255,255,0.11); }
.fnl-form button {
	background: linear-gradient(135deg,#ffd700,#ff9d00);
	color: #1a0533;
	border: none;
	border-radius: 999px;
	padding: 0.4rem 1rem;
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.78rem;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.2s;
}
.fnl-form button:hover { transform: scale(1.04); }

/* Bottom bar */
.ttw-footer-bottom {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 1.5rem 1.75rem;
	border-top: 1px solid rgba(255,255,255,0.04);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.ttw-footer-bottom p {
	font-size: 0.73rem;
	color: rgba(255,255,255,0.3);
}
.ttw-footer-bottom p a {
	color: rgba(255,255,255,0.42);
	text-decoration: none;
	transition: color 0.2s;
}
.ttw-footer-bottom p a:hover { color: #ffd700; }
.fmade {
	font-size: 0.73rem;
	color: rgba(255,255,255,0.3);
	display: flex;
	align-items: center;
	gap: 0.3rem;
}
.fheart {
	color: #ff6b6b;
	animation: hb 1.6s ease-in-out infinite;
}
@keyframes hb { 0%,100%{transform:scale(1)} 50%{transform:scale(1.28)} }

/* Responsive for goal bar and footer */
@media (max-width: 960px) {
	.ttw-nav, .ttw-age-pills { display: none; }
	.ttw-toggle { display: flex; margin-left: auto; }
	.ttw-cta { display: none; }
	.ttw-footer-grid { grid-template-columns: 1fr 1fr; }
	.fnewsletter { margin-left: 0; width: 100%; }
	.fgoal-monthly .fmonthly-stats { display: none; }
}
@media (max-width: 600px) {
	.goal-bar-report { display: none; }
	.goal-bar-nums { display: none; }
	.ttw-footer-grid { grid-template-columns: 1fr; }
	.ttw-footer-stats { gap: 0.8rem; justify-content: center; }
	.fstat-div { display: none; }
	.fgoal-top { flex-direction: column; }
	.fgoal-amount { text-align: left; }
	.fmile:nth-child(even) { display: none; }

	/* Center footer content on mobile */
	.fcol.fbrand {
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.fbrand-logo { margin-bottom: 0.9rem; }
	.fbrand-desc { margin: 0 auto 1.1rem; text-align: center; }
	.fkids { flex-direction: row; align-items: center; justify-content: center; }
	.fsocials { justify-content: center; }
	.fcol h4, .fcol ul { text-align: center; }
	.fcol ul li a { justify-content: center; }
	.fnewsletter { justify-content: center; margin-left: 0; }
	.ttw-footer-bottom { flex-direction: column; text-align: center; }

	/* Left align logo text on mobile */
	.logo-text { text-align: left; }
}

/* Load More Button */
.ttw-load-more-container {
	text-align: center;
	margin-top: 3rem;
	padding: 2rem 0;
}
.ttw-load-more-btn {
	background: linear-gradient(135deg, #ffd700, #ff9d00);
	color: #1a0533;
	border: none;
	border-radius: 999px;
	padding: 0.85rem 2.5rem;
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 1rem;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}
.ttw-load-more-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}
.ttw-load-more-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}
.ttw-loading {
	display: inline-block;
	margin-left: 1rem;
	color: rgba(255,255,255,0.7);
	font-size: 0.9rem;
}

/* Search Bar */
.ttw-search-bar {
	margin-top: 1.5rem;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}
.ttw-search-bar form {
	display: flex;
	gap: 0.5rem;
}
.ttw-search-input {
	flex: 1;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 999px;
	padding: 0.7rem 1.2rem;
	color: #fff;
	font-size: 0.95rem;
	font-family: 'Nunito', sans-serif;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}
.ttw-search-input::placeholder {
	color: rgba(255,255,255,0.4);
}
.ttw-search-input:focus {
	border-color: #ffd700;
	background: rgba(255,255,255,0.15);
}
.ttw-search-btn {
	background: linear-gradient(135deg, #ffd700, #ff9d00);
	color: #1a0533;
	border: none;
	border-radius: 999px;
	width: 46px;
	height: 46px;
	font-size: 1.2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s, box-shadow 0.2s;
	flex-shrink: 0;
}
.ttw-search-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

/* Old footer styles (keep for backward compatibility) */
.footer-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 2rem 2rem;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 2.5rem;
}

.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p {
	font-size: 0.875rem;
	color: rgba(255,255,255,0.85);
	line-height: 1.7;
	max-width: 240px;
	margin-bottom: 1.25rem;
}

/* Kids avatars */
.kids-row {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	margin-bottom: 1.25rem;
}
.kid-bubble {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: transform 0.2s;
}
.kid-bubble:hover { transform: scale(1.15); }
.kid-bubble.s { background: linear-gradient(135deg, #ff85a1, #c77dff); }
.kid-bubble.f { background: linear-gradient(135deg, #4ecdc4, #0077b6); }
.kid-bubble.j { background: linear-gradient(135deg, #ffd700, #ff9d00); }
.kids-label { font-size: 0.75rem; color: rgba(255,255,255,0.85); font-weight: 600; }

/* Social */
.social-row { display: flex; gap: 0.5rem; }
.social-btn {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
}
.social-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

.footer-col h4 {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.85rem;
	color: #ffd700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col ul li a {
	font-size: 0.875rem;
	color: rgba(255,255,255,0.85);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	transition: color 0.2s, gap 0.2s;
}
.footer-col ul li a:hover { color: #fff; gap: 0.6rem; }
.footer-col ul li a .li-dot { font-size: 10px; opacity: 0.5; }

/* Stats row */
.footer-stats {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 2rem;
	border-top: 1px solid rgba(255,255,255,0.06);
	display: flex;
	gap: 2rem;
	align-items: center;
	flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 1.4rem;
	color: #ffd700;
	display: block;
}
.stat-label {
	font-size: 0.72rem;
	color: rgba(255,255,255,0.85);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.1); }

/* Newsletter mini */
.footer-newsletter {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}
.footer-newsletter span {
	font-size: 0.85rem;
	color: rgba(255,255,255,0.85);
	font-weight: 600;
	white-space: nowrap;
}
.newsletter-form {
	display: flex;
	gap: 0.5rem;
}
.newsletter-form input {
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.15);
	border-radius: 999px;
	padding: 0.45rem 1rem;
	color: #fff;
	font-size: 0.85rem;
	font-family: 'Nunito', sans-serif;
	outline: none;
	width: 180px;
	transition: border-color 0.2s, background 0.2s;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form input:focus { border-color: #ffd700; background: rgba(255,255,255,0.12); }
.newsletter-form button {
	background: linear-gradient(135deg, #ffd700, #ff9d00);
	color: #1a0533;
	border: none;
	border-radius: 999px;
	padding: 0.45rem 1rem;
	font-family: 'Baloo Da 2', cursive;
	font-weight: 800;
	font-size: 0.82rem;
	cursor: pointer;
	transition: transform 0.2s;
	white-space: nowrap;
}
.newsletter-form button:hover { transform: scale(1.04); }

/* Bottom bar */
.footer-bottom {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 2rem 1.5rem;
	border-top: 1px solid rgba(255,255,255,0.05);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.footer-bottom p {
	font-size: 0.78rem;
	color: rgba(255,255,255,0.4);
}
.footer-bottom p a { color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-bottom p a:hover { color: #ffd700; }
.made-with {
	font-size: 0.78rem;
	color: rgba(255,255,255,0.4);
	display: flex;
	align-items: center;
	gap: 0.3rem;
}
.made-with .heart { color: #ff6b6b; animation: heartbeat 1.5s ease-in-out infinite; }
@keyframes heartbeat {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

/* Mobile Menu Container (Desktop) */
.ttw-mobile-menu-container {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
	.age-pills { display: none; }
	.header-cta { font-size: 0.8rem; padding: 0.5rem 1rem; }
	.main-navigation ul li a { font-size: 0.85rem; padding: 0.4rem 0.7rem; }
}

@media (max-width: 900px) {
	.ttw-mobile-menu-container { display: none; }
	.menu-toggle { display: flex; }
	.header-cta { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
	.footer-main { grid-template-columns: 1fr 1fr; }
	.footer-newsletter { margin-left: 0; width: 100%; }
}

@media (max-width: 767px) {
	.header-top-bar { padding: 0 1rem; }
	.header-inner {
		flex-wrap: nowrap;
		height: auto;
		padding: 0.75rem 0;
		gap: 0.75rem;
	}
	.logo {
		flex: 1;
		min-width: 0;
	}
	.logo-text .line1 { font-size: 1rem; }
	.logo-text .line2 { font-size: 0.6rem; }
	.header-cta {
		font-size: 0.7rem;
		padding: 0.35rem 0.7rem;
		white-space: nowrap;
	}
	.menu-toggle {
		padding: 0.25rem;
		font-size: 1.25rem;
	}
	.ttw-home-content { padding: 2rem 1rem 3rem; }
	.ttw-home-hero { padding: 1.5rem 0.5rem 2rem; }
	.ttw-home-hero h1 { font-size: 1.8rem; }
	.ttw-home-cards-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }

	/* Mobile menu open state */
	.ttw-mobile-menu-container.ttw-menu-active {
		display: flex !important;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: rgba(0,0,0,0.95);
		padding: 1.5rem;
		gap: 1rem;
		z-index: 1000;
	}
	.ttw-mobile-menu-container.ttw-menu-active .main-navigation ul {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}
	.ttw-mobile-menu-container.ttw-menu-active .main-navigation ul li {
		width: 100%;
	}
	.ttw-mobile-menu-container.ttw-menu-active .main-navigation ul li a {
		padding: 0.75rem 1rem;
		border-radius: 8px;
		text-align: center;
		justify-content: center;
	}
	.ttw-mobile-menu-container.ttw-menu-active .age-pills {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}
	.ttw-mobile-menu-container.ttw-menu-active .age-pill {
		width: 100%;
		text-align: center;
	}
	.ttw-mobile-menu-container.ttw-menu-active .header-cta {
		width: 100%;
		text-align: center;
		margin-top: 0.5rem;
	}
}

@media (max-width: 600px) {
	.header-top-bar { padding: 0 0.75rem; }
	.footer-main { grid-template-columns: 1fr; text-align: center; padding: 2rem 1rem 1.5rem; }
	.footer-brand { display: flex; flex-direction: column; align-items: center; }
	.footer-brand p { text-align: center; }
	.kids-row { justify-content: center; }
	.social-row { justify-content: center; }
	.footer-col ul { display: flex; flex-direction: column; align-items: center; }
	.footer-stats { gap: 1rem; justify-content: center; width: 100%; padding: 1rem 0.75rem; }
	.stat-divider { display: none; }
	.footer-newsletter { margin-left: 0; justify-content: center; width: 100%; }
	.newsletter-form { justify-content: center; }
	.newsletter-form input { width: 100%; }
	.footer-bottom { flex-direction: column; text-align: center; padding: 1rem 0.75rem 1.5rem; }
	.ttw-home-content { padding: 1.5rem 0.75rem 2rem; }
	.ttw-home-hero { padding: 1rem 0 1.5rem; }
	.ttw-btn-primary, .ttw-btn-ghost { padding: 0.6rem 1.5rem; font-size: 0.9rem; }
}

/* ============================
   Homepage Styles
   ============================ */
.ttw-home-stars-layer {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

.ttw-home-star {
	position: absolute;
	background: #fff;
	border-radius: 50%;
	animation: ttw-twinkle var(--d, 3s) ease-in-out infinite var(--delay, 0s);
}

@keyframes ttw-twinkle {
	0%, 100% { opacity: 0.2; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.4); }
}

.ttw-home-moon {
	position: fixed;
	top: 60px;
	right: 5%;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #fffde7, #ffd700 60%, #f9a825);
	box-shadow: 0 0 40px rgba(255,215,0,0.3), 0 0 80px rgba(255,215,0,0.1);
	animation: ttw-moon-drift 8s ease-in-out infinite;
	pointer-events: none;
	z-index: 1;
}

.ttw-home-moon::after {
	content: '';
	position: absolute;
	top: 15px;
	left: 18px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: rgba(255,255,255,0.3);
}

@keyframes ttw-moon-drift {
	0%, 100% { transform: translateY(0) rotate(-5deg); }
	50% { transform: translateY(-12px) rotate(5deg); }
}

.ttw-home-scene-strip {
	position: relative;
	z-index: 10;
	width: 100%;
	height: 56px;
	overflow: hidden;
	pointer-events: none;
}

.ttw-home-scene-strip svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ttw-home-content {
	position: relative;
	z-index: 10;
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 2rem 5rem;
}

.ttw-home-hero {
	text-align: center;
	padding: 2rem 1rem 3rem;
}

.ttw-home-hero h1 {
	font-family: 'Baloo Da 2', cursive, sans-serif;
	font-size: clamp(2rem, 6vw, 3.5rem);
	font-weight: 800;
	line-height: 1.15;
	margin-bottom: 1rem;
	color: #fff;
}

.ttw-home-hero h1 em {
	font-style: normal;
	color: #ffd700;
}

.ttw-home-hero p {
	font-size: 1.1rem;
	color: rgba(255,255,255,0.85);
	max-width: 520px;
	margin: 0 auto 2rem;
	line-height: 1.7;
}

.ttw-hero-btn-row {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

.ttw-btn-primary {
	font-family: 'Baloo Da 2', cursive, sans-serif;
	font-weight: 800;
	font-size: 1rem;
	padding: 0.8rem 2rem;
	background: linear-gradient(135deg, #ffd700, #ff9d00);
	color: #1a0533;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 6px 24px rgba(255,215,0,0.4);
	transition: transform 0.2s, box-shadow 0.2s;
}

.ttw-btn-primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(255,215,0,0.5);
}

.ttw-btn-ghost {
	font-family: 'Baloo Da 2', cursive, sans-serif;
	font-weight: 700;
	font-size: 1rem;
	padding: 0.8rem 2rem;
	background: rgba(255,255,255,0.08);
	color: #fff;
	border-radius: 999px;
	text-decoration: none;
	border: 1.5px solid rgba(255,255,255,0.2);
	transition: background 0.2s;
}

.ttw-btn-ghost:hover {
	background: rgba(255,255,255,0.15);
}

.ttw-home-cards-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25rem;
	margin-top: 3rem;
}

.ttw-home-story-card {
	background: rgba(255,255,255,0.07);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 20px;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.25s, box-shadow 0.25s;
	cursor: pointer;
}

.ttw-home-story-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.ttw-card-scene {
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	position: relative;
	overflow: hidden;
}

.ttw-card-scene-ocean { background: linear-gradient(180deg, #0077b6 0%, #023e8a 100%); }
.ttw-card-scene-forest { background: linear-gradient(180deg, #2d6a4f 0%, #1b4332 100%); }
.ttw-card-scene-galaxy { background: linear-gradient(180deg, #03045e 0%, #0d0221 100%); }
.ttw-card-scene-magic { background: linear-gradient(180deg, #7b2d8b 0%, #4a1259 100%); }
.ttw-card-scene-default { background: linear-gradient(180deg, #1a0533 0%, #2d1b5e 100%); }

.ttw-card-body {
	padding: 1rem;
}

.ttw-card-title {
	font-family: 'Baloo Da 2', cursive, sans-serif;
	font-weight: 700;
	font-size: 0.9rem;
	color: #fff;
	margin-bottom: 0.4rem;
	line-height: 1.3;
}

.ttw-card-meta {
	display: flex;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.ttw-card-tag {
	font-size: 0.7rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255,255,255,0.12);
	color: rgba(255,255,255,0.7);
}

.ttw-home-footer-wave {
	position: relative;
	z-index: 10;
	width: 100%;
	height: 60px;
	overflow: hidden;
	pointer-events: none;
	margin-top: 2rem;
}

.ttw-home-footer-wave svg {
	width: 100%;
	height: 100%;
	display: block;
}

@media (max-width: 900px) {
	.ttw-home-moon {
		width: 50px;
		height: 50px;
	}
}

@media (max-width: 600px) {
	.ttw-home-hero h1 {
		font-size: 1.8rem;
	}
}
