:root {
  --taskbar-height: 52px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wallpaper {
  background-position: center;
  filter: saturate(.9);
}

.wallpaper-shade {
  background: linear-gradient(90deg, #162a251f, transparent 35%),
    linear-gradient(0deg, #14221b30, transparent 20%);
}

#desktop {
  height: calc(100dvh - var(--taskbar-height));
  isolation: isolate;
  z-index: 1;
}

.desktop-apps {
  top: 0;
  left: 0;
  height: 100%;
  padding: 7px 5px;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 88px);
  grid-template-columns: none;
  grid-auto-columns: 86px;
  align-content: start;
  gap: 5px 3px;
}

.desktop-app {
  width: 86px;
  height: 88px;
  padding: 8px 3px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  gap: 6px;
  justify-content: flex-start;
  user-select: none;
  transition: background .12s, border-color .12s;
}

.desktop-app:hover {
  background: #e9f1e321;
  border-color: #edf5e426;
  transform: none;
}

.desktop-app.selected {
  background: #d7e8d043;
  border-color: #f0f8e66b;
}

.desktop-app:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: -3px;
}

.desktop-app .app-art {
  width: 46px;
  height: 46px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 2px 3px #0006);
}

.desktop-app .app-art::after {
  content: none;
}

.desktop-app .app-art img {
  width: 38px;
  height: 38px;
  border-radius: 0;
}

.desktop-app .art-ai img {
  filter: invert(1);
}

.desktop-app .art-settings svg {
  width: 38px;
  height: 38px;
  color: #e1eee6;
}

.desktop-app .app-art.full img {
  width: 100%;
  height: 100%;
}

.desktop-app > span:last-child {
  font-family: "Segoe UI", "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
  text-align: center;
  text-shadow: 0 1px 3px #000, 0 1px 7px #0009;
  max-width: 80px;
}

.taskbar {
  inset: auto 0 0;
  transform: none;
  width: 100%;
  max-width: none;
  height: var(--taskbar-height);
  padding: 0 0 0 10px;
  border: 0;
  border-top: 1px solid #eff6e42b;
  border-radius: 0;
  background: #1d3028e6;
  color: #f3f5eb;
  backdrop-filter: blur(35px) saturate(1.2);
  box-shadow: 0 -2px 20px #14281e1a;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  z-index: 400;
}

.taskbar-left,
.taskbar-center,
.taskbar-tray {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
}

.taskbar-center {
  gap: 5px;
}

.ambient-button {
  padding: 6px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 4px;
  background: transparent;
  color: #e6ecdc;
  text-align: left;
}

.ambient-button:hover,
.tray-button:hover,
.dock-launcher:hover {
  background: #f4f6e315;
}

#sound-icon svg {
  width: 19px;
  height: 19px;
}

.sound-copy {
  font-size: 10px;
  line-height: 1.5;
}

.sound-copy small {
  display: block;
  color: #cbd6c0b3;
  font-size: 9px;
}

.dock-launcher {
  width: 40px;
  height: 42px;
  min-width: 40px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background .15s;
}

.dock-launcher > img {
  width: 29px;
  height: 29px;
}

.dock-launcher:hover {
  transform: none;
}

.dock-launcher[aria-expanded=true] {
  background: #f4f6e324;
}

.taskbar-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 168px;
  height: 30px;
  margin: 0 6px;
  padding: 0 12px;
  border: 1px solid #f4f6e31f;
  border-radius: 20px;
  background: #dbe8d217;
  color: #e3e9d8bd;
  text-align: left;
  font-size: 11px;
}

.taskbar-search:hover {
  background: #dbe8d226;
}

.taskbar-search svg {
  width: 14px;
  height: 14px;
}

#dock {
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  max-width: 48vw;
  height: 100%;
  padding: 0;
  margin: 0;
}

.dock-app {
  height: 44px;
  width: 40px;
  min-width: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background .15s;
}

.dock-app .app-art {
  height: 27px;
  width: 27px;
  border-radius: 6px;
  box-shadow: none;
}

.dock-app .app-art img {
  height: 20px;
  width: 20px;
}

.dock-app .app-art.full img {
  height: 100%;
  width: 100%;
}

.dock-app .app-art svg {
  width: 20px;
  height: 20px;
}

.dock-app:hover {
  transform: none;
  background: #f4f6e315;
}

.dock-app:after {
  display: none;
}

.dock-app.running {
  background: #f4f6e30b;
}

.dock-app.running:before {
  width: 6px;
  height: 3px;
  bottom: 1px;
  left: calc(50% - 3px);
  border-radius: 3px;
  background: #e2e8d77a;
  transition: width .2s, left .2s;
}

.dock-app.active {
  background: #f4f6e31c;
}

.dock-app.active:before {
  width: 17px;
  left: calc(50% - 8.5px);
  background: #e9c48e;
}

