/* ---------- Base ---------- */
[hidden] { display: none !important; }

/* ---------- UI scale ----------
   xp.css ships 11px chrome, which reads tiny on modern displays. These
   overrides bump the whole UI ~20% so 100% browser zoom looks right. */
.window, .title-bar, button, input, label, option, select, table, textarea,
ul.tree-view, .title-bar-text {
  font-size: 13px;
}
.window-body { font-size: 13px; }
button, input[type=reset], input[type=submit] { min-height: 27px; }
input[type=email], input[type=password], input[type=text], select { height: 25px; }
legend, fieldset { font-size: 13px; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Tahoma, "Trebuchet MS", Arial, sans-serif;
  cursor: default;
  user-select: none;
}

body {
  background: #008080;
}

/* ---------- Wallpapers (apply to body and the picker preview) ---------- */
body.wp-bliss,     .wp-preview.wp-bliss     { background: url('../assets/wallpapers/bliss.jpg') center/cover no-repeat #5a94d6; }
body.wp-clouds,    .wp-preview.wp-clouds    { background: url('../assets/wallpapers/clouds.jpg') center/cover no-repeat #4a7fbf; }
body.wp-nebula,    .wp-preview.wp-nebula    { background: url('../assets/wallpapers/nebula.jpg') center/cover no-repeat #1a0a33; }
body.wp-vaporwave, .wp-preview.wp-vaporwave { background: url('../assets/wallpapers/vaporwave.jpg') center/cover no-repeat #2b0d5e; }
body.wp-coral,     .wp-preview.wp-coral     { background: url('../assets/wallpapers/coral.jpg') center/cover no-repeat #06427a; }
body.wp-matrix,    .wp-preview.wp-matrix    { background: url('../assets/wallpapers/matrix.jpg') center/cover no-repeat #000000; }
body.wp-teal,      .wp-preview.wp-teal      { background: #008080; }
body.wp-black,     .wp-preview.wp-black     { background: #000000; }

img { image-rendering: pixelated; }
a { color: #0000cc; }

/* ---------- Boot splash ---------- */
#boot-screen {
  position: fixed; inset: 0;
  background: #000000;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-logo { text-align: center; }
.boot-flag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  transform: perspective(200px) rotateY(-15deg);
}
.boot-flag .pane { display: block; }
.boot-flag .red    { background: #ff0000; }
.boot-flag .green  { background: #00a800; }
.boot-flag .blue   { background: #0000ff; }
.boot-flag .yellow { background: #ffcc00; }

.boot-title {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 1px;
}
.boot-title span {
  font-weight: 700;
  margin-left: 4px;
  color: #ff8c00;
  font-size: 30px;
  vertical-align: super;
  font-style: italic;
}
.boot-loader {
  width: 180px;
  height: 14px;
  margin: 28px auto 0;
  border: 2px solid #7a7a7a;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.boot-loader-blocks {
  display: flex;
  gap: 3px;
  position: absolute;
  top: 2px;
  left: -60px;
  animation: boot-scroll 1.6s linear infinite;
}
.boot-loader-blocks span {
  width: 14px;
  height: 8px;
  background: linear-gradient(to bottom, #5aa0ff, #1c53c9);
  border-radius: 2px;
}
@keyframes boot-scroll {
  0% { left: -60px; }
  100% { left: 180px; }
}
.boot-tag {
  color: #a0a0a0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  margin-top: 6px;
  letter-spacing: 2px;
}
.boot-footer {
  position: absolute;
  bottom: 40px;
  color: #808080;
  font-family: Arial, sans-serif;
  font-size: 12px;
}

/* ---------- Desktop ---------- */
#desktop {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

#desktop-icons {
  position: absolute;
  inset: 0;
  bottom: 40px;
  z-index: 1;
}

.desktop-icon {
  all: unset;
  position: absolute;
  box-sizing: border-box;
  width: 100px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 2px;
  text-align: center;
  color: #ffffff;
  cursor: default;
  border: 1px dotted transparent;
  gap: 4px;
  touch-action: none;
}
.desktop-icon.dragging {
  opacity: 0.7;
  z-index: 10;
}
.desktop-icon img {
  width: 40px;
  height: 40px;
}
.desktop-icon span {
  font-size: 13px;
  line-height: 1.15;
  padding: 1px 3px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
  word-break: break-word;
}
.desktop-icon.selected {
  border-color: #ffff00;
}
.desktop-icon.selected span {
  background: #000080;
  color: #ffffff;
  text-shadow: none;
}
.desktop-icon:focus-visible { outline: 1px dotted #ffff00; }

/* ---------- Windows layer ---------- */
#windows-layer {
  position: absolute;
  inset: 0;
  bottom: 40px;
  pointer-events: none;
  z-index: 100;
}
#windows-layer .window {
  position: absolute;
  pointer-events: auto;
  min-width: 220px;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 50px);
  display: flex;
  flex-direction: column;
}
#windows-layer .window.dragging { user-select: none; }
#windows-layer .window .title-bar { cursor: move; }
#windows-layer .window .window-body {
  overflow-y: auto;
  flex: 1;
}
.window .title-icon {
  width: 14px; height: 14px;
  vertical-align: middle;
  margin-right: 4px;
  image-rendering: pixelated;
}

/* Maximized state */
.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 40px) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - 40px) !important;
}
.window.maximized .title-bar { cursor: default; }

/* Minimized (hidden but keeps taskbar entry) */
#windows-layer .window.minimized { display: none; }

/* ---------- Custom bits inside windows ---------- */
.about-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.about-avatar {
  width: 58px; height: 58px;
  image-rendering: pixelated;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  padding: 2px;
  background: #c0c0c0;
}
.about-name { margin: 0; font-size: 19px; }
.about-title { color: #000080; font-weight: bold; }
.about-meta { color: #444; font-size: 13px; }

fieldset .field-row { margin: 3px 0; }
fieldset .field-row span:first-child {
  display: inline-block;
  min-width: 62px;
  font-weight: bold;
}

.stack {
  font-style: italic;
  color: #333;
  margin: 2px 0 5px 16px;
  font-size: 13px;
}
ul.tree-view details ul { padding-left: 16px; margin-top: 4px; }
ul.tree-view details ul li { margin-bottom: 3px; line-height: 1.35; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-block;
  background: #c0c0c0;
  padding: 4px 10px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  font-size: 13px;
}

.notepad-area {
  width: 100%;
  height: 400px;
  border: none;
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
  resize: none;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 14px;
  color: #000000;
  outline: none;
}
.menu-bar {
  padding: 3px 6px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  font-size: 13px;
  display: flex;
  gap: 12px;
}
.menu-bar span { cursor: default; padding: 1px 4px; }
.menu-bar span:hover { background: #316ac5; color: #fff; }

/* Dropdown menus inside app menu-bars */
.menu-item { position: relative; }
.menu-item.open { background: #316ac5; color: #fff; }
.menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  background: #ffffff;
  border: 1px solid #999;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 500;
  color: #000;
  padding: 2px;
}
.menu-item.open .menu-dropdown { display: block; }
.menu-entry {
  padding: 5px 22px 5px 24px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  white-space: nowrap;
}
.menu-entry:hover { background: #316ac5; color: #fff; }
.menu-entry.disabled { color: #999; }
.menu-entry.disabled:hover { background: none; color: #999; }
.menu-key { color: #666; }
.menu-entry:hover .menu-key { color: #dce6f5; }
.menu-sep { height: 1px; background: #d0d0d0; margin: 3px 2px; }

/* Recycle bin list */
#recycle-list { display: flex; flex-direction: column; gap: 2px; }
.recycle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
}
.recycle-item img { width: 26px; height: 26px; }
.recycle-item span { flex: 1; font-size: 13px; }
.recycle-item button { min-width: 60px; min-height: 20px; font-size: 10px; }

/* ---------- Taskbar (XP Luna) ---------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom,
    #2f71e0 0%, #3a81f0 4%, #245edb 8%, #1e50c8 40%, #1941a5 88%, #16337a 100%);
  display: flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
  z-index: 200;
  font-family: Tahoma, "Trebuchet MS", Arial, sans-serif;
}

#start-button {
  height: 40px;
  min-width: 112px;
  padding: 0 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-style: italic;
  font-size: 19px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  background: linear-gradient(to bottom,
    #6cbc4a 0%, #4aa32c 45%, #379020 50%, #2e831a 90%, #256d13 100%);
  border: none;
  border-radius: 0 10px 10px 0;
  box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4),
              2px 0 4px rgba(0,0,0,0.3);
  cursor: default;
  font-family: Tahoma, "Trebuchet MS", Arial, sans-serif;
}
#start-button img { width: 24px; height: 24px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.4)); }
#start-button.pressed,
#start-button:active {
  background: linear-gradient(to bottom,
    #256d13 0%, #2e831a 50%, #379020 100%);
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.4);
}

#taskbar-buttons {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  align-items: center;
  padding: 3px 4px;
}
.taskbar-btn {
  height: 30px;
  min-width: 165px;
  max-width: 225px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(to bottom, #4a86e8 0%, #3a76dc 50%, #2f66c8 100%);
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 3px;
  box-shadow: inset 0 1px rgba(255,255,255,0.3);
  color: #ffffff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  cursor: default;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.taskbar-btn img { width: 18px; height: 18px; flex-shrink: 0; }
.taskbar-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.taskbar-btn.active {
  background: linear-gradient(to bottom, #1c50b8 0%, #17429c 60%, #123684 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

#system-tray {
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(to bottom,
    #1290e9 0%, #19a2f8 4%, #0f7ddc 8%, #0a6ccc 40%, #085bb0 88%, #064a90 100%);
  box-shadow: inset 2px 0 4px rgba(0,0,0,0.3);
  font-size: 13px;
  min-width: 84px;
  justify-content: flex-end;
  color: #ffffff;
  font-family: Tahoma, Arial, sans-serif;
}
.tray-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  cursor: default;
  padding: 1px;
}
.tray-icon img { width: 19px; height: 19px; image-rendering: pixelated; }
.tray-icon:hover { background: rgba(255,255,255,0.15); }
#tray-modem.disconnected img { filter: grayscale(1) brightness(0.7); opacity: 0.7; }
#tray-modem.disconnected::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: #e74c3c;
  transform: rotate(-45deg);
  pointer-events: none;
}
#tray-modem { position: relative; }
#clock { cursor: default; padding: 0 4px; color: #ffffff; }
#clock:hover { background: rgba(255,255,255,0.15); }

/* ---------- Calendar popup ---------- */
#calendar-popup {
  position: fixed;
  bottom: 40px;
  right: 6px;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  padding: 4px;
  z-index: 250;
  min-width: 265px;
}
.calendar-header {
  background: linear-gradient(90deg, navy, #1084d0);
  color: white;
  padding: 3px 6px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.calendar-nav { cursor: pointer; padding: 0 6px; }
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 3px;
  background: white;
  padding: 4px;
}
.calendar-table th, .calendar-table td {
  padding: 3px 5px;
  text-align: center;
  min-width: 18px;
}
.calendar-table th { color: #000080; font-weight: bold; }
.calendar-table td.today {
  background: #000080;
  color: white;
  font-weight: bold;
}
.calendar-table td.dim { color: #808080; }

/* ---------- Context menu (right-click desktop) ---------- */
#context-menu {
  position: fixed;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  padding: 2px;
  z-index: 400;
  min-width: 180px;
}
#context-menu ul { list-style: none; margin: 0; padding: 0; }
#context-menu li {
  padding: 5px 24px 5px 28px;
  font-size: 13px;
  cursor: default;
}
#context-menu li:hover:not(.separator):not(.disabled) { background: #316ac5; color: white; }
#context-menu li.bold { font-weight: bold; }
#context-menu li.disabled { color: #999; }
#context-menu li.separator {
  height: 1px;
  padding: 0;
  margin: 3px 0;
  background: #d0d0d0;
}

/* ---------- Display Properties (wallpaper picker) ---------- */
.wp-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wp-list {
  height: 200px;
  overflow-y: auto;
  background: white;
  padding: 4px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.wp-list-item {
  padding: 3px 6px;
  font-size: 11px;
  cursor: default;
}
.wp-list-item:hover { background: #ddd; }
.wp-list-item.selected { background: navy; color: white; }
.wp-monitor {
  background: #c0c0c0;
  padding: 12px 12px 30px 12px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  position: relative;
  height: 140px;
}
.wp-monitor::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 6px;
  background: #808080;
  border-radius: 0 0 4px 4px;
}
.wp-preview {
  width: 100%;
  height: 100%;
  border: 2px solid #000;
}

/* ---------- Dial-up (Connect ISP Connection dialog) ---------- */
.dialup-window .window-body.dialup-body { padding: 0; }
.dialup-banner {
  height: 110px;
  background: #6a86e0 url("../assets/dialup-banner.png") center/cover no-repeat;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #0a3b7d;
}
.dialup-banner-art { display: none; }

.dialup-form { padding: 10px 12px 8px; background: #ece9d8; }
.dialup-field {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.dialup-field label { text-align: right; font-size: 11px; }
.dialup-field input[type="text"],
.dialup-field input[type="password"],
.dialup-field select { width: 100%; font-size: 11px; }
.dialup-field input::placeholder { color: #888; font-style: italic; }

.dialup-save-box {
  margin: 8px 0 6px;
  padding: 6px 8px 4px;
}
.dialup-check-row,
.dialup-radio-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 3px;
}
.dialup-radio-row { margin-left: 20px; }
.dialup-check-row input,
.dialup-radio-row input { margin: 0; }

.dialup-dial-row select {
  background: #fff;
}

.dialup-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.dialup-buttons button { min-width: 70px; font-size: 11px; }
.dialup-buttons button.default {
  font-weight: bold;
  box-shadow: inset 0 0 0 1px #000;
}

.dialup-log {
  background: #000;
  color: #00ff00;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 10px;
  height: 70px;
  padding: 4px 6px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 6px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.progress-container {
  height: 16px;
  background: #ffffff;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  padding: 2px;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: navy;
  background-image: linear-gradient(
    to right, transparent 0 4px, #000 4px 8px);
  background-size: 8px 100%;
  transition: width 0.15s linear;
}

/* ---------- Minesweeper ---------- */
.mines-window .window-body { padding: 4px 6px 6px; background: #c0c0c0; }
.mines-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 4px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.mines-lcd {
  background: #000;
  color: #ff0000;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 22px;
  font-weight: bold;
  padding: 1px 4px;
  min-width: 40px;
  text-align: right;
  border: 1px inset #808080;
  letter-spacing: 1px;
}
.mines-face {
  width: 31px;
  height: 31px;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff,
              inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  border: none;
  font-size: 21px;
  line-height: 1;
  cursor: default;
  padding: 0;
}
.mines-face:active {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a,
              inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.mines-grid {
  display: grid;
  gap: 0;
  padding: 4px;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #808080,
              inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  width: fit-content;
}
.mines-cell {
  width: 22px;
  height: 22px;
  background: silver;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #ffffff,
              inset -2px -2px #c0c0c0, inset 2px 2px #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 15px;
  font-weight: bold;
  cursor: default;
  user-select: none;
}
.mines-cell.revealed {
  box-shadow: none;
  border: 1px solid #808080;
  background: #c0c0c0;
}
.mines-cell.mine { background: #ff0000; }
.mines-cell.n1 { color: #0000ff; }
.mines-cell.n2 { color: #008000; }
.mines-cell.n3 { color: #ff0000; }
.mines-cell.n4 { color: #000080; }
.mines-cell.n5 { color: #800000; }
.mines-cell.n6 { color: #008080; }
.mines-cell.n7 { color: #000000; }
.mines-cell.n8 { color: #808080; }

/* ---------- Winamp (classic 2.x skin) ---------- */
.winamp-window {
  width: 320px;
  min-width: 320px !important;
  background: #24242e;
  border: 1px solid #000;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  font-family: Arial, sans-serif;
}
/* Custom gold/gray Winamp titlebars replace the XP chrome */
.wa-titlebar, .wa-subtitle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(to bottom, #6a6a7a 0%, #3a3a4a 50%, #24242e 100%);
  padding: 3px 6px;
  height: 24px;
  box-sizing: border-box;
  cursor: move;
  border-radius: 0;
}
.wa-title, .wa-subtitle {
  color: #d8c88a;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  flex: 0 0 auto;
  margin: 0;
  text-shadow: 1px 1px 0 #000;
}
.wa-subtitle { justify-content: center; }
.wa-ridge {
  flex: 1;
  height: 5px;
  background: repeating-linear-gradient(to bottom,
    #6a6a7a 0, #6a6a7a 1px, #2a2a34 1px, #2a2a34 2px);
}
.wa-controls { display: flex; gap: 3px; }
.wa-controls button {
  width: 18px; height: 18px;
  min-width: 18px; min-height: 18px;
  padding: 0;
  background: #3a3a4a;
  border: 1px solid #6a6a7a;
  border-radius: 0;
  box-shadow: none;
  background-image: none;
  font-size: 11px;
  line-height: 1;
  color: #d8c88a;
}
.wa-controls button:hover { background: #5a5a6e; }
.wa-controls button[aria-label="Minimize"]::after { content: "_"; }
.wa-controls button[aria-label="Close"]::after { content: "×"; }

.wa-main { padding: 6px 8px; background: linear-gradient(135deg, #2c2c3a, #1e1e28); }
.wa-lcd-row { display: flex; gap: 8px; align-items: stretch; }
.wa-time-box {
  background: #000;
  border: 1px solid #3a3a4a;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wa-playstate { color: #00ff00; font-size: 10px; }
.wa-time {
  color: #00ff00;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 0 5px rgba(0,255,0,0.7);
}
.wa-viz {
  flex: 1;
  background: #000;
  border: 1px solid #3a3a4a;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 2px 4px;
}
.wa-viz span {
  flex: 1;
  height: 2px;
  background: linear-gradient(to top, #00ff00 0%, #ffff00 60%, #ff0000 100%);
}
.wa-marquee {
  margin-top: 4px;
  background: #000;
  border: 1px solid #3a3a4a;
  overflow: hidden;
  height: 15px;
  position: relative;
}
.wa-marquee-inner {
  color: #00ff00;
  font-size: 10px;
  line-height: 15px;
  white-space: nowrap;
  position: absolute;
  animation: wa-scroll 14s linear infinite;
  font-family: Arial, sans-serif;
  letter-spacing: 1px;
}
@keyframes wa-scroll {
  0% { left: 100%; }
  100% { left: -100%; }
}
.wa-info-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
}
.wa-chip {
  background: #000;
  border: 1px solid #3a3a4a;
  color: #00ff00;
  font-size: 9px;
  padding: 1px 5px;
  font-weight: bold;
}
.wa-flag {
  color: #4a4a5a;
  font-size: 9px;
  font-weight: bold;
  margin-left: auto;
}
.wa-flag + .wa-flag { margin-left: 4px; }
.wa-flag.lit { color: #00ff00; text-shadow: 0 0 4px rgba(0,255,0,0.6); }

.wa-slider-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}
.wa-volume { flex: 2; }
.wa-balance { flex: 1; }
.wa-toggle {
  min-width: 26px;
  min-height: 16px;
  padding: 0 5px;
  background: #2c2c3a;
  border: 1px outset #5a5a6e;
  color: #b0b0c0;
  font-size: 9px;
  font-weight: bold;
  border-radius: 0;
  box-shadow: none;
  background-image: none;
}
.wa-toggle.lit { color: #00ff00; border-style: inset; background: #1a1a24; }
.wa-seek { width: 100%; margin-top: 6px; }

.wa-transport {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  align-items: center;
}
.wa-transport button {
  flex: 0 0 auto;
  min-width: 22px;
  width: 22px;
  min-height: 18px;
  padding: 0;
  background: linear-gradient(to bottom, #4a4a5a, #2c2c3a);
  border: 1px outset #5a5a6e;
  color: #d0d0e0;
  font-size: 9px;
  border-radius: 0;
  box-shadow: none;
  background-image: none;
}
.wa-transport button:active { border-style: inset; }
.wa-transport .wa-mode {
  min-width: 0;
  width: auto;
  flex: 1 1 auto;
  padding: 0 2px;
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0;
  color: #8a8a9a;
}
.wa-transport .wa-mode.lit { color: #00ff00; border-style: inset; background: #1a1a24; }

/* Sections (EQ + Playlist) */
.wa-section { background: #24242e; border-top: 1px solid #000; }
.wa-eq-top { display: flex; gap: 4px; padding: 4px 8px; }
.wa-eq-sliders {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px 6px;
  gap: 2px;
}
.wa-eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
/* Vertical faders: a rotated standard horizontal slider renders far more
   consistently across browsers than appearance:slider-vertical. */
.wa-eq-band { position: relative; }
.wa-eq-slot {
  position: relative;
  width: 14px;
  height: 58px;
  background: linear-gradient(to top, #1a5a1a 0%, #2a7a2a 45%, #7a7a2a 72%, #7a2a2a 100%);
  border: 1px solid #000;
  overflow: hidden;
}
.wa-eq-slot::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255,255,255,0.35);
}
.wa-eq-slider {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 58px;
  height: 14px;
  left: 50%;
  top: 50%;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: default;
}
.wa-eq-slider::-webkit-slider-runnable-track {
  height: 14px;
  background: transparent;
  border: none;
}
.wa-eq-slider::-moz-range-track {
  height: 14px;
  background: transparent;
  border: none;
}
.wa-eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 7px;
  height: 14px;
  background: linear-gradient(to right, #e8e8f0, #9a9aaa);
  border: 1px solid #000;
  border-radius: 0;
}
.wa-eq-slider::-moz-range-thumb {
  width: 7px;
  height: 14px;
  background: linear-gradient(to right, #e8e8f0, #9a9aaa);
  border: 1px solid #000;
  border-radius: 0;
}
.wa-eq-band label {
  color: #8a8a9a;
  font-size: 8px;
  font-weight: bold;
}

.wa-playlist {
  background: #000;
  min-height: 100px;
  max-height: 140px;
  overflow-y: auto;
  padding: 3px 4px;
  border: 1px solid #3a3a4a;
  margin: 4px 8px;
}
.winamp-playlist-item {
  color: #00cc00;
  font-size: 13px;
  font-family: Arial, sans-serif;
  padding: 1px 4px;
  cursor: default;
  display: flex;
  justify-content: space-between;
}
.winamp-playlist-item.playing { color: #ffffff; font-weight: bold; }
.winamp-playlist-item:hover:not(.playing) { background: #002200; }
.wa-pl-bottom {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 3px 8px 6px;
}
.wa-pl-btn {
  min-width: 30px;
  min-height: 16px;
  padding: 0 4px;
  background: linear-gradient(to bottom, #4a4a5a, #2c2c3a);
  border: 1px outset #5a5a6e;
  color: #b0b0c0;
  font-size: 8px;
  font-weight: bold;
  border-radius: 0;
  box-shadow: none;
  background-image: none;
}
.wa-pl-time {
  margin-left: auto;
  color: #00ff00;
  font-size: 9px;
  font-family: "Lucida Console", monospace;
}

/* ---------- Start menu (XP two-column) ---------- */
#start-menu {
  position: fixed;
  left: 0;
  bottom: 40px;
  width: 450px;
  background: #ffffff;
  border: 1px solid #0f3a8a;
  border-radius: 6px 6px 0 0;
  box-shadow: 2px -2px 8px rgba(0,0,0,0.35);
  z-index: 300;
  display: flex;
  flex-direction: column;
  overflow: visible;
  font-family: Tahoma, "Trebuchet MS", Arial, sans-serif;
}
#start-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(to bottom, #3a81f0 0%, #245edb 50%, #1e50c8 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
  border-radius: 5px 5px 0 0;
}
#start-menu-header img {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 2px solid #9cbdf0;
  border-radius: 4px;
  padding: 1px;
}
#start-menu-columns {
  display: flex;
  min-height: 310px;
}
#start-menu-columns ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.start-col-left {
  flex: 1.2;
  background: #ffffff;
}
.start-col-right {
  flex: 1;
  background: #d3e5fa;
  border-left: 1px solid #a6c8f0;
}
#start-menu-columns li {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  gap: 10px;
  font-size: 13px;
  cursor: default;
  position: relative;
  color: #0a246a;
}
.start-col-left li { color: #000000; }
#start-menu-columns li img { width: 26px; height: 26px; }
#start-menu-columns li:hover:not(.separator) {
  background: #316ac5;
  color: #ffffff;
}
#start-menu-columns li.separator {
  height: 1px;
  padding: 0;
  margin: 4px 8px;
  background: #a6c8f0;
}
.submenu-arrow {
  margin-left: auto;
  font-size: 10px;
}
/* Games flyout submenu */
.start-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -4px;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #0f3a8a;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  padding: 3px 0 !important;
  z-index: 350;
}
li.has-submenu:hover > .start-submenu,
.start-submenu:hover {
  display: block;
}
.start-submenu li { color: #000000 !important; }
.start-submenu li:hover { background: #316ac5 !important; color: #ffffff !important; }
#start-menu-footer {
  padding: 10px 14px;
  background: linear-gradient(to bottom, #3a81f0 0%, #245edb 50%, #1e50c8 100%);
  color: #ffffff;
  text-align: right;
  font-size: 13px;
  border-radius: 0;
}
#start-menu-footer span[data-action] {
  cursor: default;
  padding: 4px 8px;
  border-radius: 3px;
}
#start-menu-footer span[data-action]:hover { background: rgba(255,255,255,0.2); }
.shutdown-dot { color: #ff6a4a; font-weight: bold; }

/* ---------- Shutdown overlay ---------- */
#shutdown-screen {
  position: fixed; inset: 0;
  background: #000000;
  color: #ffb340;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 22px;
  text-align: center;
  line-height: 1.6;
}
.shutdown-hint {
  margin-top: 30px;
  font-size: 12px;
  color: #666;
}

/* ---------- Mobile fallback ---------- */

/* ---------- Window open animation ---------- */
.win-opening {
  animation: win-pop 0.18s ease-out;
}
@keyframes win-pop {
  0% { transform: scale(0.92); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Quick launch ---------- */
#quick-launch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 8px;
  border-right: 1px solid rgba(0,0,0,0.3);
  box-shadow: 1px 0 rgba(255,255,255,0.15);
}
.ql-btn {
  width: 29px;
  height: 29px;
  min-width: 29px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  box-shadow: none;
}
.ql-btn img { width: 19px; height: 19px; }
.ql-btn:hover { background: rgba(255,255,255,0.2); }

/* ---------- Balloon tip ---------- */
#balloon-tip {
  position: fixed;
  right: 12px;
  bottom: 44px;
  width: 300px;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 8px 10px;
  z-index: 500;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  font-family: Tahoma, Arial, sans-serif;
}
#balloon-tip::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 30px;
  border-left: 10px solid transparent;
  border-top: 10px solid #ffffe1;
}
#balloon-close {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  min-width: 16px; min-height: 16px;
  padding: 0;
  font-size: 9px;
  line-height: 1;
  background: #ffffe1;
  border: 1px solid #888;
  border-radius: 2px;
  box-shadow: none;
}
.balloon-title { font-weight: bold; font-size: 13px; margin-bottom: 4px; padding-right: 16px; }
.balloon-body { font-size: 13px; line-height: 1.4; }

/* ---------- Screensaver ---------- */
#screensaver {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9000;
  cursor: none;
}
#screensaver-logo {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  will-change: transform;
}
.ss-flag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 40px;
  height: 40px;
}
.ss-flag .pane { display: block; }
.ss-flag .red { background: #ff0000; }
.ss-flag .green { background: #00a800; }
.ss-flag .blue { background: #0000ff; }
.ss-flag .yellow { background: #ffcc00; }
.ss-text {
  color: #fff;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 32px;
  font-weight: 300;
}
.ss-text span {
  color: #ff8c00;
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  vertical-align: super;
}

/* ---------- Notepad saved flash ---------- */
.notepad-saved-flash {
  margin-left: auto;
  color: #008000;
  font-weight: bold;
  font-size: 10px;
}

/* ---------- Outlook Express ---------- */
.oe-toolbar {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 6px;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #aac;
}
.oe-tool {
  min-height: 28px;
  padding: 3px 12px;
  font-size: 13px;
}
.oe-tool-spacer { flex: 1; }
.oe-account { font-size: 12px; color: #667; }
.oe-layout {
  display: flex;
  height: 400px;
}
.oe-folders {
  width: 180px;
  background: #f4f7fc;
  border-right: 1px solid #aac;
  padding: 6px 4px;
  overflow-y: auto;
  flex-shrink: 0;
}
.oe-folder-title {
  font-weight: bold;
  font-size: 13px;
  padding: 2px 6px;
  border-bottom: 1px solid #ccd;
  margin-bottom: 4px;
}
.oe-folder {
  padding: 4px 8px;
  font-size: 13px;
  cursor: default;
  border-radius: 2px;
  white-space: nowrap;
}
.oe-folder:hover { background: #dce8f7; }
.oe-folder.selected { background: #316ac5; color: #fff; }
.oe-folder-sep { height: 1px; background: #ccd; margin: 6px 2px; }
.oe-contact-card {
  font-size: 12px;
  padding: 6px;
  line-height: 1.6;
  background: #fff;
  border: 1px solid #ccd;
  border-radius: 3px;
  margin-top: 4px;
  white-space: normal;
}
.oe-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.oe-msglist {
  height: 175px;
  overflow-y: auto;
  background: #fff;
  border-bottom: 2px solid #aac;
}
.oe-msglist-header {
  display: flex;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #aac;
  font-size: 12px;
  font-weight: bold;
  position: sticky;
  top: 0;
}
.oe-msglist-header span { padding: 3px 6px; border-right: 1px solid #ccd; }
.oe-col-from { width: 132px; flex-shrink: 0; }
.oe-col-subject { flex: 1; }
.oe-col-date { width: 84px; flex-shrink: 0; }
.oe-msg {
  display: flex;
  font-size: 13px;
  cursor: default;
  border-bottom: 1px solid #f0f0f5;
}
.oe-msg span {
  padding: 3px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.oe-msg.unread { font-weight: bold; }
.oe-msg:hover { background: #eef4fc; }
.oe-msg.selected { background: #316ac5; color: #fff; }
.oe-preview {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}
.oe-preview-placeholder { color: #889; text-align: center; margin-top: 40px; }
.oe-preview-head {
  border-bottom: 1px solid #ccd;
  padding-bottom: 6px;
  margin-bottom: 8px;
  color: #333;
}
.oe-preview-head b { font-size: 12px; }
.oe-preview-body { white-space: pre-wrap; font-family: Arial, sans-serif; }
.oe-compose .field-row-stacked { width: 100%; margin-top: 6px; }

/* ---------- Internet Explorer ---------- */
.ie-window .window-body { padding: 0; }
.ie-toolbar {
  display: flex;
  gap: 3px;
  padding: 4px 6px;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #b8c8dd;
}
.ie-tool {
  min-height: 26px;
  min-width: 32px;
  padding: 2px 9px;
  font-size: 12px;
}
.ie-tool:disabled { color: #999; }
.ie-addressbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #b8c8dd;
}
.ie-addressbar label { font-size: 12px; color: #445; }
.ie-addressbar input {
  flex: 1;
  font-size: 13px;
  font-family: Tahoma, Arial, sans-serif;
}
.ie-content {
  flex: 1 1 auto;
  min-height: 380px;
  overflow-y: auto;
  background: #ffffff;
  padding: 14px 16px;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.5;
  user-select: text;
}
.ie-window.maximized .ie-content { min-height: 0; }
.ie-statusbar { flex: 0 0 auto; }
.ie-statusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 8px;
  background: #ece9d8;
  border-top: 1px solid #b8c8dd;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #333;
}
.ie-statusbar > span:first-child { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ie-progress-track {
  width: 130px;
  height: 12px;
  background: #ffffff;
  border: 1px solid #9aa;
  padding: 1px;
  box-sizing: border-box;
  visibility: hidden;
}
.ie-progress-track.loading { visibility: visible; }
.ie-progress {
  height: 100%;
  width: 0;
  background-image: repeating-linear-gradient(
    to right,
    #4caf3a 0 10px,
    transparent 10px 12px);
  transition: width 0.25s linear;
}
.ie-zone { color: #556; }
.ie-loading { color: #666; font-style: italic; padding: 20px; }

/* IE — error pages */
.ie-error h2 { font-size: 20px; margin: 0 0 10px; color: #000; }
.ie-error hr { border: none; border-top: 1px solid #ccc; margin: 12px 0; }
.ie-error ul { margin: 8px 0 8px 22px; }
.ie-error li { margin-bottom: 5px; }
.ie-error-url { font-family: monospace; color: #666; word-break: break-all; }
.ie-error-code { color: #666; font-size: 13px; }

/* IE — MSN portal */
.ie-portal-head {
  border-bottom: 3px solid #1e5fbe;
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.ie-portal-logo {
  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: bold;
  color: #1e5fbe;
  font-style: italic;
}
.ie-portal-tag { color: #777; font-style: italic; margin-left: 10px; }
.ie-portal-cols { display: flex; gap: 24px; }
.ie-portal-col { flex: 1; }
.ie-portal-col h4 {
  margin: 0 0 6px;
  background: #1e5fbe;
  color: #fff;
  padding: 3px 8px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}
.ie-portal-col ul { margin: 0 0 0 20px; padding: 0; }
.ie-portal-col li { margin-bottom: 6px; }
.ie-marquee {
  display: block;
  margin-top: 16px;
  background: #000080;
  color: #ffff00;
  padding: 4px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

/* IE — GitHub stand-in */
.ie-gh { font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.ie-gh-top {
  background: #24292e;
  color: #fff;
  padding: 8px 12px;
  margin: -14px -16px 14px;
  font-size: 15px;
  font-weight: bold;
}
.ie-gh-mark { color: #fff; margin-right: 6px; }
.ie-gh-nav { font-weight: normal; font-size: 12px; margin-left: 14px; color: #c8ccd0; }
.ie-gh-body { display: flex; gap: 20px; }
.ie-gh-side { width: 190px; flex-shrink: 0; }
.ie-gh-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a86e8, #1e5fbe);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: bold;
  margin-bottom: 10px;
}
.ie-gh-side h3 { margin: 0; font-size: 18px; }
.ie-gh-handle { color: #666; font-size: 15px; margin-bottom: 8px; }
.ie-gh-bio { margin: 8px 0; line-height: 1.4; }
.ie-gh-meta { color: #555; font-size: 12px; margin: 3px 0; }
.ie-gh-btn {
  display: inline-block;
  margin-top: 10px;
  background: #2ea44f;
  color: #fff !important;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
}
.ie-gh-main { flex: 1; }
.ie-gh-tabs { border-bottom: 2px solid #e1e4e8; padding-bottom: 6px; margin-bottom: 12px; color: #555; }
.ie-gh-repo { border-bottom: 1px solid #e1e4e8; padding: 10px 0; }
.ie-gh-repo a { font-size: 16px; color: #0366d6; text-decoration: none; }
.ie-gh-repo p { margin: 4px 0; color: #586069; }
.ie-gh-lang { color: #586069; font-size: 12px; margin-right: 12px; }
.ie-gh-repo span { font-size: 12px; color: #586069; }
.ie-gh-note {
  margin-top: 14px; padding: 8px 10px;
  background: #fff8c5; border: 1px solid #e6d97a;
  font-size: 12px; color: #555;
}

/* IE — AltaVista */
.ie-av { text-align: center; font-family: Arial, sans-serif; }
.ie-av-logo { font-size: 40px; font-weight: bold; color: #003399; margin-top: 10px; }
.ie-av-logo span { color: #cc0000; }
.ie-av-sub { color: #666; font-size: 13px; margin-bottom: 16px; }
.ie-av-box { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.ie-av-box input { width: 320px; font-size: 14px; }
.ie-av-results { text-align: left; }
.ie-av-hint, .ie-av-count { color: #666; font-size: 13px; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
.ie-av-result { margin: 14px 0; }
.ie-av-result a { font-size: 15px; color: #0000cc; }
.ie-av-result p { margin: 3px 0; font-size: 13px; }
.ie-av-url { color: #008000; font-size: 12px; }

/* IE — GeoCities */
.ie-geo {
  background: #000040;
  color: #ffff00;
  margin: -14px -16px;
  padding: 16px;
  font-family: "Comic Sans MS", Verdana, sans-serif;
  text-align: center;
  min-height: 100%;
}
.ie-geo-title {
  font-size: 26px;
  color: #00ff00;
  text-shadow: 2px 2px 0 #ff00ff;
  margin: 0 0 10px;
}
.ie-geo-marquee { display: block; color: #ff6600; font-weight: bold; margin-bottom: 14px; }
.ie-geo-box {
  background: #000080;
  border: 3px ridge #00ffff;
  padding: 12px;
  margin: 0 auto 16px;
  max-width: 560px;
  color: #ffffff;
  text-align: left;
}
.ie-geo h3 { color: #ff00ff; margin: 18px 0 8px; }
.ie-geo-list {
  list-style: none;
  padding: 0;
  max-width: 520px;
  margin: 0 auto 12px;
  text-align: left;
  color: #ffffff;
}
.ie-geo-list li { margin-bottom: 6px; }
.ie-geo a { color: #00ffff; }
.ie-geo-counter {
  background: #000;
  border: 2px solid #00ff00;
  display: inline-block;
  padding: 5px 12px;
  margin: 10px 0;
  color: #00ff00;
  font-family: "Lucida Console", monospace;
}
.ie-geo-counter span { letter-spacing: 3px; font-size: 17px; }
.ie-geo-mail { color: #ffffff; }
.ie-geo-foot { color: #aaaaaa; font-size: 12px; margin-top: 16px; }

/* IE — WebRing */
.ie-ring { font-family: Verdana, Arial, sans-serif; font-size: 13px; }
.ie-ring h2 { color: #003399; }
.ie-ring-nav {
  background: #eef2f8;
  border: 1px solid #99a;
  padding: 8px;
  margin: 12px 0;
  text-align: center;
}
.ie-ring-list { line-height: 1.7; }
.ie-ring-list i { color: #666; }
.ie-ring-foot { color: #666; font-size: 12px; margin-top: 14px; }

/* IE — HampsterDance */
.ie-hamster { text-align: center; background: #ffffcc; margin: -14px -16px; padding: 20px; min-height: 100%; }
.ie-hamster h2 { color: #cc6600; }
.ie-hamster-row { font-size: 34px; letter-spacing: 8px; animation: hamster-bob 0.45s ease-in-out infinite alternate; }
.ie-hamster-row.alt { animation-delay: 0.22s; }
@keyframes hamster-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
.ie-hamster-note { color: #886600; font-size: 12px; font-style: italic; }

/* ---------- Solitaire ---------- */
.sol-window .window-body.sol-body {
  background: #0a7a34;
  padding: 12px;
  overflow: auto;
}
#sol-board { min-width: 660px; }
.sol-top { display: flex; gap: 12px; margin-bottom: 16px; }
.sol-gap { width: 62px; }
.sol-slot {
  width: 74px;
  height: 100px;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
}
.sol-stock { cursor: pointer; }
.sol-recycle {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 28px;
}
.sol-empty-pip {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 30px;
}
.sol-tableau { display: flex; gap: 12px; }
.sol-col {
  width: 74px;
  min-height: 320px;
  position: relative;
  flex-shrink: 0;
}
.sol-card {
  position: absolute;
  width: 74px;
  height: 100px;
  background: #ffffff;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
.sol-slot > .sol-card, .sol-top .sol-card { position: absolute; top: 0; left: 0; }
.sol-card.red { color: #c00000; }
.sol-card.facedown {
  background:
    repeating-linear-gradient(45deg, #2a5db0 0 6px, #1e4a94 6px 12px);
  border-color: #14356b;
}
.sol-card.selected {
  outline: 3px solid #ffd700;
  outline-offset: -3px;
  box-shadow: 0 0 10px rgba(255,215,0,0.8);
}
.sol-corner {
  position: absolute;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.05;
  text-align: center;
}
.sol-corner.tl { top: 4px; left: 5px; }
.sol-corner.br { bottom: 4px; right: 5px; transform: rotate(180deg); }
.sol-pip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

/* IE — GitHub launch banner */
.ie-gh-launched, .ie-gh-blocked {
  padding: 8px 12px;
  margin: 0 0 12px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  border-radius: 4px;
}
.ie-gh-launched { background: #e6ffed; border: 1px solid #34a853; color: #17643a; }
.ie-gh-blocked  { background: #fff4e5; border: 1px solid #e0a030; color: #7a4b00; }

/* ---------- Print stylesheet (Ctrl+P shows a clean resume) ---------- */
#print-resume { display: none; }

@media print {
  html, body { overflow: visible !important; height: auto !important; background: #fff !important; }
  body > *:not(#print-resume) { display: none !important; }
  #print-resume {
    display: block !important;
    width: 100%;
    max-width: 7.5in;
    margin: 0 auto;
    color: #111;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 10.5pt;
    line-height: 1.45;
  }
  .pr-header { border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
  .pr-header h1 { margin: 0; font-size: 22pt; letter-spacing: 0.5px; }
  .pr-title { font-size: 12pt; font-weight: bold; color: #333; margin-top: 2px; }
  .pr-contact { font-size: 9pt; color: #444; margin-top: 4px; font-family: Arial, sans-serif; }
  #print-resume section { margin-bottom: 12px; page-break-inside: avoid; }
  #print-resume h2 {
    font-size: 11.5pt;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #999;
    margin: 0 0 6px;
    padding-bottom: 2px;
    color: #222;
  }
  #print-resume p { margin: 0 0 4px; }
  .pr-role { margin-bottom: 9px; page-break-inside: avoid; }
  .pr-role-head { font-size: 10.5pt; margin-bottom: 2px; }
  .pr-role-head span { float: right; font-weight: normal; color: #555; font-size: 9.5pt; }
  #print-resume ul { margin: 2px 0 0; padding-left: 18px; }
  #print-resume li { margin-bottom: 2px; }
  @page { margin: 0.6in; }
}

/* ---------- Alt+Tab switcher ---------- */
#alttab {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #ece9d8;
  border: 2px solid #0b3d91;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  padding: 16px 18px 12px;
  z-index: 8000;
  max-width: 620px;
  text-align: center;
}
#alttab-list {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-bottom: 10px;
}
.alttab-item {
  width: 72px; height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 4px;
}
.alttab-item img { width: 32px; height: 32px; }
.alttab-item span {
  font-size: 9px; line-height: 1.1; text-align: center;
  max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alttab-item.active { border-color: #245edb; background: #cfe0ff; }
#alttab-caption { font-size: 13px; font-weight: bold; color: #14315c; }

/* ---------- MSN Messenger ---------- */
.msn-window .window-body { padding: 0; }
.msn-layout { display: flex; height: 430px; }
.msn-side {
  width: 210px; flex-shrink: 0;
  background: #eef4fc;
  border-right: 1px solid #a6c8f0;
  display: flex; flex-direction: column;
}
.msn-me {
  display: flex; align-items: center; gap: 8px;
  padding: 10px;
  background: linear-gradient(to bottom, #dff0d8, #c6e5b4);
  border-bottom: 1px solid #a6c8f0;
}
.msn-me img { width: 34px; height: 34px; border: 1px solid #7ba05b; background: #fff; }
.msn-mystatus { font-size: 11px; color: #3a6b28; }
.msn-list { flex: 1; overflow-y: auto; padding: 6px 4px; }
.msn-group {
  font-size: 11px; font-weight: bold; color: #3a5f9a;
  padding: 6px 6px 3px; border-bottom: 1px solid #cfe0f5; margin-bottom: 3px;
}
.msn-contact {
  display: grid; grid-template-columns: 12px 1fr;
  gap: 0 6px; padding: 4px 6px; font-size: 12px; cursor: default; border-radius: 3px;
}
.msn-contact:hover { background: #d6e7fb; }
.msn-dot {
  width: 9px; height: 9px; border-radius: 50%;
  grid-row: 1 / span 2; align-self: center;
}
.msn-dot.online  { background: #4cc95f; }
.msn-dot.away    { background: #f5c342; }
.msn-dot.busy    { background: #e05050; }
.msn-dot.offline { background: #b0b0b0; }
.msn-cname { font-weight: bold; color: #24406e; }
.msn-cmsg { font-size: 10px; color: #7a8699; font-style: italic; }
.msn-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.msn-header {
  padding: 6px 10px; font-size: 12px; color: #445;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #a6c8f0;
}
.msn-log {
  flex: 1; overflow-y: auto; padding: 10px 12px; background: #fff;
  font-size: 13px; line-height: 1.5; user-select: text;
}
.msn-msg { margin-bottom: 7px; }
.msn-from { font-weight: bold; margin-right: 6px; }
.msn-msg.me .msn-from   { color: #1f6feb; }
.msn-msg.them .msn-from { color: #c0392b; }
.msn-text { color: #222; }
.msn-typing {
  height: 18px; padding: 0 12px; font-size: 11px; font-style: italic;
  color: #7a8699; background: #fff;
}
.msn-compose { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #a6c8f0; }
.msn-compose input { flex: 1; font-size: 13px; }
.msn-actions {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px 8px; font-size: 11px;
}
.msn-hint { color: #7a8699; font-style: italic; margin-left: 4px; }
.msn-nudge { animation: msn-shake 0.55s cubic-bezier(.36,.07,.19,.97); }
@keyframes msn-shake {
  10%, 90% { transform: translate(-3px, 1px); }
  20%, 80% { transform: translate(5px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 2px); }
  40%, 60% { transform: translate(7px, -1px); }
}

/* ---------- File Explorer ---------- */
.exp-window .window-body { padding: 0; }
.exp-toolbar {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 8px;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border-bottom: 1px solid #b8c8dd;
}
.exp-tool { min-height: 26px; padding: 2px 10px; font-size: 12px; }
.exp-tool:disabled { color: #999; }
.exp-addr-label { font-size: 12px; color: #445; margin-left: 8px; }
.exp-addr {
  flex: 1; background: #fff; border: 1px solid #7a95b8;
  padding: 4px 8px; font-size: 12px; font-family: Tahoma, Arial, sans-serif;
}
.exp-layout { display: flex; height: 400px; }
.exp-side {
  width: 190px; flex-shrink: 0; padding: 10px 8px;
  background: linear-gradient(to bottom, #7ba7e8, #6491d8);
  color: #fff; overflow-y: auto;
}
.exp-side-title { font-weight: bold; font-size: 12px; margin-bottom: 6px; }
.exp-link {
  font-size: 12px; padding: 4px 6px; cursor: default; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exp-link:hover { background: rgba(255,255,255,0.25); text-decoration: underline; }
.exp-side-note {
  margin-top: 14px; font-size: 10px; line-height: 1.5;
  background: rgba(255,255,255,0.18); padding: 8px; border-radius: 4px;
}
.exp-grid {
  flex: 1; background: #fff; padding: 10px;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px;
  overflow-y: auto;
}
.exp-item {
  width: 104px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; font-size: 12px; cursor: default;
  border: 1px solid transparent; border-radius: 3px;
}
.exp-item img { width: 36px; height: 36px; }
.exp-item img.exp-thumb {
  width: 46px; height: 34px; object-fit: cover;
  border: 1px solid #999; image-rendering: auto;
}
.exp-item span { word-break: break-word; line-height: 1.25; }
.exp-item:hover { background: #eef4fc; }
.exp-item.selected { background: #316ac5; color: #fff; border-color: #1f4f9e; }
.exp-empty { color: #888; font-style: italic; padding: 20px; }
.exp-textview { width: 100%; }
.exp-textbar {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #ccd; padding-bottom: 6px; margin-bottom: 8px; font-size: 13px;
}
.exp-textview pre {
  background: #fff; color: #000; box-shadow: none;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12px; line-height: 1.5; padding: 8px; margin: 0;
  white-space: pre-wrap; user-select: text;
}

/* ---------- Command Prompt ---------- */
.cmd-window .window-body { padding: 0; }
.cmd-body {
  background: #000; color: #c0c0c0;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 13px; line-height: 1.35;
  padding: 8px 10px; height: 400px; overflow-y: auto;
  user-select: text; cursor: text;
}
.cmd-body div { white-space: pre-wrap; word-break: break-word; }
.cmd-green { color: #33ff66; }
.cmd-line { display: flex; align-items: center; }
.cmd-prompt { white-space: pre; }
#cmd-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #c0c0c0; font-family: inherit; font-size: inherit;
  padding: 0 0 0 4px; height: auto; box-shadow: none;
}

/* ---------- Paint ---------- */
.paint-window .window-body { padding: 0; }
.paint-layout { display: flex; background: #ece9d8; }
.paint-tools {
  width: 58px; flex-shrink: 0; padding: 6px;
  display: flex; flex-direction: column; gap: 5px; align-items: center;
  border-right: 1px solid #b8b0a0;
}
.paint-tool {
  width: 42px; height: 34px; min-width: 42px; min-height: 34px;
  font-size: 16px; padding: 0;
}
.paint-tool.active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
  background: #cfd8e8;
}
.paint-sizes { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.paint-sizes button {
  width: 42px; min-width: 42px; height: 26px; min-height: 26px;
  padding: 0; font-size: 10px; line-height: 1;
}
.paint-sizes button[data-paint-size="6"]  { font-size: 13px; }
.paint-sizes button[data-paint-size="12"] { font-size: 18px; }
.paint-sizes button.active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
  background: #cfd8e8;
}
.paint-stage {
  flex: 1; padding: 10px; background: #808080;
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto;
}
#paint-canvas {
  background: #fff;
  border: 1px solid #000;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
  max-width: 100%;
  cursor: crosshair;
  touch-action: none;
}
.paint-bottom {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; background: #ece9d8; border-top: 1px solid #b8b0a0;
}
.paint-palette { display: grid; grid-template-columns: repeat(8, 22px); gap: 3px; }
.paint-swatch {
  width: 22px; height: 22px; min-width: 22px; min-height: 22px;
  padding: 0; border: 1px solid #666; border-radius: 0; box-shadow: none;
}
.paint-swatch.active { outline: 2px solid #245edb; outline-offset: 1px; }
.paint-buttons { margin-left: auto; display: flex; gap: 6px; }

/* ---------- Task Manager ---------- */
.tm-window .window-body.tm-body { padding: 8px; }
/* xp.css's tablist styling needs more structure than this window has,
   so the tabs are styled directly. */
.tm-tabs {
  display: flex;
  gap: 3px;
  list-style: none;
  margin: 0;
  padding: 6px 8px 0;
  background: #ece9d8;
}
.tm-tabs li {
  border: 1px solid #8a99b0;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
}
.tm-tabs li a {
  display: block;
  padding: 4px 14px;
  font-size: 12px;
  color: #14315c;
  text-decoration: none;
}
.tm-tabs li[aria-selected="true"] {
  background: #fff;
  font-weight: bold;
}
.tm-tabs li a:focus { outline: 1px dotted #14315c; outline-offset: -3px; }
.tm-head, .tm-row {
  display: grid;
  grid-template-columns: 1fr 90px 46px 110px;
  gap: 4px;
  font-size: 12px;
  padding: 3px 6px;
}
.tm-head {
  background: linear-gradient(to bottom, #fdfefe, #dfe9f5);
  border: 1px solid #a6b8d0;
  font-weight: bold;
}
.tm-list {
  height: 250px; overflow-y: auto;
  background: #fff; border: 1px solid #a6b8d0; border-top: none;
}
.tm-row { cursor: default; border-bottom: 1px solid #f0f2f6; }
.tm-row:hover { background: #eef4fc; }
.tm-row.selected { background: #316ac5; color: #fff; }
.tm-row i { color: #888; font-size: 11px; font-style: italic; }
.tm-row.selected i { color: #cfe0ff; }
.tm-c-cpu, .tm-c-mem { text-align: right; font-family: "Lucida Console", monospace; font-size: 11px; }
.tm-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.tm-perf { display: flex; gap: 14px; }
.tm-perf-box { flex: 1; }
.tm-perf-label { font-size: 12px; margin-bottom: 5px; }
.tm-perf-box canvas {
  width: 100%; height: 90px;
  border: 1px solid #7a8ba0; background: #000; display: block;
}
.tm-perf-note { font-size: 11px; color: #667; margin-top: 10px; font-style: italic; }

/* ---------- Mobile (last so it overrides the rules above) ---------- */
@media (max-width: 640px) {
  .desktop-icon { width: 72px; }
  .desktop-icon img { width: 28px; height: 28px; }
  .desktop-icon span { font-size: 10px; }

  #windows-layer .window {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100vh - 40px) !important;
    max-height: calc(100vh - 40px) !important;
  }
  #windows-layer .window .title-bar { cursor: default; }
  .taskbar-btn { min-width: 100px; max-width: 140px; }
  #start-menu { width: 96vw; left: 2vw; }
  #start-menu-columns { flex-direction: column; min-height: 0; }
  .start-col-right { border-left: none; border-top: 1px solid #a6c8f0; }
  /* Flyouts have nowhere to fly on a phone — stack them inline */
  .start-submenu {
    position: static; display: block; border: none; box-shadow: none;
    background: rgba(255,255,255,0.6); margin-left: 24px;
  }
  .submenu-arrow { display: none; }

  /* Quick launch competes with taskbar buttons for space */
  #quick-launch { display: none; }

  /* Apps with side panels: drop the panel, give content the full width */
  .msn-side, .exp-side { display: none; }
  .msn-layout, .exp-layout { height: auto; flex: 1; min-height: 0; }
  .msn-log { min-height: 180px; }
  .exp-grid { min-height: 200px; }
  .oe-layout { flex-direction: column; height: auto; }
  .oe-folders { width: auto; border-right: none; border-bottom: 1px solid #aac; }
  .oe-msglist { height: 140px; }

  /* Fixed-size app bodies need to flex instead */
  .cmd-body, .notepad-area { height: 55vh; }
  .tm-list { height: 40vh; }
  .ie-content { max-height: none; min-height: 200px; }
  .paint-layout { flex-direction: column; }
  .paint-tools {
    width: auto; flex-direction: row; flex-wrap: wrap;
    border-right: none; border-bottom: 1px solid #b8b0a0;
  }
  .paint-sizes { flex-direction: row; margin-top: 0; }
  .paint-bottom { flex-wrap: wrap; }
  .paint-buttons { margin-left: 0; }

  /* Solitaire is wider than a phone; let it scroll horizontally */
  .sol-window .window-body.sol-body { overflow: auto; }

  /* Alt+Tab is keyboard-only — no point showing it on touch */
  #alttab { display: none !important; }
}

/* ---------- Project cards ---------- */
.project-list { display: flex; flex-direction: column; gap: 6px; }
.project-card {
  border: 1px solid #c0c0c0;
  background: #f6f5f0;
  padding: 8px 10px;
}
.project-card:hover { background: #eceade; }
.project-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.project-icon { width: 16px; height: 16px; }
.project-header a { color: #0366d6; text-decoration: none; font-size: 13px; }
.project-header a:hover { text-decoration: underline; }
.project-lang {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
  color: #fff;
  background: #586069;
}
.project-lang.php { background: #4F5D95; }
.project-lang.swift { background: #F05138; }
.project-lang.vb { background: #945db7; }
.project-card p { margin: 0; font-size: 12px; color: #555; }

/* ---------- IE iframe (real websites) ---------- */
/* When ie-content holds an iframe wrap, remove padding so the iframe is edge-to-edge */
#ie-content:has(.ie-iframe-wrap) {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ie-iframe-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 380px;
  background: #fff;
}
.ie-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.ie-iframe-chip {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fff8c5;
  border: 1px solid #d4c369;
  padding: 4px 8px;
  font-size: 11px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.25);
  z-index: 2;
}
.ie-iframe-chip button {
  margin-left: 4px;
  font-size: 11px;
}
.ie-blocked h2 { color: #003366; }
.ie-error-actions { margin: 14px 0; }
.ie-open-real {
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- IE offline visual cue ---------- */
.ie-error-offline-hint {
  margin-top: 14px;
  padding: 10px 12px;
  background: #fff8c5;
  border: 1px solid #e6d97a;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.ie-error-offline-hint:hover { background: #fff3a0; }
.ie-error-offline-hint img { width: 24px; height: 24px; }
.ie-error-offline-hint b { color: #333; }
