Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

29.2 KB
Raw Blame
/*
 * Desktop widgets: frosted cards on the desktop and on the widgets board.
 * Colours come from the .os theme tokens (theme.css) so light and dark follow
 * the shell; the weather card paints its own sky from data-sky.
 */

.os {
	--wgx-radius: 20px;
	--wgx-glass: color-mix(in srgb, var(--card) 72%, transparent);
	--wgx-glass-2: color-mix(in srgb, var(--card) 88%, transparent);
	--wgx-line: color-mix(in srgb, var(--text) 10%, transparent);
	--wgx-soft: color-mix(in srgb, var(--text) 6%, transparent);
	--wgx-up: #2fbf71;
	--wgx-down: #f0524f;
	--wgx-shadow: 0 1px 0 color-mix(in srgb, #fff 8%, transparent) inset, 0 12px 32px -12px rgb(0 0 0 / 0.45);
}
[data-theme='light'] .os {
	--wgx-glass: color-mix(in srgb, #fff 66%, transparent);
	--wgx-glass-2: color-mix(in srgb, #fff 86%, transparent);
	--wgx-up: #12894c;
	--wgx-down: #c62f2c;
	--wgx-shadow: 0 1px 0 rgb(255 255 255 / 0.7) inset, 0 12px 30px -14px rgb(20 30 60 / 0.35);
}

/* ---------- the card ---------- */

.wgx {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	color: var(--text);
	background: var(--wgx-glass);
	backdrop-filter: blur(28px) saturate(1.6);
	-webkit-backdrop-filter: blur(28px) saturate(1.6);
	border: 1px solid var(--wgx-line);
	border-radius: var(--wgx-radius);
	box-shadow: var(--wgx-shadow);
	font-size: 13px;
	line-height: 1.35;
	transition:
		box-shadow var(--duration-fast),
		transform var(--duration-fast),
		border-color var(--duration-fast);
}
.wgx:hover {
	border-color: color-mix(in srgb, var(--text) 18%, transparent);
}
.wgx:focus-within {
	border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.wgx > header {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 8px 0 12px;
	min-height: 34px;
	flex: none;
}
.wgx-title {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	padding: 3px 6px 3px 0;
	border: 0;
	background: none;
	color: var(--text2);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	border-radius: 6px;
}
.wgx-title b {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-title:not(:disabled):hover {
	color: var(--text);
}
.wgx-title:disabled {
	cursor: default;
}
.wgx-more {
	margin-left: auto;
	display: grid;
	place-items: center;
	width: 28px;
	height: 26px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--text2);
	cursor: pointer;
	opacity: 0;
	transition:
		opacity var(--duration-fast),
		background var(--duration-fast);
}
.wgx:hover .wgx-more,
.wgx:focus-within .wgx-more,
.wgx-more[aria-expanded='true'] {
	opacity: 1;
}
.wgx-more:hover {
	background: var(--wgx-soft);
	color: var(--text);
}
.wgx-more:active {
	transform: scale(0.94);
}
.wgx-body {
	flex: 1;
	min-height: 0;
	padding: 6px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: hidden;
}
.wgx.stale > header::after {
	content: 'Stale';
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 99px;
	font-size: 10px;
	color: var(--text2);
	background: var(--wgx-soft);
}
.wgx :focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ---------- shared bits ---------- */

.wgx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 32px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid var(--wgx-line);
	background: var(--wgx-soft);
	color: var(--text);
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition:
		background var(--duration-fast),
		border-color var(--duration-fast),
		transform var(--duration-instant);
}
.wgx-btn:hover {
	background: color-mix(in srgb, var(--text) 11%, transparent);
}
.wgx-btn:active {
	transform: scale(0.97);
}
.wgx-btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.wgx-btn.primary {
	background: var(--accent);
	border-color: transparent;
	color: #fff;
}
.wgx-btn.primary:hover {
	background: color-mix(in srgb, var(--accent) 86%, #fff);
}
.wgx-btn.icon {
	width: 32px;
	padding: 0;
}
.wgx-btn.ghost {
	background: none;
	border-color: transparent;
	color: var(--text2);
}
.wgx-btn.ghost:hover {
	color: var(--text);
	background: var(--wgx-soft);
}
.wgx-mute {
	color: var(--text2);
	margin: 0;
	font-size: 12px;
}

.wgx-skel {
	display: grid;
	gap: 9px;
	padding-top: 4px;
}
.wgx-skel i {
	display: block;
	height: 14px;
	border-radius: 7px;
	background: linear-gradient(90deg, var(--wgx-soft) 0%, color-mix(in srgb, var(--text) 13%, transparent) 50%, var(--wgx-soft) 100%);
	background-size: 200% 100%;
	animation: wgx-shimmer 1.3s linear infinite;
}
.wgx-skel i:first-child {
	height: 26px;
	width: 62%;
}
.wgx-skel i:nth-child(3n) {
	width: 80%;
}
.wgx-skel.news i {
	height: 64px;
	width: auto;
	border-radius: 12px;
}
@keyframes wgx-shimmer {
	to {
		background-position: -200% 0;
	}
}

.wgx-off,
.wgx-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	color: var(--text2);
	font-size: 12.5px;
}
.wgx-off b {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text);
	font-size: 13px;
}
.wgx-empty.big {
	align-items: center;
	text-align: center;
	padding: 40px 12px;
	grid-column: 1 / -1;
}

/* ---------- $THREE ---------- */

.wgx-price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}
.wgx-price b {
	font-size: 28px;
	font-weight: 650;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.sz-s .wgx-price b {
	font-size: 21px;
}
.wgx-chg {
	padding: 2px 8px;
	border-radius: 99px;
	font-size: 12px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}
.wgx-chg.up {
	color: var(--wgx-up);
	background: color-mix(in srgb, var(--wgx-up) 15%, transparent);
}
.wgx-chg.down {
	color: var(--wgx-down);
	background: color-mix(in srgb, var(--wgx-down) 15%, transparent);
}
.wgx-chart {
	flex: 1;
	min-height: 36px;
	display: flex;
	margin: 0 -14px;
}
.wgx-chart.up {
	color: var(--wgx-up);
}
.wgx-chart.down {
	color: var(--wgx-down);
}
.wgx-spark {
	width: 100%;
	height: 100%;
	display: block;
}
.wgx-nochart {
	align-self: center;
	padding: 0 14px;
}
.wgx-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
	gap: 6px;
	margin: 0;
}
.wgx-facts div {
	min-width: 0;
}
.wgx-facts dt {
	color: var(--text2);
	font-size: 11px;
}
.wgx-facts dd {
	margin: 0;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}
.wgx-row-btns {
	display: flex;
	gap: 8px;
}
.wgx-row-btns .wgx-btn {
	flex: 1;
}

/* ---------- weather ---------- */

.t-weather {
	--sky-a: #3d7fd9;
	--sky-b: #78b6f5;
}
.t-weather[data-sky] {
	color: #fff;
	background: linear-gradient(160deg, var(--sky-a), var(--sky-b));
	border-color: rgb(255 255 255 / 0.18);
}
.t-weather[data-sky] .wgx-title,
.t-weather[data-sky] .wgx-more,
.t-weather[data-sky] .wgx-wx-meta,
.t-weather[data-sky] .wgx-hours small,
.t-weather[data-sky] .wgx-days small,
.t-weather[data-sky] .wgx-wx-label span {
	color: rgb(255 255 255 / 0.82);
}
.t-weather[data-sky] .wgx-more:hover {
	background: rgb(255 255 255 / 0.16);
	color: #fff;
}
.t-weather[data-sky^='sun'] {
	--sky-a: #2f80ed;
	--sky-b: #6fc3ff;
}
.t-weather[data-sky^='partly'] {
	--sky-a: #4a7fc8;
	--sky-b: #93bde8;
}
.t-weather[data-sky^='cloud'],
.t-weather[data-sky^='fog'] {
	--sky-a: #5f7088;
	--sky-b: #9aa9bd;
}
.t-weather[data-sky^='rain'] {
	--sky-a: #3a4e6e;
	--sky-b: #6b819f;
}
.t-weather[data-sky^='snow'] {
	--sky-a: #7a93b6;
	--sky-b: #c3d3e8;
}
.t-weather[data-sky^='storm'] {
	--sky-a: #2b2f4a;
	--sky-b: #555a7a;
}
.t-weather[data-sky$='night'],
.t-weather[data-sky^='moon'] {
	--sky-a: #141b3a;
	--sky-b: #3a3f7a;
}
.wgx-wx-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}
.wgx-wart {
	flex: none;
	filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.18));
}
.wgx-place-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	padding: 2px 6px 2px 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.wgx-place-btn:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.wgx-place-btn .ico {
	transform: rotate(90deg);
}
.wgx-temp {
	font-size: 40px;
	font-weight: 300;
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}
.sz-s .wgx-temp,
.t-weather.sz-m .wgx-temp {
	font-size: 34px;
}
.t-weather.sz-m .wgx-body {
	gap: 6px;
}
.t-weather.sz-m .wgx-hours {
	margin-top: auto;
}
.wgx-temp sup {
	font-size: 15px;
	font-weight: 500;
	vertical-align: top;
	margin-left: 2px;
	position: relative;
	top: 6px;
}
.wgx-wx-label {
	font-weight: 600;
}
.wgx-wx-label span {
	font-weight: 400;
	margin-left: 4px;
}
.wgx-wx-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 12px;
	color: var(--text2);
}
.wgx-hours,
.wgx-days {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: space-between;
	gap: 4px;
}
.wgx-hours li {
	display: grid;
	justify-items: center;
	gap: 2px;
	font-size: 12px;
}
.wgx-days {
	flex-direction: column;
	gap: 2px;
	margin-top: auto;
}
.wgx-days li {
	display: grid;
	grid-template-columns: 1fr auto 40px 34px;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
}
.wgx-days b,
.wgx-days small {
	text-align: right;
	font-variant-numeric: tabular-nums;
}
.wgx-place {
	display: grid;
	gap: 8px;
	align-content: start;
	font-size: 12.5px;
}
.wgx-place p {
	margin: 0;
	color: var(--text2);
}
.wgx-place-row {
	display: flex;
	gap: 6px;
}
.wgx-place input {
	flex: 1;
	min-width: 0;
	height: 32px;
	padding: 0 10px;
	border-radius: 10px;
	border: 1px solid var(--wgx-line);
	background: var(--wgx-glass-2);
	color: var(--text);
	font: inherit;
}
.wgx-place input:focus {
	outline: 2px solid var(--accent);
	outline-offset: 0;
}
.wgx-place ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 2px;
	max-height: 132px;
	overflow: auto;
}
.wgx-place li button {
	width: 100%;
	display: flex;
	gap: 6px;
	align-items: baseline;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.wgx-place li button:hover {
	background: var(--wgx-soft);
}
.wgx-place li span {
	color: var(--text2);
	font-size: 11.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-place-cancel {
	justify-self: start;
}

/* ---------- clock ---------- */

.wgx-clock {
	flex-direction: row;
	align-items: center;
	gap: 16px;
}
.wgx-clock.sz-s {
	flex-direction: column;
	justify-content: center;
	gap: 6px;
}
.wgx-clock .wgx-face {
	flex: none;
	width: 112px;
	height: 112px;
}
.wgx-clock.sz-s .wgx-face {
	width: 86px;
	height: 86px;
}
.wgx-clock.sz-l .wgx-face {
	width: 210px;
	height: 210px;
}
.wgx-clock.sz-l {
	flex-direction: column;
	justify-content: center;
}
.wgx-face .rim {
	fill: color-mix(in srgb, var(--text) 5%, transparent);
	stroke: color-mix(in srgb, var(--text) 14%, transparent);
	stroke-width: 1.5;
}
.wgx-face .ticks path {
	stroke: var(--text2);
	stroke-width: 2;
	stroke-linecap: round;
}
.wgx-face .hh,
.wgx-face .mh {
	stroke: var(--text);
	stroke-linecap: round;
}
.wgx-face .hh {
	stroke-width: 4.5;
}
.wgx-face .mh {
	stroke-width: 3;
}
.wgx-face .sh {
	stroke: var(--accent);
	stroke-width: 1.5;
	stroke-linecap: round;
}
.wgx-face .hub {
	fill: var(--accent);
}
.wgx-clock-txt {
	display: grid;
	gap: 2px;
	min-width: 0;
}
.wgx-clock-txt b {
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.wgx-clock-txt span {
	color: var(--text2);
}
.wgx-clock-txt small {
	color: var(--text2);
	font-size: 11px;
}
.wgx-clock.sz-s .wgx-clock-txt {
	text-align: center;
}
.wgx-clock.sz-s .wgx-clock-txt b {
	font-size: 15px;
}
.wgx-clock.sz-s .wgx-clock-txt span,
.wgx-clock.sz-s .wgx-clock-txt small {
	display: none;
}
.wgx-clock.sz-l .wgx-clock-txt {
	text-align: center;
}

/* ---------- calendar ---------- */

.wgx-cal-today {
	display: flex;
	align-items: center;
	gap: 12px;
}
.wgx-cal-today b {
	font-size: 40px;
	font-weight: 300;
	line-height: 1;
	color: var(--accent);
}
.wgx-cal-today span {
	display: grid;
	font-weight: 600;
}
.wgx-cal-today small {
	font-weight: 400;
	color: var(--text2);
}
.wgx-cal-week {
	list-style: none;
	margin: auto 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	text-align: center;
}
.wgx-cal-week li {
	display: grid;
	gap: 2px;
	padding: 6px 0;
	border-radius: 10px;
}
.wgx-cal-week small {
	color: var(--text2);
	font-size: 11px;
}
.wgx-cal-week .today {
	background: var(--accent);
	color: #fff;
}
.wgx-cal-week .today small {
	color: rgb(255 255 255 / 0.85);
}
.wgx-cal-week .mute {
	opacity: 0.5;
}
.wgx-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.wgx-cal-head > span {
	display: flex;
	gap: 2px;
}
.wgx-cal-head .wgx-btn {
	width: 28px;
	height: 28px;
	background: none;
	border-color: transparent;
}
.wgx-cal-head .wgx-btn:hover {
	background: var(--wgx-soft);
}
.wgx-cal-grid {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	grid-auto-rows: 1fr;
	align-items: center;
	text-align: center;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}
.wgx-cal-grid i {
	font-style: normal;
	color: var(--text2);
	font-size: 11px;
}
.wgx-cal-grid b {
	font-weight: 500;
	justify-self: center;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
}
.wgx-cal-grid b.mute {
	opacity: 0.4;
}
.wgx-cal-grid b.today {
	background: var(--accent);
	color: #fff;
	font-weight: 700;
}

/* ---------- lists (agents, pulse, launches, news) ---------- */

.wgx-list,
.wgx-news,
.wgx-faces,
.wgx-stats,
.wgx-sysl {
	list-style: none;
	margin: 0;
	padding: 0;
}
.wgx-list {
	display: grid;
	gap: 2px;
	margin: 0 -8px;
}
.wgx-list a,
.wgx-list button {
	width: 100%;
	display: grid;
	grid-template-columns: 32px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.wgx-list a:hover,
.wgx-list button:hover {
	background: var(--wgx-soft);
}
.wgx-list a:active,
.wgx-list button:active {
	background: color-mix(in srgb, var(--text) 10%, transparent);
}
.wgx-list span {
	display: grid;
	min-width: 0;
}
.wgx-list b,
.wgx-list small {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-list b {
	font-weight: 600;
}
.wgx-list b em {
	font-style: normal;
	font-weight: 500;
	color: var(--text2);
	font-size: 11.5px;
}
.wgx-list small,
.wgx-list time {
	color: var(--text2);
	font-size: 11.5px;
}
.wgx-av,
.wgx-fav {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--wgx-soft);
}
.wgx-av.ph,
.wgx-fav.ph {
	display: grid;
	place-items: center;
	font-style: normal;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--theme-1, #ad6eca), var(--theme-2, #3b91d8));
}
.wgx-faces {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-content: center;
	gap: 6px;
}
.wgx-faces button {
	width: 100%;
	display: grid;
	justify-items: center;
	gap: 6px;
	padding: 6px 2px;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--text);
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
}
.wgx-faces button:hover {
	background: var(--wgx-soft);
}
.wgx-faces .wgx-fav {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	font-size: 18px;
}
.wgx-faces span {
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- platform ---------- */

.wgx-stats {
	flex: 1;
	display: grid;
	align-content: center;
	gap: 8px;
}
.wgx-stats li {
	display: grid;
	grid-template-columns: 18px auto 1fr;
	align-items: baseline;
	gap: 8px;
	color: var(--text2);
}
.wgx-stats li .ico {
	align-self: center;
	color: var(--accent);
}
.wgx-stats b {
	color: var(--text);
	font-size: 20px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}
.wgx-stats.tight {
	gap: 3px;
}
.wgx-stats.tight li {
	grid-template-columns: 16px auto;
	row-gap: 0;
}
.wgx-stats.tight b {
	font-size: 16px;
	line-height: 1.2;
}
.wgx-stats.tight span {
	grid-column: 2;
	font-size: 10.5px;
	line-height: 1.2;
}

/* ---------- news ---------- */

.wgx-lead {
	position: relative;
	display: block;
	flex: none;
	height: 150px;
	margin: 0 -6px;
	border-radius: 14px;
	overflow: hidden;
	color: #fff;
	text-decoration: none;
	background: var(--wgx-soft);
}
.wgx-lead img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--duration-slow);
}
.wgx-lead:hover img {
	transform: scale(1.04);
}
.wgx-lead span {
	position: absolute;
	inset: auto 0 0;
	display: grid;
	gap: 2px;
	padding: 28px 12px 10px;
	background: linear-gradient(transparent, rgb(0 0 0 / 0.78));
}
.wgx-lead b {
	font-size: 13.5px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wgx-lead small {
	opacity: 0.85;
	font-size: 11px;
}
.wgx-news {
	display: grid;
	gap: 2px;
	margin: 0 -8px;
}
.wgx-news a {
	display: grid;
	gap: 2px;
	padding: 6px 8px;
	border-radius: 10px;
	color: var(--text);
	text-decoration: none;
}
.wgx-news a:hover {
	background: var(--wgx-soft);
}
.wgx-news b {
	font-weight: 600;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wgx-news small {
	color: var(--text2);
	font-size: 11px;
}

/* ---------- system ---------- */

.wgx-sysl {
	display: grid;
	gap: 10px;
	align-content: center;
	flex: 1;
}
.wgx-sysl li {
	display: grid;
	grid-template-columns: 18px 1fr;
	gap: 10px;
	align-items: start;
}
.wgx-sysl li .ico {
	color: var(--accent);
	margin-top: 2px;
}
.wgx-sysl span {
	display: grid;
	gap: 2px;
	min-width: 0;
}
.wgx-sysl small {
	color: var(--text2);
	font-size: 11px;
}
.wgx-sysl b {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-meter {
	display: block;
	height: 5px;
	border-radius: 3px;
	background: var(--wgx-soft);
	overflow: hidden;
	margin-top: 3px;
}
.wgx-meter s {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--theme-1, #ad6eca), var(--theme-2, #3b91d8));
}

/* ---------- note ---------- */

.t-note {
	background: color-mix(in srgb, #ffd95a 30%, var(--wgx-glass));
}
.wgx-note {
	padding: 4px 8px 8px;
}
.wgx-note textarea {
	flex: 1;
	width: 100%;
	resize: none;
	padding: 6px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--text);
	font: inherit;
	font-size: 14px;
	line-height: 1.5;
}
.wgx-note textarea:focus {
	outline: none;
	background: var(--wgx-soft);
}
.wgx-note textarea::placeholder {
	color: var(--text2);
}

/* ---------- desktop layer ---------- */

.wgx-desk {
	position: absolute;
	inset: 12px 12px 84px 120px;
	pointer-events: none;
	z-index: 1;
}
.wgx-desk > .wgx {
	position: absolute;
	pointer-events: auto;
	animation: wgx-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
	transition:
		right var(--duration-base) var(--ease-standard),
		top var(--duration-base) var(--ease-standard),
		width var(--duration-base),
		height var(--duration-base),
		box-shadow var(--duration-fast),
		border-color var(--duration-fast);
}
.wgx-desk > .wgx > header {
	cursor: grab;
	touch-action: none;
}
.wgx-desk > .wgx.dragging {
	transition: none;
	z-index: 3;
	cursor: grabbing;
	box-shadow: 0 28px 60px -18px rgb(0 0 0 / 0.55);
	transform: scale(1.02);
}
.wgx-desk > .wgx.dragging > header {
	cursor: grabbing;
}
@keyframes wgx-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.97);
	}
}
.wgx-ghost {
	position: absolute;
	border-radius: var(--wgx-radius);
	border: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent);
	background: color-mix(in srgb, var(--accent) 12%, transparent);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--duration-fast);
}
.wgx-ghost.on {
	opacity: 1;
}
.wgx-x {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: none;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid var(--wgx-line);
	background: var(--wgx-glass-2);
	color: var(--text);
	cursor: pointer;
}
.wgx-x:hover {
	background: var(--wgx-down);
	border-color: transparent;
	color: #fff;
}
.wgx-desk.editing > .wgx {
	outline: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent);
	outline-offset: 3px;
}
.wgx-desk.editing .wgx-x {
	display: grid;
}
.wgx-desk.editing .wgx-more {
	opacity: 1;
	margin-right: 26px;
}
.wgx-editbar {
	position: absolute;
	left: 50%;
	bottom: 8px;
	display: flex;
	gap: 8px;
	padding: 8px;
	border-radius: 16px;
	background: var(--wgx-glass-2);
	backdrop-filter: blur(28px) saturate(1.6);
	-webkit-backdrop-filter: blur(28px) saturate(1.6);
	border: 1px solid var(--wgx-line);
	box-shadow: var(--wgx-shadow);
	pointer-events: auto;
	transform: translate(-50%, 16px);
	opacity: 0;
	visibility: hidden;
	transition:
		transform var(--duration-base),
		opacity var(--duration-base),
		visibility var(--duration-base);
}
.wgx-desk.editing .wgx-editbar {
	transform: translate(-50%, 0);
	opacity: 1;
	visibility: visible;
}
.wgx-desk.editing.empty .wgx-editbar::before {
	content: 'Your desktop has no widgets.';
	align-self: center;
	padding: 0 6px;
	color: var(--text2);
	font-size: 12.5px;
}

