.wmi-catalog,
.wmi-detail {
	--wmi-teal: #1f6fb2;
	--wmi-teal-light: #3b86c9;
	--wmi-gold: #c9a35c;
	--wmi-gold-light: #e2c483;
	--wmi-parchment: #fcfcfc;
	--wmi-parchment-dark: #e5e1d6;
	--wmi-panel: #faf7f0;
	--wmi-ink: #262421;

	--wmi-rarity-common: #2a2420;
	--wmi-rarity-uncommon: #1e8449;
	--wmi-rarity-rare: #2e6fd6;
	--wmi-rarity-very-rare: #8b3fd1;
	--wmi-rarity-legendary: #d9822b;
	--wmi-rarity-artifact: #8a4b28;

	max-width: 1100px;
	margin: 0 auto;
	background-color: var(--wmi-parchment);
	color: var(--wmi-ink);
	font-family: Georgia, 'Times New Roman', serif;
	box-sizing: border-box;
}

.wmi-catalog *,
.wmi-detail * {
	box-sizing: border-box;
}

.wmi-rarity-common { color: var(--wmi-rarity-common); }
.wmi-rarity-uncommon { color: var(--wmi-rarity-uncommon); }
.wmi-rarity-rare { color: var(--wmi-rarity-rare); }
.wmi-rarity-very-rare { color: var(--wmi-rarity-very-rare); }
.wmi-rarity-legendary { color: var(--wmi-rarity-legendary); }
.wmi-rarity-artifact { color: var(--wmi-rarity-artifact); }

.wmi-catalog {
	padding: 16px;
}

/* Icon-Filterzeile */
.wmi-icon-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: space-between;
	background: var(--wmi-panel);
	border: 1px solid var(--wmi-parchment-dark);
	border-radius: 10px;
	padding: 14px 10px;
	margin-bottom: 16px;
}

.wmi-icon-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1 1 0;
	gap: 6px;
	min-width: 96px;
	background: transparent;
	border: none;
	color: var(--wmi-ink);
	cursor: pointer;
	padding: 8px 4px;
	border-radius: 8px;
	transition: background 0.15s ease;
}

.wmi-icon-circle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wmi-icon-circle-sm {
	width: 30px;
	height: 30px;
}

.wmi-icon-circle svg,
.wmi-icon-circle img.wmi-icon-img {
	width: 60%;
	height: 60%;
	object-fit: contain;
}

