.lm-hikes-page,
.lm-hikes-widget {
    color: var(--lm-text);
}
.lm-hikes-page {
    max-width: 1720px;
    margin: 0 auto;
    padding-bottom: 24px;
}
.lm-hikes-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.lm-hikes-heading h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
}
.lm-hikes-heading p {
    margin: 0;
}
.lm-hikes-muted {
    color: var(--lm-muted);
}
.lm-hikes-language {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--lm-muted);
    font-size: 13px;
}
.lm-hikes-language select {
    width: 150px;
}
.lm-hikes-tabs,
.lm-hikes-modes,
.lm-hikes-widget-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--lm-border);
}
.lm-hikes-tabs {
    margin-bottom: 20px;
}
.lm-hikes-tabs button,
.lm-hikes-modes button,
.lm-hikes-widget-tabs button {
    background: transparent;
    color: var(--lm-muted);
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 0;
    font-weight: 600;
}
.lm-hikes-tabs button.active,
.lm-hikes-modes button.active,
.lm-hikes-widget-tabs button.active {
    border-bottom-color: var(--field-accent, var(--lm-text));
    color: var(--lm-text);
}
.lm-hikes-tabs span {
    margin-left: 6px;
    font-size: 12px;
}
.lm-hikes-page label {
    font-size: 12px;
    font-weight: 600;
}
.lm-hikes-page label input,
.lm-hikes-page label select,
.lm-hikes-page label textarea {
    margin-top: 5px;
    font-size: 14px;
}
.lm-hikes-workspace {
    display: grid;
    grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.65fr);
    align-items: start;
    gap: 18px;
}
.lm-hikes-map-panel {
    position: sticky;
    top: 20px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--lm-border);
    background: var(--lm-card);
    min-height: 540px;
}
.lm-hikes-map {
    height: min(72vh, 820px);
    min-height: 540px;
    width: 100%;
}
.lm-hikes-map-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 35px;
    background: var(--lm-card);
}
.lm-hikes-map-error > i {
    font-size: 36px;
    color: var(--lm-muted);
    margin-bottom: 12px;
}
.lm-hikes-map-error p {
    color: var(--lm-muted);
    font-size: 14px;
    max-width: 320px;
}
.lm-hikes-attribution {
    background: var(--lm-card);
    padding: 6px 12px;
    font-size: 10px;
    color: var(--lm-muted);
}
.lm-hikes-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.lm-hikes-route-browser,
.lm-hikes-details {
    padding: 18px 20px;
}
.lm-hikes-modes {
    margin-bottom: 14px;
    gap: 24px;
}
.lm-hikes-modes button {
    padding-top: 0;
    font-size: 14px;
}
.lm-hikes-modes small {
    margin-left: 5px;
}
.lm-hikes-trail-list {
    max-height: 320px;
    overflow-y: auto;
}
.lm-hikes-trail-list > button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    width: 100%;
    color: var(--lm-text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px;
}
.lm-hikes-trail-list > button:hover,
.lm-hikes-trail-list > button.active {
    background: color-mix(in srgb, var(--field-accent, var(--lm-text)) 10%, transparent);
    border-color: color-mix(in srgb, var(--field-accent, var(--lm-text)) 40%, transparent);
}
.lm-hikes-trail-list small {
    display: block;
    color: var(--lm-muted);
    margin-top: 4px;
}
.lm-hikes-trail-list strong {
    font-size: 14px;
}
.lm-hikes-eyebrow {
    color: var(--lm-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}
.lm-hikes-details h2 {
    font-size: 23px;
    margin: 0 0 12px;
}
.lm-hikes-facts,
.lm-hikes-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.lm-hikes-facts span {
    background: color-mix(in srgb, var(--lm-muted) 10%, transparent);
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 12px;
}
.lm-hikes-description {
    line-height: 1.65;
    font-size: 14px;
    margin: 16px 0 12px;
    white-space: pre-line;
}
.lm-hikes-actions {
    margin-top: 14px;
}
.lm-hikes-actions .btn,
.lm-hikes-plan .btn {
    font-size: 12px;
}
.lm-hikes-plan {
    display: flex;
    gap: 12px;
    align-items: end;
    margin-top: 14px;
}
.lm-hikes-plan label {
    flex: 1;
}
.lm-hikes-plan .btn {
    min-height: 38px;
}
.lm-hikes-guide {
    border-top: 1px solid var(--lm-border);
    margin-top: 20px;
    padding-top: 16px;
    font-size: 13px;
    line-height: 1.6;
}
.lm-hikes-guide-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.lm-hikes-guide-head small {
    color: var(--lm-muted);
}
.lm-hikes-guide > small {
    display: block;
    margin-bottom: 12px;
    color: var(--lm-muted);
}
.lm-hikes-guide .btn {
    font-size: 12px;
}
.lm-hikes-source {
    font-size: 11px;
    line-height: 1.6;
    margin-top: 14px;
}
.lm-hikes-next-filters {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
    margin: 12px 0;
}
.lm-hikes-repeat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}
.lm-hikes-repeat input {
    accent-color: var(--field-accent, var(--lm-text));
}
.lm-hikes-wide {
    width: 100%;
    margin: 0 0 12px;
}
.lm-hikes-recommendation {
    border-top: 1px solid var(--lm-border);
    padding: 14px 0;
}
.lm-hikes-recommendation small {
    color: var(--lm-muted);
}
.lm-hikes-recommendation h3 {
    margin: 8px 0 12px;
    font-size: 18px;
}
.lm-hikes-empty {
    padding: 20px 0;
    color: var(--lm-muted);
    font-size: 14px;
}
.lm-hikes-text-button {
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    text-align: left;
}
.lm-hikes-coverage {
    font-size: 11px;
    margin: 14px 0;
}
.lm-hikes-history-intro h2 {
    font-size: 22px;
}
.lm-hikes-history-group {
    padding: 20px;
    margin-bottom: 16px;
}
.lm-hikes-history-group h3 {
    font-size: 17px;
    margin: 0 0 14px;
}
.lm-hikes-history-group h3 span {
    margin-left: 8px;
    font-size: 12px;
}
.lm-hikes-history-row {
    padding: 14px 0;
    border-top: 1px solid var(--lm-border);
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}
.lm-hikes-history-row > div > small {
    display: block;
    margin-top: 5px;
}
.lm-hikes-history-row .lm-hikes-text-button {
    font-weight: 600;
}
.lm-hikes-history-row .lm-hikes-actions {
    flex-shrink: 0;
    margin-top: 0;
}
.lm-hikes-note {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
    margin: 10px 0 4px;
}
.lm-hikes-results {
    color: var(--lm-muted);
}
.lm-hikes-modal-backdrop {
    position: fixed;
    inset: 0;
    background: #0009;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lm-hikes-modal {
    width: min(560px, 100%);
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--lm-card);
}
.lm-hikes-modal h2 {
    font-size: 22px;
}
.lm-hikes-modal > label {
    display: block;
}
.lm-hikes-editor-numbers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}
.lm-hikes-widget {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
}
.lm-hikes-widget-tabs {
    gap: 18px;
    flex-shrink: 0;
}
.lm-hikes-widget-tabs button {
    font-size: 12px;
    padding: 0 0 8px;
}
.lm-hikes-widget-area {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--lm-muted);
    font-size: 11px;
    text-decoration: none;
    flex-shrink: 0;
}
.lm-hikes-widget-list {
    min-height: 0;
    overflow-y: auto;
    flex: 1;
}
.lm-hikes-widget-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    color: var(--lm-text);
    text-decoration: none;
    border-bottom: 1px solid var(--lm-border);
    padding: 8px 0;
}
.lm-hikes-widget-list strong {
    display: block;
    font-size: 12px;
}
.lm-hikes-widget-list small {
    font-size: 10px;
    color: var(--lm-muted);
}
.lm-hikes-widget-list p,
.lm-hikes-widget > p {
    font-size: 12px;
    margin: 10px 0;
}
.lm-hikes-widget-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    flex-shrink: 0;
}
.lm-hikes-page button:focus-visible,
.lm-hikes-widget button:focus-visible,
.lm-hikes-text-button:focus-visible {
    outline: 2px solid var(--field-accent, var(--lm-text));
    outline-offset: 3px;
}
@media (max-width: 1050px) {
    .lm-hikes-workspace {
        grid-template-columns: minmax(230px, 0.85fr) minmax(0, 1.65fr);
    }
}
@media (max-width: 780px) {
    .lm-hikes-workspace {
        grid-template-columns: 1fr;
    }
    .lm-hikes-map-panel {
        position: relative;
        top: auto;
        min-height: 340px;
    }
    .lm-hikes-map {
        height: 42vh;
        min-height: 340px;
    }
    .lm-hikes-heading {
        align-items: start;
        flex-wrap: wrap;
    }
    .lm-hikes-heading h1 {
        font-size: 25px;
    }
    .lm-hikes-language {
        width: 100%;
        justify-content: space-between;
    }
    .lm-hikes-history-row {
        flex-direction: column;
    }
}

