@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
	color-scheme: dark;
	--bg: #0b0f14;
	--panel: #111827;
	--panel-2: #0f172a;
	--surface-1: #0f1623;
	--surface-2: #121c2b;
	--surface-3: #162337;
	--surface-overlay: rgba(15, 23, 42, 0.6);
	--surface-overlay-soft: rgba(15, 23, 42, 0.5);
	--surface-overlay-strong: rgba(15, 23, 42, 0.98);
	--surface-card: rgba(12, 14, 20, 0.6);
	--surface-metric: rgba(7, 10, 18, 0.55);
	--ink: #e5e7eb;
	--muted: #94a3b8;
	--accent: #38bdf8;
	--accent-2: #22c55e;
	--accent-3: #f59e0b;
	--accent-border-soft: rgba(56, 189, 248, 0.45);
	--accent-border: rgba(56, 189, 248, 0.58);
	--accent-border-strong: rgba(56, 189, 248, 0.72);
	--accent-bg-soft: rgba(56, 189, 248, 0.14);
	--accent-bg-faint: rgba(56, 189, 248, 0.1);
	--accent-focus-ring: rgba(56, 189, 248, 0.2);
	--border: #1f2937;
	--shadow: 0 14px 30px rgba(2, 6, 23, 0.4);
	--mono:
		'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		'Liberation Mono', 'Courier New', monospace;
	--display: 'Space Grotesk', 'Segoe UI', sans-serif;
	--ui: 'Inter', 'Segoe UI', sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--display);
	font-size: 17px;
	background: var(--bg);
	color: var(--ink);
	min-height: 100vh;
	overflow-x: hidden;
}

.wrap {
	max-width: 1200px;
	margin: 32px auto 90px;
	padding: 0 20px;
	overflow-x: hidden;
}

header {
	display: grid;
	gap: 14px;
	margin-bottom: 24px;
}

.header-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	position: relative;
}

.header-left {
	display: grid;
	gap: 10px;
	justify-items: center;
	text-align: center;
}

.header-right {
	position: absolute;
	top: 0;
	right: 0;
}

.header-control {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
}

.header-control label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
}

h1 {
	margin: 0;
	font-family: var(--display);
	font-size: clamp(28px, 4vw, 38px);
	letter-spacing: -0.4px;
}

.subtitle {
	color: var(--muted);
	max-width: 720px;
	line-height: 1.6;
	text-align: center;
	text-wrap: balance;
}

.meta-panels {
	margin: 16px 6px 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	align-items: start;
}

.meta-panel {
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface-1);
	overflow: hidden;
}

.meta-summary {
	padding: 10px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--muted);
	font-size: 12px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

.meta-summary::-webkit-details-marker {
	display: none;
}

.meta-summary::marker {
	content: '';
}

.meta-body {
	padding: 10px 12px;
	border-top: 1px solid var(--border);
}

.local-mode-links {
	position: fixed;
	left: 10px;
	bottom: 10px;
	z-index: 1200;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: rgba(11, 15, 20, 0.94);
	box-shadow: 0 6px 18px rgba(2, 6, 23, 0.38);
	font-size: 11px;
	line-height: 1;
}

.local-mode-label {
	color: var(--muted);
	letter-spacing: 0.3px;
	text-transform: uppercase;
	margin-right: 2px;
}

.local-mode-link {
	color: var(--ink);
	text-decoration: none;
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 4px 7px;
	background: var(--surface-2);
}

.local-mode-button {
	font: inherit;
	line-height: 1;
	cursor: pointer;
}

.local-mode-button[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.local-mode-link.is-active {
	border-color: var(--accent-2);
	color: var(--accent-2);
	background: rgba(34, 197, 94, 0.14);
}

.local-mode-link:hover {
	border-color: var(--accent-border);
}

.changelog-content {
	display: grid;
	gap: 12px;
	text-transform: none;
	letter-spacing: 0;
}

.changelog-entry {
	border: 0;
	border-radius: 0;
	background: transparent;
	padding: 0;
}

.changelog-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.3px;
	color: var(--muted);
	margin-bottom: 4px;
}

