:root {
    --bg-primary: #2c3e2d;
    --bg-secondary: #3a4f3c;
    --bg-tertiary: #495a4b;
    --accent-gold: #d4af37;
    --accent-sage: #8fbc8f;
    --accent-rose: #d4a574;
    --accent-cream: #f4efd3;
    --text-primary: #f9f5e7;
    --text-secondary: #e8dcc6;
    --text-muted: #c5b895;
    --border-organic: rgba(212, 175, 55, 0.2);
    --leaf-green: #7d8f5c;
    --earth-brown: #8b6f47;
    
    /* Consistent transition timings */
    --transition-micro: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-screen: 0.5s ease-in-out;
    --transition-long: 0.8s ease-in-out;
}

html {
    background-color: var(--bg-primary, #2c3e2d);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    transition: background 300s ease, background-color 300s ease;
    background-color: var(--bg-primary); /* Fallback color */
    /* Dynamic time-of-day background colors - will override the fallback when JS loads */
    background: 
        radial-gradient(ellipse at top, var(--bg-secondary, #3a4f3c) 0%, var(--bg-primary, #2c3e2d) 100%),
        linear-gradient(45deg, rgba(125, 143, 92, 0.03) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(139, 111, 71, 0.03) 0%, transparent 50%);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Simplified background without data URI for better compatibility */
    background: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.01) 0%, transparent 60%),
        radial-gradient(circle at 75% 75%, rgba(143, 188, 143, 0.01) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Time-of-day colors will be applied via CSS custom properties */

.font-brand { 
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.font-elegant { 
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
}

.art-nouveau-border {
    border-image: linear-gradient(45deg, 
        var(--accent-gold) 0%, 
        var(--accent-sage) 25%, 
        var(--accent-rose) 50%, 
        var(--accent-sage) 75%, 
        var(--accent-gold) 100%
    ) 1;
}
.themed-input {
    background: rgba(73, 90, 75, 0.4);
    border: 2px solid var(--border-organic);
    border-radius: 25px;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    text-align: center;
    outline: none;
    font-family: 'Crimson Text', serif;
    font-weight: 400;
    font-size: 16px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    width: 100%;
    max-width: 400px;
    padding: 18px 28px;
    box-shadow: 
        inset 0 2px 8px rgba(44, 62, 45, 0.3),
        0 2px 12px rgba(212, 175, 55, 0.1);
    position: relative;
}

.themed-input::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 27px;
    background: linear-gradient(
        45deg,
        var(--accent-gold) 0%,
        var(--accent-sage) 30%,
        var(--accent-rose) 60%,
        var(--accent-gold) 100%
    );
    opacity: 0;
    z-index: -1;
    transition: opacity 0.6s ease;
}

.themed-input:focus {
    border-color: transparent;
    background: rgba(73, 90, 75, 0.4);
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    box-shadow: 
        inset 0 2px 8px rgba(44, 62, 45, 0.4),
        0 4px 20px rgba(212, 175, 55, 0.2),
        0 0 0 1px rgba(244, 239, 211, 0.1);
    transform: translateY(-1px) scale(1.02);
}

.themed-input:focus::before {
    opacity: 1;
}

::placeholder {
    color: var(--text-muted);
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    opacity: 0.9;
}
.gentle-button {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-rose) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    color: var(--bg-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    padding: 16px 36px;
    min-height: 44px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all var(--transition-long);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.gentle-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(244, 239, 211, 0.1) 0%,
        transparent 50%,
        rgba(212, 175, 55, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gentle-button:hover {
    background: linear-gradient(135deg, var(--accent-cream) 0%, var(--accent-gold) 100%);
    color: var(--bg-primary);
    box-shadow: 
        0 8px 28px rgba(212, 175, 55, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.gentle-button:hover::before {
    opacity: 1;
}

.gentle-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 16px rgba(212, 165, 116, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.gentle-button:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 3px;
}

.organic-panel {
    background: 
        linear-gradient(145deg, 
            rgba(73, 90, 75, 0.85) 0%, 
            rgba(58, 79, 60, 0.9) 100%);
    border: 2px solid var(--border-organic);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 12px 40px rgba(44, 62, 45, 0.4),
        0 6px 20px rgba(212, 175, 55, 0.1),
        inset 0 2px 0 rgba(244, 239, 211, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.organic-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--accent-gold) 25%, 
        var(--accent-sage) 50%, 
        var(--accent-rose) 75%, 
        transparent 100%);
    border-radius: 32px 28px 0 0;
    opacity: 0.8;
}

.organic-panel::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 26px 22px 29px 19px;
    pointer-events: none;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes gentle-unfold {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
.screen { 
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-screen), visibility var(--transition-screen);
}

.screen.active { 
    opacity: 1;
    visibility: visible;
}

#opening-container {
    background: radial-gradient(ellipse at center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    opacity: 1;
    transition: opacity 1.5s ease-in-out;
    z-index: 100;
    touch-action: none; /* Disable browser default touch actions like zoom */
}

#stones-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    width: 100%;
    min-height: 60vh;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar styling for organic feel */
#stones-grid::-webkit-scrollbar {
    width: 8px;
}

#stones-grid::-webkit-scrollbar-track {
    background: rgba(73, 90, 75, 0.2);
    border-radius: 4px;
}

#stones-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-sage));
    border-radius: 4px;
    opacity: 0.6;
}

#stones-grid::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

/* Landscape Object Styles */
.landscape-object { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 1rem; 
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}
.stone-visual, .growth-visual {
    cursor: grab;
}
.landscape-object:hover {
    transform: scale(1.02) translateY(-4px);
}

.landscape-object.dragging {
    transform: scale(1.05) translateY(-8px);
    z-index: 10;
    opacity: 0.8;
}

.landscape-object.drag-over {
    transform: scale(0.95);
    opacity: 0.5;
}

.landscape-object {
    cursor: grab;
}

.landscape-object:active {
    cursor: grabbing;
}
.stone-visual {
    width: 8rem; height: 8rem;
    background: linear-gradient(135deg, 
        rgba(73, 90, 75, 0.7) 0%, 
        rgba(58, 79, 60, 0.8) 100%);
    border-radius: 50% 45% 55% 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0.5rem; user-select: none;
    border: 2px solid var(--border-organic);
    box-shadow: 
        0 6px 20px rgba(44, 62, 45, 0.3),
        inset 0 2px 0 rgba(244, 239, 211, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
}

.stone-visual::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 50% 45% 55% 50%;
    pointer-events: none;
}

.stone-visual:hover {
    transform: scale(1.08) translateY(-6px) rotate(1deg);
    box-shadow: 
        0 12px 40px rgba(212, 175, 55, 0.25),
        0 6px 20px rgba(44, 62, 45, 0.4),
        inset 0 2px 0 rgba(244, 239, 211, 0.2);
    border-color: var(--accent-gold);
}
.growth-visual {
     display: flex; flex-direction: column; align-items: center; justify-content: center;
     text-align: center; user-select: none;
     position: relative;
     width: 9rem;
     height: 11rem;
     padding: 0.5rem;
     cursor: grab;
     transition: transform 0.3s ease;
}
.growth-visual:hover {
    transform: translateY(-2px);
}
.growth-visual::before {
    content: '';
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 0.5rem;
    background: radial-gradient(ellipse, rgba(0,0,0,0.2) 0%, transparent 70%);
    filter: blur(4px);
    z-index: -1;
}
.growth-visual svg { 
    width: 7rem; 
    height: 7rem; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)) brightness(1.1);
    transform-origin: bottom center;
    animation: gentleWind 8s ease-in-out infinite;
    transition: filter 0.3s ease;
}

.growth-visual img { 
    width: 7rem; 
    height: 7rem; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)) brightness(1.1);
    transform-origin: bottom center;
    animation: gentleWind 6s ease-in-out infinite;
    transition: filter 0.3s ease;
}
.growth-visual:hover svg {
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.4)) brightness(1.15);
}

