
:root {
    --cream: #F8F4E9;
    --paper: #FFFCF5;
    --oatmeal: #E9DFCD;
    --sage: #A3AE91;
    --forest: #53674F;
    --rose: #C99EA5;
    --earth: #8D6C55;
    --blue: #ABC5CC;
    --ink: #49483F;
    --muted: #858276;
    --border: #E5DDCE;

    --font-body: 'DM Sans', sans-serif;
    --font-heading: 'Lora', Georgia, serif;
    --font-handwritten: 'Caveat', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    min-height: 100dvh;
}

button {
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px 22px 120px;
}

/* PAGES */

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fade-in 0.25s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* TYPOGRAPHY */

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 500;
}

h1 {
    font-size: 34px;
    color: var(--forest);
}

h2 {
    font-size: 21px;
}

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--earth);
    margin-bottom: 12px;
}

.handwritten {
    font-family: var(--font-handwritten);
    color: var(--earth);
    font-size: 20px;
}

/* HEADER */

.home-header {
    text-align: center;
    padding: 24px 0 18px;
}

.subtitle {
    font-family: var(--font-handwritten);
    font-size: 24px;
    color: var(--earth);
    margin-top: 8px;
}

.botanical-divider {
    color: var(--sage);
    font-size: 34px;
    margin-top: 10px;
}

.page-header {
    margin: 20px 0 30px;
}

/* SCRIPTURE */

.scripture-card {
    background: #E8EBDD;
    border: 1px solid #D6DCC9;
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    margin-bottom: 22px;
}

.scripture-card svg {
    width: 24px;
    height: 24px;
    color: var(--forest);
    margin-bottom: 12px;
    stroke-width: 1.4;
}

.scripture {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 16px;
    line-height: 1.8;
    color: var(--forest);
}

.scripture-card span {
    display: block;
    font-size: 12px;
    color: var(--forest);
    margin-top: 12px;
}

/* BUTTONS */

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px;
    border: none;
    border-radius: 14px;
    background: var(--forest);
    color: var(--paper);
    font-size: 15px;
    font-weight: 600;
}

.primary-button:hover {
    background: #455841;
}

.primary-button svg {
    width: 20px;
    height: 20px;
}

/* SECTION HEADINGS */

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin: 30px 0 16px;
}

/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 6px;
    text-align: center;
}

.stat-card svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.4;
    color: var(--forest);
    margin-bottom: 10px;
}

.stat-card:nth-child(2) svg {
    color: #B77F8B;
}

.stat-card:nth-child(3) svg {
    color: var(--earth);
}

.stat-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 500;
}

.stat-card span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

/* EMPTY STATES */

.empty-state {
    background: var(--paper);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 32px 20px;
    text-align: center;
}

.empty-state svg {
    width: 42px;
    height: 42px;
    stroke-width: 1.1;
    color: var(--sage);
    margin-bottom: 14px;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

/* BOTTOM NAVIGATION */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-around;
    background: var(--paper);
    border-top: 1px solid var(--border);
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-button {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 11px;
    padding: 8px 2px;
    border-radius: 12px;
}

.nav-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.nav-button.active {
    color: var(--forest);
    background: #E8EBDD;
    font-weight: 600;
}

.spacer {
    height: 30px;
}

/* NEW WALK FORM */

.back-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--forest);
    font-size: 13px;
    margin-bottom: 20px;
}

.back-button svg {
    width: 17px;
    height: 17px;
}

.form-card,
.map-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.form-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 8px;
}

.form-card input {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
}

.form-card input:last-child {
    margin-bottom: 0;
}

.form-card input:focus {
    outline: 1px solid var(--sage);
    border-color: var(--sage);
}

/* GPX UPLOAD */

.upload-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: #E8EBDD;
    color: var(--forest);
    border: 1px dashed var(--sage);
    border-radius: 12px;
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.upload-button svg {
    width: 18px;
    height: 18px;
}

.helper-text {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    margin: 12px 0 18px;
}

/* INTERACTIVE MAP */

#walk-map {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--oatmeal);
    z-index: 1;
}

.leaflet-container {
    font-family: var(--font-body);
}
/* Soft botanical map appearance */
#walk-map .leaflet-tile-pane {
    filter: saturate(0.65) sepia(0.15);
}

