:root {
  --desktop: #398283;
  --white: #ffffff;
  --light-gray: #dfdfdf;
  --base-gray: #c0c0c0;
  --dark-gray: #808080;
  --black: #000000;
  --dark-blue: #000080;
  --taskbar-height: 30px;
  --win-terminal-titlebar: #202020;
  --win-terminal-bg: #0c0c0c;
  --win-terminal-fg: #02FF00;
  --win-terminal-command: #02FF00;
  --win-terminal-muted: #02FF00;
  --win-terminal-border: #2b2b2b;
  --win-terminal-accent: #ffffff;
  --win-terminal-selection: #0b5f2a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  background: var(--desktop);
  color: var(--black);
}

.desktop {
  min-height: 100vh;
  position: relative;
}

.desktop-icons {
  position: fixed;
  inset: 0 0 var(--taskbar-height) 0;
  z-index: 5;
  pointer-events: none;
}

.desktop-icon {
  position: fixed;
  width: 90px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  cursor: default;
  pointer-events: auto;
  box-shadow: none;
  min-width: 0;
  min-height: 0;
}

.desktop-icon:not(:disabled):active,
.desktop-icon:focus,
.desktop-icon:focus-visible {
  border: 1px dotted rgba(255, 255, 255, 0.75);
  box-shadow: none;
  outline: none;
}

.desktop-icon:active {
  padding: 4px;
}

.desktop-icon:active span {
  transform: none;
}

.desktop-icon.dragging {
  opacity: 0.84;
}

.icon-glyph,
.menu-icon {
  position: relative;
  display: block;
  flex: 0 0 auto;
}

.icon-glyph {
  width: 34px;
  height: 34px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  box-shadow:
    inset 1px 1px var(--white),
    inset 2px 2px var(--light-gray),
    inset -1px -1px var(--black),
    inset -2px -2px var(--dark-gray);
}

.icon-readme {
  background-image: url("/icons/address_book_pad.png");
  box-shadow: none;
}

.icon-readme::after {
  content: "";
}

.icon-terminal {
  background-image: url("/icons/console_prompt-0.png");
  background-color: transparent;
  box-shadow: none;
}

.icon-terminal::after {
  content: "";
}

.icon-folder {
  background: transparent url("/icons/directory_favorites-2.png") center/contain no-repeat;
  box-shadow: none;
}

.icon-prayer {
  background: var(--black);
}

.icon-prayer::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #02ff00;
  box-shadow: inset 0 0 0 2px var(--black);
}

.icon-prayer::after {
  content: "PRAY";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 12px;
  color: #02ff00;
  font: bold 7px Consolas, "Courier New", monospace;
  text-align: center;
}

.icon-image-file {
  background:
    linear-gradient(135deg, transparent 0 72%, #d0d0d0 72% 100%),
    #ffffff;
}

.icon-image-file::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 22px;
  height: 18px;
  background: url("/assets/desktop/implicare.png") center/cover no-repeat;
  border: 1px solid var(--black);
}

.icon-image-file::after {
  content: "PNG";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  color: var(--black);
  font: bold 6px Consolas, "Courier New", monospace;
  text-align: center;
}

.app-window {
  position: fixed;
  min-width: 260px;
  min-height: 160px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - var(--taskbar-height) - 32px);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.app-window.active-window {
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.32));
}

.app-window.is-hidden {
  display: none;
}

.app-window.is-maximized {
  top: 0 !important;
  left: 0 !important;
  right: 0;
  bottom: var(--taskbar-height);
  width: auto !important;
  height: auto !important;
}

.title-bar {
  cursor: move;
  user-select: none;
}

.title-actions {
  gap: 2px;
}

.start-btn,
#acceptBtn,
.task-btn {
  background: var(--base-gray);
  border: 0;
  box-shadow:
    inset 1px 1px var(--white),
    inset 2px 2px var(--light-gray),
    inset -1px -1px var(--black),
    inset -2px -2px var(--dark-gray);
  color: var(--black);
  font-family: inherit;
  cursor: pointer;
}

.title-actions button {
  padding: 0;
}

.title-bar-controls button[aria-label="Close"] {
  margin-left: 0;
}

