/* Windows 98 — core shell styles */

:root {
  --face: #c0c0c0;
  --face-light: #dfdfdf;
  --face-dark: #808080;
  --black: #000000;
  --white: #ffffff;
  --highlight: #000080;
  --highlight-text: #ffffff;
  --desktop: #008080;
  --title-active-1: #000080;
  --title-active-2: #1084d0;
  --title-inactive-1: #808080;
  --title-inactive-2: #b5b5b5;
  --tooltip: #ffffe1;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font-family: Tahoma, "MS Sans Serif", "Segoe UI", Verdana, sans-serif;
  font-size: 11px;
  -webkit-font-smoothing: none;
  user-select: none;
  cursor: default;
}

.pixelated, .icon-img, canvas.crt {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ---------- Bevel helpers (2-pixel 3D edges, true to the era) ---------- */
.raised {
  background: var(--face);
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
}
.sunken {
  background: var(--face);
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
}
.field-sunken {
  background: #fff;
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #808080,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
}
.thin-raised {
  box-shadow:
    inset -1px -1px #808080,
    inset 1px 1px #ffffff;
}
.thin-sunken {
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #808080;
}

/* ---------- Buttons ---------- */
.btn98 {
  background: var(--face);
  border: none;
  outline: none;
  font: inherit;
  color: #000;
  padding: 4px 10px;
  min-width: 75px;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
}
.btn98:active:not(:disabled), .btn98.pressed {
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
  padding: 5px 9px 3px 11px;
}
.btn98:disabled { color: #808080; text-shadow: 1px 1px #fff; }
.btn98:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn98.default-btn {
  box-shadow:
    0 0 0 1px #0a0a0a,
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
}
.btn98.tb {
  min-width: 0;
  padding: 2px;
}

/* ---------- Window ---------- */
.w98win {
  position: absolute;
  background: var(--face);
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf,
    inset -2px -2px #808080,
    inset 2px 2px var(--face);
  padding: 3px;
  display: flex;
  flex-direction: column;
  min-width: 80px;
  min-height: 40px;
}
.w98win.modal-backdrop-active { }
.w98win.dragging { opacity: 0.98; }

.titlebar {
  height: 20px;
  display: flex;
  align-items: center;
  padding: 1px 2px 1px 3px;
  flex: none;
  background: linear-gradient(90deg, var(--title-inactive-1), var(--title-inactive-2));
  color: #d8d8d8;
}
.w98win.active .titlebar {
  background: linear-gradient(90deg, var(--title-active-1), var(--title-active-2));
  color: #fff;
}
.titlebar .ticon { width: 16px; height: 16px; margin-right: 3px; flex: none; }
.titlebar .ttext {
  font-weight: bold;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  flex: 1;
  letter-spacing: 0;
}
.titlebar .tbtns { display: flex; gap: 2px; flex: none; }
.tbtn {
  width: 16px; height: 14px;
  background: var(--face);
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
  position: relative;
}
.tbtn:active {
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
}
.tbtn svg { display: block; }

.win-client {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Menu bar inside windows */
.menubar {
  display: flex;
  flex: none;
  padding: 1px 0;
  background: var(--face);
  position: relative;
  z-index: 5;
}
.menubar .mb-item {
  padding: 2px 7px 1px;
  position: relative;
}
.menubar .mb-item.open, .menubar .mb-item:hover.hot {
  background: var(--highlight);
  color: var(--highlight-text);
}
.menubar .mb-item.open { background: var(--highlight); color: var(--highlight-text); }
.mn-accel { text-decoration: underline; }

.statusbar {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 2px 2px 0;
  background: var(--face);
}
.statusbar .sb-pane {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080;
  padding: 2px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.statusbar .sb-pane.grip {
  flex: none;
  width: 14px;
  padding: 0;
  box-shadow: none;
  background:
    linear-gradient(135deg, transparent 0 2px, #808080 2px 3px, transparent 3px 6px, #808080 6px 7px, transparent 7px 10px, #808080 10px 11px, transparent 11px) no-repeat right bottom / 12px 12px,
    linear-gradient(135deg, transparent 0 3px, #fff 3px 4px, transparent 4px 7px, #fff 7px 8px, transparent 8px 11px, #fff 11px 12px, transparent 12px) no-repeat right bottom / 12px 12px;
}

/* ---------- Popup menus ---------- */
.popup-menu {
  position: absolute;
  background: var(--face);
  padding: 2px;
  z-index: 10000;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px var(--face),
    3px 3px 0 rgba(0,0,0,0.35);
  min-width: 120px;
}
.popup-menu .mi {
  display: flex;
  align-items: center;
  padding: 3px 18px 3px 6px;
  gap: 6px;
  white-space: nowrap;
  position: relative;
}
.popup-menu .mi .mi-gutter {
  width: 16px; height: 16px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.popup-menu .mi .mi-label { flex: none; }
.popup-menu .mi .mi-label b { font-weight: normal; }
.popup-menu .mi.default-verb .mi-label { font-weight: bold; }
.popup-menu .mi .mi-accel { margin-left: 24px; color: inherit; flex: 1; text-align: right; }
.popup-menu .mi .mi-arrow { width: 8px; flex: none; }
.popup-menu .mi.disabled { color: #808080; text-shadow: 1px 1px #fff; }
.popup-menu .mi.checked .mi-gutter::after {
  content: "";
  width: 8px; height: 8px;
}
.popup-menu .mi.selected:not(.disabled) {
  background: var(--highlight);
  color: var(--highlight-text);
}
.popup-menu .mi.selected:not(.disabled) .mi-accel { color: var(--highlight-text); }
.popup-menu .msep { height: 2px; margin: 2px 1px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }

/* ---------- Desktop ---------- */
#screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}
#desktop {
  position: absolute;
  inset: 0;
  bottom: 28px;
  background: var(--desktop);
  overflow: hidden;
}
#desktop.wallpaper-clouds { background-image: var(--clouds-img, none); background-size: auto; }

.desk-icon {
  position: absolute;
  width: 74px;
  padding: 4px 2px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.desk-icon .di-img { width: 32px; height: 32px; flex: none; }
.desk-icon .di-label {
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
  line-height: 12px;
  padding: 1px 2px;
  max-width: 70px;
  word-wrap: break-word;
}
.desk-icon.selected .di-label {
  background: var(--highlight);
  outline: 1px dotted #ffff00;
  color: #fff;
  text-shadow: none;
}
.desk-icon.selected .di-img { }
.desk-icon .di-rename {
  font: inherit;
  width: 70px;
  text-align: center;
  background: #fff;
  color: #000;
  border: none;
  outline: none;
  box-shadow: inset 1px 1px #000;
}

.marquee {
  position: absolute;
  border: 1px dotted #fff;
  background: rgba(0,0,128,0.15);
  pointer-events: none;
  z-index: 3;
}

/* ---------- Taskbar ---------- */
#taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  background: var(--face);
  box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
  display: flex;
  align-items: center;
  padding: 2px 2px 2px 3px;
  gap: 3px;
  z-index: 9000;
}
#start-btn {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 3px;
  font-weight: bold;
  font-size: 11px;
  flex: none;
}
#start-btn img { width: 16px; height: 16px; }
#start-btn.pressed {
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
}
.tb-sep {
  flex: none;
  width: 2px;
  height: 22px;
  box-shadow: inset -1px 0 #fff, inset 1px 0 #808080;
}
#quicklaunch {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: none;
  padding: 0 2px;
}
#quicklaunch .ql-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0;
}
#quicklaunch .ql-btn:hover {
  box-shadow: inset -1px -1px #808080, inset 1px 1px #fff;
}
#quicklaunch .ql-btn:active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080;
}
#quicklaunch img { width: 16px; height: 16px; }

#task-buttons {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow: hidden;
  min-width: 0;
}
.task-btn {
  height: 22px;
  min-width: 60px;
  max-width: 160px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  font: inherit;
  font-size: 11px;
  background: var(--face);
  border: none;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
}
.task-btn img { width: 16px; height: 16px; flex: none; }
.task-btn span { overflow: hidden; text-overflow: ellipsis; }
.task-btn.active {
  box-shadow:
    inset -1px -1px #ffffff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
  font-weight: bold;
  background-image: repeating-conic-gradient(#fff 0% 25%, #dfdfdf 0% 50%);
  background-size: 2px 2px;
}
.task-btn.flash {
  background: #1084d0;
  color: #fff;
}

#tray {
  flex: none;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080;
}
#tray img { width: 16px; height: 16px; }
#tray-clock { font-size: 11px; padding-left: 2px; }

