/* Keep the search and the result in normal flow inside the theme's main region. */
main#sx-explorer {
	display: block;
	width: min(100%, 1120px);
	max-width: 1120px;
	margin: 0 auto;
	padding: clamp(26px, 3.5vw, 52px) clamp(16px, 3vw, 40px) 64px;
	box-sizing: border-box;
	text-align: left;
	--sx-muted: #b5b0bd;
	--sx-line: #39353e;
	--sx-surface: #1b191e;
	--sx-link: #d4bafa;
}
#sx-explorer *, #sx-explorer *::before { box-sizing: border-box; }
#sx-explorer .sx-hero { display: block; position: static; margin: 0; padding: 0; background: none; }
#sx-explorer h1, #sx-explorer h2 { color: inherit; font-weight: 650; letter-spacing: -.04em; text-align: left; }
#sx-explorer h1 { margin: 0; font-size: clamp(36px, 4.2vw, 56px); line-height: 1.08; word-break: normal; }
#sx-explorer p { text-align: left; }
#sx-explorer .sx-intro { margin: 8px 0 20px; font-size: 17px; line-height: 1.5; color: var(--sx-muted); }
#sx-form { display: block; margin: 0; }
#sx-form label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 600; }
#sx-form .sx-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#sx-form #sx-reference, #sx-form button { height: 48px; margin: 0; border-radius: 9px; font: inherit; }
#sx-form #sx-reference { width: 100%; min-width: 0; padding: 0 15px; background: #201e23; border: 1px solid #59525f; color: #f5f2f8; }
#sx-reference::placeholder { color: #b3aeb9; opacity: 1; }
#sx-form button { padding: 0 20px; background: #7443a8; color: white; border: 1px solid #8858b8; font-weight: 650; cursor: pointer; }
#sx-form button:hover { background: #8652ba; }
#sx-form button span { margin-left: 6px; }
.sx-guidance { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 16px; margin-top: 8px; }
#sx-help, #sx-explorer .sx-example, #sx-caption { margin: 0; font-size: 13px; line-height: 1.5; color: var(--sx-muted); }
#sx-explorer .sx-example, #sx-status a { color: var(--sx-link); text-decoration: underline; text-underline-offset: 3px; }
#sx-status { margin: 10px 0 0; }
#sx-status:empty { margin: 0; }
#sx-result[hidden] { display: none; }
#sx-explorer:has(#sx-result:not([hidden])) #sx-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#sx-result {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	align-items: start;
	gap: clamp(20px, 3vw, 40px);
	padding: clamp(16px, 2.3vw, 28px);
	margin: 26px 0 0;
	border: 1px solid var(--sx-line);
	border-radius: 18px;
	background: var(--sx-surface);
	color: #f6f3f8;
	scroll-margin-top: 90px;
}
#sx-result .sx-art, #sx-result .sx-details { min-width: 0; margin: 0; }
#sx-media:not(:empty) { display: grid; place-items: center; padding: 18px; border-radius: 10px; background: #100f12; }
#sx-media img, #sx-media video { display: block; width: auto; height: auto; max-width: 100%; max-height: 365px; object-fit: contain; }
#sx-media audio { max-width: 100%; }
#sx-caption { display: block; margin-top: 8px; }
#sx-result:has(#sx-media:empty) { grid-template-columns: 1fr; gap: 14px; }
#sx-result:has(#sx-media:empty) .sx-art { order: 2; }
#sx-explorer #sx-title { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.15; overflow-wrap: anywhere; }
#sx-description { margin: 12px 0 0; line-height: 1.55; }
#sx-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 14px 0 0; }
.sx-fact { grid-column: span 2; min-width: 0; border-top: 1px solid var(--sx-line); padding: 9px 0; }
.sx-fact-state { grid-column: span 1; border-top: 0; padding-top: 0; }
#sx-facts dt { margin: 0 0 3px; font-size: 12px; line-height: 1.4; font-weight: 500; color: var(--sx-muted); }
#sx-facts dd { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
#sx-facts .sx-fact-id dd { font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.5; }
#sx-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#sx-links a { display: inline-block; padding: 7px 12px; color: var(--sx-link); background: #28222e; border: 1px solid #4a3a57; border-radius: 8px; font-weight: 600; text-decoration: none; }
#sx-links a:hover { background: #362a40; }
#sx-explorer :is(a, button, input):focus-visible { outline: 2px solid #ca9df6; outline-offset: 3px; }
#sx-title:focus { outline: none; }
@media (max-width: 699px) {
	#sx-result { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	#sx-media img, #sx-media video { max-height: 325px; }
	#sx-form #sx-reference { font-size: 16px; }
}
@media (max-width: 480px) {
	#sx-form .sx-input-row { grid-template-columns: 1fr; }
	#sx-result { margin-top: 20px; }
}
#sx-history { grid-column: 1 / -1; order: 3; min-width: 0; padding-top: 20px; border-top: 1px solid var(--sx-line); }
#sx-history[hidden], #sx-history-note:empty { display: none; }
#sx-history h3 { margin: 0 0 18px; font-size: 23px; line-height: 1.2; color: inherit; text-align: left; }
#sx-events { list-style: none; margin: 0; padding: 0; }
#sx-events li { position: relative; margin: 0 0 0 5px; padding: 0 0 22px 20px; border-left: 1px solid #665671; }
#sx-events li:last-child { padding-bottom: 0; border-color: transparent; }
#sx-events li::before { content: ''; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; background: #caa6ef; border-radius: 50%; }
#sx-events strong, #sx-events time { display: block; }
#sx-events time { font-size: 13px; color: var(--sx-muted); margin: 2px 0 7px; }
.sx-wallet { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; font-size: 13px; }
.sx-wallet span { min-width: 38px; color: var(--sx-muted); }
.sx-wallet code { padding: 0; background: transparent; color: inherit; font: 13px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; }
.sx-evidence { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; }
.sx-evidence a { color: var(--sx-link); text-decoration: underline; text-underline-offset: 3px; }
#sx-history-note { margin: 14px 0 0; color: var(--sx-muted); }
#sx-explorer [hidden] { display: none !important; }
#sx-back { display: inline-block; margin-top: 12px; }
#sx-browse { margin-top: 28px; padding: clamp(15px,2.4vw,28px); background: var(--sx-surface); border: 1px solid var(--sx-line); border-radius: 16px; }
.sx-browse-head, #sx-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sx-browse-head h2 { margin: 0; font-size: 28px; }
#sx-wallet-id, #sx-coverage, #sx-count, #sx-pages span { color: var(--sx-muted); font-size: 13px; }
#sx-wallet-id { overflow-wrap: anywhere; font-family: ui-monospace,monospace; }
#sx-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 18px 0; }
#sx-filters label { display: grid; gap: 4px; font-size: 13px; }
#sx-filters :is(select,input,button) { min-height: 40px; width: auto; padding: 5px 10px; background: #26232b; color: #f3eef9; border: 1px solid #58515f; border-radius: 7px; color-scheme: dark; }
#sx-filters button { background: #6d4098; cursor: pointer; }
.sx-entry { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; align-items: center; border-top: 1px solid var(--sx-line); padding: 10px 0; }
.sx-thumb { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 7px; overflow: hidden; background: #2c2631; color: var(--sx-link); font-size: 22px; }
.sx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sx-entry-info { min-width: 0; overflow-wrap: anywhere; }
.sx-entry-info a { font-weight: 650; color: #f6f1fa; }
.sx-entry-info small { display: block; color: var(--sx-muted); font-size: 12px; }
.sx-kind { color: #d6c4e7; font-size: 13px; }
#sx-pages { margin-top: 12px; }
#sx-coverage { margin-top: 14px; }
#sx-explorer :is(.sx-wallet,#sx-pages,.sx-proof,#sx-latest) a { color: var(--sx-link); text-decoration: underline; text-underline-offset: 3px; }
#sx-explorer #sx-latest { margin: 10px 0; }
#sx-events strong small { margin-left: 8px; font-size: 12px; font-weight: 450; color: #ddc7ef; }
#sx-events details { margin-top: 7px; }
#sx-events summary { cursor: pointer; color: var(--sx-link); font-size: 14px; }
.sx-proof { margin: 8px 0; border-left: 2px solid #5c4d68; padding-left: 12px; }
#sx-explorer .sx-proof p { margin: 4px 0; font-size: 13px; }
@media(max-width: 599px) {
	.sx-entry {grid-template-columns: 40px minmax(0,1fr);gap: 2px 9px;}
	.sx-thumb {grid-row: span 2;width:40px;height:40px;}
	.sx-kind {grid-column:2;}
	#sx-filters label { flex: 1 1 40%; min-width: 0; }
	#sx-filters select { width: 100%; min-width: 0; }
}

.sx-entry-info .sx-row-wallets a { color: var(--sx-link); font-weight: 450; }
