/* =========================================================================
 * Calendario «mejor época para viajar a Sudamérica» — solo lo propio.
 * Vista «Por mes» (data-vista="mes", la pone el JS): filas por zona agrupadas
 * por país, desplegables. Rejilla del año: sin JS o data-vista="anio".
 * Estado con dos códigos: color + icono (✓ bien, ~ regular, ✕ evitar).
 * ========================================================================= */

.rvh[data-rvh="calendario"] {
	--cal-b: #E4F0DA;
	--cal-b-ink: #3F6B2A;
	--cal-r: #FAEBCC;
	--cal-r-ink: #8A5512;
	--cal-e: #F7DDD5;
	--cal-e-ink: #A3361D;
	--cal-e-rayas: repeating-linear-gradient(135deg, #F3D2C7 0 3px, #FBEDE8 3px 8px);
	--cal-i-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233F6B2A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	--cal-i-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A5512' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M4 13.5c2.6-4 5.4-4 8 0s5.4 4 8 0'/%3E%3C/svg%3E");
	--cal-i-e: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3361D' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
	--cal-col1: 12.5rem;
}
.rvh[data-rvh="calendario"] .rvh__body { gap: var(--rv-space-5); }
.rvh[data-rvh="calendario"]:not(.is-js) .rvh-cal__ctrl { display: none; }

/* Texto solo para lectores de pantalla */
.rvh-cal__sr,
.rvh[data-rvh="calendario"] .rvh-cal__mes,
.rvh[data-rvh="calendario"] .rvh-cal__k,
.rvh[data-rvh="calendario"] .rvh-cal__est {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Marca de estado: color + icono ---------- */
.rvh-cal__mk {
	flex: 0 0 auto;
	display: inline-block;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	vertical-align: -6px;
	background: var(--cal-i-b) center / 15px 15px no-repeat, var(--cal-b);
	box-shadow: inset 0 0 0 1.5px var(--cal-b-ink);
}
.rvh-cal__mk[data-s="r"] { background: var(--cal-i-r) center / 15px 15px no-repeat, var(--cal-r); box-shadow: none; border: 1.5px dashed var(--cal-r-ink); }
.rvh-cal__mk[data-s="e"] { background: var(--cal-i-e) center / 15px 15px no-repeat, var(--cal-e-rayas); box-shadow: inset 0 0 0 1.5px var(--cal-e-ink); }

/* ---------- Controles ---------- */
.rvh-cal__ctrl { display: grid; gap: var(--rv-space-5); }
.rvh[data-rvh="calendario"] .rvh-cal__meses-btn {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	justify-self: stretch;
}
.rvh[data-rvh="calendario"] .rvh-cal__meses-btn .rvh-seg__btn { min-width: 0; min-height: 48px; padding: 0 2px; }
.rvh-cal__donde { gap: var(--rv-space-2); }
.rvh-cal__buscar { align-items: center; }
.rvh-cal__lupa { flex: 0 0 auto; width: 20px; height: 20px; margin-left: var(--rv-space-4); color: var(--rv-muted); }
.rvh.rvh .rvh-cal__buscar input { padding-left: var(--rv-space-3); font-size: var(--rv-text-base); min-height: 46px; }
.rvh .rvh-cal__buscar input::placeholder { color: #6F7A86; opacity: 1; }
.rvh-cal__donde .rvh-chips { margin-top: 2px; }
@media (max-width: 640px) {
	.rvh[data-rvh="calendario"] .rvh-cal__meses-btn { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	/* Países en una sola fila que se desliza */
	.rvh[data-rvh="calendario"] .rvh-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 calc(-1 * var(--rvh-gap));
		padding: 2px var(--rvh-gap);
		scrollbar-width: none;
	}
	.rvh[data-rvh="calendario"] .rvh-chips::-webkit-scrollbar { display: none; }
	.rvh[data-rvh="calendario"] .rvh-chip { flex: 0 0 auto; }
	.rvh[data-rvh="calendario"] [data-k="imprimir"] { display: none; }
	.rvh[data-rvh="calendario"] .rvh-cal__barra .rvh-seg { display: flex; width: 100%; }
	.rvh[data-rvh="calendario"] .rvh-cal__barra .rvh-seg__btn { flex: 1 1 0; }
}
.rvh-cal__barra {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rv-space-3);
	justify-content: space-between;
	align-items: center;
}

/* ---------- Resumen, vacío y leyenda ---------- */
.rvh-cal__res { display: grid; gap: var(--rv-space-4); min-width: 0; }
.rvh-cal__resumen {
	margin: 0;
	font-size: var(--rv-text-base);
	font-weight: 600;
	line-height: 1.6;
	color: var(--rv-ink);
	text-wrap: pretty;
}
.rvh-cal__resumen .rvh-cal__mk { width: 18px; height: 18px; border-radius: 5px; margin: 0 4px 0 2px; vertical-align: -3px; background-size: 12px 12px, auto; }
.rvh-cal__vacio {
	display: grid;
	justify-items: start;
	gap: var(--rv-space-3);
	padding: var(--rv-space-5);
	background: var(--rv-bg-soft);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
}
.rvh-cal__vacio p { margin: 0; font-size: var(--rv-text-sm); line-height: 1.5; color: var(--rv-text); text-wrap: pretty; }
.rvh-cal__leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rv-space-2) var(--rv-space-5);
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--rv-text-xs);
	color: var(--rv-muted);
}
.rvh-cal__leyenda li { display: flex; align-items: center; gap: var(--rv-space-2); margin: 0; }
.rvh-cal__leyenda .rvh-cal__mk { width: 18px; height: 18px; border-radius: 5px; background-size: 12px 12px, auto; }

