#os-view {
	position: fixed;
	inset: 0;
	z-index: 2;
	min-height: 0;
	overflow: hidden;
}

#os-desktop {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: radial-gradient(120% 90% at 18% 0%, var(--accent-soft), transparent 55%), var(--bg-deep);
	user-select: none;
}

#os-desktop.os-theme-wallpaper {
	background:
		radial-gradient(120% 90% at 18% 0%, var(--accent-soft), transparent 55%),
		radial-gradient(90% 70% at 92% 100%, var(--accent-soft), transparent 60%),
		var(--bg-deep);
}

#os-desktop.os-refresh-flash {
	animation: osRefresh 0.26s ease;
}

@keyframes osRefresh {
	0% {
		filter: brightness(1);
	}
	40% {
		filter: brightness(1.16);
	}
	100% {
		filter: brightness(1);
	}
}

#os-windows-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}


#os-windows-layer.dock-bottom,
#os-windows-layer.dock-floating {
	bottom: 56px;
}

#os-windows-layer.dock-left {
	left: 56px;
}

#os-windows-layer.dock-right {
	right: 56px;
}

.os-wallpaper-mark {
	position: absolute;
	left: 5%;
	bottom: 9%;
	z-index: 0;
	font-family: var(--font-script);
	font-weight: 700;
	font-size: clamp(3rem, 9vw, 7.5rem);
	color: var(--text);
	letter-spacing: 0.01em;
	opacity: 0.1;
	pointer-events: none;
	user-select: none;
	display: none;
}

#os-desktop.os-theme-wallpaper .os-wallpaper-mark {
	display: block;
}

.os-boot {
	position: absolute;
	inset: 0;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-deep);
	transition: opacity 0.32s ease;
}

.os-boot.os-boot-out {
	opacity: 0;
	pointer-events: none;
}

.os-panic {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	color: #c8c8c8;
	font-family: var(--font-mono);
	font-size: 0.86rem;
	padding: 40px;
}

.os-panic-inner {
	width: 100%;
	max-width: 760px;
}

.os-panic-log div {
	white-space: pre-wrap;
	word-break: break-word;
	line-height: 1.55;
}

.os-panic-log div:last-child {
	color: #eee;
	margin-top: 6px;
	animation: os-panic-blink 1s step-end infinite;
}

@keyframes os-panic-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.os-panic-repairing {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	color: #ddd;
}

.os-panic-spinner {
	width: 34px;
	height: 34px;
	border: 3px solid rgba(255, 255, 255, 0.15);
	border-top-color: #ddd;
	border-radius: 50%;
	animation: os-panic-spin 0.9s linear infinite;
}

@keyframes os-panic-spin {
	to { transform: rotate(360deg); }
}

#os-desktop-icons {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-content: flex-start;
	padding: 14px;
	gap: 2px;
	pointer-events: none;
}

.os-desktop-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 84px;
	padding: 8px 4px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: default;
	user-select: none;
	pointer-events: auto;
	outline: none;
}

.os-desktop-icon-glyph {
	font-size: 34px;
	line-height: 1;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.os-desktop-icon-label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.74rem;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
	text-align: center;
}

.os-desktop-icon:hover {
	background: rgba(255, 255, 255, 0.08);
}

.os-desktop-icon.selected {
	background: var(--accent-soft);
	border-color: var(--accent-line);
}

.os-desktop-icon-rename {
	width: 100%;
	padding: 1px 3px;
	font: inherit;
	font-size: 0.74rem;
	text-align: center;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--accent);
	border-radius: 3px;
	outline: none;
}

.os-boot-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	width: 260px;
}

.os-boot-logo {
	font-family: var(--font-script);
	font-size: 2.6rem;
	font-weight: 700;
	color: var(--text);
	animation: osBootPulse 1.6s ease-in-out infinite;
}

@keyframes osBootPulse {
	0%,
	100% {
		opacity: 0.82;
	}
	50% {
		opacity: 1;
	}
}

