/* One shared menu-bar layout for desktop windows and ordinary OS pages. */
body.os-shell > .travos-menu {
  position: fixed;
  z-index: 2147483000;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 38px;
  padding: 0 12px 0 7px;
  border-bottom: 1px solid #ffffff0a;
  color: var(--os-text, #ddd);
  background: var(--os-bar-surface, #1d1d1df2);
  -webkit-backdrop-filter: blur(var(--os-glass-blur, 28px)) saturate(130%);
  backdrop-filter: blur(var(--os-glass-blur, 28px)) saturate(130%);
  font: 400 13px/1 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
body.os-shell > .travos-menu *,
body.os-shell > .travos-menu *::before,
body.os-shell > .travos-menu *::after { box-sizing: border-box; }
body.os-shell > .travos-menu [hidden] { display: none !important; }
body.os-shell > .travos-menu > .left,
body.os-shell > .travos-menu > .right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  height: 100%;
  min-width: 0;
  margin: 0;
  color: inherit;
}
body.os-shell > .travos-menu > .left { flex: 0 1 auto; }
body.os-shell > .travos-menu > .right { flex: none; }
body.os-shell > .travos-menu .travos-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: none;
  gap: 8px;
  height: 100%;
  padding: 0;
  cursor: default;
  font: inherit;
}
body.os-shell > .travos-menu .text-block { min-width: 0; margin: 0; padding: 0; }
body.os-shell > .travos-menu #app {
  display: block;
  font: 700 13.5px/1 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
  white-space: nowrap;
}
body.os-shell > .travos-menu :is(.desktop-menu-trigger, .preview-window-menu-trigger, .spotlight-trigger, .os-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background-color: transparent;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
}
body.os-shell > .travos-menu .desktop-menu-trigger { width: 38px; border-radius: 14px; }
body.os-shell > .travos-menu .desktop-menu-trigger .travos-icon { display: block; width: 20px; height: 20px; object-fit: contain; }
body.os-shell > .travos-menu .preview-window-menu-trigger { margin-left: 12px; padding: 0 10px; }
body.os-shell > .travos-menu :is(.spotlight-trigger, .os-button) { width: 30px; }
body.os-shell > .travos-menu .spotlight-trigger svg { display: block; width: 16px; height: 16px; }
body.os-shell > .travos-menu .os-button { background-size: 16px; background-position: center; background-repeat: no-repeat; }
body.os-shell > .travos-menu :is(.desktop-menu-trigger, .preview-window-menu-trigger, .spotlight-trigger, .os-button):hover { background-color: var(--os-hover); }
body.os-shell > .travos-menu :is(.desktop-menu-trigger, .preview-window-menu-trigger)[aria-expanded="true"] { background-color: var(--os-selection, #0050c0); }
body.os-shell > .travos-menu :is(.desktop-menu-trigger, .preview-window-menu-trigger, .spotlight-trigger, .os-button):focus-visible { outline: 2px solid var(--os-focus, #94bcff); outline-offset: -1px; }
body.os-shell > .travos-menu .desktop-clock { display: flex; align-items: center; flex: none; gap: 7px; height: 28px; margin-left: 8px; }
body.os-shell > .travos-menu .datetime { display: block; flex: none; margin: 0; padding: 0; font: inherit; line-height: 28px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Preserve the legacy action targets without showing duplicate menu commands. */
body.os-shell > .travos-menu :is(#restart, #fullscreen, .fullscreen-embed) { display: none !important; }

@media (max-width: 600px) {
  body.os-shell > .travos-menu { gap: 10px; padding-right: 8px; }
  body.os-shell > .travos-menu #desktop-date { display: none; }
  body.os-shell > .travos-menu .preview-window-menu-trigger { margin-left: 8px; padding-inline: 8px; }
  body.os-shell > .travos-menu .desktop-clock { margin-left: 5px; }
}
@media (max-width: 380px) {
  body.os-shell > .travos-menu .os-button { display: none; }
}

#desktop-menu {
  position: fixed;
  inset: 40px auto auto 6px;
  width: 328px;
  max-width: calc(100vw - 12px);
  max-height: calc(100dvh - 48px);
  margin: 0;
  padding: 5px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--os-frame, #54565e);
  border-top-color: var(--os-frame-top, #576775);
  border-radius: var(--os-radius, 10px);
  color: var(--os-text, #ddd);
  background: var(--os-menu-surface, #181818e8);
  box-shadow: var(--os-glass-rim), var(--os-shadow);
  -webkit-backdrop-filter: blur(var(--os-glass-blur, 28px)) saturate(130%);
  backdrop-filter: blur(var(--os-glass-blur, 28px)) saturate(130%);
  font: 500 13.5px/1.2 var(--os-font, Arial, "Helvetica Neue", Helvetica, sans-serif);
  letter-spacing: -.12px;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
#desktop-menu::backdrop { background: transparent; }
#desktop-menu *, #desktop-menu *::before, #desktop-menu *::after { box-sizing: border-box; }
#desktop-menu [hidden] { display: none !important; }
.desktop-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 24px;
  margin: 0;
  padding: 2px 10px;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.desktop-menu-item svg {
  display: block;
  flex: none;
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.desktop-menu-item.is-current {
  color: #fff;
  background: var(--os-selection, #0050c0);
}
.desktop-menu-shortcut {
  margin-left: auto;
  padding-left: 18px;
  color: var(--os-muted, #939393);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.desktop-menu-external { font-size: 15px; line-height: 1; }
.desktop-menu-item.is-current .desktop-menu-shortcut { color: #ffffffc7; }
.desktop-menu-separator {
  height: 1px;
  margin: 5px 10px;
  background: var(--os-line, #3b3b3bcc);
}
@media (prefers-reduced-transparency: reduce) {
  body.os-shell > .travos-menu { background: var(--os-surface, #181818); -webkit-backdrop-filter: none; backdrop-filter: none; }
  #desktop-menu { background: var(--os-surface, #181818); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  #desktop-menu { border-color: #d4d4d4; color: #fff; }
  .desktop-menu-separator { background: #ffffff66; }
  .desktop-menu-shortcut { color: #ffffffb3; }
}

/* Legal pages retain the same neutral desktop menu-bar material. */
body.os-shell > .travos-menu[data-tone="blue"] { background: var(--os-bar-surface); border-bottom-color: var(--os-line, #3b3b3bcc); }