.changelog-version {
	color: var(--ink);
	font-weight: 700;
	font-size: 14px;
}

.changelog-list {
	margin: 0;
	padding-left: 18px;
}

.changelog-list li {
	margin: 4px 0;
	color: var(--ink);
	line-height: 1.45;
	font-size: 14px;
}


.button-secondary {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--ink);
	box-shadow: none;
	transition:
		color 0.15s ease,
		border-color 0.15s ease,
		background 0.15s ease;
}

.button-secondary:hover {
	color: var(--ink);
	border-color: var(--accent-border);
	background: var(--accent-bg-soft);
	transform: none;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.chip {
	padding: 3px 10px;
	border-radius: 999px;
	background: transparent;
	border: 1px solid var(--border);
	font-size: 12px;
	letter-spacing: 0.3px;
	color: var(--muted);
}

.panel {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 18px;
	box-shadow: var(--shadow);
}

.sort-search {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 18px 0 14px;
}

.sort-search .search-bar {
	flex: 1 1 320px;
	min-width: 260px;
	margin: 0;
}

.sort-search .sort-bar {
	margin: 0;
}

.search-bar input[type='search'] {
	width: 100%;
	height: 38px;
	border-radius: 10px;
	padding: 0 14px;
	background: var(--surface-1);
	border: 2px solid var(--accent-border-soft);
	font-size: 15px;
	color: var(--ink);
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.35);
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.search-bar input[type='search']::placeholder {
	color: rgba(148, 163, 184, 0.85);
}

.search-bar input[type='search']:focus {
	outline: none;
	border-color: var(--accent-border-strong);
	box-shadow: 0 0 0 3px var(--accent-focus-ring);
}

.sort-bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 6px 0 16px;
}

.sort-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--muted);
}

.sort-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sort-button {
	display: inline-flex;
	align-items: center;
	width: auto;
	padding: 6px 10px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface-overlay);
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
	box-shadow: none;
	transition:
		color 0.15s ease,
		border-color 0.15s ease,
		background 0.15s ease;
}

.sort-button::after {
	content: '';
	width: 6px;
	height: 6px;
	margin-left: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	opacity: 0;
	transform: translateY(-1px) rotate(45deg);
	transition:
		opacity 0.15s ease,
		transform 0.15s ease;
}

.sort-button.active::after {
	opacity: 0.85;
}

.sort-button.active[data-sort-dir='asc']::after {
	transform: translateY(1px) rotate(-135deg);
}

.sort-button.active[data-sort-dir='desc']::after {
	transform: translateY(-1px) rotate(45deg);
}

.sort-button:hover {
	transform: none;
	color: var(--ink);
	border-color: var(--accent-border);
	background: var(--accent-bg-soft);
}

.sort-button.active {
	color: var(--ink);
	border-color: var(--accent-border);
	background: var(--accent-bg-soft);
}

.control-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: end;
}

.control-grid > div {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.control-compact {
	flex: 0 1 auto;
	min-width: 0;
}

.control-compact select,
.control-compact button {
	width: 100%;
	min-width: 0;
	padding: 8px 10px;
	font-size: 14px;
}

.control-compact select {
	width: 135px;
	max-width: none;
}

.control-compact .button-secondary {
	min-width: 0;
}

.control-compact .button-wide {
	min-width: 0;
}

.control-grid label {
	margin-bottom: 0;
}

.control-grid .label-row {
	margin-bottom: 0;
}

.control-grid select,
.control-grid button,
.control-grid input[type='number'] {
	height: 36px;
}

.control-grid select,
.control-grid input[type='number'] {
	padding: 0 12px;
}

.control-grid button {
	padding: 0 14px;
}

label {
	display: block;
	font-size: 13px;
	letter-spacing: 0.2px;
	color: var(--muted);
	margin-bottom: 6px;
}

.label-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.label-row label {
	margin-bottom: 0;
}

input,
select,
button {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface-1);
	color: var(--ink);
	font-size: 15px;
}

input:focus,
select:focus {
	outline: none;
	border-color: var(--accent-border);
	box-shadow: 0 0 0 3px var(--accent-focus-ring);
}

