/* ============================================================
   RAFFERTY//OS  -  window shell (Win95 bevels, dark net skin)
   ============================================================ */
* { box-sizing: border-box; }

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

body {
  /* the Win95 desktop teal, with the 50% dither the era actually shipped */
  background: #008080;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 12px;
  color: #000000;
  -webkit-tap-highlight-color: transparent;
}

.bevel-out {
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}
.bevel-in {
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
}

/* ---- desktop ---- */
#desktop { position: fixed; left: 0; right: 0; top: 0; bottom: 32px; overflow: hidden; }

.desktop-icons {
  position: absolute; left: 10px; top: 10px;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 6px; max-height: 100%;
}
.dicon {
  width: 84px; padding: 4px 2px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: default; border: 1px dotted transparent; user-select: none;
}
.dicon span {
  color: #ffffff; text-shadow: 1px 1px 0 #000000;
  text-align: center; line-height: 1.25; padding: 1px 3px;
}
.dicon.selected span { background: #000080; text-shadow: none; color: #ffffff; }
.dicon.selected { border-color: #a8a8a8; }
.ico { display: block; flex: none; }

/* ---- window ---- */
.win95-window {
  position: absolute; display: flex; flex-direction: column;
  min-width: 220px; min-height: 120px;
  background: #c0c0c0;
  border: 2px solid; border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, 3px 3px 0 rgba(0,0,0,.35);
}
.win95-window.minimized { display: none; }

.titlebar {
  flex: none;
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  display: flex; align-items: center; gap: 5px;
  padding: 3px 3px 3px 4px; cursor: move; user-select: none;
}
.win95-window.inactive .titlebar {
  background: linear-gradient(90deg, #808080 0%, #b5b5b5 100%); color: #dfdfdf;
}
.titlebar-text {
  font-weight: bold; font-size: 12px; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.titlebar-buttons { display: flex; gap: 2px; }

.tb-btn {
  width: 18px; height: 16px; background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  padding: 0; display: flex; align-items: center; justify-content: center; cursor: default;
}
.tb-btn:active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
}
.tb-close { margin-left: 2px; }
.glyph-min { width: 8px; height: 2px; background: #000000; margin-top: 6px; }
.glyph-max { width: 9px; height: 8px; border: 1px solid #000000; border-top-width: 2px; }
.glyph-restore { position: relative; width: 9px; height: 9px; }
.glyph-restore::before, .glyph-restore::after {
  content: ""; position: absolute; border: 1px solid #000000; border-top-width: 2px;
  width: 6px; height: 5px;
}
.glyph-restore::before { right: 0; top: 0; }
.glyph-restore::after { left: 0; bottom: 0; background: #c0c0c0; }
.glyph-close { position: relative; width: 9px; height: 9px; }
.glyph-close::before, .glyph-close::after {
  content: ""; position: absolute; top: 4px; left: 0;
  width: 9px; height: 1.5px; background: #000000;
}
.glyph-close::before { transform: rotate(45deg); }
.glyph-close::after  { transform: rotate(-45deg); }

/* ---- menus ---- */
.menubar { flex: none; display: flex; padding: 1px 2px; user-select: none; }
.menu { position: relative; }
.menu > .menu-title { display: block; padding: 3px 8px; cursor: default; }
.menu.open > .menu-title { background: #000080; color: #ffffff; }
.dropdown {
  display: none; position: absolute; left: 0; top: 100%; min-width: 168px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 2px 2px 0 rgba(0,0,0,.35);
  padding: 2px; z-index: 500;
}
.menu.open > .dropdown { display: block; }
.dropdown div.mi { padding: 4px 22px 4px 12px; cursor: default; white-space: nowrap; }
.dropdown div.mi:hover { background: #000080; color: #ffffff; }
.dropdown div.mi .mi-key { float: right; margin-left: 24px; color: #606060; }
.dropdown div.mi:hover .mi-key { color: #c8c8dc; }
.dropdown div.mi.disabled { color: #808080; text-shadow: 1px 1px 0 #ffffff; }
.dropdown div.mi.disabled:hover { background: transparent; color: #808080; }
.dropdown hr {
  border: none; border-top: 1px solid #808080; border-bottom: 1px solid #ffffff; margin: 3px 2px;
}

/* ---- window parts ---- */
.addressbar {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 6px;
  border-top: 1px solid #ffffff; border-bottom: 1px solid #808080;
}
.address-field {
  flex: 1; background: #ffffff; padding: 2px 6px;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
  font-family: "Courier New", monospace; font-size: 11px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.window-body { flex: 1; padding: 10px; overflow: auto; min-height: 0; }
.window-body.flush { padding: 0; }
.statusbar { flex: none; display: flex; gap: 4px; padding: 3px 4px 4px; }
.status-panel {
  background: #c0c0c0; padding: 3px 8px;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-main { flex: 1; }

/* ---- resize handles ---- */
.rz { position: absolute; z-index: 3; }
.rz-n { top: -3px; left: 6px; right: 6px; height: 6px; cursor: ns-resize; }
.rz-s { bottom: -3px; left: 6px; right: 6px; height: 6px; cursor: ns-resize; }
.rz-w { left: -3px; top: 6px; bottom: 6px; width: 6px; cursor: ew-resize; }
.rz-e { right: -3px; top: 6px; bottom: 6px; width: 6px; cursor: ew-resize; }
.rz-nw { left: -3px; top: -3px; width: 10px; height: 10px; cursor: nwse-resize; }
.rz-se { right: -3px; bottom: -3px; width: 14px; height: 14px; cursor: nwse-resize; }
.rz-ne { right: -3px; top: -3px; width: 10px; height: 10px; cursor: nesw-resize; }
.rz-sw { left: -3px; bottom: -3px; width: 10px; height: 10px; cursor: nesw-resize; }
.win95-window.maximized .rz, .win95-window.dialog .rz { display: none; }

/* ---- common widgets ---- */
h2.hd { font-size: 15px; margin: 0 0 12px; }
.window-body p { margin: 0 0 12px; line-height: 1.5; }
.info-box, .white-box {
  background: #ffffff;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
  padding: 10px 14px; margin-bottom: 14px;
}
.info-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 3px 0; border-bottom: 1px dotted #c0c0c0;
}
.info-row:last-child { border-bottom: none; }
.info-row span:first-child { color: #000080; }
.win-list {
  list-style: none; margin: 0; padding: 0; background: #ffffff;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
}
.win-list li { padding: 6px 10px; border-bottom: 1px solid #dfdfdf; }
.win-list li:last-child { border-bottom: none; }
.win-field {
  width: 100%; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px;
  padding: 3px 5px; background: #ffffff;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf;
}
.win-field:disabled { color: #808080; background: #dcdcdc; }
.form-row { margin-bottom: 10px; }
.form-row label { display: block; margin-bottom: 3px; }
.win-btn {
  font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px;
  padding: 5px 14px; min-width: 78px; background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080; cursor: default;
}
.win-btn:active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  padding: 6px 13px 4px 15px;
}
.win-btn:disabled { color: #808080; text-shadow: 1px 1px 0 #ffffff; }
.dialog .window-body { padding: 14px; }
.dlg-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.dlg-buttons { display: flex; gap: 8px; justify-content: flex-end; }

/* ---- taskbar ---- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 32px;
  background: #c0c0c0; border-top: 1px solid #ffffff;
  display: flex; align-items: center; gap: 4px; padding: 2px 4px; z-index: 1000;
}
.start-btn {
  display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px;
  font-weight: bold; font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080; cursor: default; flex: none;
}
.start-btn.pressed {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  padding: 1px 6px 0 8px;
}
.taskbar-sep {
  flex: none; width: 3px; height: 22px;
  border-left: 1px solid #808080; border-right: 1px solid #ffffff; margin: 0 2px;
}
#task-buttons { flex: 1; display: flex; gap: 3px; overflow: hidden; }
.task-btn {
  display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px;
  font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 12px; text-align: left;
  background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  flex: 1 1 0; min-width: 40px; max-width: 168px; overflow: hidden; cursor: default;
}
.task-btn.active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  background-image: repeating-linear-gradient(45deg, #dfdfdf 0 1px, #c0c0c0 1px 2px);
  font-weight: bold;
}
.task-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray {
  flex: none; height: 24px; display: flex; align-items: center; gap: 10px; padding: 0 8px;
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
  box-shadow: inset 1px 1px 0 #000000, inset -1px -1px 0 #dfdfdf; font-size: 11px;
}
.tray b { color: #000080; }

/* ---- start menu ---- */
.start-menu {
  position: fixed; left: 4px; bottom: 34px; width: 214px; background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 2px 2px 0 rgba(0,0,0,.4);
  display: none; z-index: 1001;
}
.start-menu.open { display: flex; }
.start-banner {
  flex: none; width: 26px; background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.start-banner span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: #ffffff; font-weight: bold; font-size: 13px; letter-spacing: 2px;
}
.start-items { flex: 1; padding: 3px; min-width: 0; }
.start-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  cursor: default; position: relative; user-select: none;
}
.start-item:hover, .start-item.open { background: #000080; color: #ffffff; }
.start-item .arrow { margin-left: auto; font-size: 10px; }
.start-items hr {
  border: none; border-top: 1px solid #808080; border-bottom: 1px solid #ffffff; margin: 3px 2px;
}
.flyout {
  display: none; position: absolute; left: 100%; top: -3px; min-width: 180px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff; border-left: 1px solid #ffffff;
  border-right: 1px solid #000000; border-bottom: 1px solid #000000;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080, 2px 2px 0 rgba(0,0,0,.4);
  padding: 3px; color: #000000; z-index: 1002;
}
.start-item.open > .flyout { display: block; }

/* ---- boot / shutdown overlays ---- */
.fullscreen-overlay {
  position: fixed; inset: 0; background: #000080; color: #c0c0c0;
  display: none; align-items: center; justify-content: center; z-index: 5000;
  font-family: "Courier New", monospace; font-size: 14px; line-height: 1.7;
  text-align: center; padding: 24px;
}
.fullscreen-overlay.on { display: flex; }
.fullscreen-overlay a { color: #ffffff; }

@media (max-width: 560px) {
  .task-label { display: none; }
  .start-btn span.start-text { display: none; }
  .dicon { width: 76px; }
}

/* objective counter in the tray */
#tray-goal { cursor: default; font-weight: bold; color: #000080; }
#tray-goal.won { color: #006000; }