/* DISCOVERY FORM */

.map-hint {
    font-family: var(--font-handwritten);
    font-size: 19px;
    color: var(--earth);
    text-align: center;
    margin-top: 14px;
}

#discovery-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: calc(100% - 32px);
    max-width: 440px;
    max-height: 88dvh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--paper);
    color: var(--ink);
    padding: 24px;
}

#discovery-dialog::backdrop {
    background: rgba(49, 54, 43, 0.45);
    backdrop-filter: blur(3px);
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.dialog-header h2 {
    color: var(--forest);
}

.icon-button {
    background: none;
    border: none;
    color: var(--muted);
    padding: 4px;
}

.discovery-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 8px;
}

.discovery-form input:not([type="file"]),
.discovery-form textarea {
    width: 100%;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 20px;
}

.discovery-form textarea {
    resize: vertical;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.category-grid button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 2px;
    color: var(--ink);
    font-size: 10px;
}

.category-grid button span {
    font-size: 24px;
}

.category-grid button.selected {
    background: #E8EBDD;
    border-color: var(--forest);
    box-shadow: inset 0 0 0 1px var(--forest);
}

.discovery-form .upload-button {
    display: flex;
    margin-bottom: 18px;
}

#photo-preview {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 18px;
}

/* DISCOVERY MAP PINS */

.discovery-marker {
    background: transparent;
    border: none;
}

.discovery-pin {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border: 2px solid var(--sage);
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* MAP POPUPS */

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--paper);
    color: var(--ink);
}

.discovery-popup {
    min-width: 170px;
    max-width: 230px;
}

.discovery-popup h3 {
    color: var(--forest);
    font-size: 17px;
    margin-bottom: 6px;
}

.discovery-popup img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.discovery-popup .popup-category {
    color: var(--earth);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discovery-popup .popup-scripture {
    font-style: italic;
    color: var(--forest);
}

.delete-discovery {
    background: none;
    border: none;
    color: #A66E80;
    font-size: 12px;
    padding-top: 8px;
    cursor: pointer;
}

/* WEATHER SELECTION */

.weather-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

.weather-grid button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 3px;
    color: var(--muted);
    font-size: 10px;
}

.weather-grid button svg {
    width: 27px;
    height: 27px;
    stroke-width: 1.4;
    color: var(--earth);
}

.weather-grid button.selected {
    background: #E8EBDD;
    border-color: var(--forest);
    color: var(--forest);
}

.weather-grid button.selected svg {
    color: var(--forest);
}

/* NATURE SIGHTINGS */

.sightings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.form-card .sighting-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 9px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    margin: 0;
}

.form-card .sighting-option input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--forest);
    flex-shrink: 0;
}

.sighting-option:has(input:checked) {
    background: #E8EBDD;
    border-color: var(--sage);
}

/* JOURNAL TEXT AREAS */

.form-card textarea {
    display: block;
    width: 100%;
    padding: 14px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    resize: vertical;
}

.form-card textarea:last-child {
    margin-bottom: 0;
}

.form-card textarea:focus {
    outline: 1px solid var(--sage);
    border-color: var(--sage);
}

/* LINED JOURNAL PAPER */

.reflection-card textarea {
    font-family: var(--font-handwritten);
    font-size: 23px;
    line-height: 32px;
    padding: 8px 12px;
    background-color: var(--paper);
    background-image: repeating-linear-gradient(
        transparent,
        transparent 31px,
        #E5DDCE 31px,
        #E5DDCE 32px
    );
    background-origin: content-box;
    background-attachment: local;
    min-height: 180px;
}

.reflection-card label {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
}

/* GUIDED PRAYER WALK */

.walk-step {
    display: none;
}

.walk-step.active {
    display: block;
    animation: step-appear 0.3s ease;
}

@keyframes step-appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PROGRESS INDICATOR */

.walk-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 0 0 30px;
}

.walk-progress::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 12.5%;
    right: 12.5%;
    height: 1px;
    background: var(--border);
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.progress-step span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--oatmeal);
    color: var(--earth);
    font-family: var(--font-heading);
    font-size: 14px;
}

.progress-step small {
    font-size: 11px;
    color: var(--muted);
}

.progress-step.active span,
.progress-step.completed span {
    background: var(--forest);
    color: var(--paper);
}