button {
	cursor: pointer;
	background: var(--accent);
	border: none;
	font-weight: 600;
	color: #082f49;
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease;
	box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

button:hover {
	transform: translateY(-1px);
}

.status {
	margin-top: 10px;
	font-size: 14px;
	color: var(--muted);
}

.status.error {
	color: #fda4af;
}

.debug {
	font-family: var(--mono);
	font-size: 13px;
	color: var(--muted);
}

.debug-panel.is-disabled .debug-content {
	opacity: 0.7;
}

.debug-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	color: var(--ink);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.debug-content {
	margin: 0;
	font-family: var(--mono);
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
	white-space: pre-wrap;
}

.icon-button {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid var(--border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	cursor: pointer;
	transition:
		border-color 0.2s ease,
		color 0.2s ease,
		background 0.2s ease;
}

.icon-button:hover {
	border-color: var(--accent-border);
	color: var(--ink);
	background: var(--accent-bg-faint);
}

.icon-copy {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.switch {
	position: relative;
	width: 42px;
	height: 22px;
	display: inline-block;
}

.switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--panel);
	border: 1px solid var(--border);
	transition: 0.2s;
	border-radius: 999px;
}

.slider:before {
	position: absolute;
	content: '';
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 2px;
	background: #64748b;
	transition: 0.2s;
	border-radius: 999px;
}

.switch input:checked + .slider {
	background: var(--accent-bg-soft);
	border-color: var(--accent-border);
}

.switch input:checked + .slider:before {
	transform: translateX(18px);
	background: var(--accent);
}

.min-filter {
	display: flex;
	align-items: center;
	gap: 10px;
}

.input-with-unit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.input-unit {
	font-size: 12px;
	color: var(--muted);
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.min-filter input[type='number'] {
	flex: 0 0 6em;
	width: 6em;
	max-width: 6em;
}

.boss-list {
	display: grid;
	gap: 12px;
	margin-top: 20px;
	touch-action: pan-y;
}

.boss-list details {
	border-radius: 12px;
	border: 1px solid var(--border);
	border-left: 3px solid var(--summary-accent, #fbbf24);
	background: var(--panel);
	padding: 0;
	overflow: visible;
	touch-action: pan-y;
	transition: box-shadow 0.2s ease;
}

.boss-list details:not([open]):hover {
	box-shadow: 0 0 0 1px var(--accent-border-strong);
}

.boss-list details[open] {
	box-shadow: 0 0 0 1px var(--accent-border-strong);
}

.boss-list summary {
	list-style: none;
	cursor: pointer;
	padding: 12px 18px;
	display: block;
	background: var(--summary-gradient, var(--surface-1));
	border-radius: 12px;
	min-width: 0;
	touch-action: pan-y;
}

.boss-list summary::-webkit-details-marker {
	display: none;
}

.boss-list details[open] summary {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.boss-summary {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) minmax(
			180px,
			0.6fr
		);
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.boss-top {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.boss-name {
	font-family: var(--display);
	font-size: 24px;
}

.boss-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.boss-sources {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: 6px;
}

.boss-source-link {
	font-family: var(--ui);
	font-size: 11px;
	line-height: 1;
	color: var(--muted);
	text-decoration: none;
	letter-spacing: 0.02em;
}

.boss-source-link:hover {
	color: var(--ink);
	text-decoration: underline;
}

.boss-tag {
	display: inline-flex;
	width: auto;
	white-space: nowrap;
	text-transform: lowercase;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-overlay-soft);
	color: var(--ink);
	font-size: 12px;
	line-height: 1;
	padding: 5px 10px;
	cursor: pointer;
	transition:
		border-color 0.15s ease,
		background-color 0.15s ease,
		transform 0.12s ease;
}

.boss-tag:hover {
	border-color: var(--accent-border-strong);
	background: var(--accent-bg-soft);
}

.boss-tag:focus-visible {
	outline: 2px solid var(--accent-border-strong);
	outline-offset: 1px;
}

.boss-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(100px, 1fr));
	gap: 8px;
	margin-top: 0;
}

.metric {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 12px;
	color: var(--muted);
	background: transparent;
}

.boss-metrics .metric {
	background: var(--surface-metric);
}

.metric strong {
	display: block;
	font-size: 15px;
	color: var(--ink);
	margin-top: 2px;
}

.metric-ratio strong {
	color: var(--ratio-accent, var(--ink));
}

.metric-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.info-dot {
	width: 16px;
	height: 16px;
	border-radius: 999px;
	border: 1px solid var(--border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--ink);
	cursor: help;
	background: var(--surface-overlay);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.has-tooltip {
	position: relative;
}

.has-tooltip::before,
.has-tooltip::after {
	position: absolute;
	left: 50%;
	opacity: 0;
	pointer-events: none;
	transition:
		opacity 120ms ease,
		transform 120ms ease;
	z-index: 20;
}

.has-tooltip::before {
	content: '';
	bottom: calc(100% + 4px);
	transform: translate(-50%, 6px);
	border-width: 6px 6px 0 6px;
	border-style: solid;
	border-color: var(--surface-overlay-strong) transparent transparent transparent;
}

.has-tooltip::after {
	content: attr(data-tooltip);
	bottom: calc(100% + 10px);
	transform: translate(-50%, 6px);
	background: var(--surface-overlay-strong);
	color: #e5e7eb;
	border: 1px solid rgba(148, 163, 184, 0.35);
	border-radius: 10px;
	padding: 8px 10px;
	width: max-content;
	max-width: 260px;
	white-space: normal;
	font-size: 12px;
	line-height: 1.35;
	text-align: left;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.has-tooltip:hover::before,
.has-tooltip:hover::after,
.has-tooltip:focus::before,
.has-tooltip:focus::after {
	opacity: 1;
	transform: translate(-50%, 0);
}

.detail-body {
	padding: 16px 18px 18px;
	border-top: 1px solid var(--border);
	display: grid;
	gap: 18px;
}

.detail-body > * {
	min-width: 0;
}

.detail-columns {
	display: grid;
	grid-template-columns: minmax(0, 40%) minmax(0, 60%);
	gap: 14px;
	align-items: start;
}

.detail-column {
	min-width: 0;
}

.section-title {
	font-family: var(--serif);
	font-size: 17px;
	margin: 0 0 8px 0;
}

.detail-column-entry .section-title {
	margin-top: 13px;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	table-layout: fixed;
}

.table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	min-width: 0;
	touch-action: pan-x pan-y;
}

.table th,
.table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--border);
	text-align: left;
}

.table th:first-child,
.table td:first-child {
	padding-left: 0;
}

.table th:last-child,
.table td:last-child {
	text-align: right;
	padding-right: 0;
}

.table tbody tr:last-child td {
	padding-bottom: 0;
	border-bottom: none;
}

.entry-table th:last-child,
.entry-table td:last-child {
	text-align: right;
}

.table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--muted);
}

