* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #008080;
  font-family: Tahoma, 'MS Sans Serif', Geneva, sans-serif;
  font-size: 11px;
}

#desktop {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.06), rgba(0,0,0,0.08) 70%),
    #008080;
}

#desktop-area {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 10px 12px 4px 76px;
  min-height: 0;
  position: relative;
}

.desktop-icons {
  position: absolute;
  left: 10px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 64px;
}

.d-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 2px;
  cursor: default;
  border: 1px dotted transparent;
  user-select: none;
}

.d-icon svg { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5)); }

.d-icon span {
  color: #fff;
  font-size: 11px;
  text-shadow: 1px 1px 1px #000;
  text-align: center;
  line-height: 1.15;
  padding: 0 2px;
}

.d-icon.selected { border-color: #fff; background: rgba(10,36,106,0.55); }
.d-icon.selected span { background: #0a246a; }

#browser-window {
  width: 100%;
  max-width: 1360px;
  min-width: 860px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#desktop-area.maximized { padding: 0 0 0 0; }
#desktop-area.maximized #browser-window { max-width: none; min-width: 0; }

#taskbar {
  height: 30px;
  background: #d4d0c8;
  border-top: 1px solid #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px;
  position: relative;
  z-index: 500;
}

#start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  font-size: 11px;
  padding: 2px 8px 2px 4px;
  height: 24px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080;
  cursor: default;
}

#start-btn:active, #start-btn.open {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ece9d8;
}

.task-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  min-width: 160px;
  max-width: 220px;
  padding: 2px 8px;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px 0 #808080;
  cursor: default;
}

.task-btn.active {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080;
  background-image: repeating-conic-gradient(#d4d0c8 0% 25%, #c6c2ba 0% 50%);
  background-size: 3px 3px;
  font-weight: bold;
}

.task-btn span { overflow: hidden; text-overflow: ellipsis; }

#tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  font-size: 11px;
}

#start-menu {
  position: absolute;
  left: 2px;
  bottom: 30px;
  width: 190px;
  background: #fff;
  border: 1px solid #404040;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  padding: 2px;
  display: none;
  z-index: 600;
}

#start-menu.open { display: block; }

.sm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 4px 6px;
  font-size: 11px;
  cursor: default;
  position: relative;
}

.sm-item:hover { background: #0a246a; color: #fff; }
.sm-item .sm-arrow { margin-left: auto; font-size: 8px; }
.sm-sep { height: 1px; background: #d4d0c8; border-bottom: 1px solid #fff; margin: 2px 1px; }

.sm-sub {
  position: absolute;
  left: 100%;
  top: -3px;
  width: 170px;
  background: #fff;
  border: 1px solid #404040;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
  padding: 2px;
  display: none;
}

.sm-item:hover > .sm-sub { display: block; }

.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog {
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080, 3px 3px 8px rgba(0,0,0,0.45);
  min-width: 320px;
  max-width: 480px;
  padding: 2px;
}

.dialog-title {
  background: linear-gradient(90deg, #0a246a, #a6caf0);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.dialog-title .dt-text { flex: 1; overflow: hidden; white-space: nowrap; }

.dialog-close {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  font-weight: bold;
  cursor: default;
  color: #000;
}

.dialog-close:active { border-color: #404040 #fff #fff #404040; }

.dialog-body { padding: 14px 16px; font-size: 11px; line-height: 1.5; }

.dialog-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 14px;
}

.btn95 {
  min-width: 75px;
  height: 23px;
  padding: 0 10px;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080;
  cursor: default;
}

.btn95:active {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #ece9d8;
  padding-top: 1px;
  padding-left: 11px;
}

.btn95.default { outline: 1px solid #000; }

.popup-window {
  position: absolute;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset 1px 1px 0 #ece9d8, inset -1px -1px 0 #808080, 4px 4px 12px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 400;
  padding: 2px;
}

.popup-title {
  background: linear-gradient(90deg, #0a246a, #a6caf0);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  user-select: none;
}

.popup-title .dt-text { flex: 1; overflow: hidden; white-space: nowrap; }

.popup-body {
  flex: 1;
  background: #fff;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  margin-top: 2px;
  overflow: auto;
  min-height: 0;
}

.popup-status {
  margin-top: 2px;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 1px 6px;
  font-size: 11px;
  height: 17px;
  background: #d4d0c8;
  white-space: nowrap;
  overflow: hidden;
}

#shutdown {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
}

#shutdown .sh-text {
  color: #f4a430;
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.6;
}

#shutdown .sh-sub {
  color: #888;
  font-family: Tahoma, sans-serif;
  font-size: 11px;
  margin-top: 30px;
}

.notepad-area {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  font-family: 'Lucida Console', 'Courier New', monospace;
  font-size: 12px;
  padding: 4px;
  background: #fff;
}

@media print {
  #desktop-area, #taskbar, .desktop-icons, .compose-win, .popup-window, .dialog-overlay { display: none !important; }
  body, html { overflow: visible; background: #fff; }
  #print-host { display: block !important; }
}

#print-host { display: none; }