.os-boot-bar {
	width: 100%;
	height: 3px;
	overflow: hidden;
	background: var(--surface-2);
	border-radius: 99px;
}

.os-boot-bar-fill {
	width: 0%;
	height: 100%;
	background: var(--accent);
	border-radius: 99px;
	transition: width 1.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.os-boot-status {
	font-size: 0.78rem;
	color: var(--text-faint);
}

.os-window {
	position: absolute;
	display: flex;
	flex-direction: column;
	min-width: 380px;
	min-height: 260px;
	overflow: hidden;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	pointer-events: auto;
	transform: translateZ(0);
	animation: osWindowIn 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes osWindowIn {
	from {
		opacity: 0;
		transform: translateZ(0) scale(0.97) translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateZ(0) scale(1) translateY(0);
	}
}

.os-window.focused {
	border-color: var(--accent-line);
	box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-line);
}

.os-window-maximized {
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	border-radius: 0;
	cursor: default !important;
}

.os-window-titlebar {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	height: 42px;
	padding: 0 9px 0 13px;
	background: var(--surface-2);
	border-bottom: 1px solid var(--border);
	touch-action: none;
}

.os-window-icon {
	display: flex;
	align-items: center;
	width: 19px;
	height: 19px;
	margin-right: 10px;
}

.os-window-icon svg {
	width: 100%;
	height: 100%;
}

.os-window-title {
	overflow: hidden;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-dim);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.os-window.focused .os-window-title {
	color: var(--text);
}

.os-window-controls {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.os-win-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: var(--text-faint);
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.os-win-btn:hover {
	color: var(--text);
	background: var(--surface-3);
}

.os-win-close:hover {
	color: #fff;
	background: #e5484d;
}

.os-window-body {
	position: relative;
	flex: 1;
	min-height: 0;
	margin: 0 8px 8px 0;
	overflow: hidden;
	background: var(--bg);
	border-radius: 0 0 var(--radius) 0;
}

.os-window-maximized .os-window-body {
	margin: 0;
	border-radius: 0;
}

#os-windows-layer.os-interacting .os-window-body {
	pointer-events: none;
}

#os-windows-layer.os-interacting {
	user-select: none;
}

.os-window-dragging {
	will-change: transform;
}

#os-taskbar-hotzone {
	position: absolute;
	z-index: 899;
}

#os-taskbar-hotzone.dock-bottom {
	right: 0;
	bottom: 0;
	left: 0;
	height: 10px;
}

#os-taskbar-hotzone.dock-floating {
	right: 0;
	bottom: 0;
	left: 0;
	height: 10px;
}

#os-taskbar-hotzone.dock-left {
	top: 0;
	bottom: 0;
	left: 0;
	width: 10px;
}

#os-taskbar-hotzone.dock-right {
	top: 0;
	bottom: 0;
	right: 0;
	width: 10px;
}


#os-taskbar {
	position: absolute;
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 5px;
	background: rgba(16, 16, 18, 0.78);
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow-lg);
	backdrop-filter: blur(10px) saturate(1.5);
	transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-mode="light"] #os-taskbar {
	background: rgba(255, 255, 255, 0.82);
}

#os-taskbar.dock-floating {
	bottom: 8px;
	left: 50%;
	border-radius: 12px;
	--tb-hide: translate(-50%, calc(100% - 6px));
	--tb-show: translate(-50%, 0);
	transform: var(--tb-hide);
}

#os-taskbar.dock-bottom {
	left: 0;
	right: 0;
	bottom: 0;
	padding: 5px 14px;
	border-width: 1px 0 0 0;
	border-radius: 0;
	--tb-hide: translateY(calc(100% - 6px));
	--tb-show: translateY(0);
	transform: var(--tb-hide);
}

