:root {
  --xp-face: #ece9d8;
  --xp-face-dk: #d4d0c8;
  --xp-white: #ffffff;
  --xp-shadow: #808080;
  --xp-dkshadow: #404040;
  --xp-light: #ffffff;
  --xp-select: #0a246a;
  --xp-text: #000000;
  --header-bg: #e6f3f8;
  --desktop: #3a6ea5;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  background: var(--desktop);
  color: var(--xp-text);
  font: 11px/1.25 Tahoma, "MS Sans Serif", "Segoe UI", sans-serif;
  user-select: none;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

.desktop {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 0;
  background:
    radial-gradient(ellipse at 50% 0%, #5b93c5 0%, var(--desktop) 55%),
    var(--desktop);
}

.desktop.workspace {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 0;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 95% 58% at 72% 112%, #2c6818 0%, #478626 36%, transparent 37%),
    radial-gradient(ellipse 120% 62% at 28% 118%, #356f1c 0%, #4f922c 34%, transparent 36%),
    linear-gradient(
      to bottom,
      #4e92cb 0%,
      #7eb6e2 32%,
      #c5e3f4 46%,
      #e4eec4 51%,
      #86b84a 62%,
      #4e8a2c 82%,
      #2f6418 100%
    );
}

.desk-icons {
  position: absolute;
  top: 14px;
  left: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 78px;
}
.desk-icons-games {
  left: auto;
  right: 14px;
  top: 14px;
}
.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border: 1px dotted transparent;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 11px/1.2 Tahoma, sans-serif;
}
.desk-icon:focus { outline: none; }
.desk-icon:focus, .desk-icon:hover {
  border-color: rgba(255,255,255,.85);
  background: rgba(10, 36, 106, .28);
}
.desk-pict {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45));
}
.desk-pict img, .desk-pict svg { display: block; image-rendering: pixelated; }
.desk-label {
  text-align: center;
  text-shadow: 1px 1px 2px #000;
  max-width: 74px;
}

.window {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--xp-face);
  border: 1px solid #0055e5;
  box-shadow:
    inset 1px 1px 0 #9db9eb,
    inset -1px -1px 0 #003c9a,
    2px 2px 8px rgba(0,0,0,.35);
}
.window.minimized { display: none; }

.app-window {
  position: absolute;
  z-index: 5;
  flex: none;
  width: min(920px, calc(100vw - 24px));
  height: min(640px, calc(100vh - 46px));
  left: 50%;
  top: calc(50% - 15px);
  transform: translate(-50%, -50%);
}
.app-window.maximized {
  left: 0 !important;
  top: 0 !important;
  right: 0;
  bottom: 30px;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  width: auto !important;
  height: auto !important;
  transform: none !important;
}

