body,
html {
  margin: 0;
  padding: 0;
  font-family: Tahoma, sans-serif;
  overflow: hidden;
  background: rgb(0, 0, 0);
}

#boot-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0);
  position: relative;
  overflow: hidden;
}

#boot-gif,
#boot-video {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  display: block;
  margin: auto;
  background: rgb(0, 0, 0);
  image-rendering: pixelated;
}



#desktop {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: rgb(0, 0, 0);
  overflow: hidden;
}


#desktop-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100vw;
  max-width: 100vw;
  max-height: 100vh;
  height: auto;
  background: rgb(0, 0, 0);
  image-rendering: pixelated;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 32px #000;
}

@media (min-aspect-ratio: 4/3) {
  #desktop-wrapper {
    height: 100vh;
    width: auto;
    max-width: calc(100vh * 4 / 3);
  }
}

@media (max-aspect-ratio: 4/3) {
  #desktop-wrapper {
    width: 100vw;
    height: auto;
    max-height: calc(100vw * 3 / 4);
  }
}


#wallpaper {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

#icon-container {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 1;
}

.icon {
  display: inline-block;
  text-align: center;
  margin: 16px;
  cursor: pointer;
  width: 64px;
  color: white;
  font-size: 12px;
}

.icon.hidden-app {
  display: none;
}

.icon img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

.window {
  position: absolute;
  top: 150px;
  left: 150px;
  width: 300px;
  background: #c0c0c0;
  border: 2px solid black;
  box-shadow: 5px 5px 0 #404040;
  z-index: 10;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  display: none;
  transition:
    width 0.25s ease,
    height 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* Only animate top/left when this class is present */
.window.animated-move {
  transition:
    top 0.25s ease,
    left 0.25s ease,
    width 0.25s ease,
    height 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
}

.window.show {
  display: block !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
  z-index: 9999 !important;
}

.window-header {
  background: #1C75BC;
  color: white;
  padding: 8px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.window-body {
  background: white;
  padding: 16px;
  color: black;
  font-size: 14px;
}

.window-buttons {
  display: flex;
  gap: 2px;
}

.win-btn,
.close-btn {
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.win-btn {
  background: #d0d0d0;
  border: 1px solid #808080;
}

.win-btn:hover {
  background: #e0e0e0;
}

.close-btn {
  background: #FF4C4C;
  color: white;
}

.window.maximized {
  border-radius: 0;
  box-shadow: none;
}

#taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: #c0c0c0;
  border-top: 2px solid #808080;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  box-sizing: border-box;
  z-index: 20;
}

#start-btn {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 12px;
  cursor: pointer;
}

#start-btn:hover {
  background: linear-gradient(to bottom, #FF4C4C, #c0c0c0);
}

#taskbar-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  padding: 0 8px;
}

.taskbar-tab {
  background: #e0e0e0;
  border: 2px inset #fff;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.taskbar-tab.active {
  background: #d0d0d0;
  border: 2px outset #999;
}

#taskbar-right {
  color: black;
  font-size: 14px;
}

@keyframes minimizeAnimation {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.5) translateY(200px);
    opacity: 0;
  }
}

.window.minimizing {
  animation: minimizeAnimation 0.25s ease forwards;
  pointer-events: none;
}

@keyframes closeAnimation {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0;
  }
}

.window.closing {
  animation: closeAnimation 0.2s ease forwards;
  pointer-events: none;
}

@keyframes maximizePop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes restorePop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

.window.animating-pop {
  animation: maximizePop 0.3s ease;
}

.window.animating-restore {
  animation: restorePop 0.3s ease;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 6px red;
  }

  50% {
    box-shadow: 0 0 14px red;
  }

  100% {
    box-shadow: 0 0 6px red;
  }
}

/* CRT Screen Effect */
.crt-effect {
  position: relative;
  overflow: hidden;
  filter: contrast(1.15) brightness(1.05) saturate(1.25);
}

.crt-effect::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(to bottom,
      rgba(0, 0, 0, 0.05),
      rgba(0, 0, 0, 0.05) 1px,
      transparent 1px,
      transparent 2px);
  pointer-events: none;
  z-index: 9999;
}

@keyframes crt-flicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.98;
  }
}

.crt-effect {
  animation: crt-flicker 0.15s infinite;
}

