* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
}

body {
	font-family: Tahoma, 'Segoe UI', Verdana, 'Helvetica Neue', Arial, sans-serif;
	font-size: 12px;
	color: #000;
	overflow: hidden;
	background: #3a7bd5;
	-webkit-user-select: none;
	user-select: none;
}

a {
	color: inherit;
	text-decoration: none;
}

p, h1 {
	margin: 0;
	padding: 0;
}

/* ---------- Boot screen ---------- */

.boot {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100;
	background: #000;
	color: #fff;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	cursor: pointer;
}

.js.booting .boot {
	display: flex;
}

.boot-bar {
	width: 150px;
	height: 16px;
	border: 1px solid #b2b2b2;
	border-radius: 4px;
	padding: 2px;
	overflow: hidden;
}

.boot-bar i {
	display: block;
	width: 36px;
	height: 100%;
	background:
		linear-gradient(#2838c7, #5979ef 40%, #2838c7) 0 0 / 10px 100% no-repeat,
		linear-gradient(#2838c7, #5979ef 40%, #2838c7) 13px 0 / 10px 100% no-repeat,
		linear-gradient(#2838c7, #5979ef 40%, #2838c7) 26px 0 / 10px 100% no-repeat;
	animation: boot-slide 1.1s steps(14) infinite;
}

@keyframes boot-slide {
	from { transform: translateX(-40px); }
	to { transform: translateX(150px); }
}

/* ---------- Desktop ---------- */

.desktop {
	position: relative;
	height: calc(100% - 30px);
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: 24px;
	overflow: auto;
	--c: min(460px, calc(100vw - 440px), calc(100vh - 215px));
	/* home-made "green hill" wallpaper */
	background:
		radial-gradient(ellipse 22% 9% at 22% 20%, rgba(255,255,255,0.85), rgba(255,255,255,0) 70%),
		radial-gradient(ellipse 16% 7% at 34% 26%, rgba(255,255,255,0.7), rgba(255,255,255,0) 70%),
		radial-gradient(ellipse 20% 8% at 74% 14%, rgba(255,255,255,0.8), rgba(255,255,255,0) 70%),
		radial-gradient(ellipse 12% 5% at 62% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0) 70%),
		radial-gradient(ellipse 90% 46% at 30% 108%, #7cc142 0%, #4d9a2a 55%, rgba(77,154,42,0) 56%),
		radial-gradient(ellipse 85% 40% at 85% 112%, #5aa832 0%, #3a8222 55%, rgba(58,130,34,0) 56%),
		linear-gradient(#2a6fd6 0%, #5c9be8 45%, #a9cdf5 78%, #cfe3f9 100%);
}

.js .desktop {
	transition: opacity 0.4s;
}

.js.booting .desktop,
.js.booting .taskbar {
	opacity: 0;
}

/* ---------- Windows ---------- */

.window {
	flex: none;
	background: #ece9d8;
	border: 3px solid #0831d9;
	border-top: 0;
	border-radius: 8px 8px 0 0;
	box-shadow: 2px 4px 14px rgba(0,0,0,0.45);
	transform-origin: 20% 100%;
}

.window.hidden {
	display: none;
}

.js .window.paint:not(.open) {
	visibility: hidden;
}


.titlebar {
	display: flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	margin: 0 -3px;
	padding: 0 5px 0 7px;
	border-radius: 8px 8px 0 0;
	color: #fff;
	font-weight: bold;
	font-size: 13px;
	text-shadow: 1px 1px 1px #0f1089;
	background: linear-gradient(#0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0050ee 93%, #003dd7 100%);
	cursor: move;
	touch-action: none;
}

.tb-title {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tb-btns {
	display: flex;
	gap: 2px;
}

.tb-btns button {
	width: 21px;
	height: 21px;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #fff;
	font: bold 13px/1 Tahoma, Arial, sans-serif;
	background: linear-gradient(135deg, #5a8cf2, #1f52d6 60%, #2a62e4);
	cursor: pointer;
}

.tb-btns button:hover {
	filter: brightness(1.2);
}

.tb-btns button.close {
	background: linear-gradient(135deg, #f09a7c, #d2401c 60%, #c0300f);
}

.menubar {
	display: flex;
	padding: 2px 2px 3px;
	border-bottom: 1px solid #aca899;
}

.menubar span {
	padding: 2px 7px;
}

.menubar span:hover {
	background: #316ac5;
	color: #fff;
}

.statusbar {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 3px 6px;
	border-top: 1px solid #fff;
	box-shadow: 0 -1px 0 #aca899;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
}

.statusbar span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Paint ---------- */

.paint-body {
	display: flex;
}

.toolbox {
	flex: none;
	width: 58px;
	padding: 4px;
	display: grid;
	grid-template-columns: 25px 25px;
	grid-auto-rows: 25px;
	align-content: start;
}

.toolbox b {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: normal;
	border: 1px solid transparent;
	filter: grayscale(0.4);
}

.toolbox b.active {
	background: #fff;
	border-color: #808080 #fff #fff #808080;
}

.toolbox .size {
	grid-column: 1 / 3;
	height: 46px;
	margin-top: 5px;
	border: 1px solid;
	border-color: #808080 #fff #fff #808080;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.toolbox .size i {
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #000;
	transition: width 0.3s, height 0.3s;
}

.canvas-wrap {
	padding: 4px 14px 14px 4px;
	background: #808080;
	border: 1px solid;
	border-color: #404040 #fff #fff #404040;
}

.canvas-holder {
	position: relative;
	width: var(--c);
	height: var(--c);
	background: #fff;
}

.canvas-holder canvas,
.canvas-holder img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.brush {
	position: absolute;
	left: 0;
	top: 0;
	font-size: 26px;
	line-height: 1;
	margin: -24px 0 0 -2px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s;
	filter: drop-shadow(1px 2px 1px rgba(0,0,0,0.4));
}

.brush.on {
	opacity: 1;
}

.palette {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 4px;
}

.palette .current {
	position: relative;
	flex: none;
	width: 31px;
	height: 32px;
	border: 1px solid;
	border-color: #808080 #fff #fff #808080;
	background: #f4f3ee;
}

.palette .current i {
	position: absolute;
	width: 15px;
	height: 15px;
	border: 1px solid #fff;
	outline: 1px solid #808080;
}

.palette .current .bg {
	right: 4px;
	bottom: 4px;
	background: #fff;
}

.palette .current #fg {
	left: 4px;
	top: 4px;
	background: #000;
	z-index: 1;
}

.swatches {
	display: grid;
	grid-template-rows: 16px 16px;
	grid-auto-flow: column;
	grid-auto-columns: 16px;
}

.swatches i {
	border: 1px solid;
	border-color: #808080 #fff #fff #808080;
	box-shadow: inset 1px 1px 0 #404040;
}

/* ---------- Right side: notepad + shortcuts ---------- */

.side {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-flow: row-reverse wrap;
	align-items: flex-start;
	gap: 20px;
}

.notepad {
	width: 250px;
	max-width: 100%;
}

.notepad-text {
	margin: 0 1px 1px;
	padding: 8px 10px 14px;
	min-height: 96px;
	background: #fff;
	border: 1px solid;
	border-color: #808080 #fff #fff #808080;
	font-family: 'Lucida Console', Monaco, Menlo, monospace;
	font-size: 12px;
	line-height: 1.6;
	-webkit-user-select: text;
	user-select: text;
}

.notepad-text h1 {
	font-size: 15px;
}

.notepad-text a {
	color: #00f;
	text-decoration: underline;
}

.notepad-text .copyright {
	margin-top: 10px;
	color: #666;
}

.icons {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.shortcut {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 84px;
	padding: 2px;
	border: 0;
	background: none;
	font: inherit;
	color: #fff;
	text-align: center;
	text-shadow: 1px 1px 2px #000, 0 0 3px rgba(0,0,0,0.6);
	cursor: pointer;
}

.shortcut .ico {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	text-shadow: none;
	background: #24292e center / 30px 30px no-repeat;
	box-shadow: 1px 2px 4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* the little shortcut arrow */
.shortcut[href^="http"] .ico::after {
	content: '';
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
	background-size: 9px 9px;
	background-repeat: no-repeat;
	background-position: center;
	position: absolute;
	left: -3px;
	bottom: -3px;
	width: 13px;
	height: 13px;
	background-color: #fff;
	border: 1px solid #555;
}

.ico-github { background-image: url('../images/icons/icon-github@2x.png') !important; }
.ico-x { background-color: #000 !important; background-image: url('../images/icons/icon-x.svg') !important; background-size: 22px 22px !important; }
.ico-linkedin { background-color: #0a66c2 !important; background-image: url('../images/icons/icon-linkedin@2x.png') !important; }
.ico-tourlane { background-image: url('../images/icons/icon-tourlane.png') !important; background-size: cover !important; }
.ico-paint { background: linear-gradient(#fff, #d9e6ff) !important; }
.ico-privacy { background: linear-gradient(#f4f4f4, #c9c9c9) !important; }

.shortcut .label {
	padding: 1px 3px;
	line-height: 1.25;
}

.shortcut:hover .label,
.shortcut:focus-visible .label {
	background: #316ac5;
	text-shadow: none;
}

.shortcut:focus-visible {
	outline: 1px dotted #fff;
}

.shortcut:hover .ico {
	filter: brightness(1.12);
}

/* ---------- Taskbar ---------- */

.taskbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: 30px;
	z-index: 50;
	display: flex;
	align-items: stretch;
	color: #fff;
	background: linear-gradient(#3168d5 0%, #4993e6 4%, #245edb 10%, #245edb 88%, #1941a5 100%);
	transition: opacity 0.4s;
}

.start {
	flex: none;
	padding: 0 22px 2px 10px;
	border: 0;
	border-radius: 0 12px 12px 0;
	color: #fff;
	font: italic bold 17px/1 Tahoma, 'Trebuchet MS', Arial, sans-serif;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
	background: linear-gradient(#5eac56 0%, #3c873c 12%, #3c873c 85%, #2c6b2c 100%);
	box-shadow: inset 0 2px 2px rgba(255,255,255,0.35), 2px 0 4px rgba(0,0,0,0.4);
	cursor: pointer;
}

.start:hover {
	filter: brightness(1.12);
}

.tasks {
	flex: 1;
	min-width: 0;
	display: flex;
	gap: 3px;
	padding: 3px 8px;
}

.task {
	flex: 0 1 160px;
	min-width: 0;
	padding: 0 8px;
	border: 0;
	border-radius: 3px;
	color: #fff;
	font: inherit;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #1e52b7;
	box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5);
	cursor: pointer;
}

.task.off {
	background: #3c81f3;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.tray {
	flex: none;
	display: flex;
	align-items: center;
	padding: 0 12px;
	border-left: 1px solid #0f3b9c;
	background: linear-gradient(#1290e9 0%, #19b9f3 6%, #0f8ee6 12%, #0f8ee6 88%, #0b6fc4 100%);
	box-shadow: inset 1px 0 0 rgba(255,255,255,0.3);
}

.startmenu {
	position: fixed;
	left: 0;
	bottom: 30px;
	z-index: 60;
	width: 230px;
	border: 2px solid #1c57d6;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: #fff;
	box-shadow: 3px 0 10px rgba(0,0,0,0.45);
	overflow: hidden;
}

.startmenu[hidden] {
	display: none;
}

.startmenu header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	color: #fff;
	font-weight: bold;
	font-size: 14px;
	text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
	background: linear-gradient(#1868ce, #3b8af0 50%, #1c5fd0);
}

.startmenu header img {
	border: 2px solid #dfe9fb;
	border-radius: 4px;
}

.startmenu a {
	display: block;
	padding: 8px 12px;
}

.startmenu a:hover {
	background: #316ac5;
	color: #fff;
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
	.desktop {
		flex-direction: column;
		align-items: center;
		padding: 14px 10px 24px;
		--c: min(460px, calc(100vw - 104px));
	}

	.side {
		flex: none;
		width: 100%;
		flex-flow: column;
		align-items: center;
	}

	.icons {
		flex-flow: row wrap;
		justify-content: center;
	}

	.tray {
		padding: 0 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.boot-bar i { animation: none; }
}

/* ---------- Icons (Lucide, inlined as SVG symbols) ---------- */

.i {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.22em;
}

.toolbox b {
	filter: none;
	color: #222;
}

.toolbox b .i {
	width: 15px;
	height: 15px;
}

.tb-btns button .i {
	width: 13px;
	height: 13px;
	stroke-width: 3.5;
	vertical-align: middle;
}

.shortcut .ico .i {
	width: 26px;
	height: 26px;
}

.ico-paint { color: #c2410c; }
.ico-privacy { color: #444; }

.brush {
	color: #1a1a1a;
	margin: -27px 0 0 -2px;
	filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(1px 2px 1px rgba(0,0,0,0.4));
}

.brush .i {
	display: block;
	width: 28px;
	height: 28px;
}

.flag-de {
	display: inline-block;
	width: 15px;
	height: 10px;
	vertical-align: -1px;
	background: linear-gradient(#000 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%);
}

/* ---------- Usable paint tools ---------- */

.toolbox b,
.toolbox .size,
.swatches i {
	cursor: pointer;
}

.toolbox b:hover:not(.active) {
	border-color: #fff #808080 #808080 #fff;
}

.canvas-holder {
	overflow: hidden;
}

.canvas-holder canvas {
	cursor: crosshair;
	touch-action: none;
}

.selection {
	position: absolute;
	border: 1px dashed #000;
	outline: 1px dashed #fff;
	outline-offset: -2px;
	pointer-events: none;
}

.selection[hidden] {
	display: none;
}

/* ---------- Menus ---------- */

.menubar span {
	cursor: default;
}

.menubar span.open {
	background: #316ac5;
	color: #fff;
}

.menu-pop {
	position: fixed;
	z-index: 70;
	min-width: 150px;
	padding: 2px;
	background: #fff;
	border: 1px solid #aca899;
	box-shadow: 2px 2px 3px rgba(0,0,0,0.4);
	cursor: default;
}

.menu-pop[hidden] {
	display: none;
}

.menu-pop div {
	padding: 4px 26px 4px 22px;
	color: #aca899; /* disabled */
	white-space: nowrap;
}

.menu-pop hr {
	margin: 3px 2px;
	border: 0;
	border-top: 1px solid #aca899;
}

/* XP-style open/minimize: the title bar zooms between taskbar button and window */
.zoom-title {
	position: fixed;
	z-index: 80;
	display: flex;
	align-items: center;
	padding: 0 7px;
	overflow: hidden;
	white-space: nowrap;
	color: #fff;
	font-weight: bold;
	font-size: 13px;
	text-shadow: 1px 1px 1px #0f1089;
	border-radius: 8px 8px 0 0;
	background: linear-gradient(#0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0050ee 93%, #003dd7 100%);
	pointer-events: none;
}

/* While the automatic painting runs, the tools are locked and grayed out */
.paint.busy .toolbox b:not(.active) {
	opacity: 0.35;
	filter: grayscale(1);
	cursor: default;
	border-color: transparent;
}

.paint.busy .toolbox .size,
.paint.busy .canvas-holder canvas {
	cursor: default;
}

/* ---------- Tray icon + XP notification balloon (privacy consent) ---------- */

.tray {
	gap: 8px;
}

.tray-btn {
	display: flex;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}

.tray-btn .i {
	width: 16px;
	height: 16px;
	vertical-align: 0;
}

.assistant {
	position: fixed;
	right: 14px;
	bottom: 38px;
	z-index: 55;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
	width: 270px;
	max-width: calc(100vw - 28px);
}

.assistant[hidden] {
	display: none;
}

.balloon {
	position: relative;
	padding: 8px 10px 10px;
	background: #ffffe1;
	border: 1px solid #000;
	border-radius: 7px;
	box-shadow: 2px 3px 6px rgba(0,0,0,0.45);
	line-height: 1.4;
	-webkit-user-select: text;
	user-select: text;
}

/* tail pointing at the assistant */
.balloon::before,
.balloon::after {
	content: '';
	position: absolute;
	right: 34px;
	top: 100%;
	border: solid transparent;
	border-width: 14px 0 0 14px;
	border-top-color: #000;
}

.balloon::after {
	right: 35px;
	margin-top: -2px;
	border-width: 13px 0 0 12px;
	border-top-color: #ffffe1;
}

.clip {
	width: 58px;
	height: 87px;
	margin-right: 8px;
	filter: drop-shadow(2px 3px 2px rgba(0,0,0,0.4));
	animation: clip-bob 2.6s ease-in-out infinite;
	transform-origin: 50% 100%;
}

.clip-wire {
	fill: none;
	stroke: #9aa7b4;
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.clip-eyes ellipse {
	fill: #fff;
	stroke: #333;
	stroke-width: 1.5;
}

.clip-eyes {
	transform-origin: 32px 30px;
	animation: clip-blink 4.5s infinite;
}

.clip-pupil {
	fill: #111;
}

.clip-brow {
	fill: none;
	stroke: #333;
	stroke-width: 2.5;
	stroke-linecap: round;
}

@keyframes clip-bob {
	0%, 100% { transform: rotate(-3deg); }
	50% { transform: rotate(4deg) translateY(-3px); }
}

@keyframes clip-blink {
	0%, 94%, 100% { transform: scaleY(1); }
	97% { transform: scaleY(0.1); }
}

@media (prefers-reduced-motion: reduce) {
	.clip, .clip-eyes { animation: none; }
}

.balloon-title {
	font-weight: bold;
	margin-bottom: 4px;
	padding-right: 20px;
}

.balloon-state {
	margin-top: 4px;
	color: #555;
}

.balloon-state:empty {
	display: none;
}

.balloon-close {
	position: absolute;
	right: 5px;
	top: 5px;
	display: flex;
	padding: 1px;
	border: 1px solid transparent;
	border-radius: 3px;
	background: none;
	cursor: pointer;
}

.balloon-close:hover {
	border-color: #808080;
	background: #fff;
}

.balloon-close .i {
	width: 11px;
	height: 11px;
	stroke-width: 3;
}

.balloon-btns {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
	margin-top: 9px;
}

.balloon-btns button {
	min-width: 72px;
	padding: 3px 10px;
	font: inherit;
	color: #000;
	border: 1px solid #003c74;
	border-radius: 3px;
	background: linear-gradient(#fff 0%, #ecebe5 86%, #d8d0c4 100%);
	cursor: pointer;
}

.balloon-btns button:hover {
	box-shadow: inset 0 0 0 2px #f8b636;
}

.balloon-btns button:focus-visible {
	outline: 1px dotted #000;
	outline-offset: -4px;
}
