/* Pasaporte de Sellos — public app styles */

#pds-app, .pds-staff-app {
	--pds-primary: #2f6f4f;
	--pds-primary-dark: #204d37;
	--pds-accent: #e8b34a;
	--pds-bg: #f7f5f0;
	--pds-card: #ffffff;
	--pds-text: #23281f;
	--pds-muted: #6b7268;
	--pds-border: #e4e1d8;
	--pds-danger: #b3402c;
	--pds-radius: 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--pds-text);
	background: var(--pds-bg);
}

#pds-app *, #pds-app *::before, #pds-app *::after,
.pds-staff-app *, .pds-staff-app *::before, .pds-staff-app *::after {
	box-sizing: border-box;
}

html:has(#pds-app), html:has(.pds-staff-app) { background: var(--pds-bg); }

.pds-standalone-body {
	margin: 0;
	background: var(--pds-bg);
}

#pds-app {
	max-width: 480px;
	margin: 0 auto;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--pds-bg);
	position: relative;
}

.pds-mode-embedded#pds-app {
	min-height: auto;
	border: 1px solid var(--pds-border);
	border-radius: var(--pds-radius);
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.pds-loading, .pds-error {
	padding: 48px 24px;
	text-align: center;
	color: var(--pds-muted);
}

.pds-error { color: var(--pds-danger); }

/* Header / cover */
.pds-header {
	position: relative;
	background: linear-gradient(160deg, var(--pds-primary), var(--pds-primary-dark));
	color: #fff;
	padding: 28px 20px 20px;
	background-size: cover;
	background-position: center;
}
.pds-header::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45));
	pointer-events: none;
}
.pds-header > * { position: relative; z-index: 1; }
.pds-header-badge {
	display: inline-block;
	background: rgba(255,255,255,.18);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	margin-bottom: 10px;
}
.pds-header h1 {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.25;
}
.pds-header .pds-dates {
	font-size: 13px;
	opacity: .9;
}

/* Body scroll area */
.pds-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 16px 90px;
}

.pds-mode-embedded .pds-body { padding-bottom: 24px; }
.pds-mode-embedded .pds-bottomnav { position: static; box-shadow: none; border-top: 1px solid var(--pds-border); }

/* Cards */
.pds-card {
	background: var(--pds-card);
	border: 1px solid var(--pds-border);
	border-radius: var(--pds-radius);
	padding: 16px;
	margin-bottom: 14px;
}
.pds-card h3 { margin: 0 0 8px; font-size: 16px; }
.pds-card p { margin: 0 0 6px; color: var(--pds-muted); font-size: 14px; line-height: 1.5; }

/* Info map */
/* Leaflet's own CSS gives its internal layers (tile/marker/popup panes,
   zoom controls) z-index values up to 800 so they stack correctly *inside*
   the map. Without a stacking context of its own, those values leak out
   and can paint over unrelated page elements with a much lower z-index —
   the station detail panel (z-index 300) and the bottom nav (z-index 5) —
   whenever a popup or control happens to sit near their edges. `isolation:
   isolate` boxes all of that off: everything inside the map now stacks
   only against everything else inside the map, never past this card. */
.pds-map-card { padding: 16px 16px 12px; isolation: isolate; }
.pds-map {
	height: 440px;
	border-radius: calc(var(--pds-radius) - 4px);
	overflow: hidden;
	border: 1px solid var(--pds-border);
}
.pds-map-popup { font-size: 13px; line-height: 1.5; }
.pds-map-popup a { color: var(--pds-primary); font-weight: 600; }

/* Progress */
.pds-progress-wrap {
	background: var(--pds-card);
	border-radius: var(--pds-radius);
	padding: 18px 16px;
	margin-bottom: 16px;
	border: 1px solid var(--pds-border);
}
.pds-progress-label {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--pds-muted);
	margin-bottom: 8px;
}
.pds-progress-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--pds-border);
	overflow: hidden;
}
.pds-progress-bar > div {
	height: 100%;
	min-width: 4px;
	background: var(--pds-primary);
	border-radius: 999px;
	transition: width .3s ease;
}
.pds-rank {
	margin-top: 12px;
	font-size: 13px;
	color: var(--pds-muted);
}
.pds-rank b { color: var(--pds-text); }