/* Playable games library */
.game-library-window {
  width: min(620px, calc(100% - 64px));
  height: min(430px, calc(100% - 88px));
  min-width: 430px;
  min-height: 330px;
  top: 72px;
  left: 142px;
  overflow: hidden;
}

.game-library-body {
  height: calc(100% - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #c0c0c0;
  color: #111;
  box-sizing: border-box;
  font-family: Tahoma, sans-serif;
}

.game-library-menu {
  min-height: 22px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
  font-size: 11px;
  box-sizing: border-box;
}

.game-library-heading {
  min-height: 57px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #d4d0c8;
  box-sizing: border-box;
}

.game-library-heading img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.game-library-heading h3 {
  margin: 0 0 3px;
  color: #111;
  font: bold 13px Tahoma, sans-serif;
}

.game-library-heading p {
  margin: 0;
  color: #444;
  font-size: 10px;
}

.game-library-shelf {
  min-height: 0;
  margin: 6px;
  flex: 1;
  overflow: auto;
  border: 2px inset #fff;
  background: #fff;
}

.game-library-grid {
  min-height: 100%;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, 104px);
  align-content: start;
  align-items: start;
  gap: 15px 12px;
  box-sizing: border-box;
}

.game-library-item {
  width: 104px;
  min-width: 0;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: #111;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.game-library-item:hover,
.game-library-item:focus-visible {
  border: 1px dotted #0a246a;
  background: #dbe8ff;
  outline: none;
}

.game-library-item:active {
  background: #0a246a;
  color: #fff;
}

.game-library-cover {
  width: 70px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #333;
  background: var(--game-color, #315f9f);
  color: #fff;
  font: bold 12px Georgia, 'Times New Roman', serif;
  letter-spacing: 0.05em;
  text-shadow: 1px 1px #000;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.5), 2px 2px #808080;
  box-sizing: border-box;
}

.game-library-item strong {
  width: 100%;
  min-height: 24px;
  margin-top: 2px;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.2;
  white-space: normal;
}

.game-library-empty {
  grid-column: 1 / -1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px dotted #808080;
  background: #f5f5f5;
  color: #555;
  font-size: 10px;
  text-align: left;
}

.game-library-empty strong {
  color: #111;
  font-size: 11px;
}

.game-library-status {
  min-height: 24px;
  padding: 2px 4px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 3px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  background: #c0c0c0;
  color: #333;
  font-size: 9px;
  box-sizing: border-box;
}

.game-library-status span {
  padding: 3px 5px;
  overflow: hidden;
  border: 1px inset #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .game-library-window {
    width: calc(100% - 16px);
    height: calc(100% - 58px);
    min-width: 0;
    min-height: 0;
    top: 8px;
    left: 8px;
  }
}

@media (max-width: 420px) {
  .game-library-heading p {
    display: none;
  }

  .game-library-grid {
    grid-template-columns: repeat(auto-fill, 88px);
    gap: 10px;
  }

  .game-library-item {
    width: 88px;
  }
}

/* Web portfolio browser */
.browser-window {
  width: min(720px, calc(100% - 64px));
  height: min(500px, calc(100% - 90px));
  min-width: 420px;
  min-height: 340px;
  top: 54px;
  left: 110px;
  overflow: hidden;
}

.browser-window-body {
  height: calc(100% - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ece9d8;
  box-sizing: border-box;
  font-family: Tahoma, sans-serif;
}

.browser-menu {
  display: flex;
  gap: 18px;
  padding: 4px 8px;
  border-bottom: 1px solid #aca899;
  color: #1b1b1b;
  font-size: 12px;
  flex: 0 0 auto;
}

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #aca899;
  background: #ece9d8;
  flex: 0 0 auto;
}

.browser-tool {
  min-width: 54px;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 1px solid transparent;
  background: transparent;
  color: #1b1b1b;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}

.browser-tool span:first-child {
  color: #227522;
  font-size: 24px;
  line-height: 22px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-shadow: 1px 1px #fff;
}

.browser-tool:hover:not(:disabled),
.browser-tool:focus-visible {
  border-color: #aca899;
  background: #f7f5ec;
  outline: none;
}

.browser-tool:active:not(:disabled) {
  border-style: inset;
  background: #dedbd0;
}

.browser-tool:disabled {
  color: #8c8c8c;
  cursor: default;
}

.browser-tool:disabled span:first-child {
  color: #9a9a9a;
}

.browser-address-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-bottom: 1px solid #aca899;
  background: #ece9d8;
  font-size: 11px;
  flex: 0 0 auto;
}

.browser-address-row label {
  color: #333;
}

.browser-address-box {
  min-width: 0;
  height: 24px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 5px;
  border: 2px inset #fff;
  background: #fff;
  box-sizing: border-box;
}

.browser-address-box span {
  font-size: 13px;
}

.browser-address-box input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font: 12px Tahoma, sans-serif;
}