@keyframes gentleWind {
    0% { 
        transform: rotate(0deg); 
    }
    25% { 
        transform: rotate(calc(var(--wind-intensity, 1) * 2deg)); 
    }
    50% { 
        transform: rotate(calc(var(--wind-intensity, 1) * -1.5deg)); 
    }
    75% { 
        transform: rotate(calc(var(--wind-intensity, 1) * 1deg)); 
    }
    100% { 
        transform: rotate(0deg); 
    }
}

@keyframes slowSway {
    0%, 100% { 
        transform: rotate(0deg); 
    }
    33% { 
        transform: rotate(calc(var(--wind-intensity, 1) * 0.3deg)); 
    }
    66% { 
        transform: rotate(calc(var(--wind-intensity, 1) * -0.3deg)); 
    }
}

/* Variant animations for natural diversity */
.growth-visual:nth-child(odd) svg {
    animation-duration: 9s;
    animation-delay: -2s;
}

.growth-visual:nth-child(even) svg {
    animation-duration: 7s;
    animation-delay: -4s;
}

.growth-visual:nth-child(3n) svg {
    animation-duration: 10s;
    animation-delay: -1s;
}

.growth-visual:nth-child(4n) svg {
    animation-duration: 6s;
    animation-delay: -3s;
}

.growth-visual:nth-child(5n) svg {
    animation-duration: 8.5s;
    animation-delay: -5s;
}
.growth-visual p { 
    margin-top: 0.8rem; 
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    max-width: 7rem;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.02em;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
/* Magical glow for trees */
.growth-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(125, 200, 135, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.growth-visual:hover::after {
    opacity: 0.8;
}

/* Forest-specific tree styling */
#forest-grid .growth-visual {
    margin: 0.5rem;
}

#forest-grid .growth-visual svg {
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)) brightness(1.05) saturate(0.9);
}