.task-btn.active-task {
  box-shadow:
    inset 1px 1px var(--black),
    inset 2px 2px var(--dark-gray),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.window-body {
  flex: 1;
  overflow: auto;
  font-size: 14px;
  line-height: 1.35;
}

.window-body p {
  margin: 0 0 8px;
}

.readme-body {
  background: #e6e6e6;
  padding: 10px;
}

.readme-panel {
  background: #ffffff;
  color: #0a0a0a;
  border: 1px solid #c0c0c0;
  box-shadow:
    inset 1px 1px #f5f5f5,
    inset -1px -1px #d0d0d0;
  padding: 18px 20px;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.55;
}

.readme-panel h2 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.readme-panel p {
  margin: 0 0 14px;
  font-size: 15px;
}

.terminal-app-window {
  min-width: 320px;
  min-height: 260px;
  background: transparent;
}

.terminal-app-window.is-maximized .win-terminal {
  width: 100%;
  height: 100%;
}

.win-terminal {
  width: min(760px, 100%);
  height: min(480px, 72vh);
  background: var(--win-terminal-bg);
  border: 1px solid var(--win-terminal-border);
  color: var(--win-terminal-fg);
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
}

.terminal-app-window > .win-terminal {
  width: 100%;
  height: 100%;
}

.win-terminal--maximized {
  width: 100%;
  height: 100%;
}

.win-terminal ::selection {
  background: var(--win-terminal-selection);
  color: #ffffff;
}

.win-terminal__bar {
  height: 32px;
  background: var(--win-terminal-titlebar);
  border-bottom: 1px solid #111111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.win-terminal__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  color: var(--win-terminal-accent);
  font-size: 12px;
  white-space: nowrap;
}

.win-terminal__icon {
  width: 22px;
  height: 18px;
  border: 1px solid #5a5a5a;
  background: #111111;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
}

.win-terminal__controls {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 8px;
}

.win-terminal__control {
  padding: 0;
}

.win-terminal__screen {
  height: calc(100% - 32px);
  overflow-y: auto;
  overflow-x: auto;
  background: var(--win-terminal-bg);
  padding: 12px 14px;
  cursor: text;
}

.win-terminal__screen::-webkit-scrollbar {
  width: 16px;
}

.win-terminal__screen::-webkit-scrollbar:horizontal {
  height: 17px;
}

.win-terminal__screen::-webkit-scrollbar-corner {
  background: #dfdfdf;
}

.win-terminal__screen::-webkit-scrollbar-track {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='2' height='2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 0H0v1h1v1h1V1H1V0z' fill='silver'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 0H1v1H0v1h1V1h1V0z' fill='%23fff'/%3E%3C/svg%3E");
}

.win-terminal__screen::-webkit-scrollbar-thumb {
  background-color: #dfdfdf;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #ffffff,
    inset -2px -2px gray,
    inset 2px 2px #dfdfdf;
}

.win-terminal__screen::-webkit-scrollbar-button:vertical:start {
  height: 17px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 6H7v1H6v1H5v1H4v1h7V9h-1V8H9V7H8V6z' fill='%23000'/%3E%3C/svg%3E");
}

.win-terminal__screen::-webkit-scrollbar-button:vertical:end {
  height: 17px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4v1h1v1h1v1h1v1h1V9h1V8h1V7h1V6z' fill='%23000'/%3E%3C/svg%3E");
}

.win-terminal__screen::-webkit-scrollbar-button:horizontal:start {
  width: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 4H8v1H7v1H6v1H5v1h1v1h1v1h1v1h1V4z' fill='%23000'/%3E%3C/svg%3E");
}

.win-terminal__screen::-webkit-scrollbar-button:horizontal:end {
  width: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4H6v7h1v-1h1V9h1V8h1V7H9V6H8V5H7V4z' fill='%23000'/%3E%3C/svg%3E");
}

.win-terminal__output {
  color: var(--win-terminal-fg);
}

.win-terminal__row {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.win-terminal__row:empty::before {
  content: "\00a0";
}

.win-terminal__row--muted {
  color: var(--win-terminal-muted);
}

.win-terminal__row--command {
  color: var(--win-terminal-command);
}

.win-terminal__row--ascii {
  width: max-content;
  max-width: none;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.win-terminal__line {
  width: 100%;
  display: block;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  outline: none;
}

.win-terminal__prompt {
  white-space: nowrap;
}

.win-terminal__entry {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.win-terminal__caret {
  width: 4px;
  height: 1.15em;
  display: inline-block;
  background: var(--win-terminal-fg);
  margin-left: -5px;
  vertical-align: -0.16em;
  animation: win-terminal-caret 1s steps(1, end) infinite;
}

.win-terminal__line:focus .win-terminal__caret,
.win-terminal:focus-within .win-terminal__caret {
  background: var(--win-terminal-fg);
}

.win-terminal__line:not(:focus) .win-terminal__caret {
  opacity: 0.45;
}

@keyframes win-terminal-caret {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.win-terminal__entry {
  color: var(--win-terminal-fg);
  font: inherit;
}

.archive-viewer {
  position: fixed;
  z-index: 50;
  left: 50%;
  top: 50%;
  width: min(820px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 24px));
  transform: translate(-50%, -50%);
  background: var(--base-gray);
  color: var(--black);
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  box-shadow:
    inset 1px 1px var(--white),
    inset 2px 2px var(--light-gray),
    inset -1px -1px var(--black),
    inset -2px -2px var(--dark-gray),
    2px 2px 0 rgba(0, 0, 0, 0.32);
  overflow: hidden;
  padding: 3px;
  min-width: 320px;
  min-height: 260px;
}

.archive-viewer[hidden] {
  display: none;
}

.archive-viewer__bar {
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.archive-viewer__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 2px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-viewer__icon {
  flex: 0 0 auto;
  border: 1px solid var(--white);
  background: var(--base-gray);
  color: var(--black);
  padding: 0 3px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 9px;
  line-height: 12px;
  box-shadow: inset -1px -1px var(--dark-gray);
}

.archive-viewer__controls {
  display: flex;
  align-items: center;
  gap: 2px;
  height: auto;
  padding-right: 2px;
}

.archive-viewer__control {
  padding: 0;
}

.archive-viewer__body {
  height: calc(100% - 18px);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 6px;
  background: var(--base-gray);
}

.archive-viewer__image-wrap {
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  background: #000000;
  border: 0;
  box-shadow:
    inset 1px 1px var(--black),
    inset 2px 2px var(--dark-gray),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.archive-viewer__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.archive-viewer--maximized {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
}

.resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 11px;
  height: 11px;
  cursor: nwse-resize;
  background: linear-gradient(
    135deg,
    transparent 0 39%,
    #3a3a3a 39% 49%,
    #ffffff 49% 59%,
    transparent 59% 100%
  );
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: var(--taskbar-height);
  background: var(--base-gray);
  box-shadow: inset 0 1px var(--light-gray), inset 0 2px var(--white);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px;
}

.start-zone {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.start-btn {
  height: 22px;
  min-width: 67px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 10px 0 7px;
  user-select: none;
}

.start-btn:active,
.start-btn.active-start {
  box-shadow:
    inset 1px 1px var(--black),
    inset 2px 2px var(--dark-gray),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.start-btn:active > span,
.start-btn.active-start > span {
  transform: translate(1px, 1px);
}

.start-logo {
  width: 16px;
  height: 16px;
  display: inline-block;
  background-image:
    url("/icons/start.png");
  background-size: contain, 100% 50%, 100% 50%;
  background-position: center, 0 0, 0 100%;
  background-repeat: no-repeat, no-repeat, no-repeat;
  image-rendering: pixelated;
}

.task-buttons {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
}

.task-btn {
  height: 23px;
  max-width: 190px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 12px;
  padding: 0 10px;
}

.clock {
  min-width: 84px;
  height: calc(100% - 4px);
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #bcbcbc;
  box-shadow:
    inset 1px 1px var(--dark-gray),
    inset 2px 2px var(--black),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.start-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% - 2px);
  width: 210px;
  background: var(--base-gray);
  box-shadow:
    inset 1px 1px var(--white),
    inset 2px 2px var(--light-gray),
    inset -1px -1px var(--black),
    inset -2px -2px var(--dark-gray);
  padding: 3px;
  display: flex;
  gap: 4px;
  z-index: 40;
}

.start-menu.is-hidden {
  display: none;
}

.start-menu-brand {
  width: 22px;
  padding: 4px 0 2px;
  background: var(--dark-blue);
  color: var(--white);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  font-size: 12px;
}

.start-menu-brand strong {
  color: #c6c6c6;
}

.start-menu-items {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-entry {
  border: 0;
  background: transparent;
  font: inherit;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 4px;
  text-align: left;
}

.menu-entry:hover,
.menu-entry:focus-visible {
  outline: none;
  background: var(--dark-blue);
  color: var(--white);
}

.documents-body {
  height: calc(100% - 18px);
  margin: 0;
  padding: 10px;
  overflow: hidden;
  background: var(--base-gray);
}

.docs-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f7f7f7;
  border: 1px solid #9c9c9c;
  box-shadow:
    inset 1px 1px #ffffff,
    inset -1px -1px #c8c8c8;
}

.docs-panel::-webkit-scrollbar-button:vertical:start:increment,
.docs-panel::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
  height: 0;
}

.docs-panel::-webkit-scrollbar-button:vertical:start:decrement,
.docs-panel::-webkit-scrollbar-button:vertical:end:increment {
  display: block;
  height: 17px;
}

.prayer-window {
  min-width: 320px;
  min-height: 220px;
}

.prayer-window__body {
  height: calc(100% - 18px);
  margin: 0;
  padding: 7px;
  background: var(--base-gray);
}

.prayer-window__screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--black);
  box-shadow:
    inset 1px 1px var(--black),
    inset 2px 2px var(--dark-gray),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.perpetual-prayer-list {
  min-height: 100%;
  padding: 18px 22px;
  text-align: left;
  color: #02ff00;
  font: bold 10px "Courier New", Consolas, monospace;
  line-height: 1.7;
  align-items: flex-start;
  justify-content: flex-start;
}

.prayer-line {
  display: block;
  text-align: left;
  white-space: nowrap;
}

.prayer-line.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  background: #02ff00;
  vertical-align: -0.18em;
  animation: prayer-caret-blink 1s steps(1, end) infinite;
}

.prayer-line.is-typing.is-caret-solid::after {
  opacity: 1;
  animation: none;
}

@keyframes prayer-caret-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #b8b8b8;
  box-shadow:
    inset 1px 1px #ffffff,
    inset -1px -1px #d8d8d8;
}

.doc-meta {
  min-width: 0;
}

.doc-meta h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.1;
  font-weight: bold;
}

.doc-meta p {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
}

.doc-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-family: inherit;
  background: var(--base-gray);
  border: 0;
  box-shadow:
    inset 1px 1px var(--white),
    inset 2px 2px var(--light-gray),
    inset -1px -1px var(--black),
    inset -2px -2px var(--dark-gray);
  color: var(--black);
  text-decoration: none;
}

