* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --desktop: #008080;
  --ink: #000000;
  --paper: #ffffff;
  --paper-ink: #000000;
  --face: #c0c0c0;
  --light: #ffffff;
  --mid: #dfdfdf;
  --shadow: #808080;
  --dark: #000000;
  --title: #000080;
  --title-ink: #ffffff;
  --select: #000080;
  --select-ink: #ffffff;
  --accent: #000080;
  --disabled: #808080;
}

html[data-theme="winxp"] {
  --desktop: #3a6ea5;
  --face: #ece9d8;
  --light: #ffffff;
  --mid: #d6d2c2;
  --shadow: #aca899;
  --dark: #716f64;
  --title: #0054e3;
  --title-ink: #ffffff;
  --select: #316ac5;
  --select-ink: #ffffff;
  --accent: #0054e3;
  --disabled: #8d8a7c;
}

html[data-theme="macos9"] {
  --desktop: #4d6d8a;
  --face: #dddddd;
  --light: #ffffff;
  --mid: #eeeeee;
  --shadow: #888888;
  --title: #cccccc;
  --title-ink: #000000;
  --select: #000080;
  --select-ink: #ffffff;
  --accent: #666666;
  --disabled: #888888;
}

html[data-theme="winamp"] {
  color-scheme: dark;
  --desktop: #0b0b0b;
  --ink: #d6ffb0;
  --paper: #061006;
  --paper-ink: #b6ff6a;
  --face: #3a3a3a;
  --light: #6e6e6e;
  --mid: #4e4e4e;
  --shadow: #1a1a1a;
  --dark: #000000;
  --title: #1e4d12;
  --title-ink: #c6ff7a;
  --select: #2f7d1e;
  --select-ink: #e8ffc8;
  --accent: #7cff3a;
  --disabled: #6a6a6a;
}

html[data-theme="hotdog"] {
  --desktop: #000000;
  --face: #ffff00;
  --light: #ffffe0;
  --mid: #ffff54;
  --shadow: #808000;
  --title: #ff0000;
  --title-ink: #ffff00;
  --select: #ff0000;
  --select-ink: #ffff00;
  --accent: #ff0000;
  --disabled: #808000;
}

html[data-theme="photoshop"] {
  color-scheme: dark;
  --desktop: #1e1e1e;
  --ink: #f0f0f0;
  --paper: #262626;
  --paper-ink: #f0f0f0;
  --face: #535353;
  --light: #6e6e6e;
  --mid: #5c5c5c;
  --shadow: #2a2a2a;
  --dark: #111111;
  --title: #323232;
  --title-ink: #31a8ff;
  --select: #1b6ca8;
  --select-ink: #ffffff;
  --accent: #31a8ff;
  --disabled: #8a8a8a;
}

html[data-theme="spotify"] {
  color-scheme: dark;
  --desktop: #121212;
  --ink: #ffffff;
  --paper: #000000;
  --paper-ink: #ffffff;
  --face: #181818;
  --light: #2a2a2a;
  --mid: #222222;
  --shadow: #000000;
  --title: #1db954;
  --title-ink: #000000;
  --select: #1db954;
  --select-ink: #000000;
  --accent: #1db954;
  --disabled: #727272;
}

html[data-theme="discord"] {
  color-scheme: dark;
  --desktop: #313338;
  --ink: #f2f3f5;
  --paper: #1e1f22;
  --paper-ink: #f2f3f5;
  --face: #2b2d31;
  --light: #3f4147;
  --mid: #35373c;
  --shadow: #1a1b1e;
  --dark: #111214;
  --title: #5865f2;
  --title-ink: #ffffff;
  --select: #5865f2;
  --select-ink: #ffffff;
  --accent: #5865f2;
  --disabled: #949ba4;
}

html[data-theme="terminal"] {
  color-scheme: dark;
  --desktop: #0c0c0c;
  --ink: #33ff00;
  --paper: #000000;
  --paper-ink: #33ff00;
  --face: #041404;
  --light: #33ff00;
  --mid: #0c0c0c;
  --shadow: #006600;
  --dark: #33ff00;
  --title: #003300;
  --title-ink: #33ff00;
  --select: #003b00;
  --select-ink: #33ff00;
  --accent: #33ff00;
  --disabled: #1a7a1a;
}

