body.boot-pending { background: #0000aa; }
body.boot-pending #desktop,
body.boot-pending .taskbar { visibility: hidden; }

#system-screen {
  position: fixed;
  inset: 0;
  z-index: 7000;
  overflow: hidden;
  min-width: 0;
  outline: 0;
  font: 12px/1.5 var(--font);
}
#system-screen button { font: inherit; }
#system-screen button:focus-visible { outline: 1px dotted currentColor; outline-offset: -5px; }
#system-screen.system-mode-shutdown {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
  color: #7aa7ff;
  overflow: auto;
}
.system-power-content { width: 100%; max-width: 650px; text-align: center; margin: auto; }
.system-sleeping-computer { display: block; width: 80px; height: 70px; margin: 0 auto 24px; color: #6594e6; }
.system-power-content h1 { margin: 0 0 24px; font: 700 clamp(24px,4vw,36px)/1.45 var(--font); letter-spacing: -.5px; }
.system-power-note { margin: 0 0 38px; font-size: 12px; color: #90a8ce; }
.system-power-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.system-dark-button { background: #000; color: #8cb2ef; border: 1px solid #4f78b7; min-height: 36px; min-width: 112px; padding: 7px 15px; }
.system-dark-button:hover { background: #0a1629; border-color: #7aa7ff; }
.system-dark-button:active { background: #142743; }
.system-escape-note { font-size: 10px; margin: 23px 0 0; color: #7d96bd; }
#system-screen.system-mode-restart { display: grid; place-items: center; background: #0000aa; color: #fff; padding: 28px; overflow: auto; }
.system-boot-content { width: 100%; max-width: 580px; margin: auto; }
.system-boot-topline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; color: #b8b8ef; font: 10px/1.5 'Courier New',monospace; letter-spacing: 1.2px; }
.system-boot-brand { display: flex; align-items: center; gap: 25px; margin: 35px 0 27px; }
.system-boot-icon { width: 80px; height: 80px; image-rendering: pixelated; }
.system-boot-brand h1 { margin: 0; font: 700 clamp(39px,7vw,62px)/1.05 var(--font); letter-spacing: -2px; }
.system-boot-brand p { margin: 12px 0 0; font-size: 12px; color: #dbdbff; }
.system-boot-rule { height: 2px; background: #fff; box-shadow: 0 2px #000070; margin-bottom: 30px; }
.system-boot-message { margin: 0 0 16px; font: 14px/1.5 'Courier New',monospace; min-height: 21px; }
.system-boot-progress { height: 28px; padding: 4px; display: grid; grid-template-columns: repeat(20,minmax(0,1fr)); gap: 3px; border: 1px solid #b7b7ff; box-shadow: inset 1px 1px #00006d; }
.system-boot-progress>span { background: #1717a2; }
.system-boot-progress>span.is-loaded { background: #d9d9ff; box-shadow: inset 1px 1px #fff, inset -1px -1px #9595e6; }
.system-boot-meta { display: flex; justify-content: space-between; gap: 15px; margin-top: 9px; font: 11px/1.5 'Courier New',monospace; color: #b8b8ef; }
.system-boot-meta>span:last-child { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.system-boot-footer { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 10px; color: #b8b8ef; }
.system-boot-skip { border: 1px solid #a5a5ed; background: #0000aa; color: #fff; padding: 7px 15px; min-height: 34px; flex-shrink: 0; }
.system-boot-skip:hover,.system-boot-skip:active { background: #1212bc; }
#system-screen.system-mode-dos { background: #000; color: #d5d5d5; padding: 22px 28px max(18px,env(safe-area-inset-bottom)); }
.system-dos-shell { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 1100px; margin: 0 auto; min-height: 0; min-width: 0; }
.system-dos-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 14px; border-bottom: 1px solid #414141; padding: 0 0 14px; margin-bottom: 16px; }
.system-dos-header h1 { font: 700 17px/1.4 'Courier New',monospace; margin: 0; white-space: nowrap; }
.system-dos-header h1>span { color: #929292; font-size: 12px; font-weight: 400; }
#system-screen .system-terminal-button { min-height: 34px; background: #000; border: 1px solid #777; color: #e0e0e0; padding: 6px 12px; font: 12px/1.5 'Courier New',monospace; white-space: nowrap; }
.system-terminal-button:hover { border-color: #ddd; background: #171717; }
.system-terminal-output { flex: 1; overflow: auto; min-width: 0; min-height: 0; padding: 0 12px 12px 0; scrollbar-color: #777 #161616; outline: none; }
.system-terminal-output:focus-visible { outline: 1px dotted #777; outline-offset: -2px; }
.system-terminal-line { font: 15px/1.65 'Courier New',monospace; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.65em; }
.system-terminal-command { color: #fff; }
.system-terminal-highlight { color: #e8b769; }
.system-terminal-muted { color: #b2b2b2; }
.system-dos-form { display: flex; align-items: center; gap: 10px; margin: 0; padding-top: 14px; border-top: 1px solid #414141; flex-shrink: 0; min-width: 0; font: 16px/1.5 'Courier New',monospace; }
.system-dos-form label { white-space: nowrap; flex-shrink: 0; color: #fff; }
#system-screen .system-dos-form input { display: block; flex: 1; min-width: 0; width: 0; padding: 5px 0; background: #000; border: 0; border-bottom: 1px dotted #444; border-radius: 0; outline: 0; caret-color: #fff; color: #fff; font: 16px/1.5 'Courier New',monospace; }
#system-screen .system-dos-form input:focus { border-bottom-color: #a4a4a4; }
.system-dos-hint { margin: 12px 0 0; flex-shrink: 0; font: 11px/1.5 'Courier New',monospace; color: #929292; }
#system-screen.system-mode-switch-user { display: grid; place-items: center; background: var(--desktop,#008080); padding: 20px; overflow: auto; }
.system-login-window { width: 100%; max-width: 460px; max-height: calc(100dvh - 40px); padding: 3px; background: #c0c0c0; color: #000; box-shadow: inset -1px -1px #000,inset 1px 1px #dfdfdf,inset -2px -2px #808080,inset 2px 2px #fff,3px 4px #0004; display: flex; flex-direction: column; margin: auto; }
.system-login-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #000080; color: #fff; padding: 3px 3px 3px 7px; min-height: 27px; flex-shrink: 0; }
.system-login-titlebar h1 { margin: 0; font: 700 12px/1.5 var(--font); }
#system-screen .system-login-close { display: grid; place-items: center; width: 22px; height: 20px; flex-shrink: 0; padding: 0; border: 0; background: #c0c0c0; color: #000; box-shadow: inset -1px -1px #000,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf; font: 700 19px/1 Arial,sans-serif; }
.system-login-form { display: flex; flex-direction: column; min-height: 0; }
.system-login-content { padding: 22px 24px 5px; overflow: auto; min-height: 0; }
.system-login-intro { display: flex; gap: 19px; align-items: center; margin-bottom: 22px; }
.system-login-computer { width: 44px; height: 44px; }
.system-login-intro p { font-size: 11px; margin: 4px 0 0; }
.system-login-intro p.system-login-heading { font-size: 13px; font-weight: 700; margin: 0 0 7px; }
.system-personalities { min-width: 0; margin: 0; padding: 2px; border: 0; background: #fff; box-shadow: inset -1px -1px #fff,inset 1px 1px #808080,inset -2px -2px #dfdfdf,inset 2px 2px #000; }
.system-personality { display: grid; grid-template-columns: 16px 28px minmax(0,1fr); align-items: center; gap: 10px; min-height: 58px; padding: 7px 9px; cursor: pointer; color: #000; }
.system-personality+ .system-personality { border-top: 1px solid #e2e2e2; }
.system-personality:has(input:checked) { background: #000080; color: #fff; }
.system-personality:focus-within { outline: 1px dotted currentColor; outline-offset: -4px; }
.system-personality input { margin: 0; width: 13px; height: 13px; accent-color: #000080; cursor: pointer; }
.system-personality svg { width: 28px; height: 28px; }
.system-personality strong { display: block; font-size: 11px; line-height: 1.45; }
.system-personality small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.4; color: #555; }
.system-personality:has(input:checked) small { color: #d7d7ff; }
.system-login-footnote { margin: 14px 0 0; font-size: 10px; color: #555; }
.system-login-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px 19px; flex-shrink: 0; }
#system-screen .system-classic-button { min-width: 82px; min-height: 30px; padding: 5px 15px; border: 0; background: #c0c0c0; color: #000; box-shadow: inset -1px -1px #000,inset 1px 1px #fff,inset -2px -2px #808080,inset 2px 2px #dfdfdf; font: 11px/1.5 var(--font); }
.system-classic-button:active,.system-login-close:active { box-shadow: inset -1px -1px #fff,inset 1px 1px #000,inset -2px -2px #dfdfdf,inset 2px 2px #808080; }
.system-default-button { outline: 1px solid #000; outline-offset: 1px; }
@media(max-width:480px) {
  #system-screen.system-mode-shutdown { padding: 22px 15px; }
  .system-sleeping-computer { width: 67px; height: 58px; }
  .system-power-content h1 { font-size: 26px; }
  .system-power-note { max-width: 260px; margin: 0 auto 28px; line-height: 1.8; }
  .system-power-actions { gap: 10px; }
  .system-dark-button { min-width: 112px; padding: 8px 11px; }
  #system-screen.system-mode-restart { padding: 22px 18px; }
  .system-boot-topline { font-size: 8px; letter-spacing: .5px; }
  .system-boot-brand { gap: 17px; margin-block: 30px 24px; }
  .system-boot-icon { width: 58px; height: 58px; }
  .system-boot-brand h1 { font-size: 45px; letter-spacing: -2px; }
  .system-boot-brand p { font-size: 10px; margin-top: 8px; }
  .system-boot-rule { margin-bottom: 22px; }
  .system-boot-message { font-size: 12px; min-height: 36px; margin-bottom: 10px; }
  .system-boot-progress { height: 26px; gap: 2px; }
  .system-boot-meta { font-size: 9px; gap: 5px; }
  .system-boot-footer { font-size: 9px; gap: 10px; margin-top: 25px; }
  .system-boot-skip { padding: 7px 9px; }
  #system-screen.system-mode-dos { padding: 15px 12px max(12px,env(safe-area-inset-bottom)); }
  .system-dos-header { padding-bottom: 11px; margin-bottom: 12px; gap: 8px; }
  .system-dos-header h1 { font-size: 15px; }
  .system-dos-header h1>span { display: none; }
  #system-screen .system-terminal-button { font-size: 11px; padding: 7px 8px; }
  .system-terminal-line { font-size: 13px; line-height: 1.65; }
  .system-terminal-output { padding-right: 6px; }
  .system-dos-form { gap: 7px; padding-top: 10px; }
  .system-dos-form label { font-size: 14px; }
  .system-dos-hint { font-size: 10px; margin-top: 9px; }
  #system-screen.system-mode-switch-user { padding: 12px; }
  .system-login-window { max-height: calc(100dvh - 24px); }
  .system-login-content { padding: 18px 13px 3px; }
  .system-login-intro { gap: 14px; margin-bottom: 17px; }
  .system-login-computer { width: 36px; height: 36px; }
  .system-login-intro p { font-size: 10px; }
  .system-login-intro p.system-login-heading { font-size: 12px; }
  .system-personality { grid-template-columns: 14px 24px minmax(0,1fr); gap: 7px; padding: 7px; min-height: 58px; }
  .system-personality svg { width: 24px; height: 24px; }
  .system-personality strong { font-size: 10px; }
  .system-personality small { font-size: 9px; }
  .system-login-actions { padding: 15px 14px 17px; }
  #system-screen .system-classic-button { min-height: 34px; }
}
@media(max-height:430px) {
  #system-screen.system-mode-shutdown { padding: 18px; }
  .system-sleeping-computer { width: 47px; height: 41px; margin-bottom: 12px; }
  .system-power-content h1 { font-size: 23px; line-height: 1.25; margin-bottom: 13px; }
  .system-power-note { margin-bottom: 19px; }
  .system-escape-note { margin-top: 13px; }
  #system-screen.system-mode-restart { padding: 15px 25px; }
  .system-boot-content { max-width: 510px; }
  .system-boot-brand { margin: 15px 0; }
  .system-boot-icon { width: 52px; height: 52px; }
  .system-boot-brand h1 { font-size: 43px; }
  .system-boot-brand p { margin-top: 5px; font-size: 10px; }
  .system-boot-rule { margin-bottom: 14px; }
  .system-boot-message { font-size: 12px; min-height: 18px; margin-bottom: 10px; }
  .system-boot-footer { margin-top: 16px; }
  #system-screen.system-mode-dos { padding-top: 10px; padding-bottom: 10px; }
  .system-dos-header { padding-bottom: 8px; margin-bottom: 8px; }
  .system-dos-form { padding-top: 8px; }
  .system-dos-hint { margin-top: 6px; }
}