.item-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.item-cell > span:not(.item-label) {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: inline-block;
	max-width: 100%;
}

.item-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	max-width: 100%;
	white-space: normal;
}

.item-primary {
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	font-family: var(--ui);
	letter-spacing: 0.01em;
}

.item-meta {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0;
	font-size: 11px;
	line-height: 1.2;
	color: var(--muted);
	font-family: var(--ui);
}

.item-meta .item-link {
	font-size: 11px;
	color: var(--muted);
	font-family: var(--ui);
	font-weight: 500;
}

.item-meta .item-link:hover {
	color: var(--ink);
}

.item-meta-text {
	color: var(--muted);
}

.drop-table col.col-item {
	width: 50%;
}
.drop-table col.col-prob {
	width: 14%;
}
.drop-table col.col-price {
	width: 18%;
}
.drop-table col.col-ev {
	width: 12%;
}
.drop-table col.col-include {
	width: 6%;
}

.entry-table col.col-item {
	width: 56%;
}
.entry-table col.col-price {
	width: 26%;
}
.entry-table col.col-subtotal {
	width: 18%;
}

.entry-table th,
.entry-table td {
	padding-top: 5px;
	padding-bottom: 5px;
}

.drop-table th,
.drop-table td {
	padding-top: 4px;
	padding-bottom: 4px;
}