html[data-theme="steam"] {
  color-scheme: dark;
  --desktop: #1b2838;
  --ink: #c7d5e0;
  --paper: #0e1419;
  --paper-ink: #c7d5e0;
  --face: #171a21;
  --light: #2a475e;
  --mid: #1b2838;
  --shadow: #0b1016;
  --title: #171a21;
  --title-ink: #66c0f4;
  --select: #66c0f4;
  --select-ink: #0e1419;
  --accent: #66c0f4;
  --disabled: #67707a;
}

html[data-theme="itunes"] {
  --desktop: #8fa4b8;
  --ink: #1a1a1a;
  --face: #e8e8e8;
  --light: #ffffff;
  --mid: #f4f4f4;
  --shadow: #9a9a9a;
  --dark: #404040;
  --title: #c5d0da;
  --title-ink: #222222;
  --select: #3875d7;
  --select-ink: #ffffff;
  --accent: #3875d7;
  --disabled: #8e8e8e;
}

html[data-theme="vlc"] {
  color-scheme: dark;
  --desktop: #111111;
  --ink: #f2f2f2;
  --paper: #161616;
  --paper-ink: #f2f2f2;
  --face: #1f1f1f;
  --light: #3a3a3a;
  --mid: #2a2a2a;
  --shadow: #000000;
  --title: #ff8800;
  --title-ink: #1a1a1a;
  --select: #ff8800;
  --select-ink: #1a1a1a;
  --accent: #ff8800;
  --disabled: #8a8a8a;
}

html[data-theme="slack"] {
  --desktop: #350d36;
  --ink: #1d1c1d;
  --face: #ffffff;
  --light: #ffffff;
  --mid: #f8f8f8;
  --shadow: #c4c4c4;
  --dark: #1d1c1d;
  --title: #4a154b;
  --title-ink: #ffffff;
  --select: #1164a3;
  --select-ink: #ffffff;
  --accent: #36c5f0;
  --disabled: #8d8d8d;
}

html[data-theme="blender"] {
  color-scheme: dark;
  --desktop: #1d1d1d;
  --ink: #e6e6e6;
  --paper: #1a1a1a;
  --paper-ink: #e6e6e6;
  --face: #303030;
  --light: #4a4a4a;
  --mid: #3a3a3a;
  --shadow: #111111;
  --title: #e87d0d;
  --title-ink: #1a1a1a;
  --select: #e87d0d;
  --select-ink: #1a1a1a;
  --accent: #e87d0d;
  --disabled: #8a8a8a;
}

html[data-theme="aol"] {
  --desktop: #003399;
  --face: #ffffff;
  --light: #ffffff;
  --mid: #f2f2f2;
  --shadow: #808080;
  --title: #ffcc00;
  --title-ink: #000000;
  --select: #003399;
  --select-ink: #ffffff;
  --accent: #cc9900;
  --disabled: #808080;
}

html[data-theme="msn"] {
  --desktop: #7aa3c9;
  --face: #f3f7fb;
  --light: #ffffff;
  --mid: #e4eef6;
  --shadow: #7a93a8;
  --dark: #1a3a5c;
  --title: #3b6ea5;
  --title-ink: #ffffff;
  --select: #3b6ea5;
  --select-ink: #ffffff;
  --accent: #00a651;
  --disabled: #7a93a8;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--desktop);
}

body {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--ink);
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11px;
  line-height: 1.25;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--select);
  color: var(--select-ink);
}

button,
input,
textarea {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11px;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

button::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.window {
  width: 440px;
  max-width: 100%;
  background: var(--face);
  color: var(--ink);
  border-style: solid;
  border-width: 2px;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset 1px 1px 0 var(--mid), inset -1px -1px 0 var(--shadow);
  padding: 3px;
}

.message-box {
  width: 320px;
}

.title-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  margin: 0;
  padding: 0 3px;
  background: var(--title);
  color: var(--title-ink);
  font-weight: bold;
  line-height: 18px;
  user-select: none;
}

.title-glyph {
  position: relative;
  width: 15px;
  height: 13px;
  flex: 0 0 auto;
  background: var(--face);
  border-style: solid;
  border-width: 1px;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
}

.title-glyph::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 3px;
  background: var(--accent);
}

.title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-body {
  padding: 12px 12px 8px;
}

.field {
  margin: 0 0 8px;
}