#os-taskbar.dock-left {
	top: 0;
	bottom: 0;
	left: 0;
	flex-direction: column;
	padding: 10px 5px;
	border-width: 0 1px 0 0;
	border-radius: 0;
	--tb-hide: translateX(calc(-100% + 6px));
	--tb-show: translateX(0);
	transform: var(--tb-hide);
}

#os-taskbar.dock-right {
	top: 0;
	bottom: 0;
	right: 0;
	flex-direction: column;
	padding: 10px 5px;
	border-width: 0 0 0 1px;
	border-radius: 0;
	--tb-hide: translateX(calc(100% - 6px));
	--tb-show: translateX(0);
	transform: var(--tb-hide);
}


#os-taskbar.peek,
#os-taskbar.menu-open,
#os-taskbar.os-no-autohide {
	transform: var(--tb-show);
}

.os-start-btn {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: var(--text);
	background: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.os-start-btn:hover,
#os-taskbar.menu-open .os-start-btn {
	color: var(--accent);
	background: var(--accent-soft);
}

.os-taskbar-apps {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 0 4px;
	min-width: 0;
}

#os-taskbar.dock-left .os-taskbar-apps,
#os-taskbar.dock-right .os-taskbar-apps {
	flex-direction: column;
	padding: 4px 0;
}

#os-taskbar.dock-bottom .os-taskbar-apps {
	flex: 1;
	min-width: 0;
}

.os-taskbar-app {
	position: relative;
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 8px;
	height: 38px;
	padding: 0 10px 0 7px;
	background: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.os-taskbar-app-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.os-taskbar-app-icon svg,
.os-taskbar-app-icon img {
	display: block;
	width: 100%;
	height: 100%;
}

.os-taskbar-app .app-label {
	overflow: hidden;
	max-width: 130px;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-dim);
	white-space: nowrap;
	text-overflow: ellipsis;
	transition: color var(--ease);
}

#os-taskbar.icons-only .os-taskbar-app .app-label {
	display: none;
}

.os-taskbar-app:hover {
	background: var(--surface-3);
}

.os-taskbar-app:hover .app-label {
	color: var(--text);
}

.os-taskbar-app.focused {
	background: var(--accent-soft);
}

.os-taskbar-app.focused .app-label {
	color: var(--text);
}

.os-taskbar-app::after {
	content: "";
	position: absolute;
	right: 7px;
	bottom: -1px;
	left: 7px;
	height: 2px;
	background: var(--text-faint);
	border-radius: 2px;
	opacity: 0;
	transition: opacity var(--ease), background var(--ease);
}

.os-taskbar-app.running::after {
	opacity: 1;
}

.os-taskbar-app.focused::after {
	background: var(--accent);
	opacity: 1;
}


#os-taskbar.dock-left .os-taskbar-app,
#os-taskbar.dock-right .os-taskbar-app {
	width: 38px;
	height: 38px;
	padding: 0;
	justify-content: center;
}

#os-taskbar.dock-left .app-label,
#os-taskbar.dock-right .app-label {
	display: none;
}

#os-taskbar.dock-left .os-taskbar-app::after {
	top: 6px;
	right: auto;
	bottom: 6px;
	left: -6px;
	width: 2px;
	height: auto;
}

#os-taskbar.dock-right .os-taskbar-app::after {
	top: 6px;
	right: -6px;
	bottom: 6px;
	left: auto;
	width: 2px;
	height: auto;
}

.os-taskbar-clock {
	padding: 0 8px 0 8px;
	font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--text-dim);
	white-space: nowrap;
}

#os-taskbar.dock-left .os-taskbar-clock,
#os-taskbar.dock-right .os-taskbar-clock {
	display: none;
}

.os-start-menu {
	position: absolute;
	bottom: 68px;
	left: 50%;
	z-index: 950;
	display: flex;
	flex-direction: column;
	width: min(460px, 90vw);
	max-height: 66vh;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	transform: translate(-50%, 10px) scale(0.98);
	opacity: 0;
	transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease;
	pointer-events: none;
}

