/* System applications, tray panels, settings, themes and screensavers. */
.noscript-fallback {
  position: fixed;
  inset: 1rem;
  z-index: 20000;
  max-width: 44rem;
  margin: auto;
  padding: 2rem;
  border: 2px solid #174da7;
  background: #f7f4e8;
  color: #172033;
  box-shadow: var(--shadow);
}

.notepad-workspace {
  min-height: 27rem;
  display: grid;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(20rem, 2fr);
  border: 1px solid #7f9db9;
  background: white;
}

.poetry-index {
  min-width: 0;
  padding: 0.7rem;
  border-right: 1px solid #aebbd0;
  background: linear-gradient(180deg, #edf5ff, #dce9fb);
}

.poetry-index label {
  display: block;
  margin-bottom: 0.45rem;
  color: #193b78;
  font-weight: 700;
}

.poetry-index input {
  width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid #7f9db9;
  background: white;
}

.poetry-index__list {
  max-height: 23rem;
  overflow: auto;
}

.poetry-index__list button {
  width: 100%;
  padding: 0.42rem 0.48rem;
  border: 1px solid transparent;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.poetry-index__list button:hover,
.poetry-index__list button:focus-visible {
  border-color: #316ac5;
  background: #316ac5;
  color: white;
}

.poetry-index__empty {
  color: #5d6880;
}

.notepad-workspace .notepad-sheet {
  min-width: 0;
  margin: 0;
  padding: 1.1rem;
  border: 0;
  overflow: auto;
}

.project-viewer-window .window-content {
  background:
    linear-gradient(90deg, rgba(49, 106, 197, 0.06) 1px, transparent 1px),
    linear-gradient(#ffffff, #eef5ff);
  background-size: 24px 24px, auto;
}

.project-viewer-window {
  height: min(34rem, calc(100dvh - 5.25rem));
}

.image-viewer-window .window-content {
  padding: 0;
  overflow: hidden;
  background: #2a2a2a;
}

.image-viewer {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.image-viewer__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  background:
    linear-gradient(45deg, #343434 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(-45deg, #343434 25%, transparent 25%) 0 0 / 20px 20px,
    #292929;
}

.image-viewer__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 0 1px #111, 0 10px 30px rgba(0, 0, 0, 0.38);
}

.image-viewer__toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem;
  border-top: 1px solid #97a5bd;
  background: linear-gradient(180deg, #f9fbff, #dbe7f7);
  color: #19345f;
}

.image-viewer__toolbar > span {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menubar {
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.25rem;
  border-bottom: 1px solid #b8b4a3;
  background: #ece9d8;
}

.app-menubar button {
  padding: 0.28rem 0.55rem;
  border: 1px solid transparent;
  background: transparent;
  color: #172033;
  cursor: pointer;
}

.app-menubar button:hover,
.app-menubar button:focus-visible {
  border-color: #316ac5;
  background: #d9e8fb;
}

.app-statusbar {
  min-height: 1.45rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.18rem 0.45rem;
  border-top: 1px solid #aca899;
  background: #ece9d8;
  color: #34415a;
  font-size: 0.78rem;
}

.text-editor-window .window-content,
.paint-window .window-content,
.command-window .window-content {
  padding: 0;
}

.text-editor {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.text-editor textarea {
  width: 100%;
  min-height: 20rem;
  padding: 0.65rem;
  resize: none;
  border: 0;
  outline: 0;
  background: white;
  color: #111;
  font: 1rem/1.42 "Lucida Console", "Courier New", monospace;
  user-select: text;
}

.text-editor.is-nowrap textarea {
  white-space: pre;
  overflow: auto;
}

.paint-app {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: #c0c0c0;
}

.paint-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  gap: 0.35rem;
  padding: 0.35rem;
}

.paint-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
  gap: 0.12rem;
}

.paint-tools button,
.paint-palette button {
  min-width: 0;
  border: 2px outset #ececec;
  background: #d6d6d6;
  cursor: pointer;
}

.paint-tools button {
  aspect-ratio: 1;
  font-size: 1.15rem;
}

.paint-tools button.is-selected {
  border-style: inset;
  background: #fff;
}

.paint-stage {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 2px inset #eee;
  background: #808080;
}

.paint-stage canvas {
  display: block;
  width: min(900px, 100%);
  height: auto;
  background: white;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.paint-palette {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.35rem 0.55rem;
  border-top: 1px solid #808080;
  background: #c0c0c0;
}

.paint-palette button,
.paint-current-color {
  width: 1.45rem;
  height: 1.45rem;
}

.paint-palette button {
  background: var(--swatch);
}

.paint-current-color {
  margin-right: 0.45rem;
  border: 3px double white;
  outline: 1px solid #222;
  background: #000;
}

.calculator-app {
  padding: 0.65rem;
  background: #ece9d8;
}

.calculator-window {
  height: 20rem;
  min-height: 18rem;
}

.calculator-app output {
  min-height: 2.35rem;
  display: block;
  margin-bottom: 0.65rem;
  padding: 0.4rem 0.55rem;
  overflow: hidden;
  border: 2px inset #fff;
  background: white;
  color: #10234d;
  text-align: right;
  font: 1.3rem "Lucida Console", monospace;
  white-space: nowrap;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.calculator-grid button {
  min-height: 2.4rem;
  border: 2px outset #fff;
  background: #ece9d8;
  color: #164f9e;
  cursor: pointer;
}

.calculator-grid button[data-calc="equals"] {
  grid-row: span 2;
}

.control-panel-app {
  min-height: 0;
  background: linear-gradient(110deg, #eff5ff, #fff 48%, #eef4ff);
}

.control-panel-hero {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #cad8ee;
  background: linear-gradient(90deg, #dceaff, transparent);
}

.control-panel-hero h2,
.control-panel-hero p {
  margin: 0;
}

.control-panel-hero p {
  margin-top: 0.25rem;
  color: #52627c;
}

.control-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
  padding: 1rem;
}

.control-panel-grid > button {
  min-width: 0;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: #154eb1;
  text-align: left;
  cursor: pointer;
}

.control-panel-grid > button:hover,
.control-panel-grid > button:focus-visible {
  border-color: #9ab8eb;
  background: #e8f1ff;
}

.control-panel-grid img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.control-panel-grid span,
.control-panel-grid small {
  display: block;
}

.control-panel-grid small {
  margin-top: 0.2rem;
  color: #59677e;
}

.display-properties-app {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0.55rem;
  background: #ece9d8;
}

.property-tabs {
  display: flex;
  align-items: end;
  overflow-x: auto;
}

.property-tabs button {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border: 1px solid #8f8b7a;
  border-bottom: 0;
  border-radius: 0.3rem 0.3rem 0 0;
  background: #ddd9c8;
  cursor: pointer;
}

.property-tabs button.is-active {
  position: relative;
  z-index: 1;
  padding-top: 0.5rem;
  background: white;
}

.property-page {
  display: none;
  min-height: 0;
  padding: 1rem;
  overflow: auto;
  border: 1px solid #8f8b7a;
  background: white;
}

.property-page.is-active {
  display: block;
}

.property-page label {
  display: grid;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.property-page select,
.property-page input[type="number"] {
  width: 100%;
  padding: 0.35rem;
  border: 1px solid #7f9db9;
  background: white;
}

.property-page .setting-check {
  grid-template-columns: auto 1fr;
  justify-content: start;
}

.monitor-preview,
.settings-monitor {
  width: 13rem;
  margin: 0 auto 1rem;
  padding: 0.9rem 0.9rem 1.5rem;
  border: 0.65rem solid #a8a8a8;
  border-radius: 0.45rem;
  background: #222;
  box-shadow: 0 0.65rem 0 -0.35rem #777;
}

.monitor-preview > div,
.settings-monitor {
  color: white;
  text-align: center;
}

.monitor-preview > div {
  min-height: 5.2rem;
  display: grid;
  place-items: center;
  background: linear-gradient(#62baff, #2a7edd 57%, #66bf3b 58%);
  font-weight: 700;
}

.wallpaper-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.wallpaper-picker button {
  min-width: 0;
  padding: 0.35rem;
  border: 1px solid #9baac1;
  background: #edf4ff;
  cursor: pointer;
}

.wallpaper-picker img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.wallpaper-picker span {
  display: block;
  padding-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  padding-top: 0.65rem;
}

.system-properties-app {
  background: linear-gradient(150deg, #fff, #eef5ff);
}

.system-properties-window {
  height: min(31rem, calc(100dvh - 5.25rem));
}

.system-brand {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid #c8d4e7;
}

.system-brand__logo {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border-radius: 50% 45% 50% 40%;
  background: linear-gradient(135deg, #1878e8, #5ebf3e 55%, #f4b021);
  color: white;
  font-size: 1.65rem;
  font-style: italic;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}

.system-brand strong,
.system-brand span {
  display: block;
}

.system-specs {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem 0.8rem;
  margin: 1rem 0;
}

.system-specs dt {
  color: #52627a;
  font-weight: 700;
}

.system-specs dd {
  margin: 0;
}

.help-app > header {
  margin: -0.85rem -0.85rem 1rem;
  padding: 1.2rem;
  background: linear-gradient(110deg, #215fc2, #6aa6ef);
  color: white;
}

.help-app h2,
.help-app header p {
  margin: 0;
}

.help-app header p {
  margin-top: 0.3rem;
}

.tour-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.tour-grid button {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid #a9bee0;
  border-radius: 0.4rem;
  background: linear-gradient(#fff, #eaf3ff);
  color: #194d9f;
  text-align: left;
  cursor: pointer;
}

.tour-grid button:hover {
  border-color: #316ac5;
  background: #e1efff;
}

.tour-grid span {
  color: #52627a;
}

.shortcut-sheet {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid #d0d8e6;
  background: #fffef3;
}

.shortcut-sheet h3,
.shortcut-sheet p {
  margin: 0;
}

.shortcut-sheet p {
  margin-top: 0.35rem;
  line-height: 1.45;
}

kbd {
  padding: 0.08rem 0.3rem;
  border: 1px outset #fff;
  border-radius: 0.18rem;
  background: #ece9d8;
  box-shadow: 0 1px 1px rgba(0,0,0,.14);
  font-family: inherit;
}

.run-app {
  display: grid;
  grid-template-columns: 3.3rem 1fr;
  gap: 0.65rem 0.8rem;
  align-items: start;
}

.run-window {
  height: 16rem;
  min-height: 16rem;
}

.run-app > img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
}

.run-app > p {
  margin: 0;
}

.run-app form {
  grid-column: 1 / -1;
}

.run-app label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.run-app input {
  width: 100%;
  padding: 0.36rem;
  border: 1px solid #7f9db9;
  user-select: text;
}

.run-feedback {
  min-height: 1.2rem;
  padding: 0.35rem 0;
  color: #5b6576;
  font-size: 0.85rem;
}

.run-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.command-bar {
  background: linear-gradient(#4c4c4c, #161616);
}

.command-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: #050505;
  color: #eee;
  font: 0.92rem/1.35 "Lucida Console", "Courier New", monospace;
  user-select: text;
}

.command-app > div {
  padding: 0.55rem;
  white-space: pre-wrap;
}

.command-app form {
  margin-top: auto;
  padding: 0 0.55rem 0.55rem;
}

.command-app label {
  display: flex;
  align-items: center;
}

.command-app input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: inherit;
  user-select: text;
}

.tray-button,
.tray-clock {
  position: relative;
  min-width: 1.45rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0.12rem;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

.tray-button:hover,
.tray-clock:hover,
.tray-button.is-open,
.tray-clock.is-open {
  background: rgba(255,255,255,.18);
}

.tray-button img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
}

.tray-badge {
  position: absolute;
  top: -0.1rem;
  right: -0.2rem;
  min-width: 0.85rem;
  height: 0.85rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f24b34;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
}

.tray-clock {
  min-width: 3.1rem;
}

.tray-popup {
  position: fixed;
  right: 0.5rem;
  bottom: 3.2rem;
  z-index: 10030;
  width: 15rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid #164d9c;
  border-radius: 0.25rem;
  background: linear-gradient(#fff, #e5f0ff);
  box-shadow: 0 8px 22px rgba(3,24,68,.32);
}

.tray-popup strong,
.tray-popup span,
.tray-popup small {
  display: block;
}

.tray-popup input[type="range"] {
  width: 100%;
}

.presence-line i {
  width: 0.6rem;
  height: 0.6rem;
  display: inline-block;
  border-radius: 50%;
  background: #43b733;
}

.tray-popup--updates {
  width: 20rem;
}

.tray-popup--updates > button {
  display: block;
  padding: 0.55rem;
  border: 1px solid #b6cae9;
  background: white;
  color: #194f9f;
  text-align: left;
  cursor: pointer;
}

.tray-popup--updates > button:hover {
  background: #e5f0ff;
}

.tray-popup--calendar {
  width: 18rem;
}

.calendar-header {
  margin-bottom: 0.45rem;
  text-align: center;
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
  text-align: center;
}

.calendar-grid span {
  padding: 0.24rem;
}

.calendar-grid .is-label {
  color: #52627a;
  font-size: 0.75rem;
  font-weight: 700;
}

.calendar-grid .is-today {
  border-radius: 50%;
  background: #245fc4;
  color: white;
  font-weight: 700;
}

.system-balloon {
  position: fixed;
  right: 1rem;
  bottom: 3.4rem;
  z-index: 10032;
  width: min(22rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #8a6c13;
  border-radius: 0.45rem;
  background: linear-gradient(#fffde1, #fff2a8);
  box-shadow: 0 8px 22px rgba(3,24,68,.28);
}

.alt-tab-switcher {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10045;
  width: min(42rem, calc(100vw - 2rem));
  padding: 1rem;
  transform: translate(-50%, -50%);
  border: 2px solid #e7f0ff;
  border-radius: 0.5rem;
  background: rgba(24,72,154,.96);
  color: white;
  box-shadow: 0 14px 40px rgba(0,0,0,.48);
}

.alt-tab-switcher > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.alt-tab-item {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 2px solid transparent;
  text-align: center;
}

.alt-tab-item.is-selected {
  border-color: white;
  background: rgba(255,255,255,.22);
}

.alt-tab-item img {
  width: 2.8rem;
  height: 2.8rem;
  object-fit: contain;
}

.taskbar-context-menu {
  position: fixed;
  z-index: 10034;
  width: 15.5rem;
  padding: 0.18rem;
  border: 1px solid #6b778a;
  background: #f7f7f7;
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}

.taskbar-context-menu button {
  width: 100%;
  padding: 0.35rem 0.65rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.taskbar-context-menu button:hover:not(:disabled) {
  background: #316ac5;
  color: white;
}

.taskbar-context-menu button:disabled {
  color: #9a9a9a;
}

.screensaver {
  position: fixed;
  inset: 0;
  z-index: 10070;
  overflow: hidden;
  background: #02060d;
  cursor: none;
}

.screensaver > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: screensaverZoom 12s ease-in-out infinite alternate;
}

.screensaver-duck {
  position: absolute;
  left: 10%;
  top: 15%;
  display: none;
  color: #f8e05f;
  font: 700 4rem "Lucida Console", monospace;
  text-shadow: 3px 3px #214c9b;
  animation: screensaverDuck 8s linear infinite alternate;
}

.screensaver.is-duck .screensaver-duck {
  display: block;
}

.screensaver.is-duck > img {
  display: none;
}

.screensaver-caption {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  background: rgba(0,0,0,.55);
  color: white;
}

@keyframes screensaverZoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

@keyframes screensaverDuck {
  from { transform: translate(0, 0) rotate(-4deg); }
  to { transform: translate(70vw, 60vh) rotate(8deg); }
}

body.theme-olive .window-bar,
body.theme-olive .taskbar,
body.theme-olive .start-menu__banner,
body.theme-olive .start-menu__footer {
  filter: hue-rotate(58deg) saturate(0.78);
}

body.theme-silver .window-bar,
body.theme-silver .taskbar,
body.theme-silver .start-menu__banner,
body.theme-silver .start-menu__footer {
  filter: grayscale(0.72) hue-rotate(175deg) brightness(1.15);
}

body.large-interface-text {
  font-size: clamp(16px, 1vw + 11px, 21px);
}

body.reduced-interface-motion *,
body.reduced-interface-motion *::before,
body.reduced-interface-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

body.crt-effect::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0, rgba(0,0,0,.08) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: multiply;
}

