/* /app: the Markdown Mini window on a desktop, with a menu bar and a dock.
   The window itself is styled in window.css. */

:root {
  --wall: #c9d3e6;
  --wall-2: #e6e9f1;
  --menubar: rgba(246, 246, 248, 0.72);
  --menubar-text: rgba(0, 0, 0, 0.85);
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #1b2233;
    --wall-2: #0d0f14;
    --menubar: rgba(30, 30, 32, 0.6);
    --menubar-text: rgba(255, 255, 255, 0.88);
  }
}

html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.3 var(--font);
  background: radial-gradient(120% 90% at 50% 0%, var(--wall-2), var(--wall));
  color: var(--menu-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Menu bar ---------------------------------------------------------------- */

.menubar {
  position: fixed; inset: 0 0 auto; height: 28px; z-index: 30;
  display: flex; align-items: center; gap: 2px; padding: 0 10px;
  background: var(--menubar); color: var(--menubar-text);
  -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  user-select: none; -webkit-user-select: none;
}
.menubar__item {
  border: 0; background: none; height: 22px; padding: 0 9px; border-radius: 5px;
  font-size: 13px; cursor: default;
}
.menubar__item--app { font-weight: 700; }
.menubar__item.open, .menubar__item:hover { background: var(--hover); }
.menubar__spacer { flex: 1; }
.menubar__link {
  color: inherit; text-decoration: none; font-size: 13px; padding: 0 9px; height: 22px;
  display: flex; align-items: center; border-radius: 5px;
}
.menubar__link:hover { background: var(--hover); }

.stage { position: fixed; inset: 28px 0 0; }

/* Dock: where a closed or minimized window waits. */
.dock {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  border: 0; padding: 8px; border-radius: 22px; cursor: default;
  background: var(--menubar); -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  box-shadow: var(--menu-edge);
}
.dock img { display: block; width: 64px; height: 64px; }
.dock:hover img { transform: translateY(-3px); transition: transform .15s ease; }

/* Phones and small tablets: the window is the screen. ---------------------- */

body.mobile .menubar, body.mobile .traffic, body.mobile .grip, body.mobile .dock { display: none !important; }
body.mobile .stage { inset: 0; }
body.mobile .window {
  inset: 0 !important; width: auto !important; height: auto !important;
  border-radius: 0; box-shadow: none; transform: none !important; opacity: 1 !important;
}
body.mobile .window::after { display: none; }
body.mobile .titlebar {
  height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  touch-action: auto; overflow-x: auto; scrollbar-width: none;
}
body.mobile .titlebar::-webkit-scrollbar { display: none; }
body.mobile .toolbar { gap: 8px; }
body.mobile .group { height: 34px; border-radius: 17px; }
body.mobile .tb { height: 30px; min-width: 34px; border-radius: 15px; }
body.mobile .group--round .tb { height: 34px; min-width: 36px; border-radius: 17px; }
body.mobile .panes { padding-bottom: env(safe-area-inset-bottom); background: var(--chrome); }
body.mobile .menu { min-width: 220px; }
body.mobile .menu__item { height: 36px; font-size: 15px; }
body.mobile .menu__key { display: none; }
