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

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

a {
  color: #000080;
}

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

.desktop-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px 70px;
  width: 110px;
}

.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;
}

.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-align: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.45);
}

.windows-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.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(900px, calc(100vw - 24px));
  max-height: calc(100vh - 70px);
}

.win95-window.active {
  display: block;
}

.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: 100vw !important;
  height: calc(100vh - 42px) !important;
  max-width: 100vw !important;
  max-height: calc(100vh - 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;
}

.title-bar-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
  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;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  color: #000;
  cursor: pointer;
  border-radius: 0;
  appearance: none;
}

.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;
  background: #c0c0c0;
  color: #000;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 160px;
}

.win95-window.maximized .window-body {
  height: calc(100vh - 70px);
  max-height: calc(100vh - 70px);
}

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

.window-article p:first-child {
  margin-top: 0;
}

.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;
  gap: 8px;
  align-items: center;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  z-index: 5000;
}

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

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

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

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

.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;
  font-size: 12px;
  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;
}

.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;
  letter-spacing: 0.4px;
  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: #ffffff;
  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;
}

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

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

@media (max-width: 640px) {
  .desktop {
    height: 100dvh;
  }

  .taskbar {
    gap: 5px;
  }

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

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

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

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