#forest-grid .growth-visual:hover svg {
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.35)) brightness(1.1) saturate(1);
}

.new-leaf {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 20px;
    height: 20px;
    background-color: #8FBCAD;
    border-radius: 50% 0 50% 0;
    animation: gentle-pulse 4s infinite;
}
@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 15px 5px rgba(251, 191, 36, 0.2); }
}

.gratitude-stone {
    width: 9rem; height: 11rem;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(212, 175, 55, 0.2) 0%, transparent 60%),
        linear-gradient(135deg, 
            rgba(232, 220, 198, 0.9) 0%,
            rgba(197, 184, 149, 0.8) 50%,
            rgba(168, 151, 117, 0.7) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    /* Organic river stone shape */
    border-radius: 55% 35% 65% 25%;
    padding: 1.5rem 1rem;
    margin: 0.75rem;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 2px 2px 8px rgba(212, 175, 55, 0.2),
        inset -2px -2px 8px rgba(139, 111, 71, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(212, 175, 55, 0.1);
}
.gratitude-stone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1) 0%,
        rgba(244, 239, 211, 0.05) 50%,
        rgba(212, 165, 116, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    border-radius: inherit;
}

.gratitude-stone:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 
        inset 3px 3px 12px rgba(212, 175, 55, 0.3),
        inset -3px -3px 12px rgba(139, 111, 71, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(212, 175, 55, 0.2),
        0 0 20px rgba(212, 175, 55, 0.15);
}

.gratitude-stone:hover::before {
    opacity: 1;
}
.gratitude-stone svg {
    width: 3.5rem;
    height: 3.5rem;
    stroke: var(--accent-gold);
    stroke-width: 1.5;
    fill: none;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}
.gratitude-stone:hover svg {
    stroke: var(--accent-cream);
    stroke-width: 2;
    transform: scale(1.1);
    filter: drop-shadow(0 3px 8px rgba(212, 175, 55, 0.4));
}

/* Stone Variations - Each stone is unique like Alexander's patterns */
.paving-stone.variant-1 {
    border-radius: 14px 10px 16px 9px;
    background: linear-gradient(145deg, var(--glass-bg), rgba(61, 73, 64, 0.8));
}

.paving-stone.variant-2 {
    border-radius: 18px 12px 15px 11px;
    background: linear-gradient(135deg, rgba(73, 90, 75, 0.7), rgba(58, 79, 60, 0.9));
    transform: rotate(-1deg);
}

.paving-stone.variant-3 {
    border-radius: 12px 16px 10px 14px;
    background: linear-gradient(155deg, rgba(125, 143, 92, 0.3), rgba(73, 90, 75, 0.8));
    transform: rotate(1.5deg);
}

.paving-stone.variant-4 {
    border-radius: 16px 8px 18px 12px;
    background: linear-gradient(125deg, rgba(139, 111, 71, 0.2), rgba(73, 90, 75, 0.85));
    transform: rotate(-0.5deg);
}