.progress-step.active small {
    color: var(--forest);
    font-weight: 600;
}

/* STEP NAVIGATION */

.walk-step-navigation {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.walk-step-navigation .primary-button {
    flex: 1;
    width: auto;
}

.secondary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--forest);
    padding: 16px 22px;
    font-size: 14px;
}

.secondary-button svg {
    width: 18px;
    height: 18px;
}

.walk-step-navigation [hidden] {
    display: none !important;
}

.step-counter {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px;
}

.walk-step > .section-heading:first-child {
    margin-top: 0;
}

/* SAVED WALK COLLECTION */

.saved-walks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.saved-walk-card {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: left;
    color: var(--ink);
}

.saved-walk-card:hover {
    border-color: var(--sage);
}

.walk-cover {
    width: 90px;
    height: 105px;
    flex-shrink: 0;
    background: #E8EBDD;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.walk-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.walk-cover svg {
    width: 38px;
    height: 38px;
    stroke-width: 1.2;
    color: var(--sage);
}

.walk-card-content {
    flex: 1;
    min-width: 0;
}

.walk-card-date {
    font-size: 10px;
    color: var(--muted);
}

.walk-card-content h3 {
    font-size: 21px;
    color: var(--forest);
    margin: 5px 0;
    overflow-wrap: anywhere;
}

.walk-card-scripture {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 12px;
    color: var(--earth);
}

.walk-card-discoveries {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 10px;
}

.saved-walk-card > svg {
    width: 17px;
    height: 17px;
    color: var(--sage);
    flex-shrink: 0;
}

/* COMPLETED PRAYER WALK */

.detail-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.detail-actions button {
    background: transparent;
    border: none;
    color: var(--earth);
    padding: 8px;
}

.walk-detail-header {
    text-align: center;
    margin: 25px 0;
}

.detail-date {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 11px;
    color: var(--muted);
}

.walk-detail-header h1 {
    font-size: 38px;
    margin: 12px 0;
    color: var(--forest);
}

.detail-scripture {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--earth);
    font-size: 17px;
}

.detail-weather {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--earth);
}

.detail-weather svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.5;
}

/* SAVED MAP */

#detail-map {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    z-index: 1;
}

#detail-map .leaflet-tile-pane {
    filter: saturate(0.65) sepia(0.15);
}

/* DISCOVERY COLLECTION */

.detail-discovery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-discovery-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.detail-discovery-card img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.discovery-placeholder {
    height: 140px;
    background: #E8EBDD;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
}

.detail-discovery-content {
    padding: 12px;
}

.detail-discovery-content h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--forest);
    margin-bottom: 5px;
}

.detail-discovery-content small {
    color: var(--muted);
    font-size: 11px;
}

.detail-discovery-content p {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

/* NATURE SIGHTINGS */

.detail-sightings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sighting-tag {
    padding: 8px 12px;
    background: #E8EBDD;
    border-radius: 8px;
    color: var(--forest);
    font-size: 12px;
}

#detail-nature-notes {
    font-family: var(--font-handwritten);
    font-size: 23px;
    line-height: 1.5;
    margin-top: 15px;
    white-space: pre-wrap;
}

/* SAVED REFLECTIONS */

.saved-reflections h3 {
    font-family: var(--font-heading);
    color: var(--earth);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.saved-reflections p {
    font-family: var(--font-handwritten);
    font-size: 24px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#detail-truth-section:not([hidden])
    + #detail-prayer-section:not([hidden]) {
    border-top: 1px solid var(--border);
    margin-top: 22px;
    padding-top: 22px;
}

#walk-detail-page [hidden] {
    display: none !important;
}

/* DISCOVERIES COLLECTION */

.discovery-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.discovery-search svg {
    width: 18px;
    height: 18px;
    color: var(--sage);
    flex-shrink: 0;
}

.discovery-search input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
}

/* CATEGORY FILTERS */

.discovery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
}

.discovery-filter {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 13px;
    color: var(--forest);
    font-size: 12px;
    cursor: pointer;
}

.discovery-filter.selected {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--paper);
}

/* COLLECTION HEADING */

.collection-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
}

.collection-heading select {
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 12px;
}

/* COLLECTION CARDS */

