:root {
  color-scheme: light;
  --paper: #f4f6f2;
  --paper-deep: #e8ece7;
  --ink: #101917;
  --muted: #69736f;
  --line: #cdd4cf;
  --white: #fbfcf9;
  --green: #173e34;
  --green-deep: #101917;
  --lime: #c8ff47;
  --orange: #ff7048;
  --sand: #c8cec9;
  --shadow: 0 12px 32px rgba(16, 25, 23, 0.12);
  --font-ui: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(16, 25, 23, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 25, 23, .035) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
button, a, label, input, select { touch-action: manipulation; }

.app-shell { width: min(1180px, 100%); min-height: 100vh; margin: 0 auto; padding: 0 28px 80px; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
  .brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 4px; color: var(--ink); background: var(--lime); font-family: var(--font-data); font-size: 11px; font-weight: 800; }
.topbar-actions { display: flex; gap: 8px; }
.icon-button { display: grid; width: 40px; height: 40px; padding: 10px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: 180ms ease; }
.icon-button:hover { background: var(--white); transform: rotate(5deg); }
.icon-button svg, .drop-icon svg { width: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero { max-width: 850px; margin: 0 auto; padding: 11vh 0 6vh; text-align: center; }
.hero-copy { margin: 0 auto 50px; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { text-wrap: balance; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; }
.hero h1 { font-size: clamp(48px, 8vw, 88px); line-height: .94; }
.hero h1 em { color: var(--green); font-weight: 400; }
.hero-lede { max-width: 590px; margin: 30px auto 0; color: var(--muted); font-size: 17px; line-height: 1.65; }

.drop-zone { position: relative; display: flex; min-height: 220px; padding: 32px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; overflow: hidden; border: 1px dashed rgba(24, 53, 46, .35); border-radius: 22px; background: rgba(255, 253, 248, .55); box-shadow: inset 0 0 0 7px rgba(255,255,255,.23); cursor: pointer; transition: 200ms ease; }
.drop-zone::after { content: "GPX"; position: absolute; right: -5px; bottom: -31px; color: rgba(24, 53, 46, .035); font: 700 132px/1 Georgia, serif; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--green); background: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.drop-zone > span:not(.drop-icon) { color: var(--muted); font-size: 14px; }
.drop-icon { display: grid; width: 48px; height: 48px; margin-bottom: 8px; padding: 13px; place-items: center; border-radius: 50%; color: var(--white); background: var(--green); }
.text-button, .inline-link { border: 0; background: transparent; cursor: pointer; }
.text-button { margin-top: 26px; padding: 10px; font-weight: 720; }
.text-button span, .inline-link span { display: inline-block; margin-left: 5px; transition: transform 180ms ease; }
.text-button:hover span, .inline-link:hover span { transform: translateX(4px); }
.privacy-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; }

.route-view { padding-top: 62px; }
.route-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.route-heading h1 { max-width: 710px; font-size: clamp(42px, 6vw, 66px); line-height: 1; }
.preference-label { margin-top: 13px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-decoration-color: rgba(24,53,46,.22); text-underline-offset: 4px; cursor: pointer; }
.primary-button, .secondary-button { display: inline-flex; min-height: 44px; padding: 0 18px; align-items: center; justify-content: center; gap: 9px; border-radius: 99px; font-size: 12px; font-weight: 780; cursor: pointer; transition: 180ms ease; }
.primary-button { border: 1px solid var(--green); color: var(--white); background: var(--green); }
.primary-button:hover { background: var(--green-deep); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: rgba(255,253,248,.55); }
.secondary-button:hover { border-color: rgba(24,53,46,.4); background: var(--white); }
.button-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(199,238,118,.15); }
.mode-switch { display: flex; flex-shrink: 0; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.35); }
.mode-button { padding: 10px 16px; border: 0; border-radius: 99px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.mode-button.is-active { color: var(--white); background: var(--green); }

.section-tabs { display: flex; gap: 24px; margin: 46px 0 24px; border-bottom: 1px solid var(--line); }
.tab-button { position: relative; padding: 0 2px 14px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 760; cursor: pointer; }
.tab-button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; transform: scaleX(0); background: var(--ink); transition: transform 180ms ease; }
.tab-button.is-active { color: var(--ink); }
.tab-button.is-active::after { transform: scaleX(1); }