#browser-go {
  height: 24px;
  padding: 0 10px;
  border: 2px outset #fff;
  background: #ece9d8;
  font: 11px Tahoma, sans-serif;
  cursor: pointer;
}

#browser-go:active {
  border-style: inset;
}

.browser-links-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 23px;
  padding: 0 8px;
  border-bottom: 1px solid #aca899;
  background: #ece9d8;
  color: #333;
  font-size: 11px;
  flex: 0 0 auto;
}

.browser-links-bar strong {
  padding-right: 8px;
  border-right: 1px solid #aca899;
  font-weight: normal;
}

.browser-page {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background:
    linear-gradient(135deg, rgba(27, 70, 145, 0.07) 0, rgba(27, 70, 145, 0) 220px),
    #fff;
}

.browser-page-heading {
  padding: 22px 24px 16px;
  border-bottom: 1px dotted #9ba8bc;
  background: linear-gradient(to right, #edf4ff, #fff 70%);
}

.browser-page-eyebrow {
  color: #5d6c80;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.14em;
}

.browser-page-heading h3 {
  margin: 4px 0 5px;
  color: #174785;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  line-height: 1.15;
  font-weight: normal;
}

.browser-page-heading p {
  max-width: 520px;
  margin: 0;
  color: #3f4650;
  font-size: 12px;
  line-height: 1.5;
}

.pinned-sites {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px 24px;
}

.pinned-site {
  min-height: 150px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #b8c4d5;
  background: #f5f8fc;
  color: #111;
  text-decoration: none;
  box-shadow: 2px 2px 0 rgba(23, 71, 133, 0.13);
}

.pinned-site:hover,
.pinned-site:focus-visible {
  border-color: #174785;
  background: #fff;
  outline: 2px solid #f5c400;
  outline-offset: -3px;
}

.pinned-site-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #173d73;
  background: var(--pin-color, #2e66aa);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: bold;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.45);
}

.pinned-site-type {
  color: #58677b;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pinned-site strong {
  color: #174785;
  font-size: 13px;
  line-height: 1.25;
}

.pinned-site p {
  margin: 0;
  color: #444b55;
  font-size: 11px;
  line-height: 1.45;
}

.pinned-site-link {
  margin-top: auto;
  color: #174785;
  font-size: 11px;
  text-decoration: underline;
}

.browser-empty {
  grid-column: 1 / -1;
  min-height: 116px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px dashed #8fa3be;
  background: #f7f9fc;
  color: #4b5664;
}

.browser-empty-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #7b8fa8;
  background: #e7edf5;
  color: #174785;
  font: bold 24px Georgia, serif;
}

.browser-empty strong {
  display: block;
  margin-bottom: 4px;
  color: #174785;
  font-size: 13px;
}

.browser-empty p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.browser-status {
  min-height: 22px;
  margin-top: auto;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  border-top: 1px solid #aca899;
  background: #ece9d8;
  color: #333;
  font-size: 10px;
  flex: 0 0 auto;
}

.browser-page.is-refreshing {
  opacity: 0.72;
}