/* Stamp row: small collectible badges shown right under the progress bar */
.pds-stamp-row {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding: 4px 2px 12px;
	margin-bottom: 4px;
}
.pds-stamp-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	flex: 0 0 64px;
	text-align: center;
}
.pds-stamp-badge-label {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 2px 7px;
	border-radius: 999px;
	font-weight: 700;
	white-space: nowrap;
}
.pds-badge-method-qr { background: #efe9df; color: #6b5b45; }
.pds-badge-method-survey { background: #dbe6fb; color: #2854a6; }
.pds-badge-method-quiz { background: #d7f3ee; color: #0f7d68; }
.pds-badge-method-photo { background: #fde3c8; color: #a45b12; }

.pds-stamp-avatar {
	width: 56px; height: 56px;
	border-radius: 50%;
	background: var(--pds-card);
	border: 2px solid var(--pds-border);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden;
	position: relative;
	font-size: 20px;
}
.pds-stamp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pds-stamp-item.is-collected .pds-stamp-avatar { border-color: var(--pds-primary); }
.pds-stamp-item:not(.is-collected) .pds-stamp-avatar { opacity: .5; filter: grayscale(70%); }
.pds-stamp-check {
	position: absolute; bottom: -2px; right: -2px;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--pds-primary); color: #fff;
	font-size: 10px; display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--pds-card);
}
.pds-stamp-name {
	font-size: 10px; color: var(--pds-muted);
	max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Header logo */
.pds-header-logo { max-height: 56px; max-width: 180px; margin-bottom: 10px; display: block; }
.pds-station-header-logo { width: 92px; height: 92px; border-radius: 20px; object-fit: cover; margin-bottom: 12px; }
/* Both header buttons (language toggle + "my code") share this top-right
   strip so they sit side by side instead of each claiming their own corner
   and overlapping the tour's logo, which lives in the top-left instead. */
.pds-header-actions {
	position: absolute; top: 16px; right: 16px; z-index: 2;
	display: flex; align-items: center; gap: 8px;
}
.pds-lang-toggle {
	background: rgba(255,255,255,.22); border: none; color: #fff;
	min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px;
	font-size: 12px; font-weight: 700; letter-spacing: .02em;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.pds-station-list-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--pds-border);
	border-radius: 14px;
	margin-bottom: 10px;
	background: var(--pds-card);
}
.pds-station-list-item img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #eee; }
.pds-station-list-item .pds-si-info { flex: 1; min-width: 0; }
.pds-station-list-item .pds-si-name { font-weight: 600; font-size: 14px; }
.pds-station-list-item .pds-si-meta { font-size: 12px; color: var(--pds-muted); }
.pds-station-list-item .pds-si-check {
	width: 26px; height: 26px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 13px; flex-shrink: 0;
}
.pds-station-list-item.is-collected .pds-si-check { background: var(--pds-primary); color: #fff; }
.pds-station-list-item:not(.is-collected) .pds-si-check { background: var(--pds-border); color: var(--pds-muted); }

/* Buttons */
.pds-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: 999px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	background: var(--pds-primary);
	color: #fff;
	text-decoration: none;
}
.pds-btn:disabled { opacity: .5; cursor: not-allowed; }
.pds-btn.pds-btn-outline { background: transparent; color: var(--pds-primary); border: 1px solid var(--pds-primary); }
.pds-btn.pds-btn-secondary { background: var(--pds-accent); color: #3a2b06; }

/* Forms */
.pds-field { margin-bottom: 14px; }
.pds-field label { display: block; font-size: 13px; color: var(--pds-muted); margin-bottom: 6px; }
.pds-field input, .pds-field textarea, .pds-field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--pds-border);
	border-radius: 12px;
	font-size: 15px;
	box-sizing: border-box;
	background: #fff;
	color: var(--pds-text);
}
.pds-field-row { display: flex; gap: 10px; }
.pds-field-row .pds-field { flex: 1; }
.pds-choice-list { display: flex; flex-direction: column; gap: 8px; }
.pds-choice-list label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--pds-text);
	border: 1px solid var(--pds-border);
	border-radius: 12px;
	padding: 11px 14px;
	background: #fff;
}
.pds-choice-list input[type="radio"] { accent-color: var(--pds-primary); width: 18px; height: 18px; flex-shrink: 0; }