.entry-table .item-cell {
	gap: 6px;
}

.drop-table .item-cell {
	gap: 5px;
}

.entry-table .item-icon {
	width: 22px;
	height: 22px;
}

.drop-table .item-icon {
	width: 20px;
	height: 20px;
}

.item-icon {
	width: 27px;
	height: 27px;
	border-radius: 6px;
	border: none;
	background: transparent;
	object-fit: contain;
}

.row-missing {
	opacity: 0.55;
}

.row-ignored {
	opacity: 0.45;
}

.include-toggle {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
	cursor: pointer;
}

.include-note {
	font-size: 12px;
	color: var(--muted);
}

.muted {
	color: var(--muted);
}

.sources-note {
	font-size: 12px;
	line-height: 1.35;
	opacity: 0.82;
}

.editable-input {
	padding: 4px 8px;
	height: 28px;
	border-radius: 3px;
	border: 1px solid rgba(148, 163, 184, 0.55);
	background: var(--surface-2);
	color: var(--ink);
	font-size: 13px;
	line-height: 1.2;
	font-family: var(--ui);
	font-weight: 500;
	box-sizing: border-box;
	width: 68px;
	min-width: 68px;
	max-width: 68px;
}

.editable-input:hover {
	border-color: rgba(148, 163, 184, 0.78);
	background: var(--surface-3);
}

.editable-input:focus {
	outline: none;
	border-color: var(--accent-border-strong);
	background: var(--surface-3);
	box-shadow: 0 0 0 2px var(--accent-focus-ring);
}

.prob-input {
	width: 46px;
	min-width: 46px;
	max-width: 46px;
}

.table-edit-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	white-space: nowrap;
}

.qty-prefix {
	font-size: 11px;
	line-height: 1;
	color: var(--muted);
	min-width: 2.4em;
	text-align: right;
}

.field-unit {
	font-size: 11px;
	line-height: 1;
	color: var(--muted);
	letter-spacing: 0.35px;
}

.input-custom {
	border: 2px solid rgba(250, 204, 21, 0.98);
	background: rgba(250, 204, 21, 0.22);
	box-shadow:
		0 0 0 2px rgba(250, 204, 21, 0.45),
		0 0 16px rgba(250, 204, 21, 0.22);
}

.group-card {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 8px;
	background: var(--surface-card);
	min-width: 0;
}

.detail-column-drops {
	display: grid;
	gap: 12px;
}

.drop-group {
	min-width: 0;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 12px;
	background: var(--surface-card);
}

.drop-group-title {
	font-family: var(--serif);
	font-size: 17px;
	margin: 0 0 6px 0;
}

.footer {
	margin-top: 24px;
	font-size: 13px;
	color: var(--muted);
	line-height: 1.6;
}

.link {
	color: var(--accent-3);
	text-decoration: none;
}

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

.item-link {
	color: var(--ink);
	text-decoration: none;
}

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

.wiki-link,
.trade-link {
	margin-left: 0;
	color: var(--ink);
	font-size: inherit;
}

.item-sep {
	color: var(--muted);
	margin: 0 5px;
}

.warning {
	color: var(--muted);
	font-size: 14px;
	line-height: 1.45;
}

.flex-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
}

.expected-return {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	justify-self: end;
}

.expected-return span {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--muted);
}

.expected-return strong {
	font-size: clamp(18px, 2.6vw, 28px);
	font-weight: 700;
	color: var(--profit-accent, var(--ink));
	transition: color 0.2s ease;
}

.missing-note {
	font-size: 10px;
	line-height: 1.1;
	letter-spacing: 0.35px;
	text-transform: uppercase;
	color: var(--muted);
	opacity: 0.55;
	margin-left: 0;
}

