Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

4.1 KB
Raw Blame
/* Undo what src/index.css sets for the desktop and what a phone must not have.
   Everything here is scoped to html[data-shell='mobile'], so the desktop tree
   never sees a single rule of it. */

/* The desktop pins the root to 16px and zooms the app root by 15 percent.
   On a phone the root follows the system text size instead: 100% is the size
   the browser or WebView reports, --m-font-scale is what the native layer
   hands in on Android (platform/font-scale.ts). No zoom. */
html[data-shell='mobile'] {
  --ui-scale: 1;
  font-size: calc(100% * var(--m-font-scale));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--m-canvas);
  color-scheme: dark;
}
html[data-shell='mobile'].light {
  color-scheme: light;
}

/* iOS: Dynamic Type reaches a WKWebView ONLY through the -apple-system fonts,
   not through rem or px (measured in the simulator). So the root takes
   -apple-system-body, every size in the shell hangs on rem, and the family is
   set back to the app font on body below. Android scales text itself through
   the WebView's textZoom. Targets stay 44 px either way. */
@supports (font: -apple-system-body) {
  html[data-shell='mobile'][data-os='ios']:not([data-font-fixed]) {
    font: -apple-system-body;
  }
}
html.m-kb-open[data-shell='mobile'] {
  --m-bottom: 0px;
}

html[data-shell='mobile'] #root,
html[data-shell='mobile'] body > :not(#root) {
  zoom: 1;
}

html[data-shell='mobile'],
html[data-shell='mobile'] body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html[data-shell='mobile'] body {
  margin: 0;
  background: var(--m-canvas);
  color: var(--m-t1);
  font-family: var(--m-font);
  font-size: var(--m-text-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.m-app,
.m-app *,
.m-app *::before,
.m-app *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* :where keeps these element resets at the specificity of a bare tag, so
   every m-* class wins over them without help. */
:where(.m-app) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  touch-action: manipulation;
}
:where(.m-app) button:disabled,
:where(.m-app) [aria-disabled='true'] {
  cursor: default;
}
:where(.m-app) input,
:where(.m-app) textarea,
:where(.m-app) select {
  font: inherit;
  color: inherit;
}
:where(.m-app) h1,
:where(.m-app) h2,
:where(.m-app) h3,
:where(.m-app) p,
:where(.m-app) ul,
:where(.m-app) ol {
  margin: 0;
  padding: 0;
}
:where(.m-app) ul,
:where(.m-app) ol {
  list-style: none;
}

/* Pressing a target: 70 percent opacity for 120 ms (DESIGN.md 9). Never a
   hover rule: nothing in this shell depends on hover. The desktop sheet
   shrinks a pressed button to 97 percent (src/index.css); here that would
   take a 44 px target below 44 px while the finger is on it, so it is off. */
.m-app button:active:not(:disabled):not([aria-disabled='true']),
.m-app [role='button']:active:not([aria-disabled='true']) {
  opacity: 0.7;
  scale: none;
}

/* Focus ring, 2 px in the accent (DESIGN.md 10). */
.m-app :focus {
  outline: none;
}
.m-app :focus-visible {
  outline: 2px solid var(--m-accent);
  outline-offset: 2px;
}
/* A page or sheet title takes focus when it opens, for screen readers. It is
   not a control, so it shows no ring. */
.m-app [data-m-focus-title]:focus-visible {
  outline: none;
}

.m-app ::-webkit-scrollbar {
  display: none;
}
.m-app * {
  scrollbar-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .m-app *,
  .m-app *::before,
  .m-app *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* A search field brings its own clear button in WebKit and in the Android
   WebView. ui/Field has one that is 44 px and labelled, so the small one of
   the engine goes (seen doubled in the emulator, 08.10.2026). */
.m-app input[type='search']::-webkit-search-cancel-button,
.m-app input[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}