.paving-stone.variant-5 {
    border-radius: 10px 14px 12px 16px;
    background: linear-gradient(165deg, rgba(212, 175, 55, 0.1), rgba(73, 90, 75, 0.8));
    transform: rotate(2deg);
}

/* Gratitude Stone Variations */
.gratitude-stone.variant-1 {
    border-radius: 55% 35% 65% 25%;
}

.gratitude-stone.variant-2 {
    border-radius: 45% 60% 30% 70%;
    background: 
        radial-gradient(ellipse at 70% 30%, rgba(212, 165, 116, 0.25) 0%, transparent 50%),
        linear-gradient(145deg, 
            rgba(244, 239, 211, 0.85) 0%,
            rgba(212, 175, 55, 0.6) 40%,
            rgba(184, 162, 124, 0.8) 100%);
    transform: rotate(-2deg);
}

.gratitude-stone.variant-3 {
    border-radius: 65% 25% 55% 45%;
    background: 
        radial-gradient(ellipse at 20% 60%, rgba(143, 188, 143, 0.2) 0%, transparent 65%),
        linear-gradient(125deg, 
            rgba(225, 215, 190, 0.9) 0%,
            rgba(197, 184, 149, 0.85) 60%,
            rgba(158, 145, 112, 0.75) 100%);
    transform: rotate(1deg);
}

.gratitude-stone.variant-4 {
    border-radius: 40% 50% 70% 30%;
    background: 
        radial-gradient(ellipse at 50% 10%, rgba(212, 175, 55, 0.3) 0%, transparent 55%),
        linear-gradient(155deg, 
            rgba(238, 228, 205, 0.88) 0%,
            rgba(206, 193, 162, 0.82) 50%,
            rgba(175, 160, 130, 0.78) 100%);
    transform: rotate(-1.5deg);
}

.gratitude-stone.variant-5 {
    border-radius: 50% 45% 40% 65%;
    background: 
        radial-gradient(ellipse at 80% 80%, rgba(139, 111, 71, 0.2) 0%, transparent 70%),
        linear-gradient(165deg, 
            rgba(240, 232, 212, 0.92) 0%,
            rgba(215, 202, 175, 0.88) 45%,
            rgba(190, 175, 145, 0.8) 100%);
    transform: rotate(0.8deg);
}


/* Path Styles */
.path-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.path-container.faded { opacity: 0.3; transition: opacity 1s ease; }
.path-segment { width: 2px; height: 2rem; background-color: rgba(143, 188, 173, 0.4); }
.paving-stone {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-subtle);
    /* Organic stone-like shape */
    border-radius: 14px 10px 16px 9px;
    text-align: center;
    font-size: 0.875rem;
    background: linear-gradient(145deg, var(--glass-bg), rgba(61, 73, 64, 0.8));
    backdrop-filter: blur(8px);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    /* Subtle stone texture */
    box-shadow: 
        inset 1px 1px 2px rgba(212, 175, 55, 0.1),
        inset -1px -1px 2px rgba(0, 0, 0, 0.15);
}

.paving-stone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-amber), var(--accent-sage));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.paving-stone.completed {
    background: linear-gradient(145deg, rgba(45, 53, 48, 0.6), rgba(61, 73, 64, 0.6));
    color: var(--text-muted);
    text-decoration: line-through;
}

.paving-stone.next-step {
    border-color: var(--accent-amber);
    background: linear-gradient(145deg, rgba(212, 165, 116, 0.15), rgba(232, 200, 150, 0.15));
    color: var(--text-primary);
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.2);
}