.wmi-icon-all { background: #dce8f7; color: #2b5f92; }
.wmi-icon-armor { background: #d7e6f2; color: #35637f; }
.wmi-icon-potion { background: #dcefe0; color: #3e7d55; }
.wmi-icon-ring { background: #faf1c7; color: #8a7326; }
.wmi-icon-rod { background: #fbdfe3; color: #a24d5b; }
.wmi-icon-scroll { background: #ecdfc3; color: #7a5f2c; }
.wmi-icon-staff { background: #d3f0f0; color: #2c7676; }
.wmi-icon-wand { background: #e8dcf5; color: #6b3fa0; }
.wmi-icon-weapon { background: #f6ddc7; color: #a85a24; }
.wmi-icon-wondrous-item { background: #dde3e5; color: #52616a; }

.wmi-icon-label {
	display: block;
	width: 100%;
	font-size: 10px;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-align: center;
	word-break: normal;
	overflow-wrap: break-word;
}

.wmi-icon-btn:hover {
	background: rgba(31, 111, 178, 0.08);
}

.wmi-icon-btn.is-active {
	background: #f2e9d2;
}

.wmi-icon-btn.is-active .wmi-icon-circle {
	box-shadow: 0 0 0 3px var(--wmi-teal);
}

/* Filterleiste */
.wmi-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
	background: var(--wmi-panel);
	border: 1px solid var(--wmi-parchment-dark);
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 20px;
}

.wmi-filter-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}

.wmi-filter-field label {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 11px;
	color: var(--wmi-ink);
}

.wmi-filter-field input[type="text"],
.wmi-filter-field select {
	border: 1px solid var(--wmi-parchment-dark);
	background: #fff;
	border-radius: 4px;
	padding: 7px 10px;
	font-family: inherit;
	min-width: 160px;
}

.wmi-bonus-toggle {
	display: flex;
	gap: 4px;
}

.wmi-bonus-btn {
	border: 1px solid var(--wmi-teal);
	background: #fff;
	color: var(--wmi-teal);
	border-radius: 4px;
	padding: 6px 10px;
	cursor: pointer;
	font-weight: 700;
}

.wmi-bonus-btn.is-active {
	background: var(--wmi-teal);
	color: #fff;
}

.wmi-filter-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

.wmi-btn {
	display: inline-block;
	border: none;
	border-radius: 4px;
	padding: 10px 18px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

.wmi-btn-primary {
	background: var(--wmi-teal);
	color: #fff;
}

.wmi-btn-primary:hover {
	background: var(--wmi-teal-light);
	color: #fff;
}

.wmi-reset-link {
	color: var(--wmi-teal);
	font-size: 13px;
	text-decoration: underline;
}

/* Ergebnistabelle */
.wmi-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wmi-table {
	width: 100%;
	min-width: 620px;
	border-collapse: separate;
	border-spacing: 0 6px;
}

.wmi-table thead th {
	text-align: left;
	padding: 6px 12px 10px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wmi-ink);
	border-bottom: 2px solid var(--wmi-teal);
}

.wmi-table th.wmi-sortable {
	cursor: pointer;
	user-select: none;
}

.wmi-table th.wmi-sortable::after {
	content: '\2195';
	margin-left: 4px;
	opacity: 0.5;
}

.wmi-table td {
	padding: 10px 12px;
	background: #fff;
	border-top: 1px solid var(--wmi-parchment-dark);
	border-bottom: 1px solid var(--wmi-parchment-dark);
	vertical-align: middle;
}

.wmi-table td:first-child {
	border-left: 1px solid var(--wmi-parchment-dark);
	border-top-left-radius: 8px;
	border-bottom-left-radius: 8px;
}

.wmi-table td:last-child {
	border-right: 1px solid var(--wmi-parchment-dark);
	border-top-right-radius: 8px;
	border-bottom-right-radius: 8px;
}

.wmi-row {
	cursor: pointer;
}

.wmi-row:hover td {
	background: rgba(31, 111, 178, 0.05);
}

.wmi-row-icon-cell {
	width: 40px;
}

.wmi-row-thumb {
	display: inline-block;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid var(--wmi-parchment-dark);
}

.wmi-row-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wmi-item-link {
	font-weight: 700;
	text-decoration: none;
}

.wmi-item-link:hover {
	text-decoration: underline;
}

.wmi-item-rarity-label {
	font-size: 11px;
	color: #777;
}

.wmi-expand-cell {
	width: 28px;
}

.wmi-expand-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 22px;
	height: 22px;
	min-width: 22px;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 1px solid var(--wmi-teal);
	background: #fff;
	color: var(--wmi-teal);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	pointer-events: none;
}

.wmi-expand-toggle.is-open {
	background: var(--wmi-teal);
	color: #fff;
}

.wmi-expanded-row td {
	background: rgba(31, 111, 178, 0.04);
	border-top: none;
}

.wmi-preview {
	padding: 6px 4px 4px;
}

.wmi-preview-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.wmi-preview-title-block {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wmi-preview-title {
	font-size: 20px;
	font-weight: 700;
}

.wmi-preview-text {
	margin: 0 0 10px;
	line-height: 1.6;
}

.wmi-preview-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.wmi-preview-footer .wmi-source {
	margin-top: 0;
}

.wmi-empty-row td {
	text-align: center;
	color: #777;
	padding: 24px;
}

.wmi-empty-row a {
	color: var(--wmi-teal);
}

.wmi-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
}

.wmi-page-btn {
	background: #fff;
	border: 1px solid var(--wmi-teal);
	color: var(--wmi-teal);
}

.wmi-page-btn:hover:not(:disabled) {
	background: var(--wmi-teal);
	color: #fff;
}

.wmi-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.wmi-page-status {
	font-size: 13px;
	color: #555;
}

/* Tag-Pills */
.wmi-tag-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0;
}

.wmi-tag-pill {
	background: var(--wmi-teal);
	color: #fff;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Detailseite */
.wmi-detail {
	padding: 24px 16px 48px;
}

.wmi-breadcrumb {
	font-size: 13px;
	color: #777;
	margin-bottom: 16px;
}

.wmi-breadcrumb a {
	color: var(--wmi-teal);
	text-decoration: none;
}

.wmi-breadcrumb-sep {
	margin: 0 6px;
}

.wmi-detail-layout {
	display: flex;
	gap: 32px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.wmi-detail-main {
	flex: 1 1 480px;
	min-width: 280px;
}

.wmi-detail-image {
	flex: 0 0 320px;
	max-width: 320px;
}

.wmi-detail-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	border: 1px solid var(--wmi-parchment-dark);
}

.wmi-no-image {
	background: #f5f5f5;
	border: 1px dashed var(--wmi-parchment-dark);
	border-radius: 8px;
	padding: 60px 20px;
	text-align: center;
	color: #999;
}

.wmi-detail-title {
	font-size: 32px;
	margin: 0 0 4px;
}

.wmi-detail-subtitle {
	font-style: italic;
	margin: 0 0 12px;
	color: #555;
}

.wmi-divider {
	border: none;
	border-top: 2px solid var(--wmi-teal);
	margin: 16px 0;
}

.wmi-detail-content {
	line-height: 1.7;
}

.wmi-attunement-note {
	background: rgba(201, 163, 92, 0.12);
	border-left: 3px solid var(--wmi-gold);
	padding: 8px 12px;
	margin: 16px 0;
}

.wmi-source {
	text-align: right;
	color: #777;
	margin-top: 24px;
}

/* Mobil */
@media (max-width: 782px) {
	.wmi-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.wmi-filter-field input[type="text"],
	.wmi-filter-field select {
		min-width: 0;
		width: 100%;
	}

	.wmi-filter-actions {
		margin-left: 0;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.wmi-filter-actions .wmi-reset-link {
		text-align: center;
	}

	.wmi-icon-circle {
		width: 44px;
		height: 44px;
	}

	.wmi-icon-btn {
		min-width: 76px;
	}

	.wmi-detail-image {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.wmi-detail-title {
		font-size: 26px;
	}
}

@media (max-width: 480px) {
	.wmi-catalog,
	.wmi-detail {
		padding: 12px;
	}

	.wmi-detail-layout {
		gap: 20px;
	}
}