.titlebar {
  height: 30px;
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  padding: 0 4px 0 8px;
  background: linear-gradient(to bottom,
    #0058ee 0%, #3d95ff 4%, #166ae8 18%, #0054e3 48%, #0038c6 100%);
  border-bottom: 1px solid #003c9a;
  color: #fff;
}
.app-window .titlebar { cursor: move; }
.app-window .caption-buttons { cursor: default; }
.titlebar-title {
  flex: 1;
  text-align: center;
  font: bold 12px/30px Tahoma, "MS Sans Serif", sans-serif;
  letter-spacing: 0.2px;
  text-shadow: 1px 1px 1px #003;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.caption-buttons {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}
.caption-btn {
  width: 21px;
  height: 21px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(to bottom, #3c9cf5 0%, #1b6fde 55%, #0b56c4 100%);
  box-shadow: inset 1px 1px 0 #9fd2ff, inset -1px -1px 0 #0a3e9a;
  cursor: pointer;
}
.caption-btn:active { box-shadow: inset 1px 1px 2px #053; }
.caption-btn.close {
  background: linear-gradient(to bottom, #f08686 0%, #e11c1c 45%, #c50d0d 100%);
  border-color: #9a1a1a;
  box-shadow: inset 1px 1px 0 #f7b4b4, inset -1px -1px 0 #8a0c0c;
}
.caption-btn.skull img { display: block; image-rendering: pixelated; }

.min-glyph {
  width: 8px; height: 2px;
  margin-top: 6px;
  background: #fff;
}
.max-glyph {
  width: 9px;
  height: 8px;
  border: 1px solid #fff;
  border-top-width: 2px;
  background: transparent;
}
.restore-glyph {
  display: none;
  position: relative;
  width: 8px;
  height: 7px;
  border: 1px solid #fff;
  border-top-width: 2px;
  margin: 2px 0 0 1px;
}
.restore-glyph::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -5px;
  width: 8px;
  height: 7px;
  border: 1px solid #fff;
  border-top-width: 2px;
}
.window.maximized .max-glyph { display: none; }
.window.maximized .restore-glyph { display: block; }
.close-glyph {
  width: 11px; height: 11px; position: relative;
}
.close-glyph::before, .close-glyph::after {
  content: "";
  position: absolute;
  left: 5px; top: 0;
  width: 2px; height: 11px;
  background: #fff;
}
.close-glyph::before { transform: rotate(45deg); }
.close-glyph::after { transform: rotate(-45deg); }

.window-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 6px 4px;
  background: var(--xp-face);
}

.header-panel {
  flex: 0 0 auto;
  padding: 2px;
  background: var(--xp-face);
  border-top: 1px solid var(--xp-light);
  border-left: 1px solid var(--xp-light);
  border-right: 1px solid var(--xp-shadow);
  border-bottom: 1px solid var(--xp-shadow);
  box-shadow: 1px 1px 0 var(--xp-dkshadow);
  margin-bottom: 6px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 58px;
  padding: 2px 8px 2px 6px;
  background: linear-gradient(to bottom, #eef7fb 0%, #e3f2f8 55%, #d7eef6 100%);
  border: 1px solid #c5d6de;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b7c9d2;
}
.logo {
  height: 52px;
  width: auto;
  max-width: 58%;
  object-fit: contain;
  object-position: left center;
  align-self: center;
  pointer-events: none;
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 2px;
}
.header-action {
  background: transparent;
  border: 0;
  padding: 2px;
  cursor: pointer;
  border-radius: 4px;
}
.header-action:hover { background: rgba(255,255,255,.35); }
.header-action:active { transform: translate(1px, 1px); }
.header-action img {
  display: block;
  height: 44px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
}

.content {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 8px;
}
.sidebar {
  flex: 0 0 248px;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}
.search {
  height: 22px;
  padding: 2px 4px;
  font: 11px Tahoma, "MS Sans Serif", sans-serif;
  color: #000;
  outline: none;
}
.listbox {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  padding: 1px 0;
  position: relative;
  scrollbar-gutter: stable;
}
.list-sizer { width: 1px; pointer-events: none; }
.list-window { position: absolute; left: 0; right: 0; }
.game-item {
  display: block;
  width: 100%;
  height: 19px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 1px 6px 2px;
  font: 11px/16px Tahoma, "MS Sans Serif", sans-serif;
  color: #000;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-item.selected {
  background: var(--xp-select);
  color: #fff;
}
.game-item:focus, .listbox:focus { outline: none; }

.viewer-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
  scrollbar-gutter: stable;
}
.viewer {
  margin: 0;
  min-height: 100%;
  width: 100%;
  background: #fff;
  padding: 8px 10px 14px;
  font: 12px/1.45 Tahoma, "MS Sans Serif", sans-serif;
  user-select: text;
  cursor: text;
}
.viewer.loading, .viewer.empty { color: #666; white-space: pre-wrap; }

.sheet-title {
  margin: 0 0 8px;
  font: bold 13px/1.3 Tahoma, sans-serif;
}
.sheet-note {
  margin: 0 0 10px;
  color: #333;
  white-space: pre-wrap;
}
.cheat-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}
.cheat-table th,
.cheat-table td {
  text-align: left;
  vertical-align: top;
  padding: 3px 8px 3px 4px;
  border-bottom: 1px solid #e6e2d4;
}
.cheat-table th {
  color: #333;
  font: bold 11px Tahoma, sans-serif;
  border-bottom: 1px solid #b8b4a4;
  background: #f6f3e8;
}
.cheat-table col.code { width: 38%; }
.cheat-table .code-cell {
  font: 12px/1.35 "Lucida Console", Consolas, monospace;
  color: #111;
  word-break: break-word;
}
.cheat-table .effect-cell {
  color: #222;
  word-break: break-word;
}
.cheat-row { cursor: pointer; }
.cheat-row:hover { background: #e8f0ff; }
.cheat-row:active { background: #d4e2ff; }
.cheat-row.copied { background: #d7efc7; }
.sheet-hint {
  margin: 12px 0 0;
  color: #666;
  font: 10px Tahoma, sans-serif;
}
.toast {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  z-index: 20;
  background: var(--xp-face);
  border: 1px solid #0055e5;
  box-shadow: 2px 2px 8px rgba(0,0,0,.3), inset 1px 1px 0 #9db9eb;
  padding: 6px 14px;
  font: 11px Tahoma, sans-serif;
  pointer-events: none;
}
.toast.hidden { display: none; }

.sunken {
  border-top: 1px solid var(--xp-shadow);
  border-left: 1px solid var(--xp-shadow);
  border-right: 1px solid var(--xp-light);
  border-bottom: 1px solid var(--xp-light);
  box-shadow: inset 1px 1px 0 var(--xp-dkshadow);
  background: #fff;
}
.viewer-wrap.sunken { background: #fff; }

.statusbar {
  flex: 0 0 22px;
  height: 22px;
  display: flex;
  gap: 2px;
  margin-top: 4px;
  padding-top: 2px;
  border-top: 1px solid var(--xp-light);
}
.status-pane {
  border-top: 1px solid var(--xp-shadow);
  border-left: 1px solid var(--xp-shadow);
  border-right: 1px solid var(--xp-light);
  border-bottom: 1px solid var(--xp-light);
  padding: 2px 8px 0;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--xp-face);
}
#statusIndex { flex: 0 0 52px; }
.status-name { flex: 1; }
.status-count { flex: 0 0 90px; text-align: right; }

.taskbar {
  flex: 0 0 30px;
  height: 30px;
  margin: 6px -8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  background: linear-gradient(to bottom, #3f8cf3 0%, #245edb 12%, #245edb 100%);
  box-shadow: inset 0 1px 0 #7bb1f7;
  color: #fff;
  min-width: 0;
}
.workspace .taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  margin: 0;
  flex: none;
  height: calc(30px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(6px, env(safe-area-inset-left, 0px));
}
.start-btn {
  height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 12px 8px 8px 12px;
  color: #fff;
  font: bold 12px/24px Tahoma, sans-serif;
  text-shadow: 1px 1px 1px #033;
  cursor: pointer;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, #4cbf4c 0%, #2a8f2a 55%, #1d7a1d 100%);
  box-shadow: inset 1px 1px 0 #9ee89e, 1px 1px 2px rgba(0,0,0,.3);
}
.start-flag {
  width: 16px; height: 12px;
  background:
    linear-gradient(#f33 50%, #fc0 50%) 0 0 / 50% 100% no-repeat,
    linear-gradient(#3a5 50%, #39f 50%) 100% 0 / 50% 100% no-repeat;
}
.task-btn {
  height: 22px;
  min-width: 0;
  max-width: 148px;
  flex: 1 1 120px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #fff;
  border: 1px solid #1a4cb0;
  border-radius: 3px;
  background: linear-gradient(to bottom, #3d7de0, #2159c4);
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
  overflow: hidden;
}
.task-btn img, .task-btn .task-ico { flex: 0 0 16px; }
.task-btn > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-btn.active {
  background: linear-gradient(to bottom, #1b4cb3, #163f96);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,.45);
}
#taskWinamp, #taskMail, #taskIe, #taskNotepad, #taskExplorer, #taskTaskmgr, #taskCp { min-width: 0; max-width: 140px; }
.tray {
  margin-left: auto;
  height: 22px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, #19b9ee, #0d8ec7);
  border-left: 1px solid #0a6a96;
}
.clock {
  font: 11px Tahoma, sans-serif;
  padding: 0 6px;
  cursor: pointer;
  line-height: 22px;
  min-width: 40px;
  text-align: center;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.clock:hover { background: rgba(255,255,255,.12); }
.tray-mail {
  cursor: pointer;
  flex: 0 0 auto;
}
.tray-mail:not(:empty) {
  min-width: 14px;
  height: 14px;
  margin-right: 8px;
  padding: 0 3px;
  border-radius: 7px;
  background: #c00;
  color: #fff;
  font: bold 10px/14px Tahoma, sans-serif;
  text-align: center;
}
.tray-vol {
  width: 18px;
  height: 16px;
  margin-right: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex: 0 0 18px;
}
.tray-vol::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 5px;
  height: 6px;
  background: #fff;
}
.tray-vol::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  border: 6px solid transparent;
  border-left: 7px solid #fff;
}
.tray-vol.muted { opacity: .4; }
.vol-popup {
  position: absolute;
  right: 8px;
  bottom: 34px;
  z-index: 45;
  width: 148px;
  padding: 8px 10px 10px;
  background: var(--xp-face);
  border: 1px solid #0055e5;
  box-shadow: 2px 2px 8px rgba(0,0,0,.35), inset 1px 1px 0 #9db9eb;
  font: 11px Tahoma, sans-serif;
}
.vol-head { font-weight: bold; margin-bottom: 6px; }
.vol-popup input[type="range"] { width: 100%; }
.vol-mute { display: flex; align-items: center; gap: 4px; margin-top: 6px; cursor: pointer; }
.tray-balloon {
  position: absolute;
  right: 10px;
  bottom: 36px;
  z-index: 46;
  width: 236px;
  background: #ffffe1;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0,0,0,.2);
  padding: 8px 24px 10px 10px;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}
.balloon-x {
  position: absolute;
  top: 2px;
  right: 4px;
  border: 0;
  background: transparent;
  font: 14px/16px Tahoma, sans-serif;
  cursor: pointer;
}
.balloon-title { font-weight: bold; }
.balloon-text { margin: 4px 0 0; white-space: pre-wrap; }
.task-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  image-rendering: pixelated;
}
.task-ico.wa-ico {
  background:
    linear-gradient(#222, #111);
  box-shadow: inset 0 0 0 1px #6c6, 0 0 0 1px #000;
}
.task-ico.mail-ico {
  background:
    linear-gradient(135deg, #f4e4b2 50%, #c45a12 50%);
  box-shadow: 0 0 0 1px #5a4010;
}
.task-ico.ie-ico {
  background: radial-gradient(circle at 50% 45%, #1f4ad0 54%, transparent 55%),
    linear-gradient(#c9a227, #c9a227);
  box-shadow: 0 0 0 1px #0a3a86;
}
.task-ico.np-ico {
  background:
    linear-gradient(#fff8dc 70%, #e8d9a8 70%);
  box-shadow: inset 0 3px 0 #c45a12, 0 0 0 1px #5a4010;
}
.task-ico.exp-ico {
  background: linear-gradient(#f2d07a, #d4a017);
  box-shadow: 0 0 0 1px #7a5a10;
}
.task-ico.tm-ico {
  background: linear-gradient(#5a9a4a, #1e4a18);
  box-shadow: 0 0 0 1px #0a2808;
}
.task-ico.cp-ico {
  background: linear-gradient(#f6d27a, #c47a18);
  box-shadow: 0 0 0 1px #7a4a08;
}
.hidden { display: none !important; }

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.xp-dialog {
  width: 360px;
  background: var(--xp-face);
  border: 1px solid #0055e5;
  box-shadow: 4px 4px 12px rgba(0,0,0,.4), inset 1px 1px 0 #9db9eb;
}
.xp-dialog .titlebar-title { text-align: left; font-size: 11px; }
.dialog-body { padding: 14px 12px 12px; }
.dialog-row { display: flex; gap: 12px; align-items: flex-start; }
.dialog-icon {
  width: 32px; height: 32px; flex: 0 0 32px;
  background: #2f6fd6;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #1a4ca0;
  position: relative;
}
.dialog-icon::after {
  content: "i";
  position: absolute;
  inset: 0;
  color: #fff;
  font: bold 20px/32px Georgia, serif;
  text-align: center;
}
.dialog-icon.warn { background: #e6b800; box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px #a07a00; }
.dialog-icon.warn::after { content: "!"; color: #111; }
.dialog-text {
  margin: 2px 0 0;
  font: 11px/1.4 Tahoma, sans-serif;
  user-select: text;
  white-space: pre-wrap;
}
.dialog-buttons { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.xp-btn {
  min-width: 75px;
  height: 23px;
  padding: 0 12px;
  font: 11px Tahoma, sans-serif;
  background: var(--xp-face);
  border: 1px solid #003c74;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
  cursor: pointer;
}
.xp-btn:focus { outline: 1px dotted #000; outline-offset: -4px; }
.xp-btn:disabled { color: #808080; cursor: default; }

.shutdown {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.shutdown-inner { text-align: center; }
.shutdown-pc { position: relative; width: 180px; height: 110px; margin: 0 auto 28px; }
.pc-monitor {
  width: 120px; height: 78px; margin: 0 auto;
  border: 6px solid #2a2a2a;
  background: #111;
  box-shadow: 0 0 0 2px #444, 0 10px 0 #1a1a1a;
}
.pc-moon {
  position: absolute;
  right: 10px; top: 8px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #ffd54a;
  box-shadow: -12px 0 0 0 #000;
}
.shutdown-msg {
  color: #ffd54a;
  font: 22px/1.3 "Trebuchet MS", Tahoma, sans-serif;
  margin: 0 0 10px;
}
.shutdown-sub { color: #f66; font: bold 14px Tahoma, sans-serif; margin: 0 0 24px; }
.shutdown-hint { color: #888; font: 11px Tahoma, sans-serif; }

.start-menu {
  position: absolute;
  left: 0;
  bottom: 30px;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 380px;
  max-height: calc(100dvh - 30px - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  background: var(--xp-face);
  border: 1px solid #003c9a;
  box-shadow: 2px 2px 8px rgba(0,0,0,.4), inset 1px 1px 0 #9db9eb;
  font: 11px Tahoma, sans-serif;
}
.start-user {
  position: relative;
  height: 54px;
  padding: 10px 12px 0 54px;
  color: #fff;
  font: bold 13px/18px Tahoma, sans-serif;
  background:
    linear-gradient(to right, #1f56c9, #5b9fff 55%, #1f56c9);
}
.start-user::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid #fff;
  background: linear-gradient(#9cf, #369);
}
.start-body { display: flex; min-height: 220px; }
.start-col { flex: 1; padding: 6px 0; }
.start-left { background: #fff; }
.start-right { background: #d3e5fa; border-left: 1px solid #99b; }
.start-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}
.start-item:hover { background: var(--xp-select); color: #fff; }
.start-sep { height: 1px; margin: 6px 10px; background: #b8b8b8; }
.start-foot {
  background: linear-gradient(to right, #1f56c9, #5b9fff);
  padding: 6px 8px;
  text-align: right;
}
.start-off {
  height: 22px;
  padding: 0 12px;
  border: 1px solid #003c74;
  background: var(--xp-face);
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}

.extra-win {
  z-index: 6;
  transform: none;
  resize: none;
}
.winamp-win .xp-btn { min-width: 52px; color: #000; }
.winamp-win {
  width: 320px;
  height: 352px;
  min-width: 320px;
  min-height: 352px;
  max-width: 320px;
  max-height: 352px;
  left: 24px;
  top: auto;
  bottom: 48px;
  right: auto;
  overflow: hidden;
  background: #2a2a2a;
  border-color: #111;
}
.winamp-win .titlebar {
  background: linear-gradient(to bottom, #4a4a4a, #222);
  border-bottom-color: #000;
}
.winamp-body { background: #1a1a1a; color: #9f9; padding: 6px; gap: 6px; display: flex; flex-direction: column; min-height: 0; }
.wa-screen {
  background: #031;
  border: 1px solid #0a0;
  padding: 6px 8px;
  min-height: 86px;
  font-family: "Courier New", monospace;
}
.wa-time { font-size: 22px; color: #6f6; }
.wa-title { font-size: 11px; color: #ada; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.wa-eq { display: flex; align-items: flex-end; gap: 2px; height: 36px; margin-top: 8px; }
.wa-bar { width: 8px; background: linear-gradient(#6f6, #080); min-height: 4px; }
.wa-controls { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.wa-vol { color: #ccc; font: 11px Tahoma, sans-serif; display: flex; align-items: center; gap: 4px; }
.wa-pl-head { color: #ccc; font: bold 11px Tahoma, sans-serif; }
.wa-playlist { background: #012; color: #6f6; flex: 1; min-height: 0; overflow: auto; }
.wa-track {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #6f6;
  font: 11px "Courier New", monospace;
  padding: 2px 6px;
  cursor: pointer;
}
.wa-track:hover, .wa-track.active { background: #040; color: #fff; }
.wa-track.egg { color: #ff6; }

.mail-win {
  width: min(760px, calc(100vw - 36px));
  height: min(680px, calc(100vh - 42px));
  left: 88px;
  top: 18px;
}
.mail-body { display: flex; flex-direction: column; min-height: 0; gap: 4px; }
.mail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
  background: var(--xp-face);
  border-bottom: 1px solid var(--xp-shadow);
}
.mail-actions { display: flex; align-items: center; gap: 8px; }
.mail-hint { color: #666; }
.mail-split { flex: 1; min-height: 0; display: flex; gap: 6px; }
.mail-folders { flex: 0 0 128px; overflow: auto; background: #fff; }
.mail-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 5px 8px;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}
.mail-folder .mail-folder-count { color: #666; }
.mail-folder.selected { background: var(--xp-select); color: #fff; }
.mail-folder:hover:not(.selected) { background: #e8e4d4; }
.mail-folder.selected .mail-folder-count { color: #fff; }
.mail-list { flex: 0 0 210px; overflow: auto; background: #fff; }
.mail-row {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  padding: 5px 8px;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}
.mail-row .mail-from { color: #444; }
.mail-row .mail-subj { font-weight: normal; }
.mail-row .mail-date { color: #666; font-size: 10px; }
.mail-row.unread .mail-subj { font-weight: bold; }
.mail-row.selected { background: var(--xp-select); color: #fff; }
.mail-row.selected span { color: #fff; }
.mail-read { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--xp-shadow); display: flex; flex-direction: column; }
.mail-headers { padding: 8px 10px; border-bottom: 1px solid #ccc; background: #f7f4e8; font: 11px Tahoma, sans-serif; }
.mail-article { flex: 1; overflow: auto; padding: 12px 16px 16px; font: 13px/1.5 "Times New Roman", Times, serif; user-select: text; }
.mail-article p { margin: 0 0 10px; }
.mail-read.empty .mail-article::before {
  content: "Выберите письмо в этой папке.";
  color: #666;
  font: 11px Tahoma, sans-serif;
}

.ie-win {
  width: min(720px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 42px));
  left: 52px;
  top: 28px;
}
.ie-body { display: flex; flex-direction: column; min-height: 0; gap: 4px; }
.ie-toolbar, .ie-addrbar, .exp-addrbar, .exp-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
}
.ie-addrbar input, .exp-addr {
  flex: 1;
  min-width: 0;
  height: 22px;
  padding: 2px 6px;
  font: 11px Tahoma, sans-serif;
  background: #fff;
}
.ie-stage { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.ie-page { padding: 16px 20px; font: 13px/1.45 "Times New Roman", Times, serif; user-select: text; }
.ie-page h2 { margin: 0 0 10px; font: 18px/1.2 Arial, sans-serif; color: #003399; }
.ie-code { color: #444; font: 12px "Courier New", monospace; }
.ie-home-head {
  font: bold 16px "Times New Roman", Times, serif;
  color: #003399;
  border-bottom: 2px solid #c00;
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.ie-blink { color: #c00; font: 12px "Comic Sans MS", Tahoma, sans-serif; }
.ie-link {
  border: 0;
  padding: 0;
  background: none;
  color: #00c;
  text-decoration: underline;
  cursor: pointer;
  font: 13px "Times New Roman", Times, serif;
}
.ie-home-foot { color: #666; font: 11px Tahoma, sans-serif; }
.ie-zone { flex: 0 0 88px; text-align: right; }

.np-win {
  width: min(420px, calc(100vw - 36px));
  height: min(360px, calc(100vh - 42px));
  left: 96px;
  top: 72px;
}
.np-body { display: flex; flex-direction: column; min-height: 0; gap: 0; padding: 0; }
.np-menubar {
  flex: 0 0 auto;
  padding: 2px 8px;
  font: 11px Tahoma, sans-serif;
  color: #000;
  background: var(--xp-face);
  border-bottom: 1px solid var(--xp-shadow);
}
.np-text {
  flex: 1;
  min-height: 0;
  width: 100%;
  resize: none;
  border: 0;
  padding: 6px 8px;
  font: 13px/1.4 "Lucida Console", "Courier New", monospace;
  background: #fff;
  color: #000;
  white-space: pre;
}

.exp-win {
  width: min(520px, calc(100vw - 36px));
  height: min(440px, calc(100vh - 42px));
  left: 110px;
  top: 44px;
}
.exp-body { display: flex; flex-direction: column; min-height: 0; gap: 4px; }
.exp-toolbar .xp-btn { min-width: 52px; }
.exp-files { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.exp-empty {
  padding: 16px 12px;
  color: #666;
  font: 11px Tahoma, sans-serif;
  white-space: pre-wrap;
}
.exp-file {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 8px;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
  text-align: left;
}
.exp-file:hover, .exp-file.selected { background: var(--xp-select); color: #fff; }
.exp-pict {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  box-shadow: 0 0 0 1px #444;
}
.exp-pict.dir { background: linear-gradient(#ffe08a, #e0a020); }
.exp-pict.exe { background: linear-gradient(#8cf, #258); }
.exp-pict.mail { background: linear-gradient(135deg, #f4e4b2 50%, #c45a12 50%); }
.exp-pict.wa { background: #222; box-shadow: inset 0 0 0 1px #6c6, 0 0 0 1px #000; }
.exp-pict.ie { background: #1f4ad0; }
.exp-pict.txt { background: #fff; box-shadow: inset 0 0 0 1px #888; }
.exp-pict.game { background: #c45; }
.exp-pict.hdd { background: linear-gradient(#d8d8d8, #6a6a6a); }
.exp-pict.cd {
  background: radial-gradient(circle at 35% 35%, #fff 0 12%, #8ec 18% 42%, #246 70%);
  border-radius: 50%;
}
.exp-pict.floppy { background: linear-gradient(#eee, #9a9a9a); }
.exp-pict.bin { background: linear-gradient(#cfd6dc, #8a969e); }

.tm-win {
  width: min(560px, calc(100vw - 36px));
  height: min(380px, calc(100vh - 42px));
  left: 150px;
  top: 64px;
}
.tm-body { display: flex; flex-direction: column; min-height: 0; gap: 4px; padding: 6px; }
.tm-tabs { display: flex; gap: 2px; }
.tm-tab {
  padding: 3px 10px;
  border: 1px solid var(--xp-shadow);
  background: var(--xp-face-dk);
  font: 11px Tahoma, sans-serif;
}
.tm-tab.active { background: #fff; border-bottom-color: #fff; }
.tm-table { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.tm-head, .tm-row {
  display: grid;
  grid-template-columns: 1.5fr 52px 40px 90px 1fr;
  gap: 4px;
  font: 11px Tahoma, sans-serif;
}
.tm-head {
  background: var(--xp-face);
  border-bottom: 1px solid #808080;
  padding: 3px 6px;
  font-weight: bold;
}
.tm-row {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 2px 6px;
  cursor: pointer;
}
.tm-row:nth-child(even) { background: #f3f3f3; }
.tm-row.selected { background: var(--xp-select); color: #fff; }
.tm-row.hung { color: #a00; font-weight: bold; }
.tm-row.hung.selected { color: #fff; }
.tm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.cp-win {
  width: min(820px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 42px));
  left: 72px;
  top: 28px;
}
.cp-body { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.admin-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-status { margin-left: 4px; color: #060; }
.admin-status.warn { color: #a00; }
.admin-content { flex: 1; min-height: 0; }
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--xp-face);
  padding: 4px;
  overflow: auto;
}
.admin-form label { font: 11px Tahoma, sans-serif; }
.admin-form input, .admin-form textarea {
  width: 100%;
  margin-top: 2px;
  padding: 3px 5px;
  font: 12px Tahoma, "Consolas", monospace;
}
.admin-form .grow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.admin-form textarea { flex: 1; min-height: 180px; resize: none; }
.admin-hint {
  margin: 4px 0 0;
  color: #404040;
  font: 11px Tahoma, sans-serif;
}
.admin-hint code { font: 11px Consolas, "Courier New", monospace; }

::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--xp-face-dk);
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: linear-gradient(to top, transparent 6px, #000 6px, #000 7px, transparent 7px),
    linear-gradient(135deg, transparent 50%, #000 50%) 4px 8px / 4px 4px no-repeat,
    linear-gradient(225deg, transparent 50%, #000 50%) 8px 8px / 4px 4px no-repeat;
}
::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: linear-gradient(to bottom, transparent 8px, #000 8px, #000 9px, transparent 9px),
    linear-gradient(45deg, transparent 50%, #000 50%) 4px 4px / 4px 4px no-repeat,
    linear-gradient(315deg, transparent 50%, #000 50%) 8px 4px / 4px 4px no-repeat;
}
::-webkit-scrollbar-track { background: #fff; }
::-webkit-scrollbar-thumb {
  background: var(--xp-face-dk);
  border: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #808080;
}
::-webkit-scrollbar-corner { background: #fff; }

@media (max-width: 760px) {
  .desk-icons {
    display: flex;
    top: 8px;
    left: 6px;
    width: 72px;
    gap: 10px;
    z-index: 2;
  }
  .desk-icons-games {
    left: auto;
    right: 6px;
    top: auto;
    bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: calc(100% - 88px);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .desk-icon { padding: 2px; }
  .desk-pict { width: 28px; height: 28px; }
  .desk-pict img, .desk-pict svg { width: 28px; height: 28px; }
  .desk-label { font-size: 10px; max-width: 70px; }
  .app-window, .app-window.maximized {
    left: 0; top: 0; right: 0;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    width: auto; height: auto;
    transform: none;
    border: 0;
    box-shadow: none;
  }
  .workspace .taskbar { margin: 0; }
  .start-btn { padding: 0 10px 0 8px; }
  .start-btn > span:not(.start-flag) { display: none; }
  .task-btn { flex: 1 1 64px; max-width: none; min-width: 0; padding: 0 6px; }
  .tray { padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  .header-inner { min-height: 48px; padding: 2px 6px; }
  .logo { height: 42px; max-width: 48%; }
  .header-action img { height: 36px; }
  .header-actions { gap: 6px; }
  .content { flex-direction: column; }
  .sidebar { flex: 0 0 auto; width: auto; height: 32vh; }
  .viewer { width: 100%; }
  .titlebar-title { font-size: 11px; }
  .caption-btn.max { display: none; }
  .start-menu { width: min(380px, 100vw); }
  .mail-win, .winamp-win, .ie-win, .np-win, .exp-win, .tm-win, .cp-win {
    left: 0; top: 0; right: 0;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    width: auto; height: auto;
    min-width: 0; min-height: 0;
    max-width: none; max-height: none;
  }
  .mail-split { flex-direction: column; }
  .mail-folders { flex: 0 0 auto; display: flex; }
  .mail-list { flex: 0 0 28vh; }
}

.seo-noscript {
  position: relative;
  z-index: 40;
  margin: 8px 10px 0;
  padding: 10px 12px;
  background: #ece9d8;
  color: #000;
  border: 1px solid #808080;
  box-shadow: 1px 1px 0 #404040;
  user-select: text;
  font: 12px/1.4 Tahoma, "MS Sans Serif", sans-serif;
}
.seo-noscript ul { margin: 6px 0 0; padding-left: 18px; }