@media (max-width: 700px) {
  .browser-window {
    width: calc(100% - 16px);
    height: calc(100% - 58px);
    min-width: 0;
    min-height: 0;
    top: 8px;
    left: 8px;
  }

  .browser-menu {
    gap: 11px;
  }

  .browser-toolbar {
    padding-block: 3px;
  }

  .browser-tool {
    min-width: 46px;
  }

  .browser-tool span:first-child {
    font-size: 20px;
  }

  .pinned-sites {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .browser-page-heading {
    padding: 16px 14px 12px;
  }
}

@media (max-width: 480px) {

  .browser-menu span:nth-child(4),
  .browser-menu span:nth-child(5) {
    display: none;
  }

  .browser-address-row label,
  .browser-links-bar {
    display: none;
  }

  .pinned-sites {
    grid-template-columns: 1fr;
  }
}

/* Classic presentation editor */
.about-window {
  width: min(760px, calc(100% - 48px));
  height: min(540px, calc(100% - 62px));
  min-width: 570px;
  min-height: 430px;
  top: 20px;
  left: 72px;
  overflow: hidden;
}

.powerpoint-body {
  height: calc(100% - 40px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #c0c0c0;
  color: #111;
  box-sizing: border-box;
  font-family: Tahoma, sans-serif;
}

.powerpoint-menu {
  padding: 4px 7px;
  display: flex;
  gap: 15px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
  font-size: 11px;
  white-space: nowrap;
}

.powerpoint-toolbar {
  min-height: 48px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}

.powerpoint-tool {
  min-width: 47px;
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 1px solid transparent;
  background: transparent;
  color: #111;
  font: 10px Tahoma, sans-serif;
  cursor: pointer;
}

.powerpoint-tool>span {
  color: #174785;
  font: bold 19px/19px Arial, sans-serif;
  text-shadow: 1px 1px #fff;
}

.powerpoint-tool small {
  font: 9px Tahoma, sans-serif;
}

.powerpoint-tool:hover:not(:disabled),
.powerpoint-tool:focus-visible {
  border: 1px outset #fff;
  background: #d4d0c8;
  outline: none;
}

.powerpoint-tool:active:not(:disabled) {
  border-style: inset;
}

.powerpoint-tool:disabled {
  color: #777;
  cursor: default;
}

.powerpoint-tool:disabled>span {
  color: #8b8b8b;
}

.powerpoint-present-tool>span {
  color: #117c28;
}

.powerpoint-toolbar-divider {
  width: 2px;
  height: 36px;
  margin: 0 3px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
}

.powerpoint-formatbar {
  min-height: 27px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
  font-size: 10px;
  box-sizing: border-box;
}

.powerpoint-formatbar>span:not(.powerpoint-format-spacer) {
  min-width: 86px;
  height: 19px;
  padding: 2px 5px;
  border: 2px inset #fff;
  background: #fff;
  box-sizing: border-box;
}

.powerpoint-formatbar>span:nth-child(2) {
  min-width: 38px;
}

.powerpoint-formatbar button {
  width: 25px;
  height: 21px;
  padding: 0;
  border: 1px outset #fff;
  background: #c0c0c0;
  color: #111;
  font: 11px Tahoma, sans-serif;
}

.powerpoint-format-spacer {
  flex: 1;
}

.powerpoint-editor {
  min-height: 0;
  flex: 1;
  display: flex;
  overflow: hidden;
  border-top: 1px solid #fff;
}

.powerpoint-thumbnails {
  width: 132px;
  padding: 0 5px 8px;
  flex: 0 0 auto;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 2px groove #fff;
  background: #d4d0c8;
  box-sizing: border-box;
}

.powerpoint-outline-tabs {
  margin: 0 -5px 6px;
  height: 26px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}

.powerpoint-outline-tabs span {
  padding: 5px 8px 4px;
  border-right: 1px solid #808080;
  color: #333;
  font-size: 9px;
}

.powerpoint-outline-tabs span.active {
  border-top: 1px solid #fff;
  background: #d4d0c8;
  color: #111;
  font-weight: bold;
}

.powerpoint-thumbnail {
  width: 100%;
  margin: 0 0 7px;
  padding: 3px;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: start;
  gap: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: #222;
  cursor: pointer;
  box-sizing: border-box;
}

.powerpoint-thumbnail>b {
  font: 9px Tahoma, sans-serif;
}

.powerpoint-thumbnail:hover,
.powerpoint-thumbnail:focus-visible {
  border: 1px dotted #555;
  outline: none;
}

.powerpoint-thumbnail.active {
  border: 2px solid #174785;
  background: #ece9d8;
}

.mini-slide {
  width: 100%;
  max-width: 88px;
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  border: 1px solid #555;
  background: #fff;
  box-shadow: 1px 1px #808080;
  box-sizing: border-box;
}

.mini-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: auto;
}

.powerpoint-stage {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: auto;
  background: #747474;
  box-sizing: border-box;
  container-type: size;
}

.powerpoint-slide {
  width: min(540px, 100cqw, calc(100cqh * 4 / 3));
  height: auto;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: #fff;
  box-shadow: 2px 2px 0 #333;
  box-sizing: border-box;
}

.powerpoint-slide.active {
  display: block;
}

.powerpoint-slide-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
}

