.notepad-window {
  left: clamp(150px, 18vw, 310px);
  top: clamp(72px, 12vh, 140px);
  width: min(680px, 74vw);
  height: min(510px, calc(100vh - var(--taskbar-h) - 58px));
  min-width: 460px;
  min-height: 330px;
  z-index: 10;
}

.notepad-window.is-active {
  z-index: 14;
}

.notepad-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) 23px;
  height: 100%;
  min-height: 0;
  color: #111;
  background: #f2f6fb;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 12px;
}

.notepad-menu {
  display: flex;
  align-items: center;
  gap: 1px;
  min-height: 24px;
  padding: 1px 6px;
  background: linear-gradient(#fbfdff, #dcebf7);
  border-bottom: 1px solid #aebfd1;
}

.notepad-menu button,
.notepad-toolbar button {
  color: #17324b;
  font: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
}

.notepad-menu button {
  min-height: 21px;
  padding: 2px 8px;
}

.notepad-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 7px;
  overflow-x: auto;
  background: linear-gradient(#f7fbff, #e2edf7);
  border-bottom: 1px solid #bccbd9;
}

.notepad-toolbar button {
  min-height: 23px;
  padding: 2px 8px;
  white-space: nowrap;
  background: linear-gradient(#ffffff, #eaf3fb);
  border-color: #a9bdcf;
}

.notepad-menu button:hover,
.notepad-menu button:focus-visible,
.notepad-toolbar button:hover,
.notepad-toolbar button:focus-visible {
  border-color: #82b4dc;
  background: linear-gradient(#ffffff, #def1fd 50%, #c1e2f5);
  outline: 0;
}

.notepad-editor-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.notepad-editor {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 8px 9px;
  resize: none;
  color: #050505;
  background: #fff;
  border: 0;
  border-top: 1px solid #d0d7df;
  outline: 0;
  font: 13px/1.38 Consolas, "Lucida Console", "Courier New", monospace;
  box-sizing: border-box;
  overflow: auto;
  scrollbar-color: #a6bdd0 #edf4fb;
}

.notepad-shell[data-notepad-wrap="false"] .notepad-editor {
  white-space: pre;
  overflow-wrap: normal;
}

.notepad-shell[data-notepad-wrap="true"] .notepad-editor {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notepad-statusbar {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  align-items: center;
  min-height: 23px;
  color: #263f55;
  background: linear-gradient(#f4f9fd, #dcebf6);
  border-top: 1px solid #aebfd0;
}

.notepad-statusbar span {
  min-width: 0;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 1px solid rgba(132, 159, 181, .52);
}

.notepad-statusbar span:first-child {
  border-left: 0;
}

@media (max-width: 720px) {
  .notepad-window {
    width: min(680px, calc(100vw - 18px));
    min-width: 292px;
    height: min(510px, calc(100vh - var(--taskbar-h) - 24px));
  }

  .notepad-shell {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .notepad-toolbar {
    min-height: 34px;
  }

  .notepad-statusbar {
    grid-template-columns: 1fr 1fr;
  }
}