.btn.secondary {
  background: var(--base-gray);
}

.btn:active {
  padding: 1px 9px 0 11px;
  box-shadow:
    inset 1px 1px var(--black),
    inset 2px 2px var(--dark-gray),
    inset -1px -1px var(--white),
    inset -2px -2px var(--light-gray);
}

.menu-separator {
  height: 2px;
  margin: 2px 2px 4px;
  border-top: 1px solid var(--dark-gray);
  border-bottom: 1px solid var(--white);
}

.menu-icon {
  width: 18px;
  height: 18px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  box-shadow:
    inset 1px 1px var(--white),
    inset -1px -1px var(--dark-gray);
  background: #eeeeee;
}

.icon-readme-sm {
  background: transparent url("/icons/address_book_pad.png") center/contain no-repeat;
  box-shadow: none;
}

.icon-readme-sm::after {
  content: "";
}

.icon-terminal-sm {
  background: transparent url("/icons/console_prompt-0.png") center/contain no-repeat;
  box-shadow: none;
}

.icon-terminal-sm::after {
  content: "";
}

.icon-prayer-sm {
  background: var(--black);
}

.icon-prayer-sm::after {
  content: "P";
  position: absolute;
  inset: 3px;
  display: grid;
  place-items: center;
  border: 1px solid #02ff00;
  color: #02ff00;
  font: bold 9px Consolas, "Courier New", monospace;
}