/* Número de aviso (rejilla y leyenda) */
.rvh-cal__ref {
	display: inline-grid;
	place-items: center;
	min-width: 16px;
	height: 16px;
	padding: 0 3px;
	border-radius: 8px;
	background: var(--rv-ink);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

/* ---------- Vista por mes: filas por zona, agrupadas por país ---------- */
.rvh-cal__grupos {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
	gap: var(--rv-space-5);
	align-items: start;
}
.rvh-cal__pila { display: grid; gap: var(--rv-space-5); min-width: 0; }
.rvh-cal__pila:not(:has(> .rvh-cal__grupo:not([hidden]))) { display: none; }
.rvh-cal__grupo {
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: #fff;
	box-shadow: var(--rv-shadow-xs);
	overflow: clip;
}
.rvh .rvh-cal__gtit {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 2px var(--rv-space-2);
	margin: 0;
	padding: var(--rv-space-3) var(--rv-space-4);
	background: var(--rv-bg-soft);
	border-bottom: 1px solid var(--rv-line);
	font-family: var(--rv-font-sans);
	font-size: var(--rv-text-base);
	font-weight: 700;
	line-height: 1.3;
	color: var(--rv-ink);
}
.rvh-cal__gnum { font-size: var(--rv-text-xs); font-weight: 500; color: var(--rv-muted); }

.rvh[data-vista="mes"] .rvh-cal__reg { display: block; margin: 0; }
.rvh[data-vista="mes"] .rvh-cal__reg[hidden] { display: none; }
.rvh[data-vista="mes"] .rvh-cal__glist > .rvh-cal__reg:not([hidden]) ~ .rvh-cal__reg:not([hidden]) { border-top: 1px solid var(--rv-line); }
.rvh .rvh-cal__nom {
	margin: 0;
	font-family: var(--rv-font-sans);
	font-size: var(--rv-text-sm);
	font-weight: 700;
	line-height: var(--rv-leading-snug);
	color: var(--rv-ink);
	text-wrap: pretty;
}
.rvh-cal__meses, .rvh-cal__avisos, .rvh-cal__notas ol { margin: 0; padding: 0; list-style: none; }
.rvh-cal__sta { margin: 2px 0 0; font-size: 0.6875rem; color: var(--rv-muted); line-height: 1.3; }

/* La fila (botón) solo existe con JS y solo se ve en la vista por mes */
.rvh .rvh-cal__fila { display: none; }
.rvh[data-vista="mes"] .rvh-cal__nomtxt,
.rvh[data-vista="mes"] .rvh-cal__sta { display: none; }
.rvh.rvh[data-vista="mes"] .rvh-cal__fila {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr) auto 16px;
	align-items: center;
	gap: var(--rv-space-3);
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 6px var(--rv-space-4);
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: var(--rv-ink);
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: background var(--rv-duration) var(--rv-ease);
}
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-cal__fila:hover { background: var(--rv-bg-soft); color: var(--rv-ink) !important; }
}
.rvh.rvh .rvh-cal__fila:active { background: var(--rv-bg-soft); }
.rvh .rvh-cal__fila:focus-visible { outline-offset: -2px; }
.rvh-cal__fn { display: grid; gap: 1px; min-width: 0; }
.rvh-cal__fnom { font-size: var(--rv-text-sm); font-weight: 600; line-height: 1.3; color: var(--rv-ink); text-wrap: pretty; }
.rvh-cal__fav { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--cal-r-ink); }
.rvh-cal__fav::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3 2 20h20z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3 2 20h20z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.rvh-cal__fav[hidden] { display: none; }
.rvh-cal__fd { display: grid; justify-items: end; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rvh-cal__ft b { font-family: var(--rv-font-serif); font-size: var(--rv-text-lg); font-weight: 700; line-height: 1.1; color: var(--rv-ink); }
.rvh-cal__ftn { margin-left: 3px; font-size: var(--rv-text-xs); color: var(--rv-muted); }
.rvh-cal__ftn::before { content: "/ "; }
.rvh-cal__fll { font-size: 0.75rem; color: var(--rv-text); }
.rvh-cal__fll::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 9px;
	margin-right: 4px;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	background: #7FA6BC;
	vertical-align: -1px;
}
.rvh-cal__chev { width: 9px; height: 9px; justify-self: center; border-right: 2px solid var(--rv-muted); border-bottom: 2px solid var(--rv-muted); transform: rotate(45deg) translateY(-2px); transition: transform var(--rv-duration) var(--rv-ease); }
.rvh-cal__reg.is-open .rvh-cal__chev { transform: rotate(-135deg) translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .rvh-cal__chev, .rvh.rvh[data-vista="mes"] .rvh-cal__fila { transition: none; } }

