.map-container {
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    background: #e9ecef;
}

@media (min-width: 768px) {
    .map-container {
        height: 420px;
    }
}

.leaflet-container {
    border-radius: 12px;
}

.card {
    border-radius: 12px;
}

.question-sheet {
    position: relative;
}

.custom-marker .marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.custom-marker.start-marker .marker-dot {
    background: #198754;
}

.custom-marker.end-marker .marker-dot {
    background: #dc3545;
}

.checkpoint-icon {
    background: transparent;
    border: none;
}

.checkpoint-pin {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#checkpoint-media img,
#checkpoint-media video {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
}

@media (max-width: 576px) {
    .navbar .ms-auto {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
        align-items: center;
    }

    .navbar .ms-auto .text-muted {
        width: 100%;
    }

    .btn-group {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .btn-group > .btn,
    .btn-group > .btn-check + .btn {
        border-radius: 0.375rem !important;
    }
}

@media (max-width: 768px) {
    .question-sheet {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        margin: 0;
        border-radius: 18px;
        z-index: 1050;
        max-height: 60vh;
        overflow-y: auto;
        box-shadow: 0 -18px 40px rgba(15, 30, 20, 0.18);
    }

    .question-sheet .card-body {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .trail-question-open .map-container {
        height: 36vh;
    }
}

.public-app {
    --ink: #1f2a24;
    --muted: #5f6f63;
    --brand: #0f7a5b;
    --brand-dark: #0b5f46;
    --brand-soft: #d9efe6;
    --accent: #e0a458;
    --sand: #f6f3ed;
    --card: #ffffff;
    --shadow: 0 18px 50px rgba(15, 30, 20, 0.14);
    font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top, #f5f7f2 0%, #fdfcf9 45%, #f7f4ee 100%);
    min-height: 100vh;
}

.public-app .text-muted {
    color: var(--muted) !important;
}

.public-nav {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831,42,36,0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(15, 30, 20, 0.08);
    backdrop-filter: blur(10px);
}

.public-nav .navbar-brand {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.public-link {
    color: var(--muted);
}

.public-link:hover {
    color: var(--ink);
}

.public-hero {
    position: relative;
    padding: 4.5rem 0 3rem;
    background: linear-gradient(120deg, rgba(15, 122, 91, 0.12) 0%, rgba(255, 255, 255, 0) 60%),
        radial-gradient(circle at 80% 10%, rgba(224, 164, 88, 0.18), transparent 50%);
    border-bottom: 1px solid rgba(15, 30, 20, 0.08);
}

.public-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(247, 244, 238, 0.85));
    pointer-events: none;
}

.public-hero-sm {
    padding: 1.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 30, 20, 0.08);
    box-shadow: 0 12px 40px rgba(15, 30, 20, 0.08);
}

.public-eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.public-section {
    padding: 2rem 0;
}

.public-card {
    background: var(--card);
    border: 1px solid rgba(15, 30, 20, 0.08);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 30, 20, 0.08);
}

.public-card-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-card {
    background: var(--card);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 30, 20, 0.08);
}

.hero-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.hero-card-title {
    font-weight: 700;
    color: var(--muted);
}

.hero-map {
    position: relative;
    height: 180px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 122, 91, 0.14), rgba(255, 255, 255, 0.6)),
        repeating-linear-gradient(45deg, rgba(15, 30, 20, 0.05) 0 6px, transparent 6px 12px);
    overflow: hidden;
}

.hero-map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-line {
    position: absolute;
    height: 5px;
    width: 85%;
    background: var(--brand);
    left: 8%;
    top: 50%;
    transform: rotate(-6deg);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15, 122, 91, 0.35);
}

.hero-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-pin--one {
    left: 18%;
    top: 28%;
}

.hero-pin--two {
    left: 48%;
    top: 55%;
}

.hero-pin--three {
    left: 74%;
    top: 32%;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.trail-card {
    border: 1px solid rgba(15, 30, 20, 0.08);
    box-shadow: 0 14px 30px rgba(15, 30, 20, 0.08);
    background: var(--card);
}

.public-app .btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.public-app .btn-primary:hover,
.public-app .btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.public-app .btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.public-app .btn-outline-primary:hover,
.public-app .btn-outline-primary:focus {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

.public-app .btn-outline-secondary {
    border-color: rgba(15, 30, 20, 0.2);
    color: var(--ink);
}

.public-app .btn-outline-secondary:hover,
.public-app .btn-outline-secondary:focus {
    background: rgba(15, 30, 20, 0.08);
    color: var(--ink);
}

.public-app .card {
    border-radius: 18px;
}

.public-auth {
    background: radial-gradient(circle at top, #f2f5f0 0%, #fdfcf9 55%, #f4efe6 100%);
}

.public-brand {
    font-weight: 800;
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--ink);
}

.public-brand:hover {
    color: var(--brand);
}

.public-app .list-group-item {
    border: 1px solid rgba(15, 30, 20, 0.08);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .public-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .hero-card {
        margin-top: 1rem;
    }

}
