/*
 * PractiRoute One — public trail library.
 * Scoped to .pr1-library so it never restyles the host theme.
 * Colour tokens mirror the PractiRoute palette and fall back to it via
 * the theme's --pr-* variables when they exist.
 */

.pr1-library {
	--pr1-ink: #153c31;
	--pr1-ink-soft: rgba(21, 60, 49, 0.72);
	--pr1-paper: #f3f1e9;
	--pr1-mint: #dce7d8;
	--pr1-coral: #ee7150;
	--pr1-card: #ffffff;
	--pr1-line: rgba(21, 60, 49, 0.14);
	/* Round-9 rule: 9px corners everywhere, no pills. */
	--pr1-radius: 9px;
	--pr1-gutter: clamp(16px, 4vw, 48px);
	background: var(--pr1-paper);
	color: var(--pr1-ink);
	font-family: inherit;
	padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px);
}

.pr1-library *,
.pr1-library *::before,
.pr1-library *::after {
	box-sizing: border-box;
}

.pr1-shell {
	width: 100%;
	max-width: 1180px;
	margin-inline: auto;
	padding-inline: var(--pr1-gutter);
}

.pr1-card-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	overflow: hidden;
}

/* ---------- Hero ---------- */

.pr1-hero {
	max-width: 62ch;
	margin-bottom: clamp(24px, 4vw, 40px);
}

.pr1-eyebrow {
	margin: 0 0 12px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pr1-coral);
}

.pr1-hero-title {
	margin: 0 0 16px;
	font-size: clamp(1.9rem, 4.4vw, 3rem);
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: var(--pr1-ink);
}

.pr1-hero-intro {
	margin: 0;
	font-size: clamp(1rem, 1.5vw, 1.15rem);
	line-height: 1.6;
	color: var(--pr1-ink-soft);
}

/* ---------- Filters ---------- */

/* Directory tools: label columns, select, button and reset link share one
   bottom line instead of centring against the two-line label columns. */
.pr-member-tools.pr-directory-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
}

.pr-member-tools.pr-directory-tools label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pr1-ink-soft);
}

.pr-member-tools.pr-directory-tools select,
.pr-member-tools.pr-directory-tools input {
	min-height: 44px;
}

.pr-member-tools.pr-directory-tools .pr-button,
.pr-member-tools.pr-directory-tools .pr-member-text-link {
	align-self: flex-end;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
}

.pr1-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	padding: 20px;
	margin-bottom: 20px;
	background: var(--pr1-card);
	border: 1px solid var(--pr1-line);
	border-radius: var(--pr1-radius);
}

.pr1-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pr1-ink-soft);
}

.pr1-field-search {
	flex: 1 1 260px;
}

.pr1-field input,
.pr1-field select {
	min-height: 44px;
	padding: 10px 14px;
	font: inherit;
	font-size: 1rem;
	color: var(--pr1-ink);
	background: #fff;
	border: 1px solid var(--pr1-line);
	border-radius: 9px;
}

.pr1-field input:focus-visible,
.pr1-field select:focus-visible,
.pr1-library a:focus-visible,
.pr1-library button:focus-visible {
	outline: 2px solid var(--pr1-coral);
	outline-offset: 2px;
}

.pr1-field-actions {
	flex-direction: row;
	align-items: center;
	gap: 14px;
}

/* ---------- Buttons and links ---------- */

.pr1-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	color: var(--pr1-paper);
	background: var(--pr1-ink);
	border: 1px solid var(--pr1-ink);
	border-radius: 9px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pr1-button:hover,
.pr1-button:focus {
	color: var(--pr1-ink);
	background: var(--pr1-mint);
	border-color: var(--pr1-mint);
}

.pr1-button-outline {
	color: var(--pr1-ink);
	background: transparent;
	border-color: var(--pr1-line);
}

.pr1-button-outline:hover,
.pr1-button-outline:focus {
	color: var(--pr1-paper);
	background: var(--pr1-ink);
	border-color: var(--pr1-ink);
}

.pr1-button.is-disabled {
	opacity: 0.45;
	pointer-events: none;
}

