.wlq-market {
	--wlq-bg: #100a21;
	--wlq-bg-soft: #15102a;
	--wlq-header: #120b25;
	--wlq-hover: #17102c;
	--wlq-line: #2d1947;
	--wlq-text: #e8e4f2;
	--wlq-muted: #7d718f;
	--wlq-rank: #4b3a5e;
	--wlq-positive: #33d9a0;
	--wlq-positive-bg: #152b31;
	--wlq-negative: #ff587d;
	--wlq-negative-bg: #3a1530;
	--wlq-accent: #a761ee;
	--wlq-warning: #d7a75b;
	--wlq-message: #b8acc9;
	--wlq-status-idle: #756984;
	--wlq-status-time: #9b8baa;
	--wlq-status-divider: #3b2a4f;
	--wlq-scroll-thumb: #49325f;
	--wlq-skeleton: #211735;
	--wlq-sticky-shadow: 12px 0 18px rgba(16, 10, 33, 0.72);
	--wlq-shadow: 0 20px 60px rgba(23, 8, 45, 0.2);
	--wlq-table-min-width: 960px;
	color-scheme: dark;
	width: 100%;
	color: var(--wlq-text);
	background: var(--wlq-bg);
	border: 1px solid var(--wlq-line);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--wlq-shadow);
	font-family: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
	box-sizing: border-box;
}

.wlq-market[data-theme="light"] {
	--wlq-bg: #fbfafc;
	--wlq-bg-soft: #f5f2f8;
	--wlq-header: #f8f6fa;
	--wlq-hover: #f3eef6;
	--wlq-line: #e4dce9;
	--wlq-text: #25172f;
	--wlq-muted: #71627b;
	--wlq-rank: #a899b0;
	--wlq-positive: #087755;
	--wlq-positive-bg: #e2f3eb;
	--wlq-negative: #c73555;
	--wlq-negative-bg: #fae5eb;
	--wlq-accent: #6f3c9b;
	--wlq-warning: #9a6513;
	--wlq-message: #66556f;
	--wlq-status-idle: #8b7b94;
	--wlq-status-time: #74627d;
	--wlq-status-divider: #d8cedf;
	--wlq-scroll-thumb: #c4b4cd;
	--wlq-skeleton: #eee8f2;
	--wlq-sticky-shadow: 12px 0 18px rgba(228, 220, 233, 0.82);
	--wlq-shadow: 0 18px 48px rgba(43, 28, 56, 0.12);
	color-scheme: light;
}

@media (prefers-color-scheme: light) {
	.wlq-market[data-theme="auto"] {
		--wlq-bg: #fbfafc;
		--wlq-bg-soft: #f5f2f8;
		--wlq-header: #f8f6fa;
		--wlq-hover: #f3eef6;
		--wlq-line: #e4dce9;
		--wlq-text: #25172f;
		--wlq-muted: #71627b;
		--wlq-rank: #a899b0;
		--wlq-positive: #087755;
		--wlq-positive-bg: #e2f3eb;
		--wlq-negative: #c73555;
		--wlq-negative-bg: #fae5eb;
		--wlq-accent: #6f3c9b;
		--wlq-warning: #9a6513;
		--wlq-message: #66556f;
		--wlq-status-idle: #8b7b94;
		--wlq-status-time: #74627d;
		--wlq-status-divider: #d8cedf;
		--wlq-scroll-thumb: #c4b4cd;
		--wlq-skeleton: #eee8f2;
		--wlq-sticky-shadow: 12px 0 18px rgba(228, 220, 233, 0.82);
		--wlq-shadow: 0 18px 48px rgba(43, 28, 56, 0.12);
		color-scheme: light;
	}
}

.wlq-market *,
.wlq-market *::before,
.wlq-market *::after {
	box-sizing: border-box;
}

.wlq-market .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.wlq-market__viewport {
	max-height: min(var(--wlq-max-height, 540px), 72vh);
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
	scrollbar-color: var(--wlq-scroll-thumb) var(--wlq-bg);
}

.wlq-market__viewport::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

.wlq-market__viewport::-webkit-scrollbar-track {
	background: var(--wlq-bg);
}

.wlq-market__viewport::-webkit-scrollbar-thumb {
	background: var(--wlq-scroll-thumb);
	border: 2px solid var(--wlq-bg);
	border-radius: 10px;
}

.wlq-market__viewport:focus-visible {
	outline: 2px solid var(--wlq-accent);
	outline-offset: -3px;
}

.wlq-table {
	width: 100%;
	min-width: var(--wlq-table-min-width);
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	background: transparent;
}

.wlq-table th,
.wlq-table td {
	padding: 18px 24px;
	border: 0;
	border-bottom: 1px solid var(--wlq-line);
	vertical-align: middle;
	text-align: right;
}

