:root {
	--trp-blue: #0d6efd;
	--trp-blue-dark: #0b5ed7;
	--trp-blue-soft: #eaf2ff;
	--trp-text: #23262f;
	--trp-muted: #777e90;
	--trp-border: #e6e8ec;
	--trp-bg: #fcfcfd;
	--trp-panel: #ffffff;
	--trp-danger: #d9485f;
	--trp-success: #169b62;
	--trp-radius: 16px;
	--trp-shadow: 0 18px 50px rgba(35, 38, 47, 0.1);
}

.trp-app,
.trp-app * {
	box-sizing: border-box;
}

.trp-app {
	--trp-blue: #0d6efd;
	--trp-blue-dark: #0b5ed7;
	--trp-blue-soft: #eaf2ff;
	--trp-text: #23262f;
	--trp-muted: #777e90;
	--trp-border: #e6e8ec;
	--trp-bg: #fcfcfd;
	--trp-panel: #ffffff;
	--trp-danger: #d9485f;
	--trp-success: #169b62;
	color: var(--trp-text);
	font-family: Poppins, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.trp-app button,
.trp-app input,
.trp-app select,
.trp-app textarea {
	font: inherit;
}

.trp-app button,
.trp-app a {
	-webkit-tap-highlight-color: transparent;
}

.trp-app button:focus-visible,
.trp-app a:focus-visible,
.trp-app input:focus-visible,
.trp-app select:focus-visible,
.trp-app textarea:focus-visible {
	outline: 3px solid rgba(13, 110, 253, 0.25);
	outline-offset: 2px;
}

.trp-app .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

.trp-planner {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0 !important;
	max-width: none;
	isolation: isolate;
	overflow: visible;
	position: relative;
	width: 100%;
	z-index: 0;
}

.entry-content > p:has(> .trp-planner),
.wp-block-post-content > p:has(> .trp-planner),
.entry-content > p:has(> .trp-route-library),
.wp-block-post-content > p:has(> .trp-route-library) {
	margin-bottom: 0 !important;
	margin-top: 0 !important;
}

.trp-toolbar {
	align-items: center;
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-left: 0;
	border-radius: 0;
	border-right: 0;
	display: grid;
	gap: 20px;
	grid-template-columns: auto minmax(260px, 560px) auto;
	min-height: 84px;
	margin-bottom: 0;
	padding: 14px 20px;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	z-index: 500;
}

.trp-toolbar__brand {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 220px;
}

.trp-brand-mark {
	align-items: center;
	background: var(--trp-blue);
	-webkit-mask: url('../img/tekeregj-mark.svg') center / contain no-repeat;
	mask: url('../img/tekeregj-mark.svg') center / contain no-repeat;
	display: flex;
	height: 46px;
	justify-content: center;
	width: 46px;
}

.trp-toolbar__brand strong,
.trp-toolbar__brand small {
	display: block;
}

.trp-toolbar__brand strong {
	color: var(--trp-text);
	font-size: 17px;
	font-weight: 600;
}

.trp-toolbar__brand small {
	color: var(--trp-muted);
	font-size: 11px;
	margin-top: 1px;
}

.trp-search {
	align-items: center;
	background: #f4f5f6;
	border: 1px solid transparent;
	border-radius: 12px;
	display: flex;
	height: 48px;
	position: relative;
	transition: 0.2s ease;
}

.trp-search:focus-within {
	background: var(--trp-panel);
	border-color: var(--trp-blue);
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.trp-search > span {
	color: var(--trp-muted);
	font-size: 24px;
	line-height: 1;
	margin: 0 9px 0 15px;
}

.trp-search input {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--trp-text);
	flex: 1;
	height: 44px;
	min-width: 0;
	outline: 0 !important;
	padding: 0 !important;
}

.trp-search > button {
	background: transparent;
	border: 0;
	color: var(--trp-blue);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	padding: 0 16px;
}

.trp-search-results {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(35, 38, 47, 0.16);
	left: 0;
	overflow: hidden;
	position: absolute;
	right: 0;
	top: calc(100% + 7px);
}

.trp-search-result {
	align-items: center;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--trp-border);
	color: var(--trp-text);
	cursor: pointer;
	display: flex;
	gap: 10px;
	padding: 11px 14px;
	text-align: left;
	width: 100%;
}

.trp-search-result:last-child {
	border-bottom: 0;
}

.trp-search-result:hover {
	background: var(--trp-blue-soft);
}

.trp-search-result > span {
	align-items: center;
	background: var(--trp-blue-soft);
	border-radius: 50%;
	color: var(--trp-blue);
	display: flex;
	flex: 0 0 32px;
	height: 32px;
	justify-content: center;
}

.trp-search-result b,
.trp-search-result small {
	display: block;
}

.trp-search-result b {
	font-size: 13px;
	font-weight: 500;
}

.trp-search-result small {
	color: var(--trp-muted);
	font-size: 11px;
}

.trp-toolbar__actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.trp-btn {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 9px;
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 500;
	justify-content: center;
	line-height: 1.2;
	min-height: 42px;
	padding: 10px 16px;
	text-decoration: none !important;
	transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.trp-btn:hover {
	transform: translateY(-1px);
}

.trp-btn:disabled {
	cursor: not-allowed;
	opacity: 0.48;
	transform: none;
}

.trp-btn--primary {
	background: var(--trp-blue);
	color: #fff !important;
}

.trp-btn--primary:hover {
	background: var(--trp-blue-dark);
}

.trp-btn--quiet {
	background: var(--trp-panel);
	border-color: var(--trp-border);
	color: var(--trp-text) !important;
}

.trp-btn--quiet:hover {
	border-color: #b1b5c3;
}

.trp-btn--soft {
	background: var(--trp-blue-soft);
	border-color: transparent;
	color: var(--trp-blue) !important;
}

.trp-layout {
	border: 1px solid var(--trp-border);
	border-radius: 0;
	display: grid;
	grid-template-columns: 380px minmax(0, 1fr);
	height: var(--trp-layout-height, 680px);
	min-height: 440px;
	overflow: hidden;
}

.trp-sidebar {
	background: var(--trp-bg);
	border-right: 1px solid var(--trp-border);
	overflow-x: hidden;
	overflow-y: auto;
	padding: 15px;
	scrollbar-color: #c7cbd2 transparent;
	scrollbar-width: thin;
}

.trp-sidebar-head { border-bottom: 1px solid var(--trp-border); margin: -15px -15px 10px; padding: 16px 15px 14px; }
.trp-sidebar-head .trp-toolbar__brand { margin-bottom: 13px; min-width: 0; }
.trp-sidebar-head .trp-search { height: 43px; width: 100%; }
.trp-sidebar-head .trp-search input { font-size: 11px; }
.trp-sidebar-head .trp-search > button { font-size: 11px; padding: 0 10px; }

.trp-panel {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--trp-border);
	border-radius: 0;
	margin-bottom: 12px;
	padding: 10px 5px 16px;
}

.trp-panel__heading {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
}