.pr1-text-link {
	color: var(--pr1-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.pr1-text-link:hover {
	color: var(--pr1-coral);
}

/* Country › activity breadcrumb above a trail's title (0.2.30). */
.pr1-places {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.pr1-places .pr1-place-link {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.pr1-places .pr1-place-link:hover,
.pr1-places .pr1-place-link:focus-visible {
	border-bottom-color: currentColor;
}

.pr1-places .pr1-place-sep {
	opacity: 0.6;
}

/* ---------- Results and grid ---------- */

.pr1-results {
	margin: 0 0 16px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--pr1-ink-soft);
}

.pr1-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 24px);
}

.pr1-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--pr1-card);
	border: 1px solid var(--pr1-line);
	border-radius: var(--pr1-radius);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pr1-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(21, 60, 49, 0.1);
}

.pr1-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--pr1-mint);
}

.pr1-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pr1-card-media-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(135deg, rgba(21, 60, 49, 0.06) 0 12px, transparent 12px 24px),
		var(--pr1-mint);
}

.pr1-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 6px 12px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	/* Square-ish like the buttons: 9px, not a pill. */
	border-radius: 9px;
	background: var(--pr1-card);
	color: var(--pr1-ink);
}

.pr1-trail-meta .pr1-badge {
	position: static;
	border: 1px solid var(--pr1-line);
}

.pr1-badge-easy {
	background: var(--pr1-mint);
	color: var(--pr1-ink);
}

.pr1-badge-moderate {
	background: #f6e3b8;
	color: #6b4a08;
}

.pr1-badge-hard {
	background: var(--pr1-coral);
	color: #fff;
}

.pr1-card-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	padding: 20px;
}

.pr1-card-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.28;
	letter-spacing: -0.01em;
}

.pr1-card-title a {
	color: var(--pr1-ink);
	text-decoration: none;
}

.pr1-card-title a:hover {
	color: var(--pr1-coral);
}

.pr1-card-text {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--pr1-ink-soft);
}

.pr1-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
}

.pr1-stats div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pr1-stats dt {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--pr1-ink-soft);
}

.pr1-stats dd {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--pr1-ink);
}

.pr1-stats-large {
	gap: 10px 28px;
	padding: 10px 0;
	border-block: 1px solid var(--pr1-line);
	margin: 16px 0;
}

.pr1-stats-large dt {
	font-size: 0.62rem;
	letter-spacing: 0.08em;
}

.pr1-stats-large dd {
	font-size: 0.95rem;
}

.pr1-card-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: auto;
	padding-top: 4px;
}

.pr1-empty,
.pr1-note {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.6;
	color: var(--pr1-ink-soft);
}

.pr1-empty {
	padding: 28px;
	text-align: center;
	background: var(--pr1-card);
	border: 1px dashed var(--pr1-line);
	border-radius: var(--pr1-radius);
}

.pr1-note {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--pr1-line);
}

/* ---------- Pagination ---------- */

.pr1-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
}

.pr1-pagination-status {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pr1-ink-soft);
}

.pr-directory .pr-directory-pagination .pr-directory-page-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid #215341;
	border-radius: var(--pr1-radius);
	background: #215341;
	color: #fff;
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.pr-directory .pr-directory-pagination a.pr-directory-page-control:hover,
.pr-directory .pr-directory-pagination a.pr-directory-page-control:focus-visible {
	background: #153c2e;
	color: #fff;
}

.pr-directory .pr-directory-pagination a.pr-directory-page-control:focus-visible {
	outline: 2px solid #153c2e;
	outline-offset: 3px;
}

.pr-directory .pr-directory-pagination .pr-directory-page-control[aria-disabled="true"] {
	border-color: #b6c3bc;
	background: #eef2ef;
	color: #46584e;
}

/* ---------- Single trail ---------- */

.pr1-breadcrumb {
	margin-bottom: 20px;
}

.pr1-trail {
	max-width: 860px;
	padding: clamp(20px, 4vw, 40px);
	background: var(--pr1-card);
	border: 1px solid var(--pr1-line);
	border-radius: var(--pr1-radius);
}

.pr1-trail-head {
	margin-bottom: 8px;
}