.field label,
.field-label {
  display: block;
  margin: 0 0 2px;
}

input[type="text"],
textarea,
.sunken {
  display: block;
  width: 100%;
  margin: 0;
  padding: 4px 4px 4px 6px;
  color: var(--paper-ink);
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
}

textarea {
  height: 72px;
  resize: none;
  overflow: auto;
}

input:focus,
textarea:focus {
  outline: none;
}

.job-value,
.download-name {
  overflow-wrap: anywhere;
}

.download-name {
  margin: 0 0 8px;
  font-weight: bold;
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 2px 4px;
}

.btn {
  display: inline-block;
  min-width: 75px;
  margin: 0;
  padding: 3px 12px;
  color: var(--ink);
  background: var(--face);
  line-height: 14px;
  text-align: center;
  text-decoration: none;
  cursor: default;
  border-style: solid;
  border-width: 2px;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset 1px 1px 0 var(--mid), inset -1px -1px 0 var(--shadow);
}

a.btn,
a.btn:visited {
  color: var(--ink);
}

.btn.default {
  box-shadow:
    inset 1px 1px 0 var(--mid),
    inset -1px -1px 0 var(--shadow),
    0 0 0 1px var(--face),
    0 0 0 2px var(--dark);
}

.btn:focus {
  outline: 1px dotted var(--ink);
  outline-offset: -5px;
}

.btn:active:not(:disabled) {
  padding: 4px 11px 2px 13px;
  border-color: var(--dark) var(--light) var(--light) var(--dark);
  box-shadow: inset -1px -1px 0 var(--mid), inset 1px 1px 0 var(--shadow);
}

.btn.default:active:not(:disabled) {
  box-shadow:
    inset -1px -1px 0 var(--mid),
    inset 1px 1px 0 var(--shadow),
    0 0 0 1px var(--face),
    0 0 0 2px var(--dark);
}

.btn:disabled {
  color: var(--disabled);
  background: var(--face);
  text-shadow: 1px 1px 0 var(--light);
  opacity: 1;
}

.progress-well {
  height: 24px;
  padding: 2px;
  overflow: hidden;
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
}

.progress-blocks {
  width: 0;
  height: 100%;
  background-color: transparent;
  background-image: repeating-linear-gradient(
    90deg,
    var(--accent) 0,
    var(--accent) 8px,
    var(--paper) 8px,
    var(--paper) 10px
  );
}

.job-error {
  margin: 2px 0 0;
  padding: 6px 8px;
  background: var(--paper);
  color: var(--paper-ink);
  overflow-wrap: anywhere;
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
}

.file-list {
  min-height: 120px;
  max-height: 220px;
  overflow: auto;
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
  padding: 1px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 4px;
  color: var(--paper-ink);
  line-height: 16px;
  text-decoration: none;
  cursor: default;
}

a.file-row:visited {
  color: var(--paper-ink);
}

a.file-row:hover,
a.file-row:focus,
a.file-row:visited:hover {
  background: var(--select);
  color: var(--select-ink);
  outline: none;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  flex: 0 0 auto;
}

.list-note {
  padding: 2px 4px;
}

.notice {
  margin: 0;
  padding: 18px 8px 22px;
}

.status-bar {
  margin: 4px 2px 2px;
  padding: 2px 4px;
  min-height: 18px;
  line-height: 14px;
  background: var(--face);
  border-style: solid;
  border-width: 1px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark);
}

.message-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.message-body {
  padding: 14px 12px 8px;
}

.message-body p {
  margin: 0 0 14px;
  min-height: 32px;
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-box .actions {
  justify-content: center;
  padding-top: 0;
}

.files-window {
  width: 640px;
}

.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  cursor: default;
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.check-box {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark);
}

.check input:focus-visible + .check-box {
  outline: 1px dotted var(--ink);
  outline-offset: 2px;
}

