.dexguest {
	display: none;
}

/* The page is CDN-cached for every device, so desktop/mobile switching must
   stay pure CSS; no user-agent checks on the server. */
@media (max-width: 767px) {

	body:has(.dexguest) {
		--dexguest-blue: #2563EB;
		--dexguest-blue-light: #60A5FA;
		--dexguest-navy: #0F172A;
		--dexguest-navy-2: #1E293B;
		--dexguest-navy-mid: #1E3A8A;
		--dexguest-text: #0F172A;
		--dexguest-text-2: #64748B;
		--dexguest-muted: #94A3B8;
		--dexguest-page: #F8FAFC;
		--dexguest-fill: #F0F2F5;
		--dexguest-surface: #fff;
		--dexguest-green: #10B981;
		--dexguest-red: #EF4444;
		--dexguest-tabbar-h: 60px;
		background: var(--dexguest-page) !important;
	}
	body.darkmode-page:has(.dexguest) {
		--dexguest-text: #F1F5F9;
		--dexguest-page: #0F172A;
		--dexguest-fill: rgba(255, 255, 255, .08);
		--dexguest-surface: #1E293B;
	}

	body:has(.dexguest) #main > :not(.dexguest),
	body:has(.dexguest) .bg-foot,
	body:has(.dexguest) .bg-foot-mobile {
		display: none !important;
	}
	body:has(.dexguest) #main {
		padding: 0 !important;
		margin: 0 !important;
		background: transparent !important;
	}

	.dexguest {
		display: block;
		padding-bottom: calc(var(--dexguest-tabbar-h) + env(safe-area-inset-bottom, 0px) + 20px);
		color: var(--dexguest-text);
		font-family: 'Plus Jakarta Sans', sans-serif;
		font-weight: 400;
		text-align: left;
	}
	.dexguest a,
	.dexguest a:hover,
	.dexguest a:focus {
		text-decoration: none;
	}
	/* main.min.css gives <small> a ~48px line-height on this page. */
	.dexguest small,
	.dexguest b {
		line-height: 1.3;
	}

	/* --- Hero ------------------------------------------------------------ */
	.dexguest-hero {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px;
		border-radius: 0 0 24px 24px;
		background: linear-gradient(180deg, var(--dexguest-navy) 0%, var(--dexguest-navy-mid) 45%, var(--dexguest-blue) 100%);
		color: #fff;
		text-align: center;
	}
	.dexguest-logo {
		align-self: flex-start;
		height: 30px;
		width: auto;
	}
	.dexguest-mockup {
		width: 82%;
		max-width: 320px;
		height: auto;
		margin: 14px 0 12px;
	}
	.dexguest-hero-text {
		max-width: 320px;
		margin: 0 0 16px;
		color: #fff;
		font-size: 15px;
		font-weight: 500;
		line-height: 1.45;
	}
	.dexguest-hero-actions {
		display: flex;
		gap: 10px;
		width: 100%;
	}
	.dexguest-btn {
		display: flex;
		flex: 1 1 0;
		align-items: center;
		justify-content: center;
		height: 46px;
		border-radius: 12px;
		font-size: 14px;
		font-weight: 700;
	}
	.dexguest-btn--light,
	.dexguest-btn--light:hover,
	.dexguest-btn--light:focus {
		background: #fff;
		color: var(--dexguest-blue);
	}
	.dexguest-btn--ghost,
	.dexguest-btn--ghost:hover,
	.dexguest-btn--ghost:focus {
		border: 1px solid rgba(255, 255, 255, .35);
		background: rgba(255, 255, 255, .12);
		color: #fff;
	}

	/* --- Sections -------------------------------------------------------- */
	.dexguest-sec {
		margin-top: 20px;
	}
	.dexguest-sec-head {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		margin: 0 16px 10px;
	}
	.dexguest-sec-head h2 {
		margin: 0;
		color: var(--dexguest-text);
		font-size: 15px;
		font-weight: 700;
		line-height: 1.3;
	}
	.dexguest-sec-head > a,
	.dexguest-sec-head > a:hover {
		color: var(--dexguest-blue);
		font-size: 12px;
		font-weight: 500;
	}

	.dexguest-promo,
	.dexguest-strip {
		display: flex;
		gap: 10px;
		padding: 2px 16px 6px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 16px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.dexguest-promo::-webkit-scrollbar,
	.dexguest-strip::-webkit-scrollbar {
		display: none;
	}

	.dexguest-promo-item {
		display: block;
		flex: 0 0 86%;
		overflow: hidden;
		border-radius: 16px;
		background: var(--dexguest-fill);
		aspect-ratio: 2 / 1;
		scroll-snap-align: start;
	}
	.dexguest-promo-item img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.dexguest-strip-card,
	.dexguest-strip-card:hover,
	.dexguest-strip-card:focus {
		display: block;
		flex: 0 0 auto;
		min-width: 170px;
		padding: 12px 14px;
		border-radius: 16px;
		background: var(--dexguest-surface);
		box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
		color: var(--dexguest-text);
		scroll-snap-align: start;
	}
	.dexguest-strip-pair {
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 14px;
		font-weight: 600;
	}
	.dexguest-strip-pair small {
		color: var(--dexguest-muted);
		font-size: 13px;
		font-weight: 400;
	}
	.dexguest-coin {
		display: flex;
		flex-shrink: 0;
		align-items: center;
		justify-content: center;
		width: 32px;
		height: 32px;
		border-radius: 10px;
		background: var(--dexguest-fill);
	}
	.dexguest-coin img {
		width: 22px;
		height: 22px;
		border-radius: 50%;
		object-fit: contain;
	}
	.dexguest-coin--empty::before {
		content: attr(data-initial);
		color: var(--dexguest-blue);
		font-size: 13px;
		font-weight: 700;
	}
	.dexguest-strip-price {
		display: flex;
		align-items: center;
		gap: 6px;
		margin-top: 8px;
		font-size: 13px;
		font-weight: 500;
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}
	.dexguest-strip-price em {
		padding: 2px 6px;
		border-radius: 6px;
		font-size: 11px;
		font-style: normal;
	}
	.dexguest-strip-price em.is-up {
		background: #ECFDF5;
		color: var(--dexguest-green);
	}
	.dexguest-strip-price em.is-down {
		background: #FEF2F2;
		color: var(--dexguest-red);
	}
	.dexguest-strip-price em.is-neutral {
		background: var(--dexguest-fill);
		color: var(--dexguest-text-2);
	}
	body.darkmode-page .dexguest-strip-price em.is-up {
		background: rgba(16, 185, 129, .14);
	}
	body.darkmode-page .dexguest-strip-price em.is-down {
		background: rgba(239, 68, 68, .14);
	}
	.dexguest-strip-vol {
		margin-top: 6px;
		color: var(--dexguest-muted);
		font-size: 11px;
	}

	/* --- Market and Articles (same look as the logged-in home) --------- */
	.dexguest-card {
		margin: 0 16px;
		border-radius: 16px;
		background: var(--dexguest-surface);
		box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
	}
	.dexguest-market-tabs,
	.dexguest-article-tabs {
		display: flex;
		gap: 2px;
		margin: 0 16px 12px;
		padding: 2px;
		border-radius: 12px;
		background: #F1F5F9;
	}
	.dexguest-article-tabs {
		overflow-x: auto;
		scrollbar-width: none;
	}
	.dexguest-article-tabs::-webkit-scrollbar {
		display: none;
	}
	body.darkmode-page .dexguest-market-tabs,
	body.darkmode-page .dexguest-article-tabs {
		background: var(--dexguest-navy-2);
	}
	.dexguest-market-tabs > button,
	.dexguest-article-tabs > button {
		padding: 9px 4px;
		border: 0;
		border-radius: 10px;
		background: transparent;
		color: var(--dexguest-text-2);
		font-size: 13px;
		font-weight: 500;
		white-space: nowrap;
	}
	.dexguest-market-tabs > button {
		flex: 1 1 0;
	}
	.dexguest-article-tabs > button {
		flex: 0 0 auto;
		padding: 9px 14px;
	}
	.dexguest-market-tabs > button.is-active,
	.dexguest-article-tabs > button.is-active {
		background: #fff;
		box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
		color: var(--dexguest-text);
	}
	body.darkmode-page .dexguest-market-tabs > button,
	body.darkmode-page .dexguest-article-tabs > button {
		color: var(--dexguest-muted);
	}
	body.darkmode-page .dexguest-market-tabs > button.is-active,
	body.darkmode-page .dexguest-article-tabs > button.is-active {
		background: rgba(255, 255, 255, .1);
		color: #fff;
	}

	.dexguest-market-cols {
		display: flex;
		justify-content: space-between;
		margin: 0 20px 8px;
		color: var(--dexguest-text-2);
		font-size: 12px;
	}
	.dexguest-market-list {
		padding: 0 14px;
	}
	.dexguest-market-list[hidden] {
		display: none;
	}
	.dexguest-market-row,
	.dexguest-market-row:hover,
	.dexguest-market-row:focus {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 12px 0;
		border-top: 1px solid #F1F4F8;
		color: var(--dexguest-text);
	}
	.dexguest-market-row:first-child {
		border-top: 0;
	}
	body.darkmode-page .dexguest-market-row {
		border-top-color: rgba(255, 255, 255, .06);
	}
	.dexguest-coin--lg {
		width: 40px;
		height: 40px;
		border-radius: 12px;
	}
	.dexguest-coin--lg img {
		width: 28px;
		height: 28px;
	}
	.dexguest-market-name {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		gap: 2px;
		min-width: 0;
	}
	.dexguest-market-name b {
		font-size: 14px;
		font-weight: 600;
	}
	.dexguest-market-name b small {
		color: var(--dexguest-muted);
		font-size: 13px;
		font-weight: 400;
	}
	.dexguest-market-name > small {
		overflow: hidden;
		color: var(--dexguest-text-2);
		font-size: 11px;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.dexguest-market-price {
		display: flex;
		flex-direction: column;
		flex-shrink: 0;
		align-items: flex-end;
		gap: 4px;
		font-variant-numeric: tabular-nums;
	}
	.dexguest-market-price b {
		font-size: 14px;
		font-weight: 500;
	}
	.dexguest-market-price em {
		padding: 3px 10px;
		border-radius: 8px;
		font-size: 12px;
		font-style: normal;
	}
	.dexguest-market-price em.is-up {
		background: #ECFDF5;
		color: var(--dexguest-green);
	}
	.dexguest-market-price em.is-down {
		background: #FEF2F2;
		color: var(--dexguest-red);
	}
	.dexguest-market-price em.is-neutral {
		background: var(--dexguest-fill);
		color: var(--dexguest-text-2);
	}
	body.darkmode-page .dexguest-market-price em.is-up {
		background: rgba(16, 185, 129, .15);
	}
	body.darkmode-page .dexguest-market-price em.is-down {
		background: rgba(239, 68, 68, .15);
	}
	.dexguest-market-empty {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 6px;
		padding: 22px 0;
		color: var(--dexguest-text-2);
		font-size: 12px;
		text-align: center;
	}
	.dexguest-market-empty a,
	.dexguest-market-empty a:hover {
		color: var(--dexguest-blue);
		font-weight: 600;
	}

	.dexguest-articles {
		padding: 0 14px;
	}
	.dexguest-article-row,
	.dexguest-article-row:hover,
	.dexguest-article-row:focus {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 14px 0;
		border-top: 1px solid #F1F4F8;
		color: var(--dexguest-text);
	}
	.dexguest-article-row:first-child {
		border-top: 0;
	}
	body.darkmode-page .dexguest-article-row {
		border-top-color: rgba(255, 255, 255, .06);
	}
	/* Ratio matches the WordPress "medium" size (300x171). */
	.dexguest-article-thumb {
		flex: 0 0 116px;
		height: 66px;
		overflow: hidden;
		border-radius: 10px;
		background: var(--dexguest-fill);
	}
	.dexguest-article-thumb img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
	.dexguest-article-body {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		gap: 3px;
		min-width: 0;
	}
	.dexguest-article-body > b,
	.dexguest-article-body > span {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
	.dexguest-article-body > b {
		font-size: 13px;
		font-weight: 600;
		line-height: 1.35;
	}
	.dexguest-article-body > span {
		color: var(--dexguest-text-2);
		font-size: 12px;
		font-weight: 400;
		line-height: 1.4;
	}
	.dexguest-article-body > small {
		color: var(--dexguest-muted);
		font-size: 11px;
		font-weight: 400;
	}
	.dexguest-article-arrow {
		display: flex;
		flex-shrink: 0;
		color: #CBD5E1;
	}
	body.darkmode-page .dexguest-article-arrow {
		color: #475569;
	}
	.dexguest-article-status {
		padding: 22px 0;
		color: var(--dexguest-text-2);
		font-size: 12px;
		text-align: center;
	}
	.dexguest-article-status[hidden],
	.dexguest-article-status [hidden] {
		display: none;
	}

	/* --- News popup: an image card with a floating close button ---------- */
	/* !important here and on .close: main.min.css sizes .modal-dialog and offsets .close by 30px. */
	.dexnews .modal-dialog {
		max-width: 400px !important;
		margin: 24px auto !important;
		padding: 0 20px;
	}
	.dexnews .modal-content {
		position: relative;
		overflow: hidden;
		border: 0;
		border-radius: 20px;
		background: transparent;
		box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
	}
	.dexnews .modal-body {
		padding: 0;
	}
	.dexnews .modal-body img {
		display: block;
		width: 100%;
		height: auto;
		max-height: 75vh;
		object-fit: contain;
	}
	.dexnews .modal-body__content {
		display: none !important;
	}
	.dexnews .close {
		display: flex !important;
		position: absolute !important;
		z-index: 2;
		top: 6px !important;
		right: 6px !important;
		align-items: center;
		justify-content: center;
		width: 36px !important;
		height: 36px !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: none !important;
		box-shadow: none !important;
		color: #fff !important;
		opacity: 1 !important;
		filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .6));
	}
	.dexnews .close:hover,
	.dexnews .close:focus {
		outline: 0;
		opacity: .8 !important;
	}
}