.discovery-collection {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.collection-card {
    padding: 0;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
    color: var(--ink);
    cursor: pointer;
}

.collection-card:hover {
    border-color: var(--sage);
}

.collection-card img,
.collection-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.collection-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E8EBDD;
    font-size: 48px;
}

.collection-card-body {
    padding: 12px;
}

.collection-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--earth);
}

.collection-card h3 {
    font-family: var(--font-heading);
    color: var(--forest);
    font-size: 16px;
    margin: 7px 0;
    overflow-wrap: anywhere;
}

.collection-date {
    font-size: 11px;
    color: var(--muted);
}

.discovery-collection .empty-state {
    grid-column: 1 / -1;
}

/* DISCOVERY DETAIL POPUP */

.saved-discovery-dialog {
    width: calc(100% - 36px);
    max-width: 440px;
    max-height: 85dvh;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--paper);
    color: var(--ink);
    overflow-y: auto;
}

.saved-discovery-dialog::backdrop {
    background: rgba(45, 50, 40, 0.55);
}

.saved-discovery-inner {
    position: relative;
}

.close-saved-discovery {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--paper);
    color: var(--forest);
    z-index: 2;
}

#saved-discovery-image img {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    background: var(--oatmeal);
}

.saved-discovery-body {
    padding: 24px;
}

.saved-discovery-body h2 {
    color: var(--forest);
    font-size: 26px;
    margin: 8px 0;
    overflow-wrap: anywhere;
}

#saved-discovery-notes {
    font-family: var(--font-handwritten);
    font-size: 23px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-bottom: 20px;
}

#saved-discovery-scripture {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--earth);
    line-height: 1.7;
    white-space: pre-wrap;
    margin-bottom: 24px;
}

.saved-discovery-body [hidden] {
    display: none !important;
}

/* ========================================
   SPIRITUAL JOURNAL
   ======================================== */

/* JOURNAL STATISTICS */

.journal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.journal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.journal-stat svg {
    width: 25px;
    height: 25px;
    stroke-width: 1.5;
    color: var(--earth);
}

.journal-stat:nth-child(2) svg {
    color: var(--rose);
}

.journal-stat strong {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 500;
    color: var(--forest);
}

.journal-stat span {
    font-size: 11px;
    color: var(--muted);
}

/* JOURNAL FILTERS */

.journal-filters {
    display: flex;
    gap: 4px;
    padding: 5px;
    background: var(--oatmeal);
    border-radius: 12px;
    margin-bottom: 25px;
}

.journal-filters button {
    flex: 1;
    padding: 11px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.journal-filters button.selected {
    background: var(--paper);
    color: var(--forest);
    font-weight: 600;
}

/* JOURNAL ENTRIES */

.journal-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.journal-entry-date {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 9px;
}

.journal-entry-card {
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.journal-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.journal-entry-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--forest);
    overflow-wrap: anywhere;
}

.journal-entry-scripture {
    font-family: var(--font-heading);
    font-size: 12px;
    font-style: italic;
    color: var(--earth);
}

/* INDIVIDUAL REFLECTIONS */

.journal-reflection {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.journal-reflection + .journal-reflection {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
}

.journal-reflection > svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.5;
    color: var(--earth);
    flex-shrink: 0;
}

.journal-reflection.prayer > svg {
    color: var(--rose);
}

.journal-reflection-content {
    flex: 1;
    min-width: 0;
}

.journal-reflection-content h4 {
    font-size: 12px;
    font-weight: 500;
    color: var(--earth);
    margin-bottom: 8px;
}

.journal-reflection-content p {
    font-family: var(--font-handwritten);
    font-size: 24px;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* LINK TO ORIGINAL WALK */

.journal-walk-link {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 16px 0 0;
    margin-top: 20px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    color: var(--forest);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
}

.journal-walk-link svg {
    width: 15px;
    height: 15px;
}
.edit-discovery {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: #E8EBDD;
    border: 1px solid var(--sage);
    border-radius: 8px;
    color: var(--forest);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
}

.edit-discovery:hover {
    background: var(--sage);
    color: var(--paper);
}
.form-card select {
    width: 100%;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
}

#new-location-container {
    margin-top: 12px;
}

#new-location-container[hidden] {
    display: none;
}

