/* mOS. Every rule is scoped to html[data-os], so a plain page never sees it.
   html[data-os="desktop"] holds the rules of mOS; html[data-pocket] adds the compact layout for phones. */

html[data-os] {
  --bg: #000;
  --panel: #0b0b0b;
  --raise: #151515;
  --line: #222;
  --line-hi: #3a3a3a;
  --text: #dcdcdc;
  --dim: #8a8a8a;
  --amber: #ffb000;
  --link: #8ab4f8;
  --visited: #c58af9;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --read: Georgia, "Times New Roman", serif;
  color-scheme: dark;
  background: var(--bg);
}

html[data-os] body {
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 var(--ui);
}

html[data-os] body > :not(#mos, .stage) { display: none !important; }
html[data-os] [hidden] { display: none !important; }
html[data-os] :focus-visible { outline: 1px solid var(--amber); outline-offset: 1px; }
html[data-os] button { font: inherit; color: inherit; }

/* Page content in a window */

html[data-os] .page h1 { margin: 0 0 0.6em; font-size: 1.55em; font-weight: normal; line-height: 1.2; color: #f2f2f2; }
html[data-os] .page h2 { margin: 1.6em 0 0.4em; font-size: 1.12em; font-weight: normal; color: #f2f2f2; }
html[data-os] .page h1 + h2:has(+ article) { margin-top: -0.2em; color: var(--dim); }
html[data-os] .page p { margin: 0 0 0.9em; }
html[data-os] .page a { color: var(--link); }
html[data-os] .page a:visited { color: var(--visited); }
html[data-os] .page ul,
html[data-os] .page ol { padding-left: 1.3em; }
html[data-os] .page dt { margin-top: 1em; font-weight: bold; }
html[data-os] .page dd { margin: 0; }
html[data-os] .page img { max-width: 100%; height: auto; }
html[data-os] .page code { font: 0.85em var(--mono); }
html[data-os] .page hr { border: 0; border-top: 1px solid var(--line); }
html[data-os] .page footer,
html[data-os] .page .fine { color: var(--dim); font-size: 0.85em; }
html[data-os] .page button:not([class]) {
  padding: 1px 10px;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  background: none;
  cursor: pointer;
  font: 0.9em var(--ui);
}

html[data-os] .page .trap { position: absolute; left: -9999px; }
html[data-os] .page input,
html[data-os] .page textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 28em;
  padding: 6px 8px;
  border: 1px solid var(--line-hi);
  border-radius: 3px;
  background: #050505;
  color: var(--text);
  font: 15px var(--ui);
}
html[data-os] .page form button { padding: 5px 14px; border: 1px solid var(--line-hi); border-radius: 3px; background: var(--raise); cursor: pointer; font: 14px var(--ui); }
html[data-os] .page .entry { margin: 0 0 1em; padding-top: 0.6em; border-top: 1px solid var(--line); }
html[data-os] .page .entry p { margin: 0.2em 0; }
html[data-os] .page article p { margin: 0; text-indent: 1.5em; }
html[data-os] .page article p.first,
html[data-os] .page article p.break { text-indent: 0; }
html[data-os] .page article p.break { margin: 1em 0; text-align: center; }
html[data-os] .page nav.pager { display: flex; justify-content: space-between; margin: 2.5em 0 0.5em; }

/* Terminal */

html[data-os] .term {
  height: 100%;
  padding: 10px 12px;
  overflow: auto;
  box-sizing: border-box;
  background: #050505;
  color: #ffc65c;
  font: 13px/1.5 var(--mono);
}
html[data-os] .term-out { margin: 0; font: inherit; white-space: pre-wrap; }
html[data-os] .term-line { display: flex; gap: 0.6em; }
html[data-os] .term-line label { color: var(--amber); white-space: nowrap; }
html[data-os] .term-line input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
  caret-color: var(--amber);
}

/* The desktop, in the style of the XP era. Every rule is scoped to html[data-os="desktop"]. */

html[data-os="desktop"] {
  --xp-font: Tahoma, Verdana, "Segoe UI", sans-serif;
  --xp-face: #ece9d8;
  --xp-select: #316ac5;
  --xp-title: linear-gradient(#0997ff, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7);
  --xp-title-off: linear-gradient(#7697e7, #7e9ee3 3%, #94afe8 6%, #97b4e9 8%, #82a5e4 14%, #7c9fe2 17%, #7996de 25%, #7b99e1 56%, #82a9e9 81%, #80a5e7 89%, #7b96e1 94%, #7a93df 97%, #abbae3);
  --xp-button: linear-gradient(#fff, #ece9d8 85%, #d6d0c5);
}

html[data-os="desktop"] #mos {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 30px;
  /* One column, never wider than the screen: a full taskbar must not stretch the desk and its wallpaper. */
  grid-template-columns: minmax(0, 1fr);
  height: 100dvh;
  color: #000;
  font: 12px/1.35 var(--xp-font);
}
html[data-os="desktop"] #mos :focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
html[data-os="desktop"] #mos.is-busy,
html[data-os="desktop"] #mos.is-busy * { cursor: progress !important; }
html[data-os="desktop"] #mos * { scrollbar-color: #b6c8f6 #f4f4f0; }

/* Desk: the wallpaper and its icons */

html[data-os="desktop"] .desk { position: relative; overflow: hidden; background: #3a6ea5; }
html[data-os="desktop"] .wallpaper { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

html[data-os="desktop"] .icons {
  position: absolute;
  inset: 8px auto 8px 6px;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 78px);
  grid-auto-columns: 78px;
  gap: 4px 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html[data-os="desktop"] .icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 78px;
  height: 78px;
  padding: 3px 1px;
  border: 0;
  background: none;
  color: #fff;
  cursor: default;
}
html[data-os="desktop"] .icon svg { width: 34px; height: 34px; filter: drop-shadow(1px 2px 1px rgb(0 0 0 / 0.35)); }
html[data-os="desktop"] .icon span {
  max-width: 74px;
  padding: 0 2px;
  font: 12px/1.2 var(--xp-font);
  text-align: center;
  text-shadow: 1px 1px 1px #000, 0 0 2px #000;
  overflow-wrap: anywhere;
}
html[data-os="desktop"] .icon.is-selected svg { filter: drop-shadow(1px 2px 1px rgb(0 0 0 / 0.35)) brightness(0.75) sepia(1) hue-rotate(185deg) saturate(3); }
html[data-os="desktop"] .icon.is-selected span { background: var(--xp-select); text-shadow: none; }
html[data-os="desktop"] #mos .icon:focus-visible { outline: none; }
html[data-os="desktop"] #mos .icon:focus-visible span { outline: 1px dotted #fff; }

html[data-os="desktop"] .layer { position: absolute; inset: 0; pointer-events: none; }
html[data-os="desktop"] .layer > * { pointer-events: auto; }

/* Taskbar */

html[data-os="desktop"] .taskbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  background: linear-gradient(#3168d5, #4993e6 3%, #2157d7 6%, #2663e0 10%, #245cd8 92%, #1941a5);
  white-space: nowrap;
  user-select: none;
}
html[data-os="desktop"] .start {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  margin-right: 8px;
  padding: 0 24px 2px 11px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(#3c9a3c, #5bc65b 8%, #3f9e3f 18%, #3a963a 80%, #2f7d2f);
  box-shadow: 2px 0 4px rgb(0 0 0 / 0.45), inset -1px 0 1px rgb(255 255 255 / 0.25);
  color: #fff;
  font: italic bold 16px/1 var(--xp-font);
  text-shadow: 1px 1px 1px #1a4a1a;
  cursor: pointer;
}
html[data-os="desktop"] .start svg { width: 8px; height: 18px; color: #111; filter: drop-shadow(0 0 1px #fff); }
html[data-os="desktop"] .start:hover { filter: brightness(1.08); }
html[data-os="desktop"] #mos .start:focus-visible { outline: 1px dotted #fff; outline-offset: -5px; }

html[data-os="desktop"] .tasks { display: flex; flex: 1; gap: 3px; min-width: 0; overflow: hidden; }
html[data-os="desktop"] .task {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 160px;
  min-width: 60px;
  height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid #1c4fbd;
  border-radius: 3px;
  background: linear-gradient(#5aa0ff, #3a81f3 12%, #2f74ea 85%, #2463d6);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.3);
  color: #fff;
  font: 12px var(--xp-font);
  text-align: left;
  cursor: pointer;
}
html[data-os="desktop"] .task svg { flex: none; width: 16px; height: 16px; }
html[data-os="desktop"] .task span { overflow: hidden; text-overflow: ellipsis; }
html[data-os="desktop"] .task[aria-pressed="true"] { background: linear-gradient(#1b4bb8, #1e53c4); box-shadow: inset 1px 1px 2px rgb(0 0 0 / 0.55); }
html[data-os="desktop"] .task.is-min { opacity: 0.85; }

html[data-os="desktop"] .tray {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  margin-left: auto;
  padding: 0 12px 0 14px;
  border-left: 1px solid #0b4da8;
  background: linear-gradient(#0c59b9, #139ee9 4%, #18b5f2 8%, #139beb 15%, #1291e8 88%, #0d7fd6);
  box-shadow: inset 1px 0 1px #18bbff;
  color: #fff;
}
html[data-os="desktop"] .tray-icon svg { display: block; width: 16px; height: 16px; }

/* Start menu */

html[data-os="desktop"] .startmenu {
  position: absolute;
  bottom: 30px;
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 380px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #0b3fa8;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 3px 3px 10px rgb(0 0 0 / 0.5);
  color: #000;
  font: 12px var(--xp-font);
}
html[data-os="desktop"] .sm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 10px;
  background: linear-gradient(#1868ce, #0e60cb 15%, #0a5ac4 85%, #0b52b7);
  color: #fff;
  font: bold 14px var(--xp-font);
  text-shadow: 1px 1px 1px #0a246a;
}
html[data-os="desktop"] .sm-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: linear-gradient(#5f9de8, #cfe6fb 62%, #4fa23a 62%);
  box-shadow: 1px 1px 3px rgb(0 0 0 / 0.4);
}
html[data-os="desktop"] .sm-avatar svg { width: 9px; height: 20px; color: #111; }
html[data-os="desktop"] .sm-body { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid #e78c2c; }
html[data-os="desktop"] .sm-left { padding: 6px 0; background: #fff; }
html[data-os="desktop"] .sm-right { padding: 6px 0; border-left: 1px solid #95bdee; background: #d3e5fa; }
html[data-os="desktop"] .sm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 10px;
  border: 0;
  background: none;
  color: #000;
  font: 12px var(--xp-font);
  text-align: left;
  cursor: pointer;
}
html[data-os="desktop"] .sm-right .sm-item { color: #0a246a; font-weight: bold; }
html[data-os="desktop"] .sm-item svg { flex: none; width: 26px; height: 26px; }
html[data-os="desktop"] .sm-right .sm-item svg { width: 22px; height: 22px; }
html[data-os="desktop"] .startmenu .sm-item:hover,
html[data-os="desktop"] .startmenu .sm-item:focus-visible { outline: none; background: var(--xp-select); color: #fff; }
html[data-os="desktop"] .sm-foot { display: flex; justify-content: flex-end; gap: 14px; padding: 6px 10px; background: linear-gradient(#1868ce, #0b52b7); }
html[data-os="desktop"] .sm-foot button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: #fff;
  font: 12px var(--xp-font);
  cursor: pointer;
}
html[data-os="desktop"] .startmenu .sm-foot button:hover,
html[data-os="desktop"] .startmenu .sm-foot button:focus-visible { outline: none; background: rgb(255 255 255 / 0.15); }
html[data-os="desktop"] .sm-foot svg { width: 22px; height: 22px; }

/* A tip balloon from the tray */

html[data-os="desktop"] .balloon {
  position: absolute;
  right: 14px;
  bottom: 42px;
  z-index: 3;
  max-width: 270px;
  padding: 8px 26px 9px 10px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #ffffe1;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 0.35);
  color: #000;
  font: 12px/1.35 var(--xp-font);
}
html[data-os="desktop"] .balloon::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #ffffe1;
  transform: rotate(45deg) skew(12deg, 12deg);
}
html[data-os="desktop"] .balloon p { margin: 0; }
html[data-os="desktop"] .balloon .balloon-title { margin-bottom: 4px; font-weight: bold; }
html[data-os="desktop"] .balloon-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #a0a0a0;
  border-radius: 3px;
  background: #fff;
  font: 12px/12px var(--xp-font);
  cursor: pointer;
}

/* Error dialogs, and the blue screen that follows them */

html[data-os="desktop"] .error-body { display: flex; align-items: flex-start; gap: 12px; }
html[data-os="desktop"] .error-body svg { flex: none; width: 32px; height: 32px; }
html[data-os="desktop"] .error-body p { margin: 4px 0 0; }
html[data-os="desktop"] .bsod {
  position: absolute;
  inset: 0;
  z-index: 2147483000;
  padding: 6% 7%;
  overflow: hidden;
  outline: none;
  background: #0000aa;
  color: #fff;
  font: 15px/1.5 "Lucida Console", Consolas, "Courier New", monospace;
  user-select: none;
  cursor: default;
}
html[data-os="desktop"] .bsod p { margin: 0 0 1.3em; }
html[data-os="desktop"] .bsod .bsod-title { display: table; margin: 0 auto 2em; padding: 0 8px; background: #aaa; color: #0000aa; }
html[data-os="desktop"] .bsod-cursor { animation: bsod-blink 1s steps(1) infinite; }
@keyframes bsod-blink { 50% { opacity: 0; } }

/* Dialogs, such as Keyboard Shortcuts: windows with the gray face of the era */

html[data-os="desktop"] .dialog { box-sizing: border-box; display: flex; flex-direction: column; min-height: 100%; padding: 12px 14px; }
html[data-os="desktop"] .dialog table { border-collapse: collapse; }
html[data-os="desktop"] .dialog td { padding: 3px 16px 3px 0; vertical-align: top; }
html[data-os="desktop"] .dialog td:first-child { white-space: nowrap; }
html[data-os="desktop"] .dialog-buttons { margin: auto 0 0; padding-top: 14px; text-align: right; }
html[data-os="desktop"] .dialog-buttons button { min-width: 75px; padding: 3px 12px; border: 1px solid #003c74; border-radius: 3px; background: var(--xp-button); cursor: pointer; font: 12px var(--xp-font); }
html[data-os="desktop"] kbd { padding: 0 4px; border: 1px solid #aca899; border-radius: 2px; background: #fff; color: #000; font: 11px var(--xp-font); }

/* Windows */

html[data-os="desktop"] .win {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid #0842d4;
  border-top: 0;
  border-radius: 8px 8px 0 0;
  background: var(--xp-face);
  box-shadow: 2px 3px 10px rgb(0 0 0 / 0.45);
}
html[data-os="desktop"] .win:not(.is-active) { border-color: #7a96df; }
html[data-os="desktop"] .win.is-max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; }
html[data-os="desktop"] .win.is-max .win-bar { border-radius: 0; }

html[data-os="desktop"] .win-bar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
  height: 29px;
  margin: 0 -3px;
  padding: 0 5px 0 8px;
  border-radius: 7px 7px 0 0;
  background: var(--xp-title);
  color: #fff;
  user-select: none;
  touch-action: none;
}
html[data-os="desktop"] .win:not(.is-active) .win-bar { background: var(--xp-title-off); }
html[data-os="desktop"] .win-icon { flex: none; }
html[data-os="desktop"] .win-icon svg { display: block; width: 16px; height: 16px; }
html[data-os="desktop"] .win-title {
  flex: 1;
  min-width: 0;
  padding-left: 3px;
  overflow: hidden;
  font: bold 13px var(--xp-font);
  text-overflow: ellipsis;
  text-shadow: 1px 1px #0a1f8f;
  white-space: nowrap;
}
html[data-os="desktop"] .win:not(.is-active) .win-title { color: #d8e4f8; text-shadow: none; }
html[data-os="desktop"] .win-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  background: linear-gradient(135deg, #4a97ff, #2c6be3 50%, #1e57d0);
  box-shadow: inset 1px 1px 1px rgb(255 255 255 / 0.35);
  color: #fff;
  cursor: pointer;
}
html[data-os="desktop"] .win-btn svg { width: 10px; height: 10px; }
html[data-os="desktop"] .win-btn:hover { filter: brightness(1.15); }
html[data-os="desktop"] .win-close { margin-left: 2px; background: linear-gradient(135deg, #f0896b, #d9532c 50%, #c13a14); }
html[data-os="desktop"] .win:not(.is-active) .win-btn { opacity: 0.75; }

/* mOS Explorer: the browser bar of a page window */

html[data-os="desktop"] .win-toolbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
  padding: 3px 4px;
  border-bottom: 1px solid #aca899;
  background: var(--xp-face);
  font: 12px var(--xp-font);
}
html[data-os="desktop"] .win-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 6px 0 2px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: none;
  color: #000;
  font: 12px var(--xp-font);
  cursor: pointer;
}
html[data-os="desktop"] .win-nav svg {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8ee08e, #3aa43a 60%, #1f7a1f);
  color: #fff;
}
html[data-os="desktop"] .win-forward svg { transform: scaleX(-1); }
html[data-os="desktop"] .win-nav:hover:not(:disabled) { border-color: #aca899; background: #fff; }
html[data-os="desktop"] .win-nav:disabled { color: #a0a0a0; cursor: default; }
html[data-os="desktop"] .win-nav:disabled svg { background: radial-gradient(circle at 35% 30%, #eee, #b8b8b8); }
html[data-os="desktop"] .win-address { display: flex; flex: 1; align-items: center; gap: 4px; min-width: 0; margin: 0 0 0 4px; }
html[data-os="desktop"] .win-address label { color: #444; }
html[data-os="desktop"] .win-address input {
  flex: 1;
  min-width: 0;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #7f9db9;
  background: #fff;
  color: #000;
  font: 12px var(--xp-font);
}
html[data-os="desktop"] .win-go,
html[data-os="desktop"] .page button:not([class]),
html[data-os="desktop"] .page form button {
  padding: 2px 10px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: var(--xp-button);
  color: #000;
  font: 12px var(--xp-font);
  cursor: pointer;
}
html[data-os="desktop"] .win-plain { padding: 0 6px; color: #0000ee; font: 11px var(--xp-font); white-space: nowrap; }

html[data-os="desktop"] .win-body {
  flex: 1;
  min-height: 0;
  padding: 14px 22px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
}
html[data-os="desktop"] .win-body:focus { outline: 0; }
html[data-os="desktop"] .win[aria-busy="true"] .win-body { opacity: 0.5; }
html[data-os="desktop"] .win-grip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #aca899 1px, transparent 1.4px) 0 0 / 4px 4px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  cursor: nwse-resize;
}
html[data-os="desktop"] .win.is-max .win-grip { display: none; }
html[data-os="desktop"] .win.is-trail { pointer-events: none; }

/* A web page in mOS Explorer: the browser's own defaults of the time, black on white */

html[data-os="desktop"] .page { color: #000; font: 16px/1.45 "Times New Roman", Times, Georgia, serif; }
html[data-os="desktop"] .page h1,
html[data-os="desktop"] .page h2 { color: #000; font-weight: bold; }
html[data-os="desktop"] .page h1 { margin: 0.2em 0 0.5em; font-size: 2em; }
html[data-os="desktop"] .page h2 { margin: 1.2em 0 0.4em; font-size: 1.4em; }
html[data-os="desktop"] .page h1 + h2:has(+ article) { margin-top: -0.2em; color: #555; font-size: 1.2em; }
html[data-os="desktop"] .page a { color: #0000ee; }
html[data-os="desktop"] .page a:visited { color: #551a8b; }
html[data-os="desktop"] .page hr { border: 0; border-top: 1px solid #ccc; }
html[data-os="desktop"] .page footer,
html[data-os="desktop"] .page .fine { color: #555; }
html[data-os="desktop"] .page code { font: 0.9em "Courier New", monospace; }
html[data-os="desktop"] .page input,
html[data-os="desktop"] .page textarea { border: 1px solid #7f9db9; border-radius: 0; background: #fff; color: #000; font: 14px var(--xp-font); }
html[data-os="desktop"] .page .entry { border-top-color: #ddd; }

/* Command Prompt: the terminal on the desktop */

html[data-os="desktop"] .win-app .win-body { padding: 0; background: #000; font: inherit; }
html[data-os="desktop"] .term { background: #000; color: #c0c0c0; font: 14px/1.35 "Lucida Console", Consolas, "Courier New", monospace; }
html[data-os="desktop"] .term-line label { color: #c0c0c0; }
html[data-os="desktop"] .win-app .term-line input { padding: 0; border: 0; background: none; color: inherit; font: inherit; caret-color: #c0c0c0; }
html[data-os="desktop"] .win-dialog .win-body { overflow: auto; background: var(--xp-face); color: #000; font: 12px var(--xp-font); }

/* Programs: a menu bar, Notepad, Write, Explorer folders and mOS Amp. Only web pages get the page margins. */

html[data-os="desktop"] .win:not([data-view="page"]) .win-body { padding: 0; }
html[data-os="desktop"] .win-menu { flex: none; }
html[data-os="desktop"] .menubar {
  position: relative;
  display: flex;
  padding: 1px 2px;
  border-bottom: 1px solid #fff;
  box-shadow: 0 1px #aca899;
  background: var(--xp-face);
  font: 12px var(--xp-font);
  user-select: none;
}
html[data-os="desktop"] .menubar-item { padding: 2px 7px; border: 0; background: none; color: #000; font: inherit; cursor: default; }
html[data-os="desktop"] .menubar-item:hover,
html[data-os="desktop"] .menubar-item[aria-expanded="true"] { background: var(--xp-select); color: #fff; }
html[data-os="desktop"] .menu-drop {
  position: absolute;
  top: 100%;
  z-index: 5;
  min-width: 170px;
  padding: 2px;
  border: 1px solid #aca899;
  background: #fff;
  box-shadow: 2px 2px 3px rgb(0 0 0 / 0.35);
}
html[data-os="desktop"] .menu-drop button {
  position: relative;
  display: block;
  width: 100%;
  padding: 3px 20px 3px 22px;
  border: 0;
  background: none;
  color: #000;
  font: 12px var(--xp-font);
  text-align: left;
  cursor: default;
}
html[data-os="desktop"] .menu-drop button:hover,
html[data-os="desktop"] #mos .menu-drop button:focus-visible { outline: none; background: var(--xp-select); color: #fff; }
html[data-os="desktop"] .menu-drop [aria-checked="true"]::before { content: "\2713"; position: absolute; left: 7px; }
html[data-os="desktop"] .menu-drop hr { margin: 3px 1px; border: 0; border-top: 1px solid #aca899; }

/* Notepad */

html[data-os="desktop"] .win[data-view="notepad"] .win-body { background: #fff; }
html[data-os="desktop"] .np-text {
  box-sizing: border-box;
  min-height: 100%;
  padding: 2px 4px;
  color: #000;
  font: 13px/1.3 "Lucida Console", Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
html[data-os="desktop"] #mos .np-text:focus-visible { outline: none; }
html[data-os="desktop"] .np-text i { font-style: normal; }
html[data-os="desktop"] .np-text.is-nowrap { width: max-content; white-space: pre; overflow-wrap: normal; }
html[data-os="desktop"] .np-text a,
html[data-os="desktop"] .np-text button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline dotted; cursor: pointer; }
html[data-os="desktop"] .np-text a:hover,
html[data-os="desktop"] .np-text button:hover { color: #0000ee; text-decoration: underline; }

/* Write: a white page on gray, with a ruler */

html[data-os="desktop"] .win[data-view="write"] .win-body { display: flex; overflow: hidden; background: var(--xp-face); }
html[data-os="desktop"] .wp { display: flex; flex: 1; flex-direction: column; min-width: 0; }
html[data-os="desktop"] .wp-ruler { flex: none; padding: 3px 0; border-bottom: 1px solid #aca899; overflow: hidden; }
html[data-os="desktop"] .wp-marks {
  position: relative;
  width: 560px;
  height: 14px;
  margin: 0 auto;
  background: #fff repeating-linear-gradient(90deg, transparent 0 9px, #777 9px 10px) 0 100% / 100% 3px no-repeat;
  box-shadow: inset 0 0 0 1px #aca899;
  font: 9px/14px var(--xp-font);
}
html[data-os="desktop"] .wp-marks span { position: absolute; top: 0; transform: translateX(-50%); }
html[data-os="desktop"] .wp-desk { flex: 1; min-height: 0; padding: 14px 10px 24px; overflow: auto; background: #808080; }
html[data-os="desktop"] .wp-page {
  box-sizing: border-box;
  width: 560px;
  max-width: 100%;
  min-height: 720px;
  margin: 0 auto;
  padding: 44px 56px 56px;
  background: #fff;
  box-shadow: 2px 2px 0 #404040;
  font-size: 15px;
}
html[data-os="desktop"] .wp-page img { max-width: 100%; height: auto; }
html[data-os="desktop"] .wp-status { flex: none; padding: 2px 6px; border-top: 1px solid #fff; box-shadow: 0 -1px #aca899; font: 11px var(--xp-font); }
html[data-os="desktop"] .wp-page.is-resume h1 { margin: 0 0 0.6em; padding-bottom: 0.2em; border-bottom: 1px solid #000; font-size: 1.4em; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
html[data-os="desktop"] .wp-page.is-resume dl { margin: 0; }
html[data-os="desktop"] .wp-page.is-resume dt { margin-top: 1em; font-weight: bold; }
html[data-os="desktop"] .wp-page.is-resume dd { margin: 0; }
html[data-os="desktop"] .wp-page.is-resume dt + dd { font-style: italic; }

/* Explorer folders: the task pane on the left, the things on the right */

html[data-os="desktop"] .win[data-view="folder"] .win-body { display: flex; overflow: hidden; background: #fff; color: #000; font: 12px var(--xp-font); }
html[data-os="desktop"] .fx { display: flex; flex: 1; min-width: 0; }
html[data-os="desktop"] .fx-pane { flex: none; width: 180px; padding: 12px 10px; overflow: auto; background: linear-gradient(#7ba2e7, #6375d6); }
html[data-os="desktop"] .fx-box { margin-bottom: 12px; overflow: hidden; border-radius: 3px 3px 0 0; background: #d6dff7; }
html[data-os="desktop"] .fx-box h3 { margin: 0; padding: 5px 10px; background: linear-gradient(90deg, #fff, #c6d3f7); color: #215dc6; font: bold 11px var(--xp-font); }
html[data-os="desktop"] .fx-box > div { padding: 8px 10px; font: 11px/1.4 var(--xp-font); overflow-wrap: anywhere; }
html[data-os="desktop"] .fx-box p { margin: 6px 0 0; }
html[data-os="desktop"] .fx-box button { display: block; padding: 2px 0; border: 0; background: none; color: #215dc6; font: 11px var(--xp-font); text-align: left; cursor: pointer; }
html[data-os="desktop"] .fx-box button:hover { color: #428eff; text-decoration: underline; }
html[data-os="desktop"] .fx-box a { color: #215dc6; }
html[data-os="desktop"] .fx-items { flex: 1; min-width: 0; padding: 8px 10px; overflow: auto; }
html[data-os="desktop"] .fx-group h3 { margin: 6px 0; padding-bottom: 2px; border-bottom: 1px solid #a9bdec; color: #0b3790; font: bold 12px var(--xp-font); }
html[data-os="desktop"] .fx-group p { margin: 0 0 8px; color: #444; }
html[data-os="desktop"] .fx-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; margin-bottom: 8px; }
html[data-os="desktop"] .fx-item { padding: 4px 2px; border: 0; background: none; color: #000; font: 11px var(--xp-font); cursor: default; }
html[data-os="desktop"] .fx-label { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 82px; text-align: center; }
html[data-os="desktop"] .fx-label svg { width: 32px; height: 32px; }
html[data-os="desktop"] .fx-name { padding: 0 2px; overflow-wrap: anywhere; }
html[data-os="desktop"] .fx-note { display: none; }
html[data-os="desktop"] .fx-item.is-selected .fx-name { background: var(--xp-select); color: #fff; }
html[data-os="desktop"] #mos .fx-item:focus-visible { outline: none; }
html[data-os="desktop"] #mos .fx-item:focus-visible .fx-name { outline: 1px dotted #000; }
html[data-os="desktop"] .fx-items.is-details .fx-grid { display: block; margin: 0; }
html[data-os="desktop"] .fx-head,
html[data-os="desktop"] .fx-items.is-details .fx-item { display: grid; grid-template-columns: minmax(150px, 2fr) 3fr; align-items: center; }
html[data-os="desktop"] .fx-head { position: sticky; top: -8px; margin: -8px -10px 4px; background: var(--xp-face); box-shadow: 0 1px #aca899; }
html[data-os="desktop"] .fx-head span { padding: 3px 8px; border-right: 1px solid #d0cdc0; }
html[data-os="desktop"] .fx-items.is-details .fx-item { width: 100%; padding: 1px 2px; text-align: left; }
html[data-os="desktop"] .fx-items.is-details .fx-label { flex-direction: row; gap: 4px; width: auto; text-align: left; }
html[data-os="desktop"] .fx-items.is-details .fx-label svg { width: 16px; height: 16px; }
html[data-os="desktop"] .fx-items.is-details .fx-note { display: block; padding-left: 8px; overflow: hidden; color: #444; text-overflow: ellipsis; white-space: nowrap; }
html[data-os="desktop"] .fx-items.is-details .fx-item.is-selected { background: var(--xp-select); }
html[data-os="desktop"] .fx-items.is-details .fx-item.is-selected .fx-note { color: #fff; }

/* mOS Amp: a dark player with an amber display, like the room it sits in */

html[data-os="desktop"] .win[data-view="amp"] .win-body { display: flex; overflow: hidden; background: #22222a; }
html[data-os="desktop"] .amp {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  background: linear-gradient(#3a3a44, #22222a);
  color: #cfcfd6;
  font: 11px var(--xp-font);
  user-select: none;
}
html[data-os="desktop"] .amp-main { padding: 6px; border: 1px solid #111; border-radius: 3px; background: linear-gradient(#4a4a56, #2c2c34); box-shadow: inset 1px 1px rgb(255 255 255 / 0.15); }
html[data-os="desktop"] .amp-lcd {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 4px 10px;
  padding: 6px 8px;
  border: 1px solid #000;
  background: #0b0d08;
  box-shadow: inset 0 0 8px rgb(0 0 0 / 0.8);
  color: #ffb000;
  font: 11px/1.2 "Lucida Console", Consolas, monospace;
}
html[data-os="desktop"] .amp-time { font-size: 22px; letter-spacing: 1px; }
html[data-os="desktop"] .amp-viz { display: flex; align-items: flex-end; gap: 1px; height: 24px; }
html[data-os="desktop"] .amp-viz i {
  flex: 1;
  height: 12%;
  background: linear-gradient(#ff5a1a, #ffb000 40%, #6dbb2a);
  animation: amp-bar 0.8s ease-in-out infinite alternate paused;
}
html[data-os="desktop"] .amp-viz i:nth-child(3n) { animation-duration: 0.55s; }
html[data-os="desktop"] .amp-viz i:nth-child(3n + 1) { animation-duration: 0.7s; animation-delay: -0.3s; }
html[data-os="desktop"] .amp-viz i:nth-child(4n) { animation-duration: 0.95s; animation-delay: -0.5s; }
html[data-os="desktop"] .amp.is-playing .amp-viz i { animation-play-state: running; }
@keyframes amp-bar { from { height: 12%; } to { height: 100%; } }
html[data-os="desktop"] .amp-marquee { grid-column: 1 / -1; overflow: hidden; white-space: nowrap; }
html[data-os="desktop"] .amp-marquee span { display: inline-block; padding-left: 100%; animation: amp-scroll 14s linear infinite; }
@keyframes amp-scroll { to { transform: translateX(-100%); } }
html[data-os="desktop"] .amp-meta { grid-column: 1 / -1; color: #9a7a2a; font-size: 10px; text-transform: uppercase; }
html[data-os="desktop"] .amp-buttons { display: flex; gap: 3px; margin-top: 6px; }
html[data-os="desktop"] .amp-buttons button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 20px;
  padding: 0;
  border: 1px solid #111;
  border-radius: 2px;
  background: linear-gradient(#6a6a76, #3c3c46);
  color: #e8e8ee;
  cursor: pointer;
}
html[data-os="desktop"] .amp-buttons button:active { background: linear-gradient(#2c2c34, #4a4a56); }
html[data-os="desktop"] .amp-buttons svg { width: 11px; height: 11px; fill: currentColor; stroke: currentColor; }
html[data-os="desktop"] .amp-buttons .amp-open { width: auto; margin-left: auto; padding: 0 8px; font: 11px var(--xp-font); }
html[data-os="desktop"] .amp-tabs { display: flex; gap: 2px; }
html[data-os="desktop"] .amp-tabs button { flex: 1; padding: 3px 2px; border: 1px solid #111; background: #2c2c34; color: #9a9aa6; font: 10px var(--xp-font); cursor: pointer; }
html[data-os="desktop"] .amp-tabs [aria-selected="true"] { background: #0b0d08; color: #ffb000; }
html[data-os="desktop"] .amp-list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 2px 0;
  overflow: auto;
  border: 1px solid #000;
  background: #0b0d08;
  list-style: none;
  scrollbar-color: #4a4a56 #0b0d08;
}
html[data-os="desktop"] .amp-entry { display: flex; gap: 6px; width: 100%; padding: 1px 6px; border: 0; background: none; color: #6dbb2a; font: 11px/1.45 var(--xp-font); text-align: left; cursor: default; }
html[data-os="desktop"] .amp-entry span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-os="desktop"] .amp-entry[aria-current="true"] { background: #1d3a7a; color: #fff; }
html[data-os="desktop"] #mos .amp-entry:focus-visible { outline: 1px dotted #ffb000; outline-offset: -1px; }
html[data-os="desktop"] .amp-n { flex: none; min-width: 2.2em; color: #4f8a1e; text-align: right; }
html[data-os="desktop"] .amp-empty { padding: 6px; color: #6a6a76; }
html[data-os="desktop"] .amp-foot { margin: 0; color: #7a7a86; font-size: 10px; }
@media (prefers-reduced-motion: reduce) {
  html[data-os="desktop"] .amp-viz i,
  html[data-os="desktop"] .amp-marquee span { animation: none; }
  html[data-os="desktop"] .amp-marquee span { padding-left: 0; }
}

/* Lola: a pixel-art pet. Two frames breathe while she sleeps; two frames wag when she is awake. */

html[data-os] .lola {
  position: relative;
  padding: 14px 0 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: default;
}
html[data-os] .lola svg { display: block; width: 96px; height: 48px; overflow: visible; }
html[data-os] .lola g { opacity: 0; }
html[data-os] .lola:not(.is-awake) .lola-sleep-a { animation: lola-a 2.6s infinite; }
html[data-os] .lola:not(.is-awake) .lola-sleep-b { animation: lola-b 2.6s infinite; }
html[data-os] .lola.is-awake .lola-wake-a { animation: lola-a 0.3s infinite; }
html[data-os] .lola.is-awake .lola-wake-b { animation: lola-b 0.3s infinite; }
html[data-os] .lola.is-awake .lola-z { display: none; }

html[data-os] .lola-z {
  position: absolute;
  top: 2px;
  left: 30px;
  color: var(--dim);
  font: bold 11px var(--mono);
  line-height: 1;
  opacity: 0;
  animation: lola-z 3.6s steps(6) infinite;
}
html[data-os] .lola-z:nth-of-type(2) { animation-delay: 1.2s; }
html[data-os] .lola-z:nth-of-type(3) { animation-delay: 2.4s; }

html[data-os] .lola-say {
  max-width: 280px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid var(--line-hi);
  border-radius: 4px;
  background: var(--raise);
  color: var(--text);
  font-size: 12px;
}

/* Each frame holds for half the cycle: A, then B. */
@keyframes lola-a {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes lola-b {
  0%, 49.9% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
@keyframes lola-z {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(12px, -16px); }
}


html[data-os="desktop"] .lola { position: absolute; }
html[data-os="desktop"] .lola svg { width: 64px; height: 32px; }
html[data-os="desktop"] .lola-z { color: #fff; text-shadow: 1px 1px 0 #000; }
html[data-os="desktop"] .lola-say {
  position: absolute;
  z-index: 1;
  border: 1px solid #000;
  border-radius: 8px;
  background: #ffffe1;
  box-shadow: 2px 2px 6px rgb(0 0 0 / 0.35);
  color: #000;
  font: 12px var(--xp-font);
}
/* The stage: the room around mOS, drawn small and scaled up with hard pixels. It sits under mOS. */

html[data-os] .stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
  transition: opacity 0.3s ease;
}
html[data-os] .stage.is-gone { opacity: 0; }
html[data-os] .stage:focus { outline: none; }
html[data-os] .stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
html[data-os] .stage-walk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
html[data-os] .stage-walk:focus-visible { outline: none; }
html[data-os] .stage-power,
html[data-os] .stage-knob {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
html[data-os] .stage-knob { border-radius: 50%; touch-action: none; }
html[data-os] .stage-power:focus-visible,
html[data-os] .stage-knob:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
html[data-os] .stage-hint {
  position: absolute;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 0;
  margin: 0;
  color: #ffb000cc;
  font: 12px var(--mono);
  letter-spacing: 0.08em;
  text-align: center;
  pointer-events: none;
}

/* mOS on the CRT's glass: sharp, with scanlines and a vignette laid over it. */

/* Plain HTML: the real plain page in a frame over the whole desktop, under the boot screen and the scanlines. */
html[data-os="desktop"] #mos .plain-view {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  color-scheme: light;
}

html[data-os="desktop"] #mos.on-crt {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  background: #000;
  transform-origin: 0 0;
  pointer-events: none;
}
html[data-os="desktop"] #mos.on-crt.is-live { pointer-events: auto; }
html[data-os="desktop"] #mos.on-crt.is-off { visibility: hidden; }
html[data-os="desktop"] #mos.on-crt::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2147483647;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / 0.16) 2px 3px),
    radial-gradient(ellipse at center, transparent 62%, rgb(0 0 0 / 0.5) 100%);
  pointer-events: none;
}
html[data-os="desktop"] #mos.on-crt.is-warming { animation: crt-on 0.9s ease-out both; }
html[data-os="desktop"] #mos.on-crt.is-cooling { animation: crt-off 0.55s ease-in both; }
@keyframes crt-off {
  0% { clip-path: inset(0); filter: brightness(1); }
  45% { clip-path: inset(49.6% 0 49.6% 0); filter: brightness(4); }
  75% { clip-path: inset(49.6% 48.5% 49.6% 48.5%); filter: brightness(6); }
  100% { clip-path: inset(50% 50% 50% 50%); filter: brightness(6); }
}
@keyframes crt-on {
  0% { clip-path: inset(50% 0 50% 0); filter: brightness(5); }
  30% { clip-path: inset(49.7% 3% 49.7% 3%); filter: brightness(5); }
  100% { clip-path: inset(0); filter: brightness(1); }
}

/* Boot */

html[data-os] .boot {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  background: #000;
  transition: opacity 0.24s ease;
}
html[data-os] .boot.is-done { opacity: 0; }
html[data-os] .boot-slab {
  height: 34vh;
  aspect-ratio: 4 / 9;
  background: linear-gradient(100deg, #161616, #070707 60%, #0c0c0c);
  animation: boot-slab 0.9s ease-out both;
}
html[data-os] .boot p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  animation: boot-text 0.9s ease-out both;
}

@keyframes boot-slab {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes boot-text {
  0%, 40% { opacity: 0; }
  to { opacity: 1; }
}

/* The boot screen on the desktop: logo, edition, sliding blocks */

html[data-os] .boot-edition,
html[data-os] .boot-bar,
html[data-os] .boot-copy { display: none; }

html[data-os="desktop"] .boot { gap: 8px; }
html[data-os="desktop"] .boot-slab { height: 72px; background: linear-gradient(100deg, #2a2a2a, #0a0a0a 60%, #181818); box-shadow: 0 0 0 1px #333; animation: none; }
html[data-os="desktop"] .boot > p:not([class]) {
  margin: 6px 0 0;
  color: #fff;
  font: bold 44px/1 var(--xp-font);
  letter-spacing: 0;
  text-indent: 0;
  animation: none;
}
html[data-os="desktop"] .boot p.boot-edition {
  display: block;
  margin: -4px 0 28px;
  letter-spacing: 0;
  text-indent: 0;
  animation: none;
  color: #f48a2a;
  font: italic bold 14px var(--xp-font);
}
html[data-os="desktop"] .boot-bar {
  position: relative;
  display: block;
  width: 150px;
  height: 14px;
  overflow: hidden;
  border: 1px solid #b2b2b2;
  border-radius: 4px;
}
html[data-os="desktop"] .boot-bar i {
  position: absolute;
  top: 2px;
  left: 0;
  width: 8px;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(#2c5bff, #7ea4ff 40%, #1d3fd4);
  animation: boot-blocks 1.6s linear infinite;
}
html[data-os="desktop"] .boot-bar i:nth-child(2) { animation-delay: 0.1s; }
html[data-os="desktop"] .boot-bar i:nth-child(3) { animation-delay: 0.2s; }
html[data-os="desktop"] .boot p.boot-copy {
  position: absolute;
  bottom: 12px;
  left: 16px;
  display: block;
  margin: 0;
  color: #fff;
  font: 11px var(--xp-font);
  letter-spacing: 0;
  text-indent: 0;
  animation: none;
}
@keyframes boot-blocks {
  from { transform: translateX(-30px); }
  to { transform: translateX(170px); }
}

html[data-os="desktop"] .boot p.boot-goodbye { margin-top: 18px; color: #fff; font: 16px var(--xp-font); letter-spacing: 0; text-indent: 0; animation: none; }

/* The tray's speaker: waves when sound is on, a cross when it is off */

html[data-os="desktop"] .tray-sound { display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
html[data-os="desktop"] .tray-sound[aria-pressed="true"] .tray-mute,
html[data-os="desktop"] .tray-sound[aria-pressed="false"] .tray-waves { display: none; }

@media (prefers-reduced-motion: reduce) {
  html[data-os] *,
  html[data-os] *::before,
  html[data-os] *::after { animation: none !important; transition: none !important; }
  /* Lola holds still: her first frame, asleep or awake. */
  html[data-os] .lola:not(.is-awake) .lola-sleep-a,
  html[data-os] .lola.is-awake .lola-wake-a { opacity: 1; }
}

/* Pocket: mOS on a phone or a touch screen. The same desktop, compact: windows fill the screen above a taller
   taskbar, targets are bigger for a thumb, and side panes stack under the content. */

html[data-pocket] #mos { grid-template-rows: 1fr 40px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html[data-pocket] .taskbar,
html[data-pocket] .start { height: 40px; }
html[data-pocket] .start { margin-right: 4px; padding: 0 16px 2px 10px; }
html[data-pocket] .task { flex: 0 1 140px; width: auto; min-width: 0; height: 32px; }
html[data-pocket] .startmenu { bottom: 40px; width: min(380px, 100%); max-height: calc(100% - 40px); overflow: auto; }
html[data-pocket] .startmenu .sm-item { padding-block: 8px; }
html[data-pocket] .balloon { bottom: 52px; max-width: min(270px, calc(100% - 28px)); }

html[data-pocket] .win-bar { height: 36px; }
html[data-pocket] .win-btn { width: 30px; height: 30px; }
html[data-pocket] .win-btn svg { width: 12px; height: 12px; }
html[data-pocket] .win:not(.win-dialog) .win-max { display: none; }
html[data-pocket] .win-nav span,
html[data-pocket] .win-address label,
html[data-pocket] .win-plain { display: none; }
html[data-pocket] .win-nav { height: 32px; }
html[data-pocket] .win-address input { height: 26px; font-size: 13px; }
html[data-pocket] .win-body.page { padding: 12px 14px 24px; }
html[data-pocket] .menubar-item { padding: 6px 10px; }
html[data-pocket] .menu-drop button { padding: 9px 20px 9px 24px; }

html[data-pocket] .fx { flex-direction: column; overflow: auto; }
html[data-pocket] .fx-items { flex: none; overflow: visible; }
html[data-pocket] .fx-pane { flex: 1 0 auto; order: 1; width: auto; overflow: visible; }
html[data-pocket] .fx-head { top: -8px; }
html[data-pocket] .fx-item { padding: 6px 2px; }

html[data-pocket] .wp-ruler { display: none; }
html[data-pocket] .wp-desk { padding: 8px 6px 16px; }
html[data-pocket] .wp-page { width: auto; min-height: 0; padding: 22px 18px 30px; }

html[data-pocket] .amp-buttons button { width: 36px; height: 28px; }
html[data-pocket] .amp-tabs button { padding: 7px 2px; }
html[data-pocket] .amp-entry { padding: 5px 6px; }