.check input:checked + .check-box::after {
  content: "";
  display: block;
  width: 3px;
  height: 6px;
  margin: 0 0 0 3px;
  border: solid var(--paper-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.search {
  width: 120px;
  flex: 0 0 120px;
  height: 18px;
  padding: 1px 4px;
  color: var(--paper-ink);
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark);
}

.col-btn {
  padding: 2px 4px;
  color: var(--ink);
  background: var(--face);
  border-style: solid;
  border-width: 1px;
  border-color: var(--light) var(--shadow) var(--shadow) var(--light);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}

.col-btn:active {
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
}

.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.explorer-toolbar .btn {
  min-width: 54px;
  flex: 0 0 auto;
}

.explorer-toolbar .address {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
}

.explorer {
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
}

.explorer-head,
.explorer-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(52px, 0.5fr) minmax(72px, 0.7fr) minmax(96px, 0.9fr);
}

.explorer-head .col-btn:nth-child(2) {
  text-align: right;
}

.explorer-list {
  min-height: 180px;
  max-height: 280px;
  overflow: auto;
  outline: none;
}

.explorer-row {
  color: var(--paper-ink);
  cursor: default;
  user-select: none;
}

.explorer-row span {
  padding: 1px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-head span:nth-child(2),
.explorer-row span:nth-child(2) {
  text-align: right;
}

.explorer-row.selected,
.explorer-row.selected span {
  background: var(--select);
  color: var(--select-ink);
}

.explorer-row:focus {
  outline: none;
}

.files-status {
  display: flex;
  gap: 12px;
}

.files-status #status-count {
  flex: 0 0 auto;
}

.files-status #status-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-shell="on"] {
  padding-bottom: 40px;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 28px;
  padding: 2px 4px;
  background: var(--face);
  border-top: 2px solid var(--light);
  box-shadow: inset 0 1px 0 var(--mid);
}

.start-button {
  height: 22px;
  min-width: 68px;
  margin: 0;
  padding: 1px 10px 1px 8px;
  color: var(--ink);
  background: var(--face);
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  cursor: default;
  border-style: solid;
  border-width: 2px;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset 1px 1px 0 var(--mid), inset -1px -1px 0 var(--shadow);
}

.start-button:focus {
  outline: 1px dotted var(--ink);
  outline-offset: -4px;
}

.start-button[aria-expanded="true"] {
  padding: 2px 9px 0 9px;
  border-color: var(--dark) var(--light) var(--light) var(--dark);
  box-shadow: inset 1px 1px 0 var(--shadow);
}

.start-menu {
  position: absolute;
  left: 2px;
  bottom: 100%;
  min-width: 220px;
  margin: 0 0 2px;
  padding: 2px;
  background: var(--face);
  border-style: solid;
  border-width: 2px;
  border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset 1px 1px 0 var(--mid), inset -1px -1px 0 var(--shadow);
}

.start-item,
.app-tile {
  color: var(--ink);
  text-decoration: none;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 8px;
}

.start-item:hover,
.start-item:focus,
.app-tile:hover,
.app-tile:focus {
  background: var(--select);
  color: var(--select-ink);
  outline: 1px dotted var(--select-ink);
  outline-offset: -3px;
}

.app-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.app-icon svg {
  display: block;
  width: 32px;
  height: 32px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  gap: 8px 12px;
}

.apps-window,
.usage-window {
  width: 480px;
}

.cases-window {
  width: 720px;
}

.case-head,
.case-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) minmax(108px, 0.8fr) minmax(0, 1.4fr) 108px 72px;
}

.case-head span {
  padding: 2px 4px;
  background: var(--face);
  border-style: solid;
  border-width: 1px;
  border-color: var(--light) var(--shadow) var(--shadow) var(--light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}

.case-row span {
  padding: 1px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 104px;
  padding: 6px 4px;
  text-align: center;
}

.app-tile span {
  max-width: 96px;
}

.usage-list {
  margin: 0 0 12px;
}

.usage-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 1px 2px;
}

.usage-line span:last-child {
  font-variant-numeric: tabular-nums;
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(72px, 0.6fr) minmax(108px, 0.8fr);
  gap: 8px;
  padding: 2px 4px;
}

.recent-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-note {
  margin: 0 0 8px;
}

.themes-window {
  width: 440px;
}

.theme-list {
  max-height: 320px;
  overflow: auto;
  background: var(--paper);
  border-style: solid;
  border-width: 2px;
  border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--mid);
}

.theme-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 4px 6px;
  color: var(--paper-ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: default;
}

.theme-row.selected {
  background: var(--select);
  color: var(--select-ink);
}

.theme-swatches {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.theme-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #000000;
}

.theme-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.theme-name {
  font-weight: bold;
}

.theme-app {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