.os-start-menu.open {
	transform: translate(-50%, 0) scale(1);
	opacity: 1;
	pointer-events: auto;
}


.start-menu {
	position: absolute;
	z-index: 950;
	display: none;
	flex-direction: row;
	width: min(680px, 92vw);
	height: min(560px, 74vh);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	animation: startMenuIn 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.start-menu.closing {
	animation: startMenuOut 0.14s ease forwards;
}

@keyframes startMenuIn {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes startMenuOut {
	from {
		opacity: 1;
		transform: scale(1);
	}
	to {
		opacity: 0;
		transform: scale(0.98);
	}
}

.start-sidebar {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 190px;
	padding: 14px 10px;
	background: var(--surface-2);
	border-right: 1px solid var(--border);
	overflow-y: auto;
}

.start-user {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px 14px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}

.start-user img {
	width: 26px;
	height: 26px;
	border-radius: 50%;
}

.start-cat-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
}

.start-cat {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 9px;
	font-size: 0.82rem;
	color: var(--text-dim);
	text-align: left;
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.start-cat i {
	display: flex;
	flex-shrink: 0;
}

.start-cat:hover {
	background: var(--accent-soft);
	color: var(--text);
}

.start-cat.active {
	background: var(--accent-soft);
	color: var(--accent);
}

.start-footer-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding-top: 10px;
	margin-top: 8px;
	border-top: 1px solid var(--border);
}

.start-footer-actions button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--text-dim);
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.start-footer-actions button:hover {
	background: var(--accent-soft);
	color: var(--accent);
}

.start-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	overflow: hidden;
}

.start-menu-search {
	flex-shrink: 0;
	margin-bottom: 12px;
}

.search-input-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
}

.search-input-wrapper .search-icon {
	display: flex;
	flex-shrink: 0;
	color: var(--text-faint);
}

#start-menu-search {
	flex: 1;
	min-width: 0;
	font-family: inherit;
	font-size: 0.85rem;
	color: var(--text);
	background: none;
	border: none;
	outline: none;
}

#start-menu-search::placeholder {
	color: var(--text-faint);
}

.start-page {
	display: none;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.start-page.active {
	display: block;
}

.app-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 4px;
	align-content: start;
}

.start-menu-item,
.recent-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px;
	text-align: left;
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: background var(--ease);
}

.start-menu-item:hover,
.recent-item:hover {
	background: var(--accent-soft);
}

.start-menu-item .star {
	flex-shrink: 0;
	font-size: 0.9rem;
}

.start-menu-item .os-taskbar-app-icon,
.recent-item .os-taskbar-app-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	color: var(--text);
	background: var(--surface-3);
	border-radius: var(--radius-xs);
}

.app-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	gap: 1px;
}

.app-title {
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.app-description {
	font-size: 0.72rem;
	color: var(--text-faint);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.recent-page {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.recent-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 8px 10px;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-dim);
}

.recent-clear-btn {
	font-size: 0.72rem;
	color: var(--accent);
	background: none;
	border: none;
	cursor: pointer;
}

.recent-empty,
.search-no-results {
	padding: 20px 8px;
	font-size: 0.8rem;
	color: var(--text-faint);
	text-align: center;
}

.search-category-header {
	padding: 4px 8px 8px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-faint);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.search-category-results {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.os-start-head {
	flex-shrink: 0;
	padding: 20px 22px 8px;
	text-align: center;
}

.os-start-head h3 {
	font-family: var(--font-script);
	font-size: 1.4rem;
	color: var(--text);
}

.os-start-head p {
	margin-top: 2px;
	font-size: 0.78rem;
	color: var(--text-faint);
}

.os-start-grid {
	display: grid;
	flex: 1;
	grid-template-columns: repeat(3, 1fr);
	align-content: flex-start;
	gap: 4px;
	padding: 8px 16px;
	overflow-y: auto;
}

.os-start-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 14px 6px;
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-dim);
	text-align: center;
	background: none;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.os-start-tile:hover {
	color: var(--text);
	background: var(--surface-2);
}

.os-start-tile-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
}