/* Desplegado: los 12 meses, todos los avisos, mejor época y estación */
.rvh[data-vista="mes"] .rvh-cal__meses,
.rvh[data-vista="mes"] .rvh-cal__det { display: none; }
.rvh[data-vista="mes"] .rvh-cal__reg.is-open { background: #FCFBF8; }
.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__fila { background: #FCFBF8; }
.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__meses {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px;
	padding: 0 var(--rv-space-4) var(--rv-space-3);
}
@media (min-width: 480px) and (max-width: 859px), (min-width: 1100px) {
	.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__meses { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.rvh[data-vista="mes"] .rvh-cal__m {
	position: relative;
	display: grid;
	justify-items: center;
	align-content: start;
	gap: 1px;
	margin: 0;
	padding: 22px 2px 5px;
	border-radius: var(--rv-radius-sm);
	background: var(--cal-b);
	font-size: 0.75rem;
	line-height: 1.25;
	text-align: center;
	color: var(--rv-ink);
	font-variant-numeric: tabular-nums;
}
.rvh[data-vista="mes"] .rvh-cal__m[data-s="r"] { background: var(--cal-r); }
.rvh[data-vista="mes"] .rvh-cal__m[data-s="e"] { background: var(--cal-e-rayas); }
.rvh[data-vista="mes"] .rvh-cal__m::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 5px;
	width: 13px;
	height: 13px;
	background: var(--cal-i-b) center / contain no-repeat;
}
.rvh[data-vista="mes"] .rvh-cal__m[data-s="r"]::before { background-image: var(--cal-i-r); }
.rvh[data-vista="mes"] .rvh-cal__m[data-s="e"]::before { background-image: var(--cal-i-e); }
.rvh[data-vista="mes"] .rvh-cal__m.is-on { box-shadow: inset 0 0 0 2px var(--rv-ink); }
.rvh-cal__mc { font-weight: 700; }
.rvh[data-vista="mes"] .rvh-cal__mc { position: absolute; top: 4px; right: 6px; font-size: 0.6875rem; }
.rvh[data-vista="mes"] .rvh-cal__t { display: block; white-space: nowrap; }
.rvh[data-vista="mes"] .rvh-cal__tx { font-weight: 700; }
.rvh[data-vista="mes"] .rvh-cal__tn { color: #55606C; }
.rvh[data-vista="mes"] .rvh-cal__tn::before { content: "/"; }
.rvh[data-vista="mes"] .rvh-cal__ll { color: #55606C; white-space: nowrap; }
.rvh[data-vista="mes"] .rvh-cal__por,
.rvh[data-vista="mes"] .rvh-cal__ref { display: none; }

.rvh[data-vista="mes"] .rvh-cal__avisos { display: grid; gap: var(--rv-space-2); padding: 0 var(--rv-space-4) var(--rv-space-3); }
.rvh[data-vista="mes"] .rvh-cal__reg:not(.is-open) .rvh-cal__avisos:not(:has(.is-on)) { display: none; }
.rvh-cal__aviso {
	display: none;
	gap: var(--rv-space-2);
	align-items: flex-start;
	margin: 0;
	padding: var(--rv-space-2) var(--rv-space-3);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius-sm);
	background: #F5F7FA;
	font-size: var(--rv-text-xs);
	line-height: 1.45;
	text-wrap: pretty;
}
.rvh-cal__aviso--alerta { background: #FBF5EE; border-color: #EEDFCB; }
.rvh[data-vista="mes"] .rvh-cal__aviso.is-on,
.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__aviso { display: flex; }
.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__aviso:not(.is-on) { opacity: 0.85; background: #fff; }
.rvh-cal__aviso b { color: var(--rv-ink); }
.rvh-cal__aviso svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 1px; color: var(--rv-muted); }
.rvh-cal__aviso--alerta svg { color: var(--cal-r-ink); }
.rvh-cal__aviso a, .rvh-cal__notas a { color: var(--rv-muted); }
.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__det { display: grid; gap: var(--rv-space-1); padding: 0 var(--rv-space-4) var(--rv-space-4); }
.rvh-cal__mejor { margin: 0; font-size: var(--rv-text-sm); font-weight: 600; line-height: 1.45; color: var(--rv-ink); text-wrap: pretty; }
.rvh-cal__fuente { margin: 0; font-size: 0.75rem; color: var(--rv-muted); line-height: 1.4; text-wrap: pretty; }

/* ---------- Rejilla del año (sin JS o «Todo el año») ---------- */
.rvh-cal__rejilla {
	max-height: min(72vh, 46rem);
	overflow: auto;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}
.rvh .rvh-cal__rejilla:focus-visible { outline: 2px solid var(--rv-ink); outline-offset: 2px; }
.rvh-cal__tabla { min-width: calc(var(--cal-col1) + 12 * 3.5rem); }
.rvh-cal__hrow,
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__reg {
	display: grid;
	grid-template-columns: var(--cal-col1) repeat(12, minmax(3.5rem, 1fr));
}
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__reg[hidden] { display: none; }
/* Cabecera de meses fija al deslizar en vertical */
.rvh-cal__hrow { position: sticky; top: 0; z-index: 3; }
.rvh-cal__hrow span {
	padding: var(--rv-space-2) 2px;
	background: var(--rv-bg-soft);
	font-size: var(--rv-text-xs);
	font-weight: 600;
	color: var(--rv-ink);
	text-align: center;
	border-bottom: 1px solid var(--rv-line);
}
.rvh-cal__hrow span.is-on { background: var(--rv-ink); color: #fff; }
.rvh-cal__hrow span:first-child {
	position: sticky;
	left: 0;
	z-index: 1;
	text-align: left;
	padding-left: var(--rv-space-3);
	border-right: 1px solid var(--rv-line);
}
/* Título de país dentro de la rejilla */
.rvh .rvh-cal__sep {
	margin: 0;
	padding: 6px var(--rv-space-3);
	background: #F4F1EC;
	border-top: 1px solid var(--rv-line);
	font-family: var(--rv-font-sans);
	font-size: var(--rv-text-xs);
	font-weight: 700;
	line-height: 1.3;
	color: var(--rv-ink);
}
.rvh-cal__sep span { position: sticky; left: var(--rv-space-3); }
.rvh-cal__hrow + .rvh-cal__sep { border-top: 0; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__reg { border-top: 1px solid var(--rv-line); }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__cab {
	position: sticky;
	left: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--rv-space-2) var(--rv-space-3);
	background: #fff;
	border-right: 1px solid var(--rv-line);
	min-width: 0;
}
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__nom { font-size: var(--rv-text-xs); line-height: 1.3; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__meses { display: contents; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 14px 2px 6px;
	min-height: 52px;
	background: var(--cal-b);
	border-left: 1px solid #fff;
	font-size: var(--rv-text-xs);
	line-height: 1.2;
	text-align: center;
	color: var(--rv-ink);
	font-variant-numeric: tabular-nums;
}
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m[data-s="r"] { background: var(--cal-r); }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m[data-s="e"] { background: var(--cal-e-rayas); }
/* Segundo código, además del color: icono arriba a la izquierda */
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m::before {
	content: "";
	position: absolute;
	top: 4px;
	left: 4px;
	width: 11px;
	height: 11px;
	background: var(--cal-i-b) center / contain no-repeat;
}
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m[data-s="r"]::before { background-image: var(--cal-i-r); }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m[data-s="e"]::before { background-image: var(--cal-i-e); }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m.is-on { box-shadow: inset 0 0 0 2px var(--rv-ink); }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m .rvh-cal__ref { position: absolute; top: 3px; right: 3px; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m .rvh-cal__ref:has(+ .rvh-cal__ref) { right: 21px; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__mc { display: none; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__t { display: flex; flex-direction: column; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__tx { font-weight: 700; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__tn { color: #55606C; }
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__ll,
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__por {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__avisos,
.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__det { display: none; }

/* Avisos numerados, debajo de la rejilla */
.rvh-cal__notas { display: grid; gap: var(--rv-space-2); }
.rvh .rvh-cal__ntit { margin: 0; font-family: var(--rv-font-sans); font-size: var(--rv-text-sm); font-weight: 700; color: var(--rv-ink); }
.rvh-cal__notas ol { display: grid; gap: var(--rv-space-2); counter-reset: none; }
.rvh-cal__notas li {
	position: relative;
	margin: 0;
	padding-left: 26px;
	font-size: var(--rv-text-xs);
	line-height: 1.5;
	color: var(--rv-text);
	text-wrap: pretty;
}
.rvh-cal__notas li::before {
	content: attr(value);
	position: absolute;
	left: 0;
	top: 1px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	background: var(--rv-ink);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
}
.rvh-cal__notas b { color: var(--rv-ink); }

@media (max-width: 640px) {
	.rvh[data-rvh="calendario"] { --cal-col1: 8.5rem; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__sta { display: none; }
	.rvh-cal__tabla { min-width: calc(var(--cal-col1) + 12 * 3.1rem); }
	.rvh-cal__hrow,
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__reg { grid-template-columns: var(--cal-col1) repeat(12, minmax(3.1rem, 1fr)); }
	.rvh[data-vista="mes"] .rvh-cal__grupos,
	.rvh[data-vista="mes"] .rvh-cal__pila { gap: var(--rv-space-4); }
	.rvh.rvh[data-vista="mes"] .rvh-cal__fila { padding-inline: var(--rv-space-3); gap: var(--rv-space-2) var(--rv-space-3); }
	.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__meses,
	.rvh[data-vista="mes"] .rvh-cal__avisos,
	.rvh[data-vista="mes"] .rvh-cal__reg.is-open .rvh-cal__det { padding-inline: var(--rv-space-3); }
}

/* ---------- Impresión: la rejilla del año en A4 apaisado, en gris ---------- */
@media print {
	@page { size: A4 landscape; margin: 10mm; }
	.rvh[data-rvh="calendario"] {
		--cal-col1: 46mm;
		--cal-b: #fff;
		--cal-r: #DCDCDC;
		--cal-e-rayas: repeating-linear-gradient(135deg, #9A9A9A 0 1.2mm, #fff 1.2mm 2.4mm);
		--cal-i-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
		--cal-i-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M4 13.5c2.6-4 5.4-4 8 0s5.4 4 8 0'/%3E%3C/svg%3E");
		--cal-i-e: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
		font-size: 8pt;
		box-shadow: none;
	}
	.rvh[data-rvh="calendario"] .rvh__head,
	.rvh[data-rvh="calendario"] .rvh__body { padding: 0 0 3mm; }
	.rvh[data-rvh="calendario"] .rvh-cal__resumen { display: none; }
	.rvh[data-rvh="calendario"] * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.rvh-cal__rejilla { max-height: none; overflow: visible; border-color: #999; }
	.rvh-cal__hrow { position: static; }
	.rvh-cal__tabla { min-width: 0; }
	.rvh-cal__hrow,
	.rvh[data-rvh="calendario"] .rvh-cal__reg { grid-template-columns: var(--cal-col1) repeat(12, 1fr); break-inside: avoid; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m { min-height: 0; padding: 3mm 0 1mm; flex-direction: column; border-left-color: #999; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m[data-s="r"] { outline: 0.3mm dashed #555; outline-offset: -0.6mm; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m::before { width: 2.6mm; height: 2.6mm; top: 0.6mm; left: 0.8mm; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__cab { padding: 1mm 2mm; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__m.is-on { box-shadow: none; }
	.rvh-cal__hrow span.is-on { background: var(--rv-bg-soft); color: var(--rv-ink); }
	.rvh .rvh-cal__sep { background: #EEE; break-after: avoid; }
	.rvh-cal__ref, .rvh-cal__notas li::before { background: #fff; color: #000; box-shadow: inset 0 0 0 0.25mm #000; }
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__ll {
		position: static;
		width: auto; height: auto;
		clip: auto;
		font-size: 6.5pt;
		color: #333;
	}
	.rvh[data-rvh="calendario"]:not([data-vista="mes"]) .rvh-cal__tn { color: #333; }
	.rvh-cal__leyenda { color: #000; }
	.rvh-cal__notas { break-before: auto; }
	.rvh-cal__notas li { font-size: 7.5pt; }
	.rvh-cal__notas a { color: #333; }
	.rvh-cal__notas a::after { content: none; }
}

/* Barra fija en móvil: una sola línea */
.rvh[data-rvh="calendario"] .rvh-mini > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rvh[data-rvh="calendario"] .rvh-mini strong { font-size: var(--rv-text-base); }

/* ================= Vista «Mi ruta» ================= */
.rvh[data-vista="ruta"] .rvh-cal__ctrl > .rvh-field,
.rvh[data-vista="ruta"] [data-k="imprimir"],
.rvh[data-vista="ruta"] .rvh-mini { display: none !important; }
.rvh-cal__ruta[hidden], .rvh-cal__res[hidden] { display: none; }
.rvh-cal__rgrid { display: grid; gap: var(--rvh-gap); margin-top: var(--rv-space-2); }
@media (min-width: 860px) {
	.rvh-cal__rgrid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
.rvh-cal__add { margin-top: var(--rv-space-3); }

.rvh-cal__paradas { display: grid; gap: var(--rv-space-2); margin: 0; padding: 0; list-style: none; }
.rvh-cal__paradas[hidden] { display: none; }
.rvh-cal__parada {
	display: grid;
	gap: var(--rv-space-3);
	padding: var(--rv-space-3) var(--rv-space-4);
	background: #fff;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
}
.rvh-cal__pcab { display: flex; align-items: center; gap: var(--rv-space-3); }
.rvh-cal__pnum {
	flex: 0 0 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--rv-bg-soft);
	color: var(--rv-ink);
	font-size: var(--rv-text-xs);
	font-weight: 700;
}
.rvh-cal__pinfo { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.rvh-cal__pinfo b { color: var(--rv-ink); line-height: 1.3; text-wrap: pretty; }
.rvh-cal__pfechas { font-size: var(--rv-text-sm); color: var(--rv-muted); font-variant-numeric: tabular-nums; }
.rvh-cal__pmks { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.rvh-cal__pmks .rvh-cal__mk { width: 20px; height: 20px; border-radius: 5px; background-size: 13px 13px, auto; }
.rvh-cal__pctrl { display: flex; justify-content: space-between; gap: var(--rv-space-2); }
.rvh-cal__pcab .rvh-cal__pquita { flex: 0 0 44px; border-color: transparent; }
.rvh-cal__dias, .rvh-cal__pmover { display: flex; align-items: center; gap: var(--rv-space-2); }
.rvh-cal__dcaja { flex: 0 0 auto; width: 5.5rem; min-height: 44px; }
.rvh.rvh .rvh-cal__dcaja input { min-height: 42px; padding: 0 0 0 var(--rv-space-3); text-align: center; font-size: var(--rv-text-base); }
.rvh-cal__dcaja .rvh-input__unit { padding-right: var(--rv-space-3); }
.rvh .rvh-cal__pbtn {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: #fff;
	color: var(--rv-ink);
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}
.rvh .rvh-cal__pbtn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) {
	.rvh.rvh.rvh button.rvh-cal__pbtn:not(:disabled):hover { border-color: var(--rv-muted); color: var(--rv-ink) !important; background: var(--rv-bg-soft); }
	.rvh.rvh.rvh button.rvh-cal__rop:hover { background: var(--rv-bg-soft); color: var(--rv-ink) !important; }
}
.rvh-cal__dias .rvh-err { flex-basis: 100%; }
.rvh-cal__parada .rvh-err { margin-top: calc(var(--rv-space-1) * -1); }

.rvh-cal__rsug {
	display: grid;
	gap: 2px;
	padding: var(--rv-space-1);
	border: 1px solid var(--rv-line);
	border-radius: var(--rv-radius);
	background: #fff;
	box-shadow: var(--rv-shadow-xs);
}
.rvh-cal__rsug[hidden] { display: none; }
.rvh .rvh-cal__rop {
	min-height: 44px;
	padding: 0 var(--rv-space-3);
	border: 0;
	border-radius: calc(var(--rv-radius) - 4px);
	background: none;
	color: var(--rv-ink);
	font-size: var(--rv-text-base);
	text-align: left;
	cursor: pointer;
}
.rvh-cal__rnada { margin: 0; padding: var(--rv-space-3); font-size: var(--rv-text-sm); color: var(--rv-muted); }

[data-k="rstats"] dt .rvh-cal__mk { width: 16px; height: 16px; border-radius: 4px; margin-right: 6px; vertical-align: -3px; background-size: 11px 11px, auto; }
.rvh-cal__rmejor { display: grid; gap: var(--rv-space-3); padding: var(--rv-space-3) var(--rv-space-4); background: #fff; border: 1px solid #E9E3D9; border-radius: var(--rv-radius); font-size: var(--rv-text-sm); }
.rvh-cal__rmejor[hidden] { display: none; }
.rvh-cal__rmejor p { margin: 0; line-height: 1.5; }
.rvh-cal__rmejor b { color: var(--rv-ink); }
.rvh-cal__rojo[hidden] { display: none; }
.rvh-cal__rtit { margin: 0 0 var(--rv-space-2); font-size: var(--rv-text-sm); font-weight: 600; color: var(--rv-ink); }
.rvh-cal__rojo ul { display: grid; gap: var(--rv-space-2); margin: 0; padding: 0; list-style: none; }
.rvh-cal__rojo li { display: flex; gap: var(--rv-space-2); align-items: flex-start; font-size: var(--rv-text-sm); line-height: 1.5; }
.rvh-cal__rojo li > .rvh-cal__mk { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px; margin-top: 2px; background-size: 12px 12px, auto; }
.rvh-cal__rojo li > svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
.rvh-cal__rojo li b { color: var(--rv-ink); }
.rvh-cal__raviso.rvh-cal__aviso--alerta > svg { color: var(--cal-e-ink); }

@media (max-width: 640px) {
	.rvh-cal__parada { padding-inline: var(--rv-space-3); }
	.rvh[data-rvh="calendario"] [data-k="rejemplos"] .rvh-chip { flex: 0 0 auto; }
}
@media print {
	.rvh[data-vista="ruta"] .rvh-cal__pctrl .rvh-cal__pmover,
	.rvh[data-vista="ruta"] .rvh-cal__pbtn,
	.rvh[data-vista="ruta"] .rvh-cal__buscar,
	.rvh[data-vista="ruta"] [data-k="rejemplos"] { display: none !important; }
}