.card { border: 1px solid rgba(24, 53, 46, .10); border-radius: 24px; background: rgba(255, 253, 248, .75); box-shadow: var(--shadow); }
.route-canvas { position: relative; overflow: hidden; }
.route-canvas svg { display: block; width: 100%; height: auto; color: var(--ink); }
.map-bg { fill: #d8ddcd; }
.map-grid { color: #244239; }
.route-halo, .route-path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-halo { stroke: rgba(255,253,248,.92); stroke-width: 13; }
.route-path { stroke: var(--green); stroke-width: 6; }
.map-marker { stroke: var(--white); stroke-width: 4; }
.map-marker.start { fill: var(--lime); }
.map-marker.end { fill: var(--orange); }
.map-label { position: absolute; z-index: 1; margin: 18px; padding: 8px 11px; border-radius: 99px; color: var(--green-deep); background: rgba(255,253,248,.88); backdrop-filter: blur(8px); font-size: 11px; font-weight: 750; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(199,238,118,.2); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0; }
.stat-card { min-height: 155px; padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, .45); }
.stat-label { display: block; margin-bottom: 35px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.stat-card strong { font-family: Georgia, serif; font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: -.03em; }
.stat-card small { color: var(--muted); font: 500 14px Inter, sans-serif; }
.accent-stat { color: var(--white); border-color: var(--green); background: var(--green); }
.accent-stat .stat-label, .accent-stat small { color: rgba(255,255,255,.68); }

.insight-card { margin: 12px 0; padding: 34px; color: var(--white); background: var(--green-deep); }
.section-kicker { display: flex; gap: 9px; align-items: center; margin-bottom: 28px; color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.section-kicker > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(199,238,118,.4); border-radius: 50%; font-size: 15px; }
.insight-card h2 { max-width: 760px; font-size: clamp(28px, 4vw, 44px); }
.insight-card p { max-width: 720px; margin: 17px 0 24px; color: rgba(255,255,255,.68); line-height: 1.65; }
.inline-link { padding: 0; font-size: 12px; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(24,53,46,.3); text-underline-offset: 4px; }
.insight-card .inline-link { color: var(--white); text-decoration-color: rgba(255,255,255,.35); }

.mini-profile, .profile-card { margin-top: 12px; padding: 32px; overflow: hidden; }
.section-title-row { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.section-title-row h2, .upcoming-intro h2 { font-size: clamp(28px, 4vw, 41px); }
.mini-profile svg, .profile-card svg { display: block; width: 100%; margin-top: 24px; overflow: visible; }
.profile-area { fill: rgba(33,79,66,.11); }
.profile-line { fill: none; stroke: var(--green); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.profile-baseline { stroke: rgba(24,53,46,.15); stroke-width: 1; }
.profile-gridline { stroke: rgba(24,53,46,.1); stroke-width: 1; stroke-dasharray: 4 7; }
.axis-label { fill: var(--muted); font: 11px Inter, sans-serif; }
.climb-zone { fill: rgba(199,238,118,.3); }
.steep-zone { fill: rgba(237,116,75,.26); }
.profile-scale { padding-top: 9px; color: var(--muted); font-size: 12px; }
.profile-legend { display: flex; gap: 22px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.profile-legend span { display: flex; gap: 7px; align-items: center; }
.profile-legend i { width: 20px; height: 3px; border-radius: 3px; background: var(--green); }
.profile-legend .legend-climb { height: 8px; background: rgba(199,238,118,.8); }
.profile-legend .legend-steep { height: 8px; background: rgba(237,116,75,.75); }
.section-title-row.compact { margin: 42px 0 18px; }
.count-pill { margin-top: 7px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; }
.climb-list { display: grid; gap: 10px; }
.climb-card { display: grid; grid-template-columns: 74px 1fr auto; gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.5); }
.climb-number { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: var(--green-deep); background: var(--lime); font: italic 22px Georgia, serif; }
.climb-card h3 { margin: 0 0 7px; font: 500 22px Georgia, serif; }
.climb-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.climb-grade { min-width: 75px; text-align: right; }
.climb-grade strong { display: block; font: 500 28px Georgia, serif; }
.climb-grade span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.empty-state { padding: 30px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }

.upcoming-intro { max-width: 760px; margin: 6px 0 40px; }
.upcoming-intro > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.distance-filter { display: flex; gap: 7px; margin-top: 22px; }
.distance-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.distance-button.is-active { color: var(--white); border-color: var(--green); background: var(--green); }
.timeline { position: relative; margin-left: 18px; padding-left: 38px; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 5px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 0 0 34px; }
.timeline-item::before { content: ""; position: absolute; top: 5px; left: -40px; width: 10px; height: 10px; border: 3px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.timeline-item.is-steep::before { background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.timeline-distance { font: 500 18px Georgia, serif; }
.timeline-distance small { display: block; margin-top: 3px; color: var(--muted); font: 10px Inter, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.timeline-content { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.timeline-content h3 { margin: 0 0 8px; font: 500 24px Georgia, serif; }
.timeline-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.timeline-tags { display: flex; gap: 7px; margin-top: 12px; }
.timeline-tag { padding: 5px 8px; border-radius: 6px; color: var(--green-deep); background: rgba(199,238,118,.35); font-size: 10px; font-weight: 750; }
.timeline-tag.warning { color: #8f321d; background: rgba(237,116,75,.18); }
.empty-services { display: flex; gap: 18px; margin: 16px 0 0 56px; padding: 24px; box-shadow: none; }
.empty-services-icon { display: grid; width: 38px; height: 38px; flex-shrink: 0; place-items: center; border: 1px dashed var(--line); border-radius: 50%; }
.empty-services strong { font: 500 19px Georgia, serif; }
.empty-services p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.map-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 6px 0 24px; }
.map-toolbar h2 { font-size: clamp(30px, 4vw, 44px); }
.poi-filters { display: flex; gap: 7px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.poi-filters::-webkit-scrollbar { display: none; }
.poi-filter { display: inline-flex; flex: 0 0 auto; padding: 9px 12px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 760; cursor: pointer; }
.poi-filter span { color: #b9bcb6; }
.poi-filter.is-active { color: var(--white); border-color: var(--green); background: var(--green); }
.poi-filter[data-category="water"] span { color: #65bce6; }
.poi-filter[data-category="food"] span { color: #f0b04f; }
.poi-filter[data-category="sleep"] span { color: #aa8de0; }
.poi-filter[data-category="repair"] span { color: var(--lime); }
.poi-filter[data-category="transport"] span { color: #f1f0e9; }
.poi-filter[data-category="health"] span { color: #ef796d; }
.poi-filter[data-category="utility"] span { color: #72c7b2; }
.poi-filter[data-category="tourism"] span { color: #f099c0; }
.interactive-map-card { position: relative; min-height: 570px; overflow: hidden; background: #d8ddcd; }
#leafletMap { width: 100%; height: 570px; z-index: 0; }
.leaflet-control-zoom a { color: var(--ink) !important; }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 14px 16px; font-family: Inter, sans-serif; }
.leaflet-popup-content strong { display: block; margin-bottom: 4px; font-family: Georgia, serif; font-size: 17px; }
.poi-map-marker { display: grid; width: 25px; height: 25px; place-items: center; border: 3px solid var(--white); border-radius: 50%; color: var(--white); background: var(--green); box-shadow: 0 4px 10px rgba(24,53,46,.28); font-size: 10px; font-weight: 800; }
.poi-map-marker.water { background: #3e9dc9; }
.poi-map-marker.food { background: #d98a2f; }
.poi-map-marker.sleep { background: #7f63b8; }
.poi-map-marker.repair { color: var(--green-deep); background: var(--lime); }
.poi-map-marker.transport { background: #435b55; }
.poi-map-marker.health { background: #d55348; }
.poi-map-marker.utility { background: #348d79; }
.poi-map-marker.tourism { background: #c85e8d; }
.map-status { position: absolute; z-index: 450; right: 14px; bottom: 14px; display: grid; max-width: calc(100% - 28px); padding: 8px 11px; gap: 3px; border-radius: 7px; color: var(--green-deep); background: rgba(255,253,248,.92); box-shadow: 0 5px 20px rgba(24,53,46,.12); backdrop-filter: blur(8px); font-size: 10px; font-weight: 760; pointer-events: none; }
.map-status span + span { color: var(--muted); font-size: 9px; font-weight: 650; }
.map-unavailable { position: absolute; inset: 0; z-index: 2; display: flex; padding: 30px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; text-align: center; background: #d8ddcd; }
.map-unavailable strong { font: 500 24px Georgia, serif; }
.map-unavailable span { color: var(--muted); font-size: 13px; }
.poi-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 4px 12px; color: var(--muted); font-size: 11px; }
.poi-summary-row p { margin: 0; }
.poi-summary-row > span { flex-shrink: 0; font-size: 10px; }
.poi-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.poi-card { display: flex; min-height: 245px; padding: 19px; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.55); }
.poi-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.poi-type { color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.poi-distance { padding: 5px 7px; border-radius: 6px; color: var(--green-deep); background: rgba(199,238,118,.35); font-size: 10px; font-weight: 760; }
.poi-card h3 { margin: 24px 0 7px; font: 500 20px Georgia, serif; }
.poi-card p { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.poi-arrival { display: flex; margin: 4px 0 12px; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.schedule-status { padding: 5px 7px; border-radius: 6px; font-size: 9px; white-space: nowrap; }
.schedule-status.open { color: #28543a; background: rgba(116,201,125,.2); }
.schedule-status.closed { color: #923a28; background: rgba(237,116,75,.17); }
.schedule-status.unknown { color: var(--muted); background: rgba(24,53,46,.07); }
.detour-result { display: flex; margin-top: 2px; padding: 12px; align-items: center; justify-content: space-between; gap: 12px; border-radius: 11px; color: var(--white); background: var(--green-deep); }
.detour-result strong { font: 500 20px Georgia, serif; }
.detour-result span { color: rgba(255,255,255,.6); font-size: 9px; text-align: right; }
.poi-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 12px; }
.detour-button { min-height: 35px; padding: 7px 10px; flex: 1 1 auto; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: transparent; font-size: 10px; font-weight: 770; cursor: pointer; }
.detour-button:hover { color: var(--white); border-color: var(--green); background: var(--green); }
.detour-button:disabled { opacity: .55; cursor: wait; }
.detour-error { margin-top: 7px; color: #9a3f2b; font-size: 9px; line-height: 1.4; }
.google-maps-link { display: inline-flex; min-height: 35px; padding: 7px 10px; align-items: center; justify-content: center; border-radius: 9px; color: var(--green-deep); background: rgba(199,238,118,.35); font-size: 10px; font-weight: 770; text-decoration: none; white-space: nowrap; }
.google-maps-link:hover { background: var(--lime); }
.leaflet-popup-content .popup-link { margin-top: 10px; }
.loading-card { grid-column: 1 / -1; padding: 32px; border: 1px dashed var(--line); border-radius: 17px; color: var(--muted); text-align: center; }
.poi-more-button { grid-column: 1 / -1; min-height: 52px; border: 1px dashed var(--line); border-radius: 6px; color: var(--ink); background: transparent; font: 700 10px/1 var(--font-data); cursor: pointer; }
.poi-more-button span { margin-left: 7px; color: var(--muted); font-weight: 550; }
.poi-more-button:hover { border-color: var(--green); background: rgba(199,238,118,.18); }

.live-hero { padding: 34px; color: var(--white); background: var(--green-deep); }
.live-topline { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.live-topline .eyebrow { color: rgba(255,255,255,.55); }
.live-topline h2 { font-size: clamp(29px, 4vw, 45px); }
.live-status { display: inline-flex; flex-shrink: 0; padding: 8px 11px; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 760; text-transform: uppercase; letter-spacing: .07em; }
.live-status i { width: 7px; height: 7px; border-radius: 50%; background: #9ba9a4; }
.live-status.is-active i { background: var(--lime); box-shadow: 0 0 0 4px rgba(199,238,118,.15); }
.live-progress-track { height: 5px; margin: 40px 0 25px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.13); }
.live-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width 450ms ease; }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.live-stats article { padding-right: 16px; border-right: 1px solid rgba(255,255,255,.14); }
.live-stats article:last-child { border-right: 0; }
.live-stats span { display: block; margin-bottom: 9px; color: rgba(255,255,255,.52); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.live-stats strong { font: 500 clamp(34px, 5vw, 54px) Georgia, serif; }
.live-stats small { margin-left: 5px; color: rgba(255,255,255,.55); font-size: 11px; }
.live-actions { display: flex; gap: 8px; margin-top: 32px; }
.live-hero .primary-button { color: var(--green-deep); border-color: var(--lime); background: var(--lime); }
.live-hero .secondary-button { color: var(--white); border-color: rgba(255,255,255,.22); background: transparent; }
.permission-note { margin: 13px 0 0; color: rgba(255,255,255,.44); font-size: 10px; }
.live-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.live-next-card { padding: 24px; box-shadow: none; }
.live-next-card > span { display: block; margin-bottom: 22px; color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.live-next-card strong { font: 500 25px Georgia, serif; }
.live-next-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.live-profile-card { position: relative; }
.live-position-line { stroke: var(--orange); stroke-width: 3; stroke-dasharray: 5 5; }
.live-position-dot { fill: var(--orange); stroke: var(--white); stroke-width: 4; }

.settings-dialog { width: min(680px, calc(100% - 28px)); max-height: min(820px, calc(100vh - 28px)); padding: 0; overflow: auto; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px rgba(9,29,23,.3); }
.settings-dialog::backdrop { background: rgba(12,31,26,.58); backdrop-filter: blur(5px); }
.settings-sheet { padding: 30px; }
.settings-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.settings-header h2 { font-size: 37px; }
.settings-header .icon-button { padding: 0; font-size: 25px; font-weight: 300; }
.settings-group { margin: 27px 0 0; padding: 0; border: 0; }
.settings-group legend { margin-bottom: 12px; font-size: 11px; font-weight: 790; letter-spacing: .08em; text-transform: uppercase; }
.preference-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preference-card { position: relative; display: flex; min-height: 145px; padding: 20px; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.48); cursor: pointer; }
.preference-card:has(input:checked) { color: var(--white); border-color: var(--green); background: var(--green); }
.preference-card input { position: absolute; opacity: 0; }
.preference-card strong { margin-top: auto; font: 500 22px Georgia, serif; }
.preference-card small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.preference-card:has(input:checked) small { color: rgba(255,255,255,.62); }
.preference-check { display: grid; width: 24px; height: 24px; place-items: center; align-self: end; border: 1px solid var(--line); border-radius: 50%; color: transparent; font-size: 11px; }
.preference-card:has(input:checked) .preference-check { color: var(--green-deep); border-color: var(--lime); background: var(--lime); }
.settings-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 27px; }
.field-label { display: flex; padding: 15px 17px; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 13px; font-size: 11px; font-weight: 720; }
.field-label span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.field-label input, .field-label select { max-width: 75px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--white); }
.field-label input[type="date"] { max-width: 132px; }
.field-label input[type="time"] { max-width: 92px; }
.switches-group { border-top: 1px solid var(--line); }
.switches-group legend { padding-top: 26px; }
.switch-row { display: flex; padding: 13px 0; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; gap: 3px; }
.switch-row strong { font-size: 12px; }
.switch-row small { color: var(--muted); font-size: 10px; }
.switch-row input { width: 39px; height: 22px; accent-color: var(--green); }
.settings-save { width: 100%; margin-top: 27px; }

.error-toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; display: flex; max-width: 390px; padding: 16px 20px; flex-direction: column; gap: 4px; border-radius: 12px; color: #fff; background: #933f2c; box-shadow: var(--shadow); font-size: 13px; }
.error-toast span { color: rgba(255,255,255,.75); }
.is-hidden { display: none !important; }

@media (max-width: 760px) {
  .app-shell { padding: 0 18px 60px; }
  .topbar { height: 68px; }
  .hero { padding-top: 8vh; }
  .hero-copy { margin-bottom: 34px; }
  .hero h1 { font-size: clamp(45px, 14vw, 68px); }
  .hero-lede { font-size: 15px; }
  .drop-zone { min-height: 190px; }
  .route-view { padding-top: 42px; }
  .route-heading { align-items: start; flex-direction: column; }
  .route-heading .primary-button { width: 100%; }
  .mode-switch { width: 100%; }
  .mode-button { flex: 1; }
  .section-tabs { margin-top: 34px; }
  .route-canvas svg { min-height: 280px; object-fit: cover; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 125px; }
  .stat-label { margin-bottom: 24px; }
  .insight-card, .mini-profile, .profile-card { padding: 24px; }
  .section-title-row { align-items: start; flex-direction: column; }
  .profile-legend { gap: 11px; flex-wrap: wrap; }
  .climb-card { grid-template-columns: 56px 1fr; gap: 12px; }
  .climb-number { width: 46px; height: 46px; }
  .climb-grade { grid-column: 2; text-align: left; }
  .climb-grade strong { display: inline; margin-right: 5px; }
  .timeline { margin-left: 6px; padding-left: 30px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item::before { left: -32px; }
  .timeline-distance small { display: inline; margin-left: 5px; }
  .empty-services { margin-left: 36px; }
  .section-tabs { overflow-x: auto; scrollbar-width: none; }
  .tab-button { flex: 0 0 auto; }
  .map-toolbar { align-items: stretch; flex-direction: column; }
  .interactive-map-card, #leafletMap { min-height: 480px; height: 480px; }
  .poi-summary-row { align-items: start; flex-direction: column; gap: 4px; }
  .poi-list { grid-template-columns: 1fr; }
  .live-hero { padding: 24px; }
  .live-topline { flex-direction: column; }
  .live-stats { gap: 9px; }
  .live-stats strong { font-size: 33px; }
  .live-actions { flex-direction: column; }
  .live-next-grid { grid-template-columns: 1fr; }
  .settings-sheet { padding: 22px; }
  .preference-cards, .settings-columns { grid-template-columns: 1fr; }
}

/* INFORMATION ARCHITECTURE + FIELD UI 0.18 */
:root {
  --paper: #f2f4f0;
  --paper-deep: #e3e8e2;
  --muted: #56615d;
  --line: #bec8c1;
  --green: #123d32;
  --green-deep: #0c211b;
}

.topbar { position: sticky; z-index: 1200; top: 0; height: 70px; background: rgba(242,244,240,.94); backdrop-filter: blur(14px); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy small { color: var(--muted); font: 700 8px/1 var(--font-data); letter-spacing: .12em; }
.primary-button, .secondary-button { min-height: 46px; padding-inline: 17px; border-radius: 5px; font-size: 13px; }
.icon-button { border-radius: 5px; }
.icon-button:hover { transform: none; }

.side-menu { width: min(410px, 94vw); padding-inline: 24px; background: #0c211b; }
.side-menu nav button { min-height: 70px; padding-block: 12px; grid-template-columns: 35px 1fr; }
.side-menu nav button strong { font-size: 16px; }
.side-menu nav button small { color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.35; }

.home-dashboard { max-width: none; padding-top: 68px; text-align: left; }
.home-dashboard .hero-copy { display: grid; max-width: none; margin-bottom: 34px; grid-template-columns: minmax(0,1.4fr) minmax(300px,.6fr); column-gap: 50px; align-items: end; }
.home-dashboard .hero-copy .eyebrow, .home-dashboard .hero-copy h1, .home-dashboard .hero-copy .hero-lede { grid-column: 1; }
.home-dashboard .hero-copy h1 { max-width: 760px; font-size: clamp(48px, 7vw, 78px); }
.home-dashboard .hero-copy .hero-lede { max-width: 680px; margin: 24px 0 0; }
.home-dashboard .hero-capabilities { grid-column: 2; grid-row: 1 / 4; margin: 0; grid-template-columns: 1fr; }
.home-dashboard .hero-capabilities li { display: grid; padding: 13px 0; grid-template-columns: 34px 1fr; align-items: center; border-bottom: 1px solid var(--line); font-size: 12px; }
.home-dashboard .hero-capabilities span { margin: 0; }

.home-atlas { width: 100%; padding: 24px; border: 1px solid var(--line); background: rgba(251,252,249,.9); text-align: left; }
.home-atlas-heading { align-items: center; }
.home-atlas-heading h2 { font-family: var(--font-ui); font-size: clamp(28px,4vw,42px); font-weight: 720; letter-spacing: -.045em; }
.home-atlas-heading p:not(.eyebrow) { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.home-atlas-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.home-map-shell { position: relative; min-height: 520px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: #dce2db; }
.home-route-map { width: 100%; height: 520px; }
.home-map-empty { position: absolute; z-index: 500; inset: 0; display: grid; place-content: center; gap: 8px; color: var(--muted); background: rgba(227,232,226,.88); text-align: center; pointer-events: none; }
.home-map-empty strong { color: var(--ink); font-size: 18px; }
.home-map-legend { position: absolute; z-index: 500; right: 12px; bottom: 12px; display: flex; padding: 9px 11px; gap: 14px; border: 1px solid var(--line); background: rgba(251,252,249,.94); font: 700 10px/1 var(--font-data); }
.home-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.home-map-legend i { width: 20px; height: 4px; background: var(--green); }
.home-map-legend i.done { height: 2px; background: #77827d; }
.home-atlas-summary { padding-top: 12px; color: var(--muted); font: 700 10px/1 var(--font-data); letter-spacing: .05em; text-transform: uppercase; }

.journey-library { border-radius: 6px; }
.journey-library .library-heading h2, .route-library .library-heading h2 { font-family: var(--font-ui); font-weight: 700; letter-spacing: -.04em; }
.drop-zone { border-radius: 6px; box-shadow: none; }
.saved-route-open > strong, .library-empty strong { font-family: var(--font-ui); font-weight: 700; }

.explore-view { padding-top: 50px; }
.explore-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.explore-header h1 { max-width: 780px; font-family: var(--font-ui); font-size: clamp(38px,6vw,62px); font-weight: 760; line-height: .98; }
.explore-header p:not(.eyebrow) { max-width: 700px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.explore-mode-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: var(--white); }
.explore-mode-switch button { display: grid; min-height: 94px; padding: 17px 20px; gap: 5px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.explore-mode-switch button:last-child { border-right: 0; }
.explore-mode-switch button.is-active { color: var(--white); background: var(--green); box-shadow: inset 0 4px 0 var(--lime); }
.explore-mode-switch button:disabled { color: var(--muted); background: var(--paper-deep); cursor: not-allowed; }
.explore-mode-switch span { font: 700 9px/1 var(--font-data); letter-spacing: .1em; }
.explore-mode-switch strong { font-size: 18px; }
.explore-mode-switch small { color: var(--muted); font-size: 12px; }
.explore-mode-switch .is-active small { color: rgba(255,255,255,.7); }

.explore-command { padding: 18px; border: 1px solid var(--line); border-top: 0; background: rgba(251,252,249,.84); }
.explore-around-controls, .explore-route-controls { display: grid; grid-template-columns: auto minmax(210px,1fr) auto minmax(120px,.35fr) auto; align-items: end; gap: 8px; }
.explore-route-controls { grid-template-columns: minmax(250px,1fr) minmax(220px,.6fr) auto; }
.explore-command label { display: grid; gap: 7px; color: var(--muted); font: 700 10px/1 var(--font-data); letter-spacing: .04em; text-transform: uppercase; }
.explore-command input, .explore-command select { width: 100%; min-width: 0; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); font-size: 16px; }
.explore-filter-row { display: flex; margin-top: 12px; padding-top: 12px; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.explore-filter-row span { color: var(--muted); font: 700 10px/1 var(--font-data); }
.explore-progress { margin-top: 12px; padding: 15px; border: 1px solid var(--green); background: var(--white); }
.explore-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.explore-progress small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.explore-progress.has-error { border-color: var(--orange); }
.explore-progress.is-complete { border-color: #79a436; }
.explore-view .nearby-status { min-height: 46px; margin-top: 12px; padding: 13px 15px; border: 1px solid var(--line); background: rgba(251,252,249,.9); font-size: 12px; }
.explore-map-shell { position: relative; }
.explore-view .nearby-map { height: min(67vh,680px); min-height: 500px; margin-top: 8px; }
.explore-map-badge { position: absolute; z-index: 500; top: 20px; left: 12px; padding: 9px 11px; border: 1px solid var(--line); color: var(--ink); background: rgba(251,252,249,.94); font: 700 9px/1 var(--font-data); letter-spacing: .08em; pointer-events: none; }
.explore-view .nearby-poi-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.explore-view .nearby-poi-list article { min-height: 92px; grid-template-columns: 32px minmax(0,1fr); grid-template-rows: auto auto; }
.explore-poi-actions { display: flex !important; grid-column: 2; flex-direction: row !important; align-items: center; gap: 8px !important; }
.explore-add-button { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); color: var(--ink); background: var(--white); font: 700 10px/1 var(--font-data); cursor: pointer; }
.explore-add-button.is-added { border-color: var(--green); background: var(--lime); }

.section-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
.tab-button { justify-content: center; border-left: 1px solid var(--line); }
.tab-button:first-child { border-left: 0; }

.wind-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wind-summary { display: grid; margin-top: 22px; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); }
.wind-summary article { min-width: 0; padding: 18px; border-right: 1px solid var(--line); background: var(--white); }
.wind-summary article:last-child { border-right: 0; }
.wind-summary article.has-risk { box-shadow: inset 0 4px 0 var(--orange); }
.wind-summary span { display: block; color: var(--muted); font: 700 9px/1 var(--font-data); letter-spacing: .06em; }
.wind-summary strong { display: block; margin-top: 18px; overflow: hidden; font: 750 clamp(22px,3.2vw,38px)/1 var(--font-data); letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.wind-summary small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.wind-ribbon { display: grid; margin-top: 10px; grid-template-columns: repeat(9,1fr); border: 1px solid var(--line); }
.wind-ribbon-segment { display: grid; min-width: 0; padding: 11px 6px; justify-items: center; gap: 5px; border-right: 1px solid var(--line); background: var(--paper-deep); }
.wind-ribbon-segment:last-child { border-right: 0; }
.wind-ribbon-segment.medium { background: #efe3b9; }
.wind-ribbon-segment.high { background: #ffd0c2; }
.wind-ribbon-segment.tail { background: #d7eacb; }
.wind-ribbon-segment span, .wind-ribbon-segment small { overflow: hidden; max-width: 100%; color: var(--muted); font: 700 8px/1 var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.wind-ribbon-segment i { display: block; transform: rotate(var(--wind-angle)); font: 700 24px/1 var(--font-data); font-style: normal; }
.wind-ribbon-segment strong { font: 750 15px/1 var(--font-data); }
.weather-segments { grid-template-columns: repeat(3,1fr); }
.weather-card.wind-card { min-height: 210px; }
.wind-card-main { display: flex !important; margin-top: 18px !important; align-items: center; gap: 12px !important; color: var(--ink) !important; }
.wind-card-main i { transform: rotate(var(--wind-angle)); font: 700 32px/1 var(--font-data); font-style: normal; }
.wind-card-main strong { margin: 0; font: 750 30px/1 var(--font-data); }
.wind-card-main strong small { font-size: 11px; }
.weather-card.wind-card > b { margin-top: 9px; font-size: 13px; }

@media (max-width: 900px) {
  .home-dashboard .hero-copy { grid-template-columns: 1fr; }
  .home-dashboard .hero-capabilities { grid-column: 1; grid-row: auto; margin-top: 28px; }
  .explore-around-controls { grid-template-columns: 1fr 1fr; }
  .explore-around-controls label { grid-column: span 1; }
  .explore-route-controls { grid-template-columns: 1fr 1fr; }
  .explore-route-controls .primary-button { grid-column: 1 / -1; }
  .explore-view .nearby-poi-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .topbar { margin-inline: -14px; padding-inline: 14px; }
  .brand-copy small { display: none; }
  .system-strip { overflow: hidden; }
  .system-strip span:nth-child(n+3) { display: none; }
  .home-dashboard { padding-top: 38px; }
  .home-dashboard .hero-copy { margin-bottom: 24px; }
  .home-dashboard .hero-copy h1 { font-size: clamp(38px,11vw,52px); }
  .home-dashboard .hero-lede { font-size: 15px; }
  .home-atlas { padding: 14px; }
  .home-atlas-heading, .explore-header { align-items: stretch; flex-direction: column; }
  .home-atlas-actions { display: grid; grid-template-columns: 1fr; }
  .home-map-shell, .home-route-map { min-height: 420px; height: 420px; }
  .journey-library { margin-top: 34px; }
  .route-library { margin-top: 42px; }
  .explore-view { padding-top: 30px; }
  .explore-header h1 { font-size: clamp(36px,10vw,48px); }
  .explore-mode-switch { grid-template-columns: 1fr; }
  .explore-mode-switch button, .explore-mode-switch button:last-child { min-height: 80px; border-right: 0; border-bottom: 1px solid var(--line); }
  .explore-mode-switch button:last-child { border-bottom: 0; }
  .explore-around-controls, .explore-route-controls { grid-template-columns: 1fr; }
  .explore-route-controls .primary-button { grid-column: auto; }
  .explore-command .primary-button, .explore-command .secondary-button { width: 100%; }
  .explore-filter-row { align-items: stretch; flex-direction: column; }
  .explore-view .nearby-map { height: 55dvh; min-height: 410px; }
  .explore-view .nearby-poi-list { grid-template-columns: 1fr; }
  .explore-view .nearby-poi-list article { min-height: 104px; }
  .section-tabs { position: sticky; grid-template-columns: repeat(4,1fr); }
  .tab-button { min-width: 0; padding-inline: 4px; font-size: 10px; }
  .tab-button span { display: none; }
  .wind-actions { display: grid; width: 100%; }
  .weather-section .section-title-row { flex-direction: column; }
  .wind-summary { grid-template-columns: 1fr; }
  .wind-summary article, .wind-summary article:last-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .wind-summary article:last-child { border-bottom: 0; }
  .wind-ribbon { grid-template-columns: repeat(3,1fr); }
  .wind-ribbon-segment { border-bottom: 1px solid var(--line); }
  .weather-segments { grid-template-columns: 1fr; }
}

/* v0.16 — relief terrain, cartes cumulées et mode économie */
.leaflet-attribution-flag { display: none !important; }
.menu-button { flex: 0 0 auto; }
.side-menu-backdrop { position: fixed; inset: 0; z-index: 2998; border: 0; background: rgba(5,15,12,.58); backdrop-filter: blur(3px); }
.side-menu { position: fixed; z-index: 2999; top: 0; bottom: 0; left: 0; width: min(390px, 92vw); padding: max(22px, env(safe-area-inset-top)) 20px 24px; color: var(--white); background: #10231e; box-shadow: 26px 0 70px rgba(0,0,0,.32); transform: translateX(-104%); transition: transform 220ms ease; }
.side-menu.is-open { transform: translateX(0); }
.side-menu-head { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 11px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.16); }
.side-menu-head > div { display: grid; gap: 4px; }
.side-menu-head strong { font-size: 15px; letter-spacing: .08em; }
.side-menu-head small { color: var(--lime); font: 700 10px/1 var(--font-data); letter-spacing: .12em; }
.side-menu-head .icon-button { color: var(--white); border-color: rgba(255,255,255,.2); font-size: 24px; }
.side-menu nav { display: grid; margin-top: 18px; }
.side-menu nav button { display: grid; min-height: 75px; padding: 13px 5px; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; gap: 6px 10px; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); color: var(--white); background: transparent; text-align: left; cursor: pointer; }
.side-menu nav button > span { grid-row: 1 / 3; color: var(--lime); font: 700 11px/1.4 var(--font-data); }
.side-menu nav button strong { font-size: 15px; }
.side-menu nav button small { color: rgba(255,255,255,.58); font-size: 12px; }
.side-menu > p { margin: 24px 4px 0; color: rgba(255,255,255,.5); font: 600 11px/1.55 var(--font-data); }

.nearby-explorer { margin-top: 44px; padding: 26px; border: 1px solid var(--line); background: var(--paper); }
.nearby-heading { align-items: end; }
.nearby-heading p:not(.eyebrow) { max-width: 680px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.nearby-search-row { display: grid; margin: 22px 0 12px; grid-template-columns: minmax(180px,1fr) auto auto auto; align-items: end; gap: 8px; }
.nearby-search-row label { grid-column: 1 / -1; font: 700 11px/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; }
.nearby-search-row input { min-width: 0; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 0; background: var(--white); font-size: 16px; }
.nearby-status { min-height: 38px; padding: 11px 13px; color: var(--muted); border-left: 3px solid var(--lime); background: rgba(200,255,71,.09); font-size: 12px; line-height: 1.4; }
.nearby-status.is-loading { display: grid; gap: 7px; color: var(--ink); border: 1px solid var(--green); border-left-width: 5px; background: var(--white); }
.nearby-status.is-loading strong, .nearby-status.is-loading span { display: block; }
.nearby-status.is-loading i { display: block; height: 8px; overflow: hidden; background: var(--line); }
.nearby-status.is-loading b { display: block; height: 100%; background: var(--lime); transition: width 220ms ease; }
.nearby-route-status-filter { display: flex; margin: 20px 0 12px; padding: 14px; flex-wrap: wrap; gap: 10px 22px; border: 1px solid var(--line); }
.nearby-route-status-filter legend { padding: 0 8px; font: 700 10px/1 var(--font-data); }
.nearby-route-status-filter label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nearby-route-journeys { display: grid; max-height: 40vh; overflow: auto; border-top: 1px solid var(--line); }
.nearby-route-journeys label { display: grid; padding: 12px; grid-template-columns: 22px 1fr; align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; }
.nearby-route-journeys span { display: grid; gap: 4px; }
.nearby-route-journeys small { color: var(--muted); }
.nearby-map { height: min(54vh, 520px); min-height: 360px; margin-top: 12px; border: 1px solid var(--line); background: #dce2db; }
.nearby-poi-list { display: grid; margin-top: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.nearby-poi-list article { display: grid; min-width: 0; min-height: 66px; padding: 10px; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--white); }
.nearby-poi-list article > div { display: grid; min-width: 0; gap: 4px; }
.nearby-poi-list article strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.nearby-poi-list article small { color: var(--muted); font-size: 11px; }
.nearby-poi-list article a { color: var(--green); font: 700 11px/1.2 var(--font-data); }
.nearby-knowledge-links { display: flex; flex-wrap: wrap; gap: 8px; }
.knowledge-link { color: var(--green); font: 700 11px/1.25 var(--font-data); text-decoration: underline; text-underline-offset: 2px; }

.climb-detection-panel { margin: 16px 0 30px; padding: 22px; }
.climb-detection-copy { max-width: 670px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.climb-threshold-summary { display: grid; margin-top: 18px; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.climb-threshold-summary > span { display: grid; min-height: 82px; padding: 14px; align-content: center; gap: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.climb-threshold-summary small { color: var(--muted); font: 700 11px/1 var(--font-data); }
.climb-threshold-summary strong { font: 500 23px/1 Georgia,serif; }
.climb-preset-grid { display: grid; margin-top: 18px; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; }
.climb-preset-button { display: grid; min-height: 86px; padding: 13px; align-content: center; gap: 7px; border: 1px solid var(--line); color: var(--ink); background: var(--white); text-align: left; cursor: pointer; }
.climb-preset-button strong { font-size: 13px; }
.climb-preset-button span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.climb-preset-button.is-active { border-color: var(--green); background: var(--lime); box-shadow: inset 0 -4px 0 var(--green); }
.climb-dialog { width: min(900px,calc(100% - 24px)); }
#climbDialogProfile { display: block; width: 100%; height: auto; margin: 18px 0; color: var(--muted); background: #eef1ec; }
.climb-dialog-area { fill: url(#climbFill); }
.climb-dialog-line { fill: none; stroke: var(--green); stroke-width: 5; stroke-linejoin: round; }
.climb-grade-segment { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.climb-grade-segment.grade-easy, .climb-color-legend .grade-easy { stroke: #f5d547; background: #f5d547; }
.climb-grade-segment.grade-medium, .climb-color-legend .grade-medium { stroke: #f39a32; background: #f39a32; }
.climb-grade-segment.grade-hard, .climb-color-legend .grade-hard { stroke: #e84b37; background: #e84b37; }
.climb-grade-segment.grade-severe, .climb-color-legend .grade-severe { stroke: #7b1720; background: #7b1720; }
.climb-grade-segment.grade-extreme, .climb-color-legend .grade-extreme { stroke: #101917; background: #101917; }
.climb-color-legend { display: flex !important; margin-bottom: 8px; grid-column: 1 / -1; flex-wrap: wrap; gap: 8px 14px; }
.climb-color-legend span { display: inline-flex; align-items: center; gap: 5px; font: 700 9px/1 var(--font-data); }
.climb-color-legend i { width: 18px; height: 6px; }
#climbDialogProfile text { fill: var(--muted); font: 700 12px var(--font-data); }
.climb-dialog-stats { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.climb-dialog-stats article { display: grid; min-height: 90px; padding: 15px; align-content: center; gap: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.climb-dialog-stats span { color: var(--muted); font: 700 11px/1 var(--font-data); text-transform: uppercase; }
.climb-dialog-stats strong { font: 500 24px/1 Georgia,serif; }
.climb-grade-distribution { display: grid; margin-top: 16px; gap: 8px; }
.climb-grade-distribution > div { display: grid; grid-template-columns: 65px 1fr 42px; align-items: center; gap: 9px; font: 700 11px/1 var(--font-data); }
.climb-grade-distribution i { height: 8px; overflow: hidden; background: var(--line); }
.climb-grade-distribution b { display: block; height: 100%; background: var(--lime); }
.climb-settings-dialog { width: min(820px,calc(100% - 24px)); }
.climb-setting-fields { display: grid; margin-top: 24px; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.climb-setting-button { display: grid; min-width: 0; min-height: 132px; padding: 18px; align-content: start; gap: 9px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink); background: var(--white); text-align: left; cursor: pointer; }
.climb-setting-button span { color: var(--muted); font: 700 10px/1.2 var(--font-data); text-transform: uppercase; }
.climb-setting-button strong { font: 700 24px/1 var(--font-data); }
.climb-setting-button small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.climb-setting-button.is-selected { box-shadow: inset 0 -4px var(--lime); background: rgba(200,255,71,.1); }
.threshold-picker { display: grid; margin-top: 12px; padding: 16px; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; border: 1px solid var(--green); background: var(--white); }
.threshold-picker > div:first-child { display: grid; gap: 5px; }
.threshold-picker span { font: 700 11px/1 var(--font-data); }
.threshold-picker small { color: var(--muted); font-size: 11px; }
.threshold-stepper { display: grid; grid-template-columns: 52px minmax(100px,auto) 52px; align-items: center; gap: 8px; }
.threshold-stepper button { min-width: 52px; padding: 0; font-size: 22px; }
.threshold-stepper strong { text-align: center; }
.climb-settings-preview { display: flex; margin-top: 16px; padding: 15px; align-items: center; justify-content: space-between; gap: 16px; border-left: 4px solid var(--lime); background: rgba(200,255,71,.1); }
.climb-settings-preview span { font: 700 13px/1.3 var(--font-data); }
.climb-settings-preview small { color: var(--muted); font-size: 11px; }

.live-mode-header { display: none; align-items: center; justify-content: space-between; gap: 18px; padding: max(14px,env(safe-area-inset-top)) 0 15px; border-bottom: 1px solid var(--line); }
.live-mode-header > div { display: grid; gap: 4px; }
.live-mode-header span { color: var(--orange); font: 750 11px/1 var(--font-data); letter-spacing: .08em; }
.live-mode-header strong { font-size: 16px; }
.live-map-card { margin: 12px 0; padding: 18px; }
#liveMap { height: min(58vh,600px); min-height: 390px; margin-top: 13px; background: #dce2db; }
.live-profile-card { margin-top: 12px; }
.live-profile-controls { display: grid; margin: 12px 0 4px; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 9px; }
.live-profile-controls input { width: 100%; accent-color: var(--green); }
.live-profile-viewport { overflow: hidden; border: 1px solid var(--line); background: var(--paper); touch-action: none; }
#liveProfile { display: block; width: 100%; height: auto; min-height: 240px; touch-action: none; user-select: none; }
.live-poi-profile-line { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .8; }
.live-poi-profile-label { fill: var(--orange); font: 800 11px var(--font-data); }
.live-profile-readout { display: grid; margin-top: 9px; grid-template-columns: repeat(6,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.live-profile-readout > span { display: grid; min-width: 0; min-height: 66px; padding: 10px; align-content: center; gap: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.live-profile-readout small { color: var(--muted); font: 700 10px/1 var(--font-data); }
.live-profile-readout strong { font-size: 13px; }
.profile-title-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.profile-landscape-hint { max-width: 245px; color: var(--muted); font: 600 9px/1.35 var(--font-data); text-align: right; }
.live-capability-note { padding: 10px 12px; border-left: 3px solid var(--lime); background: rgba(200,255,71,.08); font-size: 12px !important; line-height: 1.5; }

.in-app-alerts { position: fixed; z-index: 5000; top: max(14px,env(safe-area-inset-top)); right: 14px; display: grid; width: min(390px,calc(100vw - 28px)); gap: 8px; pointer-events: none; }
.in-app-alert { display: grid; padding: 15px; grid-template-columns: 1fr 32px; gap: 10px; color: var(--white); border-left: 5px solid var(--lime); background: #10231e; box-shadow: 0 16px 45px rgba(0,0,0,.28); pointer-events: auto; animation: alert-in 180ms ease-out; }
.in-app-alert > div { display: grid; gap: 5px; }
.in-app-alert span { color: var(--lime); font: 750 10px/1 var(--font-data); letter-spacing: .08em; }
.in-app-alert strong { font-size: 14px; }
.in-app-alert p { margin: 0; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.45; }
.in-app-alert button { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.22); color: var(--white); background: transparent; font-size: 20px; cursor: pointer; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-10px); } }

.sponsor-slot:empty { display: none; }
.sponsor-slot:not(:empty) { display: grid; min-height: 72px; max-height: 96px; margin: 28px 0 0; place-items: center; overflow: hidden; border: 1px solid var(--line); color: var(--muted); background: var(--paper); font-size: 12px; }
.is-live-mode [data-ad-slot] { display: none !important; }
.is-live-mode .topbar, .is-live-mode .system-strip, .is-live-mode .route-heading, .is-live-mode .section-tabs { display: none !important; }
.is-live-mode .app-shell { max-width: 1440px; padding-top: 0; }
.is-live-mode .live-mode-header { display: flex; position: sticky; z-index: 1200; top: 0; background: rgba(244,246,242,.96); backdrop-filter: blur(14px); }
.is-live-mode #livePanel { display: block !important; }
.is-live-mode .tab-panel:not(#livePanel) { display: none !important; }

/* Les libellés de terrain restent lisibles sur petit écran. */
.eyebrow, .system-strip, .route-metadata, .poi-type, .poi-arrival, .timeline-content p,
.live-poi-main span, .live-poi-main small, .live-poi-order small, .dialog-intro,
.permission-note, .profile-help, .profile-pan-label, .count-pill,
.journey-empty span, .journey-card p, .journey-stages button small, .journey-no-stage,
.saved-route-card small, .poi-progress small, .live-deviation-card span { font-size: 11px !important; }

@media (max-width: 900px) {
  .climb-preset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .climb-preset-button:last-child { grid-column: 1 / -1; }
  .nearby-poi-list { grid-template-columns: 1fr; }
  .climb-setting-fields { grid-template-columns: 1fr; }
  .live-profile-readout { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: 44px minmax(0,1fr) auto; }
  .brand-copy small { font-size: 9px; }
  .nearby-explorer { margin: 30px -2px 0; padding: 16px; }
  .nearby-heading { align-items: stretch; flex-direction: column; }
  .nearby-heading .primary-button { width: 100%; }
  .nearby-search-row { grid-template-columns: 1fr 1fr; }
  .nearby-search-row input { grid-column: 1 / -1; }
  .poi-load-command { position: sticky; z-index: 890; top: 64px; padding: 13px; align-items: stretch; flex-direction: column; box-shadow: 3px 3px 0 var(--lime); }
  .poi-load-command .primary-button { width: 100%; min-width: 0; }
  .threshold-picker { grid-template-columns: 1fr; }
  .threshold-stepper { width: 100%; grid-template-columns: 54px 1fr 54px; }
  .profile-title-actions { align-items: flex-end; flex-direction: column; }
  .profile-landscape-hint { max-width: 190px; font-size: 8px; }
  .nearby-map { height: 52dvh; min-height: 350px; }
  .climb-detection-panel { padding: 15px; }
  .climb-preset-grid { grid-template-columns: 1fr; }
  .climb-preset-button:last-child { grid-column: auto; }
  .climb-dialog-stats { grid-template-columns: repeat(2,1fr); }
  .climb-threshold-summary { grid-template-columns: 1fr; }
  .climb-settings-preview { align-items: flex-start; flex-direction: column; }
  .climb-dialog-stats strong { font-size: 20px; }
  .live-mode-header { padding-right: 2px; padding-left: 2px; }
  .live-mode-header .secondary-button { padding: 0 12px; }
  .is-live-mode .app-shell { padding-right: 10px; padding-bottom: 24px; padding-left: 10px; }
  .is-live-mode #livePanel { padding-top: 0; }
  #liveMap { height: 53dvh; min-height: 360px; }
  #liveProfile { min-height: 210px; }
  .live-map-card, .live-profile-card { padding: 13px; }
  .live-profile-readout { grid-template-columns: repeat(2,1fr); }
  .in-app-alerts { right: 8px; width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Account and production presentation */
.account-button {
  display: inline-flex;
  min-height: 40px;
  padding: 4px 10px 4px 5px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(251,252,249,.92);
  cursor: pointer;
}
.account-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  color: var(--ink);
  background: var(--lime);
  font: 800 10px/1 var(--font-data);
}
.account-copy { display: grid; min-width: 76px; gap: 3px; text-align: left; }
.account-copy strong { max-width: 118px; overflow: hidden; font-size: 10px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted); font: 700 7px/1 var(--font-data); letter-spacing: .1em; }
.account-sheet { width: min(560px, calc(100vw - 24px)); }
.account-state-card { display: grid; gap: 14px; margin-top: 24px; }
.account-state-card > p { margin: 6px 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-state-card label { display: grid; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.account-state-card input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); font-size: 16px; }
.account-security-mark { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid var(--ink); border-radius: 8px; background: var(--lime); font: 800 14px/1 var(--font-data); }
.account-state-card > div > p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.account-google-button { min-height: 48px; }
.account-google-button span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #1a73e8; background: white; font: 800 12px/1 Arial,sans-serif; }
.account-separator { position: relative; text-align: center; }
.account-separator::before { content: ""; position: absolute; top: 50%; right: 0; left: 0; border-top: 1px solid var(--line); }
.account-separator span { position: relative; padding: 0 10px; color: var(--muted); background: var(--paper); font-size: 10px; }
.account-user-line { display: flex; padding: 16px; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.account-avatar-large { width: 48px; height: 48px; font-size: 14px; }
.account-user-line > div { display: grid; min-width: 0; gap: 4px; }
.account-user-line small, .account-sync-grid small { color: var(--muted); font: 700 8px/1 var(--font-data); letter-spacing: .1em; }
.account-user-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-user-line span:not(.account-avatar) { color: var(--muted); font-size: 11px; }
.account-sync-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-sync-grid > div { display: grid; min-height: 92px; padding: 16px; align-content: space-between; border: 1px solid var(--line); border-radius: 7px; }
.account-sync-grid strong { font-size: 20px; }
.account-message { min-height: 20px; margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.account-message[data-kind="success"] { color: #276d46; }
.account-message[data-kind="error"] { color: #a13f2b; }

@media (max-width: 620px) {
  .account-copy { display: none; }
  .account-button { width: 38px; height: 38px; padding: 4px; justify-content: center; }
  .account-avatar { width: 28px; height: 28px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .icon-button { width: 38px; height: 38px; }
}

/* FIELD SYSTEM 0.5 — technical interface layer */
.app-shell { width: min(1240px, 100%); }

.topbar { height: 68px; border-color: var(--line); }
.brand { gap: 10px; font-size: 12px; letter-spacing: .06em; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font: 800 12px/1 var(--font-data); letter-spacing: .08em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font: 600 8px/1 var(--font-data); letter-spacing: .16em; }
.icon-button { width: 36px; height: 36px; padding: 9px; border-radius: 5px; background: var(--white); }
.icon-button:hover { border-color: var(--ink); background: var(--lime); transform: none; }

.system-strip {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  min-height: 29px;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 600 8px/1 var(--font-data);
  letter-spacing: .08em;
  white-space: nowrap;
}
.system-strip span { display: inline-flex; min-height: 28px; padding: 0 13px; align-items: center; gap: 7px; border-right: 1px solid var(--line); }
.system-strip span:first-child { padding-left: 0; color: var(--ink); }
.status-led { display: inline-block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #55b879; box-shadow: 0 0 0 3px rgba(85,184,121,.12); }

.hero {
  display: grid;
  max-width: none;
  min-height: calc(100vh - 98px);
  margin: 0;
  padding: clamp(64px, 10vh, 110px) 0 72px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(46px, 8vw, 110px);
  text-align: left;
}
.hero-copy { margin: 0; align-self: center; }
.hero h1 { max-width: 740px; font: 720 clamp(44px, 6.4vw, 78px)/.96 var(--font-ui); letter-spacing: -.06em; }
.hero h1 em { color: var(--green); font-style: normal; font-weight: 720; }
.hero-lede { max-width: 590px; margin: 28px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.eyebrow { margin-bottom: 14px; color: var(--green); font: 750 10px/1 var(--font-data); letter-spacing: .13em; }
.hero-capabilities { display: grid; max-width: 590px; margin: 34px 0 0; padding: 0; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); list-style: none; }
.hero-capabilities li { padding: 15px 12px 0 0; color: var(--muted); font: 650 10px/1.4 var(--font-ui); }
.hero-capabilities span { display: block; margin-bottom: 8px; color: var(--ink); font: 700 9px/1 var(--font-data); }
.drop-zone { grid-column: 2; grid-row: 1 / span 3; min-height: 430px; padding: 36px; align-self: stretch; border: 1px dashed #98a29c; border-radius: 8px; background: rgba(251,252,249,.82); box-shadow: none; }
.drop-zone::before { content: none; }
.drop-zone::after { right: 19px; bottom: 15px; color: rgba(16,25,23,.055); font: 800 72px/1 var(--font-data); }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--ink); background: var(--white); transform: none; box-shadow: inset 0 -4px 0 var(--lime); }
.drop-zone strong { font: 760 16px/1 var(--font-data); letter-spacing: .04em; }
.drop-zone > span:not(.drop-icon) { font: 500 10px/1.5 var(--font-data); }
.drop-icon { width: 52px; height: 52px; margin-bottom: 18px; padding: 15px; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--lime); }
.text-button { width: max-content; margin-top: 34px; padding: 10px 0; font: 720 9px/1 var(--font-data); letter-spacing: .05em; }
.privacy-note { display: flex; max-width: 570px; margin: 12px 0 0; align-items: flex-start; gap: 8px; font: 500 9px/1.55 var(--font-data); }
.privacy-note .status-led { margin-top: 3px; }

h1, h2 { font-family: var(--font-ui); font-style: normal; font-weight: 690; }
.route-view { padding-top: 48px; }
.route-heading h1 { max-width: 820px; font: 720 clamp(38px, 5vw, 60px)/.98 var(--font-ui); letter-spacing: -.055em; }
.route-metadata { display: flex; gap: 0; margin-top: 18px; border-block: 1px solid var(--line); }
.route-metadata span { padding: 9px 14px; border-right: 1px solid var(--line); color: var(--muted); font: 650 9px/1 var(--font-data); letter-spacing: .06em; }
.route-metadata span:first-child { padding-left: 0; color: var(--ink); }
.preference-label { margin-top: 11px; font: 570 10px/1 var(--font-data); text-decoration: none; }

.primary-button, .secondary-button { min-height: 40px; padding: 0 15px; border-radius: 5px; font: 720 10px/1 var(--font-data); letter-spacing: .035em; text-transform: uppercase; }
.primary-button:hover { transform: none; }
.button-pulse { width: 6px; height: 6px; box-shadow: none; }
.section-tabs { margin-top: 42px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tab-button { display: flex; min-height: 46px; padding: 0 18px; align-items: center; gap: 11px; border-right: 1px solid var(--line); font: 650 10px/1 var(--font-ui); }
.tab-button span { color: #909994; font: 650 8px/1 var(--font-data); }
.tab-button.is-active { color: var(--ink); box-shadow: inset 0 -3px 0 var(--lime); }
.tab-button.is-active span { color: var(--green); }

.card, .stat-card, .climb-card, .poi-card, .preference-card, .field-label, .loading-card, .empty-state {
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(251,252,249,.9);
  box-shadow: none;
}
.route-canvas { border-radius: 8px; }
.route-canvas svg .map-bg { rx: 7px; }
.map-label { border-radius: 4px; font: 650 8px/1 var(--font-data); letter-spacing: .05em; }
.stats-grid { gap: 8px; }
.stat-card { min-height: 138px; padding: 18px; }
.stat-label { font: 650 9px/1 var(--font-data); letter-spacing: .08em; }
.stat-card strong { font: 720 clamp(30px, 4.3vw, 48px)/1 var(--font-data); letter-spacing: -.06em; }
.stat-card strong small { font-family: var(--font-data); font-size: 9px; letter-spacing: 0; }
.accent-stat { color: var(--ink); background: var(--lime); }
.insight-card { border-left: 4px solid var(--lime); border-radius: 8px; color: var(--white); background: var(--ink); }
.insight-card h2 { font-size: clamp(25px, 3.5vw, 37px); }
.section-kicker, .count-pill, .profile-scale, .profile-legend, .climb-meta, .poi-type, .poi-distance, .poi-arrival, .schedule-status, .map-status, .live-status, .field-label, .settings-group legend { font-family: var(--font-data); }
.section-title-row h2, .upcoming-intro h2, .map-toolbar h2 { letter-spacing: -.04em; }
.profile-line { stroke-width: 2.5; }
.profile-gridline { stroke-dasharray: 2 5; }
.axis-label { font-family: var(--font-data); }
.climb-number { border-radius: 5px; font: 700 15px/1 var(--font-data); }
.climb-card h3, .timeline-content h3, .empty-services strong, .leaflet-popup-content strong, .map-unavailable strong, .poi-card h3, .live-next-card strong, .preference-card strong { font-family: var(--font-ui); font-style: normal; font-weight: 680; }
.climb-grade strong, .timeline-distance, .detour-result strong, .live-stats strong { font-family: var(--font-data); font-style: normal; font-weight: 700; }
.count-pill, .distance-button, .poi-filter, .live-status { border-radius: 5px; }
.timeline-item::before { border-radius: 2px; }
.timeline-tag { border-radius: 3px; font-family: var(--font-data); }
.interactive-map-card { border-radius: 8px; background: #dce2db; }
.leaflet-popup-content-wrapper { border-radius: 6px; box-shadow: var(--shadow); }
.leaflet-popup-content { font-family: var(--font-ui); }
.poi-map-marker { border-width: 2px; border-radius: 4px; box-shadow: 0 3px 9px rgba(16,25,23,.25); font-family: var(--font-data); }
.map-status { right: 12px; bottom: 12px; border: 1px solid var(--line); border-radius: 4px; box-shadow: none; }
.poi-card h3 { margin-top: 20px; }
.detour-result { border-radius: 5px; }
.detour-button, .google-maps-link { border-radius: 4px; font-family: var(--font-data); }
.live-hero { border: 1px solid #26312e; border-left: 4px solid var(--lime); border-radius: 8px; background: var(--ink); }
.live-progress-track, .live-progress-track span { border-radius: 0; }
.settings-dialog { border: 1px solid #323b38; border-radius: 8px; background: var(--paper); box-shadow: 0 24px 80px rgba(9,18,15,.35); }
.settings-dialog::backdrop { background: rgba(9,18,15,.72); backdrop-filter: blur(2px); }
.settings-header h2 { font-family: var(--font-ui); font-weight: 700; }
.preference-card { border-radius: 6px; }
.preference-check { border-radius: 4px; }
.field-label input, .field-label select { border-radius: 3px; font-family: var(--font-data); }
.error-toast { border: 1px solid #742f20; border-radius: 6px; box-shadow: var(--shadow); font-family: var(--font-data); }

@media (max-width: 860px) {
  .hero { display: block; min-height: auto; padding-top: 64px; }
  .hero-copy { margin-bottom: 36px; }
  .drop-zone { min-height: 260px; }
  .hero-capabilities { margin-top: 28px; }
}

@media (max-width: 760px) {
  body { padding-top: env(safe-area-inset-top); }
  .app-shell {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(60px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
  }
  .system-strip { margin-inline: -14px; padding-left: 14px; }
  .system-strip span:first-child { padding-left: 0; }
  .hero { padding: 52px 0 56px; }
  .hero h1 { font-size: clamp(40px, 12vw, 59px); }
  .hero-capabilities { grid-template-columns: 1fr; }
  .hero-capabilities li { display: flex; gap: 12px; padding-top: 10px; }
  .hero-capabilities span { margin: 1px 0 0; }
  .drop-zone { min-height: 230px; margin-top: 32px; }
  .route-view { padding-top: 36px; }
  .route-metadata { overflow-x: auto; }
  .route-metadata span { flex: 0 0 auto; }
  .section-tabs { position: sticky; top: 0; z-index: 700; margin-top: 28px; background: rgba(244,246,242,.96); backdrop-filter: blur(12px); }
  .tab-button { min-height: 48px; padding: 0 14px; }
  .stat-card { min-height: 116px; }
  .primary-button, .secondary-button, .icon-button, .distance-button, .poi-filter, .detour-button, .google-maps-link { min-height: 44px; }
  .icon-button { min-width: 44px; }
  .field-label input, .field-label select { min-height: 40px; font-size: 16px; }
  .interactive-map-card, #leafletMap { height: min(62vh, 560px); min-height: 420px; }
  .settings-dialog { max-height: calc(100dvh - 16px); }
  .settings-sheet { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}

@media (display-mode: standalone) {
  body { min-height: 100dvh; }
  .topbar { padding-top: env(safe-area-inset-top); height: calc(68px + env(safe-area-inset-top)); }
}

/* PRODUCT LAYER 0.9 */
.tab-button b { display: grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border-radius: 3px; color: var(--ink); background: var(--lime); font: 700 8px/1 var(--font-data); }
.operations-card { margin-top: 8px; padding: 28px; }
.analysis-state { display: inline-flex; padding: 7px 9px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .06em; }
.analysis-state i { width: 6px; height: 6px; border-radius: 50%; background: #55b879; }
.operations-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border-block: 1px solid var(--line); }
.operations-grid article { padding: 18px 20px 18px 0; border-right: 1px solid var(--line); }
.operations-grid article + article { padding-left: 20px; }
.operations-grid article:last-child { border-right: 0; }
.operations-grid span, .plan-summary-card > span { display: block; margin-bottom: 18px; color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.operations-grid strong { display: block; font: 700 clamp(26px, 4vw, 42px)/1 var(--font-data); letter-spacing: -.06em; }
.operations-grid small, .plan-summary-card small { display: block; margin-top: 8px; color: var(--muted); font: 500 9px/1.4 var(--font-data); }
.route-risk-strip { display: flex; min-height: 32px; margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-deep); }
.route-risk-strip.large { min-height: 46px; margin-top: 26px; }
.risk-segment { display: grid; min-width: 3px; place-items: center; border-right: 2px solid var(--white); background: #b9d6c2; }
.risk-segment:nth-child(even) { background: #a8c9b3; }
.risk-segment.is-critical { background: var(--orange); }
.risk-segment i { overflow: hidden; color: var(--ink); font: 700 8px/1 var(--font-data); font-style: normal; white-space: nowrap; }
.risk-empty { display: grid; width: 100%; place-items: center; color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .08em; }
.operations-actions { display: flex; margin-top: 17px; align-items: center; justify-content: space-between; gap: 20px; }
.operations-actions p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.plan-header { display: flex; margin: 4px 0 30px; align-items: end; justify-content: space-between; gap: 32px; }
.plan-header h2 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -.055em; }
.plan-header p:not(.eyebrow) { max-width: 680px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.plan-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.plan-summary-card { min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: rgba(251,252,249,.9); }
.plan-summary-card strong { display: block; font: 700 clamp(25px, 3.5vw, 40px)/1 var(--font-data); letter-spacing: -.055em; }
.plan-finish-card { color: var(--ink); border-color: #afd63d; background: var(--lime); }
.plan-finish-card > span, .plan-finish-card small { color: #334020; }
#planTargetStatus.is-late { color: #9a301c; font-weight: 700; }
.plan-section { margin-top: 12px; padding: 28px; }
.plan-section h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -.045em; }
.count-pill.has-risk { color: #8d2d1a; border-color: rgba(255,112,72,.55); background: rgba(255,112,72,.12); }
.supply-gap-list { display: grid; margin-top: 18px; }
.supply-gap-row { display: grid; padding: 12px 0; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.supply-gap-row > span { width: max-content; padding: 5px 6px; border-radius: 3px; color: #36523d; background: rgba(85,184,121,.12); font: 700 8px/1 var(--font-data); }
.supply-gap-row.is-critical > span { color: #8d2d1a; background: rgba(255,112,72,.16); }
.supply-gap-row strong { display: block; font-size: 12px; }
.supply-gap-row small { display: block; margin-top: 5px; color: var(--muted); font: 500 9px/1 var(--font-data); }
.supply-gap-row > b { font: 700 14px/1 var(--font-data); }
.plan-stop-list { display: grid; margin-top: 22px; }
.plan-stop-row { display: grid; padding: 16px 0; grid-template-columns: 42px minmax(0, 1fr) 126px 36px; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.plan-stop-index { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 4px; color: var(--ink); background: var(--lime); font: 700 10px/1 var(--font-data); }
.plan-stop-main > span { display: block; margin-bottom: 5px; color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .07em; }
.plan-stop-main > strong { display: block; font-size: 15px; }
.plan-stop-main > small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.plan-stop-main .schedule-status { display: inline-block; font-size: 8px; }
.plan-stop-row label { color: var(--muted); font: 600 9px/1 var(--font-data); }
.plan-stop-row input { width: 58px; min-height: 36px; margin: 0 4px 0 7px; padding: 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: var(--white); font: 650 12px/1 var(--font-data); }
.plan-remove { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: transparent; cursor: pointer; }
.plan-remove:hover { color: var(--white); border-color: var(--orange); background: var(--orange); }
.plan-empty { padding: 34px 0 8px; color: var(--muted); text-align: center; }
.plan-empty strong { color: var(--ink); font-size: 16px; }
.plan-empty p { margin: 8px auto 18px; font-size: 11px; line-height: 1.5; }
.plan-empty.compact { padding: 24px; border: 1px dashed var(--line); border-radius: 6px; }
.plan-empty.compact p { margin-bottom: 0; }
.poi-card.is-planned { border-color: #96b835; box-shadow: inset 0 3px 0 var(--lime); }
.plan-toggle { width: 100%; min-height: 37px; margin-top: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font: 700 9px/1 var(--font-data); cursor: pointer; }
.plan-toggle:hover, .plan-toggle.is-active { border-color: var(--green); color: var(--ink); background: var(--lime); }
.timeline-item.is-planned::before { width: 12px; height: 12px; left: -41px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1px var(--green); }
.timeline-tag.planned { color: var(--ink); background: var(--lime); }

.weather-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.weather-segments { display: grid; margin-top: 22px; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.weather-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.weather-card.has-risk { border-color: rgba(255,112,72,.8); box-shadow: inset 0 3px 0 var(--orange); }
.weather-card > span { display: block; overflow: hidden; color: var(--muted); font: 600 8px/1.4 var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.weather-card > strong { display: block; margin-top: 20px; font: 700 32px/1 var(--font-data); letter-spacing: -.06em; }
.weather-card > b { display: block; margin-top: 6px; font-size: 11px; }
.weather-card > div { display: grid; gap: 5px; margin-top: 16px; color: var(--muted); font: 500 8px/1.2 var(--font-data); }
.weather-card.is-unavailable { color: var(--muted); background: var(--paper); }

@media (max-width: 900px) {
  .plan-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .weather-segments { grid-template-columns: repeat(2, 1fr); }
  .weather-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .operations-card, .plan-section { padding: 20px; }
  .operations-grid { grid-template-columns: 1fr; }
  .operations-grid article, .operations-grid article + article { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .operations-grid article:last-child { border-bottom: 0; }
  .operations-actions, .plan-header { align-items: stretch; flex-direction: column; }
  .plan-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-actions .primary-button { grid-column: 1 / -1; }
  .plan-stop-row { grid-template-columns: 38px minmax(0, 1fr) 34px; }
  .plan-stop-row label { grid-column: 2 / -1; }
  .plan-stop-row input { min-height: 40px; font-size: 16px; }
  .supply-gap-row { grid-template-columns: 54px 1fr; }
  .supply-gap-row > b { grid-column: 2; }
  .weather-segments { grid-template-columns: 1fr; }
  .weather-card:last-child { grid-column: auto; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { color: #101917; background: #fff; }
  .app-shell { width: 100%; padding: 0; }
  .topbar, .system-strip, .section-tabs, .route-heading .primary-button, .plan-actions, .weather-section button, .plan-empty button, .error-toast { display: none !important; }
  .route-view { padding: 0; }
  .route-heading { margin-bottom: 8mm; }
  .route-heading h1 { font-size: 30pt; }
  .tab-panel { display: none !important; }
  #planPanel { display: block !important; }
  .plan-summary-grid { grid-template-columns: repeat(4, 1fr); }
  .plan-summary-card, .plan-section { break-inside: avoid; background: #fff; }
  .plan-section { padding: 16px; }
  .plan-stop-row, .supply-gap-row { break-inside: avoid; }
  .plan-remove { display: none; }
  .plan-stop-row { grid-template-columns: 32px 1fr 100px; }
}

/* PREPARATION + INTERACTIVE PROFILE 0.10 */
.route-library { width: 100%; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--line); text-align: left; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.library-heading h2 { font-size: clamp(30px, 5vw, 46px); }
.library-heading > span { padding-bottom: 5px; color: var(--muted); font: 700 9px/1 var(--font-data); letter-spacing: .07em; text-transform: uppercase; }
.saved-route-grid { display: grid; margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.library-empty { display: grid; grid-column: 1 / -1; min-height: 116px; padding: 24px; place-content: center; gap: 7px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); text-align: center; }
.library-empty strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; }
.library-empty span { font-size: 11px; }
.saved-route-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: rgba(251,252,249,.72); transition: border-color 160ms ease, transform 160ms ease; }
.saved-route-card:hover { border-color: rgba(23,62,52,.48); transform: translateY(-2px); }
.saved-route-open { display: grid; width: 100%; min-width: 0; min-height: 136px; padding: 19px 46px 18px 19px; align-content: start; gap: 11px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.saved-route-open > span { color: var(--muted); font: 700 8px/1 var(--font-data); letter-spacing: .08em; }
.saved-route-open > strong { overflow: hidden; font: 500 23px/1.05 Georgia, "Times New Roman", serif; text-overflow: ellipsis; white-space: nowrap; }
.saved-route-open > small { color: var(--muted); font: 600 9px/1.5 var(--font-data); }
.saved-route-delete { position: absolute; top: 10px; right: 10px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.saved-route-delete:hover { color: var(--white); border-color: var(--orange); background: var(--orange); }
.saved-route-complete { position: absolute; right: 10px; bottom: 10px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: var(--white); cursor: pointer; }
.saved-route-card.is-completed { border-color: rgba(23,62,52,.45); background: rgba(200,255,71,.07); }
.saved-route-card.is-completed .saved-route-open strong { text-decoration: line-through; text-decoration-color: rgba(23,62,52,.35); }
.journey-map-button { width: calc(100% - 28px); margin: 0 14px 14px; }
.poi-load-command { display: flex; margin: 12px 0; padding: 16px 18px; align-items: center; justify-content: space-between; gap: 18px; border: 2px solid var(--green); background: var(--white); box-shadow: 4px 4px 0 var(--lime); }
.poi-load-command > div { display: grid; gap: 5px; }
.poi-load-command span { color: var(--muted); font: 700 9px/1 var(--font-data); letter-spacing: .08em; }
.poi-load-command strong { font-size: 15px; }
.poi-load-command small { color: var(--muted); font-size: 11px; }
.poi-load-command .primary-button { min-width: 210px; }

.service-filter-bar { display: flex; margin-bottom: 12px; align-items: center; justify-content: space-between; gap: 14px; }
.service-filter-bar span { color: var(--muted); font: 650 9px/1.3 var(--font-data); letter-spacing: .06em; text-transform: uppercase; }
.service-filter-dialog { width: min(610px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; border: 0; border-radius: 10px; color: var(--ink); background: var(--white); box-shadow: 0 28px 90px rgba(16,25,23,.26); }
.service-filter-dialog::backdrop { background: rgba(16,25,23,.58); backdrop-filter: blur(4px); }
.service-filter-sheet { padding: 26px; }
.service-check-list { display: grid; margin-top: 22px; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.service-check-list label { position: relative; display: flex; min-width: 0; min-height: 92px; padding: 15px; align-items: start; gap: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.service-check-list label:has(input:checked) { background: rgba(200,255,71,.11); box-shadow: inset 0 3px 0 var(--lime); }
.service-check-list input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--green); }
.service-check-list label > span { display: grid; min-width: 0; grid-template-columns: 10px minmax(0,1fr); column-gap: 8px; }
.service-check-list strong { min-width: 0; font-size: 12px; }
.service-check-list small { grid-column: 2; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.service-dot { width: 8px; height: 8px; margin-top: 3px; border-radius: 50%; background: var(--sand); }
.service-dot.water { background: #3e9dc9; }
.service-dot.food { background: #d98a2f; }
.service-dot.sleep { background: #7f63b8; }
.service-dot.repair { background: #96bd35; }
.service-dot.transport { background: #435b55; }
.service-dot.health { background: #d55348; }
.service-dot.utility { background: #348d79; }
.service-dot.tourism { background: #c85e8d; }
.service-filter-actions { display: flex; margin-top: 20px; justify-content: space-between; gap: 10px; }
.popup-plan-button { display: block; width: 100%; min-height: 37px; margin-top: 12px; padding: 0 12px; border: 1px solid var(--green); border-radius: 4px; color: var(--white); background: var(--green); font: 700 9px/1 var(--font-data); cursor: pointer; }
.popup-plan-button.is-active { color: var(--ink); border-color: #9abe38; background: var(--lime); }
.popup-link { display: inline-flex !important; width: 100%; min-height: 34px; margin-top: 7px !important; align-items: center; justify-content: center; }

.profile-controls { display: flex; margin-top: 24px; padding: 10px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-deep); }
.profile-controls > label { display: grid; min-width: 160px; flex: 1; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--muted); font: 650 9px/1 var(--font-data); text-transform: uppercase; letter-spacing: .06em; }
.profile-controls input { grid-column: 1 / -1; width: 100%; accent-color: var(--green); }
.profile-controls .secondary-button { min-width: 44px; padding: 0 13px; border-radius: 5px; }
.profile-viewport { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(180deg, rgba(200,255,71,.07), transparent 46%); cursor: crosshair; }
.profile-viewport svg { width: 100%; min-width: 0; margin: 0; overflow: hidden; touch-action: none; user-select: none; }
.profile-pan-label { display: grid; margin-top: 13px; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; color: var(--muted); font: 650 9px/1 var(--font-data); letter-spacing: .04em; text-transform: uppercase; }
.profile-pan-label input { width: 100%; accent-color: var(--green); }
.profile-pan-label input:disabled { opacity: .36; }
.profile-readout { display: grid; margin-top: 14px; padding: 14px 16px; grid-template-columns: auto auto auto auto auto auto; align-items: center; gap: 8px 12px; border-left: 3px solid var(--lime); background: var(--green-deep); color: var(--white); }
.profile-readout span { color: rgba(255,255,255,.52); font: 650 7px/1 var(--font-data); letter-spacing: .08em; }
.profile-readout strong { font: 700 13px/1 var(--font-data); }
.profile-cursor-line { stroke: rgba(16,25,23,.45); stroke-width: 1.5; stroke-dasharray: 4 4; }
.profile-cursor-dot { fill: var(--white); stroke: var(--green); stroke-width: 4; }
.profile-live-line { stroke: var(--orange); stroke-width: 3; }
.profile-live-arrow, .profile-live-dot { fill: var(--orange); stroke: var(--white); stroke-width: 3; }
.climb-zone-label { fill: #4a5e1a; font: 700 9px var(--font-data); }
.legend-position { height: 8px !important; background: var(--orange) !important; }
.climb-focus-button { margin-top: 11px; padding: 0; border: 0; color: var(--green); background: transparent; font: 700 9px/1 var(--font-data); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 760px) {
  .route-library { margin-top: 48px; }
  .saved-route-grid { grid-template-columns: 1fr; }
  .saved-route-open { min-height: 122px; }
  .service-filter-bar { align-items: stretch; flex-direction: column; }
  .service-filter-bar .secondary-button { width: 100%; }
  .service-filter-sheet { padding: 18px; }
  .service-check-list { grid-template-columns: 1fr; }
  .service-check-list label { min-height: 78px; }
  .service-filter-actions { display: grid; grid-template-columns: 1fr; }
  .service-filter-actions button { width: 100%; }
  .profile-card { padding: 18px; }
  .profile-card .section-title-row { flex-direction: column; gap: 4px; }
  .profile-controls { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; }
  .profile-controls #profileLocateButton { width: 100%; grid-column: 1 / -1; }
  .profile-viewport { margin-inline: -8px; }
  .profile-pan-label { grid-template-columns: 1fr; gap: 8px; }
  .profile-readout { grid-template-columns: auto 1fr; gap: 8px 14px; }
  .profile-readout strong { text-align: right; }
  .profile-legend { flex-wrap: wrap; gap: 10px 16px; }
  .climb-card { grid-template-columns: 46px minmax(0,1fr); gap: 12px; padding: 15px; }
  .climb-number { width: 42px; height: 42px; font-size: 18px; }
  .climb-card h3 { font-size: 18px; }
  .climb-grade { grid-column: 2; display: flex; align-items: baseline; gap: 7px; min-width: 0; text-align: left; }
  .climb-grade strong { font-size: 22px; }
}

/* MOBILE LIVE + RELIABLE MAP 0.9.1 */
.map-toolbar-actions { display: flex; gap: 7px; flex-wrap: wrap; }
#leafletMap {
  background-color: #dce2db;
  background-image:
    linear-gradient(rgba(16,25,23,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,25,23,.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.live-timing-console { margin-top: 28px; padding: 20px; border: 1px solid rgba(255,255,255,.16); border-left: 3px solid var(--lime); border-radius: 6px; background: rgba(255,255,255,.035); }
.live-timing-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.live-timing-heading div > span, .live-timing-heading > span { display: block; color: rgba(255,255,255,.5); font: 650 8px/1 var(--font-data); letter-spacing: .08em; }
.live-timing-heading div > strong { display: block; margin-top: 7px; font-size: 15px; }
.live-timing-fields { display: grid; margin-top: 18px; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.live-timing-fields label { display: flex; min-height: 52px; padding: 8px 10px; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.14); border-radius: 4px; color: rgba(255,255,255,.6); font: 600 8px/1 var(--font-data); }
.live-timing-fields label span { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,.55); }
.live-timing-fields input { width: 74px; padding: 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,.3); color: var(--white); background: transparent; font: 700 16px/1 var(--font-data); }
.live-km-range-label { display: block; margin-top: 18px; color: rgba(255,255,255,.5); font: 600 8px/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; }
.live-km-range { width: 100%; margin-top: 9px; accent-color: var(--lime); }
.live-timing-console > p { margin: 10px 0 0; color: rgba(255,255,255,.48); font: 500 9px/1.5 var(--font-data); }
.live-poi-panel { margin: 12px 0; padding: 28px; }
.live-poi-panel h2 { font-size: clamp(26px, 4vw, 38px); }
.live-poi-timings { display: grid; margin-top: 22px; }
.live-poi-row { display: grid; padding: 15px 0; grid-template-columns: 58px minmax(0, 1fr) 110px; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.live-poi-row.is-planned { padding-left: 12px; box-shadow: inset 3px 0 0 var(--lime); }
.live-poi-order { display: flex; align-items: center; flex-direction: column; gap: 6px; }
.live-poi-order > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 4px; color: var(--ink); background: var(--lime); font: 700 10px/1 var(--font-data); }
.live-poi-order small { color: var(--muted); font: 650 7px/1 var(--font-data); }
.live-poi-main strong { display: block; font-size: 14px; }
.live-poi-main span, .live-poi-main small { display: block; margin-top: 5px; color: var(--muted); font: 500 9px/1.4 var(--font-data); }
.live-poi-eta { text-align: right; }
.live-poi-eta > span { display: block; font: 700 24px/1 var(--font-data); letter-spacing: -.05em; }
.live-poi-eta small { display: block; margin-top: 4px; color: var(--muted); font: 650 7px/1 var(--font-data); }
.live-poi-eta a { display: inline-block; margin-top: 8px; color: var(--green); font: 650 8px/1 var(--font-data); }
.interactive-map-card.has-tile-error #leafletMap::after { content: "FOND OSM INDISPONIBLE — TRACE SEULE"; position: absolute; inset: auto 12px 12px 12px; z-index: 400; padding: 8px; color: var(--muted); background: rgba(244,246,242,.9); font: 650 8px/1 var(--font-data); text-align: center; }

@media (max-width: 760px) {
  .route-view, .tab-panel, .card, .route-heading, .plan-header, .map-toolbar { min-width: 0; max-width: 100%; }
  .section-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .tab-button { width: 100%; min-width: 0; padding: 0 6px; justify-content: center; border-bottom: 1px solid var(--line); font-size: 9px; }
  .tab-button span { display: none; }
  .route-metadata { flex-wrap: wrap; overflow: visible; }
  .system-strip { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
  .system-strip span:nth-child(n+3) { display: none; }
  .poi-filters { flex-wrap: wrap; overflow: visible; }
  .poi-filter { flex: 1 1 calc(33.333% - 7px); justify-content: center; }
  .map-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .map-toolbar-actions button { width: 100%; }
  .map-status { right: 10px; bottom: 10px; max-width: calc(100% - 20px); }
  .live-timing-heading { flex-direction: column; gap: 10px; }
  .live-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .live-stats article { min-width: 0; padding-right: 6px; }
  .live-stats span { overflow-wrap: anywhere; font-size: 7px; letter-spacing: .04em; }
  .live-timing-fields { grid-template-columns: 1fr; }
  .live-timing-fields .primary-button { width: 100%; }
  .live-timing-fields input { font-size: 16px; }
  .live-poi-panel { padding: 20px; }
  .live-poi-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  .live-poi-eta { grid-column: 2; display: flex; align-items: center; gap: 9px; text-align: left; }
  .live-poi-eta > span { font-size: 21px; }
  .live-poi-eta small { margin: 0; }
  .live-poi-eta a { margin: 0 0 0 auto; }
  .poi-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .google-maps-link { flex: 1 1 100%; }
  .poi-actions .google-maps-link { grid-column: 1 / -1; }
}

/* EUROPE + PERSONAL ROADBOOK 0.11 */
.notification-button { position: relative; }
.notification-led { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border: 2px solid var(--paper); border-radius: 50%; background: var(--sand); }
.notification-led.is-active { background: var(--lime); box-shadow: 0 0 0 2px rgba(200,255,71,.22); }

.route-heading { padding-bottom: 4px; }
.route-heading h1 { text-wrap: pretty; }
.section-title-row h2, .map-toolbar h2, .plan-header h2, .upcoming-intro h2 { line-height: 1.02; text-wrap: pretty; }
.overview-map-section { margin-top: 4px; }
.overview-map-heading { margin-bottom: 18px; align-items: end; }
.overview-map-heading h2 { font-size: clamp(30px, 4vw, 45px); }
.overview-map-heading p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.overview-map-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.route-canvas { height: clamp(390px, 48vw, 540px); }
#overviewLeafletMap { width: 100%; height: 100%; z-index: 0; background: #dce2db; }
.overview-map-fallback { position: absolute; inset: 0; z-index: 1; background: #d8ddcd; }
.overview-map-fallback svg { width: 100%; height: 100%; object-fit: cover; }
.route-canvas .map-label { z-index: 500; top: 0; left: 0; }
.poi-map-marker.personal { color: var(--ink); border-color: var(--ink); background: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,71,.28); }
.popup-edit-button { display: block; width: 100%; min-height: 34px; margin-top: 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--white); font: 700 9px/1 var(--font-data); cursor: pointer; }

.service-filter-bar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.poi-scope-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-deep); }
.poi-scope-button { min-height: 34px; padding: 0 11px; border: 0; border-radius: 3px; color: var(--muted); background: transparent; font: 650 8px/1 var(--font-data); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.poi-scope-button.is-active { color: var(--white); background: var(--green); }
.roadbook-scope { margin-top: 10px; }
.poi-card.is-personal { border-color: #8baa33; box-shadow: inset 3px 0 0 var(--lime); }
.personal-poi-badge { display: inline-flex; width: max-content; margin-top: 14px; padding: 5px 7px; color: var(--ink); background: var(--lime); font: 700 7px/1 var(--font-data); letter-spacing: .08em; }
.personal-poi-note { padding: 10px !important; border-left: 2px solid var(--lime); background: var(--paper-deep); color: var(--ink) !important; }

.dialog-intro { max-width: 520px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.notification-dialog { width: min(720px, calc(100% - 24px)); }
.notification-permission-row { display: flex; margin-top: 22px; padding: 16px; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-left: 3px solid var(--lime); background: var(--white); }
.notification-permission-row div { display: grid; gap: 6px; }
.notification-permission-row span { color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .08em; }
.notification-permission-row strong { font-size: 13px; }
.notification-distance-grid { margin-top: 18px; }
.notification-actions { display: flex; margin-top: 24px; justify-content: space-between; gap: 10px; }
.personal-poi-dialog { width: min(680px, calc(100% - 24px)); }
.personal-poi-fields { display: grid; margin-top: 24px; grid-template-columns: 1fr 1fr; gap: 9px; }
.personal-poi-fields .wide-field { grid-column: 1 / -1; }
.personal-poi-fields .wide-field span { flex: 1; }
.personal-poi-fields input[type="text"] { width: 100%; max-width: none; }
.personal-poi-fields select { max-width: 145px; }
.personal-notify-distance { margin-top: 12px; }

.profile-help { margin: 10px 0 0; color: var(--muted); font: 550 9px/1.5 var(--font-data); }
.profile-selection-zone { fill: rgba(255,112,72,.16); }
.profile-selection-line { stroke: var(--orange); stroke-width: 2; }
.profile-viewport:has(.profile-selection-zone) { cursor: ew-resize; }
.profile-readout:has(strong:nth-of-type(5)) { grid-template-columns: repeat(5, auto 1fr); }

@media (max-width: 900px) {
  .profile-readout:has(strong:nth-of-type(5)) { grid-template-columns: auto 1fr auto 1fr; }
}

@media (max-width: 760px) {
  .topbar-actions { gap: 5px; }
  .overview-map-heading { align-items: stretch; }
  .overview-map-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .overview-map-actions button { width: 100%; }
  .route-canvas { height: 420px; }
  .route-canvas svg { min-height: 0; }
  .service-filter-bar > div { align-items: stretch; flex-direction: column; }
  .poi-scope-switch { display: grid; width: 100%; grid-template-columns: 1fr; }
  .poi-scope-button { width: 100%; }
  .notification-permission-row, .notification-actions { align-items: stretch; flex-direction: column; }
  .notification-permission-row button, .notification-actions button { width: 100%; }
  .personal-poi-fields { grid-template-columns: 1fr; }
  .personal-poi-fields .wide-field { grid-column: auto; }
  .profile-controls { grid-template-columns: 44px minmax(0,1fr) 44px; }
  .profile-controls #profileLocateButton, .profile-controls #profileZoomSelectionButton, .profile-controls #profileClearSelectionButton { grid-column: 1 / -1; width: 100%; }
  .profile-readout:has(strong:nth-of-type(5)) { grid-template-columns: auto 1fr; }
}

/* TRIP OPERATIONS 0.13 */
.journey-library { width: 100%; margin-top: 64px; padding: 30px; border-radius: 10px; color: var(--white); background: var(--green-deep); text-align: left; }
.hero-copy + .journey-library { margin-top: 0; }
.journey-library + .drop-zone { margin-top: 26px; }
.journey-library .eyebrow { color: var(--lime); }
.journey-library .library-heading { align-items: center; }
.journey-library .library-heading h2 { color: var(--white); }
.journey-library .library-heading p:not(.eyebrow) { max-width: 580px; margin: 8px 0 0; color: rgba(255,255,255,.58); font-size: 11px; line-height: 1.5; }
.journey-grid { display: grid; margin-top: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.journey-empty { display: grid; min-height: 176px; grid-column: 1 / -1; place-content: center; justify-items: center; gap: 8px; border: 1px dashed rgba(255,255,255,.22); text-align: center; }
.journey-empty strong { font: 500 23px/1.1 Georgia, serif; }
.journey-empty span { color: rgba(255,255,255,.55); font-size: 11px; }
.journey-empty button { margin-top: 7px; color: var(--white); border-color: rgba(255,255,255,.28); }
.journey-card { min-width: 0; padding: 18px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.045); }
.journey-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.journey-card-head > div > span { color: var(--lime); font: 650 8px/1 var(--font-data); letter-spacing: .08em; }
.journey-card h3 { margin: 10px 0 7px; font: 500 25px/1.05 Georgia, serif; }
.journey-card p { margin: 0; color: rgba(255,255,255,.56); font: 550 9px/1.4 var(--font-data); }
.journey-card .icon-button { flex: 0 0 auto; color: var(--white); border-color: rgba(255,255,255,.2); }
.journey-stages { display: grid; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.journey-stages button { display: grid; min-width: 0; padding: 12px 0; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--white); background: transparent; text-align: left; cursor: pointer; }
.journey-stages button:hover { color: var(--lime); }
.journey-stages button span { display: grid; width: 27px; height: 27px; place-items: center; color: var(--ink); background: var(--lime); font: 700 8px/1 var(--font-data); }
.journey-stages button strong { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.journey-stages button small, .journey-no-stage { color: rgba(255,255,255,.48); font: 550 8px/1 var(--font-data); }
.journey-no-stage { padding: 16px 0 2px; }
.journey-dialog { width: min(760px, calc(100% - 24px)); }
.journey-fields { display: grid; margin-top: 22px; grid-template-columns: 1fr 1fr; gap: 9px; }
.journey-fields input { min-width: 0; }
.journey-stage-picker { margin-top: 18px; }
.journey-stage-picker > div { display: grid; margin-top: 10px; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.journey-stage-picker label { display: grid; min-width: 0; min-height: 74px; padding: 12px; grid-template-columns: 20px minmax(0,1fr); align-items: center; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.journey-stage-picker label:has(input:checked) { background: rgba(200,255,71,.14); box-shadow: inset 3px 0 0 var(--lime); }
.journey-stage-picker input { width: 17px; height: 17px; accent-color: var(--green); }
.journey-stage-picker label span { display: grid; min-width: 0; gap: 5px; }
.journey-stage-picker label strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.journey-stage-picker label small { color: var(--muted); font: 550 8px/1.4 var(--font-data); }
.journey-order { display: grid; margin-top: 14px; gap: 5px; }
.journey-order article { display: grid; padding: 9px; grid-template-columns: 34px minmax(0,1fr) 34px 34px; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); }
.journey-order article > span { display: grid; width: 28px; height: 28px; place-items: center; color: var(--ink); background: var(--lime); font: 700 8px/1 var(--font-data); }
.journey-order article div { display: grid; min-width: 0; gap: 3px; }
.journey-order article strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.journey-order article small { color: var(--muted); font: 550 8px/1 var(--font-data); }
.journey-order article button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }

.poi-progress { display: grid; margin: 12px 0; padding: 16px; gap: 10px; border-left: 4px solid var(--lime); color: var(--white); background: var(--green-deep); box-shadow: 0 10px 28px rgba(16,25,23,.16); }
.poi-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.poi-progress strong { font-size: 12px; }
.poi-progress > div > span { color: var(--lime); font: 700 13px/1 var(--font-data); }
.poi-progress small { color: rgba(255,255,255,.56); font: 550 9px/1.45 var(--font-data); }
.poi-progress-track { height: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); }
.poi-progress-track span { display: block; width: 0; height: 100%; background: var(--lime); transition: width 260ms ease; }
.poi-progress.is-complete { border-left-color: #70c982; }
.poi-progress.has-error { border-left-color: var(--orange); }
.poi-progress.has-error .poi-progress-track span { background: var(--orange); }
.poi-mobile-sheet { position: relative; }
.poi-sheet-handle { display: none; }
.live-deviation-card { display: flex; margin: 12px 0; padding: 22px 24px; align-items: center; justify-content: space-between; gap: 18px; border-left: 4px solid var(--lime); }
.live-deviation-card > div { min-width: 0; }
.live-deviation-card span { color: var(--muted); font: 650 8px/1 var(--font-data); letter-spacing: .08em; }
.live-deviation-card strong { display: block; margin-top: 8px; font: 500 23px/1 Georgia, serif; }
.live-deviation-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

@media (max-width: 760px) {
  .app-shell { padding-right: 14px; padding-bottom: 110px; padding-left: 14px; }
  .system-strip span:nth-child(1), .system-strip span:nth-child(4) { display: none; }
  .system-strip span:nth-child(3) { display: flex; }
  .hero { padding-top: 48px; }
  .hero-copy { margin-bottom: 30px; }
  .hero h1 { font-size: clamp(42px, 13vw, 62px); }
  .journey-library { margin-top: 42px; padding: 19px; }
  .journey-library .library-heading { align-items: stretch; flex-direction: column; }
  .journey-library .library-heading button { width: 100%; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-fields, .journey-stage-picker > div { grid-template-columns: 1fr; }
  .route-library .library-heading { align-items: start; flex-direction: column; }
  .section-tabs { position: sticky; top: 0; z-index: 1100; margin-right: -14px; margin-left: -14px; padding: 0 14px; background: rgba(244,246,242,.96); backdrop-filter: blur(12px); }
  #leafletMap, .interactive-map-card { height: 62dvh; min-height: 430px; }
  .poi-mobile-sheet { position: sticky; bottom: 0; z-index: 950; max-height: 58px; margin: 10px -2px 0; overflow: auto; border: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--paper); box-shadow: 0 -18px 45px rgba(16,25,23,.2); transition: max-height 240ms ease; overscroll-behavior: contain; }
  .poi-mobile-sheet.is-expanded { max-height: 70dvh; }
  .poi-sheet-handle { position: sticky; top: 0; z-index: 2; display: grid; width: 100%; min-height: 57px; padding: 8px 14px; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: var(--white); text-align: left; cursor: pointer; }
  .poi-sheet-handle > span { grid-column: 1 / -1; width: 42px; height: 4px; margin: 0 auto 2px; border-radius: 99px; background: var(--line); }
  .poi-sheet-handle strong { font-size: 11px; }
  .poi-sheet-handle small { color: var(--muted); font: 600 8px/1 var(--font-data); }
  .poi-summary-row { padding: 15px; align-items: start; flex-direction: column; }
  .poi-list { padding: 0 12px 18px; grid-template-columns: 1fr; }
  .poi-card { min-height: 222px; }
  .poi-progress { position: sticky; top: 94px; z-index: 900; }
  .live-deviation-card { align-items: stretch; flex-direction: column; }
  .live-deviation-card a { width: 100%; }
}

/* 0.18 cascade lock */
.hero.home-dashboard { display: block; }
.weather-section .weather-segments { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.explore-view .nearby-map { height: min(67vh, 680px); min-height: 500px; }

@media (max-width: 760px) {
  .section-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .tab-button { width: 100%; min-width: 0; padding-inline: 4px; }
  .weather-section .weather-segments { grid-template-columns: 1fr; }
  .explore-view .nearby-map { height: 55dvh; min-height: 410px; }
}

/* FIELD RELIABILITY 0.19 */
.push-delivery-row {
  display: grid;
  margin-top: 10px;
  padding: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper-deep);
}
.push-delivery-row > div { display: grid; gap: 5px; }
.push-delivery-row span, .live-field-health b { color: var(--muted); font: 700 9px/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.push-delivery-row strong { font-size: 15px; }
.push-delivery-row small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.push-delivery-row.is-ready { border-color: #94b636; box-shadow: inset 4px 0 0 var(--lime); }
.push-delivery-row.is-error { border-color: var(--orange); }
.live-field-health { display: grid; margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; background: rgba(255,255,255,.045); }
.live-field-health > span { display: grid; min-width: 0; padding: 12px; grid-template-columns: 9px 1fr; gap: 5px 8px; align-items: center; }
.live-field-health > span + span { border-left: 1px solid rgba(255,255,255,.12); }
.live-field-health i { width: 8px; height: 8px; grid-row: 1 / span 2; border-radius: 50%; background: #75807c; }
.live-field-health i.is-active { background: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,71,.12); }
.live-field-health i.is-warning { background: var(--orange); }
.live-field-health b { color: rgba(255,255,255,.48); }
.live-field-health strong { min-width: 0; overflow: hidden; color: var(--white); font: 650 11px/1.25 var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.explore-poi-sheet { position: relative; z-index: 4; }
.explore-sheet-handle { display: none; }
.field-check-summary { display: flex; margin: 6px 0 16px; padding: 18px; align-items: center; gap: 18px; color: var(--white); border-radius: 7px; background: var(--green-deep); }
.field-check-summary strong { color: var(--lime); font: 750 30px/1 var(--font-data); }
.field-check-summary span { font-size: 14px; }
.field-check-list { display: grid; border-top: 1px solid var(--line); }
.field-check-item { display: grid; padding: 14px 4px; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; border-bottom: 1px solid var(--line); }
.field-check-item > i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font: 800 10px/1 var(--font-data); }
.field-check-item.is-ready > i { color: var(--ink); background: var(--lime); }
.field-check-item div { display: grid; gap: 4px; }
.field-check-item strong { font-size: 13px; }
.field-check-item small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.journey-progress { height: 6px; margin: 14px 0 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); }
.journey-progress span { display: block; height: 100%; background: var(--lime); }
.journey-progress-label { color: rgba(255,255,255,.62); font: 700 9px/1 var(--font-data); letter-spacing: .05em; }
.journey-stages button.is-completed { opacity: .62; }
.journey-stages button.is-next { outline: 1px solid var(--lime); outline-offset: -1px; }
.journey-stages button em { color: var(--lime); font: 700 8px/1 var(--font-data); font-style: normal; letter-spacing: .06em; }
.journey-next-button { width: calc(100% - 28px); margin: 0 14px 8px; border-color: var(--lime); color: var(--ink); background: var(--lime); }
@media (max-width: 680px) {
  .push-delivery-row { grid-template-columns: 1fr; }
  .push-delivery-row button { width: 100%; }
  .live-field-health { grid-template-columns: 1fr; }
  .live-field-health > span + span { border-top: 1px solid rgba(255,255,255,.12); border-left: 0; }
  .explore-view { padding-bottom: 84px; }
  .explore-poi-sheet { position: fixed; right: 0; bottom: 0; left: 0; z-index: 850; max-height: min(72vh, 620px); padding: 0 14px calc(10px + env(safe-area-inset-bottom)); transform: translateY(calc(100% - 76px)); transition: transform .24s ease; border-top: 1px solid var(--line); background: rgba(247,249,245,.98); box-shadow: 0 -16px 40px rgba(16,25,23,.16); }
  .explore-poi-sheet.is-open { transform: translateY(0); }
  .explore-sheet-handle { display: grid; width: 100%; min-height: 66px; padding: 8px 0 10px; grid-template-columns: 1fr auto; align-items: center; border: 0; color: var(--ink); background: transparent; text-align: left; }
  .explore-sheet-handle > span { width: 42px; height: 4px; grid-column: 1 / -1; margin: 0 auto 5px; border-radius: 999px; background: var(--line); }
  .explore-sheet-handle strong { font-size: 14px; }
  .explore-sheet-handle small { color: var(--muted); font: 700 10px/1 var(--font-data); }
  .explore-poi-sheet .nearby-poi-list { max-height: calc(min(72vh, 620px) - 76px); overflow-y: auto; overscroll-behavior: contain; }
  .explore-poi-sheet:not(.is-open) .nearby-poi-list { visibility: hidden; }
  .field-check-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .explore-poi-sheet { transition: none; } }

/* TRAVEL PREPARATION + AUDIO PHRASEBOOK 0.20 */
.standalone-view { width: min(1500px, calc(100% - 64px)); margin: 0 auto; padding: 62px 0 96px; }
.standalone-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.standalone-header > div { max-width: 840px; }
.standalone-header h1 { margin: 8px 0 12px; font-size: clamp(36px, 5vw, 72px); line-height: .98; letter-spacing: -.045em; }
.standalone-header p:last-child { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.standalone-header > .secondary-button { flex: none; }
.preparation-command { display: grid; grid-template-columns: minmax(250px,.8fr) minmax(320px,1.4fr) minmax(260px,.8fr); gap: 1px; margin-bottom: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.preparation-command > * { min-height: 124px; padding: 22px; background: var(--paper); }
.preparation-command label,.phrasebook-command label,.preparation-custom label { display: grid; align-content: center; gap: 8px; color: var(--muted); font: 700 11px/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.preparation-command select,.phrasebook-command select,.phrasebook-command input,.preparation-custom select,.preparation-custom input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: var(--white); font: 650 15px/1.2 var(--font-ui); }
.preparation-departure { display: grid; align-content: center; gap: 5px; }
.preparation-departure > span { color: #4f760f; font: 800 10px/1 var(--font-data); letter-spacing: .12em; }
.preparation-departure strong { font-size: 21px; text-transform: capitalize; }
.preparation-departure small { color: var(--muted); font-size: 13px; }
.preparation-score { display: grid; align-content: center; gap: 12px; }
.preparation-score > span { font: 800 14px/1.2 var(--font-data); text-transform: uppercase; }
.preparation-score > div { height: 10px; overflow: hidden; border-radius: 99px; background: #d9ded9; }
.preparation-score i { display: block; width: 0; height: 100%; background: var(--lime); transition: width 250ms ease; }
.preparation-timeline { display: grid; gap: 18px; max-width: 1120px; margin: 0 auto; }
.preparation-milestone { display: grid; grid-template-columns: 160px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 10px 34px rgba(20,35,30,.05); }
.preparation-milestone > header { display: grid; align-content: start; gap: 12px; padding: 24px; color: var(--white); background: #15342c; }
.preparation-milestone > header > span { display: grid; width: 76px; min-height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; color: var(--lime); font: 850 13px/1 var(--font-data); letter-spacing: .08em; }
.preparation-milestone > header h2 { margin: 0; font-size: 18px; line-height: 1.15; }
.preparation-milestone > header small { display: block; margin-top: 5px; color: rgba(255,255,255,.62); font-size: 11px; }
.preparation-milestone > header > strong { color: rgba(255,255,255,.72); font: 750 11px/1 var(--font-data); }
.preparation-milestone.is-current { outline: 3px solid var(--lime); outline-offset: 2px; }
.preparation-milestone > div { display: grid; }
.preparation-task { position: relative; display: grid; min-height: 82px; padding: 15px 18px; grid-template-columns: 28px 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.preparation-task:last-child { border-bottom: 0; }
.preparation-task input { position: absolute; opacity: 0; pointer-events: none; }
.preparation-check { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: transparent; background: var(--paper); font-size: 14px; }
.preparation-task input:checked + .preparation-check { border-color: #183e34; color: #10231e; background: var(--lime); }
.preparation-task > span:nth-of-type(2) { display: grid; gap: 5px; }
.preparation-task small { color: var(--muted); font: 750 9px/1 var(--font-data); letter-spacing: .12em; }
.preparation-task strong { font-size: 15px; line-height: 1.4; }
.preparation-task.is-done strong { color: var(--muted); text-decoration: line-through; }
.preparation-task > button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }
.preparation-custom { display: grid; max-width: 1120px; margin: 28px auto 0; padding: 24px; grid-template-columns: 1.2fr .6fr 1.4fr auto; align-items: end; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: #e6ebe4; }
.preparation-custom h2 { margin: 4px 0 0; font-size: 20px; }
.preparation-custom .primary-button { min-height: 48px; }
.journey-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 14px; }
.journey-secondary-actions .journey-map-button { margin: 0; width: auto; }
.phrasebook-command { display: grid; grid-template-columns: minmax(180px,.7fr) minmax(280px,1.4fr) minmax(210px,.8fr) auto; align-items: end; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #e5eae3; }
.phrase-favorite-filter { min-height: 48px; white-space: nowrap; }
.phrase-favorite-filter.is-active { border-color: #163c32; color: #10231e; background: var(--lime); }
.phrase-offline-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 14px 0; padding: 18px 20px; border: 1px solid #2c5146; border-radius: 12px; color: var(--white); background: #17372f; }
.phrase-offline-card > div { display: flex; align-items: center; gap: 15px; }
.phrase-offline-icon { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 50%; color: #11251f; background: var(--lime); font-size: 22px; font-weight: 800; }
.phrase-offline-card strong,.phrase-offline-card small { display: block; }
.phrase-offline-card small { max-width: 690px; margin-top: 4px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.45; }
.phrasebook-status { display: flex; justify-content: space-between; gap: 16px; padding: 10px 4px 18px; color: var(--muted); font: 700 11px/1.35 var(--font-data); text-transform: uppercase; }
.phrasebook-status .is-ready { color: #29633c; }
.phrasebook-status .is-warning { color: #8a541e; }
.phrase-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.phrase-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 8px 28px rgba(19,37,31,.055); transition: .18s; }
.phrase-card.is-speaking { border-color: #74a914; box-shadow: 0 0 0 3px rgba(188,255,50,.34); }
.phrase-card > header { display: flex; min-height: 46px; padding: 8px 12px 8px 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.phrase-card > header > span { color: var(--muted); font: 800 10px/1 var(--font-data); letter-spacing: .12em; text-transform: uppercase; }
.phrase-favorite { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #748079; background: transparent; font-size: 23px; cursor: pointer; }
.phrase-favorite.is-active { color: #10231e; background: var(--lime); }
.phrase-pair { display: grid; min-height: 154px; grid-template-columns: 1fr 1fr; }
.phrase-pair > div { padding: 20px; }
.phrase-pair > div + div { border-left: 1px solid var(--line); background: #f1f5ee; }
.phrase-pair small { color: var(--muted); font: 750 9px/1 var(--font-data); letter-spacing: .11em; }
.phrase-pair p { margin: 10px 0 0; font-size: clamp(16px,1.8vw,21px); font-weight: 720; line-height: 1.35; }
.phrase-pair > div + div p { color: #123d31; }
.phrase-play { display: grid; width: 100%; min-height: 62px; padding: 10px 16px; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 11px; border: 0; border-top: 1px solid var(--line); color: var(--white); background: #15372e; text-align: left; cursor: pointer; }
.phrase-play > span { grid-row: 1/3; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #10231e; background: var(--lime); font-size: 11px; }
.phrase-play strong { font-size: 14px; }
.phrase-play small { color: rgba(255,255,255,.58); font-size: 10px; }
.phrase-card.is-speaking .phrase-play > span { animation: phrase-pulse 1s ease infinite; }
.phrase-empty { grid-column: 1/-1; display: grid; min-height: 280px; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; }
.phrase-empty strong { color: var(--ink); font-size: 22px; }
@keyframes phrase-pulse { 50% { transform: scale(1.14); box-shadow: 0 0 0 8px rgba(188,255,50,.18); } }
@media (max-width:900px) {
  .standalone-view { width: min(100% - 34px,760px); padding-top: 38px; }
  .preparation-command { grid-template-columns: 1fr 1fr; }
  .preparation-score { grid-column: 1/-1; min-height: 88px; }
  .preparation-custom,.phrasebook-command { grid-template-columns: 1fr 1fr; }
  .preparation-custom > div,.preparation-custom .primary-button,.phrase-search { grid-column: 1/-1; }
  .phrase-search { grid-row: 1; }
  .phrase-list { grid-template-columns: 1fr; }
}
@media (max-width:600px) {
  .standalone-view { width: 100%; padding: 28px 14px 88px; }
  .standalone-header { display: grid; gap: 18px; margin-bottom: 22px; }
  .standalone-header h1 { font-size: 38px; }
  .standalone-header p:last-child { font-size: 15px; }
  .standalone-header > .secondary-button { width: 100%; min-height: 46px; }
  .preparation-command,.preparation-custom,.phrasebook-command { display: grid; grid-template-columns: 1fr; }
  .preparation-command > * { min-height: 96px; padding: 16px; }
  .preparation-score,.preparation-custom > div,.preparation-custom .primary-button,.phrase-search { grid-column: auto; }
  .phrase-search { grid-row: auto; }
  .preparation-milestone { display: block; }
  .preparation-milestone > header { padding: 14px; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; }
  .preparation-milestone > header > span { width: 66px; min-height: 38px; }
  .preparation-milestone > header h2 { font-size: 16px; }
  .preparation-task { min-height: 78px; padding: 13px; gap: 11px; }
  .preparation-task strong { font-size: 14px; }
  .preparation-custom { padding: 17px; }
  .journey-secondary-actions { grid-template-columns: 1fr; }
  .phrase-favorite-filter,.phrase-offline-card .primary-button { width: 100%; }
  .phrase-offline-card { display: grid; padding: 15px; }
  .phrasebook-status { display: grid; font-size: 10px; }
  .phrase-pair { min-height: 0; grid-template-columns: 1fr; }
  .phrase-pair > div { min-height: 94px; padding: 16px; }
  .phrase-pair > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .phrase-pair p { font-size: 17px; }
}

/* FIELD DIAGNOSTICS + BACKUP 0.21 */
.terrain-session-card { display: flex; min-height: 112px; padding: 22px 24px; align-items: center; justify-content: space-between; gap: 22px; border-radius: 12px; color: var(--white); background: #102a23; box-shadow: 0 12px 34px rgba(12,33,27,.16); }
.terrain-session-card > div { display: flex; min-width: 0; align-items: center; gap: 16px; }
.terrain-session-card > div > div { display: grid; gap: 5px; }
.terrain-session-card small { color: var(--lime); font: 800 10px/1 var(--font-data); letter-spacing: .12em; }
.terrain-session-card strong { font-size: 19px; }
.terrain-session-card span:last-child { color: rgba(255,255,255,.66); font-size: 12px; }
.terrain-session-led { width: 18px; height: 18px; flex: none; border: 4px solid rgba(255,255,255,.12); border-radius: 50%; background: #7d8884; }
.terrain-session-led.is-active { border-color: rgba(188,255,50,.25); background: var(--lime); box-shadow: 0 0 0 7px rgba(188,255,50,.09); animation: terrain-record 1.6s ease infinite; }
.terrain-session-card .is-recording { border-color: #ff8b6a; color: var(--white); background: #8c3827; }
@keyframes terrain-record { 50% { box-shadow: 0 0 0 12px rgba(188,255,50,0); } }
.terrain-readiness { margin: 16px 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.terrain-readiness > header,.terrain-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.terrain-readiness h2,.terrain-panel h2 { margin: 5px 0 0; font-size: 25px; line-height: 1.1; }
.terrain-readiness-score { display: grid; min-width: 130px; text-align: right; }
.terrain-readiness-score strong { font: 850 24px/1 var(--font-data); }
.terrain-readiness-score span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.terrain-readiness-grid { display: grid; margin: 22px 0; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.terrain-readiness-item { display: grid; min-height: 80px; padding: 13px; grid-template-columns: 26px minmax(0,1fr); align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.terrain-readiness-item > i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--white); background: var(--orange); font: 800 10px/1 var(--font-data); font-style: normal; }
.terrain-readiness-item.is-ready > i { color: var(--ink); background: var(--lime); }
.terrain-readiness-item div { display: grid; gap: 4px; }
.terrain-readiness-item strong { font-size: 13px; }
.terrain-readiness-item small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.terrain-readiness-actions,.terrain-test-actions,.terrain-backup-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.terrain-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(340px,.8fr); gap: 16px; align-items: start; }
.terrain-panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 8px 28px rgba(19,37,31,.045); }
.terrain-panel > header > span { color: var(--muted); font: 700 10px/1.4 var(--font-data); text-align: right; }
.terrain-diagnostic { grid-row: span 2; }
.terrain-device-grid { display: grid; margin: 22px 0; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.terrain-device-item { display: grid; min-height: 112px; padding: 15px; align-content: start; gap: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.terrain-device-item > span { color: var(--muted); font: 750 9px/1 var(--font-data); letter-spacing: .1em; }
.terrain-device-item > strong { font-size: 18px; }
.terrain-device-item > small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.terrain-device-item.is-ok > strong { color: #276139; }
.terrain-device-item.is-warning > strong { color: #9a512e; }
.terrain-test-actions { justify-content: flex-start; }
.terrain-log-head { display: flex; margin-top: 24px; padding: 14px 0 10px; justify-content: space-between; border-top: 1px solid var(--line); }
.terrain-log-head strong { font-size: 13px; }
.terrain-log-head span { color: var(--muted); font: 700 10px/1 var(--font-data); }
.terrain-log { display: grid; max-height: 430px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); }
.terrain-log-entry { display: grid; min-height: 58px; padding: 10px 4px; grid-template-columns: 68px 1fr; gap: 10px; border-bottom: 1px solid var(--line); }
.terrain-log-entry time { color: var(--muted); font: 700 10px/1.35 var(--font-data); }
.terrain-log-entry div { display: grid; gap: 3px; }
.terrain-log-entry strong { font-size: 12px; }
.terrain-log-entry small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.terrain-log-entry.is-error { border-left: 3px solid var(--orange); padding-left: 9px; }
.terrain-log-entry.is-success { border-left: 3px solid var(--lime); padding-left: 9px; }
.terrain-offline-summary,.terrain-backup-summary { display: grid; margin: 20px 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.terrain-offline-summary article,.terrain-backup-summary article { display: grid; min-height: 90px; padding: 13px; align-content: start; gap: 5px; border: 1px solid var(--line); background: var(--paper); }
.terrain-offline-summary span,.terrain-backup-summary span { color: var(--muted); font: 750 9px/1 var(--font-data); letter-spacing: .1em; }
.terrain-offline-summary strong,.terrain-backup-summary strong { font: 800 21px/1.1 var(--font-data); }
.terrain-offline-summary small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.terrain-route-packs { display: grid; border-top: 1px solid var(--line); }
.terrain-route-packs > article { display: flex; min-height: 72px; padding: 10px 0; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.terrain-route-packs > article > div { display: flex; min-width: 0; align-items: center; gap: 10px; }
.terrain-route-packs i { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 50%; color: var(--white); background: #7a8580; font: 800 12px/1 var(--font-data); font-style: normal; }
.terrain-route-packs i.is-ready { color: var(--ink); background: var(--lime); }
.terrain-route-packs article span { display: grid; min-width: 0; gap: 4px; }
.terrain-route-packs article strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.terrain-route-packs article small { color: var(--muted); font-size: 10px; }
.terrain-route-packs .secondary-button { min-height: 38px; padding-inline: 12px; }
.terrain-backup > p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.terrain-backup-actions { justify-content: stretch; }
.terrain-backup-actions > button { flex: 1; }
.terrain-empty { display: grid; min-height: 120px; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.terrain-empty strong { color: var(--ink); font-size: 14px; }
.terrain-empty span { font-size: 11px; }
@media (max-width:1050px) {
  .terrain-layout { grid-template-columns: 1fr; }
  .terrain-diagnostic { grid-row: auto; }
}
@media (max-width:760px) {
  .terrain-session-card { display: grid; }
  .terrain-session-card > button { width: 100%; }
  .terrain-readiness-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width:520px) {
  .terrain-session-card,.terrain-readiness,.terrain-panel { padding: 16px; }
  .terrain-session-card strong { font-size: 16px; }
  .terrain-readiness > header { display: grid; }
  .terrain-readiness-score { text-align: left; }
  .terrain-readiness-grid,.terrain-device-grid,.terrain-offline-summary,.terrain-backup-summary { grid-template-columns: 1fr; }
  .terrain-readiness-actions,.terrain-test-actions,.terrain-backup-actions { display: grid; }
  .terrain-readiness-actions > button,.terrain-test-actions > button,.terrain-backup-actions > button { width: 100%; }
  .terrain-route-packs > article { align-items: stretch; flex-direction: column; }
  .terrain-route-packs > article > button { width: 100%; }
}
@media (prefers-reduced-motion:reduce) { .terrain-session-led.is-active { animation: none; } }