.pr1-trail-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin: 12px 0 0;
	font-size: 0.85rem;
	color: var(--pr1-ink-soft);
}

.pr1-trail-map {
	margin: 0 0 8px;
	padding: 0;
	background: var(--pr1-mint);
	border-radius: 9px;
	overflow: hidden;
	color: var(--pr1-ink);
}

/* The Leaflet basemap sits behind the route; the SVG below is noscript-only. */
.pr1-trail-map-canvas {
	height: 440px;
	background: var(--pr1-mint);
}

.pr1-trail-map .leaflet-container {
	font: inherit;
}

.pr1-leaflet-marker {
	background: transparent;
	border: none;
}

.pr1-leaflet-marker a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--pr1-coral);
	color: #fff;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(21, 60, 49, 0.35);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

/* Only the noscript fallback SVG; Leaflet's overlay svg must keep the
   size Leaflet sets, or the route line drifts off the tiles. */
.pr1-trail-map > noscript > svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	max-height: 420px;
}

/* Elevation profile below the map, like the app: filled area, route line,
   waypoint dots and start/end flags. */
.pr1-trail-profile {
	position: relative;
	margin: 10px 0 0;
	padding: 0;
	background: var(--pr1-mint);
	border-radius: 9px;
	/* The blue hover chips straddle the top and bottom edges, like the app. */
	overflow: visible;
}

/* The app's blue readout chips: elevation on the top edge, distance on the
   bottom axis, both following the cursor. */
.pr1-profile-chip {
	position: absolute;
	transform: translateX(-50%);
	z-index: 5;
	padding: 1px 6px;
	background: #2196f3;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	border-radius: 3px;
	white-space: nowrap;
	pointer-events: none;
}

.pr1-profile-chip-ele {
	top: -8px;
}

.pr1-profile-chip-dist {
	bottom: -8px;
}

.pr1-profile-hoverdot {
	fill: #2196f3;
	stroke: #fff;
	stroke-width: 1.5;
}

/* The app's white "Mapas" layer switcher, top-right on the map. */
.pr1-mapas {
	background: #fff;
	border-radius: 9px;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
	font: 600 13px/1.2 sans-serif;
	color: #333;
}

.pr1-mapas > button {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.pr1-mapas-menu {
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.pr1-mapas-menu button {
	display: block;
	width: 100%;
	padding: 7px 12px;
	text-align: left;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.pr1-mapas-menu button[aria-checked="true"] {
	color: #e8862e;
}

.pr1-mapas-menu button:hover {
	background: rgba(0, 0, 0, 0.06);
}

.pr1-trail-profile svg {
	display: block;
	width: 100%;
	height: 150px;
}

.pr1-profile-dot circle {
	fill: #ffd23f;
	stroke: #153c31;
	stroke-width: 1.5;
}



.pr1-profile-dot:hover circle {
	fill: var(--pr1-coral);
}

.pr1-profile-end circle {
	fill: #153c31;
	stroke: #fff;
	stroke-width: 2;
}

.pr1-profile-end text {
	font-size: 11px;
	font-weight: 700;
	fill: var(--pr1-ink);
}

.pr1-profile-cursor {
	stroke: #153c31;
	stroke-width: 1;
	stroke-dasharray: 3 3;
}

.pr1-profile-min,
.pr1-profile-max,
.pr1-profile-dist {
	font-size: 11px;
	fill: var(--pr1-ink);
}

.pr1-trail-text {
	font-size: 1rem;
	line-height: 1.7;
	color: var(--pr1-ink);
}

.pr1-trail-photo img {
	width: 100%;
	height: auto;
	border-radius: 9px;
	margin-top: 24px;
}

/* ---------- Trail page: cover, waypoints and their media ---------- */

.pr1-trail-cover {
	margin: 20px 0 8px;
}

.pr1-trail-cover img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: 9px;
}

.pr1-trail-map > noscript > svg {
	aspect-ratio: auto;
	max-height: 560px;
}

.pr1-map-marker circle {
	fill: var(--pr1-coral);
	stroke: #ffffff;
	stroke-width: 0.6;
}

.pr1-map-marker text {
	fill: #ffffff;
	font-size: 2.6px;
	font-weight: 700;
	pointer-events: none;
}

.pr1-waypoints {
	margin-top: 32px;
}

.pr1-waypoints h2 {
	margin: 0 0 16px;
	font-size: 1.35rem;
}

.pr1-waypoint-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 16px;
}

.pr1-waypoint {
	display: flex;
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--pr1-line);
	border-radius: 9px;
	background: var(--pr1-card);
	scroll-margin-top: 96px;
}