/* Bottom nav */
.pds-bottomnav {
	position: sticky;
	bottom: 0;
	display: flex;
	background: var(--pds-card);
	border-top: 1px solid var(--pds-border);
	box-shadow: 0 -4px 16px rgba(0,0,0,.05);
	z-index: 5;
}
.pds-nav-item {
	flex: 1;
	border: none;
	background: none;
	padding: 10px 4px 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: var(--pds-muted);
	cursor: pointer;
}
.pds-nav-item .pds-nav-icon { font-size: 18px; line-height: 1; }
.pds-nav-item.is-active { color: var(--pds-primary); font-weight: 600; }
.pds-nav-item.pds-nav-scan {
	position: relative;
	top: -14px;
}
.pds-nav-item.pds-nav-scan .pds-nav-icon {
	width: 46px; height: 46px;
	border-radius: 50%;
	background: var(--pds-primary);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 20px;
	box-shadow: 0 6px 14px rgba(47,111,79,.4);
}

/* Rewards */
.pds-reward-card { border-radius: var(--pds-radius); padding: 16px; margin-bottom: 12px; border: 1px solid var(--pds-border); background: var(--pds-card); }
.pds-reward-card.is-unlocked { background: #eef8f0; border-color: #bfe3ca; }
.pds-reward-icon { font-size: 26px; margin-bottom: 8px; }
.pds-reward-meta { font-size: 12px; color: var(--pds-muted); margin: 2px 0; }
.pds-reward-meta.is-expired { color: #c0392b; font-weight: 600; }
.pds-reward-progress { font-size: 12px; color: var(--pds-muted); margin: 6px 0 10px; }

/* Achievements ("logros") */
.pds-achievements-row { display: flex; gap: 10px; margin-bottom: 18px; }
.pds-achievement {
	flex: 1;
	text-align: center;
	border-radius: var(--pds-radius);
	padding: 14px 10px;
	border: 1px solid var(--pds-border);
	background: var(--pds-card);
	opacity: .55;
	filter: grayscale(1);
}
.pds-achievement.is-unlocked { opacity: 1; filter: none; background: #fff8e6; border-color: #f0dfa8; }
.pds-achievement-icon { font-size: 26px; margin-bottom: 6px; }
.pds-achievement-title { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.pds-achievement-desc { font-size: 11px; color: var(--pds-muted); line-height: 1.4; }

/* Leaderboard */
.pds-leader-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--pds-border); }
.pds-leader-rank { width: 26px; font-weight: 700; color: var(--pds-muted); }
.pds-leader-row:nth-child(1) .pds-leader-rank { color: #d4a017; }
.pds-leader-row:nth-child(2) .pds-leader-rank { color: #8a8f98; }
.pds-leader-row:nth-child(3) .pds-leader-rank { color: #b06a3a; }
.pds-leader-name { flex: 1; font-size: 14px; }
.pds-leader-points { font-weight: 700; font-size: 14px; }

/* Scan / camera */
.pds-scan-view { text-align: center; }
.pds-camera-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	border-radius: var(--pds-radius);
	overflow: hidden;
	background: #000;
	margin-bottom: 14px;
}
.pds-camera-wrap video { width: 100%; height: 100%; object-fit: cover; }
.pds-camera-frame {
	position: absolute; inset: 12%;
	border: 3px solid rgba(255,255,255,.85);
	border-radius: 18px;
	pointer-events: none;
}
.pds-success-badge {
	width: 84px; height: 84px; border-radius: 50%;
	background: var(--pds-primary); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 40px; margin: 12px auto 16px;
}
.pds-my-qr { background: #fff; padding: 16px; border-radius: var(--pds-radius); display: inline-block; margin-bottom: 12px; }
.pds-my-qr canvas { display: block; }

/* Toasts */
.pds-toast {
	position: fixed;
	left: 50%; bottom: 96px;
	transform: translateX(-50%);
	background: var(--pds-text);
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 13px;
	z-index: 50;
	box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* Tags */
.pds-method-tag {
	display: inline-block;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--pds-border);
	color: var(--pds-text);
}

/* Identity row (name + email, no edit) */
.pds-identity-row {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--pds-card);
	border: 1px solid var(--pds-border);
	border-radius: 999px;
	padding: 8px 14px;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--pds-text);
}
/* The identity row is a <button> since 2.3.0 (it opens "Mi perfil"), so it
   needs the font/width resets a button doesn't inherit on its own. */
.pds-identity-row.is-tappable {
	width: 100%;
	text-align: left;
	font-family: inherit;
	cursor: pointer;
}
.pds-identity-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pds-identity-chevron { color: var(--pds-muted); font-size: 20px; line-height: 1; flex-shrink: 0; }
.pds-identity-avatar {
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--pds-primary); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.pds-identity-email { color: var(--pds-muted); }

/* Success screen: progress readout, pop-in check, confetti */
.pds-success-card { position: relative; overflow: hidden; padding-top: 30px; }
.pds-success-badge.pds-success-pop { animation: pds-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pds-pop {
	0% { transform: scale(0); opacity: 0; }
	60% { transform: scale(1.15); opacity: 1; }
	100% { transform: scale(1); }
}
.pds-success-progress-value {
	font-size: 34px;
	font-weight: 800;
	margin: 2px 0 16px;
}
.pds-success-progress-value span { color: var(--pds-muted); font-weight: 400; margin: 0 6px; }
.pds-confetti-holder { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pds-confetti-piece {
	position: absolute;
	top: -12px;
	width: 8px;
	height: 14px;
	opacity: .95;
	transform: rotate(var(--pds-rot, 0deg));
	animation-name: pds-confetti-fall;
	animation-timing-function: ease-in;
	animation-fill-mode: forwards;
}
/* Round pieces are mixed into the big (tour-completed) burst only. */
.pds-confetti-piece.is-round { border-radius: 50%; }
/* --pds-fall / --pds-drift default to the small in-card burst; the big burst
   overrides them per piece so the confetti crosses the whole screen and
   spreads sideways instead of dropping in straight parallel lines. */
@keyframes pds-confetti-fall {
	0% { transform: translate(0, 0) rotate(var(--pds-rot, 0deg)); opacity: 1; }
	100% {
		transform: translate(var(--pds-drift, 0px), var(--pds-fall, 240px)) rotate(calc(var(--pds-rot, 0deg) + 540deg));
		opacity: 0;
	}
}

/* Tour completed: full-screen celebration over the passport (2.3.0).
   Lives inside #pds-app so it inherits the event's branding variables. */
.pds-celebrate {
	position: fixed;
	inset: 0;
	z-index: 400; /* above the station sheet (300), which it is layered over */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(160deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .92));
	animation: pds-celebrate-in .32s ease;
	overflow: hidden;
}
@keyframes pds-celebrate-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
.pds-celebrate-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pds-celebrate-inner {
	position: relative;
	width: 100%;
	max-width: 380px;
	max-height: 100%;
	overflow-y: auto;
	text-align: center;
	background: var(--pds-card);
	border-radius: 22px;
	padding: 26px 22px 22px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
	animation: pds-celebrate-pop .45s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes pds-celebrate-pop {
	0% { transform: scale(.82) translateY(18px); opacity: 0; }
	100% { transform: scale(1) translateY(0); opacity: 1; }
}
.pds-celebrate-trophy {
	font-size: 58px;
	line-height: 1;
	margin-bottom: 6px;
	animation: pds-trophy-bounce 1.6s ease-in-out .35s infinite;
}
@keyframes pds-trophy-bounce {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	25% { transform: translateY(-7px) rotate(-7deg); }
	75% { transform: translateY(-7px) rotate(7deg); }
}
.pds-celebrate-title {
	margin: 0 0 4px;
	font-size: 26px;
	font-weight: 800;
	color: var(--pds-primary);
}
.pds-celebrate-sub { margin: 0 0 18px; font-size: 15px; }
.pds-celebrate-sub b { display: block; margin-top: 2px; font-size: 17px; }
.pds-celebrate-stats {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 16px;
}
.pds-celebrate-stat {
	flex: 1;
	background: var(--pds-bg);
	border-radius: 14px;
	padding: 12px 6px;
}
.pds-celebrate-stat-value { display: block; font-size: 21px; font-weight: 800; }
.pds-celebrate-stat-label {
	display: block; margin-top: 3px;
	font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
	color: var(--pds-muted);
}
.pds-celebrate-last { margin: 0 0 16px; font-size: 13px; color: var(--pds-muted); }
.pds-celebrate-inner .pds-btn + .pds-btn { margin-top: 8px; }

/* Passport banner shown once the tour is finished — also replays the
   celebration, so it isn't lost the moment the visitor closes it. */
.pds-complete-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: left;
	border: none;
	cursor: pointer;
	background: linear-gradient(135deg, var(--pds-primary), var(--pds-primary-dark, var(--pds-primary)));
	color: #fff;
	border-radius: 16px;
	padding: 14px 16px;
	margin-bottom: 14px;
	font: inherit;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.pds-complete-banner-icon { font-size: 26px; line-height: 1; }
.pds-complete-banner-text { display: flex; flex-direction: column; gap: 2px; }
.pds-complete-banner-text b { font-size: 15px; }
.pds-complete-banner-text span { font-size: 12px; opacity: .9; }

/* "Mi perfil": the visitor's tours across the whole site (2.3.0). */
.pds-profile-back {
	background: none;
	border: none;
	padding: 0 0 10px;
	font: inherit;
	font-size: 14px;
	color: var(--pds-muted);
	cursor: pointer;
}
.pds-profile-head { text-align: center; }
.pds-profile-avatar {
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--pds-primary); color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 24px; font-weight: 800;
	margin-bottom: 8px;
}
.pds-profile-head h2 { margin: 0; font-size: 19px; }
.pds-profile-email { margin: 2px 0 0; font-size: 13px; color: var(--pds-muted); }
.pds-profile-stats {
	display: flex;
	gap: 8px;
	margin-top: 16px;
}
.pds-profile-stat {
	flex: 1;
	background: var(--pds-bg);
	border-radius: 12px;
	padding: 10px 4px;
}
.pds-profile-stat-value { display: block; font-size: 18px; font-weight: 800; }
.pds-profile-stat-label {
	display: block; margin-top: 2px;
	font-size: 10px; text-transform: uppercase; letter-spacing: .03em;
	color: var(--pds-muted);
}
.pds-profile-tour {
	background: var(--pds-card);
	border: 1px solid var(--pds-border);
	border-radius: 16px;
	padding: 14px 16px;
	margin-bottom: 12px;
}
.pds-profile-tour.is-complete { border-color: var(--pds-primary); }
.pds-profile-tour-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}
.pds-profile-tour-head h3 { margin: 0; font-size: 15px; }
.pds-profile-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.pds-profile-badge {
	font-size: 10px;
	white-space: nowrap;
	border-radius: 999px;
	padding: 3px 9px;
	background: var(--pds-border);
	color: var(--pds-text);
}
.pds-profile-badge.is-current { background: var(--pds-border); color: var(--pds-muted); }
.pds-profile-badge.is-done { background: var(--pds-primary); color: #fff; }
.pds-profile-tour-line { font-size: 12px; color: var(--pds-muted); margin-bottom: 6px; }
.pds-profile-ach { font-size: 13px; margin-top: 6px; color: var(--pds-muted); }
.pds-profile-open { margin-top: 10px; }
.pds-profile-note {
	font-size: 12px;
	color: var(--pds-muted);
	text-align: center;
	margin: 4px 6px 0;
}

/* Station ratings (2.4.0): public average + the visitor's own stars. */
.pds-rating-block {
	background: var(--pds-bg);
	border-radius: 14px;
	padding: 12px 14px;
	margin-bottom: 16px;
	text-align: center;
}
.pds-rating-block-success { background: transparent; padding: 0 0 16px; }
.pds-rating-avg {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 13px;
}
.pds-rating-avg.is-empty { color: var(--pds-muted); font-size: 12px; }
.pds-rating-avg-value { font-weight: 800; }
.pds-rating-count { color: var(--pds-muted); font-size: 12px; }
.pds-rating-stars-static { letter-spacing: 1px; line-height: 1; }
.pds-star-static { color: var(--pds-border); font-size: 15px; }
.pds-star-static.is-on { color: #e8b34a; }
.pds-rating-mine { margin-top: 10px; }
.pds-rating-block-success .pds-rating-mine { margin-top: 0; }
.pds-rating-mine-label {
	display: block;
	font-size: 12px;
	color: var(--pds-muted);
	margin-bottom: 4px;
}
.pds-rating-stars { display: flex; justify-content: center; gap: 2px; }
.pds-star {
	background: none;
	border: none;
	cursor: pointer;
	/* Comfortably tappable on a phone without making the row huge. */
	padding: 4px 6px;
	font-size: 26px;
	line-height: 1;
	color: var(--pds-border);
	transition: transform .12s ease, color .12s ease;
}
.pds-star.is-on { color: #e8b34a; }
.pds-star:active { transform: scale(1.2); }

/* Photo capture: styled picker + preview */
.pds-photo-preview-empty {
	border: 2px dashed var(--pds-border);
	border-radius: 14px;
	padding: 34px 14px;
	text-align: center;
}
.pds-photo-pick-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	color: var(--pds-primary);
	font-weight: 600;
}
.pds-photo-pick-label svg { width: 34px; height: 34px; }
.pds-photo-preview-filled { position: relative; border-radius: 14px; overflow: hidden; line-height: 0; }
.pds-photo-preview-filled img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.pds-photo-retake {
	position: absolute; bottom: 10px; right: 10px;
	background: rgba(0,0,0,.55); color: #fff;
	font-size: 12px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}

/* Section titles (e.g. "Estaciones" above the station list) */
.pds-section-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pds-muted);
	margin: 4px 2px 10px;
}

/* Station detail bottom sheet: opened over the current screen instead of
   navigating away, for any station tap (list, real QR scan, or /sello/ link). */
.pds-modal-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.55);
	display: flex; align-items: flex-end; justify-content: center;
	z-index: 300;
}
.pds-sheet {
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--pds-card);
	border-radius: 22px 22px 0 0;
	padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	position: relative;
	animation: pds-sheet-up .25s ease;
}
@keyframes pds-sheet-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}
.pds-sheet-handle {
	width: 36px; height: 4px;
	border-radius: 999px;
	background: var(--pds-border);
	margin: 0 auto 14px;
}
.pds-sheet-close {
	position: absolute; top: 14px; right: 16px;
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--pds-border); color: var(--pds-text);
	border: none; font-size: 18px; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	/* Content rendered into the sheet body (e.g. .pds-success-card, which is
	   also position:relative) comes later in the DOM and would otherwise
	   paint over this button since both are positioned with z-index:auto —
	   pin this above everything else in the sheet. */
	z-index: 5;
}
.pds-sheet-head { text-align: center; margin-bottom: 18px; }
.pds-sheet-logo {
	width: 84px; height: 84px;
	border-radius: 18px;
	object-fit: cover;
	margin: 0 auto 12px;
	display: block;
}
.pds-sheet-logo-placeholder {
	display: flex; align-items: center; justify-content: center;
	background: var(--pds-border);
	font-size: 32px;
}
.pds-sheet-head h3 { margin: 0 0 8px; font-size: 17px; }
.pds-sheet-tags { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pds-sheet-status {
	display: inline-block;
	font-size: 11px; font-weight: 700;
	padding: 2px 10px;
	border-radius: 999px;
}
.pds-sheet-status.is-done { background: #dff3e6; color: var(--pds-primary-dark); }
.pds-sheet-status.is-pending { background: var(--pds-border); color: var(--pds-muted); }

.pds-sheet-stats { display: flex; gap: 12px; margin: 18px 0; }
.pds-sheet-stat {
	flex: 1;
	background: var(--pds-bg);
	border: 1px solid var(--pds-border);
	border-radius: 14px;
	padding: 14px;
	text-align: center;
}
.pds-sheet-stat-value { display: block; font-size: 20px; font-weight: 800; }
.pds-sheet-stat-label { display: block; font-size: 11px; color: var(--pds-muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 4px; }

.pds-sheet-checklist { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 6px; }
.pds-sheet-check-row {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--pds-border);
	border-radius: 12px;
}
.pds-sheet-check-row.is-done { border-color: var(--pds-primary); background: #f3faf5; }
.pds-sheet-check-dot {
	width: 22px; height: 22px; border-radius: 50%;
	background: var(--pds-border); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; flex-shrink: 0;
}
.pds-sheet-check-row.is-done .pds-sheet-check-dot { background: var(--pds-primary); }
.pds-sheet-check-label { flex: 1; font-size: 14px; }
.pds-sheet-check-done-label { font-size: 12px; color: var(--pds-primary); font-weight: 600; }
.pds-btn-sm-outline {
	background: transparent;
	border: 1px solid var(--pds-primary);
	color: var(--pds-primary);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.pds-hint-text { font-size: 12px; color: var(--pds-muted); margin: 6px 0 14px; text-align: center; }
.pds-sheet-back {
	background: none; border: none;
	color: var(--pds-primary);
	font-size: 14px; font-weight: 600;
	padding: 0 0 14px;
	cursor: pointer;
	display: inline-flex; align-items: center; gap: 4px;
}
.pds-sheet-form-title { margin: 0 0 12px; font-size: 16px; }
.pds-modal-loading { text-align: center; color: var(--pds-muted); padding: 30px 0; }

/* Staff scanner */
.pds-staff-app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 20px 16px 40px; }
.pds-staff-step { text-align: center; margin-bottom: 16px; color: var(--pds-muted); font-size: 13px; }
.pds-staff-result { padding: 14px; border-radius: 12px; background: var(--pds-card); border: 1px solid var(--pds-border); margin-bottom: 14px; }