.icon-desktop-sm::after {
  content: "[]";
  position: absolute;
  top: 2px;
  left: 3px;
  color: #222;
  font-size: 10px;
  font-weight: bold;
}

.icon-info-sm::after {
  content: "i";
  position: absolute;
  top: 1px;
  left: 6px;
  color: var(--dark-blue);
  font-size: 13px;
  font-weight: bold;
}

.icon-power-sm {
  background: transparent url("/icons/system-shutdown-restart-panel.png") center/contain no-repeat;
  box-shadow: none;
}

.icon-power-sm::after {
  content: "";
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.modal-overlay.show {
  display: grid;
}

.consent-modal {
  width: min(520px, 92vw);
}

.consent-modal .title-bar {
  cursor: default;
}

.consent-modal label {
  display: block;
  margin: 10px 0;
  font-size: 13px;
}

#acceptBtn {
  font-size: 13px;
  min-height: 24px;
  padding: 4px 12px;
}

#acceptBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.consent-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .terminal-app-window {
    left: 0 !important;
    width: 100% !important;
    min-width: 0;
    height: 72vh !important;
  }

  .win-terminal {
    width: 100%;
    height: 72vh;
    font-size: 13px;
  }

  .win-terminal__screen {
    padding: 10px;
  }

  .win-terminal__title {
    font-size: 12px;
  }

  .win-terminal__entry,
  .win-terminal__prompt,
  .win-terminal__output {
    font-size: 13px;
  }

  .archive-viewer {
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    transform: none;
  }

  .doc-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .prayer-window {
    left: 0 !important;
    width: 100% !important;
    min-width: 0;
    height: 60vh !important;
  }

}