#new-location-container .helper-text {
    margin-top: 8px;
}
.detail-location {
    color: var(--muted);
    font-size: 14px;
    margin: 6px 0;
}

/* ========================================
   PRAYER WALK ATLAS
   ======================================== */

.walk-view-toggle {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: var(--oatmeal);
    border-radius: 12px;
    margin: 20px 0;
}

.walk-view-toggle button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    cursor: pointer;
}

.walk-view-toggle button.selected {
    background: var(--paper);
    color: var(--forest);
}

.walk-view-toggle svg {
    width: 17px;
    height: 17px;
}

#walks-list-view[hidden],
#walks-atlas-view[hidden] {
    display: none;
}

#atlas-map {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    z-index: 1;
}

#atlas-map .leaflet-tile-pane {
    filter: saturate(0.65) sepia(0.15);
}

.atlas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.atlas-discovery-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--forest);
}

.atlas-discovery-toggle input {
    accent-color: var(--forest);
    width: 16px;
    height: 16px;
}

#atlas-reset-map {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    color: var(--forest);
    cursor: pointer;
}

#atlas-reset-map svg {
    width: 17px;
    height: 17px;
}

.atlas-summary {
    font-size: 12px;
    color: var(--muted);
    margin: 16px 0;
}

#atlas-location-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.atlas-location-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.atlas-location-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    text-align: left;
    color: var(--forest);
    cursor: pointer;
}

.atlas-location-header > svg {
    width: 20px;
    flex-shrink: 0;
}

.atlas-location-info {
    flex: 1;
}

.atlas-location-info h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 4px;
}

.atlas-location-info small {
    color: var(--muted);
    font-size: 12px;
}

.atlas-location-walks {
    padding: 0 16px;
}

.atlas-location-walks[hidden] {
    display: none;
}

.atlas-walk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-top: 1px solid var(--border);
    text-align: left;
    color: var(--ink);
    cursor: pointer;
}

.atlas-walk-row p {
    margin: 0 0 4px;
    font-size: 13px;
}

.atlas-walk-row small {
    color: var(--earth);
    font-size: 12px;
}

.atlas-walk-row svg {
    width: 16px;
    color: var(--sage);
}

.atlas-location-pin {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--forest);
    color: white;
    border: 2px solid var(--paper);
    border-radius: 50%;
    font-family: var(--font-body);
    font-weight: 600;
    box-shadow: 0 2px 6px #00000022;
}

.atlas-location-marker {
    background: transparent;
    border: none;
}

/* ========================================
   SETTINGS
   ======================================== */

#home {
    position: relative;
}

.settings-button {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: none;
    color: var(--forest);
    padding: 6px;
    cursor: pointer;
}

.settings-button svg {
    width: 21px;
    height: 21px;
}

.settings-header {
    margin-top: 24px;
    margin-bottom: 28px;
}

.settings-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
    margin-bottom: 8px;
}

.settings-header h1 {
    font-family: var(--font-heading);
    color: var(--forest);
    font-size: 34px;
    font-weight: 500;
    margin: 0;
}

.settings-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 18px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 20px 0;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.settings-row + .settings-row {
    border-top: 1px solid var(--border);
}

.settings-row > svg {
    width: 21px;
    height: 21px;
    color: var(--forest);
    flex-shrink: 0;
}

.settings-row > svg:last-child {
    width: 16px;
    color: var(--sage);
}

.settings-row-content {
    flex: 1;
}

.settings-row-content h3 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 5px;
}

.settings-row-content p {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
}

.settings-row:disabled {
    opacity: 0.5;
    cursor: wait;
}

.collection-overview {
    padding: 18px;
}

.collection-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--ink);
}

.collection-stat svg {
    width: 18px;
    height: 18px;
    color: var(--sage);
}

.collection-stat span {
    flex: 1;
}

.collection-stat strong {
    font-weight: 500;
    color: var(--forest);
}

.last-backup-date {
    border-top: 1px solid var(--border);
    margin: 14px 0 0;
    padding-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.settings-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
}

.settings-privacy svg {
    width: 22px;
    height: 22px;
    color: var(--sage);
    flex-shrink: 0;
}

.settings-privacy p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.backup-status {
    font-size: 12px;
    line-height: 1.5;
    color: var(--forest);
    margin: 12px 0;
}