.os-start-tile-icon svg {
	width: 100%;
	height: 100%;
}

.os-start-foot {
	flex-shrink: 0;
	padding: 12px 16px 18px;
	border-top: 1px solid var(--border);
}

.os-start-switch {
	width: 100%;
	padding: 9px;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--text-dim);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: color var(--ease), border-color var(--ease);
}

.os-start-switch:hover {
	color: var(--text);
	border-color: var(--accent-line);
}

.os-context-menu {
	position: absolute;
	z-index: 960;
	min-width: 240px;
	padding: 4px;
	background: rgba(20, 20, 22, 0.92);
	backdrop-filter: blur(12px) saturate(1.4);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	box-shadow: var(--shadow-lg);
	animation: dropIn 0.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-mode="light"] .os-context-menu {
	background: rgba(255, 255, 255, 0.92);
}

.os-context-item {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 6px 8px;
	font-family: inherit;
	font-size: 0.8rem;
	color: var(--text-dim);
	text-align: left;
	background: none;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.os-context-icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 15px;
	color: var(--text-faint);
}

.os-context-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.os-context-shortcut {
	flex-shrink: 0;
	font-size: 0.7rem;
	color: var(--text-faint);
}

.os-context-item:hover {
	color: var(--text);
	background: var(--accent-soft);
}

.os-context-item:hover .os-context-icon {
	color: var(--accent);
}

.os-context-item.os-context-danger:hover {
	background: rgba(248, 113, 113, 0.14);
	color: var(--danger);
}

.os-context-item.os-context-danger:hover .os-context-icon {
	color: var(--danger);
}

.os-context-sep {
	height: 1px;
	margin: 4px 6px;
	background: var(--border);
}

.os-panel {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 970;
	width: min(460px, 88vw);
	max-height: 74vh;
	padding: 16px 18px 20px;
	overflow-y: auto;
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	transform: translate(-50%, -50%);
	animation: dropIn 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.os-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.os-panel-head h3 {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text);
}

.os-panel-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: var(--text-faint);
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius-xs);
	cursor: pointer;
}

.os-panel-close:hover {
	color: var(--text);
}

.os-wallpaper-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.os-wallpaper-swatch {
	position: relative;
	display: flex;
	align-items: flex-end;
	height: 66px;
	padding: 6px;
	overflow: hidden;
	background-size: cover;
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

.os-wallpaper-swatch.active {
	border-color: var(--accent);
}

.os-wallpaper-label {
	padding: 2px 6px;
	font-size: 0.68rem;
	font-weight: 600;
	color: #fff;
	background: rgba(0, 0, 0, 0.45);
	border-radius: 5px;
}

#os-view #ai-view,
#os-view #browser-view,
#os-view #proxy-view,
#os-view #games-view,
#os-view #settings-view,
#os-view #chat-view,
#os-view #music-view {
	height: 100%;
	min-height: 0;
}

#os-view .view {
	height: 100%;
	min-height: 0;
}

#os-view .page {
	height: 100%;
}

#os-view #browser-content,
#os-view #proxy-container,
#os-view .browser-chrome,
#os-view .mz-app,
#os-view .dc-app,
#os-view .ai-messages {
	min-height: 0;
	min-width: 0;
}

#os-view #ai-back,
#os-view #games-back,
#os-view #settings-back,
#os-view #mz-back,
#os-view #dc-back,
#os-view #chat-back,
#os-view #browser-home,
#os-view #anime-back,
#os-view #proxy-back,
#os-view #sites-back,
#os-view #movies-back {
	display: none;
}

#os-view #ai-view .ai-message-body {
	font-size: 0.87rem;
}

