html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Tahoma, Arial, sans-serif;
  color: #000;
  background: #008080;
}

body.home {
  overflow: hidden;
  height: 100dvh;
}

a {
  color: #000080;
}

.desktop {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02)),
    #008080;
}

.desktop-icons {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 112px;
  padding: 18px 12px 68px;
}

.desktop-icon {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 4px;
  font: inherit;
  min-height: 74px;
  text-align: center;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  outline: 1px dotted #fff;
  background: rgba(0, 0, 128, 0.22);
}

.icon-image {
  font-size: 30px;
  line-height: 1;
}

.icon-label {
  font-size: 13px;
  line-height: 1.2;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.windows-layer {
  position: absolute;
  inset: 0 0 42px 0;
  pointer-events: none;
  z-index: 10;
}

.win95-window {
  position: absolute;
  display: none;
  pointer-events: auto;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 1px 1px 0 #000;
  min-width: 320px;
  min-height: 220px;
  max-width: min(920px, calc(100vw - 20px));
  max-height: calc(100dvh - 52px);
  overflow: hidden;
}

.win95-window.active {
  display: flex;
  flex-direction: column;
}

.win95-window.focused .title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
}

.win95-window:not(.focused) .title-bar {
  background: linear-gradient(90deg, #7b7b7b, #a9a9a9);
}

.win95-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100dvh - 42px) !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 42px) !important;
}

.title-bar {
  height: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  cursor: move;
  user-select: none;
  flex: 0 0 28px;
}

.title-bar-text {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}

.title-bar-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.title-bar-controls button,
.start-button,
.taskbar-button,
.start-item {
  font: inherit;
  font-size: 12px;
  background: #c0c0c0;
  color: #000;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  border-radius: 0;
  appearance: none;
  cursor: pointer;
}

.title-bar-controls button:active,
.start-button:active,
.taskbar-button:active,
.start-item:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.title-bar-controls button {
  width: 24px;
  height: 22px;
  padding: 0;
  line-height: 1;
}

.window-body {
  padding: 12px 12px 36px;
  background: #c0c0c0;
  color: #000;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  -webkit-overflow-scrolling: touch;
}

.window-article {
  min-height: min-content;
}

.window-article > *:last-child {
  margin-bottom: 0;
}

.window-body img,
.window-body iframe,
.window-body video,
.window-body embed,
.window-body object {
  max-width: 100%;
  height: auto;
}

.win95-window.maximized .window-body {
  height: auto;
}

.window-article-title {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.08;
}

.post-list {
  margin: 0;
  padding-left: 18px;
}

.post-list li + li {
  margin-top: 8px;
}

.post-link-button {
  font: inherit;
  font-size: 16px;
  color: #000080;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.loading-text {
  margin: 0;
  font-style: italic;
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  z-index: 5000;
}

.start-button {
  min-width: 82px;
  height: 32px;
  padding: 0 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.taskbar-windows {
  display: flex;
  flex: 1;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-width: 0;
}

.taskbar-windows::-webkit-scrollbar {
  display: none;
}

.taskbar-button {
  min-width: 140px;
  max-width: 220px;
  height: 32px;
  padding: 0 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.taskbar-button.is-active {
  box-shadow: inset 1px 1px 0 #404040;
  border-top: 2px solid #7b7b7b;
  border-left: 2px solid #7b7b7b;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.taskbar-clock {
  min-width: 86px;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  border-top: 2px solid #7b7b7b;
  border-left: 2px solid #7b7b7b;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
}

.start-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: 42px;
  width: 250px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 #000;
  z-index: 6000;
}

.start-menu.open {
  display: flex;
}

.start-menu-sidebar {
  width: 36px;
  background: linear-gradient(180deg, #2b2b2b, #6b6b6b);
  color: #fff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: 700;
  padding: 10px 0;
  flex-shrink: 0;
}

.start-menu-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  width: 100%;
}

.start-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.start-menu-list li {
  margin: 0;
  padding: 0;
}

.start-menu .menu-item a,
.start-item {
  width: 100%;
  display: block;
  text-align: left;
  padding: 8px 10px;
  text-decoration: none;
  color: #000;
  background: #c0c0c0;
}

.start-item:hover,
.start-menu .menu-item a:hover {
  background: #000080;
  color: #fff;
}

.content-page-fallback {
  max-width: 860px;
  margin: 40px auto;
  background: #fff;
  padding: 24px;
  border: 2px solid #404040;
}

.fallback-title {
  margin-top: 0;
  line-height: 1.1;
}

.fallback-meta {
  color: #555;
  margin-bottom: 16px;
  font-size: 14px;
}

.admin-bar .desktop {
  height: calc(100dvh - 32px);
  min-height: calc(100dvh - 32px);
}

@media (max-width: 900px) {
  .desktop-icons {
    width: 96px;
    gap: 12px;
    padding-inline: 10px;
  }

  .win95-window {
    width: calc(100vw - 20px) !important;
    left: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }
}

@media (max-width: 782px) {
  .admin-bar .desktop {
    height: calc(100dvh - 46px);
    min-height: calc(100dvh - 46px);
  }
}

@media (max-width: 640px) {
  .taskbar {
    gap: 5px;
  }

  .start-button {
    min-width: 64px;
    padding: 0 8px;
  }

  .taskbar-button {
    min-width: 108px;
    max-width: 160px;
  }

  .taskbar-clock {
    min-width: 72px;
    font-size: 11px;
  }

  .window-article-title {
    font-size: 24px;
  }
}
