:root {
    --primary-green: #4A7c59;
    --light-green: #F3F8F3;
    --text-dark: #1a1a1a;
    --accent-gold: #D4AF37;
    --pw-green: #2e7d32; 
    --modal-bg: #4A7c59; 
}

/* =========================================
   GLOBAL MASTER FONT THEME (Desktop & Mobile)
   ========================================= */
/* Force the clean, highly-readable standard app font on EVERY page */
body, body * {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Master Cartoony Text Style (Applies to Index and Catalog globally) */
.blog-cartoony-text,
.blog-cartoony-text *,
.weather-card span,
.vine-separator h2 {
    color: #ffffff !important;
    
    /* Force the clean shadow method everywhere to prevent overlapping inner lines */
    -webkit-text-stroke: 0px transparent !important; 
    text-shadow: -1px -1px 0 #1a1a1a, 
                  1px -1px 0 #1a1a1a, 
                 -1px  1px 0 #1a1a1a, 
                  1px  1px 0 #1a1a1a, 
                  2px 3px 0px rgba(0,0,0,0.8) !important;
                  
    font-weight: 900 !important; 
    letter-spacing: 0.5px;
}

/* Thinner outlines for smaller paragraph text so it doesn't blob together */
.blog-cartoony-text div,
.blog-cartoony-text span,
.blog-cartoony-text p {
    text-shadow: -0.5px -0.5px 0 #1a1a1a, 
                  0.5px -0.5px 0 #1a1a1a, 
                 -0.5px  0.5px 0 #1a1a1a, 
                  0.5px  0.5px 0 #1a1a1a, 
                  1px 1px 2px rgba(0,0,0,0.8) !important;
    font-weight: 600 !important;
}

/* Re-apply the structural layout rules */
.cartoony-card {
    border-radius: 15px !important; 
    border: 4px solid #333 !important; 
    box-shadow: 6px 6px 0px rgba(0,0,0,0.8) !important;
    overflow: hidden;
    position: relative;
}
.cartoony-card > * { position: relative; z-index: 20; }
.centered-flex-grid { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 30px; }
.centered-flex-grid .plant-card { width: 100%; max-width: 350px; }

/* --- HEADER & NAVIGATION --- */
header {
    background-color: var(--pw-green); color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); position: sticky; top: 0; z-index: 1000;
}
.header-container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; gap: 10px; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
nav a { text-decoration: none; color: rgba(255,255,255,0.9); font-weight: 500; }

/* --- HERO --- */
#hero-banner {
    position: fixed; top: 0; left: 0; width: 100%; height: 50vh; z-index: 0;
    display: flex; align-items: center; justify-content: center; overflow: hidden; background-color: var(--primary-green);
}
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 2s ease-in-out; z-index: 1; }
.hero-slide.active { opacity: 1; }
.hero-overlay {
    background: rgba(0,0,0,0.6); color: #fff; padding: 2rem; border-radius: 12px; z-index: 2;
    max-width: 90%; width: 800px; text-align: center; backdrop-filter: blur(4px);
}

/* --- FIX: Image Framing --- */
.dash-hero-img { 
    width: 100%; 
    max-width: 400px; 
    height: 250px; 
    object-fit: cover; 
    border-radius: 16px; 
    margin: 0 auto 15px auto;
    display: block;
}

/* --- FIX: Stop text-shadow from clipping on badges --- */
.plant-modal-content .tag-badge {
    background: rgba(0, 0, 0, 0.4) !important; 
    border-radius: 25px !important;
    padding: 8px 16px !important;
    overflow: visible !important; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8) !important; 
}

/* --- PAGE LAYOUT --- */
.page-content {
    position: relative; z-index: 10; background-color: var(--light-green); margin-top: 50vh;
    padding-bottom: 40px; box-shadow: 0 -10px 25px rgba(0,0,0,0.15); border-top: 1px solid rgba(0,0,0,0.05);
}
.catalog-container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }

/* --- SEARCH & TAGS --- */
.search-container { margin-bottom: 20px; }
.search-tags { text-align: center; margin-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tag { 
    display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; 
    margin-bottom: 5px; font-weight: 600; cursor: pointer; transition: all 0.2s; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); background: white; border: 1px solid #ddd;
}
.tag:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.tag-community-favs { 
    background-color: #E8F5E9 !important; 
    color: #2E7D32 !important; 
    border: 1px solid #A5D6A7 !important; 
}

/* --- SEPARATOR --- */
.vine-separator { 
    text-align: center; margin: 40px auto 30px auto; 
    position: relative; max-width: 800px; height: 20px; 
}
.vine-separator::before {
    content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 12px; margin-top: -6px;
    background: radial-gradient(circle at 50% 100%, transparent 6px, var(--primary-green) 7px, var(--primary-green) 9px, transparent 10px),
                radial-gradient(circle at 50% 0%, transparent 6px, var(--primary-green) 7px, var(--primary-green) 9px, transparent 10px);
    background-size: 20px 20px; background-position: 0 100%, 10px 0; opacity: 0.6;
}
.vine-separator h2 {
    display: inline-block; background: var(--light-green); padding: 0 25px;
    color: var(--primary-green); font-family: 'Georgia', serif; font-size: 1.8rem; 
    position: relative; z-index: 2; margin: -10px 0 0 0;
}