.backup-status:empty {
    display: none;
}
.scripture-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 18px;
}

.scripture-card {
    height: auto;
}

.scripture-text {
    font-family: var(--font-heading);
    font-style: italic;
    text-align: center;
    line-height: 1.65;
    font-size: 22px;
    margin: 0;
}

.scripture-text.medium {
    font-size: 20px;
}

.scripture-text.long {
    font-size: 18px;
}

.scripture-text.extra-long {
    font-size: 17px;
}

.scripture-reference {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    font-weight: 500;
}
.scripture-attribution {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.scripture-attribution h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--forest);
    margin-bottom: 10px;
}

.scripture-attribution p {
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
}
.remove-trail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #A05D53;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    padding: 8px;
    margin: 0 auto 12px;
}

.remove-trail-button svg {
    width: 14px;
    height: 14px;
}

.remove-trail-button[hidden] {
    display: none;
}
/* New walk form alignment */

#walk-step-1 .form-card input,
#walk-step-1 .form-card select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
}

#walk-step-1 input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    text-align: left;
}

#walk-step-1 input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}
#weather-options {
    margin-bottom: 24px;
}

#walk-temperature {
    margin-bottom: 0;
}

/* ========================================
   COMPACT MOBILE WALK WIZARD
   ======================================== */

@media (max-width: 600px) {

    /* Page header */

    #new-walk-page .page-header {
        margin: 0 0 14px;
        padding: 0;
    }

    #new-walk-page h1 {
        font-size: 26px;
        line-height: 1.2;
        margin: 8px 0 12px;
    }

    #new-walk-page .back-button {
        font-size: 13px;
        margin-bottom: 4px;
        padding: 0;
    }

    /* Progress indicator */

    #new-walk-page .walk-progress {
        margin: 12px 0 16px;
    }

    #new-walk-page .progress-step span {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    #new-walk-page .progress-step small {
        font-size: 11px;
        margin-top: 5px;
    }

    /* Form cards */

    #new-walk-page .form-card {
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    #new-walk-page .form-card label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    /* Input fields */

    #walk-step-1 .form-card input,
    #walk-step-1 .form-card select {
        height: 40px;
        min-height: 40px;
        padding: 8px 10px;
        margin-bottom: 10px;
        font-size: 16px;
        border-radius: 9px;
    }

    /* Weather */

    #weather-options {
        gap: 6px;
        margin-bottom: 12px;
    }

    #weather-options button {
        height: 38px;
        min-height: 38px;
        padding: 6px;
        border-radius: 9px;
    }

    #weather-options button svg {
        width: 20px;
        height: 20px;
    }

    #walk-step-1 #walk-temperature {
        margin-bottom: 0;
    }

    /* Section headings */

    #new-walk-page .section-heading {
        margin: 12px 0 10px;
    }

    #new-walk-page .section-heading h2 {
        font-size: 20px;
    }

    /* Trail map */

    #walk-map {
        height: 250px;
    }

    #new-walk-page .map-card {
        padding: 12px;
    }

    /* Nature sightings */

   #new-walk-page .sightings-grid {
    gap: 4px;
    margin-bottom: 8px;
}

#new-walk-page .sighting-option {
    margin: 0;
    padding: 0;
}

#new-walk-page .sighting-option span {
    font-size: 12px;
    padding: 5px 8px;
    min-height: 36px;
    box-sizing: border-box;
}

    /* Reflection fields */

    #new-walk-page textarea {
        font-size: 16px;
        min-height: 85px;
        height: 100px;
        padding: 10px;
        margin-bottom: 12px;
    }

    /* Navigation */

    #new-walk-page .spacer {
        height: 8px;
        margin: 0;
    }

    #new-walk-page .walk-step-navigation {
        margin-top: 10px;
        gap: 8px;
    }

    #new-walk-page .walk-step-navigation button {
        min-height: 44px;
        padding: 10px;
        font-size: 14px;
    }

    #new-walk-page .step-counter {
        font-size: 11px;
        margin: 6px 0 0;
    }
    #new-walk-page .sighting-option input[type="checkbox"] {
    margin-left: 8px;
    margin-right: 6px;
    flex-shrink: 0;
}
#new-walk-page .sighting-option span {
    position: relative;
    top: 2px;
}

}