@media (max-width: 720px) {
	.wrap {
		margin: 20px auto 70px;
		padding: 0 16px;
	}

	.local-mode-links {
		left: 8px;
		right: 8px;
		bottom: 8px;
		justify-content: center;
	}

	.meta-panels {
		grid-template-columns: 1fr;
	}

	.header-row {
		flex-direction: column;
		align-items: stretch;
	}

	.header-right {
		position: static;
		align-self: flex-end;
	}

	.control-grid {
		display: grid;
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 10px 8px;
		align-items: end;
	}

	.control-grid > div {
		width: auto;
		flex: initial;
		min-width: 0;
	}

	.control-grid > div:nth-child(1),
	.control-grid > div:nth-child(2),
	.control-grid > div:nth-child(3) {
		grid-column: span 2;
	}

	.control-grid > div:nth-child(4),
	.control-grid > div:nth-child(5),
	.control-grid > div:nth-child(6),
	.control-grid > div:nth-child(7) {
		grid-column: span 3;
	}

	.control-compact select,
	.control-compact button {
		width: 100%;
		min-width: 0;
	}

	.min-filter {
		flex-wrap: wrap;
		align-items: center;
	}

	.min-filter input[type='number'] {
		flex: 1 1 160px;
		width: 100%;
	}

	.search-bar {
		margin: 0;
	}

	.subtitle {
		font-size: 14px;
		line-height: 1.4;
		max-width: 100%;
		text-wrap: balance;
	}

	.boss-list summary {
		padding: 14px;
	}
	.detail-body {
		padding: 14px;
	}
	.detail-columns {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.metric strong {
		font-size: 16px;
	}

	.boss-summary {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: auto auto auto;
		gap: 10px;
	}

	.boss-metrics {
		display: contents;
	}

	.boss-top {
		grid-column: 1 / -1;
	}

	.boss-metrics .metric {
		min-width: 0;
	}

	.expected-return {
		grid-row: 3;
		grid-column: 2;
		border: 1px solid var(--border);
		border-radius: 10px;
		padding: 8px 10px;
		background: var(--surface-metric);
		align-items: flex-start;
		justify-self: stretch;
		gap: 4px;
	}

	.expected-return span {
		font-size: 11px;
		letter-spacing: 0.6px;
	}

	.expected-return strong {
		font-size: 15px;
	}

	.table {
		table-layout: fixed;
		font-size: 11px;
		min-width: 0;
	}

	.table th,
	.table td {
		padding: 5px 6px;
	}

	.table th {
		font-size: 10px;
		letter-spacing: 0.6px;
	}

	.table-wrap {
		overflow-x: visible;
	}

	.item-cell {
		align-items: flex-start;
		gap: 5px;
	}

	.item-cell > span:not(.item-label) {
		white-space: nowrap;
	}

	.item-primary {
		white-space: normal;
		line-height: 1.2;
	}

	.item-meta {
		font-size: 10px;
		line-height: 1.15;
	}

	.entry-table col.col-item {
		width: 46%;
	}

	.entry-table col.col-price {
		width: 34%;
	}

	.entry-table col.col-subtotal {
		width: 20%;
	}

	.drop-table col.col-item {
		width: 43%;
	}

	.drop-table col.col-prob {
		width: 14%;
	}

	.drop-table col.col-price {
		width: 20%;
	}

	.drop-table col.col-include {
		width: 8%;
	}

	.drop-table col.col-ev {
		width: 15%;
	}

	.editable-input {
		width: 38px;
		min-width: 38px;
		max-width: 38px;
		height: 24px;
		padding: 2px 5px;
		font-size: 11px;
	}

	.prob-input {
		width: 30px;
		min-width: 30px;
		max-width: 30px;
	}

	.table-edit-wrap {
		gap: 2px;
	}

	.qty-prefix,
	.field-unit {
		font-size: 10px;
	}

	.qty-prefix {
		min-width: 2em;
	}

	.item-icon {
		width: 18px;
		height: 18px;
	}

	.include-toggle {
		width: 14px;
		height: 14px;
	}
}

@media (max-width: 980px) and (min-width: 721px) {
	.boss-summary {
		grid-template-columns: 1fr;
		align-items: flex-start;
	}
	.detail-columns {
		grid-template-columns: 1fr;
	}
	.boss-metrics {
		grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	}
	.expected-return {
		align-items: flex-start;
	}
}