.paving-stone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.15);
}
.completion-checkbox {
    width: 44px; 
    height: 44px; 
    background-color: transparent; 
    border: none;
    border-radius: 50%; 
    cursor: pointer; 
    transition: all var(--transition-normal);
    margin-right: 0.5rem; 
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.completion-checkbox::after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: transparent;
    border: 2px solid rgba(194, 186, 166, 0.6);
    border-radius: 50%;
    transition: all var(--transition-normal);
}
.completion-checkbox:hover::after { 
    background-color: rgba(143, 188, 173, 0.2);
    border-color: rgba(143, 188, 173, 0.8);
    transform: scale(1.1);
}
.completion-checkbox.completed::after { 
    background-color: var(--accent-gold); 
    border-color: var(--accent-gold); 
}
.completion-checkbox:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
.challenge-button {
    background: none; 
    border: none; 
    color: rgba(194, 186, 166, 0.7);
    font-size: 0.75rem;
    cursor: pointer; 
    margin-top: 0.5rem; 
    padding: 8px 12px;
    min-height: 44px;
    transition: color var(--transition-normal);
    position: relative;
    z-index: 10;
}
.challenge-button:hover { 
    color: #8FBCAD;
}
.challenge-button:focus {
    outline: 2px solid #8FBCAD;
    outline-offset: 2px;
}
.thorny-pass {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    border: 1px dashed rgba(194, 186, 166, 0.5);
    border-radius: 16px;
    text-align: center;
    font-size: 0.875rem;
    cursor: pointer;
    background-color: rgba(194, 186, 166, 0.15);
    color: #C2BAA6;
    transition: all var(--transition-normal);
}
.thorny-pass:hover { 
    transform: translateY(-2px);
    border-color: rgba(194, 186, 166, 0.7);
    background-color: rgba(194, 186, 166, 0.25);
    box-shadow: 0 4px 12px rgba(194, 186, 166, 0.3);
}
.thorny-pass:focus {
    outline: 2px solid rgba(194, 186, 166, 0.7);
    outline-offset: 2px;
}
.shadow-crystal {
    padding: 0.75rem 1.25rem;
    min-height: 44px;
    border: 1px solid rgba(143, 188, 173, 0.5);
    border-radius: 16px;
    text-align: center;
    font-size: 0.875rem;
    cursor: pointer;
    background-color: rgba(143, 188, 173, 0.15);
    color: #8FBCAD;
    transition: all var(--transition-normal);
}
.shadow-crystal:hover { 
    transform: translateY(-2px);
    background-color: rgba(143, 188, 173, 0.25);
    border-color: rgba(143, 188, 173, 0.7);
    box-shadow: 0 4px 12px rgba(143, 188, 173, 0.3);
}
.shadow-crystal:focus {
    outline: 2px solid rgba(143, 188, 173, 0.7);
    outline-offset: 2px;
}
.paving-stone, .shadow-crystal, .thorny-pass { cursor: pointer; }

/* Enhanced Checkbox Styling */
#share-wisdom-checkbox:checked ~ .checkbox-custom {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-rose) 100%);
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#share-wisdom-checkbox:checked ~ .checkbox-custom .checkmark {
    opacity: 1;
    color: var(--text-primary);
}

.checkbox-custom:hover {
    border-color: var(--accent-rose);
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2);
}

/* Custom input focus styles for modals */
#growth-name-input:focus {
    background: rgba(244, 239, 211, 0.95) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 4px 16px rgba(212, 175, 55, 0.3) !important;
    transform: translateY(-1px);
}

/* Mobile-specific fixes for input accessibility */
@media (max-width: 768px) {
    /* Ensure modals are properly positioned when keyboard appears */
    .screen {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce modal padding on mobile for better space utilization */
    .organic-panel {
        padding: 1.5rem !important;
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Ensure inputs are accessible when keyboard appears */
    .themed-input, input[type="text"] {
        min-height: 48px; /* WCAG touch target minimum */
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
    }
    
    /* Fix for mobile keyboard covering inputs */
    .screen.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
}

/* Handle safe area for devices with notches */
@supports (padding: max(0px)) {
    .screen {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Styles for when mobile keyboard is open */
body.keyboard-open {
    height: 100vh;
    overflow: hidden;
}

body.keyboard-open .screen {
    height: 100vh;
}

body.keyboard-open .organic-panel {
    max-height: calc(100vh - 1rem);
    margin: 0.5rem;
}

#obstacle-input:focus {
    background: rgba(244, 239, 211, 0.95) !important;
    border-color: #fb7185 !important;
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.2), 0 4px 16px rgba(190, 18, 60, 0.3) !important;
    transform: translateY(-1px);
}

#insight-input:focus {
    background: rgba(244, 239, 211, 0.95) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 4px 16px rgba(212, 175, 55, 0.3) !important;
    transform: translateY(-1px);
}