body {
  margin: 0;
  min-height: 100vh;
  background: white;
  font-family: "Times New Roman", "KaiTi", serif;
  display: flex;
  justify-content: center;
  align-items: center;
}

button {
  font-family: inherit;
}

a,
.box button,
.close-button {
  color: black;
  border: 2px outset #ccc;
  background: white;
  text-decoration: none;
  cursor: pointer;
}

a:hover,
.box button:hover,
.close-button:hover {
  border: 2px inset #ccc;
  background-color: #f0f0f0;
}

.draggable {
  background: white;
  border: 4px double black;
  user-select: none;
}

.box {
  width: 220px;
  margin: 40px auto;
  text-align: center;
  line-height: 2;
  font-size: 20px;
  overflow: hidden;
}

.main-title {
  flex: 1;
  text-align: center;
}

.main-content {
  padding: 16px;
}

.menu {
  text-align: center;
  line-height: 2;
  font-size: 20px;
}

.submenu {
  overflow-y: auto;
  text-align: left;
}

.window-content,
.submenu {
  scrollbar-width: thin;
  scrollbar-color: #888 white;
}

.window-content::-webkit-scrollbar,
.submenu::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.window-content::-webkit-scrollbar-track,
.submenu::-webkit-scrollbar-track {
  background: white;
}

.window-content::-webkit-scrollbar-thumb,
.submenu::-webkit-scrollbar-thumb {
  background: #888;
  border: 2px solid white;
  border-radius: 0;
}

.window-content::-webkit-scrollbar-corner,
.submenu::-webkit-scrollbar-corner {
  background: white;
}

.box button,
a {
  padding: 2px;
  font-size: 20px;
}

.submenu a {
  display: block;
  margin: 0;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid black;
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

.submenu a:hover {
  border: 0;
  border-bottom: 1px solid black;
  background-color: #f0f0f0;
}

.window {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  width: 260px;
  min-width: 180px;
  min-height: 110px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  font-size: 18px;
  line-height: 1.8;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.directory-window {
  width: 320px;
  height: 320px;
}

.window.is-open {
  display: flex;
  flex-direction: column;
}

.window-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid black;
  padding: 2px 6px;
  font-weight: bold;
  cursor: move;
  background: #f0f0f0;
  color: black;
  font-size: 14px;
  touch-action: none;
}

.close-button {
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.window-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
  text-align: center;
}

.window-content p {
  margin: 0 0 12px;
}

.window-content a {
  display: inline-block;
}

.window-content.submenu a {
  display: block;
}

.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  touch-action: none;
}

.resize-handle::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-right: 2px solid black;
  border-bottom: 2px solid black;
}