/* ---------- Start menu ---------- */
#startmenu {
  position: absolute;
  z-index: 9500;
  display: flex;
  background: var(--face);
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px #808080,
    inset 2px 2px var(--face),
    2px 2px 0 rgba(0,0,0,0.4);
  padding: 2px;
}
#sm-banner {
  width: 24px;
  background: linear-gradient(180deg, #000080, #1084d0);
  color: #c0c0c0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  flex: none;
}
#sm-banner span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #c0c0c0;
  font-family: Tahoma, sans-serif;
  white-space: nowrap;
}
#sm-banner span b { color: #fff; font-weight: bold; }
#startmenu .sm-items { display: flex; flex-direction: column; min-width: 170px; padding: 1px; }
#startmenu .mi { font-size: 11px; padding: 5px 20px 5px 4px; }
#startmenu .mi .mi-gutter { width: 24px; height: 24px; }
#startmenu .mi .mi-gutter img { width: 24px; height: 24px; }
#startmenu .sm-sep { margin: 3px 2px; }

/* ---------- Tooltip ---------- */
.tooltip98 {
  position: absolute;
  background: var(--tooltip);
  border: 1px solid #000;
  padding: 2px 4px;
  font-size: 11px;
  z-index: 20000;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- Dialogs ---------- */
.dlg-body { padding: 12px; display: flex; gap: 12px; }
.dlg-body .dlg-icon { width: 32px; height: 32px; flex: none; }
.dlg-text { padding-top: 4px; line-height: 15px; max-width: 280px; }
.dlg-buttons { display: flex; justify-content: center; gap: 6px; padding: 4px 12px 12px; }

.radio98, .check98 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}
.radio98 input, .check98 input { appearance: none; width: 12px; height: 12px; background: #fff; margin: 0; flex: none; position: relative; }
.radio98 input { border-radius: 50%; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.check98 input { box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.radio98 input:checked::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #000 60%, transparent 61%);
}
.check98 input:checked::after { content: "✓"; position: absolute; left: 1px; top: -3px; font-size: 12px; color: #000; }
.radio98 input:disabled, .check98 input:disabled { background: var(--face); }

.edit98 {
  font: inherit;
  background: #fff;
  border: none;
  padding: 3px 4px;
  outline: none;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.edit98:focus { outline: none; }

.combo98 {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  height: 21px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.combo98 select {
  border: none;
  background: transparent;
  font: inherit;
  outline: none;
  flex: 1;
  padding: 1px 2px;
  appearance: none;
}
.combo98 .combo-arrow {
  width: 16px;
  flex: none;
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  display: flex; align-items: center; justify-content: center;
}

.list98 {
  background: #fff;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  overflow: auto;
}
.list98 .li {
  padding: 1px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.list98 .li img { width: 16px; height: 16px; flex: none; }
.list98 .li.sel { background: var(--highlight); color: #fff; }

.tabs98 { position: relative; }
.tabstrip { display: flex; padding: 0 4px; position: relative; z-index: 2; }
.tabstrip .tab {
  padding: 3px 12px 2px;
  background: var(--face);
  border: none;
  font: inherit;
  position: relative;
  top: 2px;
  margin-right: -1px;
  box-shadow: inset -1px 0 #0a0a0a, inset 1px 1px #dfdfdf, inset 2px 2px var(--face), inset -2px 0 #808080;
  border-radius: 3px 3px 0 0;
}
.tabstrip .tab.sel {
  top: 0;
  padding-bottom: 4px;
  z-index: 3;
  box-shadow: inset -1px 0 #0a0a0a, inset 1px 1px #fff, inset 2px 2px var(--face), inset -2px 0 #808080, 0 2px 0 var(--face);
}
.tabpane {
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px var(--face);
  padding: 12px;
  position: relative;
  z-index: 1;
  margin-top: -2px;
}

.group98 {
  border: 1px solid #808080;
  box-shadow: inset 1px 1px #fff, 1px 1px #fff;
  padding: 10px 8px 8px;
  margin: 8px 0;
  position: relative;
}
.group98 > .group-label {
  position: absolute;
  top: -7px;
  left: 8px;
  background: var(--face);
  padding: 0 4px;
}

/* ---------- Boot screens ---------- */
#boot-layer {
  position: fixed;
  inset: 0;
  z-index: 50000;
  background: #000;
}
#bios-screen {
  color: #aaaaaa;
  font-family: "Fixedsys", "Perfect DOS VGA 437", "Courier New", monospace;
  font-size: 15px;
  line-height: 17px;
  padding: 8px 10px;
  white-space: pre-wrap;
  height: 100%;
}
#boot-splash {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}
#boot-splash .splash-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#bootbar {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 14px;
  overflow: hidden;
}
#bootbar .bootbar-fill {
  position: absolute;
  top: 0; left: -300px;
  width: 600px; height: 100%;
  background: linear-gradient(90deg,
    #00107c, #0a2ba0, #3563d0, #7db2e8, #dfeaff, #7db2e8, #3563d0, #0a2ba0, #00107c);
  animation: bootbar-move 1.3s linear infinite;
}
@keyframes bootbar-move { from { transform: translateX(0); } to { transform: translateX(300px); } }

/* ---------- Screensaver / shutdown ---------- */
#screensaver {
  position: fixed;
  inset: 0;
  z-index: 40000;
  background: #000;
  display: none;
}
#shutdown-screen {
  position: fixed;
  inset: 0;
  z-index: 60000;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#shutdown-screen .safe-text {
  color: #ffaa00;
  font-family: Tahoma, sans-serif;
  font-size: 22px;
  font-weight: bold;
  line-height: 34px;
}

/* Alt-tab */
#alttab {
  position: fixed;
  z-index: 45000;
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px var(--face), 3px 3px 0 rgba(0,0,0,.4);
  padding: 8px;
  display: none;
}
#alttab .at-row { display: flex; gap: 8px; }
#alttab .at-item { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 2px solid transparent; }
#alttab .at-item.sel { border-color: var(--highlight); background: #fff; }
#alttab .at-item img { width: 32px; height: 32px; }
#alttab .at-label { text-align: center; margin-top: 6px; min-height: 13px; }

/* ---------- App specifics ---------- */

/* Notepad */
.np-edit {
  flex: 1;
  background: #fff;
  border: none;
  resize: none;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px;
  padding: 2px;
  outline: none;
  overflow: auto;
  white-space: pre;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.np-edit.wrap { white-space: pre-wrap; word-break: break-all; }

/* Minesweeper */
.ms-frame { background: var(--face); padding: 6px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ms-panel {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  padding: 4px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.ms-lcd {
  background: #000;
  color: #f00;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 1px;
  padding: 0 2px;
  line-height: 24px;
  min-width: 44px;
  text-align: center;
  text-shadow: 0 0 2px #f00;
}
.ms-face {
  width: 26px; height: 26px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  background: var(--face);
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.ms-face:active { box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; }
.ms-grid {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  display: grid;
}
.ms-cell { width: 16px; height: 16px; position: relative; }
.ms-cell.open {
  box-shadow: inset 1px 1px #808080;
  background: var(--face);
}
.ms-cell.closed {
  box-shadow: inset -1px -1px #808080, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  background: var(--face);
}
.ms-cell.mine-hit { background: #f00; }
.ms-cell canvas { display: block; }

/* Calculator */
.calc-body { background: var(--face); padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.calc-display {
  background: #fff;
  text-align: right;
  padding: 3px 6px;
  font-size: 15px;
  font-family: "Lucida Console", monospace;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  overflow: hidden;
  white-space: nowrap;
}
.calc-grid { display: grid; gap: 4px; }
.calc-grid .btn98 { min-width: 0; padding: 3px 0; font-size: 12px; }
.calc-grid .btn98.red { color: #c00; }
.calc-grid .btn98.blue { color: #00c; }

/* Paint */
.paint-layout { flex: 1; display: flex; min-height: 0; }
.paint-tools {
  width: 55px;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 3px;
  align-content: start;
  background: var(--face);
}
.paint-tools .pt-btn {
  width: 24px; height: 22px;
  background: var(--face);
  border: none;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.paint-tools .pt-btn.sel {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
  background-image: repeating-conic-gradient(#fff 0% 25%, #dfdfdf 0% 50%);
  background-size: 2px 2px;
}
.paint-tools .pt-btn:not(.sel):hover { box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
.paint-canvas-wrap {
  flex: 1;
  overflow: auto;
  background: #808080;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080;
  padding: 8px;
}
.paint-canvas-wrap canvas { background: #fff; box-shadow: 1px 1px 0 #000; }
.paint-bottom { display: flex; gap: 4px; flex: none; padding: 3px; align-items: flex-end; }
.paint-colors { display: grid; grid-template-columns: repeat(14, 16px); grid-template-rows: 16px 16px; gap: 1px; }
.paint-colors .pc { width: 16px; height: 16px; box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
.paint-cur {
  width: 26px; height: 26px;
  position: relative;
  flex: none;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.paint-cur .pc-fg { position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; box-shadow: 0 0 0 1px #808080; z-index: 2; }
.paint-cur .pc-bg { position: absolute; right: 3px; bottom: 3px; width: 12px; height: 12px; box-shadow: 0 0 0 1px #808080; }

/* Solitaire */
.sol-bg { flex: 1; background: #008000; position: relative; overflow: hidden; }
.sol-card {
  position: absolute;
  width: 71px; height: 96px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.sol-card.back { background: #0000a8; }
.sol-card.dragging { z-index: 5000; }
.sol-top { flex: none; display: flex; padding: 6px 8px; gap: 8px; background: #008000; align-items: center; }

/* Explorer */
.exp-toolbar {
  display: flex; gap: 2px; padding: 2px 4px; flex: none; align-items: center;
  border-bottom: 1px solid #808080;
  box-shadow: 0 1px 0 #fff;
}
.exp-toolbar .tb98 {
  width: 24px; height: 22px; border: none; background: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.exp-toolbar .tb98:not(:disabled):hover { box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
.exp-toolbar .tb98:not(:disabled):active { box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; }
.exp-toolbar .tb98:disabled { opacity: 0.45; }
.exp-toolbar img { width: 16px; height: 16px; }
.exp-addr { display: flex; align-items: center; gap: 4px; padding: 2px 4px 4px; flex: none; }
.exp-main { flex: 1; display: flex; min-height: 0; }
.exp-tree { width: 175px; flex: none; overflow: auto; background: #fff; margin-right: 2px; box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.exp-tree .tnode { display: flex; align-items: center; gap: 3px; padding: 1px 2px; white-space: nowrap; }
.exp-tree .tnode.sel { background: var(--highlight); color: #fff; }
.exp-tree .tnode img { width: 16px; height: 16px; }
.exp-list { flex: 1; overflow: auto; background: #fff; box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; position: relative; }

/* Details view table */
.det-header { display: flex; background: var(--face); position: sticky; top: 0; z-index: 2; }
.det-header .dh {
  padding: 2px 6px;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #fff;
  white-space: nowrap;
  overflow: hidden;
  font-size: 11px;
  min-width: 60px;
}
.det-row { display: flex; padding: 1px 0; align-items: center; }
.det-row .dc { padding: 1px 6px; white-space: nowrap; overflow: hidden; font-size: 11px; }
.det-row.sel { background: var(--highlight); color: #fff; }
.det-row img { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }

/* DOS prompt */
.dos-body {
  flex: 1;
  background: #000;
  color: #c0c0c0;
  font-family: "Fixedsys", "Lucida Console", "Courier New", monospace;
  font-size: 14px;
  line-height: 16px;
  padding: 2px 4px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.dos-body .dos-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: #c0c0c0;
  vertical-align: -2px;
  animation: dosblink 1s steps(1) infinite;
}
@keyframes dosblink { 50% { background: transparent; } }

/* IE */
.ie-chrome { flex: none; }
.ie-content {
  flex: 1;
  background: #fff;
  overflow: auto;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080;
  margin: 2px;
  user-select: text;
  cursor: auto;
}
.ie-page { font-family: "Times New Roman", Times, serif; font-size: 14px; color: #000; padding: 0; }
.ie-page a { color: #0000ee; }
.ie-page a:visited { color: #551a8b; }

/* Control panel grid */
.cp-grid {
  flex: 1;
  overflow: auto;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  margin: 2px;
}
.cp-applet { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; text-align: center; }
.cp-applet img { width: 32px; height: 32px; }
.cp-applet.sel { background: var(--highlight); color: #fff; }

/* Volume popup */
.vol-popup {
  position: absolute;
  width: 84px;
  background: var(--face);
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 9600;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px var(--face), 3px 3px 0 rgba(0,0,0,.35);
}
.vol-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 21px;
  height: 96px;
  appearance: none;
  background: transparent;
}
.vol-slider::-webkit-slider-runnable-track { width: 4px; background: #808080; box-shadow: inset 1px 1px #404040, inset -1px -1px #fff; }
.vol-slider::-webkit-slider-thumb {
  appearance: none;
  width: 11px; height: 21px;
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  margin-left: -4px;
}

/* Error/BSOD */
.bsod {
  position: fixed; inset: 0; z-index: 55000; background: #0000aa; color: #fff;
  font-family: "Lucida Console", "Courier New", monospace; font-size: 15px; line-height: 20px;
  display: none; padding: 10vh 12vw; white-space: pre-wrap;
}
.bsod .bsod-title { background: #aaaaaa; color: #0000aa; padding: 0 8px; display: inline-block; margin-bottom: 14px; }

/* Welcome */
.welcome-hero {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track {
  background-image: repeating-conic-gradient(#fff 0% 25%, #dfdfdf 0% 50%);
  background-size: 2px 2px;
}
::-webkit-scrollbar-thumb {
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
::-webkit-scrollbar-button {
  background: var(--face);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  height: 16px; width: 16px;
}
::-webkit-scrollbar-corner { background: var(--face); }