/* --- PLANT GRID --- */
.plant-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 25px; }
.grid-header { grid-column: 1 / -1; color: var(--primary-green); border-bottom: 2px solid #ddd; padding-bottom: 10px; margin-top: 30px; font-size: 1.5em; font-weight: bold; }
.grid-header.dead-header { color: #757575 !important; border-bottom: 2px solid #bdbdbd !important; background: #f5f5f5; padding: 5px 10px; border-radius: 5px; }

.plant-card { 
    background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    display: flex; flex-direction: column; border-top: 4px solid var(--primary-green); 
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s; border: 1px solid transparent;
}
.plant-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.plant-card.selected-card {
    border: 4px solid #FFD700 !important; background-color: #fffde7 !important;
    transform: scale(1.02) rotate(-1deg); box-shadow: 8px 8px 0px #333 !important; z-index: 5;
}
.bulk-checkbox { width: 25px; height: 25px; accent-color: #FFD700; cursor: pointer; }
.plant-img-box { height: 250px; background: #e0e0e0; position: relative; overflow: hidden; } 
.plant-img-box img { width: 100%; height: 100%; object-fit: cover; }
.plant-details { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.plant-details h3 { margin: 0; color: var(--primary-green); font-size: 1.15rem; }

/* --- DATA BADGES --- */
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 5px 0; }
.data-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-dark); background: #f5f5f5; border: 1px solid #e0e0e0; }
.badge-qty { background: #ffebee; color: #b71c1c; border: 1px solid #ffcdd2; }
.badge-sun { background: #fffde7; color: #f57f17; border: 1px solid #fff59d; }

/* --- TAG STYLES --- */
.tag-proven-winners { background-color: #fff !important; color: var(--pw-green) !important; border: 1px solid var(--pw-green) !important; font-weight: 700; }
.tag-home-depot { background-color: #F96302 !important; color: white !important; border: 1px solid #E65100 !important; }
.tag-lowes { background-color: #004990 !important; color: white !important; border: 1px solid #002f5e !important; }
.tag-david-austin { background-color: #FCE4EC !important; color: #880E4F !important; border: 1px solid #F8BBD0 !important; font-family: 'Georgia', serif; }
.tag-natures-classic { background-color: #558B2F !important; color: white !important; border: 1px solid #33691E !important; }
.tag-blew-label { background-color: #2979FF !important; color: white !important; border: 1px solid #2962FF !important; }

.tag-year-2021 { background-color: #E3F2FD !important; color: #0d47a1 !important; border: 1px solid #90CAF9 !important; }
.tag-year-2022 { background-color: #BBDEFB !important; color: #0d47a1 !important; border: 1px solid #64B5F6 !important; }
.tag-year-2023 { background-color: #90CAF9 !important; color: #000 !important; border: 1px solid #42A5F5 !important; }
.tag-year-2024 { background-color: #42A5F5 !important; color: #fff !important; border: 1px solid #1E88E5 !important; }
.tag-year-2025 { background-color: #1E88E5 !important; color: #fff !important; border: 1px solid #1565C0 !important; }
.tag-year-2026 { background-color: #1565C0 !important; color: #fff !important; border: 1px solid #0D47A1 !important; }

/* BED COLORS */
.tag-bed-dead { background: #eeeeee !important; color: #757575 !important; border: 1px solid #bdbdbd !important; }
.tag-bed-ko-ja-garden { background: #B2DFDB; color: #004D40; border-color: #00695C; } 
.tag-bed-oma-s-garden { background: #F8BBD0; color: #880E4F; border-color: #C2185B; } 
.tag-bed-boo-boo-s-garden { background: #DCEDC8; color: #33691E; border-color: #689F38; } 
.tag-bed-aunt-sharon-s-garden { background: #E1BEE7; color: #4A148C; border-color: #7B1FA2; } 
.tag-bed-grandma-emily-barwaz-garden { background: #FFE0B2; color: #E65100; border-color: #F57C00; } 
.tag-bed-grandpa-duke-of-earl-middleton-garden { background: #C5CAE9; color: #1A237E; border-color: #303F9F; } 
.tag-bed-jimmy-john-s-blue-s-garden { background: #B3E5FC; color: #01579B; border-color: #0288D1; } 
.tag-bed-sister-elizabeth-s-garden { background: #FFF9C4; color: #F57F17; border-color: #FBC02D; } 
.tag-bed-uncle-dennis-garden { background: #D7CCC8; color: #3E2723; border-color: #5D4037; } 
.tag-bed-the-4-season-garden { background: #FFCDD2; color: #B71C1C; border-color: #D32F2F; } 
.tag-bed-china-town-garden { background: #FFCCBC; color: #BF360C; border-color: #D84315; } 
.tag-bed-all-animals-go-to-heaven { background: #E0F7FA; color: #006064; border-color: #0097A7; } 
.tag-bed-barwaz-garden { background: #F0F4C3; color: #827717; border-color: #AFB42B; } 
.tag-bed-kona-s-garden { background: #D1C4E9; color: #311B92; border-color: #512DA8; } 
.tag-bed-korea-garden { background: #FFECB3; color: #FF6F00; border-color: #FF8F00; } 
.tag-bed-river-garden { background: #B2EBF2; color: #006064; border-color: #00BCD4; } 
.tag-bed-the-royal-run { background: #E040FB; color: #fff; border-color: #AA00FF; } 
.tag-bed-karta-s-corner-garden { background: #C8E6C9; color: #1B5E20; border-color: #388E3C; } 
.tag-bed-jason-s-terrace { background: #FFAB91; color: #BF360C; border-color: #FF5722; } 
.tag-bed-to-be-sorted { background: #E3F2FD; color: #1565C0; border-color: #42A5F5; } 
.tag-bed-zen-garden { background: #FFF59D; color: #F57F17; border-color: #FBC02D; } 
.tag-bed-orchard-grove { background: #E6EE9C; color: #558B2F; border-color: #9E9D24; } 

.tag-everygreen { background-color: #E8F5E9 !important; color: #1B5E20 !important; border: 1px solid #2E7D32 !important; }
.tag-hydrangea { background-color: #E3F2FD !important; color: #1565C0 !important; border: 1px solid #90CAF9 !important; }
.tag-rose { background-color: #FCE4EC !important; color: #C2185B !important; border: 1px solid #F8BBD0 !important; }
.tag-japanese-maple { background-color: #FFEBEE !important; color: #B71C1C !important; border: 1px solid #EF9A9A !important; }
.tag-phlox { background-color: #F1F8E9 !important; color: #558B2F !important; border: 1px solid #C5E1A5 !important; }
.tag-heuchera { background-color: #F9FBE7 !important; color: #827717 !important; border: 1px solid #E6EE9C !important; }
.tag-coleus { background-color: #E0F2F1 !important; color: #00695C !important; border: 1px solid #80CBC4 !important; }
.tag-hosta { background-color: #E8F5E9 !important; color: #2E7D32 !important; border: 1px solid #A5D6A7 !important; }
.tag-company { background: #e3f2fd; color: #0d47a1; }
.tag-family { background: #f1f8e9; color: #33691e; }

/* --- ADMIN --- */
.admin-bar { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; text-align: center; }
#bulk-toolbar { background: #fff8e1; padding: 10px; border-radius: 5px; margin: 10px 0; display: none; }
.btn { padding: 10px 20px; border: none; border-radius: 4px; color: white; cursor: pointer; background: var(--primary-green); font-weight: bold; }
.btn-red { background: #f44336; } .btn-blue { background: #2196F3; }
.spinner { display: inline-block; width: 30px; height: 30px; border: 3px solid #ccc; border-radius: 50%; border-top-color: var(--primary-green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* --- FOOTER --- */
footer { 
    background: var(--primary-green); 
    color: white; 
    text-align: center; 
    padding: 30px; 
    margin-top: 0px; /* Removes the transparent gap */
    position: relative; /* Required to make z-index work */
    z-index: 20; /* Forces the footer to slide OVER the fixed background image */
}
/* --- FLOATING ACTION BAR --- */
#bulk-floater {
    position: fixed; bottom: -150px; left: 50%; transform: translateX(-50%);
    background: #fff; border: 3px solid #000; box-shadow: 5px 5px 0px rgba(0,0,0,0.8);
    padding: 15px 25px; border-radius: 50px; display: flex; gap: 20px; align-items: center;
    z-index: 1000; transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#bulk-floater.active { bottom: 30px; }
#count-badge { background: #FF5252; color: white; font-weight: bold; padding: 5px 12px; border-radius: 20px; font-size: 1.1rem; border: 2px solid #000; }

/* =========================================
   FULL SCREEN "SOOTHING GREEN" PAGE (Pop-Out)
   ========================================= */
.plant-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
    display: none; z-index: 9999; align-items: center; justify-content: center;
    padding: 15px;
    overscroll-behavior: contain; 
}
.plant-modal-content {
    width: 100%; max-width: 800px; height: 100%; max-height: 95vh;
    background: var(--modal-bg); border-radius: 12px; color: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); border: none;
    display: flex; flex-direction: column; overflow: hidden; margin: auto;
}
#modal-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.dash-header { background: transparent; padding: 20px; text-align: center; flex-shrink: 0; }
.dash-header h2 { font-size: 1.8rem; margin: 0; }
.dash-scroller { flex: 1; padding: 0 20px 40px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dash-hero-img { width: 100%; max-height: 250px; object-fit: contain; border-radius: 8px; margin-bottom: 15px; }
.dash-tags-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
.tag-badge { background: rgba(255,255,255,0.2); color: #fff; padding: 6px 14px; border-radius: 20px; font-weight: bold; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.3); }
.dash-pills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.dash-pill { border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding: 5px 0; display: flex; flex-direction: column; }
.dash-pill.full-width { grid-column: 1 / -1; }
.pill-label { color: rgba(255,255,255,0.7); font-size: 0.75rem; font-weight: bold; text-transform: uppercase; margin-bottom: 2px; }
.pill-value { color: #fff; font-weight: 600; font-size: 1.1rem; }
.dash-notes-stack { display: flex; flex-direction: column; gap: 20px; }

/* NOTES FADE-IN */
.dash-note { 
    background: transparent; opacity: 0; transform: translateY(30px); 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}
.dash-note.visible { opacity: 1; transform: translateY(0); }
.modal-close { background: #FFD700; color: #000; border: none; padding: 15px 40px; border-radius: 25px; font-weight: bold; margin-bottom: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: transform 0.2s; font-size: 1.2rem; }
.modal-close:hover { transform: scale(1.05); }

/* --- TIMELINE CSS --- */
.timeline-container {
    display: flex !important;
    flex-direction: row !important; 
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 5px;
}
.timeline-pill { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 !important; background: #e0e0e0; padding: 2px; border-radius: 20px; flex-grow: 1; overflow: hidden; margin: 0; }
.plant-modal-content .timeline-pill { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255,255,255,0.1); }
.month-dot { font-size: 0.65rem; display: flex; align-items: center; justify-content: center; height: 22px; color: #999; font-weight: 700; margin: 0 !important; border-radius: 0 !important; transform: scale(1.02); position: relative; z-index: 1; }
.plant-modal-content .month-dot { color: rgba(255,255,255,0.4); }
.month-dot.active-grow { background: var(--primary-green); color: white !important; z-index: 2; }
.plant-modal-content .month-dot.active-grow { background: #81c784 !important; color: #ffffff !important; }
.month-dot.active-bloom { background: #ff8a80; color: white !important; z-index: 2; }
.month-dot.active-grow:first-child, .month-dot:not(.active-grow) + .month-dot.active-grow { border-top-left-radius: 10px !important; border-bottom-left-radius: 10px !important; }
.month-dot.active-bloom:first-child, .month-dot:not(.active-bloom) + .month-dot.active-bloom { border-top-left-radius: 10px !important; border-bottom-left-radius: 10px !important; }
.month-dot.active-grow:last-child, .month-dot.active-grow:has(+ :not(.active-grow)) { border-top-right-radius: 10px !important; border-bottom-right-radius: 10px !important; }
.month-dot.active-bloom:last-child, .month-dot.active-bloom:has(+ :not(.active-bloom)) { border-top-right-radius: 10px !important; border-bottom-right-radius: 10px !important; }

/* --- WIDGET STYLE (General) --- */
.glass-widget { display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.08); padding: 12px 15px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.15); width: 100%; backdrop-filter: blur(4px); box-shadow: inset 0 1px 1px rgba(255,255,255,0.1); position: relative; overflow: visible; margin-bottom: 8px; }
.widget-info { display: flex; flex-direction: column; justify-content: center; z-index: 5; }

/* --- WATER --- */
.water-scene { position: relative; width: 40px; height: 50px; flex-shrink: 0; }
.water-bucket { width: 32px; height: 36px; border: 3px solid #333; border-top: none; border-radius: 4px 4px 12px 12px; position: absolute; bottom: 0; left: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.5); z-index: 2; }
.water-bucket::before { content: ''; position: absolute; top: 0; left: -3px; right: -3px; height: 4px; border: 3px solid #333; border-bottom: none; border-radius: 4px 4px 0 0; z-index: 5; }

.watering-can { position: absolute; top: -10px; right: -10px; font-size: 24px; z-index: 10; opacity: 0; animation: pourAction 4s ease-in-out infinite; }
.water-stream { position: absolute; top: 15px; left: 20px; width: 4px; background: #64B5F6; height: 0; z-index: 1; opacity: 0; border-radius: 2px; animation: streamFlow 4s ease-in-out infinite; }
.water-layer { position: absolute; bottom: 0; left: 0; width: 100%; height: 0; transition: none; }
.water-dark { background: linear-gradient(180deg, #1565C0 0%, #0D47A1 100%); z-index: 1; animation: fillUp 4s ease-out infinite; }
.water-light { background: linear-gradient(180deg, #64B5F6 0%, #2196F3 100%); z-index: 2; box-shadow: 0 -1px 4px rgba(0,0,0,0.2); animation: fillUp 4s ease-out infinite; }

/* --- SUN --- */
.sun-scene { width: 44px; height: 44px; position: relative; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #81D4FA; border: 2px solid #333; transition: background 0.5s ease; }
.sun-orb { width: 20px; height: 20px; background: #FFD600; border-radius: 50%; position: absolute; top: 6px; right: 6px; z-index: 1; box-shadow: 0 0 10px rgba(255, 214, 0, 0.8), 0 0 20px rgba(255, 214, 0, 0.4); animation: sunSpin 12s linear infinite; }
.sun-orb::after { content: ''; position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; border: 3px dashed rgba(255, 214, 0, 0.6); border-radius: 50%; }
.cloud-puff { width: 28px; height: 16px; background: #fff; border-radius: 10px; position: absolute; bottom: 8px; left: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 5; opacity: 0.9; }
.cloud-puff::before { content: ''; position: absolute; top: -8px; left: 4px; width: 12px; height: 12px; background: #fff; border-radius: 50%; }
.cloud-puff::after { content: ''; position: absolute; top: -5px; right: 4px; width: 10px; height: 10px; background: #fff; border-radius: 50%; }
.cloud-second { width: 20px; height: 12px; background: #eee; border-radius: 10px; position: absolute; bottom: 20px; left: -5px; z-index: 4; opacity: 0.8; }
.cloud-second::before { content: ''; position: absolute; top: -5px; left: 4px; width: 8px; height: 8px; background: #eee; border-radius: 50%; }
.sky-full { background: #29B6F6; } .sky-part { background: #81D4FA; } .sky-shade { background: #78909C; }
.cloud-hidden { opacity: 0; transform: scale(0.5); } .cloud-partial { animation: cloudBob 4s ease-in-out infinite; } .cloud-full { animation: cloudDrift 8s linear infinite; opacity: 1; transform: scale(1.1); } .cloud-animate { animation: passCloud 5s ease-in-out infinite; }

/* --- THERMOMETER (BLUE TO RED) --- */
.therm-scene { width: 20px; height: 44px; position: relative; margin: 0 10px; flex-shrink: 0; animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.therm-glass { width: 10px; height: 40px; background: rgba(255,255,255,0.6); border: 2px solid #333; border-radius: 10px; position: absolute; top: 0; left: 5px; overflow: hidden; z-index: 1; }

/* FIX 1: Changed bottom anchor to top:28px so it never detaches from the glass tube! */
.therm-bulb { width: 18px; height: 18px; background: #fff; border: 2px solid #333; border-radius: 50%; position: absolute; top: 28px; left: 1px; z-index: 2; box-shadow: 0 2px 5px rgba(0,0,0,0.2); overflow: hidden; }

/* FIX 2: Restored the riseLiquid animation so the fluid stops where it is supposed to */
.therm-liquid { 
    width: 100%; position: absolute; bottom: 0; left: 0; 
    background: linear-gradient(to top, #0D47A1, #B71C1C) !important; 
    border-radius: 0 0 5px 5px; animation: riseLiquid 1.2s ease-out 0.4s forwards; height: 0; z-index: 0; 
}
.therm-liquid.therm-loop {
    background: linear-gradient(to top, #0D47A1, #B71C1C) !important;
    animation: pulseThermometer 2s ease-in-out infinite alternate !important;
}

/* The Bulb Liquid is locked to Deep Blue to match the bottom of the gradient */
.therm-bulb-liquid { 
    width: 100%; height: 100%; 
    background: #0D47A1 !important; 
    border-radius: 50%; position: absolute; bottom: 0; left: 0; z-index: 3; 
}
.therm-bulb-liquid.therm-bulb-loop {
    transform: scale(1) !important; width: 100% !important; height: 100% !important; 
    background: #0D47A1 !important; 
    animation: none !important;
}

/* FIX 3: Safely limits the height animations so they don't shoot out of the glass */
@keyframes riseLiquid { from { height: 0%; } to { height: var(--therm-height, 50%); } }
@keyframes pulseThermometer { 0% { height: var(--min-h, 20%); } 100% { height: var(--max-h, 80%); } }

/* --- RULER --- */
.ruler-scene { position: relative; width: 60px; height: 30px; background: rgba(255, 255, 255, 0.5); border: 2px solid #333; border-radius: 4px; flex-shrink: 0; overflow: hidden; background-image: linear-gradient(90deg, rgba(0,0,0,0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.15) 1px, transparent 1px); background-size: 10px 100%, 2px 50%; background-position: 0 0, 0 100%; background-repeat: repeat-x; }
.ruler-bar { position: absolute; bottom: 0; left: 0; height: 8px; background: var(--accent-gold); border-radius: 0 2px 2px 0; box-shadow: 0 0 8px rgba(212, 175, 55, 0.4); animation: growRuler 1.2s ease-out forwards; width: 0; }

/* --- FERTILIZER --- */
.fert-scene { width: 44px; height: 44px; position: relative; flex-shrink: 0; border-radius: 50%; border: 2px solid #333; background: rgba(121, 85, 72, 0.1); overflow: hidden; }
.dirt-mound { position: absolute; bottom: -5px; left: -5px; right: -5px; height: 25px; background: #5D4037; border-radius: 50% 50% 0 0; transform-origin: bottom; transform: scaleY(0); animation: pileUpDirt 4s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.dirt-particles { position: absolute; top: -10px; left: 0; width: 100%; height: 100%; background-image: radial-gradient(#8D6E63 1.5px, transparent 1.5px); background-size: 10px 10px; opacity: 0; animation: continuousPour 4s linear infinite; }
.sprout { position: absolute; bottom: 18px; left: 50%; margin-left: -6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 12px solid #66BB6A; transform: scale(0); animation: growSprout 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite; }
.sprout::after { content: ''; position: absolute; top: 2px; left: -6px; width: 12px; height: 12px; background: #66BB6A; border-radius: 0 10px 0 10px; transform: rotate(-15deg); }

/* --- ATTRACTS --- */
.attracts-scene { position: relative; width: 60px; height: 50px; background: rgba(255,255,255,0.4); border-radius: 8px; flex-shrink: 0; border: 2px solid #333; overflow: visible; }
.flower-center { position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); font-size: 26px; z-index: 1; }
.pollinator-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; }
.bee { font-size: 18px; margin-top: -10px; animation: infinityLoop 4s linear infinite; }
.butterfly { font-size: 22px; margin-top: -10px; animation: infinityLoop 4s linear infinite; animation-delay: 1s; }
.hummingbird { 
    font-size: 22px; 
    margin-left: 0; 
    margin-top: -10px; 
    animation: traceW 4s ease-in-out infinite; 
}
.bird { font-size: 22px; top: auto; bottom: 5px; animation: hopLeftRight 4s ease-in-out infinite; }

/* ANIMATIONS */
@keyframes infinityLoop {
    0%   { transform: translate(-50%, -50%) translate(0, 0) scaleX(1); z-index: 2; } 
    12.5%{ transform: translate(-50%, -50%) translate(15px, -7px) scaleX(1); }
    25%  { transform: translate(-50%, -50%) translate(30px, 0) scaleX(1); z-index: 0; } 
    37.5%{ transform: translate(-50%, -50%) translate(15px, 7px) scaleX(1); }
    50%  { transform: translate(-50%, -50%) translate(0, 0) scaleX(-1); z-index: 2; } 
    62.5%{ transform: translate(-50%, -50%) translate(-15px, -7px) scaleX(-1); }
    75%  { transform: translate(-50%, -50%) translate(-30px, 0) scaleX(-1); z-index: 0; }
    87.5%{ transform: translate(-50%, -50%) translate(-15px, 7px) scaleX(-1); }
    100% { transform: translate(-50%, -50%) translate(0, 0) scaleX(1); z-index: 2; }
}
@keyframes hopLeftRight {
    0%   { transform: translate(-50%, 0) translate(0, 0) scaleX(1); }
    10%  { transform: translate(-50%, 0) translate(-10px, -10px) scaleX(1); }
    20%  { transform: translate(-50%, 0) translate(-20px, 0) scaleX(1); }
    25%  { transform: translate(-50%, 0) translate(-20px, 0) scaleX(-1); }
    35%  { transform: translate(-50%, 0) translate(-10px, -10px) scaleX(-1); }
    45%  { transform: translate(-50%, 0) translate(0, 0) scaleX(-1); }
    55%  { transform: translate(-50%, 0) translate(10px, -10px) scaleX(-1); }
    65%  { transform: translate(-50%, 0) translate(20px, 0) scaleX(-1); }
    70%  { transform: translate(-50%, 0) translate(20px, 0) scaleX(1); }
    80%  { transform: translate(-50%, 0) translate(10px, -10px) scaleX(1); }
    90%  { transform: translate(-50%, 0) translate(0, 0) scaleX(1); }
    100% { transform: translate(-50%, 0) translate(0, 0) scaleX(1); }
}
@keyframes traceW {
    /* ➡️ Fly forward (Left to Right) */
    0%   { transform: translate(-50%, -50%) translate(-35px, -25px) scaleX(1); } /* Top Left */
    12.5%{ transform: translate(-50%, -50%) translate(-15px, 10px) scaleX(1); }  /* Dip to left side of flower */
    25%  { transform: translate(-50%, -50%) translate(0px, -20px) scaleX(1); }   /* Hover over center */
    37.5%{ transform: translate(-50%, -50%) translate(15px, 10px) scaleX(1); }   /* Dip to right side of flower */
    49%  { transform: translate(-50%, -50%) translate(35px, -25px) scaleX(1); }  /* Top Right */
    
    /* ↩️ Flip horizontally to face left */
    50%  { transform: translate(-50%, -50%) translate(35px, -25px) scaleX(-1); }
    
    /* ⬅️ Reverse the W (Right to Left) */
    62.5%{ transform: translate(-50%, -50%) translate(15px, 10px) scaleX(-1); }  /* Dip to right side */
    75%  { transform: translate(-50%, -50%) translate(0px, -20px) scaleX(-1); }   /* Hover over center */
    87.5%{ transform: translate(-50%, -50%) translate(-15px, 10px) scaleX(-1); }  /* Dip to left side */
    99%  { transform: translate(-50%, -50%) translate(-35px, -25px) scaleX(-1); } /* Back to Top Left */
   
    /* ↪️ Flip horizontally to face right for the next loop */
    100% { transform: translate(-50%, -50%) translate(-35px, -25px) scaleX(1); }
}
@keyframes streamFlow { 
    0%, 100% { height: 0; top: 15px; opacity: 0; } 
    15% { height: 35px; top: 15px; opacity: 0.8; } 
    65% { height: 35px; top: 15px; opacity: 0.8; } 
    75% { height: 0; top: 50px; opacity: 0; } 
}
@keyframes fillUp { 
    0%, 15% { height: 0; } 
    35%, 75% { height: var(--final-height, 25px); } 
    90%, 100% { height: 0; } 
}
@keyframes sunSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes riseLiquid { from { height: 0%; } to { height: var(--therm-height); } }
@keyframes growRuler { from { width: 0; } to { width: var(--ruler-width); } }
@keyframes pileUpDirt { 
    0%, 10% { transform: scaleY(0); } 
    30%, 80% { transform: scaleY(1); } 
    90%, 100% { transform: scaleY(0); } 
}
@keyframes growSprout { 
    0%, 35% { transform: scale(0); } 
    55%, 80% { transform: scale(1); } 
    90%, 100% { transform: scale(0); } 
}
@keyframes fillBulb { from { transform: scale(0); }  to { transform: scale(1); } }
@keyframes pulseThermometer {
    0% { height: var(--min-h); }
    100% { height: var(--max-h); }
}

/* --- CYCLING MODAL THEMES & BASE PATTERNS --- */
.plant-card, .plant-modal-content {
    position: relative; overflow: hidden; transition: background-color 0.5s ease; 
}
.plant-card > *, .plant-modal-content > * { position: relative; z-index: 20; }

.plant-card::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Ctext x='10' y='30' font-size='24' opacity='0.8'%3E🌿%3C/text%3E%3Ctext x='70' y='90' font-size='24' opacity='0.8'%3E✨%3C/text%3E%3Ctext x='30' y='80' font-size='18' opacity='0.8'%3E⭐%3C/text%3E%3Ctext x='80' y='30' font-size='18' opacity='0.8'%3E🌱%3C/text%3E%3C/svg%3E");
    background-size: 120px 120px; opacity: 0.1;
}

[class*="bg-theme-"]::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; background-size: 150px 150px;
    opacity: 0.15; /* Dim by default */
    transition: filter 0.1s ease-out, opacity 0.3s ease;
}

/* 🔥 NEW: Color-shifting glowing icons triggered by gyroscope! */
.plant-modal-content.holographic-active::before {
    opacity: 0.8 !important; /* Make the icons pop */
    filter: hue-rotate(var(--tilt-deg, 0deg)) saturate(250%) drop-shadow(0px 0px 4px rgba(255,255,255,0.7));
}

.bg-theme-0 { background-color: #FFF9C4; }
.bg-theme-0::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🐶%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E🌸%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🐕%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E🌼%3C/text%3E%3C/svg%3E"); }
.bg-theme-1 { background-color: #E3F2FD; }
.bg-theme-1::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🚿%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E🌳%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🌲%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E💧%3C/text%3E%3C/svg%3E"); }
.bg-theme-2 { background-color: #FFE0B2; }
.bg-theme-2::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🏡%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E🌱%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🏠%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E🪴%3C/text%3E%3C/svg%3E"); }
.bg-theme-3 { background-color: #E0F7FA; }
.bg-theme-3::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🐦%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E☁️%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🕊️%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E🌤️%3C/text%3E%3C/svg%3E"); }
.bg-theme-4 { background-color: #FFECB3; }
.bg-theme-4::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🐝%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E🌻%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🍯%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E✨%3C/text%3E%3C/svg%3E"); }
.bg-theme-5 { background-color: #E8EAF6; }
.bg-theme-5::before { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Ctext x='15' y='40' font-size='30' opacity='0.9'%3E🦋%3C/text%3E%3Ctext x='90' y='120' font-size='30' opacity='0.9'%3E🌿%3C/text%3E%3Ctext x='40' y='110' font-size='24' opacity='0.9'%3E🐛%3C/text%3E%3Ctext x='100' y='50' font-size='24' opacity='0.9'%3E🍃%3C/text%3E%3C/svg%3E"); }

/* --- HOLOGRAPHIC FOIL --- */
.plant-card.holographic-active {
    transition: transform 0.1s ease-out, box-shadow 0.2s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}
.plant-card.holographic-active::after, 
.plant-modal-content.holographic-active::after {
    content: ""; position: absolute; inset: 0; z-index: 10; pointer-events: none; border-radius: inherit;
    background-image: linear-gradient(115deg, rgba(255, 0, 100, 0.3) 0%, rgba(255, 150, 0, 0.3) 20%, rgba(255, 255, 0, 0.3) 40%, rgba(0, 255, 0, 0.3) 60%, rgba(0, 255, 255, 0.3) 80%, rgba(0, 0, 255, 0.3) 100%);
    background-size: 300% 300%;
    background-position: var(--mouse-x, 50%) var(--mouse-y, 50%);
    transition: background-position 0.1s ease-out;
}

/* Apply to both the grid cards and the modal content */
.plant-card, 
.plant-modal-content {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background-position 0.3s ease;
}

.holographic-active:hover {
    transition: transform 0.1s linear;
}

/* --- FIREWORK PARTICLES --- */
.firework-particle { position: fixed; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 99999; opacity: 1; transition: transform 0.8s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.8s ease-out; }

/* --- HIGH CONTRAST OUTLINED TEXT (Desktop) --- */
.plant-modal-content .dash-header h2,
.plant-modal-content .dash-header div,
.plant-modal-content .note-header,
.plant-modal-content .note-body,
.plant-modal-content .pill-label,
.plant-modal-content .pill-value,
.plant-modal-content .widget-label,
.plant-modal-content .widget-value,
.plant-modal-content .timeline-label,
.plant-modal-content .month-dot,
.plant-modal-content .tag-badge {
    color: #ffffff !important;
    text-shadow: -1px -1px 0 #1a1a1a, 1px -1px 0 #1a1a1a, -1px 1px 0 #1a1a1a, 1px 1px 0 #1a1a1a, 0px 4px 6px rgba(0,0,0,0.6) !important;
    font-weight: 900 !important; 
    letter-spacing: 0.5px;
}
.plant-modal-content .dash-note { 
    background: rgba(0, 0, 0, 0.25) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important; 
    border-radius: 16px !important; 
    padding: 15px !important; 
    border: 1px solid rgba(255,255,255,0.2) !important; 
    margin-bottom: 15px; 
}

/* Let's also give the header inside it a little room to breathe */
.plant-modal-content .note-header { 
    border-bottom: 1px solid rgba(255,255,255,0.2) !important; 
    padding-bottom: 8px !important; 
    margin-bottom: 8px !important;
}
.plant-modal-content .glass-widget { 
    background: rgba(0, 0, 0, 0.25) !important; 
    border: 1px solid rgba(255,255,255,0.2) !important; 
}

/* --- ENHANCED FAVORITE STAR & BANNER --- */
.star-wrapper { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; margin-left: 10px; }
.fav-star {
    font-size: 2.8rem; 
    color: rgba(255, 255, 255, 0.7); 
    text-shadow: -1px -1px 0 #1a1a1a, 1px -1px 0 #1a1a1a, -1px 1px 0 #1a1a1a, 1px 1px 0 #1a1a1a, 0 4px 6px rgba(0,0,0,0.4); 
    cursor: pointer; line-height: 1; transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s;
    user-select: none; display: inline-block; -webkit-tap-highlight-color: transparent;
}
.fav-star.read-only { cursor: default !important; }
.fav-star.read-only:hover { transform: scale(1) rotate(0deg) !important; }

.fav-star.favorited {
    color: #FFD700; 
    text-shadow: -1px -1px 0 #8B6508, 1px -1px 0 #8B6508, -1px 1px 0 #8B6508, 1px 1px 0 #8B6508, 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 165, 0, 0.6); 
}
.fav-star:hover:not(.read-only) { transform: scale(1.2) rotate(5deg); }
.fav-star.animate-pop { animation: starPopBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes starPopBounce { 0% { transform: scale(1); } 40% { transform: scale(1.9) rotate(25deg); } 70% { transform: scale(0.9) rotate(-15deg); } 100% { transform: scale(1); } }

.fav-banner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #FFD700, #FF8C00); color: #fff; text-shadow: 1px 1px 0 #b36200; font-size: 0.65rem; font-weight: 900;
    padding: 4px 10px; border-radius: 20px; white-space: nowrap; box-shadow: 0 4px 8px rgba(0,0,0,0.4); pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 30; border: 1px solid #FFF;
}
.fav-banner.show { transform: translate(-50%, 18px) scale(1); }

/* =========================================
   PARALLAX BACKGROUND FEATURE
   ========================================= */
.parallax-container {
    position: absolute;
    inset: 0;
    z-index: 0; 
    pointer-events: none; 
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    transition: transform 0.1s ease-out;
    will-change: transform;
    transform: translate(
        calc(var(--move-x, 0px) * var(--speed, 1)), 
        calc(var(--move-y, 0px) * var(--speed, 1))
    ) rotate(calc(var(--move-x, 0px) * 0.5deg));
}

.parallax-star {
    color: rgba(255, 215, 0, 0.6);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    font-size: 1.5rem;
}

.parallax-user {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 900;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    white-space: nowrap;
}

#modal-body > * {
    position: relative;
    z-index: 10;
}

/* =========================================
   NEW: PLANT GALLERY VERTICAL CAROUSEL
   ========================================= */

.plant-gallery-carousel {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 500px; /* Lock exact height */
    margin: 15px auto 0 auto;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden; /* This hides the pictures stacked below the viewable area */
}

.gallery-slides-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row; 
    transition: transform 0.4s ease-in-out; 
    will-change: transform;
}

.gallery-slide {
    width: 100%;
    height: 100%; 
    flex-shrink: 0; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
    opacity: 1 !important; 
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    cursor: pointer;
}

/* OVERLAYS FOR THUMBS UP & TRASH CAN */
.gallery-controls-overlay {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    pointer-events: none;
    z-index: 20;
}

.cartoony-btn {
    pointer-events: auto;
    background: #fff;
    border: 3px solid #333;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1.4rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 2px 4px 0 #333;
    transition: transform 0.1s, box-shadow 0.1s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333 !important;
    text-shadow: none !important;
}

.cartoony-btn:active {
    transform: translate(2px, 4px);
    box-shadow: 0 0 0 #333;
}

.delete-gal-btn { background: #ff5252; color: white !important; padding: 10px 15px; }
.thumb-btn { background: #ffeb3b; }

.pop-anim { animation: thumbPop 0.3s ease; }
@keyframes thumbPop { 50% { transform: scale(1.3) rotate(-10deg); } }

/* NAVIGATION ARROWS */
.cartoony-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    background: #fff;
    border: 3px solid #333;
    border-radius: 50%;
    width: 55px; 
    height: 55px; 
    font-size: 2rem; 
    font-weight: 900;
    color: #333;
    cursor: pointer;
    box-shadow: 2px 4px 0 #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 3px;
    transition: transform 0.1s, box-shadow 0.1s;
}

.cartoony-nav:active:not(.disabled) {
    transform: translateY(calc(-50% + 4px)) translateX(2px);
    box-shadow: 0 0 0 #333;
}

.cartoony-nav.disabled {
    opacity: 0.35;
    filter: grayscale(100%);
    cursor: default;
    box-shadow: none;
    background: #e0e0e0;
}

.prev-arrow { left: 10px; }
.next-arrow { right: 10px; }
.gallery-upload-zone { text-align: center; }
.note-gallery { align-items: center !important; }
.note-gallery .note-header { text-align: center !important; justify-content: center !important; width: 100%; }

/* =========================================
   CARTOONY GUESTBOOK STYLING
   ========================================= */
.comment-section {
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 20px;
    border: 2px dashed rgba(46, 125, 50, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 20px auto 50px auto !important; 
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.comment-form {
    display: flex;
    flex-direction: column !important; 
    align-items: center;
    gap: 15px;
    width: 100%;
}

.comment-form input {
    width: 100% !important; 
    max-width: 400px;
    border-radius: 30px !important;
    border: 3px solid #333 !important;
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    background: #fff;
    box-shadow: 3px 4px 0px rgba(0,0,0,0.8) !important;
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box; 
}

.comment-form input:focus {
    outline: none;
    border-color: var(--pw-green) !important;
    transform: translateY(-2px);
    box-shadow: 3px 6px 0px rgba(0,0,0,0.8) !important;
}

.comment-form button {
    width: 100% !important;
    max-width: 400px;
    border-radius: 30px !important;
    border: 3px solid #333 !important;
    padding: 15px 30px !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    background: #FFD700 !important;
    color: #333 !important;
    box-shadow: 3px 4px 0px rgba(0,0,0,0.8) !important;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.comment-form button:active {
    transform: translate(3px, 4px) !important;
    box-shadow: 0px 0px 0px rgba(0,0,0,0.8) !important;
}

/* =========================================
   MASSIVE WEATHER RADAR
   ========================================= */
iframe[src*="windy"] {
    width: 100% !important; 
    max-width: 1000px !important; 
    height: 600px !important; 
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border: 2px solid var(--pw-green);
}

.weather-container, 
div[style*="flex-direction: column"] > iframe {
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* =========================================
   WEATHER FORECAST MODULE
   ========================================= */
.weather-wrapper { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.weather-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 15px; 
}

.weather-header h3 { 
    margin: 0; 
    color: #2e7d32; 
    font-size: 1.8rem; 
    font-weight: 900; 
    -webkit-text-stroke: 1px #1a1a1a;
    text-shadow: 2px 3px 0px rgba(0,0,0,0.8);
}

.zip-input-group { display: flex; gap: 10px; align-items: center; }
.zip-input-group input { 
    padding: 10px 15px; 
    border-radius: 20px; 
    border: 3px solid #333; 
    font-size: 1.1rem; 
    font-weight: bold; 
    text-align: center; 
    width: 120px; 
}
.zip-input-group button { 
    padding: 10px 20px; 
    border-radius: 20px; 
    border: 3px solid #333; 
    background: #FFD700; 
    font-size: 1.1rem; 
    font-weight: 900; 
    cursor: pointer; 
    box-shadow: 3px 4px 0px rgba(0,0,0,0.8); 
    transition: transform 0.1s, box-shadow 0.1s;
}
.zip-input-group button:active { 
    transform: translate(3px, 4px); 
    box-shadow: 0px 0px 0px rgba(0,0,0,0.8); 
}

/* FORCES THE 3 RESULTS TO BE HORIZONTAL */
.forecast-grid { 
    display: flex !important; 
    flex-direction: row !important; 
    gap: 15px; 
    justify-content: space-between; 
    width: 100%; 
}

.weather-card {
    flex: 1; 
    background: #fff;
    border: 4px solid #333;
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 4px 6px 0px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.weather-card strong { 
    font-size: 1.4rem; 
    color: #333; 
    text-transform: uppercase; 
    font-weight: 900; 
}

.weather-card span { 
    font-size: 2.2rem !important; 
    font-weight: 900; 
    color: #1565c0; 
    -webkit-text-stroke: 1px #1a1a1a;
    text-shadow: 2px 3px 0px rgba(0,0,0,0.8); 
}

.weather-card small { 
    font-size: 1.1rem; 
    font-weight: 900; 
    color: #666; 
}

.verdict-badge {
    margin-top: auto;
    padding: 8px 12px;
    border-radius: 20px;
    border: 3px solid #333;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 2px 3px 0px rgba(0,0,0,0.5);
}
.v-good { background: #81c784; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); }
.v-ok { background: #FFD700; color: #333; }
.v-bad { background: #ff5252; color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.8); }


/* =========================================
   MASTER MOBILE FIX (Consolidated)
   ========================================= */
@media (max-width: 900px) { 
    .plant-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) { 
    /* General Feed & UI Elements */
    .plant-grid, .centered-flex-grid { 
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 30px; 
    }
    
    .plant-grid .plant-card, 
    .centered-flex-grid .plant-card {
        width: 100% !important;
        max-width: 650px !important; 
    }
    
    .catalog-container { padding: 15px !important; }
    
    #bulk-toolbar form { flex-direction: column !important; } 
    #bulk-toolbar select, #bulk-toolbar button { width: 100%; margin-bottom: 10px; height: 45px; } 
    .data-item:hover, .tag:hover, .data-item:active, .tag:active { white-space: normal !important; height: auto !important; overflow: visible !important; }

    /* Mobile Hero / Banner */
    #hero-banner {
        height: 65vh !important;
        padding-top: 130px !important;
        align-items: flex-start !important;
    }
    .hero-overlay {
        width: 92% !important;
        padding: 15px !important;
        max-height: calc(100% - 20px) !important;
        overflow-y: auto !important;
        margin-top: 10px !important;
    }

    /* Quick Filters */
    .quick-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .quick-filters select, 
    .quick-filters .tag-community-favs {
        width: 100% !important;
        margin: 0 !important;
        height: 48px; 
        font-size: 1rem !important;
    }

    /* Modal Layout */
    .plant-modal { padding: 0; } 
    .plant-modal-content { 
        height: 100%; 
        max-height: 100dvh; 
        width: 100%; 
        border-radius: 0; 
    }
    .dash-hero-img { height: 220px; } 
    .dash-pills-grid { grid-template-columns: 1fr; gap: 8px; }
    .dash-header h2 { font-size: 1.5rem !important; }
    .glass-widget { padding: 8px 12px; }
    .dash-tags-row { flex-direction: row; flex-wrap: wrap; justify-content: center; }

    /* Timelines */
    .timeline-pill { overflow: visible !important; border-radius: 25px !important; }
    .month-dot { height: 24px !important; font-size: 0.65rem !important; overflow: visible !important; }
    .timeline-label { width: 45px; font-size: 0.65rem; }

    /* Admin Form */
    #plantForm { display: flex !important; flex-direction: column !important; }
    #plantForm > div[style*="grid-template-columns: repeat(4"] { display: flex !important; flex-direction: column !important; }
    #plantForm > div[style*="display:flex"] { flex-wrap: wrap !important; }
    #plantForm input, #plantForm select, #plantForm textarea {
        width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; margin-bottom: 5px !important; 
    }
    
    /* Weather */
    iframe[src*="windy"] { height: 400px !important; }
    .forecast-grid { flex-direction: column !important; } 

    /* ---------------------------------------------------- */
    /* THE UNIFIED MOBILE FONT & OUTLINE FIX                */
    /* ---------------------------------------------------- */
    
    /* Force clean system font and KILL the buggy text-stroke everywhere */
    body, body *, .blog-cartoony-text, .blog-cartoony-text * {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        -webkit-text-stroke: 0px transparent !important; 
    }

    /* Target specific headers to keep them bold and outlined without stroke */
    .blog-cartoony-text strong,
    .vine-separator h2,
    .cartoony-btn,
    .weather-card span,
    .plant-modal-content .dash-header h2,
    .plant-modal-content .dash-header div,
    .plant-modal-content .note-header,
    .plant-modal-content .pill-value,
    .plant-modal-content .widget-value,
    .plant-modal-content .tag-badge,
    .fav-star {
        text-shadow: -1px -1px 0 #1a1a1a, 
                      1px -1px 0 #1a1a1a, 
                     -1px  1px 0 #1a1a1a, 
                      1px  1px 0 #1a1a1a, 
                      1px  3px 4px rgba(0,0,0,0.5) !important; 
        font-weight: 800 !important; 
    }
    
    /* Specifically soften the Blog Titles so they don't look over-stroked */
    h3.blog-cartoony-text,
    .plant-details h3.blog-cartoony-text {
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8) !important;
        font-weight: 700 !important;
        letter-spacing: normal !important;
    }

    /* Smaller text gets an even softer drop shadow */
    .blog-cartoony-text div,
    .blog-cartoony-text span,
    .blog-cartoony-text p,
    .plant-modal-content .note-body,
    .plant-modal-content .pill-label,
    .plant-modal-content .widget-label,
    .plant-modal-content .timeline-label,
    .plant-modal-content .month-dot {
        text-shadow: -0.5px -0.5px 0 #1a1a1a, 
                      0.5px -0.5px 0 #1a1a1a, 
                     -0.5px  0.5px 0 #1a1a1a, 
                      0.5px  0.5px 0 #1a1a1a, 
                      1px 1px 2px rgba(0,0,0,0.8) !important;
        font-weight: 600 !important;
    }
    
    /* Keep the boxes (cards, buttons) looking modern/flatter */
    .cartoony-card,
    .cartoony-btn,
    .comment-form input,
    .comment-form button,
    .weather-card,
    .zip-input-group button {
        box-shadow: 0px 4px 10px rgba(0,0,0,0.1) !important;
        border-width: 2px !important; 
    }
}

/* --- TINY SCREENS --- */
@media (max-width: 400px) {
    .timeline-label { width: 60px; font-size: 0.75rem; }
}
/* =========================================
   DESKTOP WIDGET ALIGNMENT & SIZING FIX
   ========================================= */
@media (min-width: 769px) {
    /* 1. Fix the overlap by constraining the width and standardizing the height */
    .plant-modal-content .glass-widget {
        box-sizing: border-box !important; /* Stops them from crashing into each other! */
        height: 100% !important; /* Forces every box in the row to be exactly the same size */
        margin-bottom: 0 !important; /* Let the grid handle the vertical spacing */
        padding: 8px 12px !important; /* Makes the box slightly smaller and tighter */
    }
    
    /* 2. Give the columns a little more breathing room */
    .dash-pills-grid {
        gap: 25px 20px !important; /* 25px vertical gap, 20px horizontal gap */
        align-items: stretch !important; 
    }

    /* 3. Slightly shrink the animated icons so they fit the new smaller boxes perfectly */
    .plant-modal-content .glass-widget > div:first-child {
        transform: scale(0.85);
        transform-origin: center left;
    }
}
.modal-close {
    position: sticky; /* Keeps it visible even if you scroll down the modal */
    top: 15px;
    left: 15px;
    z-index: 9999; /* Forces it to sit on top of everything else, including large images */
    background-color: #FFD700;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
}