.pr1-waypoint:target {
	border-color: var(--pr1-coral);
}

.pr1-waypoint-number {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--pr1-coral);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.85rem;
}

.pr1-waypoint-body {
	flex: 1 1 auto;
	min-width: 0;
}

.pr1-waypoint-body h3 {
	margin: 2px 0 4px;
	font-size: 1.05rem;
}

.pr1-waypoint-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 0.82rem;
	color: var(--pr1-ink-soft);
}

.pr1-waypoint-type {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 1px 8px;
	/* Round-9 rule: square-ish chip, not a pill. */
	border-radius: 9px;
	background: var(--pr1-mint);
	color: var(--pr1-ink);
}

/* The view chip shows the glyph at the editor's size, not a shrunk copy. */
.pr1-waypoint-icon {
	width: 34px;
	height: 34px;
	flex: none;
}

/* The app's waypoint-type row: square tiles, round-9 corners, green when picked. */
.pr1-waypoint-type-heading {
	display: block;
	margin: 0 0 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--pr1-ink-soft);
}

.pr1-waypoint-type-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.pr1-waypoint-type-option {
	display: inline-block;
	margin: 0;
}

.pr1-waypoint-type-option input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* The app's chips: 46px tiles carrying a 34px glyph (WaypointDetailsSection.qml). */
.pr1-waypoint-type-tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(21, 60, 49, 0.18);
	border-radius: 9px;
	background: #eef1f4;
	color: var(--pr1-ink);
	cursor: pointer;
}

.pr1-waypoint-type-tile .pr1-waypoint-icon {
	width: 34px;
	height: 34px;
}

