/* desktop.css — desktop, taskbar, start menu, boot screens, small apps */
#desktop {
  position: absolute; inset: 0;
  overflow: hidden;
  visibility: hidden;
}
/* wallpapers */
#desktop.wall-teal { background: #3a6ea5; }
#desktop.wall-clouds {
  background: linear-gradient(180deg, #2565a8 0%, #4f8fd0 45%, #a8cbe8 75%, #7fb0d8 100%);
}
#desktop.wall-encarta { background: #123a5e; position: relative; }
#desktop.wall-encarta::after {
  content: "";
  position: absolute; right: 48px; bottom: 48px;
  width: 220px; height: 220px; opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(57,181,74,.55), transparent 62%),
              radial-gradient(circle at 38% 38%, rgba(232,64,64,.45), transparent 55%),
              radial-gradient(circle at 62% 60%, rgba(255,210,63,.4), transparent 60%),
              radial-gradient(circle at 50% 45%, rgba(16,132,208,.5), transparent 70%);
  border-radius: 50%;
  filter: blur(1px);
}
#desktop.wall-setup { background: #0a246a; }
#desktop.wall-forest { background: linear-gradient(180deg, #87ceeb 0%, #c8e8c8 60%, #3f7f3f 100%); }

#desk-icons {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 12px;
  padding: 8px 4px;
}
.desk-icon {
  width: 76px; padding: 4px 2px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
}
.desk-icon .desk-ico { position: relative; height: 32px; }
.desk-icon .shortcut-arrow { position: absolute; left: -3px; bottom: -4px; }
.desk-icon .desk-label {
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0,0,0,.8);
  padding: 1px 2px;
  line-height: 12px;
  max-width: 74px;
  overflow-wrap: break-word;
}
.desk-icon.selected .desk-label { background: #000080; outline: 1px dotted #ffe08a; }
.desk-icon.selected .desk-ico { filter: brightness(.82) saturate(1.25); }

/* ============ taskbar ============ */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 28px;
  background: var(--face);
  box-shadow: inset 0 1px #fff, inset 0 2px #dfdfdf, inset 1px 0 #fff;
  display: flex; align-items: stretch;
  z-index: 45000;
  visibility: hidden;
}
#btn-start {
  display: flex; align-items: center;
  min-height: 22px; margin: 2px 2px 2px 2px;
  padding: 0 6px 0 4px;
  background: var(--face);
  border: none;
  box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--face-lt);
}
#btn-start.pressed, #btn-start:active {
  box-shadow: inset -1px -1px var(--hl), inset 1px 1px var(--dk), inset -2px -2px var(--face-lt), inset 2px 2px var(--sh);
  padding: 1px 5px 0 5px;
}
#btn-start svg { margin-bottom: 1px; }
#task-area {
  flex: 1; display: flex; align-items: stretch; gap: 3px;
  padding: 2px 4px; overflow: hidden;
}
.task-btn {
  display: flex; align-items: center; gap: 4px;
  min-width: 40px; max-width: 160px; flex: 1 1 0;
  background: var(--face); border: none; padding: 0 6px;
  box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--face-lt);
  overflow: hidden;
}
.task-btn .task-btn-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-btn.active {
  box-shadow: inset -1px -1px var(--hl), inset 1px 1px var(--dk), inset -2px -2px var(--face-lt), inset 2px 2px var(--sh);
  background: var(--face-lt);
  font-weight: 400;
}
#tray {
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px 0 8px; margin: 2px 2px 2px 0;
  box-shadow: inset -1px -1px #fff, inset 1px 1px var(--sh);
}
.tray-ico { width: 16px; height: 16px; display: flex; }
#clock { padding: 0 2px; min-width: 52px; text-align: center; }

/* ============ start menu ============ */
#startmenu {
  position: absolute; left: 0; bottom: 28px;
  display: flex;
  background: var(--face);
  box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--face-lt);
  padding: 3px;
  z-index: 48000;
}
#sm-banner {
  width: 21px; flex: none;
  background: linear-gradient(0deg, #000080 0%, #1084d0 100%);
  position: relative;
}
#sm-banner-text {
  position: absolute; left: 0; bottom: 8px;
  transform: rotate(-90deg); transform-origin: left bottom;
  white-space: nowrap; color: #fff; font-weight: 700; font-size: 15px;
  padding: 0 0 0 2px;
}
#sm-banner-text span { font-size: 11px; }
#sm-items { padding: 2px; min-width: 190px; }
.sm-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 4px 5px 4px; margin: 1px 0;
  position: relative;
}
.sm-item .sm-ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex: none; }
.sm-item .sm-label { flex: 1; white-space: nowrap; }
.sm-item .sm-arrow { font-size: 8px; margin-left: 6px; }
.sm-item:not(.disabled):hover, .sm-item:not(.disabled).hover, .sm-item.open {
  background: var(--navy); color: #fff;
}
.sm-item.disabled { color: var(--sh); }
.sm-item.disabled .sm-ico { opacity: .45; filter: grayscale(1); }
.sm-sep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px var(--sh), inset 0 -1px var(--hl); }
.sm-sub {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--face);
  box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--face-lt);
  padding: 2px; min-width: 170px; z-index: 48001;
}