@media (max-width: 1024px) and (min-width: 769px) {
  .app-window:not(.is-maximized) {
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100dvh - 72px) !important;
    transform: none !important;
  }

  .window-body {
    max-height: calc(100dvh - 128px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #readmeWindow,
  #documentsWindow,
  #membershipWindow,
  #verifyWindow {
    width: min(720px, calc(100vw - 32px)) !important;
  }
}

@media (max-width: 768px) {
  .app-window:not(#terminalWindow):not(.is-maximized),
  .archive-viewer:not(.archive-viewer--maximized) {
    left: 8px !important;
    top: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: calc(100dvh - 72px) !important;
    min-width: 0 !important;
    transform: none !important;
    overflow: hidden;
  }

  #readmeWindow,
  #documentsWindow,
  #membershipWindow,
  #prayerWindow {
    max-height: calc(100dvh - 72px) !important;
  }

  #verifyWindow {
    left: 8px !important;
    top: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    transform: none !important;
    overflow: hidden;
  }

  #verifyWindow .title-bar {
    min-height: 32px;
    height: 32px;
  }

  .window-body,
  .documents-body,
  .readme-body,
  .prayer-window__body,
  .verify-code-window__body {
    max-height: calc(100dvh - 128px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #verifyWindow .verify-code-window__body {
    flex: 1 1 auto;
    height: calc(100% - 52px) !important;
    min-height: 0;
    max-height: calc(100% - 52px) !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }

  #verifyWindow .verify-code-window__frame {
    display: block;
    width: 100%;
    height: 100% !important;
    min-height: 0;
    border: 0;
  }

  .title-bar,
  .win-terminal__bar,
  .archive-viewer__bar {
    min-height: 32px;
    flex-shrink: 0;
    touch-action: none;
  }

  .title-bar {
    cursor: default;
  }

  .title-bar-text,
  .archive-viewer__title,
  .win-terminal__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .title-bar-controls,
  .title-actions,
  .win-terminal__controls,
  .archive-viewer__controls {
    flex-shrink: 0;
  }

  .title-bar-controls button,
  .title-actions button,
  button[aria-label="Close"] {
    width: 16px;
    min-width: 16px;
    height: 14px;
    min-height: 14px;
    padding: 0;
  }

  .win-terminal__control,
  .archive-viewer__control {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
  }

  .resize-handle {
    display: none !important;
  }

  #terminalWindow {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    z-index: 9999;
    transform: none !important;
  }

  #terminalWindow .win-terminal {
    width: 100vw !important;
    height: 100% !important;
    max-height: 100% !important;
    font-size: 13px;
    line-height: 1.35;
  }

  .win-terminal__bar {
    height: 38px;
  }

  .win-terminal__screen {
    height: calc(100% - 38px);
    max-height: calc(100% - 38px);
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 180px;
    padding: 10px 10px max(180px, env(safe-area-inset-bottom));
    font-size: 13px;
    line-height: 1.35;
  }

  .win-terminal__line {
    min-height: 28px;
    font-size: 16px;
  }

  .win-terminal__entry,
  .win-terminal__prompt,
  .win-terminal__output {
    font-size: 13px;
  }

  .terminal-mobile-input {
    position: fixed;
    left: 4px;
    bottom: 42px;
    width: 2px;
    height: 24px;
    padding: 0;
    border: 0;
    opacity: 0.01;
    background: transparent;
    color: transparent;
    font-size: 16px;
    line-height: 16px;
    resize: none;
    pointer-events: none;
    z-index: 10000;
  }

  .docs-panel,
  .readme-panel {
    max-height: none;
    overflow-wrap: anywhere;
  }

  .doc-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .doc-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .app-window:not(#terminalWindow):not(.is-maximized),
  .archive-viewer:not(.archive-viewer--maximized) {
    left: 6px !important;
    top: 6px !important;
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 66px) !important;
  }

  .window-body,
  .documents-body,
  .readme-body,
  .prayer-window__body,
  .verify-code-window__body {
    max-height: calc(100dvh - 120px);
  }

  #verifyWindow .verify-code-window__body {
    height: calc(100% - 32px) !important;
    max-height: calc(100% - 32px) !important;
  }

  .readme-panel {
    padding: 12px;
  }

  .readme-panel h2 {
    font-size: 17px;
  }

  .readme-panel p,
  .doc-meta h3 {
    font-size: 13px;
  }

  .task-btn {
    max-width: 120px;
  }
}