.pr1-waypoint-type-option input:checked + .pr1-waypoint-type-tile {
	border-color: var(--pr1-green, #0f6b4f);
	background: var(--pr1-green, #0f6b4f);
	color: #ffffff;
}

.pr1-waypoint-type-option input:focus-visible + .pr1-waypoint-type-tile {
	outline: 2px solid var(--pr1-green, #0f6b4f);
	outline-offset: 2px;
}

.pr1-waypoint-note {
	margin: 0 0 10px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.pr1-waypoint-editor {
	margin: 8px 0;
}

.pr1-waypoint-editor > summary {
	display: list-item;
	width: fit-content;
	padding: 8px 12px;
	border: 1px solid var(--pr1-line);
	border-radius: 9px;
	background: var(--pr1-mint);
	color: var(--pr1-ink);
	font-weight: 600;
	cursor: pointer;
}

.pr1-waypoint-editor form,
.pr1-waypoint-editor label,
.pr1-waypoint-editor-field {
	display: grid;
	gap: 6px;
}

.pr1-waypoint-editor form {
	gap: 12px;
	max-width: 32rem;
	margin-top: 12px;
}

.pr1-waypoint-editor input,
.pr1-waypoint-editor textarea {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid var(--pr1-line);
	border-radius: 9px;
	background: var(--pr1-card);
	color: var(--pr1-ink);
	font: inherit;
}

.pr1-waypoint-editor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pr1-waypoint-editor-actions button {
	padding: 8px 12px;
	border: 1px solid var(--pr1-ink);
	border-radius: 9px;
	background: var(--pr1-ink);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.pr1-waypoint-editor-actions button[value="delete_note"] {
	background: var(--pr1-card);
	color: var(--pr1-ink);
}

.pr1-waypoint-editor :focus-visible {
	outline: 2px solid var(--pr1-ink);
	outline-offset: 3px;
}

.pr1-waypoint-photos {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 8px;
	margin: 8px 0;
}

.pr1-waypoint-photos img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
	border-radius: 9px;
}

.pr1-waypoint-video {
	display: block;
	width: 100%;
	max-height: 480px;
	margin: 8px 0;
	border-radius: 9px;
	background: #000000;
}

/* Videos imported from a trail description (YouTube links and the like).
   They are shown in the first waypoint, or in their own section when the trail
   has no waypoints; a click opens GalleryOne's viewer at the video, or the
   link opens the video itself. */
.pr1-trail-videos,
.pr1-waypoint-imported-videos {
	margin: 16px 0;
}

.pr1-trail-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin: 8px 0;
}

.pr1-trail-video {
	position: relative;
	display: block;
	border-radius: 9px;
	overflow: hidden;
	background: #000000;
	color: #ffffff;
	text-decoration: none;
	aspect-ratio: 16 / 9;
}

.pr1-trail-video img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pr1-trail-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #ffffff;
	font-size: 20px;
	line-height: 1;
	pointer-events: none;
}

.pr1-trail-video-title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 10px 8px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	font-size: 13px;
	line-height: 1.3;
	pointer-events: none;
}

.pr1-trail-video:hover .pr1-trail-video-play,
.pr1-trail-video:focus-visible .pr1-trail-video-play {
	background: rgba(200, 30, 30, 0.9);
}

.pr1-trail-video:focus-visible {
	outline: 2px solid var(--pr1-ink);
	outline-offset: 3px;
}

/* Website-only video manager (add / edit / delete YouTube videos). */
.pr-trail-video-editor {
	margin: 16px 0;
	border: 1px solid var(--pr1-line, #d8d8d8);
	border-radius: 9px;
	padding: 10px 14px;
}

.pr-trail-video-editor > summary {
	cursor: pointer;
	font-weight: 600;
}

.pr-trail-video-status {
	margin: 10px 0;
	padding: 8px 12px;
	border-radius: 6px;
	background: #eef7ee;
}

.pr-trail-video-status[data-status="failed"] {
	background: #fdeeee;
}

.pr-trail-video-items {
	list-style: none;
	margin: 12px 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.pr-trail-video-item form,
.pr-trail-video-add {
	display: grid;
	gap: 8px;
}

.pr-trail-video-field {
	display: grid;
	gap: 4px;
	font-size: 13px;
}

.pr-trail-video-field input {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid var(--pr1-line, #d8d8d8);
	border-radius: 6px;
}

.pr-trail-video-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Add / Save / Delete share the plugin's button language (.pr1-button):
   ink fill, mint hover, 9px corners — sized down to sit inside the editor. */
.pr-trail-video-editor button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 40px;
	padding: 9px 18px;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--pr1-paper);
	background: var(--pr1-ink);
	border: 1px solid var(--pr1-ink);
	border-radius: 9px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pr-trail-video-editor button:hover,
.pr-trail-video-editor button:focus {
	color: var(--pr1-ink);
	background: var(--pr1-mint);
	border-color: var(--pr1-mint);
}

.pr-trail-video-editor button:focus-visible {
	outline: 2px solid var(--pr1-ink);
	outline-offset: 3px;
}

.pr-trail-video-icon {
	flex: 0 0 auto;
}

/* The add form is a grid: keep the button its own width, not full-bleed. */
.pr-trail-video-add-button {
	justify-self: start;
	margin-top: 2px;
}

/* Delete is the destructive action: outlined until hovered, then solid red. */
.pr-trail-video-editor .pr-trail-video-delete {
	color: #b32d2e;
	background: var(--pr1-card);
	border-color: rgba(179, 45, 46, 0.35);
}

.pr-trail-video-editor .pr-trail-video-delete:hover,
.pr-trail-video-editor .pr-trail-video-delete:focus {
	color: #fff;
	background: #b32d2e;
	border-color: #b32d2e;
}

.pr-trail-video-editor .pr-trail-video-delete:focus-visible {
	outline-color: #b32d2e;
}

@media (max-width: 600px) {
	.pr-trail-video-add-button {
		justify-self: stretch;
	}

	.pr-trail-video-actions button {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pr-trail-video-editor button {
		transition: none;
	}
}

.pr1-waypoint-audio {
	display: block;
	width: 100%;
	margin: 8px 0;
}

.pr1-card-title-link {
	color: inherit;
	text-decoration: none;
}

.pr1-card-title-link:hover,
.pr1-card-title-link:focus-visible {
	text-decoration: underline;
}

.pr1-card-places {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.4em;
	margin: 0 0 8px;
	font-size: 0.875rem;
}

/* An author without a profile page reads as the linked ones do. */
.pr-member-trail span.pr-directory-author {
	display: inline-block;
	color: var(--member-green, #24513f);
	font-size: 14px;
	font-weight: 600;
}

.pr1-card-open {
	display: inline-block;
	margin: 0 0 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
	.pr1-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.pr1-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.pr1-filters {
		padding: 16px;
	}

	.pr1-field-search,
	.pr1-field,
	.pr1-field-actions {
		flex: 1 1 100%;
	}

	.pr1-field-actions .pr1-button {
		width: 100%;
	}

	.pr1-stats-large {
		gap: 8px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pr1-card,
	.pr1-button {
		transition: none;
	}

	.pr1-card:hover {
		transform: none;
	}
}

/* Download panel: the app package plus its QR code. */
.pr1-download-panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	justify-content: space-between;
	margin: 28px 0 0;
	padding: 20px 22px;
	border: 1px solid rgba(21, 60, 49, 0.14);
	border-radius: 14px;
	background: #fff;
}

.pr1-download-panel-body {
	flex: 1 1 320px;
	min-width: 240px;
}

.pr1-download-panel h2 {
	margin: 0 0 6px;
	font-size: 1.05rem;
	color: var(--pr1-ink);
}

.pr1-download-summary {
	margin: 0 0 14px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--pr1-ink-soft);
}

.pr1-download-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

/* Media-mode chooser: four radio cards, GPX only picked by default. */
.pr1-download-form {
	margin: 0;
}

.pr1-media-modes {
	display: grid;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.pr1-media-modes legend {
	padding: 0;
	margin-bottom: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pr1-ink-soft);
}

.pr1-media-mode {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid rgba(21, 60, 49, 0.16);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.pr1-media-mode:hover {
	border-color: rgba(21, 60, 49, 0.36);
}

.pr1-media-mode:has(input:checked) {
	border-color: var(--pr1-coral);
	background: rgba(238, 113, 80, 0.07);
}

.pr1-media-mode-empty {
	opacity: 0.55;
	cursor: not-allowed;
}

.pr1-media-mode input {
	margin: 2px 0 0;
	accent-color: var(--pr1-coral);
}

.pr1-media-mode-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pr1-media-mode-label {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--pr1-ink);
}

.pr1-media-mode-hint {
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--pr1-ink-soft);
}

.pr1-media-mode-count {
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--pr1-coral);
}

.pr1-download-note {
	margin: 0 0 12px;
	font-size: 0.78rem;
	color: var(--pr1-ink-soft);
}

.pr1-download-alt {
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--pr1-ink);
	text-decoration: underline;
}

.pr1-download-qr {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	text-align: center;
}

/* The canvas carries its own 4-module white quiet zone and sets its exact
   size in pr1-qr.js, so the box neither pads nor stretches it. */
.pr1-qr-box {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 240px;
	min-height: 240px;
	padding: 0;
	border: 1px solid rgba(21, 60, 49, 0.14);
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

.pr1-qr-canvas {
	display: block;
	max-width: none;
	image-rendering: pixelated;
}

.pr1-qr-note {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.35;
	color: var(--pr1-ink-soft);
}

.pr1-qr-box.pr1-qr-unavailable {
	width: auto;
	height: auto;
	min-height: 0;
}

.pr1-qr-hint {
	margin: 0;
	max-width: 240px;
	font-size: 0.72rem;
	line-height: 1.35;
	color: var(--pr1-ink-soft);
}

.pr1-card-actions .pr1-button-quiet {
	background: transparent;
	color: var(--pr1-ink);
	border: 1px solid rgba(21, 60, 49, 0.28);
}

@media (max-width: 560px) {
	.pr1-download-panel {
		justify-content: center;
		text-align: center;
	}

	.pr1-download-actions {
		justify-content: center;
	}
}