.wlq-table th {
	position: sticky;
	top: 0;
	z-index: 3;
	padding-top: 16px;
	padding-bottom: 16px;
	color: var(--wlq-muted);
	background: var(--wlq-header);
	box-shadow: inset 0 -1px 0 var(--wlq-line);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.wlq-table td {
	height: 88px;
	color: var(--wlq-text);
	font-size: 17px;
	font-weight: 700;
}

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

.wlq-table tbody tr:hover td {
	background-color: var(--wlq-hover);
}

.wlq-table tbody tr:hover td:nth-child(2) {
	background-color: var(--wlq-hover);
}

.wlq-table th:nth-child(2),
.wlq-table td:nth-child(2) {
	width: 27%;
	text-align: left;
}

.wlq-table__rank {
	width: 5%;
	color: var(--wlq-rank) !important;
	text-align: center !important;
}

.wlq-table__bid-ask {
	width: 18%;
}

.wlq-product {
	display: flex;
	align-items: center;
	gap: 15px;
	min-width: 0;
}

.wlq-product__visual {
	position: relative;
	display: inline-flex;
	flex: 0 0 52px;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 44px;
}

.wlq-product__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: hsl(var(--wlq-badge-hue) 35% 95%);
	background: hsl(var(--wlq-badge-hue) 62% 43%);
	border: 1px solid hsl(var(--wlq-badge-hue) 55% 62% / 0.35);
	border-radius: 50%;
	box-shadow: inset 0 1px 0 hsl(0 0% 100% / 0.16);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.wlq-product__logo {
	display: block;
	width: 44px;
	height: 44px;
	padding: 3px;
	object-fit: contain;
	background: var(--wlq-bg-soft);
	border: 1px solid var(--wlq-line);
	border-radius: 50%;
}

.wlq-product__visual--pair .wlq-product__logo {
	position: absolute;
	width: 32px;
	height: 32px;
	padding: 2px;
}

.wlq-product__visual--pair .wlq-product__logo:first-of-type {
	top: 0;
	left: 0;
	z-index: 1;
}

.wlq-product__visual--pair .wlq-product__logo:last-of-type {
	right: 0;
	bottom: 0;
	border-width: 2px;
}

.wlq-product__names {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
}

.wlq-product__names strong,
.wlq-product__names small {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wlq-product__names strong {
	color: var(--wlq-text);
	font-size: 17px;
	font-weight: 750;
}

.wlq-product__names small {
	color: var(--wlq-muted);
	font-size: 13px;
	font-weight: 500;
}

.wlq-number {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-variant-numeric: tabular-nums lining-nums;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.wlq-bid-ask {
	display: inline-grid;
	gap: 4px;
	justify-items: end;
}

.wlq-bid-ask__item {
	display: grid;
	grid-template-columns: 20px auto;
	align-items: baseline;
	gap: 7px;
}

.wlq-bid-ask__item small {
	color: var(--wlq-muted);
	font-family: "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
	font-size: 10px;
	font-weight: 700;
}

.wlq-bid-ask__item b {
	color: var(--wlq-text);
	font-size: 13px;
	font-weight: 700;
}

.wlq-number--latest {
	position: relative;
	isolation: isolate;
	transform-origin: right center;
}

.wlq-number--latest::before {
	position: absolute;
	inset: 9px 12px;
	z-index: -1;
	content: "";
	background: transparent;
	border-radius: 10px;
	opacity: 0;
}

.wlq-number--latest[data-direction="up"] {
	color: var(--wlq-positive) !important;
}

.wlq-number--latest[data-direction="down"] {
	color: var(--wlq-negative) !important;
}

.wlq-number--latest[data-direction="up"]::before {
	background: var(--wlq-positive-bg);
}

.wlq-number--latest[data-direction="down"]::before {
	background: var(--wlq-negative-bg);
}

.wlq-price {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.wlq-price__arrow {
	display: inline-block;
	width: 11px;
	font-family: "Segoe UI Symbol", sans-serif;
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	opacity: 0;
}

.wlq-change {
	display: inline-flex;
	min-width: 92px;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	padding: 8px 13px;
	border-radius: 13px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	white-space: nowrap;
}

.wlq-change--positive {
	color: var(--wlq-positive);
	background: var(--wlq-positive-bg);
}

.wlq-change--negative {
	color: var(--wlq-negative);
	background: var(--wlq-negative-bg);
}

.wlq-change--neutral {
	color: var(--wlq-muted);
	background: var(--wlq-bg-soft);
}

.wlq-market__footer {
	display: flex;
	min-height: 42px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 20px;
	background: var(--wlq-bg-soft);
	border-top: 1px solid var(--wlq-line);
}

.wlq-market__message,
.wlq-market__status {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
}

.wlq-market__message {
	color: var(--wlq-message);
}

.wlq-market__status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--wlq-muted);
	white-space: nowrap;
}

.wlq-market__status span {
	width: 8px;
	height: 8px;
	background: var(--wlq-status-idle);
	border-radius: 50%;
}

.wlq-market__status b {
	font-weight: 650;
}

.wlq-market__status time {
	padding-left: 8px;
	border-left: 1px solid var(--wlq-status-divider);
	color: var(--wlq-status-time);
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-variant-numeric: tabular-nums;
}

.wlq-market[data-connection="live"] .wlq-market__status span {
	background: var(--wlq-positive);
}

.wlq-market[data-connection="live"] .wlq-market__status b {
	color: var(--wlq-positive);
}

.wlq-market[data-connection="polling"] .wlq-market__status span,
.wlq-market[data-connection="reconnecting"] .wlq-market__status span {
	background: var(--wlq-warning);
}

.wlq-market[data-connection="error"] .wlq-market__status span {
	background: var(--wlq-negative);
}

.wlq-table__empty {
	height: 180px !important;
	color: var(--wlq-muted) !important;
	text-align: center !important;
}

.wlq-skeleton span {
	display: inline-block;
	width: 76%;
	height: 16px;
	background: var(--wlq-skeleton);
	border-radius: 8px;
}

.wlq-skeleton__product {
	width: 62% !important;
	height: 36px !important;
}

@media (prefers-reduced-motion: no-preference) {
	.wlq-number--tick {
		animation: wlq-price-tick 520ms cubic-bezier(0.16, 1, 0.3, 1);
	}

	.wlq-number--tick::before {
		animation: wlq-price-flash 920ms cubic-bezier(0.16, 1, 0.3, 1);
	}

	.wlq-number--tick .wlq-price__arrow {
		animation: wlq-price-arrow 620ms cubic-bezier(0.16, 1, 0.3, 1);
	}

	.wlq-skeleton span {
		animation: wlq-skeleton-pulse 1.35s ease-in-out infinite alternate;
	}
}

@keyframes wlq-price-tick {
	0% {
		opacity: 0.72;
		transform: scale(0.975);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes wlq-price-flash {
	0% {
		opacity: 0.78;
	}
	100% {
		opacity: 0;
	}
}

@keyframes wlq-price-arrow {
	0% {
		opacity: 0;
		transform: translateY(4px);
	}
	24%,
	72% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 0;
		transform: translateY(-2px);
	}
}

@keyframes wlq-skeleton-pulse {
	0% {
		opacity: 0.45;
	}
	100% {
		opacity: 0.9;
	}
}

@media (max-width: 900px) {
	.wlq-market {
		--wlq-table-min-width: 760px;
		border-radius: 16px;
	}

	.wlq-table {
		min-width: var(--wlq-table-min-width);
	}

	.wlq-table th,
	.wlq-table td {
		padding-right: 16px;
		padding-left: 16px;
	}

	.wlq-table__rank {
		display: none;
	}

	.wlq-table th:nth-child(2),
	.wlq-table td:nth-child(2) {
		position: sticky;
		left: 0;
		z-index: 2;
		width: 220px;
		background: var(--wlq-bg);
		box-shadow: var(--wlq-sticky-shadow);
	}

	.wlq-table thead th:nth-child(2) {
		z-index: 4;
		background: var(--wlq-header);
	}
}

@media (max-width: 600px) {
	.wlq-market {
		--wlq-table-min-width: 680px;
	}

	.wlq-table {
		min-width: var(--wlq-table-min-width);
	}

	.wlq-table th {
		padding-top: 16px;
		padding-bottom: 16px;
		font-size: 12px;
	}

	.wlq-table td {
		height: 80px;
		font-size: 14px;
	}

	.wlq-table th:nth-child(2),
	.wlq-table td:nth-child(2) {
		width: 184px;
	}

	.wlq-product {
		gap: 11px;
	}

	.wlq-product__badge {
		width: 36px;
		height: 36px;
		font-size: 10px;
	}

	.wlq-product__visual {
		flex-basis: 44px;
		width: 44px;
		height: 36px;
	}

	.wlq-product__logo {
		width: 36px;
		height: 36px;
	}

	.wlq-product__visual--pair .wlq-product__logo {
		width: 27px;
		height: 27px;
	}

	.wlq-product__names strong {
		font-size: 14px;
	}

	.wlq-product__names small {
		font-size: 11px;
	}

	.wlq-change {
		min-width: 78px;
		min-height: 36px;
		padding: 6px 10px;
		border-radius: 11px;
	}

	.wlq-market__footer {
		align-items: flex-start;
		padding: 9px 14px;
	}
}