.trp-panel h3,
.trp-section-title h3 {
	color: var(--trp-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

.trp-help {
	align-items: center;
	background: #f4f5f6;
	border: 0;
	border-radius: 50%;
	color: var(--trp-muted);
	cursor: pointer;
	display: flex;
	font-size: 11px;
	height: 22px;
	justify-content: center;
	width: 22px;
}

.trp-help-text { background: var(--trp-blue-soft); border-radius: 9px; color: var(--trp-text); font-size: 11px; margin: -4px 0 12px; padding: 9px 10px; }
.trp-poi-add { margin-bottom: 10px; width: 100%; }
.trp-app.is-poi-mode .trp-map-stage .leaflet-container { cursor: copy; }

.trp-profile-grid {
	display: grid;
	gap: 7px;
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.trp-profile {
	align-items: center;
	background: #f7f8f9;
	border: 1px solid transparent;
	border-radius: 10px;
	color: var(--trp-muted);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 66px;
	padding: 9px 3px;
	transition: 0.15s ease;
}

.trp-profile span {
	align-items: center;
	display: flex;
	height: 22px;
	justify-content: center;
	line-height: 1;
}

.trp-profile svg {
	fill: none;
	height: 21px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
	width: 21px;
}

.trp-profile b {
	font-size: 10px;
	font-weight: 500;
}

.trp-profile:hover,
.trp-profile.is-active {
	background: var(--trp-blue-soft);
	border-color: rgba(13, 110, 253, 0.4);
	color: var(--trp-blue);
}

.trp-point-count {
	background: #f4f5f6;
	border-radius: 12px;
	color: var(--trp-muted);
	font-size: 10px;
	padding: 4px 8px;
}

.trp-hint,
.trp-empty-state {
	color: var(--trp-muted);
	font-size: 12px;
}

.trp-hint {
	margin: -4px 0 12px;
}

.trp-waypoints {
	list-style: none;
	margin: 0 !important;
	max-height: 220px;
	overflow-y: auto;
	padding: 0 !important;
}

.trp-waypoint {
	align-items: center;
	display: grid;
	gap: 9px;
	grid-template-columns: 26px minmax(0, 1fr) auto;
	min-height: 48px;
	position: relative;
}

.trp-waypoint:not(:last-child)::after {
	background: var(--trp-blue);
	content: "";
	height: 17px;
	left: 12px;
	position: absolute;
	top: 39px;
	width: 2px;
}

.trp-waypoint__pin {
	align-items: center;
	background: var(--trp-blue);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px var(--trp-blue);
	color: #fff;
	display: flex;
	font-size: 9px;
	font-weight: 600;
	height: 24px;
	justify-content: center;
	width: 24px;
}

.trp-waypoint__text b,
.trp-waypoint__text small {
	display: block;
}

.trp-waypoint__text b {
	font-size: 12px;
	font-weight: 500;
}

.trp-waypoint__text small {
	color: var(--trp-muted);
	font-size: 9px;
}

.trp-waypoint__actions {
	display: flex;
	gap: 1px;
}

.trp-waypoint__actions button {
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--trp-muted);
	cursor: pointer;
	font-size: 12px;
	height: 27px;
	padding: 0;
	width: 24px;
}

.trp-waypoint__actions button:hover {
	background: #f4f5f6;
	color: var(--trp-text);
}

.trp-tool-row {
	border-top: 1px solid var(--trp-border);
	display: grid;
	gap: 7px;
	grid-template-columns: repeat(4, 1fr);
	margin-top: 10px;
	padding-top: 10px;
}

.trp-tool-row button {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 9px;
	color: var(--trp-text);
	cursor: pointer;
	font-size: 19px;
	font-weight: 600;
	min-height: 52px;
	padding: 7px 3px;
}

.trp-tool-row button span {
	display: block;
	font-size: 10px;
	font-weight: 500;
}

.trp-tool-row button:hover:not(:disabled) {
	background: var(--trp-blue-soft);
	border-color: rgba(13, 110, 253, 0.45);
	color: var(--trp-blue);
}

.trp-tool-row button:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

.trp-switch {
	align-items: center;
	color: var(--trp-text);
	cursor: pointer;
	display: flex;
	font-size: 12px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.trp-switch input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.trp-switch i {
	background: #c7cbd2;
	border-radius: 20px;
	display: block;
	height: 24px;
	position: relative;
	transition: 0.18s ease;
	width: 43px;
}

.trp-switch i::after {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(35, 38, 47, 0.2);
	content: "";
	height: 18px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: 0.18s ease;
	width: 18px;
}

.trp-switch input:checked + i { background: var(--trp-blue); }
.trp-switch input:checked + i::after { transform: translateX(19px); }
.trp-switch input:focus-visible + i { outline: 3px solid rgba(13, 110, 253, 0.25); }

.trp-route-tools {
	display: grid;
	gap: 7px;
	grid-template-columns: 1fr 1fr;
	margin-top: 10px;
}

.trp-route-tools .trp-btn {
	font-size: 10px;
	min-height: 37px;
	padding: 8px;
}

.trp-options-panel {
	padding: 0;
}

.trp-segment-panel { padding: 0; }
.trp-segment-panel summary,
.trp-options-panel summary { align-items: center; display: flex; gap: 8px; }
.trp-segment-panel summary .trp-segment-count { background: var(--trp-blue-soft); border-radius: 12px; color: var(--trp-blue); font-size: 10px; margin-left: auto; padding: 3px 8px; }
.trp-segment-panel[open] summary b { transform: rotate(180deg); }
.trp-segment-list { border-top: 1px solid var(--trp-border); padding: 8px 14px 12px; }
.trp-segment-item { align-items: center; display: flex; gap: 9px; padding: 7px 0; }
.trp-segment-item { border-radius: 9px; cursor: pointer; margin: 0 -6px; padding-left: 6px; padding-right: 6px; transition: background 0.16s ease, transform 0.16s ease; }
.trp-segment-item:hover, .trp-segment-item.is-hovered { background: var(--trp-blue-soft); transform: translateX(3px); }
.trp-segment-item + .trp-segment-item { border-top: 1px solid var(--trp-border); }
.trp-segment-item b, .trp-segment-item small { display: block; }
.trp-segment-item b { font-size: 11px; }
.trp-segment-item small { color: var(--trp-muted); font-size: 9px; }
.trp-cat { align-items: center; border-radius: 7px; color: #fff; display: flex; flex: 0 0 27px; font-size: 11px; font-weight: 700; height: 27px; justify-content: center; }
.trp-cat--1 { background: #c92a2a; }
.trp-cat--2 { background: #e8590c; }
.trp-cat--3 { background: #f59f00; }
.trp-cat--4 { background: #74b816; }
.trp-cat--5 { background: #20c997; }
.trp-cat--6 { background: #228be6; }

.trp-options-panel summary,
.trp-segment-panel summary {
	align-items: center;
	color: var(--trp-text);
	cursor: pointer;
	display: flex;
	font-size: 13px;
	font-weight: 600;
	justify-content: space-between;
	list-style: none;
	padding: 15px;
}

.trp-options-panel summary::-webkit-details-marker,
.trp-segment-panel summary::-webkit-details-marker {
	display: none;
}

.trp-options-panel[open] summary span {
	transform: rotate(180deg);
}

.trp-options-panel > label {
	align-items: center;
	color: var(--trp-muted);
	display: flex;
	font-size: 11px;
	gap: 7px;
	margin: 0 15px 10px;
}

.trp-options-panel > label:last-child {
	margin-bottom: 15px;
}

.trp-options-panel input[type="checkbox"] {
	accent-color: var(--trp-blue);
}

.trp-range-label {
	align-items: stretch !important;
	border-top: 1px solid var(--trp-border);
	display: grid !important;
	grid-template-columns: 1fr auto;
	padding-top: 10px;
}

.trp-range-label output {
	color: var(--trp-blue);
	font-weight: 500;
}

.trp-range-label input {
	accent-color: var(--trp-blue);
	grid-column: 1 / -1;
	width: 100%;
}

.trp-range-label small { color: var(--trp-muted); font-size: 9px; font-weight: 400; grid-column: 1 / -1; line-height: 1.45; margin-top: 5px; }

.trp-save-panel label {
	color: var(--trp-muted);
	display: block;
	font-size: 10px;
	font-weight: 500;
	margin-top: 10px;
}

.trp-save-panel input,
.trp-save-panel textarea,
.trp-save-panel select {
	background: var(--trp-bg);
	border: 1px solid var(--trp-border);
	border-radius: 9px;
	box-shadow: none;
	color: var(--trp-text);
	display: block;
	font-size: 12px;
	margin-top: 5px;
	outline: 0;
	padding: 9px 10px;
	resize: vertical;
	width: 100%;
}

.trp-save-panel input:focus,
.trp-save-panel textarea:focus,
.trp-save-panel select:focus {
	border-color: var(--trp-blue);
}

.trp-approval-note {
	background: #fff7e6;
	border-radius: 8px;
	color: #8a5a00;
	font-size: 10px;
	margin: 10px 0 0;
	padding: 8px;
}

.trp-map-stage {
	background: #d8e2e7;
	min-width: 0;
	position: relative;
}

.trp-map-stage .leaflet-container { cursor: crosshair; }
.trp-map-stage .leaflet-dragging,
.trp-map-stage .leaflet-dragging .leaflet-grab,
.trp-map-stage .leaflet-marker-draggable { cursor: grabbing; }

.trp-map-stage .leaflet-control-layers {
	border: 1px solid var(--trp-border);
	border-radius: 10px;
	box-shadow: 0 4px 15px rgba(35, 38, 47, 0.12);
	font-family: Poppins, sans-serif;
}

.trp-map-stage .leaflet-control-layers-toggle {
	background-size: 22px 22px;
	height: 42px;
	width: 42px;
}

.trp-map-stage .leaflet-control-layers-expanded {
	background: var(--trp-panel);
	color: var(--trp-text);
	font-size: 12px;
	max-height: min(68vh, 520px);
	overflow-y: auto;
	padding: 10px 12px;
}

.trp-control-point-wrap,
.trp-poi-marker-wrap,
.trp-km-marker-wrap {
	background: transparent;
	border: 0;
}

.trp-poi-marker { align-items: center; background: var(--trp-blue); border: 3px solid #fff; border-radius: 50% 50% 50% 5px; box-shadow: 0 3px 10px rgba(35, 38, 47, 0.3); color: #fff; display: flex; font-size: 14px; height: 29px; justify-content: center; transform: rotate(-45deg); width: 29px; }
.trp-poi-marker > b { font-family: Georgia, serif; font-style: italic; font-weight: 700; line-height: 1; transform: rotate(45deg); }
.trp-poi-popup b { font-size: 13px; }
.trp-poi-popup p { color: var(--trp-muted); font-size: 11px; margin: 5px 0 8px; }
.trp-poi-popup button { background: transparent; border: 0; color: var(--trp-danger); cursor: pointer; font-size: 10px; padding: 0; }

.trp-control-point {
	background: #fff;
	border: 3px solid var(--trp-blue);
	border-radius: 50%;
	box-shadow: 0 2px 7px rgba(35, 38, 47, 0.25);
	display: block;
	height: 14px;
	width: 14px;
}

.trp-control-point.is-invalid {
	background: #fff0f0;
	border-color: var(--trp-danger);
	box-shadow: 0 0 0 7px rgba(240, 62, 62, .2), 0 3px 10px rgba(156, 24, 24, .34);
	height: 18px;
	width: 18px;
}

.trp-control-point.is-start,
.trp-control-point.is-end,
.trp-route-endpoint {
	align-items: center;
	background: #fff;
	border: 3px solid var(--trp-blue);
	border-radius: 50%;
	box-shadow: 0 3px 10px rgba(35, 38, 47, .28);
	display: flex;
	height: 26px;
	justify-content: center;
	width: 26px;
}

.trp-control-point.is-start > i,
.trp-route-endpoint--start > i {
	border-bottom: 6px solid transparent;
	border-left: 9px solid var(--trp-blue);
	border-top: 6px solid transparent;
	display: block;
	height: 0;
	margin-left: 2px;
	width: 0;
}

.trp-control-point.is-end > i,
.trp-route-endpoint--end > i {
	background: var(--trp-blue);
	border-radius: 1px;
	display: block;
	height: 10px;
	width: 10px;
}

.trp-control-point.is-start.is-invalid,
.trp-control-point.is-end.is-invalid { border-color: var(--trp-danger); height: 26px; width: 26px; }
.trp-control-point.is-start.is-invalid > i { border-left-color: var(--trp-danger); }
.trp-control-point.is-end.is-invalid > i { background: var(--trp-danger); }

.trp-km-marker {
	align-items: center;
	background: var(--trp-blue);
	border: 2px solid #fff;
	border-radius: 12px;
	box-shadow: 0 2px 7px rgba(35, 38, 47, 0.28);
	color: #fff;
	display: flex;
	font-size: 9px;
	font-weight: 700;
	height: 20px;
	justify-content: center;
	min-width: 25px;
	padding: 0 5px;
}

.trp-map {
	height: 100%;
	min-height: 380px;
	width: 100%;
}

.trp-map-stage .leaflet-control-zoom {
	border: 0;
	box-shadow: 0 4px 18px rgba(35, 38, 47, 0.15);
}

.trp-map-stage .leaflet-control-zoom a {
	background: var(--trp-panel);
	border-bottom-color: var(--trp-border);
	color: var(--trp-text);
	height: 32px;
	line-height: 32px;
	width: 32px;
}
.trp-map-stage .leaflet-control-zoom { width: 32px; }

.trp-map-stage .leaflet-control-attribution,
.trp-viewer-map .leaflet-control-attribution {
	font-size: 9px;
}

.trp-map-actions {
	align-items: center;
	bottom: 92px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: absolute;
	right: 10px;
	top: auto;
	width: 32px;
	z-index: 450;
}
.trp-location-marker-wrap { background: transparent; border: 0; }
.trp-location-marker { background: var(--trp-blue); border: 4px solid #fff; border-radius: 50%; box-shadow: 0 0 0 8px rgba(13, 110, 253, 0.18), 0 2px 9px rgba(35, 38, 47, 0.3); display: block; height: 22px; width: 22px; }

.trp-map-actions button {
	align-items: center;
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 50%;
	box-shadow: 0 4px 15px rgba(35, 38, 47, 0.12);
	color: var(--trp-text);
	cursor: pointer;
	display: flex;
	font-size: 0;
	height: 32px;
	justify-content: center;
	padding: 0;
	width: 32px;
}

.trp-map-actions button svg { fill: none; height: 19px; stroke: var(--trp-text); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 19px; }
.trp-map-actions button[data-action="locate"] svg { fill: var(--trp-blue); stroke: var(--trp-blue); }

.trp-map-edit-tools {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(35, 38, 47, 0.14);
	display: flex;
	left: 12px;
	overflow: hidden;
	position: absolute;
	top: 12px;
	z-index: 450;
}
.trp-map-edit-tools button {
	align-items: center; background: var(--trp-panel); border: 0; border-right: 1px solid var(--trp-border); color: var(--trp-text); cursor: pointer; display: flex; font-size: 18px; font-weight: 700; height: 38px; justify-content: center; padding: 0; width: 40px;
}
.trp-map-edit-tools button:last-child { border-right: 0; }
.trp-map-edit-tools button:hover:not(:disabled) { background: var(--trp-blue-soft); color: var(--trp-blue); }
.trp-map-edit-tools button:disabled { cursor: not-allowed; opacity: .35; }

.trp-map-file-tools {
	align-items: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; display: flex; gap: 7px; overflow: visible; position: absolute; right: 62px; top: 12px; z-index: 450;
}
.trp-map-file-tools button, .trp-map-file-tools a {
	align-items: center; background: var(--trp-blue); border: 1px solid rgba(255,255,255,.55); border-radius: 9px; box-shadow: 0 4px 14px rgba(13,110,253,.24); color: #fff !important; cursor: pointer; display: flex; font-size: 11px; font-weight: 600; height: 42px; justify-content: center; padding: 0 15px; text-decoration: none !important; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; white-space: nowrap;
}
.trp-map-file-tools button:hover:not(:disabled), .trp-map-file-tools a:hover { background: var(--trp-blue-dark); box-shadow: 0 6px 18px rgba(13,110,253,.32); color: #fff !important; transform: translateY(-1px); }
.trp-map-file-tools .is-primary { background: var(--trp-blue-dark); color: #fff !important; }
.trp-map-file-tools button.trp-map-info-button { background: #fff; border: 1px solid #e6e8ec; border-radius: 50%; box-shadow: 0 2px 8px rgba(35,38,47,.12); color: #23262f !important; flex: 0 0 34px; font-size: 12px; font-weight: 700; height: 34px; padding: 0; width: 34px; }
.trp-map-file-tools button.trp-map-info-button:hover:not(:disabled) { background: var(--trp-bg); border-color: #b1b5c3; box-shadow: 0 4px 13px rgba(35,38,47,.2); color: var(--trp-blue) !important; }
.trp-map-file-tools .trp-auth-link { padding-left: 17px; padding-right: 17px; }
.trp-map-file-tools button:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.trp-map-stage .trp-route-hit { cursor: grab; }
.trp-map-stage .trp-route-hit:active { cursor: grabbing; }

.trp-roundtrip-dialog label > span { align-items: baseline; display: inline-flex; gap: 3px; line-height: 1; }
.trp-roundtrip-dialog label output { display: inline; line-height: 1; vertical-align: baseline; }

.trp-locked-feature { cursor: not-allowed !important; filter: blur(.55px); opacity: .48 !important; position: relative; }
.trp-locked-feature:hover { filter: blur(.25px); opacity: .62 !important; }
@media (max-width: 900px) {
	.trp-map-file-tools { left: 12px; max-width: calc(100% - 72px); overflow-x: auto; padding-bottom: 3px; right: auto; top: 58px; }
	.trp-map-file-tools button, .trp-map-file-tools a { flex: 0 0 auto; height: 40px; padding: 0 11px; }
	.trp-map-file-tools .trp-map-info-button { flex-basis: 34px; height: 34px; padding: 0; width: 34px; }
}

.trp-map-actions button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.trp-map-tip {
	background: rgba(35, 38, 47, 0.86);
	border-radius: 9px;
	bottom: 18px;
	color: #fff;
	font-size: 11px;
	left: 50%;
	padding: 8px 12px;
	pointer-events: none;
	position: absolute;
	transform: translateX(-50%);
	z-index: 450;
}

.trp-loading {
	align-items: center;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 10px;
	box-shadow: 0 7px 25px rgba(35, 38, 47, 0.14);
	display: flex;
	gap: 9px;
	left: 50%;
	padding: 10px 14px;
	position: absolute;
	top: 18px;
	transform: translateX(-50%);
	z-index: 450;
}

.trp-loading[hidden] {
	display: none;
}

.trp-loading span {
	animation: trp-spin 0.75s linear infinite;
	border: 2px solid #dbe8ff;
	border-radius: 50%;
	border-top-color: var(--trp-blue);
	height: 18px;
	width: 18px;
}

.trp-loading b {
	font-size: 11px;
	font-weight: 500;
}

@keyframes trp-spin {
	to { transform: rotate(360deg); }
}

.trp-marker-icon {
	background: transparent;
	border: 0;
}

.trp-map-pin {
	align-items: center;
	background: var(--trp-blue);
	border: 3px solid #fff;
	border-radius: 50% 50% 50% 5px;
	box-shadow: 0 3px 10px rgba(35, 38, 47, 0.3);
	color: #fff;
	display: flex;
	font-family: Poppins, sans-serif;
	font-size: 10px;
	font-weight: 600;
	height: 32px;
	justify-content: center;
	transform: rotate(-45deg);
	width: 32px;
}

.trp-map-pin > span {
	transform: rotate(45deg);
}

.trp-hover-dot {
	background: #fff;
	border: 4px solid var(--trp-blue);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	height: 16px;
	width: 16px;
}

.trp-analysis {
	background: var(--trp-panel);
	border-top: 1px solid var(--trp-border);
	padding: 0 18px 18px;
}

.trp-stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
}

.trp-stats > div {
	border-right: 1px solid var(--trp-border);
	padding: 17px 20px;
}

.trp-stats > div:last-child {
	border-right: 0;
}

.trp-stats span,
.trp-stats strong {
	display: block;
}

.trp-stats span {
	color: var(--trp-muted);
	font-size: 10px;
	text-transform: uppercase;
}

.trp-stats strong {
	color: var(--trp-text);
	font-size: 19px;
	font-weight: 600;
	margin-top: 2px;
}

.trp-analysis-grid {
	border-top: 1px solid var(--trp-border);
	display: grid;
	gap: 0;
	grid-template-columns: minmax(0, 1fr);
	padding-top: 16px;
}

.trp-elevation-wrap { min-width: 0; width: 100%; }

.trp-section-title {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 7px;
}

.trp-elevation-range {
	color: var(--trp-muted);
	font-size: 10px;
}

.trp-elevation {
	cursor: crosshair;
	height: 150px;
	position: relative;
	touch-action: pan-y;
	user-select: none;
	width: 100%;
}

.trp-elevation.is-zoomed { cursor: zoom-out; }

.trp-elevation.trp-empty-state {
	align-items: center;
	background: linear-gradient(180deg, rgba(13, 110, 253, 0.03), transparent);
	border: 1px dashed var(--trp-border);
	border-radius: 10px;
	display: flex;
	justify-content: center;
	padding: 20px;
	text-align: center;
}

.trp-elevation svg {
	display: block;
	height: 100%;
	overflow: visible;
	width: 100%;
}

.trp-elevation-grid {
	stroke: var(--trp-border);
	stroke-width: 1;
}

.trp-elevation-grid--vertical { stroke-dasharray: 3 4; }
.trp-elevation-axis-labels { height: 18px; left: 0; pointer-events: none; position: absolute; right: 0; top: 0; z-index: 2; }
.trp-elevation-axis-labels span { color: var(--trp-muted); font-size: 9px; position: absolute; transform: translateX(4px); white-space: nowrap; }

.trp-elevation-area {
	fill: rgba(13, 110, 253, 0.12);
}

.trp-elevation-selection {
	fill: rgba(13, 110, 253, .2);
	pointer-events: none;
	stroke: var(--trp-blue);
	stroke-dasharray: 5 4;
	stroke-width: 1.5;
}

.trp-elevation-segment {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 3;
}

.trp-elevation-segment.is-climb { stroke: #f03e3e; }
.trp-elevation-segment.is-descent { stroke: #20a36a; }
.trp-elevation-segment.is-flat { stroke: var(--trp-blue); }
.trp-elevation-segment.is-compacted_gravel,
.trp-elevation-segment.is-gravel { stroke-dasharray: 12 8; }
.trp-elevation-segment.is-unpaved,
.trp-elevation-segment.is-dirt,
.trp-elevation-segment.is-ground,
.trp-elevation-segment.is-ice,
.trp-elevation-segment.is-sand,
.trp-elevation-segment.is-grass { stroke-dasharray: 1 8; }
.trp-elevation-segment.is-unknown.is-flat { stroke: #f03e3e; }
.trp-elevation-segment.is-unknown { opacity: .9; }
.trp-elevation-segment { transition: filter 0.15s ease, opacity 0.15s ease, stroke-width 0.15s ease; }
.trp-elevation-segment.is-highlighted { filter: drop-shadow(0 0 3px #ffd43b); opacity: 1; stroke: #ffd43b; stroke-width: 6; }
.trp-elevation-segment.is-surface-highlighted { filter: drop-shadow(0 0 3px rgba(13, 110, 253, .55)); opacity: 1; stroke-width: 6; }
.trp-elevation-segment.is-surface-dimmed { opacity: .45; }
.trp-profile-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.trp-profile-legend span { color: var(--trp-muted); font-size: 9px; }
.trp-profile-legend span[data-surface-group] { border-radius: 6px; cursor: pointer; margin: -3px; outline: 0; padding: 3px; transition: background-color .15s ease, color .15s ease; }
.trp-profile-legend span[data-surface-group]:hover,
.trp-profile-legend span[data-surface-group]:focus-visible { background: var(--trp-blue-soft); color: var(--trp-text); }
.trp-profile-legend strong { color: currentColor; font-size: inherit; font-weight: 700; margin-left: 2px; }
.trp-profile-legend span::before { content: ""; display: inline-block; margin-right: 5px; vertical-align: middle; width: 22px; }
.trp-profile-legend .is-climb::before { border-top: 3px solid #f03e3e; }
.trp-profile-legend .is-descent::before { border-top: 3px solid #20a36a; }
.trp-profile-legend .is-paved::before { border-top: 3px solid var(--trp-blue); }
.trp-profile-legend .is-gravel::before { border-top: 3px dashed var(--trp-blue); }
.trp-profile-legend .is-unpaved::before { border-top: 3px dotted var(--trp-blue); }
.trp-profile-legend .is-unknown::before { border-top: 3px solid #f03e3e; }
.trp-profile-legend .is-freehand::before { border-top: 3px solid var(--trp-muted); }

.trp-elevation-focus {
	fill: #fff;
	stroke: var(--trp-blue);
	stroke-width: 3;
}

.trp-elevation-guide {
	filter: drop-shadow(0 0 1px var(--trp-panel));
	stroke: var(--trp-blue);
	stroke-width: 2.5;
	vector-effect: non-scaling-stroke;
}

.trp-elevation-cursor-line {
	background: var(--trp-blue);
	bottom: 18px;
	box-shadow: 0 0 0 1px rgba(255,255,255,.75), 0 0 5px rgba(13,110,253,.55);
	pointer-events: none;
	position: absolute;
	top: 0;
	transform: translateX(-1px);
	width: 2px;
	z-index: 4;
}
.trp-elevation-cursor-line[hidden] { display: none !important; }

.trp-elevation-tooltip {
	background: var(--trp-text);
	border-radius: 7px;
	color: #fff;
	font-size: 10px;
	pointer-events: none;
	position: absolute;
	transform: translate(-50%, -115%);
	white-space: nowrap;
	z-index: 3;
}

.trp-elevation-tooltip span {
	display: block;
	padding: 5px 7px;
}

.trp-warnings {
	margin-top: 9px;
}

.trp-warning {
	background: #fff7e6;
	border-radius: 8px;
	color: #805400;
	font-size: 10px;
	margin-top: 6px;
	padding: 7px 9px;
}

.trp-analysis-footer { align-items: flex-end; display: flex; gap: 16px; justify-content: space-between; }
.trp-analysis-footer .trp-warnings { flex: 1 1 auto; }

.trp-context-popup .leaflet-popup-content-wrapper { border-radius: 11px; padding: 0; }
.trp-context-popup .leaflet-popup-content { margin: 0; min-width: 170px; }
.trp-context-menu { overflow: hidden; }
.trp-context-menu button { background: var(--trp-panel); border: 0; color: var(--trp-text); cursor: pointer; display: block; font-family: Poppins, sans-serif; font-size: 11px; padding: 10px 12px; text-align: left; width: 100%; }
.trp-context-menu button + button { border-top: 1px solid var(--trp-border); }
.trp-context-menu button:hover { background: var(--trp-blue-soft); color: var(--trp-blue); }

.trp-dialog {
	background: var(--trp-panel);
	border: 0;
	border-radius: 16px;
	box-shadow: 0 24px 80px rgba(20, 20, 22, 0.25);
	color: var(--trp-text);
	max-width: calc(100vw - 32px);
	padding: 24px;
	width: 440px;
}

.trp-dialog::backdrop {
	background: rgba(20, 20, 22, 0.55);
	backdrop-filter: blur(3px);
}

.trp-dialog h3 {
	font-size: 20px;
	margin: 0 0 6px;
}

.trp-dialog p {
	color: var(--trp-muted);
	font-size: 12px;
	margin: 0 0 18px;
}

.trp-dialog-copy h4 { font-size: 13px; margin: 16px 0 4px; }
.trp-dialog-copy p { line-height: 1.65; margin-bottom: 10px; }
.trp-terms-dialog, .trp-help-dialog { width: 560px; }

.trp-dialog label {
	color: var(--trp-muted);
	display: block;
	font-size: 11px;
	margin: 14px 0;
}

.trp-dialog label > span {
	color: var(--trp-blue);
	float: right;
	font-weight: 600;
}

.trp-dialog input,
.trp-dialog select,
.trp-dialog textarea {
	accent-color: var(--trp-blue);
	background: var(--trp-bg);
	border: 1px solid var(--trp-border);
	border-radius: 9px;
	color: var(--trp-text);
	display: block;
	margin-top: 8px;
	padding: 10px;
	width: 100%;
}

.trp-dialog select {
	background: var(--trp-bg);
	border: 1px solid var(--trp-border);
	border-radius: 9px;
	color: var(--trp-text);
	padding: 9px;
}

.trp-dialog__close {
	background: #f4f5f6;
	border: 0;
	border-radius: 50%;
	color: var(--trp-text);
	cursor: pointer;
	float: right;
	font-size: 18px;
	height: 32px;
	width: 32px;
}

.trp-dialog__actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 20px;
}

.trp-share-panel { background: var(--trp-bg); border: 1px solid var(--trp-border); border-radius: 12px; margin-top: 16px; padding: 12px; }
.trp-share-panel > b { display: block; font-size: 12px; margin-bottom: 6px; }
.trp-share-panel > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.trp-share-panel .trp-btn { font-size: 10px; min-height: 34px; padding: 7px 9px; }

.trp-toast {
	background: var(--trp-text);
	border-radius: 10px;
	bottom: 22px;
	box-shadow: 0 10px 35px rgba(20, 20, 22, 0.25);
	color: #fff;
	font-size: 12px;
	left: 50%;
	max-width: min(440px, calc(100vw - 40px));
	padding: 11px 16px;
	position: fixed;
	text-align: center;
	transform: translateX(-50%);
	z-index: 100000;
}

.trp-toast.is-error {
	background: #a92d41;
}

.trp-toast.is-success {
	background: #137f52;
}

.trp-login-gate {
	align-items: center;
	backdrop-filter: blur(4px);
	background: rgba(252, 252, 253, 0.68);
	display: flex;
	inset: 84px 0 0;
	justify-content: center;
	padding: 20px;
	position: absolute;
	z-index: 900;
}

.trp-login-card,
.trp-inline-login {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(35, 38, 47, 0.18);
	max-width: 520px;
	padding: 34px;
	text-align: center;
}

.trp-login-icon {
	display: block;
	font-size: 42px;
	margin-bottom: 10px;
}

.trp-login-card h2,
.trp-inline-login h3 {
	color: var(--trp-text);
	font-size: 24px;
	margin: 0 0 8px;
}

.trp-login-card p,
.trp-inline-login p {
	color: var(--trp-muted);
	font-size: 13px;
	margin: 0 auto 20px;
}

.trp-login-card > div {
	display: flex;
	gap: 8px;
	justify-content: center;
}

/* Libraries and cards. */
.trp-route-library {
	margin: 0 auto;
	max-width: 1240px;
}

.trp-library-actions {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 18px;
}

.trp-library-toolbar {
	align-items: center;
	border-bottom: 1px solid var(--trp-border);
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin-bottom: 22px;
}

.trp-library-toolbar .trp-library-filters { border-bottom: 0; flex: 1 1 auto; margin-bottom: 0; min-width: 0; }
.trp-library-toolbar .trp-new-route { flex: 0 0 auto; margin-bottom: 8px; }

.trp-library-header {
	align-items: flex-end;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin-bottom: 26px;
}

.trp-eyebrow {
	color: var(--trp-blue);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
}

.trp-library-header h2 {
	color: var(--trp-text);
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.15;
	margin: 5px 0 8px;
}

.trp-library-header p {
	color: var(--trp-muted);
	margin: 0;
}

.trp-library-filters {
	border-bottom: 1px solid var(--trp-border);
	display: flex;
	gap: 22px;
	margin-bottom: 22px;
}

.trp-library-filters button {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	color: var(--trp-muted);
	cursor: pointer;
	font-size: 12px;
	margin-bottom: -1px;
	padding: 9px 1px;
}

.trp-library-filters button.is-active {
	border-bottom-color: var(--trp-blue);
	color: var(--trp-blue);
	font-weight: 600;
}

.trp-public-filters {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr 220px;
	margin-bottom: 22px;
}

.trp-public-filters input,
.trp-public-filters select {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 10px;
	color: var(--trp-text);
	height: 46px;
	padding: 0 13px;
}

.trp-route-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trp-route-card,
.trp-card-skeleton {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 16px;
	min-height: 340px;
	overflow: hidden;
}

.trp-route-card {
	box-shadow: 0 8px 28px rgba(35, 38, 47, 0.05);
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.trp-route-card:hover {
	box-shadow: 0 16px 38px rgba(35, 38, 47, 0.1);
	transform: translateY(-3px);
}

.trp-route-card__map {
	background-color: #e8edf0;
	background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
	background-size: 22px 22px;
	height: 155px;
	overflow: hidden;
	position: relative;
}

.trp-route-card__preview-map,
.trp-route-card__fallback {
	inset: 0;
	position: absolute;
}

.trp-route-card__preview-map {
	background: #dfe8de;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
	visibility: hidden;
	z-index: 1;
}

.trp-route-card__map.is-map-ready .trp-route-card__preview-map {
	opacity: 1;
	visibility: visible;
}

.trp-route-card__preview-map .leaflet-control-container { display: none; }
.trp-route-card__preview-map .leaflet-tile-pane { filter: grayscale(.45) saturate(.6) brightness(1.08); }

.trp-mini-map-blue-overlay {
	background: rgba(13, 110, 253, .22);
	inset: 0;
	mix-blend-mode: multiply;
	pointer-events: none;
	position: absolute;
	z-index: 250;
}

.trp-route-card__fallback {
	background-color: #e8edf0;
	background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: 1;
	transition: opacity .25s ease;
	z-index: 2;
}

.trp-route-card__map.is-map-ready .trp-route-card__fallback {
	opacity: 0;
}

.trp-route-card__fallback svg {
	height: 100%;
	padding: 20px;
	width: 100%;
}

.trp-route-card__fallback path {
	fill: none;
	filter: drop-shadow(0 2px 2px rgba(13,110,253,.25));
	stroke: var(--trp-blue);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 4;
}

.trp-route-card__map-credit {
	background: rgba(255, 255, 255, .82);
	border-radius: 4px 0 0 0;
	bottom: 0;
	color: #5c6270;
	font-size: 7px;
	line-height: 1;
	opacity: 0;
	padding: 3px 4px;
	position: absolute;
	right: 0;
	transition: opacity .2s ease;
	z-index: 501;
}

.trp-route-card__map.is-map-ready .trp-route-card__map-credit { opacity: 1; }

.trp-route-card__badge {
	background: rgba(255, 255, 255, 0.94);
	border-radius: 20px;
	color: var(--trp-text);
	font-size: 9px;
	font-weight: 600;
	left: 10px;
	padding: 5px 9px;
	position: absolute;
	top: 10px;
	z-index: 501;
}

.trp-route-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px;
}

.trp-route-card__body h3 {
	color: var(--trp-text);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 6px;
}

.trp-route-card__body h3 a {
	color: inherit;
	text-decoration: none;
}

.trp-route-card__body h3 a:hover,
.trp-route-card__body h3 a:focus-visible {
	color: var(--trp-blue);
}

.trp-route-card__body p {
	color: var(--trp-muted);
	display: -webkit-box;
	font-size: 11px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin: 0 0 13px;
	overflow: hidden;
}

.trp-route-card__stats {
	color: var(--trp-muted);
	display: flex;
	font-size: 11px;
	gap: 12px;
	margin-top: auto;
}

.trp-route-card__stats b {
	color: var(--trp-text);
	font-weight: 600;
}

.trp-route-card__foot {
	align-items: center;
	border-top: 1px solid var(--trp-border);
	display: flex;
	gap: 8px;
	justify-content: space-between;
	margin-top: 13px;
	padding-top: 12px;
}

.trp-route-card__author {
	align-items: center;
	color: var(--trp-muted);
	display: flex;
	font-size: 10px;
	gap: 6px;
	min-width: 0;
}

.trp-route-card__author img {
	border-radius: 50%;
	height: 24px;
	width: 24px;
}

.trp-route-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: flex-end;
}

.trp-route-card__actions a,
.trp-route-card__actions button {
	background: var(--trp-blue-soft);
	border: 0;
	border-radius: 7px;
	color: var(--trp-blue);
	cursor: pointer;
	font-size: 10px;
	padding: 6px 8px;
	text-decoration: none;
}

.trp-route-card__actions button[data-action="delete"] {
	background: #fff0f2;
	color: var(--trp-danger);
}

.trp-route-card__actions .trp-card-share {
	align-items: center;
	display: inline-flex;
	font-size: 12px;
	font-weight: 600;
	height: 27px;
	justify-content: center;
	min-width: 27px;
	padding: 0 6px;
}

.trp-status-pill {
	border-radius: 20px;
	font-size: 9px;
	font-weight: 600;
	padding: 5px 8px;
	position: absolute;
	right: 10px;
	top: 10px;
	z-index: 501;
}

.trp-status-pill--publish { background: #e8f8f1; color: #137f52; }
.trp-status-pill--pending { background: #fff4dc; color: #8a5a00; }
.trp-status-pill--private { background: #f0f1f3; color: #5c6270; }

.trp-card-skeleton {
	animation: trp-pulse 1.2s ease-in-out infinite alternate;
	background: linear-gradient(110deg, #f1f2f4 8%, #fafafa 18%, #f1f2f4 33%);
	background-size: 200% 100%;
	border-color: transparent;
}

@keyframes trp-pulse {
	to { background-position-x: -200%; }
}

.trp-library-empty {
	background: var(--trp-panel);
	border: 1px dashed var(--trp-border);
	border-radius: 16px;
	color: var(--trp-muted);
	grid-column: 1 / -1;
	padding: 55px 20px;
	text-align: center;
}

.trp-load-more {
	display: flex;
	margin: 24px auto 0;
}

.trp-inline-login {
	margin: 50px auto;
}

/* Route viewer. */
.trp-viewer {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 18px;
	box-shadow: var(--trp-shadow);
	margin: 24px 0;
	overflow: hidden;
}

.trp-route-single {
	margin: 0 auto;
	max-width: 1440px;
	padding: 12px 20px 44px;
}

.trp-viewer-head {
	align-items: flex-start;
	display: flex;
	gap: 22px;
	justify-content: space-between;
	padding: 22px;
}

.trp-viewer-profile {
	color: var(--trp-blue);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.trp-viewer-title {
	color: var(--trp-text);
	font-size: clamp(24px, 4vw, 36px);
	font-weight: 600;
	line-height: 1.2;
	margin: 4px 0 8px;
}

.trp-viewer-description {
	color: var(--trp-muted);
	font-size: 13px;
	margin: 0 0 10px;
}

.trp-viewer-author {
	align-items: center;
	color: var(--trp-muted);
	display: flex;
	font-size: 11px;
	gap: 7px;
}

.trp-viewer-author img {
	border-radius: 50%;
	height: 28px;
	width: 28px;
}

.trp-viewer-actions {
	display: flex;
	gap: 7px;
}

.trp-viewer-actions .trp-edit-route { background: var(--trp-blue); border-color: var(--trp-blue); color: #fff !important; }
.trp-viewer-actions .trp-edit-route:hover { background: var(--trp-blue-dark); border-color: var(--trp-blue-dark); color: #fff !important; }

.trp-viewer-map {
	height: min(62vh, 620px);
	min-height: 420px;
}
.trp-viewer-map-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(250px,320px); gap:18px; align-items:start; }
.trp-viewer-map-sidebar { max-height:520px; overflow:auto; display:grid; gap:12px; }
.trp-viewer-map-sidebar .trp-viewer-collapsible { margin:0; }
.trp-viewer-map-sidebar .trp-viewer-slope-grid { grid-template-columns: 1fr; gap: 12px; }
@media (max-width: 900px) { .trp-viewer-map-layout { grid-template-columns:1fr; } .trp-viewer-map-sidebar { max-height:none; } }

.trp-viewer > .trp-analysis-grid {
	padding: 20px;
}

/* Dark-mode selectors used by Tekeregj and common WordPress toggles. */
body.dark .trp-app,
body.dark-mode .trp-app,
body.is-dark .trp-app,
html[data-theme="dark"] .trp-app,
.dark-theme .trp-app {
	--trp-text: #f4f5f6;
	--trp-muted: #b1b5c3;
	--trp-border: #353945;
	--trp-bg: #141416;
	--trp-panel: #23262f;
	--trp-blue-soft: rgba(13, 110, 253, 0.15);
	--trp-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

body.dark .trp-search,
body.dark-mode .trp-search,
body.is-dark .trp-search,
html[data-theme="dark"] .trp-search,
.dark-theme .trp-search,
body.dark .trp-profile,
body.dark-mode .trp-profile,
body.is-dark .trp-profile,
html[data-theme="dark"] .trp-profile,
.dark-theme .trp-profile {
	background: #2d303a;
}

body.dark .trp-login-gate,
body.dark-mode .trp-login-gate,
body.is-dark .trp-login-gate,
html[data-theme="dark"] .trp-login-gate,
.dark-theme .trp-login-gate {
	background: rgba(20, 20, 22, 0.72);
}

body.dark .trp-loading,
body.dark-mode .trp-loading,
body.is-dark .trp-loading,
html[data-theme="dark"] .trp-loading,
.dark-theme .trp-loading {
	background: rgba(35, 38, 47, 0.95);
}

@media (max-width: 1250px) {
	.trp-toolbar {
		grid-template-columns: auto 1fr;
	}

	.trp-search {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.trp-toolbar__actions {
		grid-column: 2;
		grid-row: 1;
	}

	.trp-login-gate {
		inset: 148px 0 0;
	}
}

@media (max-width: 980px) {
	.trp-planner {
		border-radius: 0;
		width: 100%;
	}

	.trp-toolbar {
		gap: 12px;
		padding: 12px;
	}

	.trp-my-routes-link,
	.trp-toolbar__actions .trp-btn--quiet:not([data-action="export"]) {
		display: none;
	}

	.trp-layout {
		display: flex;
		height: auto;
		min-height: 0;
		flex-direction: column;
	}

	.trp-map-stage {
		height: 58vh;
		min-height: 470px;
		order: 1;
	}

	.trp-sidebar {
		border-radius: 20px 20px 0 0;
		border-right: 0;
		box-shadow: 0 -8px 28px rgba(35, 38, 47, 0.09);
		margin-top: -18px;
		max-height: none;
		order: 2;
		padding: 16px 12px;
		position: relative;
		z-index: 460;
	}

	.trp-analysis {
		padding: 0 12px 15px;
	}

	.trp-analysis-grid {
		grid-template-columns: 1fr;
	}

	.trp-route-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.trp-login-gate {
		inset: 0;
		position: fixed;
	}
}

@media (max-width: 640px) {
	.trp-route-single {
		padding: 8px 8px 28px;
	}

	.trp-toolbar {
		grid-template-columns: 1fr auto;
	}

	.trp-toolbar__brand {
		min-width: 0;
	}

	.trp-brand-mark {
		height: 38px;
		width: 38px;
	}

	.trp-toolbar__brand small {
		display: none;
	}

	.trp-toolbar__actions .trp-btn[data-action="export"] {
		display: none;
	}

	.trp-toolbar__actions .trp-btn {
		min-height: 38px;
		padding: 8px 12px;
	}

	.trp-search {
		height: 44px;
	}

	.trp-search > button {
		display: none;
	}

	.trp-map-stage {
		height: 55vh;
		min-height: 410px;
	}

	.trp-profile-grid {
		grid-template-columns: repeat(5, minmax(58px, 1fr));
		overflow-x: auto;
	}

	.trp-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.trp-stats > div:nth-child(2) {
		border-right: 0;
	}

	.trp-stats > div:nth-child(-n+2) {
		border-bottom: 1px solid var(--trp-border);
	}

	.trp-stats > div:nth-child(5) { border-top: 1px solid var(--trp-border); grid-column: 1 / -1; text-align: center; }

	.trp-stats strong {
		font-size: 16px;
	}

	.trp-library-header,
	.trp-viewer-head {
		align-items: stretch;
		flex-direction: column;
	}

	.trp-library-header .trp-btn {
		align-self: flex-start;
	}

	.trp-public-filters,
	.trp-route-grid {
		grid-template-columns: 1fr;
	}

	.trp-library-filters {
		gap: 14px;
		overflow-x: auto;
	}

	.trp-library-filters button {
		flex: 0 0 auto;
	}

	.trp-viewer-actions .trp-btn {
		flex: 1;
	}

	.trp-viewer-map {
		height: 55vh;
		min-height: 360px;
	}

	.trp-login-card {
		padding: 26px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trp-app *,
	.trp-app *::before,
	.trp-app *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* Route detail v0.13: editorial page structure. */
.trp-profile-legend [hidden] { display: none !important; }

.trp-route-single {
	max-width: 1440px;
	padding-top: 0;
}

.trp-viewer {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	overflow: visible;
}

.trp-viewer-hero {
	align-items: flex-start;
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 18px 18px 0 0;
	display: grid;
	gap: 12px 24px;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: clamp(20px, 3vw, 36px);
}

.trp-viewer-heading { grid-column: 1; }
.trp-viewer-author { grid-column: 1; grid-row: 1; }
.trp-viewer-author span { display: flex; flex-direction: column; }
.trp-viewer-author b { color: var(--trp-text); font-size: 12px; }
.trp-viewer-author small { font-size: 9px; }
.trp-viewer-title { margin-bottom: 7px; }
.trp-viewer-place { color: var(--trp-muted); font-size: 11px; margin: 0; }
.trp-viewer-place strong { color: var(--trp-text); font-weight: 600; }

.trp-viewer-actions {
	align-items: center;
	flex-wrap: nowrap;
	grid-column: 2;
	grid-row: 1 / span 2;
	justify-content: flex-end;
	max-width: none;
	white-space: nowrap;
}
.trp-viewer-actions .trp-btn {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.trp-favorite-button {
	align-items: center;
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 10px;
	color: var(--trp-danger);
	cursor: pointer;
	display: inline-flex;
	font-size: 24px;
	height: 42px;
	justify-content: center;
	line-height: 1;
	transition: transform .15s ease, background .15s ease;
	width: 42px;
}
.trp-favorite-button:hover { background: #fff1f3; transform: translateY(-1px); }
.trp-favorite-button.is-active { background: #fff1f3; }

.trp-viewer-nav {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-top: 0;
	display: flex;
	gap: 22px;
	overflow-x: auto;
	padding: 0 clamp(20px, 3vw, 36px);
}
.trp-viewer-nav a {
	border-bottom: 2px solid transparent;
	color: var(--trp-muted);
	flex: 0 0 auto;
	font-size: 10px;
	padding: 13px 0 11px;
	text-decoration: none;
}
.trp-viewer-nav a:hover { border-bottom-color: var(--trp-blue); color: var(--trp-blue); }

.trp-viewer-stats {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-top: 0;
	grid-template-columns: repeat(6, 1fr);
}

.trp-viewer-section {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 16px;
	margin-top: 18px;
	padding: clamp(18px, 2.5vw, 30px);
	scroll-margin-top: 90px;
}
.trp-viewer-section > .trp-section-title h2,
.trp-viewer-collapsible > summary h2,
.trp-comments-shell .comments-title {
	color: var(--trp-text);
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 600;
	margin: 0;
}
.trp-viewer-collapsible > summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	list-style: none;
	user-select: none;
}
.trp-viewer-collapsible > summary::-webkit-details-marker { display: none; }
.trp-viewer-collapsible > summary span { color: var(--trp-muted); font-size: 18px; transition: transform .18s ease; }
.trp-viewer-collapsible[open] > summary span { transform: rotate(180deg); }
.trp-viewer-collapsible > summary + * { margin-top: 18px; }
.trp-viewer-description { font-size: 13px; line-height: 1.8; margin: 0; max-width: 900px; white-space: pre-line; }
.trp-viewer-map-profile { overflow: hidden; padding: 0; }
.trp-viewer-map-profile > .trp-section-title { padding: 22px 26px 12px; }
.trp-viewer-map-profile .trp-elevation-wrap { padding: 22px 26px 24px; }
.trp-viewer-map { height: min(62vh, 620px); min-height: 420px; }

.trp-viewer-slope-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trp-viewer-pois { display: grid; gap: 7px; }
.trp-viewer-pois button {
	align-items: center;
	background: var(--trp-bg);
	border: 1px solid var(--trp-border);
	border-radius: 10px;
	color: var(--trp-text);
	cursor: pointer;
	display: grid;
	gap: 3px 9px;
	grid-template-columns: 30px 1fr;
	padding: 9px 11px;
	text-align: left;
}
.trp-viewer-pois button > span { align-items: center; background: var(--trp-blue-soft); border-radius: 50%; color: var(--trp-blue); display: flex; grid-row: 1 / span 2; height: 28px; justify-content: center; width: 28px; }
.trp-viewer-pois button b { font-size: 11px; }
.trp-viewer-pois button small { color: var(--trp-muted); font-size: 9px; }
.trp-viewer-pois button:hover { border-color: var(--trp-blue); }

.trp-weather-grid { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.trp-weather-grid article { align-items: center; background: var(--trp-bg); border: 1px solid var(--trp-border); border-radius: 12px; display: flex; flex-direction: column; gap: 3px; padding: 14px 8px; text-align: center; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease; }
.trp-weather-grid article:hover,
.trp-weather-grid article:focus-visible,
.trp-weather-grid article.is-weather-active { background: var(--trp-blue-soft); border-color: var(--trp-blue); box-shadow: 0 0 0 3px rgba(13,110,253,.12); outline: 0; transform: translateY(-1px); }
.trp-weather-icon { font-size: 26px; }
.trp-weather-grid b { color: var(--trp-text); font-size: 10px; text-transform: capitalize; }
.trp-weather-grid small,
.trp-weather-grid em { color: var(--trp-muted); font-size: 9px; font-style: normal; }
.trp-weather-grid strong { color: var(--trp-text); font-size: 14px; }
.trp-weather-credit { color: var(--trp-muted); font-size: 8px; margin: 8px 0 0; text-align: right; }
.trp-weather-location { color: var(--trp-muted); font-size: 10px; }

.trp-comments-shell {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 16px;
	margin-top: 18px;
	padding: clamp(18px, 2.5vw, 30px);
}
.trp-comments-shell textarea { max-width: 100%; }

.trp-route-frame {
	background: var(--trp-panel);
	border: 1px solid var(--trp-border);
	border-radius: 18px;
	box-shadow: var(--trp-shadow);
	overflow: hidden;
}

.trp-route-frame .trp-viewer {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	overflow: visible;
}

.trp-route-frame .trp-viewer-hero { border: 0; border-radius: 0; }
.trp-route-frame .trp-viewer-nav,
.trp-route-frame .trp-viewer-stats { border-left: 0; border-right: 0; }
.trp-route-frame .trp-viewer-section {
	border: 0;
	border-radius: 0;
	border-top: 1px solid var(--trp-border);
	margin: 0;
}
.trp-route-frame .trp-comments-shell {
	border: 0;
	border-radius: 0;
	border-top: 1px solid var(--trp-border);
	margin: 0;
}

@media (max-width: 960px) {
	.trp-viewer-hero { grid-template-columns: 1fr; }
	.trp-viewer-actions { flex-wrap: wrap; grid-column: 1; grid-row: auto; justify-content: flex-start; max-width: none; }
	.trp-viewer-stats { grid-template-columns: repeat(3, 1fr); }
	.trp-viewer-stats > div:nth-child(3) { border-right: 0; }
	.trp-viewer-stats > div:nth-child(-n+3) { border-bottom: 1px solid var(--trp-border); }
}

@media (max-width: 640px) {
	.trp-library-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
	.trp-library-toolbar .trp-new-route { align-self: flex-start; margin-bottom: 10px; }
	.trp-route-single { padding: 0 8px 24px; }
	.trp-viewer-hero { border-radius: 12px 12px 0 0; padding: 18px 14px; }
	.trp-viewer-actions .trp-btn { flex: 0 0 auto; font-size: 10px; padding: 8px 10px; }
	.trp-viewer-nav { gap: 16px; padding: 0 14px; }
	.trp-viewer-stats { grid-template-columns: repeat(2, 1fr); }
	.trp-viewer-stats > div { border-bottom: 1px solid var(--trp-border); border-right: 1px solid var(--trp-border); padding: 13px 11px; }
	.trp-viewer-stats > div:nth-child(even) { border-right: 0; }
	.trp-viewer-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
	.trp-viewer-stats > div:nth-child(5) { border-top: 0; grid-column: auto; text-align: left; }
	.trp-viewer-slope-grid { grid-template-columns: 1fr; }
	.trp-weather-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.trp-weather-grid article:first-child { grid-column: 1 / -1; }
	.trp-viewer-map-profile .trp-elevation-wrap { padding: 18px 14px; }
	.trp-viewer-map-profile > .trp-section-title { padding: 18px 14px 10px; }
}