/* ---------- menu ---------- */

.wgx-menu {
	position: fixed;
	z-index: 10010;
	min-width: 200px;
	padding: 5px;
	border-radius: 12px;
	background: var(--wgx-glass-2);
	backdrop-filter: blur(30px) saturate(1.6);
	-webkit-backdrop-filter: blur(30px) saturate(1.6);
	border: 1px solid var(--wgx-line);
	box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.5);
	animation: wgx-pop 0.14s ease-out;
	color: var(--text);
}
.wgx-menu button {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 13px;
	text-align: left;
	cursor: pointer;
}
.wgx-menu button span {
	flex: 1;
}
.wgx-menu button:hover,
.wgx-menu button:focus-visible {
	background: var(--wgx-soft);
	outline: none;
}
.wgx-menu button:active {
	background: color-mix(in srgb, var(--text) 12%, transparent);
}
.wgx-menu button.on > .ico:last-child {
	color: var(--accent);
}
.wgx-menu hr {
	border: 0;
	border-top: 1px solid var(--wgx-line);
	margin: 4px 6px;
}
@keyframes wgx-pop {
	from {
		opacity: 0;
		transform: scale(0.97);
	}
}

/* ---------- Add widget gallery ---------- */

.wgx-gallery-back {
	position: fixed;
	inset: 0;
	z-index: 10012;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgb(0 0 0 / 0.32);
	animation: wgx-fade 0.16s ease-out;
}
@keyframes wgx-fade {
	from {
		opacity: 0;
	}
}
.wgx-gallery {
	width: min(760px, 100%);
	max-height: min(600px, 100%);
	display: flex;
	flex-direction: column;
	border-radius: 18px;
	background: var(--wgx-glass-2);
	backdrop-filter: blur(40px) saturate(1.6);
	-webkit-backdrop-filter: blur(40px) saturate(1.6);
	border: 1px solid var(--wgx-line);
	box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
	color: var(--text);
	overflow: hidden;
	animation: wgx-pop 0.18s ease-out;
}
.wgx-gallery > header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 14px 10px 20px;
	font-size: 15px;
}
.wgx-gal-main {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: 250px 1fr;
	border-top: 1px solid var(--wgx-line);
}
.wgx-gal-list {
	list-style: none;
	margin: 0;
	padding: 8px;
	overflow: auto;
	border-right: 1px solid var(--wgx-line);
}
.wgx-gal-list button {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.wgx-gal-list button > .ico {
	flex: none;
	color: var(--accent);
}
.wgx-gal-list button span {
	display: grid;
	min-width: 0;
}
.wgx-gal-list small {
	color: var(--text2);
	font-size: 11.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-gal-list button:hover {
	background: var(--wgx-soft);
}
.wgx-gal-list button[aria-selected='true'] {
	background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.wgx-gal-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 20px;
	min-height: 0;
	overflow: auto;
	background:
		radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--theme-1, #ad6eca) 22%, transparent), transparent 60%),
		radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--theme-2, #3b91d8) 22%, transparent), transparent 60%);
}
.wgx-gal-stage {
	display: grid;
	place-items: center;
	min-height: 350px;
}
.wgx-gal-stage .wgx {
	width: 168px;
	height: 168px;
}
.wgx-gal-stage .wgx.sz-m {
	width: 350px;
}
.wgx-gal-stage .wgx.sz-l {
	width: 350px;
	height: 350px;
}
.wgx-gal-sizes {
	display: flex;
	gap: 4px;
	padding: 3px;
	border-radius: 11px;
	background: var(--wgx-soft);
}
.wgx-gal-sizes button {
	padding: 5px 14px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--text2);
	font: inherit;
	font-size: 12.5px;
	cursor: pointer;
}
.wgx-gal-sizes button:hover {
	color: var(--text);
}
.wgx-gal-sizes button[aria-checked='true'] {
	background: var(--wgx-glass-2);
	color: var(--text);
	font-weight: 600;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

/* ---------- widgets board ---------- */

.wgx-board {
	position: absolute;
	left: 50%;
	z-index: 10001;
	width: min(900px, calc(100vw - 16px));
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0;
	border-radius: 22px;
	background: color-mix(in srgb, var(--bg) 52%, transparent);
	backdrop-filter: blur(48px) saturate(1.8);
	-webkit-backdrop-filter: blur(48px) saturate(1.8);
	border: 1px solid var(--wgx-line);
	box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
	overflow: hidden;
	transform: translate(-50%, 24px);
	opacity: 0;
	transition:
		transform var(--duration-base) var(--ease-standard),
		opacity var(--duration-base);
}
.wgx-board.in {
	transform: translate(-50%, 0);
	opacity: 1;
}
.wgx-board.out {
	transform: translate(-50%, 18px);
	opacity: 0;
	transition-duration: var(--duration-fast);
}
.wgx-col {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
}
.wgx-col-w {
	width: calc(168px * 2 + 14px + 36px);
	border-right: 1px solid var(--wgx-line);
}
.wgx-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 18px 10px;
	flex: none;
}
.wgx-hello {
	display: grid;
	min-width: 0;
}
.wgx-hello b {
	font-size: 17px;
	font-weight: 650;
}
.wgx-hello small {
	color: var(--text2);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wgx-grid {
	display: grid;
	grid-template-columns: repeat(2, 168px);
	grid-auto-rows: 168px;
	grid-auto-flow: row dense;
	gap: 14px;
	padding: 4px 18px 18px;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}
.wgx-grid > .wgx.sz-m {
	grid-column: span 2;
}
.wgx-grid > .wgx.sz-l {
	grid-column: span 2;
	grid-row: span 2;
}
.wgx-feed {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	align-content: start;
	gap: 12px;
	padding: 4px 18px 18px;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}
.wgx-feed > .wgx-skel,
.wgx-feed > .wgx-off,
.wgx-feed > .wgx-empty {
	grid-column: 1 / -1;
}
.wgx-story {
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	overflow: hidden;
	background: var(--wgx-glass);
	border: 1px solid var(--wgx-line);
	color: var(--text);
	text-decoration: none;
	transition:
		transform var(--duration-fast),
		border-color var(--duration-fast),
		background var(--duration-fast);
}
.wgx-story:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--text) 20%, transparent);
	background: var(--wgx-glass-2);
}
.wgx-story:active {
	transform: none;
}
.wgx-story:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.wgx-story img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var(--wgx-soft);
}
.wgx-story > span {
	display: grid;
	gap: 4px;
	padding: 10px 12px 12px;
}
.wgx-story small {
	color: var(--text2);
	font-size: 11px;
}
.wgx-story b {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wgx-story em {
	font-style: normal;
	color: var(--text2);
	font-size: 12px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wgx-story.lead {
	grid-column: 1 / -1;
	position: relative;
}
.wgx-story.lead img {
	aspect-ratio: 21 / 9;
}
.wgx-story.lead b {
	font-size: 17px;
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
	.wgx-board {
		grid-template-columns: 1fr;
		overflow: auto;
	}
	.wgx-col-w {
		width: auto;
		border-right: 0;
		border-bottom: 1px solid var(--wgx-line);
	}
	.wgx-grid,
	.wgx-feed {
		overflow: visible;
	}
	.wgx-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: minmax(150px, auto);
	}
	.wgx-grid > .wgx.sz-l {
		grid-row: span 2;
	}
}
@media (max-width: 640px) {
	.wgx-desk {
		display: none;
	}
	.wgx-gal-main {
		grid-template-columns: 1fr;
		overflow: auto;
	}
	.wgx-gal-list {
		border-right: 0;
		border-bottom: 1px solid var(--wgx-line);
		max-height: 220px;
	}
	.wgx-gal-stage {
		min-height: 0;
		transform: scale(0.85);
	}
	.wgx-gal-stage .wgx.sz-m,
	.wgx-gal-stage .wgx.sz-l {
		width: min(350px, 86vw);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wgx,
	.wgx-desk > .wgx,
	.wgx-board,
	.wgx-editbar,
	.wgx-story,
	.wgx-lead img,
	.wgx-menu,
	.wgx-gallery,
	.wgx-gallery-back {
		animation: none;
		transition: none;
	}
	.wgx-skel i {
		animation: none;
	}
}