*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green: #2d5016;
    --green-light: #4a7c28;
    --bg: #fafaf5;
    --text: #1a1a1a;
    --text-muted: #666;
    --border: #ddd;
    --white: #fff;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

body {
    padding-bottom: 80px; /* space for bottom nav */
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Typography — two sizes only */
h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }

/* Bottom navigation — thumb-reachable */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 4px 0;
    min-height: 56px;
    justify-content: center;
}

.nav-item.active { color: var(--green); }
.nav-icon { font-size: 1.5rem; line-height: 1; }
.nav-label { font-size: 0.7rem; margin-top: 2px; }

/* Cards for log entries */
.log-entry {
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}

.log-entry .log-action {
    font-weight: 600;
    color: var(--green);
}

.log-entry .log-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.log-entry .log-notes {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Quick-add button — big, obvious, thumb-friendly */
.btn-add {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 16px;
    min-height: 56px;
}

.btn-add:active { background: var(--green-light); }

/* Forms — large touch targets */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    min-height: 48px;
    background: var(--white);
}

.form-group select {
    appearance: auto;
}

.form-group textarea {
    min-height: 64px;
    resize: vertical;
}

/* Today summary on home */
.summary-section {
    margin-bottom: 24px;
}

.summary-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
    padding: 8px 0;
}

/* Action chips for quick filtering */
.action-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.action-chip.planted { background: #e8f5e9; color: #2e7d32; }
.action-chip.watered { background: #e3f2fd; color: #1565c0; }
.action-chip.harvested { background: #fff3e0; color: #e65100; }
.action-chip.eggs { background: #fff8e1; color: #f57f17; }
.action-chip.fed { background: #fce4ec; color: #c62828; }
.action-chip.canned { background: #fff3e0; color: #e65100; }
.action-chip.frozen { background: #e3f2fd; color: #1565c0; }
.action-chip.dried { background: #efebe9; color: #4e342e; }
.action-chip.fermented { background: #f3e5f5; color: #6a1b9a; }

/* High contrast in sunlight */
@media (prefers-contrast: more) {
    :root {
        --text: #000;
        --green: #1a3d00;
    }
}
