/* mask of pepe, windows 95 desktop */
@font-face {
  font-family: 'MS Sans';
  src: local('Tahoma'), local('MS Sans Serif');
}

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #008080;
  --face: #c0c0c0;
  --shadow: #808080;
  --dkshadow: #000000;
  --hilite: #ffffff;
  --title1: #000080;
  --title2: #1084d0;
  --titletxt: #ffffff;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'MS Sans', Tahoma, 'MS Sans Serif', Geneva, sans-serif;
  font-size: 12px;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

body { background: var(--teal); }

/* ------- bevels ------- */
.bevel-out {
  background: var(--face);
  border-top: 2px solid var(--hilite);
  border-left: 2px solid var(--hilite);
  border-right: 2px solid var(--dkshadow);
  border-bottom: 2px solid var(--dkshadow);
  box-shadow: inset 1px 1px 0 var(--face), inset -1px -1px 0 var(--shadow);
}
.bevel-in {
  background: var(--face);
  border-top: 2px solid var(--shadow);
  border-left: 2px solid var(--shadow);
  border-right: 2px solid var(--hilite);
  border-bottom: 2px solid var(--hilite);
}
.field {
  background: #fff;
  border-top: 2px solid var(--shadow);
  border-left: 2px solid var(--shadow);
  border-right: 2px solid var(--hilite);
  border-bottom: 2px solid var(--hilite);
}

/* ------- desktop ------- */
#desktop {
  position: fixed;
  inset: 0 0 30px 0;
  overflow: hidden;
}
#wallpaper {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  opacity: .96;
  pointer-events: none;
}

.icon {
  position: absolute;
  width: 84px;
  text-align: center;
  padding: 4px 2px;
  cursor: pointer;
}
.icon img {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto 4px auto;
}
.icon span {
  color: #fff;
  font-size: 11px;
  padding: 1px 3px;
  line-height: 1.2;
  display: inline-block;
  text-shadow: 1px 1px 0 #000;
}
.icon.sel span { background: var(--title1); outline: 1px dotted #ffff00; text-shadow: none; }

/* ------- windows ------- */
.win {
  position: absolute;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: var(--face);
  border-top: 2px solid var(--hilite);
  border-left: 2px solid var(--hilite);
  border-right: 2px solid var(--dkshadow);
  border-bottom: 2px solid var(--dkshadow);
  box-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.win.max { inset: 0 0 30px 0 !important; width: auto !important; height: auto !important; }

.titlebar {
  height: 22px;
  margin: 2px;
  padding: 0 3px;
  background: linear-gradient(90deg, var(--title1), var(--title2));
  color: var(--titletxt);
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.win.inactive .titlebar { background: linear-gradient(90deg, #808080, #b5b5b5); }
.titlebar img { width: 16px; height: 16px; image-rendering: pixelated; }
.titlebar .t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tbtn {
  width: 18px; height: 16px;
  font-size: 10px;
  font-weight: bold;
  font-family: inherit;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #000;
  cursor: pointer;
}
.tbtn:active { border-top: 2px solid var(--dkshadow); border-left: 2px solid var(--dkshadow); border-right: 2px solid var(--hilite); border-bottom: 2px solid var(--hilite); }

.menubar {
  display: flex;
  gap: 2px;
  padding: 1px 2px;
  flex: 0 0 auto;
}
.menubar span { padding: 2px 7px; }
.menubar span:hover { background: var(--title1); color: #fff; }
.menubar span u { text-decoration: underline; }

.winbody {
  flex: 1 1 auto;
  margin: 0 2px 2px 2px;
  overflow: auto;
  position: relative;
}

.statusbar {
  display: flex;
  gap: 2px;
  margin: 0 2px 2px 2px;
  flex: 0 0 auto;
}
.statusbar > div {
  border: 1px solid;
  border-color: var(--shadow) var(--hilite) var(--hilite) var(--shadow);
  padding: 2px 6px;
  flex: 1;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}

/* ------- buttons ------- */
.btn {
  font-family: inherit;
  font-size: 12px;
  padding: 4px 14px;
  background: var(--face);
  border-top: 2px solid var(--hilite);
  border-left: 2px solid var(--hilite);
  border-right: 2px solid var(--dkshadow);
  border-bottom: 2px solid var(--dkshadow);
  cursor: pointer;
  min-height: 24px;
}
.btn:active, .btn.on {
  border-top: 2px solid var(--dkshadow);
  border-left: 2px solid var(--dkshadow);
  border-right: 2px solid var(--hilite);
  border-bottom: 2px solid var(--hilite);
}
.btn:disabled { color: var(--shadow); text-shadow: 1px 1px 0 var(--hilite); cursor: default; }
.btn.primary { outline: 1px solid #000; outline-offset: -5px; font-weight: bold; }

/* ------- taskbar ------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 30px;
  background: var(--face);
  border-top: 2px solid var(--hilite);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  z-index: 9000;
}
#startbtn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  padding: 2px 8px 2px 4px;
  height: 24px;
}
#startbtn img { width: 18px; height: 18px; image-rendering: pixelated; }
#tasks { flex: 1; display: flex; gap: 3px; overflow: hidden; }
.taskbtn {
  max-width: 160px;
  min-width: 90px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
}
.taskbtn img { width: 14px; height: 14px; image-rendering: pixelated; }
#clock {
  border: 1px solid;
  border-color: var(--shadow) var(--hilite) var(--hilite) var(--shadow);
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
}

/* ------- start menu ------- */
#startmenu {
  position: fixed;
  left: 2px; bottom: 32px;
  width: 200px;
  z-index: 9500;
  display: none;
}
#startmenu.open { display: flex; }
#startmenu .rail {
  background: linear-gradient(180deg, var(--title2), var(--title1));
  color: #fff;
  font-weight: bold;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 2px;
  font-size: 15px;
  letter-spacing: 1px;
}
#startmenu .items { flex: 1; padding: 2px; }
.smitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
}
.smitem img { width: 24px; height: 24px; image-rendering: pixelated; }
.smitem:hover { background: var(--title1); color: #fff; }
.smsep { height: 0; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hilite); margin: 2px 4px; }

/* ------- notepad ------- */
.notepad {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: #fff;
  padding: 8px 10px;
  white-space: pre-wrap;
  -webkit-user-select: text;
  user-select: text;
  line-height: 1.35;
  height: 100%;
  overflow: auto;
}

/* ------- dialogs ------- */
.dialog-buttons { display: flex; justify-content: center; gap: 8px; padding: 12px; }
.dlgbody { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
.dlgbody img { width: 32px; height: 32px; image-rendering: pixelated; }

/* ------- boot screen ------- */
#boot {
  position: fixed;
  inset: 0;
  background: #000;
  color: #a8a8a8;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 26px;
  z-index: 99999;
  cursor: pointer;
  line-height: 1.5;
}
#boot .logo { color: #fff; font-weight: bold; }
#boot .blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* amateur touches */
.construction { font-family: 'Comic Sans MS', cursive; color: #ffff00; }
marquee { display: block; }