.taskbar-tray {
  justify-content: flex-end;
  gap: 6px;
}

.tray-connection {
  display: grid;
  place-items: center;
  padding: 7px;
  color: #d5decc;
}

.tray-connection svg,
.tray-button svg {
  height: 16px;
  width: 16px;
}

.tray-button {
  height: 36px;
  width: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 4px;
  color: #e1e8d7;
}

#taskbar-clock {
  min-width: 82px;
  padding: 0 8px;
  font-family: "Segoe UI", "DM Sans", sans-serif;
  font-size: 10px;
  line-height: 1.7;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#taskbar-clock span {
  display: block;
}

.show-desktop {
  display: block;
  height: 100%;
  width: 6px;
  padding: 0;
  margin-left: 5px;
  border-radius: 0;
  border-left: 1px solid #e3eedb33;
  background: transparent;
}

.show-desktop:hover {
  background: #e3eedb26;
}

.show-desktop svg {
  display: none;
}

.launcher {
  z-index: 300;
  bottom: calc(var(--taskbar-height) + 10px);
  width: 590px;
  max-height: calc(100dvh - var(--taskbar-height) - 30px);
  padding: 28px 30px 20px;
  border-radius: 9px;
  background: #f4f4eaf5;
  box-shadow: 0 10px 60px #10281b55;
  overflow: auto;
}

.launcher-heading h2 {
  font-size: 23px;
  letter-spacing: -.5px;
  margin: 5px 0 20px;
}

.launcher-heading .eyebrow {
  letter-spacing: 1.4px;
}

.pinned-heading {
  font-size: 11px;
  margin: 25px 3px 0;
  font-weight: 600;
}

#launcher-apps {
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 5px;
  padding: 15px 0 30px;
}

.launcher-app {
  gap: 9px;
  border-radius: 5px;
  padding: 13px 3px;
  font-size: 10px;
}

.launcher-app .app-art {
  width: 37px;
  height: 37px;
  border-radius: 9px;
}

.launcher-footer {
  padding-top: 16px;
}

.os-window {
  border-radius: 8px;
  max-height: 100%;
  border-color: #f9faefb3;
}

.os-window.maximized {
  inset: 0 !important;
  max-height: 100%;
  border-radius: 0;
}

.window-titlebar {
  height: 40px;
  min-height: 40px;
}

.window-controls {
  padding: 0;
  gap: 0;
}

.window-controls button {
  width: 45px;
  border-radius: 0;
}

#toasts {
  z-index: 500;
  bottom: calc(var(--taskbar-height) + 16px);
}

@media (max-width: 1100px) {
  .sound-copy {
    display: none;
  }

  .taskbar-search {
    width: 125px;
  }

  .taskbar {
    gap: 6px;
  }
}

@media (max-width: 850px) {
  .taskbar-search {
    width: 33px;
    padding: 0;
    margin: 0 2px;
    justify-content: center;
  }

  .taskbar-search-text {
    display: none;
  }

  #dock {
    max-width: 53vw;
  }
}

@media (max-width: 700px) {
  .taskbar {
    display: flex;
    padding-left: 5px;
    gap: 5px;
  }

  .taskbar-left,
  .tray-connection,
  .tray-button {
    display: none;
  }

  .taskbar-center {
    flex: 1;
    overflow: hidden;
    gap: 2px;
  }

  .dock-launcher {
    width: 35px;
    min-width: 35px;
  }

  .taskbar-search {
    flex-shrink: 0;
    width: 28px;
    border: 0;
    background: transparent;
  }

  #dock {
    max-width: none;
    gap: 2px;
  }

  .dock-app {
    width: 35px;
    min-width: 35px;
  }

  .taskbar-tray {
    gap: 0;
  }

  #taskbar-clock {
    min-width: 65px;
    font-size: 9px;
    padding: 0 4px;
  }

  .taskbar .show-desktop {
    display: block;
    margin-left: 2px;
  }

  .desktop-apps {
    padding: 6px 2px;
    grid-template-rows: repeat(auto-fill, 84px);
    grid-template-columns: none;
    grid-auto-columns: 80px;
    gap: 4px 2px;
  }

  .desktop-app {
    width: 80px;
    height: 84px;
  }

  .desktop-app .app-art {
    height: 40px;
    width: 40px;
  }

  .desktop-app > span:last-child {
    font-size: 10px;
  }

  .launcher {
    width: calc(100% - 20px);
    bottom: calc(var(--taskbar-height) + 8px);
    max-height: calc(100dvh - var(--taskbar-height) - 20px);
    padding: 23px;
  }

  #launcher-apps {
    grid-template-columns: repeat(4, 1fr);
  }

  .os-window,
  .os-window.maximized {
    max-height: 100%;
    height: 100% !important;
    inset: 0 !important;
    border-radius: 0;
  }
}