.lm-hikes-completion-date {
    width: 145px;
}
.lm-hikes-details > .lm-hikes-actions {
    align-items: end;
}

.lm-hikes-page .lm-hikes-places { padding: 1rem; min-width: 0; }
.lm-hikes-page .lm-hikes-places-attribution { padding: 10px 10px 5px; background: #fff; display: inline-block; border-radius: 4px; margin-bottom: 12px; }
.lm-hikes-page .lm-hikes-places-attribution img { height: 18px; width: auto; }
.lm-hikes-page .lm-hikes-places-search { display: grid; gap: .65rem; margin: .75rem 0; }
.lm-hikes-page .lm-hikes-place-candidate { display: flex; align-items: start; gap: .65rem; padding: .75rem 0; border-bottom: 1px solid var(--bs-border-color); overflow-wrap: anywhere; }
.lm-hikes-page .lm-hikes-place-details { margin-top: 1rem; overflow-wrap: anywhere; }
.lm-hikes-page .lm-hikes-place-photo { width: 100%; height: auto; border-radius: .5rem; }
.lm-hikes-page .lm-hikes-places blockquote { border-left: 3px solid var(--bs-border-color); padding-left: .75rem; margin-top: 1rem; }


.lm-hikes-widget-attribution { display: block; font-size: 10px; color: var(--lm-muted); margin-top: 4px; }

/* Private recordings reuse the application's neutral card and form theme. */
.lm-hikes-recorded { margin-bottom: 1.5rem; }
.lm-hikes-import { margin-bottom: 1rem; }
.lm-hikes-recorded-workspace { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.8fr); gap: 1rem; align-items: start; }
.lm-hikes-recorded-list { display: flex; flex-direction: column; max-height: 650px; overflow-y: auto; padding: .5rem; }
.lm-hikes-recorded-list button { text-align: left; color: inherit; border: 1px solid transparent; border-radius: .65rem; background: transparent; padding: .85rem; }
.lm-hikes-recorded-list button.active { border-color: var(--lm-border); background: var(--field-selected, var(--lm-bg)); }
.lm-hikes-recorded-list small { display: block; color: var(--lm-muted); margin-top: .3rem; }
.lm-hikes-recorded-detail { min-width: 0; display: grid; gap: 1rem; }
.lm-hikes-recorded-detail .lm-card { padding: 1rem; }
.lm-hikes-recorded-detail .lm-hikes-map { min-height: 360px; height: 430px; }
.lm-hikes-recorded-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 1rem 0 0; }
.lm-hikes-recorded-metrics dt { color: var(--lm-muted); font-size: .8rem; font-weight: 400; }
.lm-hikes-recorded-metrics dd { margin: .25rem 0; font-size: 1.1rem; }
.lm-hikes-recorded-form { display: grid; gap: .8rem; margin-top: 1rem; }
.lm-hikes-recorded-form label { display: grid; gap: .3rem; }
.lm-hikes-recorded-form textarea { min-height: 100px; }
@media (max-width: 800px) { .lm-hikes-recorded-workspace { grid-template-columns: 1fr; } .lm-hikes-recorded-list { max-height: 320px; } .lm-hikes-recorded-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }

