.hist-timeline-wrap {
	margin: 1rem 0;
}

.hist-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-bottom: 0.75rem;
}

.hist-count {
	font-size: 0.9rem;
	color: #555;
}

/* Gespeicherte Ansichten */
.hist-presets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.6rem;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.hist-presets:empty {
	display: none;
}

.hist-presets-label {
	color: #555;
}

.hist-presets select {
	max-width: 100%;
	padding: 0.25rem 0.5rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 0.9rem;
}

/* Filterzeilen */
.hist-filter {
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
}

.hist-frow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.6rem;
	padding: 0.5rem 0.75rem;
	margin-bottom: 0.5rem;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	background: #fafafa;
}

.hist-frow-label {
	color: #555;
}

.hist-frow select {
	padding: 0.25rem 0.5rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 0.9rem;
}

.hist-frow-toggle {
	margin-left: auto;
	padding: 0.2rem 0.6rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

.hist-frow-toggle:hover {
	background: #f0f0f0;
}

.hist-frow.is-hidden {
	opacity: 0.55;
	background: #f3f3f3;
}

.hist-frow.is-hidden .hist-swatch {
	background-image: repeating-linear-gradient(45deg, transparent 0 2px, rgba(255, 255, 255, 0.7) 2px 4px);
}

.hist-frow-remove {
	padding: 0.1rem 0.5rem;
	border: 1px solid transparent;
	border-radius: 4px;
	background: none;
	color: #777;
	font: inherit;
	cursor: pointer;
}

.hist-frow-remove:hover {
	border-color: #bbb;
	color: #222;
}

.hist-swatch {
	display: inline-block;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	background: #bbb;
}

.hist-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	flex-basis: 100%;
	padding-top: 0.35rem;
	border-top: 1px dashed #e2e2e2;
}

.hist-tags-label {
	margin-right: 0.25rem;
	color: #555;
}

.hist-tag-search {
	padding: 0.2rem 0.5rem;
	border: 1px solid #bbb;
	border-radius: 999px;
	font: inherit;
	font-size: 0.85rem;
	width: 12rem;
}

.hist-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	flex-basis: 100%;
	max-height: 5.5rem;
	overflow-y: auto;
	padding: 0.2rem 0;
}

.hist-chip {
	padding: 0.15rem 0.65rem;
	border: 1px solid #bbb;
	border-radius: 999px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.85rem;
	line-height: 1.3;
	cursor: pointer;
}

.hist-chip:hover {
	border-color: #555;
}

.hist-chip.is-active {
	border-color: #333;
	background: #333;
	color: #fff;
}

.hist-chip.is-active::after {
	content: ' ✕';
	opacity: 0.7;
}

.hist-factions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hist-fbtn {
	padding: 0.3rem 0.7rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.hist-fbtn:hover {
	background: #f0f0f0;
}

.hist-fbtn-reset {
	color: #777;
}

.hist-controls {
	display: flex;
	gap: 0.35rem;
}

.hist-controls button {
	padding: 0.3rem 0.7rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	line-height: 1.2;
	cursor: pointer;
}

.hist-controls button:hover {
	background: #f0f0f0;
}

#hist-timeline {
	min-height: 300px;
	border-radius: 6px;
	background: #fff;
}

#hist-timeline .vis-item {
	cursor: pointer;
	font-size: 0.85rem;
}

#hist-timeline .vis-item.vis-range .vis-item-content {
	padding: 2px 6px;
}

#hist-timeline .vis-time-axis .vis-text {
	color: #444;
}

#hist-timeline .vis-time-axis .vis-text.vis-major {
	font-weight: 600;
}

/* Temperaturkurven */
.hist-controls [data-hist="climate"][aria-pressed="true"] {
	background: #333;
	border-color: #333;
	color: #fff;
}

.hist-climate {
	margin-top: 0.4rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	overflow: hidden;
}

.hist-climate-graph {
	height: 150px;
}

.hist-climate-graph .vis-timeline {
	border: 0;
}

.hist-climate-graph .vis-time-axis .vis-grid.vis-minor,
.hist-climate-graph .vis-time-axis .vis-grid.vis-major {
	border-color: #eee;
}

.hist-climate-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 1.25rem;
	padding: 0.5rem 0.75rem;
	border-top: 1px solid #eee;
	font-size: 0.85rem;
	color: #444;
}

.hist-climate-series {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
}

.hist-climate-swatch {
	display: inline-block;
	width: 1.1rem;
	height: 3px;
	border-radius: 2px;
}

.hist-climate-readout {
	flex-basis: 100%;
	font-variant-numeric: tabular-nums;
}

.hist-climate-sources {
	flex-basis: 100%;
	margin: 0;
	font-size: 0.78rem;
	color: #777;
}

.hist-detail {
	margin-top: 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fafafa;
}

.hist-detail::after {
	content: '';
	display: block;
	clear: both;
}

.hist-detail h3 {
	margin: 0 0 0.25rem;
}

.hist-detail .hist-date {
	margin: 0 0 0.5rem;
	font-weight: 600;
}

.hist-detail .hist-meta {
	margin: 0 0 0.5rem;
	font-size: 0.9rem;
	color: #555;
}

.hist-detail .hist-excerpt {
	margin: 0 0 0.5rem;
}

.hist-detail .hist-thumb {
	float: right;
	max-width: 160px;
	height: auto;
	margin: 0 0 0.5rem 1rem;
	border-radius: 4px;
}

.hist-detail .hist-links {
	display: flex;
	gap: 1.25rem;
	margin: 0;
}

.hist-detail .hist-map {
	clear: both;
	height: 260px;
	margin-top: 0.75rem;
	border-radius: 4px;
	z-index: 0;
}

.hist-empty {
	margin-top: 1rem;
	color: #666;
}