/* ============ boot screens ============ */
.boot-screen { position: absolute; inset: 0; background: #000; color: #c8c8c8; }
#power-screen { background: radial-gradient(ellipse at 50% 38%, #23282e 0%, #0c0e10 65%, #000 100%); display: flex; align-items: center; justify-content: center; }
.crt-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.crt { width: 300px; }
.crt-screen {
  height: 210px; background: #0a0d0f;
  border: 14px solid #d8d4c8; border-bottom-width: 10px;
  border-radius: 10px;
  box-shadow: inset 0 0 24px rgba(0,0,0,.9), 0 6px 18px rgba(0,0,0,.6);
  position: relative; overflow: hidden;
}
.crt-off-line {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 2px; background: #3a5a3a; border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(80,160,80,.35);
}
.crt-panel {
  margin-top: 6px; display: flex; align-items: center; gap: 10px;
  padding: 0 4px;
}
.crt-led { width: 7px; height: 7px; border-radius: 50%; background: #402020; box-shadow: inset 0 0 2px #000; }
.crt-power {
  width: 34px; height: 22px; border: none; cursor: pointer;
  background: #c8c4b8;
  box-shadow: inset -1px -1px #6a6a5a, inset 1px 1px #fff, inset -2px -2px #9a9a8a, inset 2px 2px #e8e8e0;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.crt-power:active { box-shadow: inset 1px 1px #6a6a5a, inset -1px -1px #fff; }
.crt-power span {
  width: 12px; height: 10px;
  background: linear-gradient(180deg, #4a4a4a, #1a1a1a);
  clip-path: polygon(50% 0, 65% 30%, 58% 30%, 80% 55%, 72% 55%, 95% 100%, 5% 100%, 28% 55%, 20% 55%, 42% 30%, 35% 30%);
}
.crt-brand { color: #a8a898; font-size: 10px; font-family: var(--font-ui); letter-spacing: 1px; }
.crt-note { color: #9aa4ae; font-size: 12px; font-family: var(--font-ui); }
#post-screen { font-family: var(--font-mono); padding: 16px 20px; overflow: hidden; }
.post-con { font-size: 13px; line-height: 17px; }
.post-line.c { color: #c8c8c8; }
.post-line.b { color: #fff; }
#splash-screen { background: #000; }
.splash-inner {
  position: absolute; top: 34%; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.splash-ms { color: #fff; font-style: italic; font-size: 20px; font-family: Georgia, serif; margin-top: 10px; }
.splash-win { color: #fff; font-size: 44px; font-weight: 700; font-family: "Trebuchet MS", Verdana, sans-serif; letter-spacing: -1px; }
.splash-98 { color: #d8d8d8; font-weight: 400; margin-left: 6px; }
.splash-bar-wrap { position: absolute; bottom: 60px; left: 10%; right: 10%; height: 12px; border: 1px solid #4a6a9a; }
.splash-bar {
  height: 100%; width: 30%;
  background: linear-gradient(90deg, transparent, #6a9ae8, #b8d0f8, #6a9ae8, transparent);
  animation: splashSlide 2.2s linear infinite;
}
@keyframes splashSlide { from { transform: translateX(-110%); } to { transform: translateX(370%); } }
.splash-copy { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #8a8a8a; font-size: 11px; font-family: var(--font-ui); }
#shutdown-screen { display: flex; align-items: center; justify-content: center; background: #0a3d6b; }
.shutdown-msg { text-align: center; }
.shutdown-box { color: #fff; font-size: 40px; font-weight: 700; font-family: "Trebuchet MS", Verdana, sans-serif; margin-bottom: 10px; }
.shutdown-text { color: #ffe8b0; font-size: 14px; font-family: var(--font-ui); }
#off-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; }
.off-text { color: #ffa500; font-size: 28px; font-family: var(--font-mono); text-align: center; line-height: 40px; }
.off-hint { color: #5a5a5a; font-size: 11px; font-family: var(--font-ui); }
#standby-screen { background: #000; }
#dos-screen { background: #000; }
.dos-con { position: absolute; inset: 0; padding: 8px 10px; color: #c0c0c0; font-family: var(--font-mono); font-size: 14px; line-height: 17px; overflow: hidden; }

/* ============ window resize handles ============ */
.rz { position: absolute; z-index: 5; }
.rz-n { top: -2px; left: 6px; right: 6px; height: 5px; cursor: n-resize; }
.rz-s { bottom: -2px; left: 6px; right: 6px; height: 5px; cursor: s-resize; }
.rz-e { right: -2px; top: 6px; bottom: 6px; width: 5px; cursor: e-resize; }
.rz-w { left: -2px; top: 6px; bottom: 6px; width: 5px; cursor: w-resize; }
.rz-ne { top: -2px; right: -2px; width: 9px; height: 9px; cursor: ne-resize; }
.rz-nw { top: -2px; left: -2px; width: 9px; height: 9px; cursor: nw-resize; }
.rz-se { bottom: -2px; right: -2px; width: 9px; height: 9px; cursor: se-resize; }
.rz-sw { bottom: -2px; left: -2px; width: 9px; height: 9px; cursor: sw-resize; }

/* ============ explorer-ish shared ============ */
.ex-toolbar { display: flex; align-items: center; gap: 2px; padding: 2px 4px; border-bottom: 1px solid var(--sh); box-shadow: 0 1px var(--hl); flex: none; }
.ex-addr { display: flex; align-items: center; gap: 4px; padding: 2px 4px 3px; flex: none; }
.ex-addr input { flex: 1; }
.ex-view {
  flex: 1; min-height: 0; margin: 0 2px 2px; background: #fff; overflow: auto;
  box-shadow: inset -1px -1px #fff, inset 1px 1px var(--sh), inset -2px -2px var(--face-lt), inset 2px 2px var(--dk);
  padding: 6px;
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 8px 16px;
}
.ex-view.list { display: block; }
.ex-item { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; text-align: center; }
.ex-view.list .ex-item { width: auto; display: flex; flex-direction: row; align-items: center; gap: 5px; padding: 1px 3px; text-align: left; }
.ex-item .ex-label { line-height: 12px; max-width: 80px; overflow-wrap: break-word; }
.ex-item.selected .ex-label { background: var(--sel); color: #fff; }
.ex-item.selected { background: #d8e4f8; }
.ex-view.list .ex-item.selected { background: var(--sel); color: #fff; }

/* ============ minesweeper ============ */
.ms-frame { background: #c0c0c0; padding: 6px; }
.ms-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding: 3px; box-shadow: inset -1px -1px #fff, inset 1px 1px var(--sh); }
.ms-face { width: 26px; height: 26px; font-size: 15px; display: flex; align-items: center; justify-content: center; border: none; background: var(--face); box-shadow: inset -1px -1px var(--dk), inset 1px 1px var(--hl), inset -2px -2px var(--sh), inset 2px 2px var(--face-lt); }
.ms-face:active { box-shadow: inset -1px -1px var(--hl), inset 1px 1px var(--dk); }
.ms-lcd { font-family: var(--font-mono); font-size: 18px; color: #f00; background: #000; padding: 0 2px; line-height: 22px; letter-spacing: 1px; box-shadow: inset 1px 1px var(--sh); }
.ms-grid { display: grid; gap: 0; box-shadow: inset -1px -1px #fff, inset 1px 1px var(--sh); }
.ms-cell { width: 16px; height: 16px; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-family: var(--font-ui); }
.ms-cell.hid { background: var(--face); box-shadow: inset -2px -2px var(--sh), inset 2px 2px var(--hl); }
.ms-cell.hid:active { box-shadow: none; background: #bdbdbd; }
.ms-cell.open { background: var(--face); border: 1px solid #9a9a9a; border-width: 0 0 0 0; width: 16px; height: 15px; box-shadow: inset 1px 0 #9a9a9a, inset 0 1px #9a9a9a; }
.ms-cell.n1 { color: #0000ff; } .ms-cell.n2 { color: #008000; } .ms-cell.n3 { color: #ff0000; }
.ms-cell.n4 { color: #000080; } .ms-cell.n5 { color: #800000; } .ms-cell.n6 { color: #008080; }
.ms-cell.n7 { color: #000; } .ms-cell.n8 { color: #606060; }
.ms-cell.boom { background: #f00; }
.ms-cell.wrong { color: #f00; }

/* ============ calculator ============ */
.calc-disp { margin: 4px 2px 6px; padding: 2px 6px; text-align: right; background: #e8e8d0; font-family: var(--font-mono); font-size: 15px; box-shadow: inset -1px -1px #fff, inset 1px 1px var(--sh); overflow: hidden; }
.calc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.calc-btn { min-width: 0; min-height: 24px; font-size: 12px; }
.calc-btn.op { color: #b00; } .calc-btn.fn { color: #00b; } .calc-btn.eq { color: #070; }

/* ============ volume control ============ */
.vol-row { display: flex; gap: 20px; justify-content: center; align-items: flex-end; padding: 10px 6px 4px; }
.vol-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vol-slider { writing-mode: vertical-lr; direction: rtl; width: 24px; height: 90px; }

/* ============ IE fake ============ */
.ie-page { position: absolute; inset: 0; background: #fff; overflow: auto; font-family: var(--font-doc); color: #000; user-select: text; -webkit-user-select: text; }
.ie-toolbar { display: flex; gap: 2px; padding: 2px 4px; border-bottom: 1px solid var(--sh); flex: none; }
.ie-addr { display: flex; align-items: center; gap: 6px; padding: 2px 4px 3px; flex: none; }
.ie-addr input { flex: 1; }

/* ============ find files rows ============ */
.ff-row {
  display: flex; align-items: center; gap: 2px;
  padding: 2px 4px; cursor: default;
}
.ff-row:hover { background: #e8eef8; }
.ff-row.selected { background: var(--sel); color: #fff; }
.ff-tabs { display: flex; gap: 2px; padding: 2px 4px 0; border-bottom: 1px solid var(--sh); flex: none; }

/* ============ property tabs ============ */
.tab-strip { display: flex; gap: 1px; padding: 2px 6px 0; margin-bottom: -1px; position: relative; z-index: 2; flex: none; }
.tab-btn {
  padding: 3px 8px 4px;
  background: var(--face);
  border-radius: 3px 3px 0 0;
  box-shadow: inset 1px 1px var(--hl), inset -1px 0 var(--dk), inset 0 1px var(--face-lt), inset -2px 0 var(--sh);
  position: relative; top: 2px;
}
.tab-btn.pressed { top: 0; padding-bottom: 6px; z-index: 3; background: var(--face); box-shadow: inset 1px 1px var(--hl), inset -1px 0 var(--dk), inset 0 1px var(--face-lt), inset -2px 0 var(--sh), 0 2px 0 var(--face); }
.tab-panel {
  flex: 1; min-height: 0; overflow: auto;
  background: var(--face);
  box-shadow: inset -1px -1px var(--hl), inset 1px 1px var(--sh), inset -1px -1px var(--hl);
  border: 1px solid; border-color: var(--sh) var(--hl) var(--hl) var(--sh);
  padding: 2px;
  display: flex; flex-direction: column;
}

/* ============ monitor preview ============ */
.mon-preview {
  width: 130px; height: 110px; flex: none;
  border: 8px solid #d8d4c8; border-radius: 6px;
  box-shadow: inset 0 0 4px rgba(0,0,0,.4);
  position: relative;
}
.mon-screen { position: absolute; inset: 0; }
.mon-screen.wall-teal { background: #3a6ea5; }
.mon-screen.wall-clouds { background: linear-gradient(180deg, #2565a8, #a8cbe8); }
.mon-screen.wall-encarta { background: #123a5e; }
.mon-screen.wall-setup { background: #0a246a; }
.mon-screen.wall-forest { background: linear-gradient(180deg, #87ceeb, #3f7f3f); }

/* ============ windows help ============ */
.help-topic { font-family: var(--font-doc); font-size: 13px; line-height: 17px; }
.help-topic h3 { margin: 0 0 10px; font-size: 16px; }
.help-row { padding: 3px 4px; }
.help-row.selected { background: var(--sel); color: #fff; }
.help-row.selected .link { color: #fff; }

/* ============ msdos window ============ */
.dos-con-win {
  position: absolute; inset: 0;
  background: #000; color: #c0c0c0;
  font-family: var(--font-mono); font-size: 13px; line-height: 16px;
  padding: 4px 6px; overflow: auto; outline: none;
}
.dos-line { white-space: pre-wrap; }

/* ============ taskbar autohide ============ */
#taskbar.autohide { transform: translateY(27px); transition: transform .15s ease-out; }
#taskbar.autohide:hover { transform: translateY(0); }

/* ============ screensaver canvas ============ */
#screensaver { position: absolute; inset: 0; z-index: 60000; background: #000; }