/* Field guide workspace. Widget styles above follow the dashboard theme. */
.lm-hikes-page {
    --field-bg: var(--lm-bg);
    --field-paper: var(--lm-card);
    --field-accent: #44474b;
    --field-on-accent: #fff;
    --field-selected: #f0f1f2;
    --field-note: var(--field-selected);
    --field-note-text: var(--lm-text);
    background: var(--field-bg);
    border-radius: 16px;
    padding: clamp(12px, 2.4vw, 32px);
}
.lm-app.theme-dark .lm-hikes-page {
    --field-accent: #d5d7da;
    --field-on-accent: #202124;
    --field-selected: var(--lm-surface-2, #303134);
    color-scheme: dark;
}
.lm-hikes-page .lm-card,
.lm-app.theme-dark .lm-hikes-page .lm-card {
    background: var(--field-paper);
    border-color: var(--lm-border);
    box-shadow: none;
}
.lm-hikes-page .lm-hikes-eyebrow {
    color: var(--field-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.lm-hikes-page .lm-hikes-heading { align-items: end; flex-wrap: wrap; gap: 10px; }
.lm-hikes-page .lm-hikes-heading h1 {
    margin: 0;
    font: 600 clamp(44px, 5vw, 64px)/1.05 Georgia, serif;
    letter-spacing: -.05em;
}
.lm-hikes-area {
    max-width: min(100%, 34rem);
    background: var(--field-paper);
    border: 1px solid var(--lm-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--lm-muted);
    overflow-wrap: anywhere;
}
.lm-hikes-page .lm-hikes-tabs { gap: clamp(14px, 3vw, 28px); margin-bottom: 16px; }
.lm-hikes-page .lm-hikes-tabs button { min-height: 42px; white-space: nowrap; }
.lm-hikes-page .lm-hikes-modes { gap: 14px; flex-wrap: wrap; }
.lm-hikes-page .lm-hikes-modes button { white-space: nowrap; }
.lm-hikes-search-status, .lm-hikes-search-notice, .lm-hikes-return-note {
    background: var(--field-note);
    color: var(--field-note-text);
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
}
.lm-hikes-search-status { background: var(--field-selected); color: var(--field-accent); }
.lm-hikes-search-notice { margin: 10px 0 0; }
.lm-hikes-list-heading { font-size: 17px; margin: 0 0 4px; }
.lm-hikes-result-count { font-size: 12px; color: var(--lm-muted); margin: 0 0 10px; }
.lm-hikes-list-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}
.lm-hikes-list-filters .form-select { min-height: 36px; font-size: 12px; }
.lm-hikes-page .lm-hikes-trail-list { max-height: clamp(185px, 46vh, 500px); }
.lm-hikes-page .lm-hikes-trail-list > button {
    justify-content: flex-start;
    border-radius: 8px;
    padding: 9px 7px;
    min-height: 55px;
}
.lm-hikes-page .lm-hikes-trail-list > button.active,
.lm-hikes-page .lm-hikes-trail-list > button:hover {
    background: var(--field-selected);
    border-color: var(--lm-border);
}
.lm-hikes-list-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lm-hikes-list-number {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: grid;
    place-items: center;
    border: 1px solid var(--lm-border);
    border-radius: 7px;
    color: var(--field-accent);
    font-size: 11px;
    font-weight: 700;
}
.lm-hikes-trail-list > button.active .lm-hikes-list-number {
    background: var(--field-accent);
    color: var(--field-on-accent);
    border-color: var(--field-accent);
}
.lm-hikes-route-preview {
    overflow: hidden;
    border: 1px solid var(--lm-border);
    border-radius: 13px;
    background: var(--field-paper);
}
.lm-hikes-route-preview:empty { display: none; }
.lm-hikes-route-preview .lm-hikes-map-panel { position: relative; top: auto; min-height: 0; border: 0; border-radius: 0; }
.lm-hikes-route-preview .lm-hikes-map { height: auto; aspect-ratio: 1.62; min-height: 260px; max-height: 480px; }
.lm-hikes-attribution { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lm-hikes-attribution .btn { font-size: 11px; margin-left: auto; }
.lm-hikes-route-preview .lm-hikes-details { border: 0; border-top: 1px solid var(--lm-border); border-radius: 0; }
.lm-hikes-route-preview .lm-hikes-details h2 {
    font: 600 clamp(25px, 3vw, 38px)/1.13 Georgia, serif;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
.lm-hikes-route-metrics, .lm-hikes-route-stops { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 12px 0; }
.lm-hikes-route-stops { padding-top: 10px; border-top: 1px solid var(--lm-border); }
.lm-hikes-route-metrics > div, .lm-hikes-route-stops > div { flex: 1 1 90px; min-width: 0; }
.lm-hikes-route-metrics dt, .lm-hikes-route-stops dt { font-size: 11px; color: var(--lm-muted); font-weight: 400; }
.lm-hikes-route-metrics dd, .lm-hikes-route-stops dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.lm-hikes-route-metrics dd { font-size: 17px; }
.lm-hikes-page .lm-hikes-direction, .lm-hikes-page .lm-hikes-direction:hover, .lm-hikes-page .lm-hikes-direction:focus,
.lm-hikes-page .btn-primary, .lm-hikes-page .btn-primary:hover, .lm-hikes-page .btn-primary:focus {
    background: var(--field-accent);
    border-color: var(--field-accent);
    color: var(--field-on-accent);
}
.lm-app.theme-dark .lm-hikes-page .btn-primary {
    background: #45474b !important;
    border-color: #777b80 !important;
    color: #f1f3f4 !important;
}
.lm-app.theme-dark .lm-hikes-page .btn-primary:is(:hover, :focus, :active) {
    background: #525458 !important;
    box-shadow: none !important;
}
.lm-hikes-details .lm-hikes-source a { color: var(--field-accent); text-underline-offset: 3px; }
.lm-hikes-trip-tools { padding-top: 12px; border-top: 1px solid var(--lm-border); font-size: 13px; }
.lm-hikes-trip-tools summary { cursor: pointer; font-weight: 650; }
@media (max-width: 780px) {
    .lm-hikes-page .lm-hikes-trail-list { max-height: 230px; }
    .lm-hikes-page .lm-hikes-route-browser, .lm-hikes-page .lm-hikes-details { padding: 14px; }
    .lm-hikes-route-preview .lm-hikes-map { min-height: 220px; }
}