#os-view #ai-view .ai-message.user .ai-message-body {
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	border-radius: 8px;
}

#os-view #ai-view .ai-avatar {
	border-radius: 6px;
}

.ai-header-title {
	display: flex;
	gap: 6px;
	align-items: baseline;
	overflow: hidden;
}

.ai-header-title h2 {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ai-header-model {
	overflow: hidden;
	font-size: 0.76rem;
	color: var(--text-faint);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ai-header-model:not(:empty)::before {
	content: "· ";
}

.ai-model-groups {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	gap: 12px;
	max-height: 46%;
	padding: 10px 10px 12px;
	overflow-y: auto;
	border-bottom: 1px solid var(--border);
}

.ai-model-group-label {
	padding: 0 6px;
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.ai-model-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 7px 8px;
	margin-top: 2px;
	font-family: inherit;
	font-size: 0.79rem;
	color: var(--text-dim);
	text-align: left;
	background: none;
	border: none;
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: background var(--ease), color var(--ease);
}

.ai-model-row:hover {
	color: var(--text);
	background: var(--surface);
}

.ai-model-row.active {
	color: var(--text);
	background: var(--accent-soft);
}

.ai-model-dot {
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	background: var(--text-faint);
	border-radius: 50%;
}

.ai-model-row.active .ai-model-dot {
	background: var(--accent);
}

.ai-model-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ai-hero-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	max-width: 520px;
	margin-top: 18px;
}

.ai-hero-card {
	padding: 14px 16px;
	text-align: left;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--ease);
}

.ai-hero-card:hover {
	border-color: var(--border-strong);
	background: var(--surface-2);
}

.ai-hero-card-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}

.ai-hero-card-sub {
	margin-top: 2px;
	font-size: 0.76rem;
	color: var(--text-faint);
}

#os-view #music-view {
	--accent: #1db954;
	--accent-strong: #1ed760;
	--accent-contrast: #06170d;
	--accent-soft: rgba(29, 185, 84, 0.14);
	--accent-line: rgba(29, 185, 84, 0.4);
}

#os-view #music-view .mz-sidebar {
	background: #060907;
}

#os-view #music-view .mz-player-play {
	color: #06170d;
}

#os-view #browser-view {
	--accent: #ff8a3d;
	--accent-strong: #ff7139;
	--accent-contrast: #1a0a02;
	--accent-soft: rgba(255, 138, 61, 0.14);
	--accent-line: rgba(255, 138, 61, 0.36);
}

#os-view #games-view {
	--accent: #5b7bff;
	--accent-strong: #4361ee;
	--accent-contrast: #050915;
	--accent-soft: rgba(91, 123, 255, 0.14);
	--accent-line: rgba(91, 123, 255, 0.36);
	background: var(--bg-deep);
}

#os-view #games-view .game-tile {
	background: var(--surface);
	border-radius: 12px;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

#os-view #games-view .game-tile:hover {
	box-shadow: 0 14px 30px rgba(91, 123, 255, 0.28);
	transform: translateY(-4px) scale(1.02);
}

#os-view #games-view .game-title {
	padding-top: 26px;
	opacity: 1;
	background: linear-gradient(transparent, rgba(5, 9, 21, 0.92));
}

#os-view #games-view .game-fav {
	backdrop-filter: blur(4px);
}

#os-view #games-view .chip-toggle.on {
	background: var(--accent);
	border-color: var(--accent);
}

#os-view #chat-view {
	--accent: #7c8cff;
	--accent-strong: #5f70f2;
	--accent-contrast: #06081a;
	--accent-soft: rgba(124, 140, 255, 0.14);
	--accent-line: rgba(124, 140, 255, 0.36);
}

#os-view #settings-view {
	--accent: #b0b6c0;
	--accent-strong: #8d94a1;
	--accent-contrast: #101216;
	--accent-soft: rgba(176, 182, 192, 0.14);
	--accent-line: rgba(176, 182, 192, 0.36);
}