.ref-slide-link-overlay {
  height: 7%;
  position: absolute;
  right: 7%;
  bottom: 7%;
  left: 44%;
  border: 1px solid transparent;
}

.ref-slide-link-overlay:hover,
.ref-slide-link-overlay:focus-visible {
  border-color: rgba(255, 255, 255, 0.8);
  outline: 1px dotted #fff;
  outline-offset: 2px;
}

.powerpoint-show-controls {
  display: none;
}

.powerpoint-notes {
  min-height: 38px;
  padding: 6px 8px;
  flex: 0 0 auto;
  overflow: auto;
  border: 2px inset #fff;
  background: #fff;
  color: #666;
  font-size: 10px;
  box-sizing: border-box;
}

.powerpoint-notes:focus {
  color: #111;
  outline: none;
}

.powerpoint-statusbar {
  min-height: 21px;
  padding: 2px 4px;
  display: grid;
  grid-template-columns: 110px 1fr 120px;
  gap: 3px;
  flex: 0 0 auto;
  border-top: 1px solid #fff;
  background: #c0c0c0;
  box-sizing: border-box;
}

.powerpoint-statusbar span {
  padding: 2px 5px;
  overflow: hidden;
  border: 1px inset #fff;
  color: #333;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.about-window.slide-show-mode {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100% - 40px) !important;
  box-shadow: none;
}

.slide-show-mode .powerpoint-menu,
.slide-show-mode .powerpoint-toolbar,
.slide-show-mode .powerpoint-formatbar,
.slide-show-mode .powerpoint-thumbnails,
.slide-show-mode .powerpoint-notes,
.slide-show-mode .powerpoint-statusbar {
  display: none;
}

.slide-show-mode .powerpoint-editor {
  display: block;
  flex: 1;
}

.slide-show-mode .powerpoint-stage {
  width: 100%;
  height: 100%;
  padding: 8px;
  background: #000;
}

.slide-show-mode .powerpoint-slide {
  width: min(100cqw, calc(100cqh * 4 / 3));
  height: auto;
  max-width: none;
}

.slide-show-mode .powerpoint-show-controls {
  display: flex;
  gap: 5px;
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
}

.powerpoint-show-controls button {
  padding: 5px 9px;
  border: 2px outset #fff;
  background: #c0c0c0;
  color: #111;
  font: 10px Tahoma, sans-serif;
  cursor: pointer;
}

@media (max-width: 680px) {
  .about-window {
    width: calc(100% - 16px);
    height: calc(100% - 58px);
    min-width: 0;
    min-height: 0;
    top: 8px;
    left: 8px;
  }

  .powerpoint-menu {
    gap: 10px;
    overflow: hidden;
  }

  .powerpoint-menu span:nth-child(5),
  .powerpoint-menu span:nth-child(6),
  .powerpoint-menu span:nth-child(8) {
    display: none;
  }

  .powerpoint-formatbar>span:last-child {
    display: none;
  }

  .powerpoint-thumbnails {
    width: 108px;
  }

  .mini-slide {
    width: 68px;
    height: 51px;
  }

  .powerpoint-statusbar {
    grid-template-columns: 90px 1fr;
  }

  .powerpoint-statusbar span:last-child {
    display: none;
  }
}

@media (max-width: 460px) {
  .powerpoint-toolbar {
    min-height: 41px;
  }

  .powerpoint-tool {
    min-width: 40px;
  }

  .powerpoint-tool>span {
    font-size: 16px;
  }

  .powerpoint-tool small {
    display: none;
  }

  .powerpoint-thumbnails {
    width: 82px;
  }

  .powerpoint-thumbnail {
    grid-template-columns: 11px minmax(0, 1fr);
  }

  .mini-slide {
    width: 50px;
    height: 38px;
    padding: 3px;
  }

  .slide-project-list {
    gap: 4px;
  }

  .slide-project-list>div {
    min-height: 78px;
    padding: 5px;
  }
}