    :root {
        --bg-page: #f1f5f9;
        --bg-panel: #ffffff;
        --text-main: #0f172a;
        --text-soft: #6b7280;
        --border-soft: #e2e8f0;
        --accent: #22c55e;
        --accent-2: #3b82f6;
        --accent-3: #f97316;
        --accent-4: #ec4899;
        --radius-lg: 20px;
        --radius-md: 14px;
        --shadow-soft: 0 12px 30px rgba(15,23,42,0.12);
    }
    *{
        box-sizing:border-box;
    }
    body{
        margin:0;
        font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
        background: radial-gradient(circle at top, #e0f2fe 0, #f1f5f9 40%, #e5e7eb 100%);
        color:var(--text-main);
    }
    .wrap{
        max-width:1200px;
        margin:18px auto 32px;
        padding:10px;
    }
    .panel{
        background:var(--bg-panel);
        border-radius:28px;
        box-shadow:var(--shadow-soft);
        padding:18px 14px 22px;
        border:1px solid #e5e7eb;
    }
    @media(min-width:768px){
        .panel{padding:22px 26px 26px;}
    }

    /* HEADER */
    .header{
        display:grid;
        grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
        gap:16px;
        align-items:center;
    }
    @media(max-width:860px){
        .header{grid-template-columns:1fr;}
    }
    .title{
        font-size:1.9rem;
        margin:0;
        letter-spacing:.14em;
        text-transform:uppercase;
        color:#0f172a;
    }
    .title span{
        color:#22c55e;
    }
    .subtitle{
        margin-top:6px;
        font-size:.95rem;
        color:var(--text-soft);
        max-width:520px;
    }
    .tag-row{
        margin-top:10px;
        display:flex;
        flex-wrap:wrap;
        gap:8px;
    }
    .tag{
        display:inline-flex;
        align-items:center;
        gap:6px;
        font-size:.8rem;
        padding:4px 10px;
        border-radius:999px;
        background:#e0f2fe;
        color:#0369a1;
        border:1px solid #bae6fd;
    }
    .tag span{
        font-size:1rem;
    }
    .hero{
        border-radius:var(--radius-lg);
        background:linear-gradient(135deg,#22c55e,#3b82f6);
        padding:12px 14px 14px;
        color:#f9fafb;
        position:relative;
        overflow:hidden;
    }
    .hero::after{
        content:"";
        position:absolute;
        right:-30px;
        top:-30px;
        width:120px;
        height:120px;
        border-radius:50%;
        background:rgba(255,255,255,0.18);
    }
    .hero-label{
        font-size:.8rem;
        letter-spacing:.16em;
        text-transform:uppercase;
        opacity:.9;
    }
    .hero-name{
        font-size:1.25rem;
        font-weight:700;
        margin-top:4px;
    }
    .hero-row{
		display:flex;
		align-items:center;
		gap:16px;
		margin-top:6px;
	}

	.hero-desc{
		flex:1; /* el texto ocupa el espacio disponible */
	}

	.hero-descT{
		flex-shrink:0; /* evita que el QR se reduzca */
	}

    .hero-coords{
        font-size:.78rem;
        margin-top:6px;
    }
    .hero-coords span{
        font-family:ui-monospace,Menlo,Monaco,"Courier New",monospace;
    }
    .hero-badge{
        position:absolute;
        right:12px;
        bottom:10px;
        background:rgba(255,255,255,0.9);
        color:#16a34a;
        border-radius:999px;
        padding:3px 10px;
        font-size:.78rem;
        display:inline-flex;
        align-items:center;
        gap:5px;
        box-shadow:0 6px 16px rgba(15,23,42,0.25);
    }
	
	@media(max-width:650px){
		.hero-row{
			flex-direction:column;
			align-items:flex-start;
		}
	}

    /* GRID LAYOUT */
		.grid{
		margin-top:20px;
		display:grid;
		grid-template-columns:1fr; /* una sola columna de categorías */
		gap:18px;
	}
	@media(max-width:960px){
		.grid{
			grid-template-columns:1fr;
		}
	}

    /* CATEGORY BLOCKS */
    .cat{
    border-radius:var(--radius-lg);
    border:1px solid var(--border-soft);
    background:linear-gradient(135deg,#ffffff,#f9fafb);
    padding:12px 14px 14px;
    margin-bottom:10px; /* separa visualmente una categoría de otra */
}

    .cat-header{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;
    }
    .cat-title{
        display:flex;
        align-items:center;
        gap:8px;
    }
    .cat-icon{
        width:36px;
        height:36px;
        border-radius:50%;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:1.5rem;
        color:#f9fafb;
        box-shadow:0 4px 10px rgba(15,23,42,0.18);
    }
    .cat-name{
        font-size:1rem;
        font-weight:700;
        text-transform:uppercase;
        letter-spacing:.08em;
        color:#111827;
    }
    .cat-chip{
        font-size:.75rem;
        padding:4px 8px;
        border-radius:999px;
        border:1px solid #e5e7eb;
        background:#f3f4f6;
        color:#4b5563;
        white-space:nowrap;
    }
    .cat-note{
        margin-top:6px;
        margin-bottom:8px;
        font-size:.8rem;
        color:var(--text-soft);
    }

    /* PLACE CARDS */
    .place-list{
		list-style:none;
		margin:0;
		padding:0;
		display:grid;
		grid-template-columns:repeat(3, minmax(0, 1fr)); /* 2 columnas de lugares */
		gap:8px;
	}

    .place-card{
        border-radius:var(--radius-md);
        border:1px solid var(--border-soft);
        background:#ffffff;
        padding:7px 9px;
        display:grid;
        grid-template-columns:minmax(0,1.4fr) auto;
        gap:8px;
        align-items:center;
        box-shadow:0 4px 10px rgba(15,23,42,0.06);
		display:grid;
		grid-template-columns: minmax(0,1fr) 120px;
		align-items: start; /* <— mantiene el QR alineado con todos */
    }
    @media(max-width:780px){
		.place-list{
			grid-template-columns:1fr; /* en celular vuelve a 1 columna */
		}
	}
    .place-main{
        display:flex;
        flex-direction:column;
        gap:3px;
    }
    .place-title-row{
        display:flex;
        align-items:center;
        gap:6px;
        flex-wrap:wrap;
    }
    .place-dot{
        width:10px;
        height:10px;
        border-radius:999px;
        background:linear-gradient(135deg,#22c55e,#a3e635);
    }
    .place-name{
        font-size:.9rem;
        font-weight:600;
        color:#111827;
    }
    .place-desc{
        font-size:.78rem;
        color:var(--text-soft);
    }
    .place-meta{
        font-size:.75rem;
        color:#6b7280;
    }
    .place-meta span{
        font-weight:600;
        color:#16a34a;
    }
    .coords{
        font-family:ui-monospace,Menlo,Monaco,"Courier New",monospace;
        font-size:.74rem;
        color:#9ca3af;
    }
    .qr-box{
		display:flex;
		width:125px;
		height:125px;
		flex-direction:column;
		align-items:center;
		justify-content:flex-start; /* mantiene la imagen arriba */
	}
    
	.qr-box img{
		width:100%;
		height:100%;
		max-width:100%;
		max-height:100%;
		border-radius:12px;
		border:1px solid #e5e7eb;
		background:#f9fafb;
		display:block;
	}
    .qr-label{
        font-weight:600;
        color:#2563eb;
    }

    .footer{
        margin-top:18px;
        text-align:center;
        font-size:.85rem;
        color:#6b7280;
    }
    .footer span{
        color:#22c55e;
        font-weight:600;
    }
	
	/* ===== ESTILOS PARA IMPRESIÓN EN PDF (TAMAÑO CARTA) ===== */
@page {
    size: letter; /* puedes cambiar a "letter" si tu impresora lo maneja mejor */
    margin: 15mm;
}

@media print {
    body {
        background: #ffffff !important;
    }

    .wrap {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .panel {
        box-shadow: none !important;
        border-radius: 0;
        border: none;
        padding: 10mm 8mm 12mm;
    }

    /* Opcional: reducir un poquito las fuentes para que quepa todo mejor */
    .title {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }


    .coords,
    .place-meta {
        font-size: 0.7rem;
    }

	
	/* Caja de foto en lugar del QR */
	.photo-box {
		text-align: center;
		font-size: 0.72rem;
		color: #4b5563;
	}

	.photo-box img {
		width: 80px;
		height: 80px;
		border-radius: 12px;
		border: 1px solid #e5e7eb;
		object-fit: cover;
		display: block;
		margin: 0 auto 4px;
		background: #f9fafb;
	}

	.photo-label {
		font-weight: 600;
		color: #2563eb;
	}
}
.place-card.inicio {
    border:2px solid #22c55e;
    background: #f0fdf4;
}
.place-card.inicio .place-name{
    font-size:1.15rem;
    color:#166534;
	font-size: 0.8rem;
}
.place-card.inicio::before{
    content:"🏠";
    font-size:2.2rem;
    position:absolute;
    left:14px;
    top:14px;
}


/* Modal de fotos */
.foto-modal{
    position:fixed;
    top:0; left:0;
    width:100vw; height:100vh;
    background:rgba(0,0,0,0.65);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.foto-modal-content{
    background:#ffffff;
    padding:20px;
    border-radius:16px;
    width:90%;
    max-width:800px;
    max-height:90vh;
    overflow-y:auto;
    box-shadow:0 12px 30px rgba(0,0,0,0.35);
    animation:modalIn .3s ease;
}

@keyframes modalIn{
    from{opacity:0; transform:scale(.9);}
    to{opacity:1; transform:scale(1);}
}

.foto-modal-close{
    font-size:28px;
    cursor:pointer;
    float:right;
}

.foto-grid{
    margin-top:12px;
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:14px;
}

.foto-grid img{
    width:100%;
    height:250px;
    object-fit:cover;
    border-radius:10px;
}


.map-btn {
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
}

.map-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}
.map-all-section {
    margin-top: 40px;
    padding: 20px 0;
}

.map-all-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.map-all-note {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 12px;
}

.map-all {
    width: 100%;
    height: 450px;
    min-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

@media (max-width: 600px) {
    .map-all {
        height: 360px;
    }
}

/* ícono especial divIcon para el origen */
.origen-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff0000;
    border: 4px solid #ffffff;
    box-shadow: 0px 0px 8px rgba(0,0,0,.6);
}

.origen-label {
    font-size: 0.9rem;
    background: rgba(255,255,255,0.9);
    padding: 3px 6px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,.35);
    text-align: center;
}

.picture-btn {
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.9rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #16a34a;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
}

.picture-btn:hover {
    background: #12863d;
    transform: translateY(-1px);
}


.map-emoji {
    font-size: 22px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 8px rgba(0,0,0,.45);
    user-select: none;
}

.map-emoji:active {
    transform: scale(0.92);
}


.map-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.map-filter label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid #e5e7eb;
}

.map-filter input[type="checkbox"] {
    accent-color: #2563eb;
    cursor: pointer;
}

.leaflet-routing-container {
    display: none;
}